ProgrammingPro #19: Evolution of Programming, Stability AI’s Generative AI Coding, PyFlo, and the Art of Code Reviewing
Bite-sized actionable content, practical tutorials, and resources for programmers.
Hi,
You might not think that programmers are artists, but programming is an extremely creative profession. It’s logic-based creativity.
– John Romero, well-known video game programmer
If you recall the good old days of the iconic Dangerous Dave and Quake, you’ll agree with every bit of what Romero has to say. Programming is an art and science both at the same time indeed. The onset of generative AI has freed programmers to focus more on the algorithmic, creative, and dare I say artistic aspects of the process to create code that will make Romero proud!
Welcome to yet another incredible issue of our programming-focused newsletter! We’re here with the latest news and updates including Stability AI unveiling StableCode for generative AI coding, OpenAI’s major enhancements to ChatGPT, Automating Compliance with Drata, and Google launching Project IDX - a cutting-edge AI-enabled browser-based IDE.
We know how much you love our curated tutorials and secret knowledge pieces and we’re here with a fresh batch on the art of code reviewing, a deep dive into syntax highlighting techniques, Cython 3.0: bridging Python's flexibility with C's performance, and efficient concurrency with Go. Watch out also for the trending GitHub repos we’ve handpicked for you!
My promise with this newsletter is to act as your personal assistant and help you navigate and keep up-to-date with what's happening in the world of software development. What did you think of today's newsletter? Please consider taking the short survey below to share your thoughts and you will get a free PDF of the “Python Workshop” eBook upon completion.
Thanks for reading.
Kartikey Pandey
Editor-in-Chief
Writer’s Credit: Special shout-out to Vidhu Jain for her valuable contribution to this week’s newsletter content!
Tell Us What You Think, Get a Packt eBook!
See your risk and compliance status without sifting through spreadsheets (sponsor)
Eliminate manual control testing and see your compliance status at all times—giving you peace of mind and saving you time. With 450+ 5-star G2 reviews, you’ll see why 2,500+ customers choose Drata to automate compliance for SOC 2, ISO 27001, and more. Want to see automation in action? Book a demo and get 10% off and waived implementation fees.
⚡ TechWave: News and Analysis
Stability AI Unveils StableCode for Generative AI Coding: Stability AI has launched StableCode, a LLM generative AI product aimed at aiding programmers and nurturing new developers. This innovative tool is not only designed to assist in daily coding tasks but also serves as an educational platform for those looking to enhance their skills. Utilizing the Pytorch deep learning library, StableCode can complete complex Python files, showing promising results in popular benchmarks like HumanEval.
OpenAI Unveils Series of Major Enhancements to ChatGPT: OpenAI announced several enhancements to ChatGPT on August 3 that are being rolled out this week. The updates include the introduction of prompt examples to guide users, suggested replies for a more interactive experience, and the default implementation of GPT-4. Users will also have the ability to upload multiple files at once, enjoy a persistent login session, and utilize new keyboard shortcuts.
Study Reveals ChatGPT's Inaccuracy in Software Questions: A recent study by Purdue analyzed 517 questions from Stack Overflow and found that ChatGPT often misunderstood the core concept of the questions, leading to incorrect or superficial answers. Despite these findings, 39.34% of users still prefer ChatGPT's answers due to their comprehensive language style. The study emphasizes the need for human oversight and awareness of potential risks associated with relying solely on ChatGPT for software-related inquiries. Read the full paper here.
Google Unveils Project IDX: AI-Enabled Browser-Based Development Environment: Google has launched an innovative AI-enabled browser-based development environment designed for building full-stack web and multiplatform applications. Currently, it supports popular frameworks such as Angular, Flutter, Next.js, React, Svelte, and Vue, with languages like JavaScript and Dart. Support for Python, Go, and others is in development. As a cloud-based IDE, Project IDX integrates with Google's Firebase Hosting and Google Cloud Functions, and allows developers to import code from GitHub.
Jupyter AI: Open-Source Tool for AI-Driven Code Generation in Jupyter Notebooks: Jupyter AI is a new subproject of Project Jupyter that seamlessly integrates generative artificial intelligence into Jupyter notebooks. This innovative tool offers users the ability to generate code, correct errors, and even create entire notebooks using natural language prompts. It connects with various large language models, including those from AI21, Anthropic, AWS, Cohere, and OpenAI. It offers two interfaces: a chat UI within JupyterLab and a magic command interface.
IBM Exposes Vulnerability in AI Chatbots: IBM researchers have discovered alarming vulnerabilities in large language models (LLMs), including ChatGPT, that can be exploited to write malicious code. By presenting a "game" with specific rules, the researchers were able to "hypnotize" the AI into bypassing protective "guardrail" rules. This method was used to create malicious code, devise ransomware attack strategies, and write insecure source code. The study highlights the potential risks of generative AI in the cyber threat landscape. While some models resisted the trick, others like GPT-3.5 and GPT-4 were more susceptible, raising concerns about the future of AI security.
📚 Secret Knowledge: Learning Resources
Generative AI and the Evolution of Programming - A Shift, Not an End: The fear that generative AI will replace software developers is being challenged by a new perspective that sees AI as an evolution rather than an end to programming. According to Mike Loukides of O'Reilly Media, AI will augment human capabilities rather than replace them. He argues that programming will change, making developers more efficient and allowing them to focus on understanding user needs, designing, testing, and security auditing. Explore how writing detailed prompts for AI is seen as a new form of programming.
Python, Foreign Functions and Steam: This article shows you how to call foreign C functions from Python. This allows you to call into shared libraries and is similar to how extensions work. The examples use the Steamworks SDK which games use to communicate with Steam.
How to Use Amazon CodeWhisperer as a Real-Time AI Coding Companion: Amazon CodeWhisperer is a cutting-edge AI coding companion designed to assist developers working with Java and Spring Boot. By simply writing a comment that outlines a specific task in plain English, CodeWhisperer automatically determines the best cloud services and public libraries to accomplish the task, recommending code snippets directly in the IDE. Supporting popular programming languages like Java, Python, C#, TypeScript, and more, CodeWhisperer is available across various platforms, including AWS Toolkit for Visual Studio Code and JetBrain family of IDEs.
The Art of Code Reviewing: Know how code reviewing is more than just a technical process; it's an essential part of collaboration and growth within a development team. Explore a comprehensive framework for code reviewing, emphasizing the importance of kindness, attention to detail, and open communication. The W3H approach (why, what, when, how) is introduced as a guideline for approaching code reviews, focusing on understanding the purpose, identifying good code, timing the review, and maintaining a respectful and constructive tone.
Revolutionizing Code Readability - A Deep Dive into Syntax Highlighting Techniques: Syntax highlighting, a vital tool for programmers, has undergone a transformation. Know about the evolution of syntax highlighting, from its early days of simple color coding to the modern, intricate methods that enhance code readability. Explore the algorithms and techniques used, such as regular expressions and context-free grammars, and how they contribute to the overall programming experience. The author also shares insights into the challenges and limitations of current methods, sparking a conversation about future possibilities.
Cython 3.0: Bridging Python's Flexibility with C's Performance: Cython, a superset of Python, has been designed to combine the ease of Python with the speed of C or C++. The recent release of Cython 3.0 brings significant improvements, including expanded pure Python mode, deeper NumPy compatibility, and internal changes for future compatibility with Python. Cython's ability to turn readable Python code into plain C performance makes it a powerful tool for handling large data sets, reflecting the industry's growing connection between Python and C.
🔍 HackerHub: Tools & Launches
reflex: Open-source project enabling developers to create performant and customizable web applications using pure Python. With Reflex, developers can deploy web apps in seconds, requiring only Python 3.7 or higher.
biaslyze: Open-source toolkit designed to identify and analyze bias within Natural Language Processing (NLP) models. Biaslyze offers a low-effort approach to bias testing.
oto: Low-level library designed to play sound across multiple platforms, offering developers a simple and efficient way to integrate audio into their applications. Compatible with Windows, macOS, Linux, Android, iOS, WebAssembly, Nintendo Switch, and Xbox.
badger: A key-value store designed to provide high performance and efficiency. Built in Go, Badger is optimized for SSDs and offers a unique LSM tree implementation.
kratos: Microservice-oriented governance framework implemented in Go offering a comprehensive set of features to help developers build robust applications, including support for HTTP/gRPC communication protocols, powerful middleware design, and registry interface connectivity.
✨ Tutorials and Guides
PyFlo - The Beginner’s Guide to Python: This is an online course with an interesting flow chart guiding you through lessons, with optional tangents and core concepts. It even includes an instructor’s guide.
How to Convert Addresses to Latitude and Longitude with Python: Learn how to convert addresses to latitude and longitude using the Geopy Python library. The tutorial provides a step-by-step guide, including the installation of the Geopy library and the creation of a Python script that leverages the Nominatim class to access OpenStreetMap's service. Using the geocode method, you can retrieve geographical information for any location, such as the city of "İzmir" in the example. The code snippet prints the address, latitude, and longitude coordinates, offering a practical way to utilize or analyze geographical location data in various applications.
Unlocking Efficiency - A Comprehensive Guide to C# Locking Mechanisms: In the world of multi-threaded programming, C# offers a variety of locking mechanisms to ensure data integrity and prevent race conditions. The article delves into the intricacies of these mechanisms, starting with the basic 'lock' keyword and extending to advanced techniques like Monitor, Mutex, and Semaphore. It highlights the importance of choosing the right locking strategy to avoid potential deadlocks and enhance performance.
Serialization Challenges in PySpark: Navigating Object-Oriented Programming Complexities: Object-Oriented Programming in PySpark can lead to serialization issues, as demonstrated by a problem encountered with nested generators and the mapPartitions() method in PySpark. The article details the troubleshooting process, from initial diagnosis to the final solution, highlighting the challenges of handling serialization in PySpark with OOP constructs. Know why attempts to serialize using the pickle module and static methods are unsuccessful. The final solution involves moving the method outside the class, reflecting PySpark's technical constraints.
Stateful Goroutines: Efficient Concurrency with Go: Concurrency in Go programming is enhanced through stateful goroutines, a channel-based synchronization approach that ensures safe management of shared data. The article explains how this method allows each piece of shared data to be owned exclusively by a single goroutine, eliminating data corruption risks. It provides a detailed code example demonstrating channel-based synchronization for state management and explores advanced stateful goroutines for synchronized state management, context-aware state management, and error handling.
How to Build a Globally Distributed, Access Platform with Go: Vendors often write “how we built it” posts full of buzzwords that lead to a quick call-to-action. This is not that. The CTO of identity and access control service Ory goes deep into the technicalities of the pieces behind the scenes that make such a system work (hello Go!) and what goes into making a truly distributed service.