ProgrammingPro #21: AI isn’t the enemy, Python’s got you, and Why C++ is still around
Bite-sized actionable content, practical tutorials, and resources for programmers.
Packt Conference - Put Generative AI to Work
“There are only two kinds of languages:
the ones people complain about and the ones nobody uses.”
Welcome to this week’s issue of our programmer focused newsletter.
Today we talk about how programmers can make friends with AI and harness it to enhance productivity and improve product reliability. We also talk about picking up in demand AI engineering skills, and looking at AI as just a very useful tool rather than something more ominous.
If you are open to getting chummy with AI, becoming a Python pro remains a good bet and we have found an interesting resource for you to get more practice. But to broaden your project level capabilities it is good to have other languages like C++ in your arsenal as well. There is a reason why this traditional language has stood the test of time after all.
Our tutorials and learning resources this time around take you through a unique hack, for generating fully-functional, error-free, full-stack web apps with AI, initiating coding conversations in VSCode, building a Code Image Generator using Python, REST API Visibility Control, unit testing with Goldlight.HttpClientTestSupport, and much more.
Our promise with this newsletter is to help you navigate and keep up-to-date with what's happening in the world of programming and software development. Our complete archives are available here.
Stay awesome!
Divya Anne Selvaraj
Editor-in-Chief
Julia Programming Language Breaks Into the Top 20 of TIOBE Index as Traditional Leaders Hold Their Ground: Julia, known for its speed and scalability, has entered the top 20 of the TIOBE Programming Language Popularity Index, appealing to data scientists and mathematical computation specialists. However, Python, C, C++, Java, and C# maintain their dominance in the top positions. Python's versatility has made it popular in web development and AI while C++ has extended its capabilities for software and game development. Read to learn how old giants continue to hold the fort.
The impact of generative AI on development: This episode of the What the Dev? podcast features an interview with Rishi Singh, the co-founder of SapientAI who talks about his perspective on what some call the threat of AI, particularly for software developers, and spins the ball towards a positive perspective of harnessing AI to get ahead in the game rather than focusing on being left behind. We also recommend giving a listen to this week’s episode on Using AI for outer loop development activities.
Highlights from Git 2.42: The latest version introduces a new bitmap traversal algorithm that excels when bitmap coverage is sparse, significantly boosting performance. Additionally, Git now allows excluding references by pattern in for-each-ref, making it easier to manage references during pushes. Read to learn about all enhancements.
Microsoft is bringing Python to Excel: Advanced spreadsheet users can soon incorporate Python scripts alongside Excel formulas within the same workbook. For now available to Microsoft 365 Insiders in the Excel for Windows beta channel, Python calculations will run in the Microsoft Cloud. While this feature is initially for the desktop version, Microsoft has partnered with Anaconda to make popular Python libraries, including Matplotlib and seaborn, accessible in Excel. Users will be able to access Python directly from the Excel ribbon without requiring any setup or installation.
Python-based Textual apps are coming to the web: Initially launched in 2021, Textual has been modernizing the integration of terminal applications with desktops. It will soon enable deployment to web browsers, offering features like 16.7 million colors, mouse support, and flicker-free animations. With a layout engine and reusable components, Textual simplifies the development of terminal applications, and its cloud service facilitates web-facing applications. The framework is available under an MIT license and requires Python 3.7 or later.
Responsible AI model for programmers being advanced by Northeastern computer scientist: A Northeastern University professor, Arjun Guha, and his research group have collaborated with the BigCode project, initiated by Hugging Face and ServiceNow, to foster open scientific collaboration in AI technology. They've contributed to the development of StarCoder, an open generative model for programmers. This model can be licensed and adapted for various applications, including gaming and industrial automation. The BigCode project promotes transparency and responsible AI use by making these models accessible to researchers and developers while respecting data privacy concerns.
What’s New In Python 3.12: Getting ready for the new Python release in October? Here is the live official guide that will help you stay in the loop while preparing your projects for compatibility with the new version by informing you of new features and deprecations.
The Journey of C++: From Conception to Modern Relevance: Conceived by Bjarne Stroustrup in the early 1980s, C++ emerged from the desire for a language that combined efficiency, power, and flexibility with OOP principles. Initially known as "C with Classes," C++ evolved to introduce revolutionary features like classes, inheritance, polymorphism, and operator overloading. Today, C++ remains relevant due to its high-performance capabilities and other strengths. Read this article to understand why C++ has stood the test of time despite the emergence of so many new programming languages.
✨ Tutorials and Guides
Outsmarting AI - The hack for generating fully-functional web apps: Here’s a hack for quickly generating fully-functional full-stack web apps using AI without having to deal with error-filled codebases. The author suggests providing a detailed Product Requirement Document (PRD) to AI tools like ChatGPT, then passing this on to Wasp’s GPT Web App Generator to generate coherent codebases.
How to use Cython to create Python wrappers for C libraries: This video tutorial demonstrates the creation of Python function bindings for a C library through the development of a Cython module and the utilization of its external function binding syntax. Cython simplifies the process of generating C extensions for Python, utilizing familiar Python syntax. It also facilitates the creation of convenient Python wrappers for C libraries by employing their header files.
Click and Python: Build Extensible and Composable CLI Apps: Click offers a mature, feature-rich solution compared to other Python CLI libraries like argparse and Typer. In this tutorial, you'll learn to build CLIs, add arguments, options, and subcommands, improve usage and help pages, and prepare your Click-based CLI for distribution.
Getting Started with GitHub Copilot Chat in VS Code: This tutorial explains how to install the GitHub Copilot Chat extension and initiate conversations with programming-related questions using the chat icon. Additionally, it highlights the use of Slash Commands for various tasks and how to ask specific code-related questions, accept code suggestions, and even open a Copilot Chat session within your editor.
Build a Code Image Generator With Python: Are you are a coder who is active on social media and love to share what you are creating with the community? You may already be familiar with formatting hassles and character limits when sharing your code and this tutorial will help you get over these issues and pick up some cool new Python skills. You will go through setting up a Flask project, styling templates with Jinja, using Playwright for image creation, beautifying code with Pygments, and enhancing the user experience with JavaScript.
REST API Visibility Control: This tutorial shows you how to leverage Swagger to conceal specific endpoints from the UI that aren't necessary to be shown, determine whether endpoints should be visible based on contextual factors like audits or integration levels, and streamline the number of endpoints during development for optimized startup and a simplified UI.
Easy HttpClient Testing with Goldlight.HttpClientTestSupport: In unit testing, mocking HttpClient poses challenges due to the lack of an IHttpClient interface and non-virtual key methods like PostAsync. To overcome this, the guide dives into HttpClient's internal workings and introduces Goldlight.HttpClientTestSupport to simplify setup..
🧠 Expert insights from the Packt Community
An excerpt from Building Low Latency Applications with C++ by Sourav Ghosh
Understanding latency-sensitive versus latency-critical applications
There is a subtle but important difference between the terms latency-sensitive applications and latency-critical applications. A latency-sensitive application is one in which, as performance latencies are reduced, it improves the business impact or profitability. So, the system might still be functional and possibly profitable at higher performance latencies but can be significantly more profitable if latencies are reduced. Examples of such applications would be operating systems(OSes), web browsers, databases, and so on.
A latency-critical application, on the other hand, is one that fails completely if performance latency is higher than a certain threshold. The point here is that while latency-sensitive applications might only lose part of their profitability at higher latencies, latency-critical applications fail entirely at high enough latencies. Examples of such applications are traffic control systems, financial trading systems, autonomous vehicles, and some medical appliances.
This excerpt is taken from the recently published book titled Building Low Latency Applications with C++ by Sourav Ghosh released on July 2023. To get a preview of the book's content, read the whole chapter available for free here or sign up for a 7-day free trial to access the complete Packt digital library. To explore more, click on the button below.
Take me to the complete chapter!
📚 Secret Knowledge: Learning Resources
Artificial Intelligence 3E - Foundations of Computational Agents: This resource offers a comprehensive exploration of AI as the study of designing intelligent computational agents. It's structured as a textbook but is accessible to a wide range of readers including developers, and made available under the CC BY-NC-SA 4.0 license. The book also provides online resources, including the complete text and Python implementations of the pseudo-code in the book.
From Web Developer to AI Pioneer: Becoming an AI Engineer: AI engineers play a pivotal role in making machines think like humans, from personalized shopping experiences to diagnosing illnesses. They are the architects behind AI systems, fluent in programming languages like Python and well-versed in machine learning. To become an AI engineer, you'll need programming proficiency, machine learning knowledge, and a solid grasp of mathematics and statistics. Read to understand what exactly an AI engineer does and where you should start if you want to become one.
Using GitHub Actions for C++ Continuous Integration: Watch this video tutorial to learn how to automate code building and testing triggered by events like commits and pull requests. Other key topics include setting up GitHubActions from scratch, utilizing CI project templates, executing tests, and integrating custom build/test environments.
React Props: A Visual Guide: This visual guide walks you through React Props in JavaScript. Starting with a flawed JavaScript function, it illustrates the resulting reference error due to missing 'a' and 'b' values and the fix involving parameters and arguments. Transitioning to React components, it clarifies their resemblance to JavaScript functions while rendering React elements. The guide also simplifies passing data as "props" in React, showcasing the versatility of these custom attributes for various JavaScript data types. Definitely a good ready reference to bookmark.
What is a memory leak in C++ and how can it be fixed?: A memory leak in C++ occurs when dynamically allocated memory isn't properly released, leading to wasted resources and potential program instability. This resource takes you through understanding the problem and solving it.
🔍 HackerHub: Tools & Launches
GodMode: an AI chat browser that lets you access ChatGPT, Claude 2,Perplexity, Bing, and more, all together with a single keyboard shortcut.
Prettymapp: a Python package to create beautiful maps using OpenStreetMap data.
txtai: a unified embeddings database catering to semantic search, LLM orchestration, and language model workflows.
javascript-algorithms: a repository of JavaScript-based examples of popular algorithms and data structures, each accompanied by detailed READMEs with explanations and additional resources.
whisper.api: offers a self-hostable API for fine-tuned Whisper Automatic Speech Recognition model-based speech-to-text transcription.
Flakehub: a website that hosts a collection of ready-to-use flakes that enhance development practices in Nix, providing libraries for deployment, packaging, secrets management, and system compatibility without disrupting user stability.



