ProgrammingPro #39: C# Wins 2023🏆, Xcode 15.2, Microsoft’s AppCAT, A Polarizing Java Contest, and Using Python with Ruby
Bite-sized actionable content, practical tutorials, and resources for programmers
“One important thing to understand is that programming is not a sort of …individual sport. You have to work as part of a team, and so people skills, social skills, knowing how to be a good team member, knowing how to become a good tech lead, team lead, those things are very important.”
– Guido Van Rossum (2020), Q&A with Guido Van Rossum
How important is being a good team player for professional success as a programmer? Let us know in today’s survey and welcome to a brand new issue of ProgrammingPro!
News Highlights: C# has finally been named 2023's Programming Language of the Year, highlighting its superiority over Java, especially in gaming and web backends. Apple's Xcode 15.2 has introduced development support for Vision Pro, and Microsoft new AppCAT, enhances .NET apps' Azure migration.
My top 5 picks from today’s learning resources:
Automated Application Integration With Flask, Kakfa, and API Logic Server🔗
Efficient Object Management in C++ - Handle Lookup Containers and Sparse Sets🧱
In today's Expert Insight, we have brought you an exclusive excerpt from the recently published book, Software Testing Strategies, that talks about the concept of lean software testing along with some very interesting historical context. So dive right in!
Stay Awesome!
Divya Anne Selvaraj
Editor-in-Chief
PS: ProgrammingPro and I will be taking a brief hiatus for the upcoming week and will return on the 25th of January. 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!
🗞️News and Analysis🔎
C# is programming language of the year 2023!🏆: For the first time in history, C# has been named the TIOBE Programming Language of the Year for 2023, marking its significant rise in popularity. Read to learn how C# is challenging Java in areas like web back ends and gaming, and about other notable shifts.
Apple releases Xcode 15.2 with Vision Pro support: This update enables developers to create visionOS apps optimized for the Vision Pro, a device set to launch on 2 February. Read to learn about the new capabilities and requirements for developing apps for Apple's Vision Pro headset.
How fast is your programming language? New contest and benchmarks spark debate: In an ongoing contest, Java developers are being challenged to optimize a program processing a billion-row text file, with the fastest Java solution currently at 14.848 seconds. Read for Benchmarks comparing 25 languages.
CompTIA 2024 roadmap shows updates to certifications: CompTIA is expanding its IT certification and training offerings, by updating existing certifications and introducing new courses across four series, tailored to different IT expertise levels. Read to learn about how these updates may benefit you.
Microsoft Announces AppCAT: Simplifying Azure Migration for .NET Apps: AppCAT analyzes .NET source code, configurations, and binaries to identify potential migration challenges and recommend cloud-native solutions. The tool currently supports C# and Visual Basic. Read to learn more.
Using Godot with C# in 2024: The Chickensoft community has released an open-source 3D platformer game demo using Godot and C#, demonstrating the advancements including the release of Godot 4 and major improvements in C# integration. Read to learn about their various tool offerings such as GodotEnv.
🎓Tutorials and Learning Resources💡
Python
🎓Tutorial | Python Context Managers Simplified: This tutorial highlights the role of context managers in resource management within code blocks. Read to learn how to implement them effectively in various scenarios.
How to use Rust with Python, and Python with Rust: This article explores integrating Python with Rust using the PyO3 project, allowing you to combine Python's flexibility with Rust's speed and memory safety. Read to learn how you can optimize performance by minimizing data transfers between Python and Rust.
🎓Tutorial | Automated Application Integration With Flask, Kakfa, and API Logic Server: This tutorial covers creating self-serve APIs and shared logic for B2B and internal integrations. Read to learn how to create and customize APIs and admin UIs, integrate B2B systems, and handle Kafka messages for efficient application integration.
Java
🎓Tutorial | JSON Handling With GSON in Java With OOP Essence: This tutorial covers the basics of GSON, a Java library for converting Java objects to JSON and vice versa. Read for practical examples and detailed explanations of serialization and deserialization processes.
How to copy objects in Java: Shallow copy and deep copy: This article explains the techniques of copying in Java, emphasizing the need to avoid copying from an object reference and instead copy the instance and values. Read to learn how to implement the techniques and use serialization for object copying.
🎓Tutorial | Java Logging on Google Cloud Platform: This tutorial includes instructions on setting up logging frameworks, configuring logback for different environments, and correlating logs with Cloud Trace. Read especially if you are looking for insights into the changes and configurations needed to upgrade from older runtimes to Java11+.
Go
🎓Tutorial | Logging in Go with Slog: The Ultimate Guide: This comprehensive guide covers Slog's design, creating custom loggers, handling errors, hiding sensitive fields, and implementing third-party logging backends. Read to enhance your application debugging and monitoring capabilities.
5 Open Source tools written in Golang that you should know about: This article reviews five open-source tools written in Golang crucial for backend development including Digger for IaC management and Steampipe for data extraction from APIs. Read to learn about each tool's unique capabilities and benefits.
PHP
🎓Tutorial | Sending Emails in Laravel – All You Want to Know: This comprehensive guide covers the essentials of using Laravel's email services, including setup, configuration, generating mailables, and various methods of sending emails. Read to learn how to effectively configure and use Laravel's email services for your requirements.
🎓Tutorial | Creating a simple VisionFive 2 RISC-V SBC web site using Apache2, PHP, and Postgres: This tutorial will help you learn how to effectively set up a LAMP stack on VisionFive 2 RISC-V, handle PostgreSQL databases, and implement MQTT messaging. Read to gain insights into cross-platform software robustness.
SQL
Interactive Book | Select Star SQL: This interactive book designed for SQL beginners, offers free, ad-free, and registration-free learning through real-world projects. Read to learn how to structure queries and perform operations on database tables.
🎓Tutorial | GPT in 500 lines of SQL: This article, will take you through the intricacies of implementing a generative LLM, specifically GPT-2, using SQL. Read to gain insight into the technical aspects of tokenization, embeddings, the Transformer architecture, and the process of generating text from embeddings.
Distributed SQL Database Internals (3) —Distributed Storage Engine: This article delves the role of distributed storage engines in managing data storage, organization, and access across multiple network nodes, in different geographical locations. Read to gain insights into data storage, replication, and transaction processing.
Game Dev.
🎓Tutorial | Building a self-contained game in C# under 2 kilobytes: This article includes detailed steps on using sizecoding techniques, optimizations, and various tools for efficient compression. Read to learn advanced techniques for size optimization, leveraging specific APIs, and using tools like bflat and Crinkler.
C/C++/C#
💼Case Study | Optimizing the unoptimizable - a journey to faster C++ compile times: This article describes optimizing the compile times of the {fmt} C++ library to match those of the C standard I/O library. Read to learn about advanced optimization strategies and practical ways to reduce dependencies.
Looking at C for better closures in C++: This article presents an uncommon technique for handling callbacks to address situations where functions and user data need to be passed to another function. Read to explore alternatives to std::function for better memory management and compile times.
Efficient Object Management in C++ - Exploring Handle Lookup Containers and Sparse Sets: This article explores a data structure that allows indirect object referencing via an id or handle while maintaining contiguous data storage for efficiency. Read if you are seeking to optimize data access and storage in your software projects.
How to use primary constructors in C# 12: This feature allows for more concise and clean code by integrating constructor parameters directly in class or struct declarations. Read to understand the benefits and limitations of primary constructors.
JavaScript and TypeScript
🎓Tutorial | The Power of @ngrx/signalstore - A Deep Dive Into Task Management: This article will guide you through creating a Signal Store, defining state, and implementing a Task Service with various functionalities. Read to learn advanced techniques in Angular state management.
10 Interview Questions Every JavaScript Developer Should Know in 2024: Each question in this comprehensive guide has detailed explanations and practical examples, catering to both interviewers and candidates. Read to effectively prepare for technical interviews in the JavaScript domain.
.NET
🎓Tutorial | Create a web API with ASP.NET Core: This tutorial covers creating, testing, and updating API endpoints for tasks like getting and modifying to-do items. Read for insights into ASP.NET Core features, Swagger for testing, and securing with authentication services.
🎓Tutorial | Diagnosing .NET applications: This article covers various aspects such as debugging, exception analysis, performance issues, memory leaks, and network connectivity for both .NET Core and .NET Framework. Read to learn about advanced techniques and tools to troubleshoot your apps.
Ruby
Fast Ruby Tokenizers with StringScanner: This article explores techniques for optimizing a Ruby-based lexer using StringScanner. Read to learn advanced techniques for optimizing lexers in Ruby to significantly enhance parser performance.
Inheritance in Ruby, in pictures:
This article provides an in-depth exploration of inheritance in Ruby, specifically within the context of Ruby code typed with Sorbet, a typechecker for Ruby. Read to gain a deeper understanding of inheritance mechanisms and their nuances.
Rust
🎓Tutorial | Rust SeaORM - Creating PostgreSQL Tables: This tutorial covers the setup of a Cargo workspace, configuring database connections, creating migration crates, and running migrations. Read to learn how to set up and use SeaORM in Rust for database table creation.
🎓Tutorial | Loading Environment Variables to Typesafe Structs: This article introduces a method for loading environment variables into typesafe structs in Rust, providing a cleaner and more maintainable approach compared to traditional methods. Read to learn about advanced features of envy, including support for Option types, Vecs, and more.
Swift
Unavailable Functions In Swift: This article discusses the use of the @available annotation and #unavailable compiler directive in Swift to manage function availability. Read to learn how to manage the availability of methods and functions.
🎓Tutorial | Create a Function in Swift: This article will guide you on writing functions for code reusability and efficiency, and enable you to differentiate between functions and methods in Swift. Read to be able to enhance code modularity and reusability.
Kotlin
🎓Tutorial | How to Secure Kotlin Server Applications: This article emphasizes the importance of robust security measures to counter threats like injection attacks, XSS, and data breaches. Read to learn how to maintain a security-first mindset throughout the development lifecycle.
🌟Best Practices🚀
Fuzzing in Software Engineering: This article discusses an automated software testing technique involving the input of invalid, unexpected, or random data to find coding errors, bugs, and security vulnerabilities. Read to gain insights into different fuzzing techniques, tools available for implementation, and best practices.
The Power of Implicit Returns and Expressions in Programming Languages: This article delves into the nuances of expressions versus statements, the transformation of if statements into expressions, and the elegance of block expressions and single-expression functions. Read to gain insights into modern coding practices that emphasize code simplicity and readability, particularly in languages that support implicit returns and expression-based constructs.
What Are the Best Practices for Managing Feature Flags in Software Development?: This article details best practices for managing feature flags in software development, emphasizing their essential role in feature toggling, risk management, and user access governance. Read to learn comprehensive strategies for effectively implementing and managing feature flags.
Empirically supported code review best practices: The article’s recommendations include starting with a readable description for context, creating smaller and stacked pull requests, maintaining manageable review scope, and keeping reviews under 60 minutes. Read to learn strategies to improve code review processes in your teams.
Best Practices for Re-modeling Graph database to Azure Cosmos DB for NoSQL: This article serves as a guide for developers looking to remodel their existing Azure Cosmos DB for Gremlin API into Azure Cosmos DB for NoSQL. Read to understand the importance of testing specific application scenarios and query patterns to achieve the best performance and cost efficiency.
Have any feedback for us? Take the Survey
🧠 Expert Insight 📚
Here’s an exclusive excerpt from “Chapter 11, Lean Software Testing” in the book, Software Testing Strategies, by Matthew Heusser and Michael Larsen.
Lean software testing defined
To explain Lean as it is understood today, we’ll take a giant step back in history, then move very fast, explain the modern meaning, and then inject testing. If you’re not a history buff, bear with us; we believe a deep grounding in the concepts will result in a better implementation. So, buckle up.
Here goes!
After the Second World War ended, the American industrial complex went into a massive period of high effort. Fueled by a workforce returning from the war, full of new technology (the washing machine, the mass-produced automobile, and more), and with a hungry customer base outside the US whose manufacturing was depleted by war, the American manufacturing process returned to traditional mass-assembly efforts. That left very little place for those who, during the war, had learned to “do more with less.” To a great extent, the outside-of-the-box things, such as W. Edwards Deming and Joseph Juran, found a ready market in Japan, rebuilding from a conflict that drained their resources and was eager to do more with less.
This led to what became known as the Japanese Manufacturing Revolution, including innovators such as Taichi Ohno at Toyota, who defined the Toyota Production System (TPS). Toyota vehicles were of higher quality in that they had fewer defects and lasted longer (higher resale value) than their competitors, but also because Toyota developed a system to scale manufacturing up with demand. They also moved inventories and build operations to just-in-time (JIT), instead of having orders that take weeks or months to deliver, while also having stacks of inventory available.
The connection to software is not perfect; software development is a design process, not a manufacturing one. True manufacturing is done by copying files. Yet many of the ideas about how software is delivered apply. We’ll discuss why, how, and what to do about it in this chapter.
The idea that new ideas struggle to take root yet can succeed wildly when given fertile soil can happen in every discipline. The next generation of ideas always challenges the current mode of thinking. To follow a line of thinking from Mahatma Gandhi, first, you are ignored, then mocked, then fought, and then your ideas become popular. In our experience, a funny thing happens in those later phases. These ideas are hard to adapt because they challenge thinking. Inevitably, management asks “Can we have that (lean, Agile, context-driven – take your pick) stuff, but not have to change?” This creates a market; someone is willing to pay for some sort of compromise. The nature of free market economics indicates that someone will offer to sell the (compromised) service.
As a result, once a new process innovation becomes computerized, it will almost inevitably be compromised and watered down. One of our mentors, Gerald M. Weinberg, called this the law of Raspberry Jam – that is, the more you spread it, the thinner it gets. When American manufacturing became aware that these Japanese approaches were resulting in cheaper vehicles developed faster with higher quality, the ideas were bunched together into total quality management (TQM). The history of TQM, is, well... not very good. The same thing happened with Agile. Scrum is incredibly popular today, yet Scrum, as it is practiced, especially the scaling frameworks as they are practiced, leaves something to be desired compared to the original vision.
When Japanese cars arrived in the US, they could beat US vehicles on price, quality, longevity, and resale value. American companies finally started to notice this and tried to bring the ideas to the US.
From ideas in practice to the term “Lean”
The first attempts to bring the ideas forward resulted in TQM. Three authors, James Womack, Daniel Roose, and Daniel Jones reversed-engineered what the staff at Toyota were doing, calling it the Lean or the TPS. A generation of consultants rose to teach the TPS, often with the same compromises that TQM had. Lean concepts, however, were a little more concrete, with basic steps of identifying the value, mapping the existing flow of work, creating flow, establishing a pull system, and continuous improvement. As you may recall from the previous chapter, there is some intentional overlap: figure out what we are doing, find the flow of the work, and improve it. This chapter will give you the tools to do that measurement and improvement using lean concepts.
Before we jump into lean for software, we’d like to pause for just a second. Building vehicles and building software are fundamentally different. In the first paradigm, we try to do the same thing, over and over again, exactly the same. With software, our goal is to do something different every time. If the work can be replicated and done in the same way, we can write some code and automate it. This means we have to be very careful in taking the ideas from Lean and applying them to software. We’ve done a fair bit of this work, over the years. This chapter adjusts for those differences, but we’d like to give just one example.
The TPS has a concept called Takt, which is the pace of demand. If Toyota can sell 5 million cars per month, then they want to be able to deliver 5 million cars per month. In an ideal system, management measures demand and then pulls the work from the factories, which can scale staff hours up and down, recall retired workers, and so on, to meet the pace of demand. In software, a vice president can walk into an office and say “I think we should develop a plugin architecture like a browser does” and create a dozen person-years of demand in a sentence. Instead of measuring the demand for software (when bounded by imagination, it is infinite), we try to think about how much fully defined work the team has to work on and try to balance that to make sure the backlog doesn’t get too big. On the other hand, we can look at the test effort and see if it matches the work that is coming in. If testing is a bottleneck, we can scale back the amount of testing and make it more risk-based. However, we knew we had quality problems and not going very far down our census of risk can lead to bugs that just aren’t found, we can add testing resources (ick), delay release (worse), or shift our efforts to improve quality earlier. Lean might even have us slow down development since throughput improvements outside of the constraint (bottleneck) are illusions.
Chew on that for a bit.
When we teach lean software testing, we start with a simulation of software development. Instead of having people build something, we have them draw it, with one group acting as the drawers (the technical team), another as the specifiers (writing the requirements), and a third, the process people, moving the paper back and forth. Only the specifiers can see the image to be reproduced, which is a good metaphor for software since classic Waterfall development took ideas, wrote them down, and passed them around. In between the first and second rounds of the exercise, the teams talk about how to improve, but they have to follow the rules as written. In between the second and third rounds, they are allowed to break the rules, so long as the metaphor holds. By round three, we often end up with the drawers and specifiers back to back, using words to talk to each other. Sometimes, they talk in different rooms over the phone. You may recognize this exercise as inspired by something Alistair Cockburn popularized 20 years ago (slide 31: https://alistair.cockburn.us/wp-content/uploads/2018/02/Crystal2005.07-1dy.ppt). Here’s the text from the PPT:
Draw a drawing (round 1, 10 minutes):
Specifiers and artists move to the opposite ends of the room (this corresponds to distributed virtual teams).
Specifiers write instructions for their artists regarding what to do (no drawings allowed). One specifier carries messages back and forth and they can watch but not speak to the artist.
Artists may write messages back.
No SMS or MMS is allowed.
No speaking or drawing is allowed between specifiers and artists.
One of the easiest ways to improve performance in the drawing exercise is to get rid of the travel time of the process people. If you think about it, they are doing a job we’ve already automated away at work with email. One team in one tutorial moved their drawing team into the hallway, “camping out,” which the specifiers moved to the edge of the room. Thus, the process people could simply hand papers back and forth. As it turns out, this was one of Taicho Ohno’s “seven wastes” – the waste of transport.
The Japanese term Ohno used for waste was “Muda’” waste is a rough translation. By waste, we mean an activity that uses resources that provide no value to the customer – for example, in a physical product warehouse that kept products at unnecessary distances from the team, but every order required one of each item, this would cause transport waste.
Let’s talk about the seven wastes.
Packt subscribers can continue reading for free here. Software Testing Strategies, by Matthew Heusser and Michael Larsen was published in December 2023. You can read the first chapter for free and buy the book here.
🛠️ Useful Tools ⚒️
docwire: a modern C++17/20 data processing framework, supporting numerous formats and AI-driven processing, recognized by SourceForge and backed by Microsoft.
multithreading: a runtime for JavaScript that enables parallel function execution on separate threads, improving performance and CPU utilization with a straightforward approach, compatible with Node.js, Deno, and browsers.
FixIt: a free, open source, AI feature from MotherDuck, providing in-line suggestions to rapidly resolve common SQL errors and streamline the query debugging process.
pocketbase: an open-source Go backend that integrates an SQLite database, user and file management, an admin UI, and a REST-ish API, still in active development prior to its v1.0.0 release.
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, take the survey, or just respond to this email.