ProgrammingPro #18: OverflowAI, Go 1.23 Release, PythonMonkey, and Vector Databases in Python
Bite-sized actionable content, practical tutorials, and resources for programmers.
Hi,
“I'm not a great programmer; I'm just a good programmer with great habits.”
- Kent Beck
The creator of extreme programming lays down a clear rule of thumb to evaluate a programmer’s capabilities. The onset of generative AI has made the task a whole lot easier, with tools like Stack Overflow’s new OverflowAI empowering programmers to write great code, or well, good code while cultivating the right habits.
We're delighted to welcome you to this week's edition of our programming universe, where we’ll talk about the latest breakthroughs and trends in programming languages, frameworks, and methodologies, including Go’s 1.23 version release, a leap forward in programming efficiency, Apple's new level of security measures for developers for Vision Pro, the removal of generative AI apps from Apple's China App Store amid regulatory changes, and the launch of the new 'gonew tool for instantiating Go projects.
Everyone talks about the writer’s block, but we programmers need a regular dose of inspiration to keep our creative projects moving! Look out for our curated secret knowledge and tutorials on running untrusted Python code, using the &= Operator in Python for data wrangling, a new approach to error handling in C#, and a collection of Python's most unusual features. We hope you’re as excited as we are in bringing this week’s issue to 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 “C++ Workshop” eBook upon completion.
Thanks for reading.
Kartikey Pandey, Vidhu Jain
Editor-in-Chiefs
Tell Us What You Think, Get a Packt eBook!
⚡ TechWave: News and Analysis
Stack Overflow Unveils OverflowAI - A New AI-Powered Platform: Stack Overflow has announced OverflowAI, a new platform that leverages artificial intelligence to provide developers with instant solutions to their coding problems. OverflowAI uses machine learning algorithms to understand the context of a question and provide accurate answers, saving developers time and effort. The platform is expected to revolutionize the way developers solve coding problems and enhance productivity.
Go 1.23 Release - Focus on Programming Efficiency: The Go programming language team has announced the release of Go 1.23. The new version brings significant improvements, including enhanced error handling and better support for generics. These features aim to simplify the coding process and increase developers' productivity. The Go team continues to focus on providing a robust and efficient programming language that meets the evolving needs of developers.
AI Adversarial Attacks: A Growing Threat in the Digital World: A recent report highlights the increasing threat of adversarial attacks on artificial intelligence systems. These attacks involve manipulating input data to deceive AI models, leading to incorrect outputs. The article underscores the need for robust security measures to protect AI systems from such threats, emphasizing the importance of ongoing research in adversarial machine learning.
Go Introduces 'gonew' - A New Tool for Instantiating Go Projects: The Go team has released 'gonew', an experimental tool designed to simplify the process of starting new projects in Go. The tool allows developers to instantiate new projects from predefined templates, which can be created by anyone and are distributed as modules. This leverages the Go module proxy and checksum database for enhanced security and availability. The tool can be installed using 'go install', and comes with two starter templates: 'hello' and 'helloserver'.
JetBrains Unveils GoLand 2023.2 - A New Era for Go Developers: JetBrains has launched GoLand 2023.2, the latest version of its popular Go IDE. The new release introduces several enhancements, including improved error detection, better code completion, and more efficient refactoring tools. These updates aim to streamline the development process and boost productivity for Go developers.
Apple's Vision Pro - A New Level of Security Measures for Developers: Apple is implementing stringent security measures for developers testing its upcoming Vision Pro headset. The company's legally binding terms and conditions require the headset to be used in a locked room, with developers responsible for preventing unauthorized access. These measures underscore Apple's commitment to preventing leaks and thefts ahead of the Vision Pro's anticipated 2024 release.
PythonMonkey: Bridging the Gap Between Python and JavaScript: PythonMonkey is a new tool that enables interoperability between Python and JavaScript using SpiderMonkey bindings. The library is built using Mozilla’s SpiderMonkey JavaScript engine and allows developers to run JavaScript code directly from Python, opening up new possibilities for cross-language development.
📚 Secret Knowledge: Learning Resources
AI Coding Assistants - A Comparative Study of GitHub Copilot, AWS Code Whisperer, and Tabnine: Learn how AI Coding Assistants are revolutionizing the programming landscape by translating plain English into working code. The article provides a comparative analysis of three popular AI coding assistants: GitHub Copilot, AWS Code Whisperer, and Tabnine. While GitHub Copilot and AWS Code Whisperer are based on Large Language Models (LLMs) and trained on billions of lines of code, Tabnine uses smaller, language-specific models. Read the post to know the strengths and unique features of each tool.
How to Use the &= Operator in Python for Data Wrangling: The Python &= operator, a combination of the binary AND and assignment operators, has found a practical application in data wrangling. The operator is useful when starting with a hypothesis that is accepted until a single event occurs that disproves it. The use case involves representing a spreadsheet as a list of Python dictionaries and finding and deleting columns (keys) that only have empty or Falsy values throughout. The &= operator is used to test this hypothesis iteratively, providing an efficient solution to a common data wrangling problem.
Running Untrusted Python Code - A Journey into Safe Execution: The post delves into the challenge of running untrusted Python code safely. Explore the use of a separate process as a sandbox, employing seccomp (secure computing mode) as a layer between the process and the system. This restricts the process from calling any system call apart from exit, sigreturn, read, or write. Know the use of setrlimit, a system call that allows a process to set resource limits on itself or its child processes. The post provides a practical guide to creating a Python sandbox, highlighting the importance of security when running untrusted code.
How to Become a Staff Engineer in Big Tech: A Staff Software Engineer at Meta details his tips to grow fast throughout the levels. He breaks down what each level does, what the role of the staff engineer is, and the uniqueness of Meta’s engineering culture.
ASP.NET Repeater - A Powerful Tool for .NET Developers: The ASP.NET Repeater, a server-side Web control in .NET, is making waves among developers for its ability to create custom lists from any data source. This tool, which is part of the Web Forms framework, allows developers to bind any data source and generate HTML in a repeated pattern. Although it lacks built-in layout or styles, this gives developers the freedom to customize the HTML as they see fit. The Repeater's flexibility and power make it a valuable tool in any .NET developer's toolkit, despite the learning curve associated with its use.
Why are people still using C? This post questions the continued popularity of C, despite its age and the availability of more modern languages. It argues that while C was a fine language forty years ago, there are numerous programming languages today that are better suited for the various tasks people want to accomplish. C's requirement for careful memory management and its lack of support for secure coding make it a less desirable choice compared to languages like Go, Python, Swift, Kotlin, Java, and C#.
🔍 HackerHub: Tools & Launches
Imgdiet: Go module designed for optimizing images. It uses the libvips library to provide a lightweight and idiomatic way to reduce image size without significant quality loss.
ImageAI: Open-source Python library designed to empower developers to build applications and systems with self-contained Deep Learning and Computer Vision capabilities.
Pillow: Python Imaging Library (PIL) fork that adds image processing capabilities to Python. Pillow provides extensive file format support, an efficient internal representation, and powerful image processing capabilities.
Flask-FlatPages: Python library that provides flat static pages to Flask applications, based on text files rather than a relational database. Compatible with Python 2.7 and 3.6+.
plotoptix: Python package for data visualization and ray tracing, leverages the NVIDIA OptiX 7.7 framework to create visually appealing and easy-to-understand representations of large datasets.
✨ Tutorials and Guides
Python Quirks - A Collection of Python's Most Unusual Features: This post on Peercy's writing platform presents a collection of Python's quirkiest features. The author shares a series of Python code snippets that behave in unexpected ways due to Python's unique design. These include surprising results from operations like sorting tuples, modifying lists, and using the 'is' operator. The post also highlights some of Python's lesser-known features, such as the Ellipsis object and the ability to append a list to itself.
How to Use Weaviate for Storing OpenAI Embedding Vectors in Golang Programs: A comprehensive guide on using Weaviate, a vector database, to store OpenAI embedding vectors in Golang programs. Weaviate, due to its Golang development, simplifies installation and testing. The post details the installation process on Debian 12, and how to use Weaviate in Golang, including creating a Weaviate client, storing vectors, and searching vectors with similarity.
Breaking Free From Exceptions - A New Approach to Error Handling in C#: The blog post explores an alternative approach to handling exceptions in C#. Instead of the traditional try-catch-throw paradigm, the post introduces a class called TriedEx<T>, which can represent either a value or an exception. This approach provides more control over error handling and control flow. The post delves into the usage of implicit operators, pattern matching with Match and MatchAsync methods, and deconstructor usage, all of which contribute to the versatility of the TriedEx<T> data type.
How to Use Vector Databases in Python: A comprehensive guide on how to get started with vector databases in Python. The tutorial covers the basics of vector databases, their advantages, and how they differ from traditional databases. It also provides a step-by-step guide on setting up a vector database, performing operations, and integrating it with Python applications.
C³ Cubism Extension - A New Dimension to C Programming Language: The C³ Cubism Extension is a novel approach to the C programming language, inspired by the art of Cubism. The extension aims to decompose systems into their simplest components, allowing for more accurate descriptions of small modules. This approach facilitates the automatic generation of program texts based on a programmer's description. The extension introduces a three-dimensional system of data structures, functions, and data transfer routes.
Python 3.12 Preview - More Intuitive and Consistent F-Strings: In this tutorial, you’ll preview one of the upcoming features of Python 3.12, which introduces a new f-string syntax formalization and implementation. The new implementation lifts some restrictions and limitations that affect f-string literals in Python versions lower than 3.12.