ProgrammingPro #53: Discover Go's Pros, py2wasm, Node.js 22 backs ECMAScript, Google's Gemini Code Assist, and GitLab Duo Chat
Bite-sized actionable content, practical tutorials, and resources for programmers
Welcome to this week’s edition of ProgrammingPro!
In today’s Expert Insight, we bring you an excerpt from the recently published book, Mastering Go - Fourth Edition, which briefly takes you through Go's strengths and limitations in application development, and is helpful if you are wondering about choosing Go as the primary programming language for your projects.
News Highlights: py2wasm accelerates Python in WebAssembly; Node.js update supports ECMAScript modules and enhances WebSocket client; GitLab launches AI Duo Chat for enhanced development; Google's Gemini Code Assist improves API management; and Tricentis debuts AI Copilots for efficient testing processes.
My top 5 picks from today’s learning resources:
Static analysis of security issues of the Python packages ecosystem🐍
Spreading Ownership and Delivering Value at Spotify with Backstage Plugins🎶
But there’s more, so dive right in.
Stay Awesome!
Divya Anne Selvaraj
Editor-in-Chief
PS: If you have any food for thought, feedback, or would like us to find you a specific Programming learning resource for our next issue, take the survey. We will send you one Packt credit to buy a book of your choice as a thank you!
🗞️News and Analysis🔎
New legislation would require companies to disclose that they are training AI models on copyrighted work: The bill mandates a notification to the Copyright Register for both new and existing AI systems. Read to learn about the proposed legal requirements for AI transparency.
Announcing py2wasm - A Python to Wasm compiler: This new compiler accelerates Python programs achieving speeds three times faster than the baseline interpreter. Read if you are looking for a faster, more efficient method to run Python code in WebAssembly environments.
Node.js 22 arrives, backs ECMAScript modules: Node.js 22, the newest update to the JavaScript runtime, introduces require() support for ECMAScript modules, a more compatible WebSocket client, and the upgraded Google V8 JavaScript engine 12.4. Read to understand how these improvements can optimize your JavaScript development.
Tricentis announces series of AI Copilots for its testing portfolio, starting with Testim Copilot: The tool allows users to input text descriptions and receive JavaScript test code, complete with explanations. Read to learn how AI copilots can make the testing process more accessible and efficient.
GitLab Duo Chat released as part of GitLab 16.11: The AI assistant facilitates onboarding and development by answering questions on GitLab’s features, refactoring code, and generating tests. Read to learn how it can enhance productivity across software development phases.
Java proposal would add exception case to switch: This adjustment would simplify exception handling in switch statements, particularly for APIs that throw checked exceptions. Read to learn how this could help make the code cleaner and reduce potential errors.
The Zig Programming Language 0.12.0 Release Notes have been published: Key features include a new Autodoc implementation, improved system package mode, a reworked HTTP server, and significant changes to the Zig standard library. Read for more.
Gemini Code Assist to Create APIs, Integrations, and Automation Flows in Public Preview: Google's new AI tool, Gemini Code Assist, now in public preview, significantly upgrades from its predecessor, Duet AI, enhancing Apigee API Management and Application Integration capabilities. Read to learn more.
🎓Tutorials and Learning Resources💡
Python
Open Sourcing a Python Project the Right Way in 2024: This guide simplifies the process of open-sourcing your Python project using a step-by-step approach, detailing automatic publishing using GitHub Actions, and more. Read to learn how to transform your codebase into an easily manageable open-source project.
Static analysis of security issues of the Python packages ecosystem: This study assesses security vulnerabilities within the Python packages ecosystem, specifically those archived in PyPI. Read to discover a hybrid scanning tool integrating bandit, snyk, and dlint scanners for detailed vulnerability reporting.
A beginner’s guide on programming instruments applying SCPI protocol using Python: This guide covers connecting instruments via USB or TCP/IP, using Python's socket and serial packages, and implementing an object-oriented approach for communication. Read to learn more.
For more Python resources go to PythonPro
C# and .NET
🎓Tutorial | How to use the new minimal API features in ASP.NET Core 8: The new version enhances minimal APIs with features like parameter binding from forms, support for antiforgery tokens, and more. Read to learn how to implement and utilize new features.
🎓Tutorial | File globbing in .NET: This comprehensive guide to file globbing in .NET uses the Microsoft.Extensions.FileSystemGlobbing NuGet package. Read to learn about the practical application of file globbing in .NET.
Mastering SOLID Principles in C# - A Practical Guide: This article uses practical C# code examples to illustrate how to implement SOLID principles effectively. Read to learn how to ensure software systems are robust, adaptable, and easier to manage.
C and C++
The Performance Impact of C++'s `final` Keyword: Despite various blog posts suggesting performance gains with final, initial tests conducted by the author of this article showed minimal impact. Read to learn why the keyword’s use should be based on careful benchmarking.
C isn’t a Hangover; Rust isn’t a Hangover Cure: This article critically evaluates the memory safety issues associated with programming languages like C and Rust, urging a nuanced understanding of their economic and security trade-offs. Read to learn about the multifaceted considerations involved in choosing a language.
🎥Memory-safe C running cool stuff with zero or minimal changes: This video
presents Fil-C, a memory-safe version of C created by Filip Pizlo, compatible with standard C, enabling the compilation of most C programs without modifications. Read to explore a novel and interesting solution to common issues.
Java
🎓Tutorial | OpenAPI 3 Documentation With Spring Boot: Updated to align with modern Java and Spring Boot versions, this article covers project setup, dependencies, and more. Read to ensure your projects are up-to-date with the latest Java and Spring Boot standards.
Deep Dive Into Java Executor Framework: This article provides an in-depth analysis of Java's ExecutorService framework, detailing its functionality, types of executors, and methods for task execution and thread pool management. Read to learn how to effectively manage and optimize thread pools.
Updated OpenJDK Proposal - Late Barrier Expansion for G1: The OpenJDK proposal introduces improvements to the G1 Garbage Collector by shifting the expansion of barriers from early to later in the C2 JIT Compiler's pipeline. Read to learn how optimizations could lead to more efficient memory management.
JavaScript and TypeScript
🎓Tutorial | 5 ways to use JavaScript promises: This article outlines five practical uses of JavaScript promises for handling asynchronous operations. Read to be able to enhance error handling and optimize code execution in web and server-side applications.
Everything about the AbortSignals (timeouts, combining signals, and how to use it with window.fetch): This article introduces advanced uses of AbortSignals with the window.fetch() method, covering how to implement timeouts and combine multiple abort conditions. Read to learn how to implement these features.
TypeScript - Branded Types: This article delves into enhancing TypeScript's type system with branding, which differentiates structurally identical types through a nominal typing approach. Read to learn how to ensure that types which are meant to be distinct remain so.
Go
🎓Tutorial | Deep Dive Into Terraform Provider Debugging With Delve: This tutorial outlines step-by-step instructions to prepare and execute debugging sessions, both locally and using command line, to handle complex issues in Terraform provider logic. Read to be able to optimize your infrastructure code.
The Two Reasons I Prefer Passing Struct Pointers Around: This article explains the advantages of using struct pointers in Go, focusing on the concepts of identity and consistency, rather than performance issues. Read to learn how to effectively use pointer semantics.
Rust
The Rust Calling Convention We Deserve: This article discusses a proposal for improving Rust's calling conventions, specifically critiquing the current C ABI used by LLVM for Rust, which is seen as inefficient for handling complex types. Read to understand how compilers handle function calls and arguments at a lower level.
The try block in Rust: The try block in Rust, still an experimental feature, offers a streamlined approach to error handling, enhancing the existing ? operator used with Result and Option types. Read to learn how the try block could potentially make error handling in Rust more succinct and maintainable.
PHP
PHP 8.4: Release Date and Features: The new version expected to release in November 2024, will introduce several new features aimed at enhancing security, functionality, and developer tools. Read to prepare for the upcoming migration and integration of these new features.
SQL
How to Build a Relational Database - A Complete Guide: This guide to building relational databases covers the essentials of relational database management, emphasizing structure, efficiency, and scalability. Read to learn about the intricacies of designing a relational database that meets specific organizational needs.
Ruby
Ruby might be faster than you think: Ruby's performance can be significantly improved through careful code optimization and JIT compilation, as demonstrated by a project that integrates Crystal methods into Ruby. Read to learn how to dramatically enhance Ruby's execution speed.
Swift
Using @Environment in SwiftUI to link Swift Package dependencies: The @Environment property wrapper in SwiftUI enables the integration of Swift Package dependencies by allowing views to access environment values or custom objects. Read to learn how to use SwiftUI's environment to maintain clean code.
Kotlin
Exploring Reactive Programming in Kotlin Coroutines With Spring Boot - A Comparison With WebFlux: This article highlights Kotlin Coroutines' simpler, sequential approach to writing asynchronous code, compared to WebFlux's model. Read to learn about the advantages of using Kotlin Coroutines.
Scala
Lean Scala: Scala's flexibility and expressiveness can lead to challenges like over-abstraction and style inconsistency across different codebases. Read to discover a proposed solution through establishing a recommended style for "lean Scala" which prioritizes simpler solutions, utilizes Scala 3's features, and more.
🌟Best Practices, Advice, and Case Studies🚀
Spreading Ownership and Delivering Value at Spotify with Backstage Plugins: Originating to combat productivity issues and inconsistent practices across teams, Backstage now serves as a comprehensive service catalogue. Read to learn about Spotify's innovative approach to scaling engineering efficiency and ownership.
Cell-Based Architecture - Comprehensive Guide: This guide explores cell-based architecture, a scalable, resilient approach to digital service design, akin to urban planning where each cell operates independently. Read to gain insights into how to implement it effectively in high-stakes environments.
The future of programming languages in the era of LLM: This article explores how LLMs are transforming software development, making languages easier to learn and tools more efficient through automation. Read to discover MoonBit, a new language designed for AI compatibility.
High-Volume Security Analytics - Splunk vs. Flink for Rule-Based Incident Detection: This article compares Splunk and Flink in the context of rule-based security incident detection, highlighting their respective strengths in batch and stream processing. Read if you are wondering which one to choose.
Take the Survey, Get a Packt credit!
🧠 Expert Insight 📚
Here’s an excerpt from “Chapter 1: A Quick Introduction to Go” in the book, Mastering Go - Fourth Edition by Mihalis Tsoukalos.
When to use Go
Although Go is a general-purpose programming language, it is primarily used for writing system tools, command line utilities, web services, and software that works over networks and the internet. You can use Go for teaching programming, and it is a good candidate as your first programming language because of its lack
of verbosity and clear ideas and principles.
Go can help you develop the following kinds of applications:
Professional web services
Networking tools and servers such as Kubernetes and Istio
Backend systems
Robust UNIX and Windows system tools
Servers that work with APIs and clients that interact by exchanging data in myriad formats, including JSON, XML, and CSV
WebSocket servers and clients
gRPC (Remote Procedure Call) servers and clients
Complex command line utilities with multiple commands, sub-commands, and command line parameters, such as docker and hugo
Applications that exchange data in the JSON format
Applications that process data from relational databases, NoSQL databases, or other popular data storage systems
Compilers and interpreters for your own programming languages
Database systems such as CockroachDB and key/value stores such as etcd
Although Go is a very practical and competent programming language, it is not perfect:
This is a personal preference rather than an actual technical shortcoming: Go has no direct and full support for object-oriented programming, which is a popular programming paradigm.
Although goroutines are lightweight, they are not as powerful as OS threads. Depending on the application you are trying to implement, there might exist some rare cases where goroutines will not be appropriate for the job. The Apache web server creates UNIX processes with fork(2) to serve its clients—Go does not support the functionality of fork(2). However, in most cases, designing your application with goroutines and channels in mind will solve your problems.
Although garbage collection is fast enough most of the time, and for almost all kinds of applications, there are times when you need to handle memory allocation manually, such as when developing an operating system or working with large chunks of memory and want to avoid fragmentation—Go cannot do that. In practice, this means that Go will not allow you to perform any memory management manually.
Go does not offer the full functionality of a functional programming language.
Go is not good at developing systems with high availability guarantees. In such cases, use Erlang or Elixir instead.
There are many things that Go does better than other programming languages, including the following:
The Go compiler catches a large set of silly errors that might end up being bugs. This includes imported Go packages and variables that are not being used in the code.
Go uses fewer parentheses than C, C++, or Java, and no semicolons, which makes Go source code more human-readable and less error-prone.
Go comes with a rich and reliable standard library that keeps improving.
Go has support for concurrency out of the box through goroutines and channels.
Goroutines are lightweight. You can easily run thousands of goroutines on any modern machine without any performance issues.
Unlike C, Go considers functions as first-class citizens.
Go code is backward compatible, which means that newer versions of the Go compiler accept programs that were created using a previous version of the language without any modifications. This compatibility guarantee is limited to major versions of Go. For example, there is no guarantee that a Go 1.x program will compile with Go 2.x.
Mastering Go - Fourth Edition by Mihalis Tsoukalos was published in March 2024. You can continue reading the entire first chapter and buy the book here! Packt library subscribers can continue reading the entire book for free here.
🛠️ Useful Tools ⚒️
STORM: an open-source project developed to curate and synthesize information into structured reports, aiming to enhance knowledge accessibility and reduce information overload, originating from a Stanford research paper.
Extism: a software library that enables the integration of WebAssembly (WASM) extensions into applications, facilitating extendable functionality across various programming languages.
JDK Mission Control (JMC) 9: an updated toolkit for monitoring, managing, profiling, and troubleshooting Java applications, featuring a new dark theme and customizable settings for JVM monitoring.
That’s all for today.
We have an entire range of newsletters with focused content for tech pros. Subscribe to the ones you find the most useful here. Complete ProgrammingPro archives can be found here. Complete PythonPro archives are here.
If your company is interested in reaching an audience of developers, software engineers, and tech decision makers, you may want to advertise with us.
If you have any comments or feedback, leave a comment below.



