Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds

Deep Engineering

49 Articles
Divya Anne Selvaraj
05 Dec 2024
Save for later

ProgrammingPro #85: Blazor Routing in C#, Kotlin 2.1's when Expressions, GraalVM JIT for Java, and Python Speed Boosts with Cython

Divya Anne Selvaraj
05 Dec 2024
Bite-sized actionable content, practical tutorials, and resources for programmers#85Blazor Routing in C#, Kotlin 2.1's when Expressions, GraalVM JIT for Java, and Python Speed Boosts with CythonHi ,Welcome to this week’s edition of ProgrammingPro!In today’sExpert Insight, we bring you an excerpt from the recently published book, C# 13 and .NET 9 – Modern Cross-Platform Development Fundamentals - Ninth Edition, which demonstrates defining routable page components, passing route parameters, and navigating routes in Blazor.News Highlights:Kotlin 2.1.0 previews advanced when expressions; Rust 1.83 enhances Multiplatform and Gradle tools; AWS Q Developer adds AI-driven testing and modernization; and Oracle launches GraalVM JIT for its JDK only.My top 5 picks from today’s learning resources:Cython tutorial: How to speed up Python🐇Hans Wennborg: C++ switch statements under the hood in LLVM🔧Understanding JavaScript Hoisting: The Magic Behind Variable and Function Declarations🎩Reaching Your Automatic Testing Goals by Enhancing Your Test Architecture🤖Faster Features, Happier Customers: Introducing The Platform That Transformed Our Grocery App🚀But there’s more, so dive right in.Stay Awesome!Divya Anne SelvarajEditor-in-ChiefSign Up|Advertise🗞️News and Analysis🔎Kotlin previews guard conditions in when expressions: Kotlin 2.1.0 introduces guard conditions for more flexible when expressions, non-local breaks/continues, and multi-dollar string interpolation as preview features.Rust 1.83 expands const capabilities: The updates improve Kotlin Multiplatform library publishing, add Swift export, stabilize Gradle DSLs, and enhance K2 compiler checks.AWS enhances Q Developer: Test and review code, upgrade to modern .NET, migrate mainframe applications: Features include AI-driven unit testing, code reviews, operational troubleshooting, and migration tools.Microsoft fixed slow package restore in .NET 9.0, but with annoying early bugs: The SDK introduces a 15x faster package restore with NuGet 6.12, but bugs like downloading unused packages remain.Java News Roundup: Last of the JEPs Targeted to JDK 24, Quarkus 3.17, Maven 4.0-RC1, Kotlin 2.1: Updates also include Hibernate Search 7.2.2, Eclipse Vert.x 5.0, and the latest JDKUpdater version.Oracle Ships GraalVM Java JIT Compiler - but Only in Its Own JDK: The compiler offers better performance and maintainability than standard OpenJDK JIT compilers.New report finds signs of slowing supply chain security momentum, plateaued DevOps maturity: According to Snyk's State of Open Source report, organizations report reduced adoption of new tools and training due to security fatigue.JavaScript-based APIs have the lowest quality scores among all languages: The 2024 treblle Anatomy of an API report also notes explosive AI-driven API growth, rising complexity, and the critical need for better governance.🎓Tutorials and Learning Resources💡Python🎓Tutorial | Cython tutorial: How to speed up Python: Provides step-by-step guidance on optimizing Python functions, integrating Cython with Python libraries, compiling code, and profiling for speed improvements.💡Goodbye Make and Shell, Hello... Python?:Advocates using Python for build and project tooling over traditional Makefiles and shell scripts, emphasizing its benefits for maintainability, debuggability, and flexibility.For more Python resources, go to PythonProC# and .NET🎓Tutorial | How to use ref structs in C# 13: Covers the implementation, benefits, limitations, and extended capabilities of ref structs in C# 13 for high-performance, stack-only memory management.🎓Tutorial | File Operations C# .NET: Part 01 — File and Directory Handling: Covers path manipulation, copying, moving, deleting, exception handling, and best practices, using .NET 8, C# 12, and Visual Studio 2022.🎓Tutorial | Deep Dive into .NET Hosted Services: Delves into the BackgroundService class, its lifecycle methods (StartAsync, StopAsync), and integration with the Host class for managing long-running tasks.C and C++🎥Hans Wennborg: C++ switch statements under the hood in LLVM: Explains how LLVM uses clustering, jump tables, bit masking, and binary search trees for efficient code generation and addresses edge cases.💡Legacy Safety: The Wrocław C++ Meeting: Discusses the challenges of improving C++ memory safety focusing on the tension between two approaches: Profiles, incremental safety rules for existing code, and Safe C++, a borrow-checking approach.🎓Tutorial | Build Your Own In-Memory Data Store with C: A Step-by-Step Guide (Part 2): Provides guidance for creating the table, inserting, retrieving, deleting, and cleaning up data, basic test setup, and compiling with CMake.Java🗞️Oracle's Java price hikes push CIOs to brew new licensing strategies: Many are exploring open-source Java alternatives, which could cut costs by 50%, but the transition requires top-level involvement to assess risks.🎓Tutorial | Spring Security Guide:Part 1: Provides an overview of how security works in Spring-based web applications, focusing on middleware for authentication (identifying users) and authorization (checking permissions).🎓Tutorial | Linked List Complexity: Delves into the efficiency of linked list operation for insertions and deletions compared to array-based structures, and provides examples of using Java's LinkedList class and more.JavaScript and TypeScript🎓Tutorial | Understanding JavaScript Hoisting: The Magic Behind Variable and Function Declarations: Explains thedifferences between var, let, const , function declarations, and function expressions.🎓Tutorial | React file nesting design pattern: Introduces thedesign pattern using the VSCode extension File Nesting Explorer, enabling a hierarchical folder structure that mirrors the UI/UX tree of the application.💼Case Study | A leap in the evolution of Airtable’s codebase: Scaling TypeScript to thousands of projects: Discusses how Airtable scaled its codebase from 50 to nearly 3000 projects, reducing typechecking time by 65%.Go🎓Tutorial | Building a distributed log using S3 (under 150 lines of Go): Demonstrates how to build a durable, distributed log, covering its design for appending, reading, checksums, crash recovery, and failover handling.💡Dependency management fatigue, or why I forever ditched React for Go+HTMX+Templ: Focuses on how the Go+HTMX+Templ stack allows developers to focus on feature development and minimize maintenance.Rust💼Case Study | Optimization adventures: making a parallel Rust workload 10x faster with (or without) Rayon: Dicusses optimization by replacing Rayon with a custom thread pool and work-stealing implementation.📖Open Access Book | Writing NES Emulator in Rust: Covers essential topics such as emulating the NES CPU, memory management, picture processing unit (PPU), audio processing unit (APU), and input handling.Swift🎓Tutorial | Native Swift on Android, Part 2: Your First Swift Android App: Demonstrating how to build a "Hello Swift" app that integrates native Swift functionality and Kotlin/Jetpack Compose via bridging.🎓Tutorial | Enum explained in-depth with code examples in Swift: Covers definitions, raw values, associated values, CaseIterable protocol, Equatable conformance, advanced usage with if/guard case, and more.PHP🎓Tutorial | Exploring PHP Lazy Objects: A Practical Implementation: Introduces PHP Lazy Objects, a new feature in PHP 8.4 that optimizes object initialization using two strategies: Ghost Objects and Virtual Proxies.🎓Tutorial | Graceful Error Handling with Laravel’s rescue Function: Delves into Laravel’s rescue function which offers a concise and readable way to handle exceptions without disrupting application flow.SQL🎓Tutorial | Writing Composable SQL using Knex and Pipelines: Explains how to write composable SQL queries using Knex, a Node.js query builder, and pipelines for a functional programming approach.🗞️AWS announces Aurora DSQL, a new distributed SQL database that promises virtually unlimited scalability: This serverless distributed SQL database offers 99.999% availability, strong consistency, and PostgreSQL compatibility.Ruby🎓Tutorial | Speeding up Ruby by rewriting C… in Ruby: Explores the challenges and progress in optimizing Ruby's performance, especially through rewriting C-based methods in Ruby to leverage Yet Another Ruby JIT.🎓Tutorial | Calculating the largest known prime in Ruby: Explains how Ruby 3.4 introduces support for calculating large numbers like the largest known prime, which previously returned infinity.Kotlin🎓Tutorial | Kotlin Flows Animated (Scan, Fold, Reduce): Delves into Kotlin Flows' state accumulation operators, explaining their use cases with examples.🎓Tutorial | Deploy Kotlin Mutliplatform WasmJS to Github Pages: Demonstrates using a GitHub Actions workflow to automate building and deploying a Kotlin/wasmJs project from a structured directory.🌟Best Practices and Advice🚀How to Use Programming Rules and Guidelines: Discusses the proper use of programming rules and guidelines, emphasizing their impact on code consistency and readability.Navigating Responsible AI in the FinTech Landscape: Discusses the EU AI Act, balancing transparency and efficiency, cross-functional collaboration, and risk management, highlighting FinTech’s potential to lead in ethical AI adoption.Reaching Your Automatic Testing Goals by Enhancing Your Test Architecture: Discusses integrating technical tools and human collaboration, focusing on trends over individual failures, using ML for auto-triaging, and more.Faster Features, Happier Customers: Introducing The Platform That Transformed Our Grocery App: Discusses how Picnic transformed its app by adopting React Native, enabling faster feature delivery through cross-platform development, modular architecture, and real-time rule evaluation.🧠Expert Insight📚Here’s an excerpt from “Chapter 14: Building Interactive Web Components Using Blazor" in the book, C# 13 and .NET 9 – Modern Cross-Platform Development Fundamentals - Ninth Edition by Mark J. Price, published in November 2024.How to define a routable page componentTo create a routable page component, add the@pagedirective to the top of a component’s.razorfile, as shown in the following markup:@page "/customers"The preceding code is the equivalent of a mapped endpoint inProgram.cs, as shown in the following code:app.MapGet("/customers", () => ...);TheRoutercomponent scans the assembly specifically in itsAppAssemblyparameter for Blazor components with the@pagedirective, registering their URL paths as endpoints.At runtime, a page component is merged with any specific layout that you have specified in theRoutes.razorfile<RouteView>component. By default, the Blazor Web App project template definesMainLayout.razoras the layout for page components.Pro Tip: Good Practice: By convention, put routable page Blazor components in theComponents\Pagesfolder.How to navigate routes and pass route parametersMicrosoft provides a dependency service namedNavigationManagerthat understands Blazor routing and theNavLinkcomponent. TheNavigateTomethod is used to go to the specified URL.Blazor routes can include case-insensitive named parameters, and your code can most easily access the values passed by binding the parameter to a property in the code block, using the[Parameter]attribute, as shown in the following markup:@page "/customers/{country}"<div>Country parameter as the value: @Country</div>@code { [Parameter] public string Country { get; set; }}The recommended way to handle a parameter that should have a default value when it is missing is to suffix the parameter with?and use the null-coalescing operator in theOnParametersSetmethod, as shown in the following markup:@page "/customers/{country?}"<div>Country parameter as the value: @Country</div>@code { [Parameter] public string Country { get; set; } protected override void OnParametersSet() { // If the automatically set property is null, then // set its value to USA. Country = Country ?? "USA"; }}C# 13 and .NET 9 – Modern Cross-Platform Development Fundamentals - Ninth Editionwas published in Novemver 2024. Packt library subscribers can continue reading the entire book for free or you can buy the book*{box-sizing:border-box}body{margin:0;padding:0}a[x-apple-data-detectors]{color:inherit!important;text-decoration:inherit!important}#MessageViewBody a{color:inherit;text-decoration:none}p{line-height:inherit}.desktop_hide,.desktop_hide table{mso-hide:all;display:none;max-height:0;overflow:hidden}.image_block img+div{display:none}sub,sup{font-size:75%;line-height:0}#converted-body .list_block ol,#converted-body .list_block ul,.body [class~=x_list_block] ol,.body [class~=x_list_block] ul,u+.body .list_block ol,u+.body .list_block ul{padding-left:20px} @media (max-width: 100%;display:block}.mobile_hide{min-height:0;max-height:0;max-width: 100%;overflow:hidden;font-size:0}.desktop_hide,.desktop_hide table{display:table!important;max-height:none!important}}
Read more
  • 0
  • 0
  • 302

Divya Anne Selvaraj
30 Jan 2025
Save for later

ProgrammingPro #87: C++ Bit Counting Tricks, JetBrains’ ‘Junie’ AI, Tailwind CSS 4.0’s Rust Boost, and Rust’s Async Closures

Divya Anne Selvaraj
30 Jan 2025
Bite-sized actionable content, practical tutorials, and resources for programmers#87C++ Bit Counting Tricks, JetBrains’ ‘Junie’ AI, Tailwind CSS 4.0’s Rust Boost, and Rust’s Async ClosuresHi ,Welcome to our very first issue for the year 2025.In today’sExpert Insight, we bring you an excerpt from the recently published book, Debunking C++ Myths, which discusses different approaches to counting set bits in a 32-bit integer, comparing manual bitwise operations, the C++20 std::popcount function, and the CPU-level POPCNT instruction.News Highlights:JetBrains launches ‘Junie’ for AI coding in Python, Kotlin, and Java; Tailwind CSS 4.0’s Rust-powered build engine boosts incremental builds up to 100x; Rust 1.85 stabilizes async closures and enhances Linux kernel support; and 11 new languages like Mojo, Wing, and Jakt target AI, memory safety, and edge computing.My top 5 picks from today’s learning resources:JavaScript Temporal is coming⏳3 Python web frameworks for beautiful front ends🎨Rust: Investigating a Strange Out-of-Memory Error🕵️‍♂️The Architecture of Open Source Applications🏛️Inside Atlassian Lithium: How a Dynamic ETL Platform is Transforming Data Movement and Cutting Costs⚡But there’s more, so dive right in.Stay Awesome!Divya Anne SelvarajEditor-in-ChiefSign Up|Advertise🗞️News and Analysis🔎11 cutting-edge programming languages to learn now: Covers languages focused on theorem proving (Coq), AI-assisted coding (Plang), Python performance enhancements (Mojo, Erg), edge computing (MoonBit, Wing), and memory safety (Rust, Zig, Jakt, Odin, Mojo).JetBrains debuts agentic AI coding with ‘Junie’, but reviews for existing AI Assistant are poor: Junie supports Python, Kotlin, and Java and can develop features, fix bugs, update documentation, add tests, and resolve failed tests.Tailwind CSS 4.0 released with ‘ground-up rewrite’ for faster Rust-powered build: The versionintroduces a Rust-powered build engine (Oxide), achieving up to 5x faster builds (100x for incremental builds), alongside new CSS features.Async closure support is stable for Rust 1.85: The new version, releasing on February 20, will resolve issues like the “Send”-bound problem and make progress on Linux kernel integration, return type notation, and more.Java News Roundup: Stable Values, Payara Platform, Oracle Critical Patch Update, GraalVM, BellSoft: Also covers BellSoft's Liberica JDK, updates on Jakarta EE 11, Spring, Hibernate, Infinispan, Eclipse Vert.x, and Gradle.State of JavaScript: Highlights of the JavaScript developer survey: The results reveal growing adoption of AI code generators, new language features (nullish coalescing, Promise.allSettled), and build tools (Vite, esbuild).Java-based organizations mostly use Java for AI development – report: The Azul 2025 State of Java Report finds that 50% of Java-based organizations use Java for AI development, ahead of JavaScript (44%) and Python (41%).🎓Tutorials and Learning Resources💡Python💡3 Python web frameworks for beautiful front ends: Introduces Anvil, Reflex, and NiceGUI—which allow developers to build interactive front-end applications using only Python, eliminating the need for JavaScript.For more Python resources, go to PythonProC# and .NET🎓Tutorial | Writing a .NET Garbage Collector in C# - Part 1: Demos writing a custom .NET garbage collector in C# using NativeAOT, detailing initialization challenges, debugging methods, and workaround strategies to resolve conflicts.💡Making SIMD Operations in C# Easier: Introduces F8, an open-source C# SIMD library that optimizes floating-point operations by leveraging AVX 256-bit intrinsics, demonstrating its performance benefits over scalar computations.🎓Tutorial | SQL Server Native Vector Search for .NET Developers: Coversembedding generation, vector storage, similarity search, and document classification using C# and T-SQL for AI-powered search and retrieval.C and C++💡Understanding Memory Management, Part 1: C: Covers fundamental concepts like the stack, heap, malloc, free, and fragmentation, while demonstrating manual memory allocation through a simple file-reading program.🗞️C++26: pack indexing: The update allows direct access to specific elements in parameter packs using the subscript operator (T...[index] ), simplifies previously cumbersome methods, and improves readability.💡The surprising struggle to get a UNIX Epoch time from a UTC string in C or C++: Delves into issues with strptime(), locales, daylight saving time, and the best available solutions, including timegm() and C++20’s time zone library.Java🎓Tutorial | How JVM Executable Assembly Jars Work: Explains how the Mill build tool generates directly executable assembly JARs by prepending a launcher script to a ZIP-based JAR, allowing execution without java -jar .💡Making Java nullable fields backwards compatible: Explains how making a Java field nullable can break source and binary compatibility and provides a solution using method overloading to ensure backwards compatibility in SDKs.🎓Tutorial | How To Do Logging In Java: Covers legacy and modern logging libraries, best practices for logging, log levels, centralized logging, and how to choose the right logging approach for different applications.JavaScript and TypeScript🗞️JavaScript Temporal is coming: JavaScript's new Temporal API is being introduced in experimental browser releases, offering a modern, built-in way to handle dates, times, durations, and calendars.💡How long is a second in JavaScript?: Explains how JavaScript measures time using POSIX time, why it ignores leap seconds, the impact of step adjustments vs. smearing, and how this affects applications that require precise time synchronization.💡TypeScript enums: use cases and alternatives: Examines TypeScript enums, their structure, use cases, limitations, and alternative patterns like object literals, string literal unions, and symbol-based approaches.Go🎓Tutorial |Modeling Complex Data Structure in Golang Using Pointers, References, and Reverse Indices: Demonstrates how memory management techniques optimize performance, reduce redundancy, and simplify complex graph lookups.💡Go 1.24'sgo tool is one of the best additions to the ecosystem in years: Discusses Go 1.24’s new go tool command and tool directive in go.mod , which improves dependency management by reducing bloat.Rust🎓Tutorial | Parsing PDFs (and more) in Elixir using Rust: Demonstrates how to efficiently parse PDFs in Elixir using Rust via Native Implemented Functions (NIFs), leveraging the Extractous library.💼Case Study | Rust: Investigating a Strange Out-of-Memory Error: Investigates an unexpected out-of-memory issue in a Rust service, revealing that the anyhow library captures a backtrace on every error.Swift💡The Swift Runtime: Your Silent Partner: Explores how the Swift Runtime (libswiftCore) interacts with compiled Swift programs, managing memory, dynamic dispatch, and core language features through the ABI and system calls.🎓Tutorial | Network Link Conditioner: Simulating Slow Networking: Explains how to use Apple's Network Link Conditioner to simulate slow network conditions on macOS and iOS and introduces RocketSim as a better alternative.PHP🎓Tutorial | Say Goodbye to Hard-Coding: Manage Laravel Model Columns Efficiently: Introduces a Laravel Artisan command that automatically generates model column constants, reducing hard-coded field names.SQLComposable SQL: Critiques SQL's testability, duplication, and denormalization issues, then introduces functors as a structured way to define reusable query components that improve performance, maintainability, and abstraction.Ruby🎓Tutorial | Supercharge SQLite with Ruby Functions: Covers how to enhance SQLite with user-defined Ruby functions (UDFs) to extend query capabilities, automate data processing, and perform custom computations.💡Instrumenting Thread Stalling in Ruby Applications: Introduces GC.total_time for tracking GC impact, gvltools for measuring GVL wait time, and Linux /proc metrics for monitoring CPU scheduling.Kotlin🎓Tutorial | The Liskov Substitution Principle (LSP) in Kotlin — Deep Dive: Provides an in-depth exploration of the Liskov Substitution Principle (LSP) in Kotlin, explaining how subclass behavior must remain consistent with its superclass.💡Modern Android Security Tools: ProGuard, DexGuard, and R8 with Kotlin & Jetpack Compose: Covers protection strategies, configuration rules, best practices, and performance considerations for modern Android development.🌟Best Practices and Advice🚀📖The Architecture of Open Source Applications: Acollection of books where developers of dozens of open source projects explain their software architecture, design choices, and key lessons learned.The End of the Bronze Age: Rethinking the Medallion Architecture: Advocates for the Shift Left approach, which moves data processing upstream to create reliable, reusable data products that support both operational and analytical workloads.Inside Atlassian Lithium: How a Dynamic ETL Platform is Transforming Data Movement and Cutting Costs: Duscusses how Atlassian's platform's ephemeral pipelines, Kafka-based architecture, and modular Workplans enable efficient, scalable data movement.Integration timelines: How to plan for success without surprises: explores SaaS integration challenges, emphasizing realistic timelines, scalability, security, and in-house vs. third-party solutions to prevent resource strain.🧠Expert Insight📚Here’s an excerpt from “Chapter 8: The Fastest C++ Code is Inline Assembly" in the book, Debunking C++ Myths by Alexandru Bolboacă and Ferenc-Lajos Deák, published in December 2024.One instruction to rule them allDear reader. In our previous section of this chapter, unfortunately, we exhausted the only pompous introduction we could borrow from various cultural sources concerning technical interviews, career and life choices, and whether should we take the red pill or the blue one, so let’s focus our attention on more technicalquestions that our candidates might face at a technical interview (the word technical appears four times in this shortintroductory paragraph).One of these questions, served to the author of these lines a few years ago, was to write a short code snippet that will count the number of 1 bits (the on bits) in a 32-bit integer. Let’s draft up a quick application todo this:int countOneBits(uint32_t n) { int count = 0; while (n) { count += n & 1; n >>= 1; } return count;}Here’s what happens. Firstly, we initialize a counter, starting with0. The next step is to loop through the bits. Whilenis non-zero, we add the least significant bit ofnto the counter (n&1gives us this value). Following this, we shiftnright by one bit (discarding the leastsignificant bit).Once all bits are processed (whennbecomes0), return the total count of 1 bits. Not a very complicated process, justraw work.It seems that this procedure of counting bits in numbers must be of a very peculiar interest in computing circles, such as for the purpose of error detection and correction, data compression, cryptography, algorithmic efficiency, digital signal processing, hardware design, and performance metrics, so no wonder it managed to creep itself into the STL (C++ STL, which is the standard template library) too in the form ofstd::popcountfromC++ 20.The interesting part of the story is that not only in the STL do we find this handy operation, but it was deemed so useful that it even exists at the level of the processors, under the infamousPOPCNT mnemonic. Infamous it is, due to the fact that in 2024, it was effectively used in hindering the installation of Windows 11 on older machines that were not officiallysupported (https://www.theregister.com/2024/04/23/windows_11_cpu_requirements/).But what that means for our candidate, who has to write code to impress the interviewers, is that they can simply replace the complicated code from before with the following veryhandy snippet:int countOneBits(uint32_t n) { return std::popcount(n);}Not forgetting to include the<bit>header, after feeding the preceding program intogcc.godbolt.org’s compilers, we get a strange mishmash of results. The code compiled by GCC, regardless of the optimization level, always generates a variation ofthe following:countOneBits(unsigned int): sub rsp, 8 mov edi, edi call __popcountdi2 add rsp, 8 retSo, the code at some level disappears from our eyes into a strange call deep inside the libraries offered by GCC, called__popcountdi2 (https://gcc.gnu.org/onlinedocs/gccint/Integer-library-routines.html). In order to convince GCC to fully utilize the power of the processor that we are running the code on, we need to utilize some of the not-so-well-known command-line options, such as-march(or-mpopcntfor thisspecific purpose).According to the official documentation, (https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html) this command will select the appropriate processor instruction set in order to use the available extensions of the specific processor. Since, at this stage, we know that the POPCNTinstruction was introduced in the early Core i5 and i7 processors, in the Nehalem family, we should simply specify the following to GCC:-march=nehalem. And now, not surprisingly, the compiler generatesthe following:countOneBits(unsigned int): popcnt eax, edi retInterestingly, if we provide the compiler with just the-mpopcntflag, then it generates an extraxor eax, eax(meaning it nulls the EAX register) so maybe we have witnessed some processor-specific extra optimizations by choosing theNehalem architecture:countOneBits(unsigned int): xor eax, eax popcnt eax, edi retWe cannot squeeze more than this out of GCC; there is simply no lower level for this functionality, so we focus our attention on the next compiler onour list.Without explicitly asking to optimize the code, Clang also generates a generic call to astd::popcountfunction, found somewhere in its libraries; however, explicitly asking to optimize the generated code, Clang at various levels of optimization yieldsthe following:countOneBits(unsigned int): mov eax, edi shr eax and eax, 1431655765 sub edi, eax mov eax, edi and eax, 858993459 shr edi, 2 and edi, 858993459 add edi, eax mov eax, edi shr eax, 4 add eax, edi and eax, 252645135 imul eax, eax, 16843009 shr eax, 24 retSurprising as it seems, there is a perfectly logical explanation for this code, found at the bit-twiddling site (https://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetParallel) of Sean Eron Anderson at Stanford. Not considering this extra detour, Clang behaves identically to GCC when it comes to handling architecture and specifying the subset of CPU extensions to use while generating code.The last of the big three, Microsoft’s own (we know, tiny, squishy) C++ compiler handles the situation very similarly to Clang. When asking to optimize the code while we specify an architecture that does not support thePOPCNTinstruction, it generates code like the one generated by Clang with low-level bit hacks, while if the architecture has support for thePOPCNTinstruction, it will adjust to the correct type and will callPOPCNTfor the proper parameters (/std:c++latest /arch:SSE4.2 /O1).Good work, tiny,squishy compiler.Debunking C++ Mythswas published in Decemver 2024. Packt library subscribers can continue reading the entire book for free or you can buy the book here!Get the eBook for $31.99$21.99🛠️Useful Tools⚒️DeepSeek-Coder-V2: An open-source MoE code model rivaling GPT-4 Turbo, supporting 338 languages with a 128K context length.Web-Dev-For-Beginners: A 12-week, 24-lesson curriculum by Microsoft covering HTML, CSS, and JavaScript through hands-on projects, quizzes, and assignments.MudBlazor: A Material Design component framework for Blazor, built entirely in C# for ease of use, clear structure, and seamless .NET integration.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 usefulhere.If your company is interested in reaching an audience of developers, software engineers, and tech decision makers, you may want toadvertise with us.If you have any suggestions or feedback, or would like us to find you a learning resource on a particular subject, just respond to this email!*{box-sizing:border-box}body{margin:0;padding:0}a[x-apple-data-detectors]{color:inherit!important;text-decoration:inherit!important}#MessageViewBody a{color:inherit;text-decoration:none}p{line-height:inherit}.desktop_hide,.desktop_hide table{mso-hide:all;display:none;max-height:0;overflow:hidden}.image_block img+div{display:none}sub,sup{font-size:75%;line-height:0}#converted-body .list_block ol,#converted-body .list_block ul,.body [class~=x_list_block] ol,.body [class~=x_list_block] ul,u+.body .list_block ol,u+.body .list_block ul{padding-left:20px} @media (max-width: 100%;display:block}.mobile_hide{min-height:0;max-height:0;max-width: 100%;overflow:hidden;font-size:0}.desktop_hide,.desktop_hide table{display:table!important;max-height:none!important}}
Read more
  • 0
  • 0
  • 297

Divya Anne Selvaraj
10 Oct 2024
Save for later

ProgrammingPro #77: Python 3.13 Finally Debuts, Rspack 1.0, and Importing Arrow Data with Python

Divya Anne Selvaraj
10 Oct 2024
Bite-sized actionable content, practical tutorials, and resources for programmers#77Secure and Simplify: Salesforce Data Protection with RubrikWhat if your Salesforce data was suddenly lost or corrupted? Human errors, accidental deletions, misconfigurations can all contribute to data loss.1 of 2 SaaS users who did not implement SaaS data protection, experienced data loss or corruption in the last 12 months.Check out this exclusive webinar where we reveal Rubrik's new integration with Salesforce, designed to tackle this exact issue.Watch On-DemandHi ,Welcome to this week’s edition of ProgrammingPro!In today’sExpert Insight, we bring you an excerpt from the recently published book, In-Memory Analytics with Apache Arrow - Second Edition, which shows you how to import Arrow data with Python using the C Data API via the pyarrow and cffi modules.News Highlights: Python 3.13 finally debuts with GIL disabling and JIT compiler; Rust firm at 13th in Tiobe, Mojo enters top 50; Rspack 1.0 is 23x faster than Webpack; and Julia 1.11 introduces a faster, lower-overhead Memory type.My top 5 picks from today’s learning resources:10 Jupyter Notebook Features You Didn’t Know Exist📓Reflection in C++26: Metafunctions for Enums and Classes💻The #1 Mistake Developers Make with Redux and How to Fix It🚧Confusing or misunderstood topics in systems programming: Part 0🧩Brutalist Programming Manifesto🛠️But there’s more, so dive right in.Stay Awesome!Divya Anne SelvarajEditor-in-ChiefPS:The October survey is still live. Do take the opportunity to leave us your feedback, request a learning resource, and earn your one Packt credit for this month.Sign Up|Advertise🗞️News and Analysis🔎Breaking Down Python 3.13’s Latest Features:Released finally on the 7th of October, the version includes a revamped interactive interpreter with multi-line editing, experimental disabling of the GIL, and a JIT compiler.Rust resumes rise in popularity: Rust has returned to 13th place in the October 2024 Tiobe index and maintained 10th in the Pypl index. Mojo has also entered Tiobe's top 50. Read to learn more about current rankings.Rspack 1.0 Released, 23x Faster than Webpack, Compatible with Top 50 Webpack Plugins: Rspack 1.0, a JavaScript bundler written in Rust from ByteDance, is compatible with over 80% of the top 50 Webpack plugins.Julia language adds lower-overhead Memory type: Julia 1.11 introduces a new Memory type as a lower-overhead alternative to Array, offering significant speed improvements and more maintainable code.Apollo Connectors enables developers to turn REST APIs into GraphQL endpoints: Apollo Connectors simplifies API integration, reduces complexity, and enables a unified API strategy.UNO Platform 5.4 Improves App Performance: The version introduces over 290 new features and enhancements focused on improving app performance, including a 15% reduction in memory allocations.ChatGPT Canvas offers a new visual interface for working with ChatGPT in a more collaborative way: The new offering, currently rolling out to select users, enhances collaboration on writing and coding projects.🎓Tutorials and Learning Resources💡Python10 Jupyter Notebook Features You Didn’t Know Exist:Discusses features including magic commands, interactive widgets, auto-reload for modules, in-notebook documentation, and collapsible headings.For more Python resources, go to PythonProSeptember Python Releases from Packt at 30% offon both eBook and Print BooksGet for $39.99 $27.98!Get for $35.99 $24.99!Get for $27.99 $18.99!Get for $35.99 $17.98!Print discounts end tomorrow on the 11th of October!C# and .NETMicrosoft previews unified .NET API for AI, and delivers .NET 9 Release Candidate with go-live license: The AI extension library aims to standardize interactions with AI services, allowing developers to work with a common API.🎓Tutorial | How to Use StateContainers in .NET MAUI to Manage State in Applications: Explains how to implement StateContainers with code examples and a demo for handling user authentication.🎓Tutorial | Dispose or Finalize in C#? Discover which to use: Provides real-world examples, such as file handling, database connections, and graphics processing, to demonstrate when to use each method.C and C++🎓Tutorial | Reflection in C++26: Metafunctions for Enums and Classes: Demonstrates how developers can use reflection to iterate through enum members and retrieve class members by index or name.Iterating through matched characters in modern C++: Explores using approaches like find_first_of, std::ranges from C++20, and coroutines from C++23.Privileges relinquishing order in C: Explains the correct order for relinquishing privileges in C programs, specifically for setUID and setGID operations, to prevent security vulnerabilities.JavaOracle touts ‘tip and tail’ release model for Java library development: The model, aimed at improving the developer experience allows faster innovation for new development while maintaining stability for long-term projects.🎓Tutorial | Event-driven architecture (EDA) on the modern stack of Java technologies: Explores the implementation of an EDA focusing on Transactional outbox, Inbox, and Saga patterns in microservices.Java 23 New Features With Examples: Covers improvements like primitive type support in patterns, instanceof, and switch statements, the introduction of Markdown documentation comments, and enhancements to concurrency.JavaScript and TypeScript🎓Tutorial | The #1 Mistake Developers Make with Redux and How to Fix It: Discusses the common mistake of overusing Redux, explains the difference between client and server state, and shows you the benefits of React Query.Behind the Scenes at the JavaScript Registry (JSR): Discusses JSR, a modern open-source package repository for JavaScript and TypeScript that offers features like type declaration files, secure publishing, and more.Announcing TypeScript 5.7 Beta: New features include checks for never-initialized variables, path rewriting for relative paths, support for ES2024, faster project ownership checks, JSON import validation, and improved performance.Go🎓Tutorial | Securing gRPC Services with JWT Authentication in Go: Explains how to secure gRPC services using JSON Web Tokens (JWT) authentication in Go, focusing on interceptors, metadata, and JWT handling.The Go libraries that never failed us: 22 libraries you need to know: Lists libraries for routing, middleware, database management, OpenAPI, gRPC, testing, and more, while offering anti-pattern warnings and practical tips.Rust💼Case Study | Rust is rolling off the Volvo assembly line: Discusses how Volvo successfully integrated Rust into the development of their low-power processor ECU, improving code quality and reliability in their vehicles.🎓Tutorial | Understanding Rust's Trait Objects: Vtables, Dynamic Dispatch, and Memory Deallocation: Explains how vtables store method pointers for trait objects, how TCO optimizes performance, and more.Swift🎥Swift & Interoperability - Tony Parker & Ben Cohen: Introduces the new direction for Swift's Foundation, including a major refactor of Foundation for Swift 6, enabling open-source contributions, and transitioning from C to Swift.🎓Tutorial | Writing Cleaner Swift Code: Early Returns & Aligning the Happy Path Left: Explains how handling edge cases upfront and reducing nesting, results in cleaner, more maintainable code with reduced cognitive load.PHP👨‍🏫Open Access Course | Laravel API Course: Covers topics like optimizing a Laravel project for API-first development, data modeling, API design, authentication, rate limiting, versioning, pagination, error handling, and more.SQL🎓Tutorial | Advanced SQL for 10x Data Analysts - Part 1: Explores advanced SQL techniques, focusing on joins, nested data, analytical functions, and efficient query writing.RubyRuby on Rails 8.0 first beta release: A big bet on SQLite in production: The release promotes using SQLite in production environments for various features, including caching, queuing, and as the primary database.Ruby 3.4.0 preview2 Released: The version introduces features like switching to the Prism parser, language changes, core class updates, and C API improvements.Kotlin🎓Tutorial | How Functional Programming Can Help You Write Efficient, Elegant Web Applications: Includes code examples and practical guidance on topics like pure functions, function composition, and functional DI.🌟Best Practices and Advice🚀Proactive Approaches to Securing Linux Systems and Engineering Applications: Key approaches discussed include dynamic vulnerability confirmation, regular security audits, and comprehensive patch management.Brutalist Programming Manifesto: Advocates for simplicity, self-reliance, solving real problems, avoiding unnecessary complexity, and encouraging independent, practical thinking in software development.Confusing or misunderstood topics in systems programming: Part 0: Explains complex systems programming concepts like processes, context switching, and the kernel in a clear, beginner-friendly way.🎥Tacit Talk Episode 5: Combinatory Programming with Zach Smith: Explores how functional programming concepts such as combinatory and tacit programming, can simplify code and improve readability.🧠Expert Insight📚Here’s an excerpt from “Chapter 4: Crossing the Language Barrier with the Arrow C Data API” in the book, In-Memory Analytics with Apache Arrow - Second Edition by Matthew Topol, published in September 2024.Importing Arrow data with PythonThe common terminology for runtimes providing an interface for calling an API of another runtime or language is an FFI. In Python, we’re going to use a library called cffi , which is used by the pyarrow module to implement the Cdata API. Make sure that you’re running the script we’re about to write in the same directory as the libsample.solibrary file that we created in theprevious exercise:First, the imports – the following highlighted line represents the essential case that we’re importing the already compiledffilibrary that is part of thepyarrow module:import pyarrow as pafrom pyarrow.cffi import ffiThere are a few different ways to integrate the FFI module, but for the purposes of this exercise, we’re going to use dynamic loading of the library with the defined interface through thecdeffunction. Then, we’ll load our shared object librarywithdlopen:ffi.cdef("void export_int32_data( struct ArrowArray*);")lib = ffi.dlopen("./libsample.so")Note that this matches ourextern "C"declarationfrom before.Now, we can create anArrowArraystruct and call the function we exported topopulate it:c_arr = ffi.new("struct ArrowArray*")c_ptr = int(ffi.cast("uintptr_t", c_arr))lib.export_int32_data(c_arr)Then, we use thepyarrowmodule to import data. Remember that since we’re passing around pointers, there’s no copying of the data buffers. So, it doesn’t matter whether this array has 1,000 elements or 1 million elements; we’re not copying the data here. Importing the data is just hooking everything up to point to the right areasin memory:arrnew = pa.Array._import_from_c(c_ptr, pa.int32())# do stuff with the arraydel arrnew # will call the release callback # once it is garbage collectedYou can add aprintstatement in there if you like, to confirm that it is actually working as intended. That’s it. The library we created could create that array of data in any way we want, but as long as it properly populates the C struct, we’re able to pass the data around in the Arrow format without having tocopy it.What if we wanted to work in the other direction? We can read in our data with Python and then hand it off to something faster for processing, similar to how Spark used JPype to communicate the data from Python to Java without copying. How would we go aboutdoing that?Memory Analytics with Apache Arrow - Second Editionwas published in September 2024. Packt library subscribers can continue reading the entire book for free or you can buy the bookhere!Get the eBook for $39.99$27.98Get the Print book for $49.99 $34.98🛠️Useful Tools⚒️Drasi: Microsoft's open-source system for real-time change detection and automated reactions in dynamic systems.One:a React framework on Vite, streamlining web and native app development with universal routing and seamless data management.agents: a real-time AI framework for processing text, audio, images, and video, with OpenAI Realtime API support and plugins for popular LLMs.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 usefulhere.If your company is interested in reaching an audience of developers, software engineers, and tech decision makers, you may want toadvertise with us.*{box-sizing:border-box}body{margin:0;padding:0}a[x-apple-data-detectors]{color:inherit!important;text-decoration:inherit!important}#MessageViewBody a{color:inherit;text-decoration:none}p{line-height:inherit}.desktop_hide,.desktop_hide table{mso-hide:all;display:none;max-height:0;overflow:hidden}.image_block img+div{display:none}sub,sup{line-height:0;font-size:75%}#converted-body .list_block ol,#converted-body .list_block ul,.body [class~=x_list_block] ol,.body [class~=x_list_block] ul,u+.body .list_block ol,u+.body .list_block ul{padding-left:20px} @media (max-width: 100%;display:block}.mobile_hide{min-height:0;max-height:0;max-width: 100%;overflow:hidden;font-size:0}.desktop_hide,.desktop_hide table{display:table!important;max-height:none!important}}
Read more
  • 0
  • 0
  • 244
Visually different images
Subscribe to Packt _Deep Engineering
Deep Engineering is a weekly newsletter for developers and software architects featuring expert-led insights, deep dives into modern systems, and clear thinking on real-world software design.

Divya Anne Selvaraj
04 Nov 2024
Save for later

Master Python for AI, Forecasting, and Data Engineering

Divya Anne Selvaraj
04 Nov 2024
Curated for data scientists, AI engineers, and Python developersMaster Python for AI, Forecasting, and Data EngineeringHi ,This week, we’ve handpicked five essential titles, all newly published in October 2024, to advance your Python skills across AI, data science, and machine learning. From time series forecasting and pandas data manipulation to mastering Apache Airflow workflows, building large language models, and creating AI applications with OpenAI APIs, these books are designed for practical, real-world application—each now at upto 30% off.Bundle up & save more!Buy 2 eBooks – save an additional 10%Buy 3 eBooks – save an additional 15%Buy 5 eBooks – save an additional 20%Here’s what’s on offer:Modern Time Series Forecasting with Python - Second Edition by Manu Joseph and Jeffrey TackesIndustry-ready machine learning and deep learning time series analysis with PyTorch and pandas>Apply cutting-edge ML and deep learning models to boost forecasting accuracy.>Explore probabilistic forecasting methods for handling real-world uncertainties.>Master techniques for deploying robust time series models with PyTorch and pandas.Get the eBook for $46.99$31.99Get the Print book for $57.99Pandas Cookbook - Third Edition byWilliam Ayd and Matthew HarrisonPractical recipes for scientific computing, time series, and exploratory data analysis using Python>Unlock practical recipes for data manipulation, time series analysis, and data exploration.>Master the latest in pandas 2.x for streamlined data workflows.>Solve real-world data challenges with clear, structured solutions and advanced techniques.Get the eBook for $39.99$27.98Get the Print book for $49.99Apache Airflow Best Practices byDylan Intorf, Dylan Storey, and Kendrick van DoornA practical guide to orchestrating data workflow with Apache Airflow>Build resilient data workflows and pipelines using real-world Apache Airflow use cases.>Optimize workflow orchestration to scale data operations effectively.>Implement best practices for Airflow 2.x, from DAG authoring to cloud deployment.Get the eBook for $35.99$24.99Get the Print book for $44.99LLM Engineer's Handbook byPaul Iusztin, Maxime Labonne, Julien Chaumond, and Hamza TahirMaster the art of engineering large language models from concept to production>Learn how to design, deploy, and optimize LLMs for production use.>Implement data pipelines, fine-tune models, and manage deployment with MLOps techniques.>Master advanced LLM operations, including preference alignment and inference optimization.Get the eBook for$47.99Get the Print book for $59.99 $53.98Building AI Applications with OpenAI APIs - Second Edition byMartin YanevLeverage ChatGPT, Whisper, and DALL-E APIs to build 10 innovative AI projects>Develop AI-powered projects with ChatGPT, Whisper, and DALL-E APIs across 10 innovative projects.>Integrate AI seamlessly into web and desktop applications, from NLP to speech recognition.>Monetize your creations by adding payment systems and using fine-tuning for specific applications.Get the eBook for $31.99$21.99Get the Print book for $39.99*{box-sizing:border-box}body{margin:0;padding:0}a[x-apple-data-detectors]{color:inherit!important;text-decoration:inherit!important}#MessageViewBody a{color:inherit;text-decoration:none}p{line-height:inherit}.desktop_hide,.desktop_hide table{mso-hide:all;display:none;max-height:0;overflow:hidden}.image_block img+div{display:none}sub,sup{font-size:75%;line-height:0}#converted-body .list_block ol,#converted-body .list_block ul,.body [class~=x_list_block] ol,.body [class~=x_list_block] ul,u+.body .list_block ol,u+.body .list_block ul{padding-left:20px} @media (max-width: 100%;display:block}.mobile_hide{min-height:0;max-height:0;max-width: 100%;overflow:hidden;font-size:0}.desktop_hide,.desktop_hide table{display:table!important;max-height:none!important}}
Read more
  • 0
  • 0
  • 230

Divya Anne Selvaraj
17 Apr 2025
Save for later

ProgrammingPro #97: Google's Python Agent Toolkit, C++ at Nanosecond Speed, JetBrains launches Junie, and Rebuilding Every Four Years

Divya Anne Selvaraj
17 Apr 2025
Bite-sized actionable content, practical tutorials, and resources for programmers#97:Google's Python Agent Toolkit, C++ at Nanosecond Speed, JetBrains launches Junie, and Rebuilding Every Four YearsBuild the Future of Apps on HubSpotNew developer products introduce deeper extensibility, flexible UI options, modern development tools, and more—shaping a more powerful, customisable platform experience.HubSpot’s AI-powered ecosystem is projected to become a $10.2 billion opportunity by 2028. To help developers tap into that growth, we're opening up the platform—introducing expanded APIs, customisable app UIs, and tools built to support a unified data strategy.Learn moreHi ,Welcome to a brand new issue of ProgrammingPro.In today’sExpert Insight, we bring you an excerpt from our interview with Francesco Abbruzzese and Gabriel Baptista, authors of Software Architecture with C# 12 and .NET 8, Fourth Edition, where they discuss how AI is being used in architecture today, why it won’t replace human expertise anytime soon, and the evolving skill set software architects need to stay relevant.News Highlights: Google releases an open source Python toolkit for building and deploying AI agents; JetBrains launches Junie AI agent, updates AI Assistant, and adds a free IDE tier; Symbiotic Security unveils an AI tool for real-time code vulnerability fixes; and .NET 10 Preview 3 boosts C# 14, Blazor WebAssembly, and AOT support.My top 5 picks from today’s learning resources:Python at the Speed of Rust✨When Nanoseconds Matter: Ultrafast Trading Systems in C++ - David Gross - CppCon 2024⏱️Some features that every JavaScript developer should know in 2025🧠Fitness Functions for Your Architecture🏗️You’ll Rebuild Everything Every Four Years Anyway🧱But there’s more, so dive right in.Stay Awesome!Divya Anne SelvarajEditor-in-ChiefSign Up|Advertise🗞️News and Analysis🔎Google’s Agent Development Kit (ADK):Google has released an open-source Python toolkit for building, evaluating, and deploying AI agents with fine-grained control, offering code-first orchestration, multi-agent design, and seamless integration with Google Cloud services.JetBrains goes live with Junie AI agent, updates AI assistant, adds free tier: The multi-step AI coding agent now has an updated AI Assistant with new models and multi-file edit support, and a free tier for 2025.1 IDEs.Symbiotic Security launches AI tool for detecting and fixing vulnerabilities in code: The tool integrates into IDEs to detect and fix code vulnerabilities in real time and includes a chatbot for in-context security training and remediation..NET 10 Preview 3 bolsters standard library, C#, WebAssembly: Preview 3 adds an AOT-safe ValidationContext constructor, expands C# 14 extensions, and improves Blazor WebAssembly performance.PHP security audit of critical code reveals flaws, fixed in new release: A security audit of PHP’s core interpreter code has uncovered multiple high-severity flaws, including log tampering, memory errors, and data leaks, all of which were fixed in version 8.4.6.JRuby 10 brings faster startup times: The version improves startup times using modern JVM features like AppCDS and Project CRaC, adds support for Java 21, and aligns with Ruby 3.4.Trending Model Context Protocol (MCP) for AI Agents Gets C# SDK: Microsoft has released an official C# SDK for MCP, simplifying MCP integration into C# apps and server creation.Gleam 1.10 improves compiler, JavaScript codegen: The version enhances its compiler with improved type tracking, string exhaustiveness analysis, better operator handling, and cross-module rename support.🎓Tutorials and Learning Resources💡Python💡Python at the Speed of Rust:IntroducesFunction, a compiler that converts Python functions into native code using symbolic tracing and type annotations, achieving near-Rust performance.For more Python resources, go to PythonProC# and .NET💡Optimizing memory usage with modern .NET features: Shows how the author reduced memory allocations after migrating to .NET 8/9 by replacing inefficient patterns with modern .NET features.💡What's new in C# 14: Introduces C# 14 features such as the field keyword for simpler property backing, implicit Span<T> conversions, unbound generics in nameof, parameter modifiers in lambdas, partial constructors and events, and null-conditional assignments.🎓Foundations of Data Structures and Algorithms in C#: Introduces a foundational C# repository that teaches core data structures and algorithms including arrays, linked lists, sorting, searching, recursion, graphs, and more.C++ and C🎥When Nanoseconds Matter: Ultrafast Trading Systems in C++ - David Gross - CppCon 2024: Explains how to engineer low-latency trading systems in C++ by focusing on data structure design, CPU profiling, and performance-aware memory use.💡6 usability improvements in GCC 15: Improvements include clearer static analysis visuals, improved C++ template diagnostics, dual-format machine-readable SARIF output, C23 migration aids, and more.💡Compiler Options Hardening Guide for C and C++: The updated guide (April 2025) refines flag recommendations, clarifies usage contexts like -Werror, expands coverage of hardening options such as -fstrict-flex-arrays=3, and improves guidance for development versus production builds.Java💡When Inheritance is a Good Thing: Argues that while inheritance is often misused for code reuse—it remains valuable particularly in implementing design patterns like Decorator and Visitor.💡30 Advanced Spring Boot Interview Questions for Experienced Professionals: Presents a list of Q&As focusing on topics such as performance optimization, microservices architecture, security, and configuration management.💡Efficiently making (almost) any concurrency control mechanism serializable: Explains how the Serializable Safety Net (SSN) algorithm adds serializability to existing concurrency control methods by efficiently tracking transaction dependencies using minimal metadata.JavaScript and TypeScript💡Some features that every JavaScript developer should know in 2025: Covers iterator helpers for memory-efficient data transformation, Promise.withResolvers(), structuredClone() , tagged templates, and more.💡An Introduction to JavaScript Bundler Rspack: Introduces a high-performance JavaScript bundler written in Rust that offers fast builds, Webpack compatibility, built-in optimization features, and a smooth developer experience.💡Deploying TypeScript: recent advances and possible future directions: Discusses type stripping, isolated declarations, JSR support, the future of shipping .ts files, type annotations in JavaScript, and the evolving roles of JSX.Go🎓Unit testing using mocks in Go: Covers AWS S3 bucket creation, by refactoring functions to accept interfaces, implementing mock types to simulate success and failure scenarios, and using table-driven tests to streamline cases.🎓Using Signals With Go: Explains how to handle operating system signals in Go using the os/signal package, demonstrating how to listen for signals like SIGINT to implement features such as graceful shutdowns, and more.Rust💡Two Years of Rust: Reflects on the author's experience in backend development with Rust for a B2B SaaS product, examining its learning curve, performance, tooling, type safety, error handling, and developer experience.💡A 2025 Survey of Rust GUI Libraries: Assesses 23 libraries including Azul, Cacao, Core Foundation, Crux, and Floem, based on ease of setup, accessibility support, internationalization capabilities, and overall user experience.Swift🎓Using Instruments to profile a SwiftUI app: Explains how to profile SwiftUI apps using Instruments, covering how to detect slow code, track view redraws, and interpret performance data like view body evaluations and CPU usage.🎓Implementing Task timeout with Swift Concurrency: Shows how to implement timeouts in Swift Concurrency by racing a work task against a timed task using a TaskGroup, returning whichever completes first.PHP🎓Create User-Friendly Password Requirement Indicators with Laravel’s appliedRules() Method: Introduces a method which lets developers dynamically access password validation rules for display in views.💡PHP 8.5 & 9.0: What’s Changing, What’s Breaking, and What You’ll Love: Outlines new features including improved debugging tools, stricter error handling, cleaner function signatures, and the removal of legacy features.SQL💡SQL Plan Baseline, SQL Patch, SQL Profile: Differences and Use Cases: Explains the differences between the three Oracle mechanisms, detailing how each influences SQL execution plans and when to apply them for optimal plan stability and performance tuning.💡Some Thoughts on SQL v. NoSQL: Argues that for most early-stage startups, using DynamoDB over Postgres results in greater complexity with minimal benefit, particularly around schema management, query flexibility, and developer experience.Ruby💡Pre-build a Secure Authentication Layer with Authentication Zero for Ruby on Rails: Introduces Authentication Zero, a code generator for Ruby on Rails that scaffolds a secure, customisable authentication system with built-in best practices.🎓Migrating Sidekiq Background Jobs to Temporal in Ruby on Rails: Explains how Temporal enables reliable, stateful workflows with built-in retries, fault tolerance, and orchestration suited for long-running or complex processes.Kotlin💡Type-safe, multiplatform JSON serialization for Kotlin, generated at compile-time: Introduces kotlin-json-stream-serializer, a compile-time code generation tool for type-safe, multiplatform JSON serialization in Kotlin using OKIO streams.🎓Making Android Code Cleaner with Use Cases: A Practical Approach Using Kotlin Coroutines: Explains how replacing bulky interactors with single-responsibility Kotlin coroutine-based use cases improves Android app architecture.🌟Advanced Concepts🚀Fitness Functions for Your Architecture: Discusses how to implement and scale architectural fitness functions using tools like ArchUnit and JMolecules, and how this practice can improve system maintainability, agility, and team alignment.The problem with indirections: Critiques the overuse of indirections in software development, arguing that many common abstractions can complicate code, reduce readability, and hinder maintainability without sufficient benefit.You’ll Rebuild Everything Every Four Years Anyway: Argues that while full rebuilds of software systems occur frequently due to technical and organisational complexity, a modular architecture enabling incremental change is a more sustainable and pragmatic alternative.Why most technical documentation fails (and how to fix it with inclusive, accessible design): Outlines a science-based framework for creating inclusive, modular, and accessible documentation through clear language, visual support, progressive disclosure, and user-friendly navigation.Ingres vs Postgres MVCC Explained With Neo4j's LLM Knowledge Graph Builder: Shows how GraphRAG improves data retrieval accuracy by leveraging graph relationships, offering architectural insights for developers integrating LLMs into knowledge-intensive systems.🧠Expert Insight: Using AI in Software Architecture Starts with Good Design📚An excerpt from an interview with Francesco Abbruzzese and Gabriel Baptista, authors of Software Architecture with C# 12 and .NET 8, Fourth EditionQ: What inspired you to write Software Architecture with C# 12 and .NET 8?Francesco:The main point was that this book brings together various subjects that are hard to find in one place. I wanted to collect my experience and put it into something solid—a book that could be useful in my advisory work, in courses, and also for my customers. It’s a practical tool for all of that.Gabriel:For me, it marked a really important point in my career. I’ve worked both in the college environment and in industry for a long time. This opportunity allowed me to give back to the community a complete material, a full pipeline on how to create an enterprise solution.It was a great chance to work with Francesco too—we found a lot of common ground. I think readers will notice that the book reads as though it was written by a single person. We worked closely and it was a really enjoyable collaboration.Q: Could you give us a few examples of how AI-driven tools are currently being used in architectural design and what new paradigms you see emerging?Gabriel:AI is definitely the topic on everyone’s mind right now. But a good AI still depends on a good software architecture—because AI needs good data. Without good data, you can't have good AI.As architects, we’re going to be impacted by AI, positively or negatively, depending on how we work with it. For example, today it’s possible to upload an architectural design into a tool like ChatGPT and have a conversation about whether it’s good or bad. I’ve done this—it can suggest changes or provide feedback. But you still need to analyse that feedback and judge if it's correct, especially in enterprise environments where things are more complex.So AI will change the world, but we need to use our intelligence to evaluate its output. Architects need to design systems that can produce good AI—because poor architecture means poor data, and that leads to poor AI.Francesco:AI is a valuable tool, but it can’t fully replace a professional’s experience—at least not yet. It helps save time and can suggest options, but sometimes those suggestions are wrong. Other times they’re a useful starting point for further investigation.AI can write some code, create diagrams or designs that serve as a base to work from. It might remind you of something you’d forgotten to analyse. But that doesn’t mean it’s giving you the best solution—it’s just helping you avoid overlooking things.Right now, it’s still far from the kind of general intelligence that could fully take over an architect’s job.Q: What remains irreplaceable about human architects—and how they can use AI to enhance, rather than replace, their role?Francesco:Architects should use AI to save time—for instance, to generate some starting designs or initial code. In my company, we developed an AI tool that can generate a complete Visual Studio solution, with all the needed projects and some basic starting code. It doesn’t always work perfectly, but it’s a useful starting point and it saves time, especially with complex architectures like those based on microservices or onion architecture.In those cases, setting everything up manually would take a long time. With this tool, we can automate 50–60% of that groundwork. But even then, the hard part is modelling the real world—and AI doesn’t have enough understanding of the world to do that on its own. It still needs a human to interpret the requirements and guide the process.Gabriel:Our book focuses a lot on the architect’s role in a team. Architects design the solution pipeline and are responsible for the technical direction of enterprise projects.Today, AI can be used to accelerate things for the whole team—not just the architect. But it’s still just a starting point. You need someone with experience to evaluate whether the output fits the requirements. This is especially true for enterprise systems, where quality and correctness matter a lot.Even tools like GitHub Copilot don’t just help you write code—they also help analyse if you’re following best practices. But it’s still the architect’s responsibility to decide which tools are appropriate and whether they’re improving the team’s performance.Q: What skills do you see becoming essential for software architects as technology continues to evolve?Gabriel:If you look at everything we’ve talked about so far—distributed systems, AI, security—they all point to one thing: the future is distributed. So, understanding how to build distributed applications is going to be essential. Architects also need a solid grounding in information security.And beyond the technical, I’d say soft skills are critical too. When you introduce changes like DevOps or observability, you’re impacting the entire team. The ability to bring people along with you—to communicate, to influence—is just as important as technical skill.Francesco:I agree with Gabriel. Many developers and architects still think of security as something you add at the end—firewalls, updates, patches. That mindset has to change. Security needs to be part of how we design and write code from the beginning.Architects preparing for the future should update how they design, how they build, and how they think about development. That means learning about DevOps, distributed systems, and modern development methodologies—and making them second nature.About the AuthorsFrancesco Abbruzzese is a software architect and the creator of the MVC and Blazor Control Toolkit. He has extensive experience in designing enterprise-grade applications and consults on scalable architectural solutions. Francesco also trains development teams and contributes actively to the .NET ecosystem.Gabriel Lara Baptista is an Azure PaaS specialist and university instructor with a strong focus on cloud-native applications and team enablement. He brings together academic depth and real-world implementation in his work and is passionate about building resilient systems that scale with business needs.Their book Software Architecture with C# 12 and .NET 8, Fourth Edition was published in February 2024. It serves as a practical, end-to-end guide to designing scalable, secure, and modern enterprise applications using proven architectural patterns and real-world .NET tooling. It’s designed to help developers move confidently from high-level design to implementation across today’s complex cloud-native environments.Get the Paperback for $49.99$28.50!🛠️Useful Tools⚒️Koreo: An open-source toolkit that acts as a meta-controller programming language for Kubernetes, enabling unified configuration management and resource orchestration.ai-agents-for-beginners: A free, multi-language course of 10 lessons with hands-on Python examples and videos that teach developers how to build AI agents using Microsoft’s Azure AI Foundry, Semantic Kernel, and AutoGen.maxun: An open-source, no-code web data extraction platform that lets users create automated robots to scrape websites, handle pagination, and turn web pages into structured APIs or spreadsheets.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 usefulhere.If your company is interested in reaching an audience of developers, software engineers, and tech decision makers, you may want toadvertise with us.If you have any suggestions or feedback, or would like us to find you a learning resource on a particular subject, just respond to this email!*{box-sizing:border-box}body{margin:0;padding:0}a[x-apple-data-detectors]{color:inherit!important;text-decoration:inherit!important}#MessageViewBody a{color:inherit;text-decoration:none}p{line-height:inherit}.desktop_hide,.desktop_hide table{mso-hide:all;display:none;max-height:0;overflow:hidden}.image_block img+div{display:none}sub,sup{font-size:75%;line-height:0}#converted-body .list_block ol,#converted-body .list_block ul,.body [class~=x_list_block] ol,.body [class~=x_list_block] ul,u+.body .list_block ol,u+.body .list_block ul{padding-left:20px} @media (max-width: 100%;display:block}.mobile_hide{min-height:0;max-height:0;max-width: 100%;overflow:hidden;font-size:0}.desktop_hide,.desktop_hide table{display:table!important;max-height:none!important}}
Read more
  • 0
  • 0
  • 176

Divya Anne Selvaraj
01 May 2025
Save for later

ProgrammingPro #99: BDD with Go’s gobdd, Docker & AWS AI Tooling, GCC 15.1 Rust/C++ Upgrades, and Netflix’s 2025 Java Stack

Divya Anne Selvaraj
01 May 2025
Bite-sized actionable content, practical tutorials, and resources for programmers#99:BDD with Go’s gobdd, Docker & AWS AI Tooling, GCC 15.1 Rust/C++ Upgrades, and Netflix’s 2025 Java StackSponsored:Build the Future of Apps on HubSpot:New developer products introduce deeper extensibility, flexible UI options, modern development tools, and more—shaping a more powerful, customisable platform experience.Learn more.Hi ,Welcome to a brand new issue of ProgrammingPro.In today’sExpert Insight, we bring you an excerpt from the recently published book, Domain-Driven Design with Golang, which explains how Behaviour-Driven Development (BDD) extends Test-Driven Development (TDD) by using natural language tests to improve collaboration between engineers and domain experts, illustrated with Go examples using the gobdd framework.News Highlights: AI tooling advances as Docker, Solo.io, and AWS launch new agent frameworks and benchmarks; GCC 15.1 delivers major Rust, C, C++, and Cobol upgrades; GitHub previews its AI-powered MCP Server; and InfoQ’s 2025 report highlights agentic AI, small LMs, and privacy engineering trends.My top 5 picks from today’s learning resources:14 Advanced Python Features🧩How Netflix Uses Java - 2025 Edition🎬This 150-Line Go Script Is Actually a Full-On Load Balancer⚖️Swift 6.2: A first look at how it’s changing Concurrency🚦Scaling API Independence: Akehurst on Mocking, Contract Testing, and Observability🔗But there’s more, so dive right in.Stay Awesome!Divya Anne SelvarajEditor-in-ChiefWEBINARSecuring Mobile Payments:Protecting Digital Wallets and SoftPOS from AttacksHosted byGuardsquareFeaturing:Sergio Castell-Security ResearcherDario Dallefrate-Product Marketing ManagerDate/time:Tuesday May 13, 20254 PM CET (10 AM EDT)Register NowSign Up |Advertise🗞️News and Analysis🔎AI updates from the past week: Docker announced an upcoming MCP tool catalog, Solo.io released Agent Gateway and Mesh for agent governance, and AWS launched SWE-PolyBench to benchmark AI coding agents.GCC 15 compilers arrive with Rust, C, C++, and Cobol enhancements: GCC 15.1 introduces major upgrades including full C23 support, initial C++26 features, improved vectorization, and faster compilation for large files.GitHub Announces Public Preview of GitHub MCP Server: The server enables AI-powered, natural language interactions with GitHub APIs through a standardised client-server protocol developed with Anthropic.InfoQ Software Architecture and Design Trends Report - 2025: Key architecture trends include agentic AI, small language models, RAG, AI-assisted development, and privacy engineering.Microsoft previews SignalR client for iOS: The client enables iOS developers to build real-time features like chat and live updates into SwiftUI and UIKit apps using ASP.NET SignalR and Azure SignalR services.Java News Roundup: Covers the release of Gradle 8.14, the debut of JBang’s Jash shell scripting library, Hibernate ORM 7.0 RC1, updates to Open Liberty and Spring projects, and the end of open-source support for Spring Cloud Data Flow.The hidden cost of dev stack diversity within an enterprise: ‘Engineering chaos’: A survey by Earthly has revealed that dev stack diversity, enabled by containerization, makes it hard to enforce security and quality policies across teams despite other gains.🎓Tutorials and Learning Resources💡Python💡14 Advanced Python Features:Presents 14 underused yet powerful Python features, including typing overloads, structural pattern matching, generics, protocols, and metaclasses, with code examples and references.For more Python resources, go to PythonProC# and .NET💡Why C#?: Explains why C# remains a powerful and relevant language, highlighting its modern features, cross-platform .NET ecosystem, strong tooling, and active community as key reasons for its continued appeal to developers.🎓Using ImmutableSortedSet in C# for memory sharing: Explains how the data structure is ideal for concurrent scenarios where data is frequently read, occasionally mutated, and needs safe, low-cost versioning without locking.🎓Effortless integration test isolation with .NET, XUnit and database transactions: Explains how to set up realistic, isolated integration tests in .NET using XUnit, EF Core, and PostgreSQL.C++ and C💡New C++ features in GCC 15: The version introduces pack indexing, variadic friends, =delete("reason") , and structured bindings in conditions—alongside improvements to constexpr support, modules, and more.📄Link-Time Optimization of Dynamic Casts in C++ Programs: Proposes a link-time optimisation (LTO) technique to improve performance and reduce code size for dynamic casts in C++.🎓How to program a text adventure in C: Explains how to build a text adventure game from scratch, progressing incrementally through 25 chapters covering key mechanics like locations, inventory, parsing, and even multiplayer.Java💡How ZGC allocates memory for the Java heap: Covers virtual-physical memory separation, NUMA-aware multi-partition handling, allocation paths, and latency considerations.💼🎥How Netflix Uses Java - 2025 Edition: Presents how Netflix modernised its Java infrastructure, what tools and frameworks power its services, and why it standardised on GraphQL, Spring Boot, and newer JVM features.JavaScript and TypeScript💡Making a small JavaScript blog static site generator (SSG) even smaller using the general async-tree library: Examines how the async-tree library simplifies and reduces the codebase of a minimalist SSG.🎓Go to Definition in Typescript Monorepos: Explains how to enable reliable “Go to Definition” functionality by configuring package.json exports with a custom condition and updating tsconfig.json and Vite settings accordingly.Go🎓This 150-Line Go Script Is Actually a Full-On Load Balancer: Demonstrates how to build a fully functional HTTP load balancer using round-robin request routing, health checks, and reverse proxying.🎓Organize your Go middleware without dependencies: Explains how to organize and manage middleware in Go web applications without third-party dependencies, using custom middleware chains and a simple router type.Rust🎓A Visual Journey Through Async Rust: Uses a graphical approach to explain how async execution, concurrency, and parallelism work in Rust by plotting sine wave computations across futures and tasks.💡Introducing Rust in security research: Describes how a team designed and delivered a Rust workshop for Radboud University’s iHub, focusing on Rust fundamentals and C interoperability.Swift🗞️Swift 6.2: A first look at how it’s changing Concurrency: Previews how the version aims to improve concurrency’s approachability, focusing on clearer migration paths, reduced compiler warnings, and easier adoption of async code.🎓SwiftUI ForEach Explained with Code Examples: Explains how to use SwiftUI’s ForEach to create dynamic, repeatable views, covering basics, the Identifiable protocol, and index-based iteration.PHP🎓Fast string compare function for PHP: Presents a fast, approximate PHP string comparison function that measures text differences by length, character counts, and word frequencies, offering 80–90% better performance.SQL💡Anatomy Of A SQL Engine: Breaks down how Dolt’s SQL engine processes queries, covering each phase from parsing (building an AST) to binding (resolving identifiers), plan simplification, join planning and costing.Ruby💼Past, Present, and Future of Sorbet Type Syntax: Reviews the evolution of Sorbet’s type syntax, explaining its origins at Stripe, trade-offs between various type system designs, and key constraints that shaped its current DSL approach.🌟Advanced Concepts🚀Scaling API Independence: Akehurst on Mocking, Contract Testing, and Observability: Discusses how combining mocking, contract testing, and observability enables API independence in large microservices systems.Closing the loop on agents with test-driven development (TDD): Explains how developers are applying TDD to AI agents by evaluating behaviours and refining workflows across experimentation, evaluation, deployment, and monitoring stages.Quality begins with planning: Building software with the right mindset: Argues that software quality must be a shared responsibility across the team and embedded from the planning phase, with developers playing a proactive role.🧠Expert Insight📚Here’s an excerpt from “Chapter 8: TDD, BDD, and DDD" in the book, Domain-Driven Design with Golang, by Matthew Boyle, published in December 2022.BDDBDD is an extension of TDD that aims to enable deeper collaboration between engineers, domain experts, and quality assurance engineers (if your company employs them). A diagram of how thisworks with TDD is shown (in Figure 8.6).The goal of BDD is to provide a higher level of abstraction from code through adomain-specific language (often referred to as a DSL) that can become executable tests. Two popular frameworks for writing BDD tests is the use of Gherkin (https://cucumber.io/docs/gherkin/reference/) and Cucumber (https://cucumber.io). Gherkin defines a set of keywords and a language specification. Cucumber reads this text and validates that the software works as expected. For example, the following is a valid Cucumber test:Feature: checkout IntegrationScenario: Successfully Capture a paymentGiven I am a customerWhen I purchase a cookie for 50 cents.Then my card should be charged 50 cents and an e-mail receiptis sent.Some teams work with their domain experts to ensure their acceptance criteria in their ticketing system are in this format. If it is, this criterion can simply become the test. This aligns nicely with DDD.Now that we have a high-level understanding of BDD, let’s take a look at implementing a test in Go. We are going to use the go-bdd framework, which you can find at https://github.com/go-bdd/gobdd.Firstly, let’s install go-bdd in our project:go get github.com/go-bdd/gobddNow, create a features folder:Inside the features folder, let’s add a file called add.feature with this inside it:Feature: Adding numbersScenario: add two numbers togetherWhen I add 3 and 6Then the result should equal 9Next, let’s add an add_test.go file and the following:package chapter8import ("testing""github.com/go-bdd/gobdd")func add(t gobdd.StepTest, ctx gobdd.Context, first, secondint) {res := first + secondctx.Set("result", res)}func check(t gobdd.StepTest, ctx gobdd.Context, sum int) {received, err := ctx.Geif err != nil {t.Fatal(err)return}if sum != received {t.Fatalf("expected %d but got %d", sum, received)}}func TestScenarios(t *testing.T) {suite := gobdd.NewSuite(t)suite.AddStep(`I add (\d+) and (\d+)`, add)suite.AddStep(`the result should equal (\d+)`, check)suite.Run()}In the preceding code, we add a bdd step function called add. This function name is important; the framework knows that when I add 3 and 6 gets mapped to this function. If you change the name of this function to “sum”, you’d need to update the feature file to say, when I sum 3 and 6 together. We then perform our logic and store it in the context so that we can recall it later.We then define a check function that is our actual test; it validates our assertions. Finally, we set up a test suite to run our code.If you run the preceding test, it should pass.This might be your first time seeing a BDD-style test, but I bet it’s not your first time seeing a unit test. Why is that?As you can see, although BDD tests are closer to natural language, it pushes a lot of the complexity down into the tests. The preceding example we used is trivial, but if you want to express complex scenarios (such as the cookie example we used previously) there is a lot of scaffolding the developer needs to implement to make the tests work correctly. This can be worthwhile if you have lots of access to your domain experts and you are truly going to work side by side. However, if they are absent or not invested in the process, unit tests are much faster and more engaging for engineering teams to work with. Much like DDD, BDD is a multidisciplinary team investment, and it is worth ensuring you have buy-in from all stakeholders before investing too much time in it.Domain-Driven Design with Golang was published in December 2022. Packt library subscribers can continue reading the entire book for free or you can buy the book here!Get the eBook for $35.99$31.99🛠️Useful Tools⚒️Magnitude: An AI-powered, open source end-to-end testing framework that uses visual agents and natural language to create and run adaptive tests for web apps.agenticSeek: A fully local, open-source AI assistant that autonomously browses the web, writes code, and plans tasks with complete on-device privacy.BitNet: A 1-bit LLM framework from Microsoft designed for ultra-efficient, fast inference on CPUs, enabling low-bit LLMs like BitNet b1.58 to run locally.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 usefulhere.If your company is interested in reaching an audience of developers, software engineers, and tech decision makers, you may want toadvertise with us.If you have any suggestions or feedback, or would like us to find you a learning resource on a particular subject, just respond to this email!*{box-sizing:border-box}body{margin:0;padding:0}a[x-apple-data-detectors]{color:inherit!important;text-decoration:inherit!important}#MessageViewBody a{color:inherit;text-decoration:none}p{line-height:inherit}.desktop_hide,.desktop_hide table{mso-hide:all;display:none;max-height:0;overflow:hidden}.image_block img+div{display:none}sub,sup{font-size:75%;line-height:0}#converted-body .list_block ol,#converted-body .list_block ul,.body [class~=x_list_block] ol,.body [class~=x_list_block] ul,u+.body .list_block ol,u+.body .list_block ul{padding-left:20px} @media (max-width: 100%;display:block}.mobile_hide{min-height:0;max-height:0;max-width: 100%;overflow:hidden;font-size:0}.desktop_hide,.desktop_hide table{display:table!important;max-height:none!important}.reverse{display:table;width: 100%;
Read more
  • 0
  • 0
  • 171

Divya Anne Selvaraj
25 Apr 2025
Save for later

Welcome to ProgrammingPro — Here’s a little something to get you started

Divya Anne Selvaraj
25 Apr 2025
Access expert commentary, interviews, and practical resources across programming and software architWelcome to ProgrammingPro!Thank you for subscribing to ProgrammingPro, a resource for discerning software professionals committed to advancing their expertise. Each week, we present curated insights spanning programming languages, software architecture, and emerging technologies. Our content includes expert commentary, interviews with industry leaders, and practical tutorials to support continuous learning.In addition to the newsletter, forthcoming articles and video interviews on our blog and YouTube channel will provide further opportunities for in-depth engagement with the Packt author base complementing our extensive collection of books.As a new subscriber, you are invited to explore our catalogue of technical publications with 15% off your first eBook. Please use the code GET15 at checkout.We recommend the following titles to begin:Start ExploringThank you for joining us. We look forward to supporting your learning journey across every stage of your career.*{box-sizing:border-box}body{margin:0;padding:0}a[x-apple-data-detectors]{color:inherit!important;text-decoration:inherit!important}#MessageViewBody a{color:inherit;text-decoration:none}p{line-height:inherit}.desktop_hide,.desktop_hide table{mso-hide:all;display:none;max-height:0;overflow:hidden}.image_block img+div{display:none}sub,sup{font-size:75%;line-height:0} @media (max-width: 100%;display:block}.mobile_hide{min-height:0;max-height:0;max-width: 100%;overflow:hidden;font-size:0}.desktop_hide,.desktop_hide table{display:table!important;max-height:none!important}}
Read more
  • 0
  • 0
  • 154

Divya Anne Selvaraj
31 Oct 2024
Save for later

ProgrammingPro #80: Declarative UI in Flutter, GitHub Copilot’s New AI Models, and PyTorch 2.5 Intel GPU Optimizations

Divya Anne Selvaraj
31 Oct 2024
Bite-sized actionable content, practical tutorials, and resources for programmers#80Declarative UI in Flutter, GitHub Copilot’s New AI Models, and PyTorch 2.5 Intel GPU OptimizationsHi ,Welcome to this week’s edition of ProgrammingPro!In today’sExpert Insight, we bring you an excerpt from the recently published book, Flutter Design Patterns and Best Practices, which briefly discusses the declarative UI in Flutter, contrasting it with the traditional imperative approach.News Highlights: NET’s new Central Package Management streamlines dependencies across projects;Flutter is forked as "Flock" due to Google's reduced focus; Microsoft’s Git fix reduces repo bloat; GitHub Copilot expands with new AI models; and PyTorch 2.5 adds Intel GPU support and optimizations for ML.My top 5 picks from today’s learning resources:Concurrent Requests in Python: httpx vs aiohttp🐍How we shrunk our Javascript monorepo git size by 94%📉Clean Code Architecture in Laravel: A Practical Guide🏗️RAG-Powered Copilot Saves Uber 13,000 Engineering Hours🤖Do's and Don'ts of Commenting Code📝But there’s more, so dive right in.Stay Awesome!Divya Anne SelvarajEditor-in-ChiefPS:Thank you all who participated in this month's survey. With this issue we have fulfilled all resource requests made in October. Keep an eye out for next month's survey.This free 3-hour Training on AI & ChatGPT (worth $399) will help you become a master of 20+ AI tools & prompting techniques and save you 16 hours/week.Get it now for absolutely free (for the first 100 users only)!Sign Up|Advertise🗞️News and Analysis🔎Central Package Management (CPM) Now Available in .NET Upgrade Assistant: Available in Visual Studio and CLI, CPM reduces redundancy by consolidating package versions, simplifying updates with a single directory file.PyTorch 2.5 Release Includes Support for Intel GPUs: Key features include the FlexAttention API for streamlined attention mechanisms, backend optimizations for faster performance, and regional compilation to reduce latency.Java News Roundup: Apache Pulsar 4.0, Jakarta EE 11, Open Liberty, Helidon, JHipster, Apache Camel: Key developments also include JDK 24 progress and Project Loom builds, plus Spring framework releases.Flutter forked as Flock, developer cites “company-wide issues at Google”: Flutter developer Matt Carroll has forked the framework to create “Flock” in response to Google’s deprioritization of Flutter, particularly on desktop platforms.OpenSSF updates its Developing Secure Software course with new interactive labs: The free course covers secure design principles, supply chain security, and threat modeling and offers a certificate valid for two years.OSI officially releases its definition for Open Source AI: The definition includes code, model, and “data information,” requiring detailed descriptions of training data for reproducibility.Microsoft engineer describes a flaw in Git that can hugely bloat repositories – fix is on the way: The fix aimed at large repositories, will soon be available in a Git update, minimizing storage needs.GitHub Copilot now offers access to new Anthropic, Google, and OpenAI models: Updates also include multi-modal support, side-by-side comparisons, Autofix security features, and customization options.🎓Tutorials and Learning Resources💡Python💼Case Study | Concurrent Requests in Python: httpx vs aiohttp:Describes how switching from thehttpx toaiohttp library resolved high-concurrency issues and improved stability in a computer vision application.For more Python resources, go to PythonProSpark and Scala📖Open Access Book | The Internals of Spark Core (Apache Spark 3.5.2): Covers Spark’s structure, job scheduling, execution, and resource management, beneficial for developers looking to understand Spark at a systems level.Optimizing Spark Compute for Medallion Architectures in Microsoft Fabric: Explains how to optimize Spark compute in Microsoft Fabric’s Medallion architecture (Bronze, Silver, Gold) by tailoring configurations for each layer.C# and .NETA comparison of Rust’s borrow checker to the one in C#: Shows that C# achieves similar safety without explicit lifetimes by making trade-offs, such as restricted lifetime management.🎓Tutorial |Integrating Large Language Models in .NET Projects: Demonstrates how to use Microsoft's Semantic Kernel and Extensions.AI, to query custom data and enhance interactions with LLMs.The Power of Function Composition — to Find If an Array Is Special: Explores advanced techniques in function composition to evaluate if an array meets certain criteria, with examples in C# and Haskell.C and C++🎓Tutorial | Square a Number in C++: Methods and Applications: Covers approaches ranging from basic multiplication to complex use cases, such as handling overflow, bitwise operations, and custom number systems.🎓Tutorial | How to Reverse a C++ String: Practical Guide: Covers approaches such as using temporary strings and efficient in-place swaps, STL’s std::reverse, and Unicode handling.🎓Tutorial | Ray-Casting [C]CUB3D Project [42-cursus] (1337 KH): Describes techniques for horizontal and vertical intersections, wall projection, texture mapping, and color handling, including pixel data manipulation.JavaSpring News Roundup: Release Candidates for Spring Boot, Security, Auth Server, Modulith: New release candidates include Spring Boot 3.4.0-RC1, Spring Security 6.4.0-RC1, and updates to Spring Integration.🎥Better Java Builds with the Mill Build Tool, Japan Java User Group Fall Conference 2024: Introduces Mill, a faster, more user-friendly JVM build tool, recently expanded from Scala to Java and Kotlin projects.🎓Tutorial | Applying Clean Architecture in Java with Spring Boot: Provides practical, in-depth examples of architecture decoupling, multiple data sources, and managing external libraries like Lombok, Log4j, and Cacheable.JavaScript and TypeScript🎓Tutorial | Testing In JavaScript With Jest: Guides you through setup, basic testing syntax, matchers, asynchronous testing, and organizing tests for maintainability.💼Case Study | How we shrunk our Javascript monorepo git size by 94%: Described how Microsoft's 1JS team reduced a massive 178GB monorepo's size by addressing several git inefficiencies, particularly with CHANGELOG files.💼Case Study | How We Rebuilt the ChatGPT & YouTube Summary Extensions: Details Glasp's rewrite of their Summary extension, transitioning from VanillaJS to a React and TypeScript setup using Vite.Go🎓Tutorial | Go I/O Closer, Seeker, WriterTo, and ReaderFrom: Explains Closer's role in resource management, Seeker's ability to navigate within streams, and WriterTo and ReaderFrom's streamlining of data transfer.Go does what RxJS couldn't: Compares the simplicity of Go with the complexities of RxJS and imperative JavaScript for state management in an audio player app.RustAsync Rust is not safe with io_uring: Examines the issues of connection leaks and incomplete cancellation in async Rust when using io_uring instead of epoll and proposes partial solutions to address these challenges.Unsafe Rust Is Harder Than C: Explores the complexities of using unsafe Rust to create an optimized batch-processing channel, highlighting the difficulties with intrusive data structures, lifetimes, and Rust’s aliasing model.Swift🎓Tutorial | A Whirlwind Tour of Swift Concurrency: Provides an overview of Swift Concurrency, highlighting its benefits in creating more readable and maintainable code, safer multithreading through actors, and more.🎓Tutorial | Using the #require macro for Swift Testing: IntroducesApple’s new library for testing, which ensures prerequisites are met before tests proceed, enhancing code readability and reducing ambiguity in failure cases.PHP🎓Tutorial | Clean Code Architecture in Laravel: A Practical Guide: Details implementing clean code practices by structuring applications into layers: entities, repositories, interfaces, controllers, and services, with clear examples.SQLSQLite will migrate from GNU Autotools to Autosetup, team warns of ‘some build-level breakage’: While most users won’t notice changes, the shift may cause “build-level breakage,” especially in automated build processes.RubyRuby Caches - Rails Cache Comparisons: Compares various caching options like memory store, file store, Memcached, Redis, and SolidCache, emphasizing their scalability and performance in different deployment contexts.KotlinJetBrains updates Kotlin roadmap: The updated roadmap emphasizes better data handling, abstraction, and performance, with plans for faster code completion and stable analysis in the K2 IntelliJ IDEA plugin.🌟Best Practices and Advice🚀RAG-Powered Copilot Saves Uber 13,000 Engineering Hours: Uber’s Genie streamlines incident response for engineers by quickly retrieving relevant internal data to answer support questions.Securing Cell-Based Architecture in Modern Applications: Details essential strategies including isolation, zero-trust security, role-based and attribute-based access controls, and encrypted communication (TLS, mTLS).Do's and Don'ts of Commenting Code: Covers best practices like using consistent standards, explaining "why" rather than "what," and documenting hacks or tradeoffs for team clarityJump Into the Demoscene; It Is Where Logic, Creativity, and Artistic Expression Merge: Explores the demoscene, a subculture where programmers blend creativity and technical skill to create real-time digital art.🧠Expert Insight📚Here’s an excerpt from “Chapter 1: Best Practices for Building UIs with Flutter" in the book, Flutter Design Patterns and Best Practices by Daria Orlova, Esra Kadah, and Jaime Blasco, published in September 2024.Understanding the difference between declarative and imperative UI designThe beauty of technology is that it evolves with time based on feedback about developer experience. Today, if you’re in mobile development, there is ahigh chance that you have heard about Jetpack Compose, SwiftUI, React Native, and of course Flutter. The thing these technologies have in common is both that they’re used for creating mobile applications and the fact that they do it via a declarative programming approach. You may have heard this term before, but what does it actually mean and why is it important?To take full advantage of a framework, it’s important to understand its paradigm and work with it rather than against it. Understanding the “why” behind the architectural decisions makes it much easier to understand the “how,” and to apply design patterns that complement theoverall system.Native mobile platforms have a long history of development and major transitions. In 2014, Apple announced a new language, Swift, that would replace the current Objective-C. In 2017 the Android team made Kotlin the official language for Android development, which would gradually replace Java. Those introductions had a hugely positive impact on the developer experience, yet they still had to embrace the legacy of existing framework patterns and architecture. In 2019, Google announced Jetpack Compose and Apple announced SwiftUI – completely new toolkits for building UIs. Both SwiftUI and Jetpack Compose take advantage of their respective languages, Swift and Kotlin, leaving legacy approaches behind. Both toolkits also loudly boast their declarative programming paradigm. But language advantages aside, let’s explore why declarative is now the industrial de facto and what is wrongwith imperative.Understanding theimperative paradigmBy definition, the imperative programming paradigm focuses on how to achieve the desired result. You describe the process step by step and have complete control of the process. For example, it could result in code suchas this:fun setErrorState(errorText: String) { val textView = findViewById<TextView>(R.id.error_text_view) textView.text = errorText textView.setTextColor(Color.RED) textView.visibility = View.VISIBLE val button = findViewById<Button>(R.id.submit_button) button.isEnabled = true val progressView = findViewById<ProgressBar>(R.id.progress_view) progressView.visibility = View.GONE}In the preceding snippet, we imperatively described how to update the UI in case of an error. We accessed the UI elements step by step and mutatedtheir fields.This is a real example of code that could’ve been written for a native Android application. Even though this approach may be powerful and gives the developer fine-grained control over the flow of the logic, it comes with the possibility of thefollowing problems:The more elements that can change their presentation based on a state change, the more mutations you need to handle. You can easily imagine how this simplesetErrorStatebecomes cumbersome as more fields need to be hidden or changed. The approach also assumes that there are similar methods for handling a progress and success state. Code such as this may easily become hard to manage, especially as the amount of views in your app grows and the state becomesmore complex.Modifying the global state can produce side effects. On every such change, we mutate the same UI element and possibly call other methods that also mutate the same elements. The resulting myriad of nested conditionals can quickly lead to inconsistency and illegal states in the final view that the user sees. Such bugs tend to manifest only when certain conditions are met, which makes them even harder to reproduceand debug.For many years, the imperative approach was the only way to go. Thankfully, native mobile frameworks have since started adopting declarative toolkits. Although these are great, developers who need to switch between paradigms inside of one project can encounter many challenges. Different tools require different skills and in order to be productive, the developer needs to be experienced with both. More attention needs to be paid to make sure that the application that is created with various approaches is consistent. While the new toolkits are in the process of wider adoption, some time and effort are required until they are able to fully implement what their predecessors already have. Thankfully, Flutter embraced declarative fromthe start.Understanding the declarative paradigmIn an imperative approach, the focus is on the “how.” However, in the declarative approach, the focus is on the “what.” The developer describes the desired outcome, and the framework takes care of the implementation details. Since the details are abstracted by the framework, the developer has less control and has to conform to more rules. Yet the benefit of this is the elimination of the problems imposed by the imperative approach, such as excessive code and possible side effects. Let’s take a look at thefollowing example:Widget build(BuildContext context) { final isError = false; final isProgress = true; return Column( children: [ MyContentView( showError: isError, ), Visibility( visible: isProgress, child: Center( child: CircularProgressIndicator(), ), ), ], );}In the preceding code, we have built a UI as a reaction to state changes (such as theisErrororisProgressfields). In the upcoming chapters, you will learn how to elegantly handle the state, but for now, you only need to understandthe concept.This approach can also be called reactive, since the widget tree updates itself as a reaction to a changeof state.Does Flutter use the declarative or imperative paradigm?It is important to understand that Flutter is a complex framework. Conforming to just one programming paradigm wouldn’t be practical, since it would make a lot of things harder (seehttps://docs.flutter.dev/resources/faq#what-programming-paradigm-does-flutters-framework-use). For example, a purely declarative approach with its natural nesting of code would, make describing aContainerorChipwidget unreadable. It would also make it more complicated to manage all oftheir states....If you are coming from an imperative background, getting used to the declarative approach of building the UI may be mind-bending at first. However, shifting your focus from “how” to “what” you’re trying to build will help. Flutter can help you too, as instead of mutating each part of the UI separately, Flutter rebuilds the entire widget tree as a reaction to state changes. Yet the framework still maintains snappy performance, and developers usually don’t need to think aboutit much.Flutter Design Patterns and Best Practices was published in September 2024. Packt library subscribers can continue reading the entire book for free or you can buy the bookhere!Get the eBook for $31.99$21.99🛠️Useful Tools⚒️trench: An open-source, real-time analytics platform using Kafka and ClickHouse for high-volume event tracking with self-hosted and cloud options.pneumaticworkflow: An open-source, cloud-native workflow manager to automate business processes with a visual designer and API integrations.Codehooks Analytics: An open-source web tool for tracking and analyzing user interactions across websites, giving full data control and real-time insights.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 usefulhere.If your company is interested in reaching an audience of developers, software engineers, and tech decision makers, you may want toadvertise with us.*{box-sizing:border-box}body{margin:0;padding:0}a[x-apple-data-detectors]{color:inherit!important;text-decoration:inherit!important}#MessageViewBody a{color:inherit;text-decoration:none}p{line-height:inherit}.desktop_hide,.desktop_hide table{mso-hide:all;display:none;max-height:0;overflow:hidden}.image_block img+div{display:none}sub,sup{font-size:75%;line-height:0}#converted-body .list_block ol,#converted-body .list_block ul,.body [class~=x_list_block] ol,.body [class~=x_list_block] ul,u+.body .list_block ol,u+.body .list_block ul{padding-left:20px} @media (max-width: 100%;display:block}.mobile_hide{min-height:0;max-height:0;max-width: 100%;overflow:hidden;font-size:0}.desktop_hide,.desktop_hide table{display:table!important;max-height:none!important}.reverse{display:table;width: 100%;
Read more
  • 0
  • 0
  • 116

Divya Anne Selvaraj
10 Apr 2025
Save for later

ProgrammingPro #96: Rust 1.86 Trait Upcasting, GitHub Copilot Security Campaigns, Python Shell Commands, and Dangerous C++ Behaviors 

Divya Anne Selvaraj
10 Apr 2025
Bite-sized actionable content, practical tutorials, and resources for programmers#96:Rust 1.86 Trait Upcasting, GitHub Copilot Security Campaigns, Python Shell Commands, and Dangerous C++ BehaviorsUpgrade Your Mind for Half the PriceTwo bestselling tech books. Now 50% off. For a limited time.Get the Paperback for $57.99 $25.33!Get the Paperback for $54.99 $25.33!Hi ,Welcome to a brand new issue of ProgrammingPro.In today’sExpert Insight, we bring you an excerpt from the recently published book, C++ Memory Management, which discuses three major categories of dangerous behavior in C++—ill-formed code with no required diagnostics, undefined behavior that compilers may optimize around unpredictably, and implementation-defined behavior that risks portability.News Highlights: Sonatype flags 18,000 open source malware packages in Q1, most targeting data theft; GitHub rolls out security campaigns with Copilot autofix to reduce security debt; Rust 1.86 adds trait upcasting; and Kotlin, Swift, and Ruby drop from Tiobe’s top 20.My top 5 picks from today’s learning resources:Running External Commands in Python (Shell or Otherwise)🧨The C# Reinforcement Learning Revolution - Breaking Free from Python's Grip🧠Common Go Patterns for Performance🚴‍♂️Shadow Table Strategy for Seamless Service Extractions and Data Migrations🫥Beyond Chatbots: Architecting Domain-Specific Generative AI for Operational Decision-Making🧭But there’s more, so dive right in.Stay Awesome!Divya Anne SelvarajEditor-in-ChiefSign Up|Advertise🗞️News and Analysis🔎Sonatype warns of 18,000 open source malware packages in Q1 2025: Over half of these were designed to exfiltrate sensitive data, signaling a sharp rise in sophisticated software supply chain threats.GitHub introduces security campaigns to help developers reduce security debt: The new feature will help teams by coordinating fixes across repos with prioritized tasks, templates, and Copilot-assisted autofixes.Rust language adds trait upcasting: Rust 1.86 introduces long-awaited trait upcasting, allowing trait objects to be upcast to supertrait objects, alongside new APIs, mutable indexing enhancements, and compiler safety improvements.Kotlin, Swift, and Ruby losing popularity – Tiobe index: The three languages have fallen out of Tiobe’s top 20 programming languages, signaling declining popularity due to platform-specific use and competition from more versatile languages like Python.EngFlow Makes C++ Builds 21x Faster and Software a Lot Safer: EngFlow has launched the public beta of CMake RE and acquired tipi.build to deliver significantly faster and safer C/C++ builds through remote execution, caching, and modern dependency management tools.Django 5.2 release touts automatic model importing: The version also introduces support for composite primary keys and easier BoundField overrides, while ending support for earlier 5.x versions.April 4, 2025: AI updates from the past week: Updates include Claude for Education’s guided learning features, Amazon's new site and SDK for Nova models, and Solo.io’s MCP Gateway for managing AI agent tool sprawl.🎓Tutorials and Learning Resources💡Python🎓Running External Commands in Python (Shell or Otherwise): Explains how to use subprocess.run() in Python to execute system commands safely and efficiently.For more Python resources, go to PythonProC# and .NET💡The C# Reinforcement Learning Revolution - Breaking Free from Python's Grip: Challenges Python’s dominance in reinforcement learning by presenting RLMatrix, a C# framework offering superior debugging, type safety, performance, and production integration for real-world applications.💼How we ended up rewriting NuGet Restore in .NET 9: Delves into Microsoft's rewrite of NuGet Restore to fix major performance bottlenecks caused by a legacy recursive graph resolution algorithm that failed at scale.🎓Migrate C# apps from the in-process model to the isolated worker model: Provides a detailed migration guide for moving C# Azure Functions apps from the in-process model to the isolated worker model before support ends in November 2026.C++ and C💡C++26: variadic friends: Introduces a new feature coming in C++26 through proposal P2893R3, which will enable you to grant friendship to a pack of types in templates, simplifying patterns like the passkey idiom and CRTP.🎓STL Demystified: A Practical Guide to C++ Standard Template Library (STL): An example-rich guide covering STL's core components—containers, iterators, algorithms, and function objects—along with detailed demonstrations.💡Writing C for curl: Covers curl’s coding guidelines and safety practices for writing secure, maintainable C code, including testing, memory management, code style, error handling, and the use of custom helper functions.Java🎓Choosing the Right Implementation Between ArrayList and LinkedList: Analyzes algorithm complexity, read/insert performance, iteration cost, and memory usage to help choose the right implementation.💡JDK 24 Security Enhancements: Compiles the most important security enhancements in the latest Java release including quantum-resistant cryptography with ML-KEM (key encapsulation) and ML-DSA (digital signatures).💡10 Java-based tools and frameworks for generative AI: Covers tools including Spring AI, LangChain4j, Deeplearning4J, and Jllama among others for tasks like LLM orchestration and vector database integration.JavaScript and TypeScript💡On JavaScript's Weirdness: Highlights surprising behaviors with eval, loop scoping, falsy values like document.all , inconsistent string iteration due to Unicode, sparse arrays that break array methods, and more.🎓Learning Clojure as a Javascript developer: Compares JavaScript patterns with Clojure idioms using real examples, especially around building strings, destructuring, and using threading macros (->>).🎓Use the Gemini API with OpenAI fallback in Typescript: Demonstrates how to implement a fallback strategy between Gemini and OpenAI APIs in TypeScript using the OpenAI TS/JS library.Go💡Cutting 70% of Infra Costs with Go: A benchmark between Go, NextJS, Java and GraalVM: Benchmarks REST APIs built with Go (Gin, Chi), Java (Spring Boot, Micronaut, Quarkus), Kotlin, and Node (NestJS), revealing Go (Chi) as the most performant.💡Common Go Patterns for Performance: Outlines 15 performance patterns across memory, concurrency, I/O, and compiler tuning, covering techniques like object pooling, preallocation, zero-copy, worker pools, atomic ops, and more.Rust💡Adaptive Lossless Floating Point (ALP) Rust is faster than C++: A Rust ALP compression implementation achieves 20–50% higher throughput than its C++ counterpart by leveraging Rust’s well-defined float-to-int casting semantics.🎓Pitfalls of Safe Rust: Explores issues like unchecked arithmetic, unsafe type casting, unbounded inputs, path manipulation quirks, improper use of unwrap , and misuse of serialization or default values and more.Swift🗞️Swift 6.1 Released: The version introduces concurrency enhancements, trailing comma support across more syntax, package traits for configurable APIs, and productivity-focused diagnostics.🎓SwiftUI Alert Guide + Code Examples: Explains how to present alerts in SwiftUI using view modifiers, including basic alerts, alerts with custom actions, and data-driven alerts using objects or errors.PHP🎓An opinionated HTML Serializer for PHP 8.4: Introduces a serializer built using PHP 8.4’s new Dom\HTMLDocument class to produce neatly indented, human-readable HTML output.🎓A cookieless, cache-friendly image proxy in Laravel (inspired by Cloudflare): Outlines how to build a cookieless, cache-friendly image proxy in Laravel, mimicking Cloudflare’s image resizing service.SQL🎓Building AI apps? You need sync: Using ElectricSQL, demonstrates how syncing state through a database solves UX and reliability challenges in handling key collaboration needs such as resumability and multi-device support.💡When parameterization fails: SQL injection in Nim's db_postgres module using parameterized queries: Reveals how Nim's db_postgres module can be vulnerable to SQL injection when standard_conforming_strings is disabled, due to flawed manual escaping in its parameterization logic.Ruby🎓Setting up Zed with Ruby LSP: Details steps for setup, diagnostics, and troubleshooting, while addressing feature gaps compared to VS Code.🎓Ruby makes advanced CLI options easy: Explains how Ruby’s built-in OptionParser makes building flexible, user-friendly CLI tools easy—without relying on external gems—by showcasing advanced usage.Kotlin🗞️Introducing Kotlin-bench: Introduces a benchmark designed to evaluate LLMs on 100 real-world Kotlin and Android development tasks using GitHub issue-PR pairs and unit test validation.🗞️Bringing Fuzz Testing to Kotlin with kotlinx.fuzz: Introduces a Kotlin-native fuzz testing framework built on Jazzer, enabling developers to uncover edge cases and hidden bugs by generating randomized input for target functions.🌟Advanced Concepts🚀Shadow Table Strategy for Seamless Service Extractions and Data Migrations: Introduces a zero-downtime data migration method that maintains a synchronized copy of production data using triggers or CDC, enabling seamless database migrations, microservice extractions, and schema refactoring.Beyond Chatbots: Architecting Domain-Specific Generative AI for Operational Decision-Making: Argues that LLMs fall short for real-time, domain-specific business decisions and introduces domain-specific generative models as a better alternative.Architectural Experimentation in Practice: Frequently Asked Questions: Clarifies when to use experiments, how to structure them for actionable outcomes, and how they differ from unstructured exploration.The single-writer Database Architecture: Explains how Bugsink uses a single-writer database architecture built on SQLite’s concurrency model to ensure stable, consistent, and simple event processing.JetBrains Terminal: A New Architecture: Introduces JetBrains’ reworked terminal architecture which restores full shell compatibility by returning to a standards-compliant core (JediTerm) while using the IDE’s editor.🧠Expert Insight📚Here’s an excerpt from “Chapter 2: Things to Be Careful With" in the book, C++ Memory Management, by Patrice Roy, published in March 2025.Different kinds of evilBefore delving into some actual practices that require care, it’s interesting to look at the main categories of risks we could run into if our code does not respect the rules of the language. With each such category comes a form of unpleasantness we should striveto avoid.Ill-formed, no diagnostic requiredSome constructs in C++ are said to beIll-Formed, No Diagnostic Required(IFNDR). Indeed, you will find quite a few occurrences in the standard of“if […], the program is ill-formed, with no diagnostic required.”When something is IFNDR, it means your program is broken. Bad things could happen, but the compiler is not required to tell you about them (indeed, sometimes, the compiler does not have sufficient information to diagnose theproblematic situation).One Definition Rule(ODR) violations, to which we will return in theThe ODRsection later in this chapter, fall under IFNDR. However, there are other such cases, such as having a global object that has different alignment requirements (throughalignas) in different translation units (different source files, essentially), or having a constructor that delegates to itself either directly or indirectly. Here isan example:class X {public: // #0 delegates to #1 which delegates to #0 which... X(float x) : X{ static_cast<int>(x) } { // #0 } X(int n) : X{ n + 0.5f } { // #1 }};int main() {}Note that your compiler might give a diagnostic; it’s just not required to do so. It’s not that compilers are lazy – they might even be unable to provide a diagnostic in some cases! So, be careful not to write code that leads toIFNDR situations.Undefined behaviorWe mentionedUndefined Behavior(UB) inChapter 1. UB is often seen as a source of headaches and pain for C++ programmers but it refers to any behavior for which the C++ standard imposes no requirement. In practice, this means that if you write code that contains UB, you have no idea what’s going to happen at runtime (at least if you’re aiming for somewhat portable code). Canonical examples of UB include dereferencing a null pointer or an uninitialized pointer: do that and you’ll be inserious trouble.To compilers, UB is not supposed to happen (code that respects the rules of the language does not contain UB, after all). For that reason, compilers “optimize around” code that contains UB, to sometimes surprising effect: they might begin removing tests and branches, optimizing loops away, andso on.The effects of UB tend to be local. For instance, in the following example, there is a test that ensures thatpis not null before using*pin one case, but there is at least one access to*pthat is unchecked. This code is broken (the unchecked access to*pis UB), so the compiler is allowed to rewrite it in such a way that all tests to verify thatpis not null are effectively removed. After all, the damage would be done ifpwerenullptr, so the compiler is entitled to assume that the programmer passed a non-null pointer tothe function!int g(int);int f(int *p) { if(p != nullptr) return g(*p); // Ok, we know p is not null return *p; // oops, if p == nullptr this is UB}The whole body off()could legitimately be rewritten by your compiler asreturn g(*p)in this case, with thereturn *pstatement being turned intounreachable code.The potential for UB hides in various places in the language, including signed integer overflow, accessing an array out of bounds, data races, and so on. There are ongoing efforts to reduce the number of potential UB cases (there’s even a study group,SG12, dedicated to this effort), but UB will likely remain part of the language for the foreseeable future, and we need to be awareof it.Implementation-defined behaviorSome parts of the standard fall under the umbrella ofimplementation-defined behavior, or behavior that you can count on with a specific platform. This is behavior that your platform of choice is supposed to document, but that is not guaranteed to be portable toother platforms.Implementation-defined behavior occurs in many situations and includes such things as implementation-defined limits: the maximum number of nested parentheses; the maximum number of case labels in a switch statement; the actual size of an object; the maximum number of recursive calls in aconstexprfunction; the number of bits in a byte; and so on. Other well-known cases of implementation-defined behavior include the number of bytes in anintobject or whether thechartype is a signed or an unsignedintegral type.Implementation-defined behavior is not really a source of evil, but it can be problematic if one strives for portable code but depends on some non-portable assumptions. It is sometimes useful to spell one’s assumptions in code throughstatic_assertwhen the assumption can be validated at compile-time or some similar, potentially runtime mechanisms in order to realize—before it’s too late—that these assumptions are broken for a given target platform.For example:int main() { // our code supposes int is four bytes wide, a non- // portable assumption static_assert(sizeof(int)==4); // only compiles if condition is true...}Unless you are convinced that your code will never need to be ported to another platform, strive to rely as little as possible on implementation-defined behavior, and if you do, make sure that you validate (throughstatic_assert if possible, at runtime if there’s no other choice) and document this situation. It might help you avoid some nasty surprises in the future...C++ Memory Managementwas published in March 2025. Packt library subscribers can continue reading the entire book for free or you can buy the book here!Get the eBook for $33.99$29.99🛠️Useful Tools⚒️MonkeysPaw: A Ruby web framework that generates entire web pages from natural language prompts, using LLMs to interpret and fulfill developer "wishes."markitdown: A Python tool that converts various file types to Markdown for LLMs, preserving structure for accurate analysis and supporting plugins, format-specific dependencies, and LLM integration.mcp-go: A Go library that implements the Model Context Protocol, enabling LLM applications to interact with external tools and data through simple, high-level server and tool definitions.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 usefulhere.If your company is interested in reaching an audience of developers, software engineers, and tech decision makers, you may want toadvertise with us.If you have any suggestions or feedback, or would like us to find you a learning resource on a particular subject, just respond to this email!*{box-sizing:border-box}body{margin:0;padding:0}a[x-apple-data-detectors]{color:inherit!important;text-decoration:inherit!important}#MessageViewBody a{color:inherit;text-decoration:none}p{line-height:inherit}.desktop_hide,.desktop_hide table{mso-hide:all;display:none;max-height:0;overflow:hidden}.image_block img+div{display:none}sub,sup{font-size:75%;line-height:0}#converted-body .list_block ol,#converted-body .list_block ul,.body [class~=x_list_block] ol,.body [class~=x_list_block] ul,u+.body .list_block ol,u+.body .list_block ul{padding-left:20px} @media (max-width: 100%;display:block}.mobile_hide{min-height:0;max-height:0;max-width: 100%;overflow:hidden;font-size:0}.desktop_hide,.desktop_hide table{display:table!important;max-height:none!important}}
Read more
  • 0
  • 0
  • 109

Divya Anne Selvaraj
07 Oct 2024
Save for later

Python Must-Reads from September 2024

Divya Anne Selvaraj
07 Oct 2024
Curated for cybersecurity experts, data scientists, web developers, and NLP enthusiasts.Python Must-Reads from September 2024Hi ,This week, we’ve handpicked five standout Python titles for you, all published in September 2024.Whether you're securing networks with Python automation, cleaning and preparing data for analysis, streamlining workflows with Apache Arrow, building web apps, or diving into the power of natural language processing, these new releases offer the guidance you need.Each of these 5 eBook's and Print books is available -- for a limited time -- at 30% or more off!Bundle up & save more!Buy 2 – save an additional 10%Buy 3 – save an additional 15%Buy 5 – save an additional 20%Print discounts end October 11th.Here’s what’s on offer:Offensive Security Using Python by Rejah Rehim and Manindar MohanA hands-on guide to offensive tactics and threat mitigation using practical strategies>Defend. Attack. Automate.>Dive deep into cybersecurity tactics with Python, exploit vulnerabilities, and code securely.>A go-to guide for staying ahead in digital defence.Get the eBook for $39.99$27.98Get the Print book for $49.99 $34.98Python Natural Language Processing Cookbook - Second Edition byZhenya Antić and Saurabh ChakravartyOver 60 recipes for building powerful NLP solutions using Python and LLM libraries>Unlock NLP’s full power.>Recipes packed with practical insights, from text analysis to working with the latest LLMs like GPT-4 and OpenAI.>Real-world NLP mastery awaits.Get the eBook for $35.99$17.99Get the Print book for $44.99 $30.99Python Data Cleaning and Preparation Best Practices byMaria ZervouA practical guide to organizing and handling data from various sources and formats using Python>Turn raw data into gold.Learn to clean, validate, and prepare both structured and unstructured data.>Transform your pipelines and make your data truly actionable.Get the eBook for $35.99$24.99Get the Print book for $44.99 $30.99In-Memory Analytics with Apache Arrow - Second Edition byMatthew TopolAccelerate data analytics for efficient processing of flat and hierarchical data structures>Boost your analytics.>Discover how Apache Arrow makes data processing lightning-fast.>Perfect for data engineers and analysts seeking seamless integration and peak performance.Get the eBook for $39.99$27.98Get the Print book for $49.99 $34.98Django 5 for the Impatient - Second Edition byDaniel Correa and Greg LimLearn the core concepts of Django to develop Python web applications>Build fast. Launch faster.>Create responsive web apps with Django 5 and deploy them effortlessly.>The fast lane to full-stack web development starts here.Get the eBook for $27.99$18.99Get the Print book for $34.99 $23.99All books are minimum 30% off, and print discounts end in 5 days on October 11th.*{box-sizing:border-box}body{margin:0;padding:0}a[x-apple-data-detectors]{color:inherit!important;text-decoration:inherit!important}#MessageViewBody a{color:inherit;text-decoration:none}p{line-height:inherit}.desktop_hide,.desktop_hide table{mso-hide:all;display:none;max-height:0;overflow:hidden}.image_block img+div{display:none}sub,sup{line-height:0;font-size:75%}#converted-body .list_block ol,#converted-body .list_block ul,.body [class~=x_list_block] ol,.body [class~=x_list_block] ul,u+.body .list_block ol,u+.body .list_block ul{padding-left:20px} @media (max-width: 100%;display:block}.mobile_hide{min-height:0;max-height:0;max-width: 100%;overflow:hidden;font-size:0}.desktop_hide,.desktop_hide table{display:table!important;max-height:none!important}}
Read more
  • 0
  • 0
  • 89
Divya Anne Selvaraj
24 Apr 2025
Save for later

ProgrammingPro #98: System Design Lessons from Google & Netflix, AI CLI Tools, Java 25 LTS, and Faster Rust Builds

Divya Anne Selvaraj
24 Apr 2025
Bite-sized actionable content, practical tutorials, and resources for programmers#98:System Design Lessons from Google & Netflix, AI CLI Tools, Java 25 LTS, and Faster Rust BuildsBuild the Future of Apps on HubSpotNew developer products introduce deeper extensibility, flexible UI options, modern development tools, and more—shaping a more powerful, customisable platform experience.HubSpot’s AI-powered ecosystem is projected to become a $10.2 billion opportunity by 2028. To help developers tap into that growth, we're opening up the platform—introducing expanded APIs, customisable app UIs, and tools built to support a unified data strategy.Learn moreHi ,Welcome to a brand new issue of ProgrammingPro.In today’sExpert Insight, we bring you an excerpt fromour interview with Dhirendra Sinha (Google) and Tejas Chopra (Netflix), engineering leaders and authors of System Design Guide for Software Professionals, where they share lessons on building scalable, resilient systems, best practices from big tech, and career advice for engineers looking to grow in system design.News Highlights: Amazon Q and Claude Code bring AI to the CLI; Angular, React, Vue, and Svelte compared; Java 25 LTS finalises key features and drops 32-bit x86; WebAssembly adds async, multi-threading, and garbage collection.My top 5 picks from today’s learning resources:Choosing The Right Python Task Queue🧵Architecting AI Agents with TypeScript🛠️Cutting Down Rust Compile Times From 30 to 2 Minutes With One Thousand Crates⚡A Full Guide to Planning Your Authorization Model and Architecture🔐Renovate to Innovate: Fundamentals of Transforming Legacy Architecture🏗️But there’s more, so dive right in.Stay Awesome!Divya Anne SelvarajEditor-in-ChiefSponsored:[Rubrik Guided Lab] AWS Cloud Native Protection: Cloud breaches are real and recovery is your responsibility. Camp Rubrik’s AWS track walks you through protecting EC2, RDS, and EBS workloads in a live lab.Save Your SpotSign Up|Advertise🗞️News and Analysis🔎Amazon Q and Claude Code Let AI Control the Developer CLI: Amazon Q Developer CLI gains autonomous AWS command execution, while Anthropic debuts Claude Code for project-wide code editing and debugging from the terminal.Comparing Angular, React, Vue, and Svelte: What you need to know: Evaluates the framworks' popularity, community involvement, learning curve, syntax, scalability, and performance to help you choose the right one for your needs.JDK 25: The new features in Java 25: The LTS release due September 2025, finalises module import declarations, compact source files, instance main methods, stable values, and removes the 32-bit x86 port.4 big changes WebAssembly developers need to know about: Async support, multi-threaded execution, shared memory, and garbage collection are expanding WebAssembly’s capabilities, but full adoption is conditional.Microsoft reveals upcoming changes to Microsoft 365 Developer Program: Updates include a streamlined tenant provisioning flow, optional Copilot licenses, improved tenant owner identification, and the ability to convert developer tenants into paid subscriptions.Gleam 1.10 improves compiler, JavaScript codegen: The version offers improved type tracking, project-wide refactoring tools, exhaustive string analysis, and faster JavaScript code generation, alongside security upgrades..NET Aspire 9.2 Released with Expanded Deployment Options and Dashboard Improvements: The version also introduces a resource graph for visualising application structure and enhances deep linking.🎓Tutorials and Learning Resources💡Python🎓Demystifying Decorators • They Don't Need to be Cryptic: Introduces closures and then progressively develops a general-purpose decorator that logs function arguments.💡Choosing The Right Python Task Queue: Compares Python task queues, focusing on Celery and RQ, outlining their trade-offs in complexity, performance, reliability, and scalability.🗞️Sneak peek: A new ASN.1 API for Python: This API for Python’s PyCA Cryptography, leverages a Rust-based parser to enhance performance, reduce parser inconsistencies, and modernise the interface with dataclass-style definitions.🗞️15,000 lines of verified cryptography now in Python: The verified cryptographic code from HACL* covers all default hash and HMAC algorithms and ensures higher security, better memory safety, and streaming APIs.C# and .NET🗞️Introducing the AI Dev Gallery: Your Gateway to Local AI Development with .NET: The Windows application offers interactive samples (RAG, chat, object detection), easy model downloads, and exportable C# source code for rapid prototyping and learning—all without cloud dependencies.🗞️Introducing .NET Support in Socket: The update provides supply chain security and SBOM accuracy for NuGet and MSBuild-based C# projects and detects package-level threats, risky updates, and more.🗞️Introducing Incrementalist, an Incremental .NET Build Tool for Large Solutions: Petabridge, the creators of Akka.NET have introduced an open source tool that reduces build times by analysing Git changes and project dependencies.C++ and C📄Exploiting Undefined Behavior in C/C++ Programs for Optimization: A Study on the Performance Impact by Lucian Popescu and Nuno P. Lopes: Finds UB exploitation delivers significant performance gains (e.g., +8.4% on SPEC 2017’s mcf), especially for signed overflows and pointer misalignments.💡Streamlined iteration: exploring keys and values in C++20: Compares different methods of iterating over key-value data structures in C++, focusing on C++20’s ranges (views::keys, views::values ) for cleaner, functional-style code.🎓Detecting if an expression is constant in C: Explores six methods to implement a C macro that checks whether an expression is a compile-time constant, using techniques like __builtin_constant_p, static_assert .Java🎥The Future of Write Once, Run Anywhere: From Java to WebAssembly by Patrick Ziegler & Fabio Niephaus: Demonstrates a new WebAssembly backend that compiles Java bytecode into WebAssembly, enabling Java applications, including tools like javac, to run entirely in the browser.🎓Guiding an LLM for Robust Java ByteBuffer Code: Demonstrates how expert developer guidance transforms LLM-generated Java ByteBuffer code into a robust, maintainable component by eliminating side effects.🎓Choosing Your Type: When to Use Enum vs. Object in Java Fields: Explains how to choose between the two using examples to demonstrate design considerations, serialization pitfalls, database mappings, and performance trade-offs.JavaScript and TypeScript🎓This minimalist static site generator pattern is only for JavaScript developers who want something small, fast, flexible, and comprehensible: Explains how to build a minimalist static site generator from scratch using pure JavaScript and no dependencies.🎓Modifying Websites with LLM-Generated Javascript Bookmarks: Demonstrates how to use LLMs to generate JavaScript bookmarklets that modify websites on the fly, using three examples.🎓Architecting AI Agents with TypeScript: Presents a modular architecture for building AI agents that integrate LLMs with external tools, memory systems, and functional programming patterns, with complete code examples.Go🎓Cheating the Reaper in Go: Demonstrates how to build an efficient, garbage-collected arena allocator in Go, leveraging the language's memory model and garbage collector internals to manually manage memory safely.💡Layered Design in Go: A descriptive guide focusing on structuring packages to avoid circular dependencies, outlining how Go’s import rules naturally create a layered system, and offering practical strategies for handling dependencies.Rust💼Cutting Down Rust Compile Times From 30 to 2 Minutes With One Thousand Crates: Explains how Feldera reduced Rust compile times by splitting large, auto-generated Rust codebases, allowing full CPU parallelisation during builds.💡How to Optimize your Rust Program for Slowness: Demonstrates how to write Rust programs that run for extraordinarily long periods, using techniques ranging from nested loops to Turing machines and hyperoperations.Swift🗞️Building Real‑Time iOS Apps with SignalR: Introducing the Official Swift Client (Public Preview): Microsoft's clientsupports core SignalR features like hubs, streaming, automatic reconnection, and integrates smoothly with SwiftUI or UIKit.💼Building a High-Performance SwiftUI App with a C++ Backend: Explores how the Kulve app uses Swift/C++ interop to achieve cross-platform performance and efficient memory management.PHP📖PHP: The Right Way: A living guide offering best practices, coding standards, and authoritative resources to help both new and experienced PHP developers write secure, maintainable code using modern approaches.🎓Quick guide to Laravel package development: A comprehensive tutorial on Laravel package development, detailing the steps to create, structure, configure, and publish reusable Laravel components.SQL💡Abusing DuckDB-WASM by making SQL draw 3D graphics (Sort Of): Describes an experiment where SQL queries are used to build a text-based 3D Doom clone, performing game logic and rendering via recursive CTEs.🎓A Deep Dive Into Ingesting Debezium Events From Kafka With Flink SQL: Compares the Apache Kafka SQL Connector (append-only and changelog modes) and the Upsert Kafka SQL Connector, detailing their best use cases.Ruby💼The One-Person Framework in practice: Recounts how the author built PlanGo, a €1M ARR business, as the sole developer using Ruby on Rails.🗞️Announcing Ruby Gem analytics powered by ClickHouse and Ruby Central: Developers can now query over 180 billion RubyGems download events using SQL, enabling insights into gem adoption trends since 2017.Kotlin🎓Kotlin 101: Type Classes Quickly Explained: Introduces type classes using the Arrow Kt library, demonstrating how they enable generic, reusable data validation logic without modifying data types.💡OpenAI vs. DeepSeek: Which AI Understands Kotlin Better?: Compares AI models on their ability to generate Kotlin code and answer Kotlin-related questions, showing DeepSeek-R1 leads in reasoning while OpenAI models offer faster performance.🧠Expert Insight: Designing Scalable Systems Means Planning for Failure📚An excerpt from an interview with Dhirendra Sinha (Google) and Tejas Chopra (Netflix), engineering leaders and authors of System Design Guide for Software ProfessionalsQ: What inspired you to write System Design Guide for Software Professionals? What key concepts or gaps did you aim to address?Dhirendra:I’ve been in the industry for more than two decades, working across startups and large organisations on complex, large-scale system designs. Around seven or eight years ago, I started teaching system design. There were two reasons for this: first, I wanted to give back to the community; second, moving into management was taking me away from core technology, and teaching helped me stay connected.I always thought I should write a book but never quite found the courage or time. When Packt approached me—actually, one of my mentors recommended my name—I saw it as a great opportunity. However, I insisted on having a co-author. I didn’t want to take on the whole process alone. Tejas was recommended, and we clicked immediately. He’s been a great collaborator.Our primary motivation was to go deeper into system design concepts and also prepare senior candidates for system design interviews. These interviews not only decide whether you get hired but also determine your levelling within a company. That was our intent when writing the book.Tejas:Like Dhirendra, I’ve worked at companies like Box and Netflix, where I’ve seen how software systems can fail in unobvious ways as they scale. Even senior engineers often struggle to bridge the gap in designing scalable systems. That was one of the motivations behind exploring this field further.We noticed that system design is often treated as an afterthought—mainly something you brush up on for interviews. But Dhirendra and I agreed that this shouldn’t be the case. We wanted the book to be more than a set of interview questions and answers. It’s meant to serve as a reference that explains why certain design choices are made, and how to think about architecture beyond the interview—to actual implementation in scalable organisations.We aimed to demystify distributed system principles and avoid the trap of just providing a checklist. Of course, there’s much more we could have written, but we felt this book lays a strong foundation to build upon.Q: What best practices do you apply in big tech to approach scalability and system robustness?Tejas:The first and most important principle is designing for failure. At Netflix, we assume the worst-case scenario—that everything will eventually fail. This mindset led to the creation of Chaos Monkey, which intentionally disrupts services to ensure systems are resilient enough to recover.Some of the key best practices we follow include:Automating routine tasks: This reduces manual effort and human error.Monitoring and observability at scale: We invest heavily in observability to ensure we can trace issues through our complex microservices architecture.Explicitly defining boundaries: It’s critical to be clear about how many users or requests a system can handle. Most failures stem from faulty assumptions about system capacity.Incremental rollouts: At Netflix, when deploying a new algorithm or feature—say, a recommendation engine—we roll it out to a small cohort first. We gather feedback, monitor performance, and only then scale it to larger user groups. This reduces risk and allows for adjustments along the way.These practices ensure that even when something goes wrong, the impact is contained, and recovery is swift.Dhirendra:I completely agree with Tejas. When I first heard about Chaos Monkey, I found it fascinating—this idea of deliberately causing failures to test system resilience.One example from my experience at Yahoo: An engineer once dismissed a corner case, saying it would only happen once in a million. The chief architect responded, “At our scale, that happens every hour.” That really stayed with me. Scale changes everything. Small assumptions that hold in low-scale systems can completely fall apart when you’re dealing with millions or billions of users.Another principle I encourage in my teams is thinking beyond launching features to landing them successfully. Launching is when you complete the code and push it out. Landing is about ensuring the feature operates smoothly in production, is maintainable, and doesn’t create operational burdens. I tell my engineers to focus on adoption, operational challenges, and long-term performance.Automation is crucial here too—not just for deployments, but also for monitoring, alerting, and scaling. We use infrastructure-as-code tools like Terraform and Kubernetes to define the expected state of the system and let the system evolve accordingly. But these automated systems must be well-tested to ensure they work reliably.Q: During system design interviews, what do you look for in candidates? What makes someone stand out?Dhirendra:System design interviews typically become relevant after around three to five years of experience. For fresh graduates, the focus is more on coding and algorithms. But for more experienced candidates, system design becomes crucial—not just for hiring, but also for levelling.In these interviews, I look for structured thinking. System design problems are open-ended and ambiguous—there’s no single correct answer. The way a candidate approaches and structures the problem, the questions they ask, and how they break it down are all important signals.Trade-offs are a key area I assess. It’s easy to choose between a good and a bad option. But at the senior level, you’re often choosing between two good options. I want to understand why a candidate makes a particular choice. What’s their reasoning? How do they evaluate different approaches under real-world constraints?I also like to dig into candidates' past projects—exploring trade-offs they made, how they handled failures, and what lessons they learned. Ultimately, I’m looking for engineers who can make practical, informed decisions in real-world scenarios.Tejas:I completely agree. For me, structured thinking and the ability to handle trade-offs are critical. But I also make interviews conversational. I expect candidates to ask questions and challenge assumptions. For instance, they should ask me how many users we’re designing for, or clarify the must-haves versus nice-to-haves. That’s what happens in real-world system design.I keep the problem intentionally broad to see how candidates scope it down. If they go too broad, they risk staying shallow. If they narrow it down, there’s an opportunity to go deeper into specific trade-offs.One area I like to probe is database selection. I’ll ask if they’d choose SQL or NoSQL and why. Then I might introduce a scenario where the user base grows tenfold—how does that affect their choice? Another area I like to explore is consistency models—strong consistency versus eventual consistency, and how they handle CAP theorem trade-offs.Q: Where do candidates typically struggle, and what advice would you give them?Tejas:One common struggle is jumping straight into diagrams without clarifying the problem. The first five or ten minutes should be about asking questions, defining the functional and non-functional requirements, and scoping the problem. Many candidates skip this and start designing based on assumptions.Another issue is lack of structure. Some candidates jump between different parts of the system without a coherent plan. Others over-engineer certain areas and lose track of the bigger picture. My advice: start with a simple, working solution. Once that’s established, layer in complexity as needed.Dhirendra:I’ve seen similar patterns. Many candidates don’t spend enough time clarifying and scoping the problem. They see something familiar and jump straight into designing everything that comes to mind. But without clear boundaries, they often design something different from what was asked.Time management is another pitfall. Some candidates get so caught up in one area that they run out of time to cover the core pieces. My advice: practise with mock interviews and time yourself. Make sure you pace the conversation and don’t get stuck in the weeds.Another key point is listening to interviewer hints. As interviewers, we want candidates to succeed. If we suggest moving on or exploring a different area, it’s important to pick up on that. Ignoring those cues can limit your opportunity to showcase your thinking.About the Authors:Dhirendra Sinha is a Software Engineering Manager at Google with nearly two decades of experience building scalable distributed systems and leading engineering teams. Alongside roles at Cisco, Oracle, Yahoo, and Google, he has held leadership positions at early and late-stage startups and serves as an angel investor and advisor. For the past seven years, he has taught Distributed System Design and has been mentoring engineers and managers for over a decade. Dhirendra holds a B.Tech from IIT Guwahati and an M.S. from Texas A&M University, College Station.Tejas Chopra is a Senior Engineer at Netflix, working on its Machine Learning Platform for recommendations and personalisation. He is Co-founder of GoEB1, a thought leadership platform for immigrants, and a recipient of the EB1A (Einstein) visa. Recognised as a Tech 40 under 40 awardee, 2x TEDx speaker, and BCS Fellow, Tejas is also an Adjunct Professor at the University of Advancing Technology, Arizona, an angel investor, and startup advisor. His experience spans Box, Apple, Samsung, Cadence, and Datrium, and he holds a Master’s in Electrical and Computer Engineering from Carnegie Mellon University.Their book System Design Guide for Software Professionals was published by Packt in August 2024.Get 15% off both the eBook and Paperback editions exclusively at Packtpub.com with code SYSTEM15. Offer valid until 30th April.Claim 15% Off – Offer Ends 30th April🌟Advanced Concepts🚀Renovate to Innovate: Fundamentals of Transforming Legacy Architecture: Presents strategies for modernising legacy systems through evolutionary architecture, deprecation-driven development, and intentional organisational design.We Have to Move Fast…But Where are We Going Again?: Advocates for adopting a technology radar to guide decision-making in fast-paced development environments to ensure consistent technology choices and prevent fragmentation across teams.A Full Guide to Planning Your Authorization Model and Architecture: Addresses user management, approval workflows, machine identities, auditability, and future-proofing.Building a Unified API: How Federated GraphQL Powers Our Microservice Architecture: Details how Rawkode Academy built a federated GraphQL API using GraphQL Yoga, Pothos, and WunderGraph Cosmo to unify data access across microservices.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 usefulhere.If your company is interested in reaching an audience of developers, software engineers, and tech decision makers, you may want toadvertise with us.If you have any suggestions or feedback, or would like us to find you a learning resource on a particular subject, just respond to this email!*{box-sizing:border-box}body{margin:0;padding:0}a[x-apple-data-detectors]{color:inherit!important;text-decoration:inherit!important}#MessageViewBody a{color:inherit;text-decoration:none}p{line-height:inherit}.desktop_hide,.desktop_hide table{mso-hide:all;display:none;max-height:0;overflow:hidden}.image_block img+div{display:none}sub,sup{font-size:75%;line-height:0}#converted-body .list_block ol,#converted-body .list_block ul,.body [class~=x_list_block] ol,.body [class~=x_list_block] ul,u+.body .list_block ol,u+.body .list_block ul{padding-left:20px} @media (max-width: 100%;display:block}.mobile_hide{min-height:0;max-height:0;max-width: 100%;overflow:hidden;font-size:0}.desktop_hide,.desktop_hide table{display:table!important;max-height:none!important}}
Read more
  • 0
  • 0
  • 73

Divya Anne Selvaraj
22 May 2025
Save for later

Deep Engineering #1: Patrice Roy on Modern Memory Management in C++

Divya Anne Selvaraj
22 May 2025
What RAII, lifetime profiles, and memory-safe languages mean for your codebase#1Patrice Roy on Modern Memory Management in C++What RAII, lifetime profiles, and memory-safe languages mean for your codebaseHi ,Welcome to the very first issue of Deep Engineering.With memory safety behind more than 70% of all known security vulnerabilities (CVEs), the push toward safer programming has become a matter of urgency. Should we rewrite in Rust and Go, or modernize how we write C++?To answer this question, we turned to Patrice Roy—author of C++ Memory Management, long-time member of the ISO C++ Standards Committee, and veteran educator with nearly three decades of experience training systems programmers.You can watch the full interview and read the full transcript here—or keep reading for our distilled take on what modern memory management should look like in practice.Sign Up |AdvertiseRAII and Ownership: Type-Driven Memory Management in Modern C++ with Patrice RoyOne of the most important lessons in modern C++ is clear: "avoid manual memory handling if you can." As Patrice Roy explains, C++’s automatic storage and Resource Acquisition Is Initialization (RAII) mechanisms “work really well” and should be the first tools developers reach for.Modern C++ favors type-driven ownership over raw pointers and new/delete. Smart pointers and standard containers make ownership explicit and self-documenting. For example, std::unique_ptr signals sole ownership in the code itself—eliminating ambiguity about responsibility. As Roy puts it:“You don’t have to ask who will free the memory—it’s that guy. He’s responsible. It’s his job.”Shared ownership is handled by std::shared_ptr, with reference-counted lifetime management. The key idea, Roy stresses, is visibility: ownership should be encoded in the code, not left to comments or convention. This design clarity eliminates entire classes of memory bugs.The same principle applies to Standard Library containers. Types like std::vector manage memory internally—allocation, deallocation, resizing—so developers can focus on program logic, not logistics. RAII and the type system eliminate leaks, double frees, and dangling pointers, and improve exception safety by guaranteeing cleanup during stack unwinding.As C++ veteran Roger Orr quipped:“The most beautiful line of C++ code is the closing brace,”because it signals the automatic cleanup of all resources in scope.The takeaway is simple: default to smart pointers and containers. Use raw memory only when absolutely necessary—and almost never in high-level code.Knowing When to Go Manual (and How to Do It Safely)Manual memory management still has its place in C++, especially in domains where performance, latency, or control over allocation patterns is critical. But as Roy emphasizes, developers should measure before reaching for low-level strategies:“The first thing you should do is measure. Make sure the allocator or memory pool you already have doesn’t already do the job. If you're spending time on something, it has to pay off.”He cites high-frequency trading as an example where even small delays can be unacceptable:“Say you’re working in the finance domain, and you have nanosecond-level constraints because you need to buy and sell very fast—then yes, sometimes you’ll want more control over what’s going on.”In such cases, allocation must be avoided during critical execution windows. One option is to pre-allocate memory buffers on the stack.Modern C++ offers fine-grained control through allocator models. Roy contrasts the traditional type-based model with the polymorphic memory resources (PMR) model introduced in C++17:“Since C++17, we’ve had the PMR (Polymorphic Memory Resource) model... a PMR vector has a member—a pointer to its allocator—instead of having it baked into the type.”While PMR introduces a layer of indirection via virtual function calls, Roy notes that the overhead is usually negligible:“Allocation is a costly operation anyway. So the indirection of a virtual function call isn’t much of a cost—it’s already there in the background.”But when even that cost is too high, the traditional model may be more appropriate:“If you're in a domain where nanoseconds matter, even that indirection might be too much. In that case, the traditional model... may be a better choice, even if you have to write more code.”Roy’s guidance is clear: measure first, optimize only when necessary, and understand the trade-offs each model presents.Trends and Tools for Memory Safety in C++Despite decades of hard-won expertise, C++ developers still face memory safety risks—from dangling references and buffer overruns to subtle use-after-free bugs. The good news: the C++ ecosystem is evolving to tackle these risks more directly, through improved diagnostics, optional safety models, and support from both compilers and hardware.Lifetime Safety, Profiles, and ContractsRoy identifies dangling references as one of the most persistent and subtle sources of undefined behavior in C++:“The main problem we still have is probably what we call dangling references... Lifetime is at the core of object and resource management in C++.”Even modern constructs like string_view can trigger lifetime errors, particularly when developers return references to local variables or temporaries. To address this, the ISO C++ committee has launched several initiatives focused on improving lifetime safety.Roy highlights ongoing work by Herb Sutter and Gašper Ažman (P3656 R1) to introduce lifetime annotations and static analysis to make these bugs less likely:“They’re trying to reduce undefined behavior and make lifetime bugs less likely.”C++23 introduced an optional Lifetime Safety Profile, based on the C++ Core Guidelines, which flags unsafe lifetime usage patterns. This fits into a broader trend toward compiler-enforced profiles—opt-in language subsets proposed by Bjarne Stroustrup that would strengthen guarantees around type safety, bounds checking, and lifetimes.Roy also mentions a proposal of his for C++29, allowing developers to mark ownership transfer explicitly in function signatures—reinforcing ownership visibility and lifetime clarity.Alongside profiles, contracts are expected in C++26. These language features will allow developers to specify preconditions and postconditions directly in code:“Let you mark preconditions and postconditions in your functions... written into the code—not just as prose.”While not limited to memory management, contracts contribute to overall safety by formalizing intent and reducing the likelihood of incorrect usage.Tools for Safer C++Alongside language improvements, developers today have access to a mature suite of static and runtime tools for detecting memory errors.Sanitizers: First-Line DefensesSanitizers have become essential for modern C++ development. Tools like AddressSanitizer (ASan), MemorySanitizer (MSan), and ThreadSanitizer (TSan) instrument the compiled code to detect memory bugs during testing. Roy endorses their use—even if he doesn’t run them constantly:“They’re awesome…I don’t use them much... I think everyone should use them once in a while... They should be part of everyone’s test process.”He encourages developers to experiment and weigh the costs.Compiler Warnings and Static AnalysisRoy also recommends increasing compiler warning levels to catch memory misuse early:“If you're using Visual Studio, try /W4... Maybe not /Wall with GCC, because it's too noisy, or with Clang—but raise the warning levels a bit.”Static analysis tools like the Clang Static Analyzer and Coverity inspect code paths without execution and flag issues such as memory leaks, double frees, and buffer overruns.Hardware Support: MTE and BeyondOn the hardware front, ARM’s Memory Tagging Extension (MTE) offers runtime memory validation through tagged pointers. Available on ARMv9 (e.g. recent Android devices), MTE can catch use-after-free and buffer overflow bugs with minimal runtime impact.Where MTE isn't available, lightweight runtime tools help fill the gap. Google’s GWP-ASan offers probabilistic detection of heap corruption in production, while Facebook’s CheckPointer (in Folly) builds bounds-checking into smart pointer types.Memory-Safe Languages: The New ParadigmNo discussion of memory management today is complete without addressing the elephant in the room: memory-safe languages. Two prominent examples are Rust and Go, which take almost opposite approaches to solve the same problem. “The genius of Go is that it has a garbage collector. The genius of Rust is that it doesn’t need one,” as John Arundel of Bitfield consulting cleverly puts it.Rust: Memory Safety by DesignRust is designed from the ground up to eliminate classes of memory errors common in languages like C and C++. However, Rust’s safety comes with a learning curve, especially for developers accustomed to manually managing lifetimes. Despite this, according to JetBrains' 2025 Developer Ecosystem Survey, Rust has seen significant growth, with over 2.2 million developers using it in the past year and 709,000 considering it their primary language. While Rust's syntax can be initially challenging, many developers find that its multi-paradigm nature and strong safety guarantees make it a robust choice for complex systems development.Researchers have also proposed refinement layers atop C2Rust that automatically reduce the use of unsafe code and improve idiomatic style. One such technique, described in a 2022 IEEE paper, uses TXL-based program transformation rules to refactor translated Rust code—achieving significantly higher safe-code ratios than raw C2Rust output.As one developer quoted by JetBrains put it, Rust is no longer just a safer C++; it's “a general-purpose programming language” powering everything from WebAssembly to command-line tools and backend APIs. And for those coming from legacy C or C++ environments, Rust doesn't demand a full rewrite—interoperability, through FFI and modular integration, allows new Rust code to safely coexist with existing infrastructure.Go: Simplicity Through Runtime SafetyGo adopts a runtime approach to memory safety, deliberately removing the need for developers to manage memory manually. The Go team’s recent cryptography audit—conducted by Trail of Bits and covering core packages like crypto/ecdh, crypto/ecdsa, and crypto/ed25519—underscored this design strength. The auditors found no exploitable memory safety issues in the default packages. Only one low-severity issue was found in the legacy Go+BoringCrypto integration, which required manual memory management via cgo and has since been deprecated. As the Go authors noted, “we naturally rely on the Go language properties to avoid memory management issues.”By sidestepping manual allocation and pointer arithmetic, Go reduces the attack surface for critical bugs like buffer overflows and dangling pointers. While garbage collection does introduce latency trade-offs that make Go less suitable for hard real-time systems, its safety-by-default model and well-tested cryptographic APIs make it ideal for server-side development, cloud infrastructure, and security-sensitive applications where predictable correctness matters more than raw latency.Go’s simplicity also extends to API design. The audit emphasized the team’s emphasis on clarity, safety, and minimalism: prioritizing security over performance, avoiding complex assembly where possible, and keeping code highly readable to support effective review and auditing.The Status of C and C++The rise of memory-safe languages like Rust and Go has put C and C++ under scrutiny—especially in safety-critical domains. The U.S. White House Office of the National Cyber Director now recommends using memory-safe languages for new projects, citing their ability to prevent classes of vulnerabilities inherent in manual memory management.But, replacing C and C++ wholesale is rarely feasible. Most real-world systems will continue to mix languages, gradually modernizing existing C++ code with safer idioms and tooling.Modern C++ is adapting. While the language remains low-level, initiatives like the Core Guidelines, contracts, and lifetime safety proposals are making it easier to write safer code.💡What This Means for YouDefault to RAII and Smart Pointers in C++: Use unique_ptr, shared_ptr, and standard containers to make ownership explicit. Avoid raw new/delete unless absolutely necessary—and never in high-level code.Measure Before You Optimize: Before adopting custom allocators or manual strategies, profile your code. Built-in allocators and containers are often sufficient and safer.Use the Right Allocator Model for the Job: Favor PMR for flexibility. Use the traditional model only if profiling shows the indirection cost matters.Start with Safety-First Defaults: Structure your C++ projects around safe idioms. Apply Core Guidelines, and integrate sanitizers into your CI pipeline to catch memory errors early.Raise Compiler Warnings: Turn on high warning levels (/W4 for MSVC, -Wall -Wextra for Clang/GCC) and treat warnings as errors to surface issues before they reach production.Experiment with Safety Profiles and Contracts: Stay ahead by adopting upcoming C++ features like lifetime annotations and design-by-contract support (C++26 and beyond).Don’t Rely on Comments—Express Ownership in Code: As Roy stresses, ownership must be visible in the code itself. Let types, not prose, determine who frees memory.If you found the insights in our editorial useful, Roy’s book, C++ Memory Management (Packt, March 2025), offers a much deeper exploration, including tips on avoiding common pitfalls and embracing C++17/20/23 features for better memory handling. Here is an excerpt from the book which explains arena-based memory management in C++, using a custom allocator for a game scenario to demonstrate how preallocating and sequentially allocating memory can reduce fragmentation and improve performance.Expert Insight: Arena-based memory managementAn Excerpt from "Chapter 10: Arena-Based Memory Management and Other Optimizations" in the book C++ Memory Management by Patrice Roy (Packt, March 2025)The idea behind arena-based memory management is to allocate a chunk of memory at a known moment in the program and manage it as a “small, personalized heap” based on a strategy that benefits from knowledge of the situation or of the problem domain.There are many variants on this general theme, including the following:In a game, allocate and manage the memory by scene or by level, deallocating it as a single chunk at the end of said scene or level. This can help reduce memory fragmentation in the program.When the conditions in which allocations and deallocations are known to follow a given pattern or have bounded memory requirements, specialize allocation functions to benefit from this information.Express a form of ownership for a group of similar objects in such as way as to destroy them all at a later point in the program instead of doing so one object at a time.The best way to explain how arena-based allocation works is probably to write an example program that uses it and shows both what it does and what benefits this provides. We will write code in such a way as to use the same test code with either the standard library-provided allocation functions or our own specialized implementation, depending on the presence of a macro, and, of course, we will measure the allocation and deallocation code to see whether there is a benefit to our efforts.Read the Complete ExcerptIn this hands-on guide to mastering memory in modern C++, Roy covers techniques to write leaner and safer C++ code, from smart pointers and standard containers to custom allocators and debugging tools. He also dives into examples across real-time systems, games, and more, illustrating how to balance performance with safety.Use code MEMORY20 for 20% off at packtpub.comGet the Book🛠️Tool of the Week⚒️Valgrind 3.25.0 — Classic Memory Debugging, Now with Broader Platform SupportValgrind has long been a staple for memory debugging in C and C++ applications. The latest release, version 3.25.0, brings significant enhancements:Expanded Platform Support: Now includes RISCV64 Linux, ARM/Android, and preliminary support for macOS 10.13.Performance Improvements: Introduces GDB “x” packet support for faster memory reads and zstd-compressed debug sections.Enhanced Tooling: Continues to offer tools like Memcheck for detecting memory leaks and invalid accesses, and Massif for heap profiling.Read the Valgrind User Manual📰 Tech Briefs2025 EuroLLVM - Recipe for Eliminating Entire Classes of Memory Safety Vulnerabilities in C and C++: Apple is addressing memory safety in C-based languages by combining compiler-enforced programming models, developer annotations, and runtime checks to eliminate entire classes of vulnerabilities without requiring a full rewrite in memory-safe languages.Secure by Design Alert: Eliminating Buffer Overflow Vulnerabilities: CISA and the FBI issued a Secure by Design alert urging software manufacturers to eliminate buffer overflow vulnerabilities—designating them as "unforgivable" defects—and recommending memory-safe languages, runtime checks, and secure development practices to prevent exploitation and reduce systemic memory safety risks.Rustls Server-Side Performance: Rustls 0.23.17, an open source TLS library written in Rust that provides a memory-safe alternative to C-based libraries like OpenSSL, has now improved server-side TLS performance by scaling efficiently across cores, reducing handshake latency, and minimizing contention in ticket resumption.Tagged Pointers for Memory Safety: Explains how to implement memory-safe tagged pointers in C++—using runtime-generated tags to detect use-after-free errors—with minimal performance overhead and compatibility with standard allocators.Taking a Look at Database Disk, Memory, and Concurrency Management: Offers a comprehensive, hands-on walkthrough of how modern databases manage disk I/O, memory, transactions, and concurrency—covering buffer pools, write-ahead logging, and locking mechanisms—through a simplified database implementation in Go.That’s all for today. Thank you for reading the first issue of Deep Engineering. We’re just getting started, and your feedback will help shape what comes next.Take a moment to fill out this short survey—as a thank-you, we’ll add one Packt credit to your account, redeemable for any book of your choice.We’ll be back next week with more expert-led content.Stay awesome,Divya Anne SelvarajEditor in Chief, Deep EngineeringTake the Survey, Get a Packt Credit!If your company is interested in reaching an audience of developers, software engineers, and tech decision makers, you may want toadvertise with us.*{box-sizing:border-box}body{margin:0;padding:0}a[x-apple-data-detectors]{color:inherit!important;text-decoration:inherit!important}#MessageViewBody a{color:inherit;text-decoration:none}p{line-height:inherit}.desktop_hide,.desktop_hide table{mso-hide:all;display:none;max-height:0;overflow:hidden}.image_block img+div{display:none}sub,sup{font-size:75%;line-height:0}#converted-body .list_block ol,#converted-body .list_block ul,.body [class~=x_list_block] ol,.body [class~=x_list_block] ul,u+.body .list_block ol,u+.body .list_block ul{padding-left:20px} @media (max-width: 100%;display:block}.mobile_hide{min-height:0;max-height:0;max-width: 100%;overflow:hidden;font-size:0}.desktop_hide,.desktop_hide table{display:table!important;max-height:none!important}}
Read more
  • 0
  • 0
  • 65

Divya Anne Selvaraj
26 Sep 2024
Save for later

ProgrammingPro #75: Python 3.13 JIT & Free Threading, C# Native AOT Performance, and AI Tools for DevOps & Productivity

Divya Anne Selvaraj
26 Sep 2024
Bite-sized actionable content, practical tutorials, and resources for programmers#75What changed in the way you code for 2024? What has happened in the tech world in the last few months?Take this shorter version of the Developer Nation survey, learn about new tools, influence the future of development and share your insights with the world!What’s in it for you?A virtual goody bag packed with cool resourcesThe more questions you answer the more chances you have to win amazing prizes including aSamsung Galaxy Watch 7!Take the Survey now!Hi ,Welcome to this week’s edition of ProgrammingPro!In today’sExpert Insight, we bring you an excerpt from the recently published book, System Design Guide for Software Professionals, which discusses distributed tracing—tracking requests across distributed systems.News Highlights: JavaScript community petitions to cancel Oracle’s trademark; Microsoft unveils Azure AI Inference SDK for .NET; Harness debuts AI assistants for DevOps, QA, and code; YugabyteDB update enhances distributed PostgreSQL performance.My top 5 picks from today’s learning resources:Python 3.13 Preview: Free Threading and a JIT Compiler🐍C# Native AOT performance⚙️this in JavaScript🧩How Canva Scaled Real-Time Collaboration with WebRTC - From WebSockets to Seamless P2P Communication🔄Study Shows AI Coding Assistant Improves Developer Productivity🤖But there’s more, so dive right in.Stay Awesome!Divya Anne SelvarajEditor-in-ChiefPS:With this issue, we have finished covering all resource requests made through the September survey. Keep your eye out for next month's survey.Experience the easiest File API on the internet!Add file uploads and retrieval in minutes so you can focus on building your app— because you’ve got better things to code than infrastructure.Try now!Sign Up|Advertise🗞️News and Analysis🔎JavaScript community challenges Oracle’s JavaScript trademark:With over 10,000 signatures, the community plans to petition the USPTO to cancel the trademark, aiming to protect the language's widespread use from legal issues.Java 23 highlights crypto performance and security: Key changes include increased buffer sizes for crypto operations, additional root certificates, and adjustments for case-sensitive Kerberos principal name lookups.Microsoft Launches Azure AI Inference SDK for .NET:The SDK is designed to simplify access to genAI models from the Azure AI Studio model catalog, which includes models from Azure OpenAI Service, Mistral, Meta, and more.Harness launches new AI assistants for DevOps, QA, and Code Generation offerings: Harness’s new AI solutions include tools for pipeline creation, code completion, testing automation, and productivity insights.Latest YugabyteDB update enables distributed PostgreSQL: Key improvements include an adaptive cost-based optimizer and smart data distribution to optimise performance and support multi-region applications.Eclipse Foundation forms new working group to help open source community comply with global regulations: The group will focus on the European Cyber Resilience Act, develop best practices, and provide resources.Gleam language reaches 1.5 release: Gleam is a statically typed language for the Erlang VM and JavaScript runtimes. The update brings productivity improvements like better compile-time error messages.🎓Tutorials and Learning Resources💡PythonPython 3.13 Preview: Free Threading and a JIT Compiler:Demonstrates the key new features in Python 3.13, including free threading, which makes the GIL optional, and a JIT compiler that compiles Python code into machine code.For more Python resources, go to PythonProC# and .NET🎓Tutorial | Curve Fitting in C# using Particle Swarm Optimization: Covers setup, theory, and implementation details, guiding users on how to fit custom equations to data points.C# Native AOT performance: Compares the performance of .NET Native AOT applications to regular managed .NET code, focusing on startup time, memory usage, and request processing speed.4 Genius .NET Libraries I Love: Covers Refit for streamlined HTTP requests, Coravel for scheduling, queuing, and background jobs, FluentValidation for cleanly defining data validation rules, and Polly for robust resilience.Recent C#, .NET, and Unity Books from PacktBuy 5 eBooks for 30% + 20% off!Discount automatically calculated when you add items to cartGet the eBook for $39.99$27.98Get the eBook for$43.99$29.99Get the eBook for$38.99$26.99 C and C++🎓Tutorial | Logging all C++ destructors, poor mans run-time tracing: Shows you how to trace destructor calls, set up logging, and filter out unnecessary library output.C++ programmer's guide to undefined behavior: part 6 of 11: Discusses undefined behavior in C++ with a focus on broken syntax and standard library pitfalls, covering topics like variadic functions and iostreams quirks.Hardening C Against ROP: Getting CET Shadow Stacks Working: Provides instructions for compiling a C program with shadow stack support and demonstrates how to enable CET in recent Linux distributions.Java🎓Tutorial | Demystifying Java Reflection: A Guide to Dynamic Code Capabilities (Part 1): Covers accessing class info, creating instances dynamically, modifying fields, and invoking methods at runtime.Java JDBC Best Practices for Developers: Outlines 10 essential best practices including using prepared statements for security, closing resources properly, and handling exceptions.🎓Tutorial | Building an Orders Processing Service with ChatGPT (contribute 70–80% efforts) and Finished in 2 Days: Covers defining API endpoints, designing entities like User and Order, and more.JavaScript and TypeScript🎓Tutorial | this in JavaScript: Provides examples to explain the usage and behavior of the this keyword in different contexts such as objects, functions, constructors, and callback functions, with practical demonstrations.Variable Naming Best Practices in JavaScript: Outlines 12 best practices for variable naming in JavaScript to improve code clarity and maintainability. Key guidelines include using let and const instead of var , and proper naming.Try, catch, but don't throw: Discusses how the standard try-catch-throw approach to error handling in TypeScript lacks type safety, leading to challenges in handling recoverable vs. unrecoverable errors.GoDeveloping a go bot embedding ichiban Prolog: Introduces the new PrologTrigger struct to execute Prolog scripts and discusses implementation steps and improvements.Go sync.Cond, the Most Overlooked Sync Mechanism: Covers its usage for goroutine synchronization, demonstrating patterns for Wait(), Signal(), and Broadcast() with examples, benefits, and internal workings.RustHow to Learn Rust in 2024: A Complete Beginner’s Guide to Mastering Rust Programming: Explains how to effectively approach Rust, understand its unique features like memory safety, and access curated learning resources.“Truly Hygienic” Let Statements in Rust: Explores solutions like using IDENT @ _ patterns, dummy functions, and ultimately choosing pragmatic trade-offs for maintainability and simplicity.SwiftMastering Data Binning with Swift Charts: Explores data binning using Swift Charts' NumberBins and DateBins APIs and demonstrates how these tools enable precise data intervals for numerical and temporal data.Insetting Scrollable Views’ Content With contentMargins In SwiftUI: Discusses using the contentMargins view modifier in SwiftUI (iOS 17), which adds spacing around content within scrollable views like ScrollView , and List .PHPHigh frequency metrics in PHP using TCP sockets: Covers practical examples of logging API and database calls, handling TCP socket connections non-blockingly, and provides a PHP class, MetricObserver .SQLSQL-tips-and-tricks:A repository containing a curated list of SQL tips and tricks for improving query readability, avoiding pitfalls, and leveraging advanced features.Ruby“Gilded Rose” refactoring kata in Ruby — as if it is 2024:Discusses a "stories-first" approach to refactor the "Gilded Rose" kata in Ruby, focusing on readable, concise code rather than small, overly abstracted classes.KotlinLoading Initial Data on Android Part 2: Clear All Your Doubts: Addresses common challenges in loading initial data in Android apps, focusing on using the right triggers to avoid side effects.🌟Best Practices and Advice🚀How Canva Scaled Real-Time Collaboration with WebRTC - From WebSockets to Seamless P2P Communication: Discusses how the adoption of WebRTC for direct data transmission enhanced user experience and more.Dirty code still runs, and that’s not a good thing: Discusses the hidden risks of allowing "dirty code" to persist in software production, highlighting that it functions but causes technical debt and long-term issues.How software teams should prepare for the digital twin and AI revolution: Discusses how these technologies can enable real-time monitoring, enhance analytics, and streamline development.Study Shows AI Coding Assistant Improves Developer Productivity: A study shows that GitHub Copilot increased developer productivity by 26%, based on three randomized controlled trials involving over 4,000 developers.🧠Expert Insight📚Here’s an excerpt from “Chapter 8: Design and Implementation of System Components: API, Security, and Metrics” in the book, System Design Guide for Software Professionals by Dhirendra Sinha and Tejas Chopra, published in August 2024.Distributed tracingDistributed tracing extends the concept of tracing to a distributed system. It involves tracking a request as it travels across multiple services and machines. Each step in the request’s journey isrecorded as a span. Each step in the request’s journey is recorded as a span. A collection of spans forms a trace, which represents the entire journey of the request.Distributed tracing providesseveral benefits:Performance optimization: By visualizing the flow of requests, you can identify performance bottlenecks andoptimize themError diagnosis: If a request fails, you can use the trace to identify where the error occurred and whatcaused itSystem understanding: Tracing helps you understand the flow of requests in your system, which can be useful when onboarding new team members or when planningsystem changesOpen-source tools for distributed tracingSeveral open-source tools are available for implementing distributed tracing, each offering distinct featuresand capabilities:Jaeger: Jaeger is a distributed tracing system that was developed by Uber Technologies and subsequently released as open-source software. It is designed to monitor and troubleshoot microservices-based distributed systems, drawing inspiration from Google’s Dapper and OpenZipkin. Jaeger provides a comprehensive set of features, including distributed context propagation, transaction monitoring, root cause analysis, and performance optimization. It supports various storage backends, including Elasticsearch, Cassandra, and Kafka, for scalabletrace storage.Zipkin: Zipkin is another distributed tracing system that focuses on collecting and managing timing data for troubleshooting latency issues in microservice architectures. It provides a simple and intuitive interface for visualizing trace data, enabling developers to quickly identify and address performance bottlenecks. Zipkin supports multiple data storage options, such as in-memory, MySQL, Cassandra, and Elasticsearch, and can be integrated with various programming languagesand frameworks.OpenTelemetry: OpenTelemetry is a unified observability framework that provides APIs, libraries, agents, and collector services for capturing distributed traces and metrics from applications. It aims to standardize the collection and analysis of telemetry data across different platforms and tools. OpenTelemetry supports a wide range of programming languages and integrates seamlessly with popular observability tools such as Prometheus and Jaeger. It offers advanced features such as context propagation, distributed tracing, and metric collection, making it a versatile choice for moderncloud-native applications.System Design Guide for Software Professionalswas published in August 2024. Packt library subscribers can continue reading the entire book for free or you can buy the bookhere!Get the eBook for $33.99$22.99🛠️Useful Tools⚒️Stride Community Toolkit:A collection of extensions and helpers to simplify and enhance game development in the Stride engine using C# and .NET.Panora: An open-source API that streamlines data integration for LLMs, connecting data sources and managing embeddings and chunking efficiently.Viewport Tester: Enables testing websites on 180+ device viewports simultaneously, with multi-device mode, deep-linking, and favorites for tracking.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 usefulhere.If your company is interested in reaching an audience of developers, software engineers, and tech decision makers, you may want toadvertise with us.*{box-sizing:border-box}body{margin:0;padding:0}a[x-apple-data-detectors]{color:inherit!important;text-decoration:inherit!important}#MessageViewBody a{color:inherit;text-decoration:none}p{line-height:inherit}.desktop_hide,.desktop_hide table{mso-hide:all;display:none;max-height:0;overflow:hidden}.image_block img+div{display:none}sub,sup{line-height:0;font-size:75%}#converted-body .list_block ol,#converted-body .list_block ul,.body [class~=x_list_block] ol,.body [class~=x_list_block] ul,u+.body .list_block ol,u+.body .list_block ul{padding-left:20px} @media (max-width: 100%;display:block}.mobile_hide{min-height:0;max-height:0;max-width: 100%;overflow:hidden;font-size:0}.desktop_hide,.desktop_hide table{display:table!important;max-height:none!important}}
Read more
  • 0
  • 0
  • 64
Divya Anne Selvaraj
23 Sep 2024
Save for later

2024 guides for C#, .NET, and Unity developers

Divya Anne Selvaraj
23 Sep 2024
Curated for software architects, game developers, and .NET engineers2024 guides for C#, .NET, and Unity developersHi ,Great programmers never stop learning. Whether you’re perfecting C#, mastering .NET, or building the next big game with Unity, the right resources make all the difference.That's why we’ve curated 16 essential titles—all published in 2024—covering everything from data structures to advanced game mechanics. This collection is designed to help you build faster, scale bigger, and code smarter.For a limited time, you can get these select expert-led resources at 30% off in both Print and eBook formats. And for those looking to save more:Buy 5 eBooksat Extra 20% offBuy 3 eBooks atExtra 15% offBuy 2 eBooks atExtra 10% offPrint discounts end September 29th.Here’s what’s on offer:C# Programming💡SpotlightC# Data Structures and Algorithms - Second Edition by Marcin JamroHarness the power of C# to build a diverse range of efficient applications>Master lists, stacks, queues, dictionaries, sets, and trees, among other data structures>Delve into effective design and implementation techniques to meet your software requirements>Visualize data structures and algorithms through illustrations for a clearer understanding of their analysisGet the eBook for $39.99$27.98Get the Print book for $49.99 $34.98C# Interview Guide by Konstantin SemenenkoBoost your confidence with answers to hundreds of secret interview questions>Acquire a strong foundation in syntax, data types, and object-oriented programming to code confidently>Develop strategies for addressing behavioral questions, tackle technical challenges, and showcase your coding skills>Augment your C# programming skills with valuable insights from industry expertsGet the eBook for$33.99 $22.99Get the Print Book for $41.99$28.99Also SeeFunctional Programming with C#by Alex Yagur: Unlock coding brilliance with the power of functional magic. eBook $38.99 $26.99 | Print $47.99 $32.99.NET DevelopmentSoftware Architecture & Microservices💡SpotlightSoftware Architecture with C# 12 and .NET 8 - Fourth Edition by Gabriel Baptista and Francesco AbbruzzeseBuild enterprise applications using microservices, DevOps, EF Core, and design patterns for Azure>Get introduced to software architecture fundamentals and begin applying them in .NET>Explore the main technologies used by software architects and choose the best ones for your needs>Master new developments in .NET with the help of a practical case study that looks at software architecture for a travel agencyGet the eBook for $39.99$27.98Get the Print book for $49.99 $34.98Pragmatic Microservices with C# and Azure by Christian NagelBuild, deploy, and scale microservices efficiently to meet modern software demands>Benefit from step-by-step project-based guidance on how to develop a full-fledged microservices application>Gain extensive knowledge of microservices by covering essential concepts, tools, and methodologies>Use essential Microsoft Azure cloud-native services and as alternatives for on-premises environmentsGet the eBook for $39.99$27.98Get the Print Book for $49.99 $34.98Also SeeEnterprise Architecture with .NET by Jean-Philippe Gouigoux: Expert-backed advice for information system design, down to .NET and C# implementation. eBook $41.99 $28.99 | Print $51.99 $35.99Web API DevelopmentArchitecting ASP.NET Core Applications - Third Edition by Carl-Hugo Marcotte: An atypical design patterns guide for .NET 8, C# 12, and beyond.eBook $37.99 $25.99 | Print $46.99 $31.99Cross-Platform Development💡Spotlight.NET MAUI Cross-Platform Application Development - Second Edition by Roger YeBuild high-performance apps for Android, iOS, macOS, and Windows using XAML and Blazor with .NET 8>Handle data effectively with expanded coverage on the MVVM model and data binding>Integrate platform-specific code using plugins and custom controls>Migrate from Xamarin.Forms to .NET MAUI for the latest hybrid app development capabilitiesGet the eBook for $32.99 $22.99Get the Print Book for $40.00 $27.99Also See.NET MAUI Projects - Third Edition by Michael Cummings, Daniel Hindrikes, and Johan Karlsson: Build multi-platform desktop and mobile apps from scratch using C# and Visual Studio 2022. eBook $41.99 $28.99 | Print $51.99 $35.99Systems ProgrammingSystems Programming with C# and .NET by Dennis Vroegop: Building robust system solutions with C# 12 and .NET 8. eBook $38.99 $26.99 | Print $47.99 $32.99Unity Game Development💡SpotlightLearning Design Patterns with Unity by Harrison FerroneLearn the secret of popular design patterns while building fun, efficient games in Unity 2023 and C#>Craft engaging Unity 2023 games while mastering design patterns like Singleton, Object Pool, and more>Write clean, reusable C# code using creational, behavioral, and structural patterns, tailored for the game development environment>Go beyond basic design pattern usage and learn to customize and extend them for your unique game design needsGet the eBook for $35.99$24.99Get the Print Book for $41.99 $28.99Hands-On Unity Game Development - Fourth Edition by Nicolas Alejandro Borromeo and Juan Gabriel Gomila SalasUnlock the power of Unity 2023 and build your dream game>Learn the fundamentals of Unity 2023 and create your dream game>Explore the world of augmented reality (AR) to create captivating mobile games>Propel game performance and player experience to new heights with Data-Oriented Technology Stack (DOTS) insightsGet the eBook for $38.99$26.99Get the Print Book for $47.99 $32.99Also SeeMastering Unity Game Development with C# by Mohamed Essam: Harness the full potential of Unity 2022 game development using C#. eBook $33.99 $22.99 | Print $41.99 $28.99Unity 2022 by Example by Scott H. Cameron: A project-based guide to building 2D and 3D games, enhanced for AR, VR, and MR experiences. eBook $39.99 $27.98 | Print $49.99 $34.98Mastering UI Development with Unity - Second Edition by Dr. Ashley Godbold: Develop engaging and immersive user interfaces with Unity. eBook $39.99 $27.98 | Print $49.99 $34.98AI Development💡SpotlightBuilding AI Applications with Microsoft Semantic Kernel by Lucas A. MeyerEasily integrate generative AI capabilities and copilot experiences into your applications>Link your C# and Python applications with the latest AI models from OpenAI>Combine and orchestrate different AI services such as text and image generators>Create your own AI apps with real-world use case examples that show you how to use basic generative AI, create images, process documents, use a vector databaseGet the eBook for $35.99$24.99Get the Print Book for $44.99 $30.99All books are 30% off, and print discounts end 29th September. Discounts are automatic—no codes needed.Start learning today.*{box-sizing:border-box}body{margin:0;padding:0}a[x-apple-data-detectors]{color:inherit!important;text-decoration:inherit!important}#MessageViewBody a{color:inherit;text-decoration:none}p{line-height:inherit}.desktop_hide,.desktop_hide table{mso-hide:all;display:none;max-height:0;overflow:hidden}.image_block img+div{display:none}sub,sup{line-height:0;font-size:75%}#converted-body .list_block ol,#converted-body .list_block ul,.body [class~=x_list_block] ol,.body [class~=x_list_block] ul,u+.body .list_block ol,u+.body .list_block ul{padding-left:20px} @media (max-width: 100%;display:block}.mobile_hide{min-height:0;max-height:0;max-width: 100%;overflow:hidden;font-size:0}.desktop_hide,.desktop_hide table{display:table!important;max-height:none!important}}
Read more
  • 0
  • 0
  • 59

Divya Anne Selvaraj
08 May 2025
Save for later

ProgrammingPro #100: C# 12 Architecture Insights, Python 3.14 Upgrades, Rust Trait Debugger, and Uber on Ray

Divya Anne Selvaraj
08 May 2025
Bite-sized actionable content, practical tutorials, and resources for programmers#100:C# 12 Architecture Insights, Python 3.14 Upgrades, Rust Trait Debugger, and Uber on RayLive Webinar | Scale AppSec with Security Champions – May 15Security Champions programs are a proven way to scale AppSec across dev teams. Join Snyk’s live webinar on May 15 @ 11AM ET✓ Defining the role of security champions✓ Designing a scalable, tailored program✓ Recognizing, rewarding & growing your champions🎓 BONUS: Earn CPE credits for attending!Save your spot now!Hi ,Welcome to a brand new issue of ProgrammingPro.In today’sExpert Insight, we bring you Part 2 of our interview with Francesco AbbruzzeseandGabriel Baptista, authors ofSoftware Architecture with C# 12 and .NET 8, Fourth Edition, where they discuss how software architects can design resilient, adaptable, and secure systems in a cloud-native, data-driven world—while staying aligned with evolving business needs.News Highlights: JetBrains open-sources Mellum, a lightweight LLM for code completion; Amazon Q Developer adds agentic coding to VS Code with real-time collaboration; Python 3.14.0b1 debuts with deferred annotations and template strings; Deno 2.3 brings native compile improvements and local NPM support.My top 5 picks from today’s learning resources:The best new features and fixes in Python 3.14🧪An Interactive Debugger for Rust Trait Errors🕵️‍♂️How to gracefully migrate your JavaScript programs to TypeScript🔁Domain-Driven RAG: Building Accurate Enterprise Knowledge Systems Through Distributed Ownership🧠Uber’s Journey to Ray on Kubernetes🚖But there’s more, so dive right in.Stay Awesome!Divya Anne SelvarajEditor-in-ChiefSign Up |Advertise🗞️News and Analysis🔎Python 3.14.0b1: The first beta of the upcoming 3.14 release, introduces deferred annotation evaluation (PEP 649), template strings (PEP 750), Zstandard compression support (PEP 784), and other major improvements.JetBrains open sources its code completion LLM, Mellum: Mellum is on Hugging Face and is positioned as a lightweight, task-specific “focal model” optimized for code completion across multiple languages.Amazon Q Developer gets new agentic coding experience in Visual Studio Code: Amazon Q Developer now enables real-time, interactive collaboration for tasks like writing code, generating documentation, testing, and reviewing changes.Deno 2.3 adds compile improvements, support for local NPM packages: The version enhances deno compile with support for native libraries and Node plug-ins, speeds up dependency installs, and upgrades to TypeScript 5.8 and V8 13.5.JDK 25: The new features in Java 25: The LTS release due in September, introduces a fifth preview of structured concurrency, finalized flexible constructor bodies, module import declarations, compact source files, stable values, and more.Node.js 24 drops MSVC support: The version has dropped support for Microsoft’s MSVC compiler in favor of ClangCL on Windows, updated the V8 engine to 13.6 with new JavaScript features, and improved async context handling.🎓Tutorials and Learning Resources💡Python🗞️🎥ty: Astral's New Type Checker (Formerly Red-Knot) - Talk Python to Me Ep. 506: Developed as a complement to Astral’s popular tools Ruff and UV, ty aims to offer faster, scalable, and more beginner-friendly type checking. It focuses on performance, better editor integration, and smoother adoption in large codebases. TY will be released as a standalone tool, not a drop-in replacement for MyPy or Pyright.🎓Kate and Python language server: Explains how to configure the python-lsp-server in the Kate editor to work smoothly with Python virtual environments by using a custom bash script (pylsp_in_env) and enabling the ruff plugin for linting.🎓"AI Coffee" Grand Opening This Monday • A Story About Parameters and Arguments in Python Functions: Uses a coffee shop analogy to explain Python function parameters, covering positional and keyword arguments, *args and **kwargs , default values, and more.💡The best new features and fixes in Python 3.14: Walks through each new feature and its developer impact, especially for improving debugging, code clarity, performance, and extensibility.C# and .NET🎓How to use the IServiceProvider interface in ASP.NET Core: Explains how to use the interface to dynamically resolve dependencies at runtime, create scopes for background tasks, and enhance application modularity and more.💡Best Practices for Managing Shared Libraries in .NET Applications at Scale: Covers Central Package Management, Git submodules, and umbrella packages, discussing their trade-offs.💡Why we built our startup in C#: Discusses why Tracebit chose C# to build its B2B SaaS security product, highlighting the language's productivity, modern cross-platform ecosystem, strong tooling, and rich libraries as key advantages.C++ and C💡Hazard Pointers in C++26: Introduces hazard pointers in C++26 as a safe memory reclamation mechanism that enables garbage collection, prevents the ABA problem, and improves concurrency correctness and performance.🎓Using C++ type aliasing to avoid the One Definition Rule (ODR) problem with conditional compilation, part 1: Explains how to use type aliasing with templates and conditional compilation to enable different builds.📄Large Language Models for C Test Case Generation: A Comparative Analysis: Evaluates how LLMs can automate C unit test generation by comparing different models using Pass@1 and Line Coverage metrics.Java💡Fixrleak: Fixing Java Resource Leaks with GenAI: Introduces a tool that automates detection and repair of resource leaks in Java by combining AST analysis and generative AI to produce safe, idiomatic fixes.🗞️🎥Java for AI: Talks about how Java is evolving to support AI/ML workloads through key features like the Foreign Function & Memory API (FFM), Vector API, value classes from Project Valhalla, and code reflection from Project Babylon.JavaScript and TypeScript🎓How to gracefully migrate your JavaScript programs to TypeScript: Explains how to incrementally migrate JavaScript codebases to TypeScript by setting up the TypeScript compiler, using type annotations, and more.💡8 ways to do more with modern JavaScript: Outlines ways to level up in modern JavaScript, covering best practices like using const and let , functional operators, async/await, modern syntax, closures, and graceful error handling.Go🗞️☠️Linux wiper malware hidden in malicious Go modules on GitHub: A destructive supply-chain attack targeted Linux servers via malicious Go modules on GitHub by delivering a disk-wiping payload disguised as developer tools.🎓Graceful Shutdown in Go: Practical Patterns: Covers handling termination signals, timeout management, stopping new requests, completing in-flight requests, and releasing resources safely.Rust💡Understanding Memory Management, Part 5: Fighting with Rust: Explores the challenges of adapting to Rust's strict memory safety model, emphasizing how its ownership and borrowing rules lead to more robust code.🗞️An Interactive Debugger for Rust Trait Errors: Introduces Argus, an interactive GUI-based debugger for Rust trait errors that helps developers explore the compiler’s trait inference tree and understand complex type errors.Swift🎓Testing push notifications on the iOS simulator: Explains how to test push notifications on the iOS Simulator using Xcode tools, JSON or APNS payloads, and third-party tools like RocketSim.🎓SwiftUI View Model Ownership: Explores how to correctly instantiate and manage SwiftUI view model ownership using @State , highlighting common pitfalls with initializers and value updates.PHP🎓PHP Hypertext Processor: Introduces PHP as a server-side scripting language for generating dynamic web content, explaining its origins, core syntax, and evolution to help beginners build interactive websites.SQL💡Which LLM writes the best analytical SQL?: Evaluates the SQL-writing capabilities of 19 LLMs and one human by having them generate SQL queries for 50 analytical questions on a 200-million-row GitHub dataset.Ruby💼Part 1: How We Fell Out of Love with Next.js and Back in Love with Ruby on Rails & Inertia.js: Covers how Hardcover transitioned to Ruby on Rails with Inertia.js to address performance issues, reduce hosting costs, and simplify development.🌟Advanced Concepts🚀Legacy Modernization: Architecting Real-Time Systems around a Mainframe: Describes how National Grid incrementally modernized a legacy mainframe-based system by using Change Data Capture, Domain-Driven Design, Event-Driven Architecture, and Team Topologies.Domain-Driven RAG: Building Accurate Enterprise Knowledge Systems Through Distributed Ownership: Outlines how a banking tech company used DDD to build modular, expert-owned RAG systems that deliver accurate, contextual responses.Uber’s Journey to Ray on Kubernetes: Explains how Uber transitioned its machine learning workloads to Ray on Kubernetes to improve scalability, automate resource management, and optimize hardware utilization.CriticalArchitecture/Software Theory: Explores how postmodern architectural criticism can inspire a more self-aware and reflective approach to software development.🧠Expert Insight: Designing for Change and Scale in Modern Architecture📚Part 2 of our interview with Francesco Abbruzzese and Gabriel Baptista, authors of Software Architecture with C# 12 and .NET 8, Fourth EditionIn Part 1, Francesco Abbruzzese and Gabriel Baptista discussed the evolving role of software architects in the age of AI. In this second excerpt from our conversation, we shift focus to the architectural decisions shaping today’s enterprise applications—from cloud-native resilience to security by design, edge computing, and long-term maintainability.Q: Cloud-native computing is reshaping enterprise systems. What architectural practices should teams adopt to ensure resilience and adaptability?Gabriel:In the near future, I believe most applications will be cloud-native. Some systems might run on the edge, but even those will likely rely on the cloud in some way. That means everyone working in software today needs to think cloud-first.When it comes to resilience and adaptability, we’ve dedicated several chapters in the book to those topics. The development cycle is faster than ever, and new tools and practices emerge constantly. So we need architectures that can keep up.It starts with writing clean, observable code—code that’s tied to retries, performance metrics, and real-time feedback. If you’re building enterprise applications, there’s no room for downtime. The architecture needs to be designed from day one with 24/7 operation in mind.Francesco:In my view, cloud-native really means distributed computing, with added adaptability. The core idea is that your system must remain reliable even when distributed—and that means getting communication right.You need to adopt the right architectural patterns. Use orchestrators like Kubernetes, implement automatic scaling, collect metrics, and adapt your system based on those metrics. Modern microservices follow the theory of reliable communication. Messages can be delayed, but not lost. That’s essential.Microservices often work like an assembly line—processing and transferring data step by step. Any failure in that chain can break the system. So we go into depth in the book on the foundations of distributed computing and microservice design, because they’re central to resilient cloud-native architecture.Q: Considering how sophisticated modern threats have become, how can teams integrate security by design principles throughout the architecture?Francesco:Security by design is not a separate topic—it’s a way of thinking. It has to be part of how you code and architect systems from the very beginning.First and foremost, education is key. Teams need to understand the correct way to do things, rather than trying to invent their own solutions. You also need to choose your team carefully—skills and mindset matter.Code reviews, especially by security experts, are very effective. They help catch vulnerabilities and ensure best practices are actually followed.Another important point is to rely on trusted, well-tested libraries and stacks. Don’t try to build your own authentication system—use the tools that already exist and have been proven to work.Gabriel:I agree completely, and I’ll add a few examples. Architects should be familiar with OWASP guidelines—especially the top 10 vulnerabilities in APIs. These are things every architect should study and apply.In terms of implementation, think DevSecOps. Add static analysis tools to your CI/CD pipeline. They’ll flag security issues early and help the team build more secure code.And as Francesco mentioned, library choice is critical. One of the biggest risks in software security today is using outdated or vulnerable third-party components. So staying up to date isn’t just a maintenance task—it’s a security measure.Q: What strategies should architects use to ensure long-term architectural integrity?Gabriel:Architecture isn’t something you set and forget—it evolves. But if you build with the right principles in place—resilience, observability, security—you’ll know when and how to adapt it.My advice is to start simple. Not every project needs the most complex architecture from day one. Monitor your system continuously and evolve when the data tells you it’s time. Cloud platforms make this much easier than it used to be.A good pipeline also makes a difference. From analysis and code review to testing and release, your workflow should help you understand whether your application is doing what it’s supposed to—and whether it needs to change.Francesco:Yes, and I’d add that using Domain-Driven Design and microservices is key. These patterns make it easier to change just a part of the system without affecting everything else.If your architecture is modular, each microservice can use different internal designs. That flexibility is powerful. It lets you evolve small pieces of your application instead of rewriting it entirely every time something changes.Good monitoring helps, too. If you know how your system behaves in production, you’ll know when it’s time to adjust.Q: How do you see the integration of edge computing and increased data-centricity shaping the future of enterprise architecture?Francesco:The future is definitely in collecting and using peripheral data to make better decisions. That means your application has to work with data coming from different sources, at different levels of detail.But there’s a tension here. On one hand, each microservice should manage its own data—sometimes because of geography, sometimes due to business constraints. On the other hand, we need consolidated data for decision-making.That’s where worker microservices come in. They can aggregate data from different sources and transform it into a useful format for analysis.The key is to structure the data in a way that makes it meaningful and usable. Consolidation is going to be central to future systems—and AI and statistical tools will help us get there.Gabriel:Edge computing is going to affect every industry. Decisions will be made closer to where data is generated, and that data will need to flow back to central systems for deeper analysis.This reinforces the need for distributed systems. You don’t want to send all raw data from the edge—you want to send decisions or key insights. That means architectures need to be designed from the ground up for distribution and selective data flow.Patterns like microservices and DDD are going to be more important than ever.Q: How can architects ensure their designs contribute to real business outcomes—especially in high-impact industries?Francesco:It starts with changing how we think about requirements. Don’t just gather what users ask for—ask what adds value to the business. Every requirement should be evaluated through that lens.DevOps is key. It gives you feedback quickly, so you can measure whether your architecture is delivering the value it’s supposed to. Combine that with modular architecture—like DDD and microservices—and you’ll be able to make precise changes that maximise business value.The goal is to avoid having to rewrite large parts of your system. Instead, make small, well-targeted changes that align with business needs.Gabriel:That’s exactly it. DevOps creates a tight feedback loop. When you have a solid architecture and a good DevOps cycle, you can move faster, deliver better outcomes, and adapt to what the business really needs.With that in place, it becomes much easier to maintain alignment between the technical and the strategic—and that’s what turns a system into a success.To hear the full conversation—including insights on developer mentorship, working across distributed teams, and lessons from real-world enterprise projects—watch the complete video interview in our playlist here.For a deeper dive, check out Francesco and Gabriel’s book, Software Architecture with C# 12 and .NET 8, which offers practical guidance on building resilient, scalable, and secure .NET applications.As a bonus, you can now get 30% off the eBook and 20% off the print edition—no code required. Offer valid until the end of this month.Get the eBook for $39.99$27.98Get the Paperback for $49.99$39.98🛠️Useful Tools⚒️klavis: An open-source platform that provides scalable, production-ready MCP server and client integrations for AI applications across tools like Slack, Discord, GitHub, and more.outpost: An open-source, self-hosted infrastructure by Hookdeck that enables scalable outbound webhooks and event destinations with support for multiple protocols like Webhooks, AWS, GCP, and Kafka.aci: An open-source infrastructure platform that enables AI agents to securely access and use 600+ tools via unified function calls or MCP servers with built-in authentication and granular permissions.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 usefulhere.If your company is interested in reaching an audience of developers, software engineers, and tech decision makers, you may want toadvertise with us.If you have any suggestions or feedback, or would like us to find you a learning resource on a particular subject, just respond to this email!*{box-sizing:border-box}body{margin:0;padding:0}a[x-apple-data-detectors]{color:inherit!important;text-decoration:inherit!important}#MessageViewBody a{color:inherit;text-decoration:none}p{line-height:inherit}.desktop_hide,.desktop_hide table{mso-hide:all;display:none;max-height:0;overflow:hidden}.image_block img+div{display:none}sub,sup{font-size:75%;line-height:0}#converted-body .list_block ol,#converted-body .list_block ul,.body [class~=x_list_block] ol,.body [class~=x_list_block] ul,u+.body .list_block ol,u+.body .list_block ul{padding-left:20px} @media (max-width: 100%;display:block}.mobile_hide{min-height:0;max-height:0;max-width: 100%;overflow:hidden;font-size:0}.desktop_hide,.desktop_hide table{display:table!important;max-height:none!important}}
Read more
  • 0
  • 0
  • 57
Success Subscribed successfully to !
You’ll receive email updates to every time we publish our newsletters.