#shallow-vs-deep-copy

[ follow ]
Java
fromInfoWorld
1 week ago

Basic and advanced Java serialization

Order in custom serialization must match exactly to avoid data corruption or deserialization failure.
#python
Python
fromInfoWorld
1 week ago

Speed boost your Python programs with new lazy imports

Lazy imports in Python create a proxy object that delays the actual import until the module is needed.
Scala
fromMedium
1 week ago

Breaking Scala's Nil with Java Reflection

Java reflection in Spring Data MongoDB caused a bug in Scala's Nil singleton, revealing a mismatch between Scala's guarantees and JVM behavior.
JavaScript
fromMedium
1 week ago

Metaprogramming: teaching the compiler to explain your data.

Contextual information enhances debugging by providing field names, types, and nested structures.
Java
fromInfoWorld
2 weeks ago

Java future calls for boosts with records, primitives, classes

Java is advancing record creation, primitive boxing, and pattern matching through multiple JEPs to improve code conciseness and type handling capabilities.
Artificial intelligence
fromZDNET
3 weeks ago

AI is getting scary good at finding hidden software bugs - even in decades-old code

AI models can effectively identify decades-old bugs in legacy code, but this capability also enables hackers to exploit vulnerabilities in deployed systems.
fromInfoQ
4 weeks ago

Read-Copy-Update (RCU): The Secret to Lock-Free Performance

With pthread's rwlock (reader-writer lock) implementation, I got 23.4 million reads in five seconds. With read-copy-update (RCU), I had 49.2 million reads, a one hundred ten percent improvement with zero changes to the workload.
Software development
fromInfoWorld
1 month ago

What I learned using Claude Sonnet to migrate Python to Rust

If there's one universal experience with AI-powered code development tools, it's how they feel like magic until they don't. One moment, you're watching an AI agent slurp up your codebase and deliver a remarkably sharp analysis of its architecture and design choices. And the next, it's spamming the console with "CoreCoreCoreCore" until the scroll-back buffer fills up and you've run out of tokens.
Software development
Python
fromRealpython
1 month ago

Duck Typing in Python: Writing Flexible and Decoupled Code Quiz - Real Python

An interactive quiz assesses understanding of duck typing in Python, covering its definition, advantages, disadvantages, behavior-based interfaces, protocols, special methods, and alternative approaches.
fromAlex MacArthur
2 months ago

I used a generator to build a replenishable queue.

Ever since writing about them, the generator in JavaScript has become my favorite hammer. I'll wield it nearly any chance I can get it. Usually, that looks like rolling through a finite batch of items over time. For example, doing something with a bunch of leap years: ...or lazily processing some files: In both examples, the pool of items is exhausted once and never replenished. The for loop stops, and the final item returned by the iterator contains done: true. C'est fini.
JavaScript
Scala
fromMedium
3 months ago

Why Metaprogramming Usually Makes Things Worse

Metaprogramming tools like macros and templates are rarely necessary and often harmful, increasing compilation costs, complexity, and slowing development feedback loops.
fromArtem Golubin
2 months ago

Recent optimizations in Python's Reference Counting

Reference counting is the primary memory management technique used in CPython. In short, every Python object (the actual value behind a variable) has a reference counter field that tracks how many references point to it. When an object's reference count drops to zero, the memory occupied by that object is immediately deallocated.
Software development
Java
fromMedium
2 months ago

Java Is Slow-Until You Use It Like This

Deep JVM knowledge and disciplined practices—clear module boundaries, immutable domain models, simple services, careful stream use, and higher-level concurrency—enable scalable, maintainable Java systems.
fromMedium
3 months ago

Type Classes: How Scala Achieves Polymorphism Without Inheritance

Imagine you're working with a third-party library that provides a User class. You need to add JSON serialization to it, but you can't modify the source code. Of course you can create a wrapper class or extend it, but that feels clunky and breaks existing code that expects the original type. This is where type classes shine. They're one of Scala's most powerful patterns, and they're the secret ingredient in popular libraries like Cats, Scalaz, and Circe.
Scala
Python
fromInfoWorld
2 months ago

CPython vs. PyPy: Which Python runtime has the better JIT?

PyPy remains far faster for raw numerical workloads, but CPython's new native JIT and no-GIL builds close the gap in other workloads and enable threading.
fromMedium
1 month ago

Algorithms Are Just Real Life, Formalized

Which Algorithm Is This? If you step back, this maps almost perfectly to the Top K Frequent Elements problem.We usually solve it for integers in a list. Here, the "elements" are audience profiles age and body-type combinations. First, define what an audience profile looks like: case class Profile(age: Int, height: Int, weight: Int) What we want is a function like this:
Scala
Python
fromThepythoncodingstack
2 months ago

Planning Meals, Weekly Shop, Alternative Constructors Using Class Methods

Use alternative constructors via class methods to build Meal and WeeklyMealPlanner objects and protect internal state with read-only properties and shallow copies.
Software development
fromInfoWorld
1 month ago

Go 1.26 unleashes performance-boosting Green Tea GC

Go 1.26 introduces self-referential generic parameters, expression operands for new, go fix modernizers, reduced cgo overhead, and multiple runtime and performance improvements.
fromNedbatchelder
2 months ago

Testing: exceptions and caches

Kacper Borucki blogged about parameterizing exception testing, and linked to pytest docs and a StackOverflow answer with similar approaches. The common way to test exceptions is to use pytest.raises as a context manager, and have separate tests for the cases that succeed and those that fail. Instead, this approach lets you unify them. I tweaked it to this, which I think reads nicely: One parameterized test that covers both good and bad outcomes. Nice.
Software development
fromTheregister
2 months ago

Dev used Claude to build TrapC, memory-safe extension of C

TrapC, a memory-safe C variant with interpreter itrapc and compiler trapc, is nearly ready for testing; code complete and debugging targets a Q1 2026 release.
Python
fromRealpython
2 months ago

Intro to Object-Oriented Programming (OOP) in Python - Real Python

Object-oriented programming fundamentals in Python: defining classes, instantiating objects, and basic inheritance to write maintainable, less redundant code.
Software development
fromMedium
1 month ago

I Can't Believe Rust Is Replacing Java

The X recommendation system was fully rewritten and open-sourced using only Rust and Python, replacing previous Java and Scala implementations.
Python
fromTalkpython
2 months ago

diskcache: Your secret Python perf weapon

DiskCache provides a SQLite-backed, dictionary-like persistent cache that speeds Python applications, supports cross-process use, and avoids running separate services like Redis.
Software development
fromInfoWorld
2 months ago

AI-built Rue language pairs Rust memory safety with ease of use

Rue is a Rust-based language aiming to provide memory safety without garbage collection, easier than Rust and Zig, leveraging Claude AI to accelerate development.
Software development
fromInfoWorld
2 months ago

8 reasons developers love Go-and 8 reasons they don't

Go is a simple, C-like programming language created at Google to simplify building concurrent, networked, large-scale software with safety, performance, and easy learning.
Software development
fromMedium
2 months ago

Immutability by Default: The Foundation of Reliable Systems

Immutability preserves historical facts in distributed systems, preventing truth drift and ensuring predictable downstream behavior despite changing rules and deployments.
Python
fromPythonmorsels
2 months ago

All iteration is the same in Python

All Python iteration forms use the same iterator protocol; iterating over an object yields its defined iteration items (e.g., dictionary yields keys, string yields characters).
fromMedium
2 months ago

Functional Programming Isn't Just for Academics: Why It Matters for the Systems We Build Now

In 1983 I asked my parents for an Atari for Christmas, instead I got a Commodore 64... Needless to say, I was very disappointed until I discovered how much cooler Wizard of Wor was than Combat. To their credit, my parents thought a computer was a better investment than a video game. I used that C64 through my sophomore year of college until I replaced it with a 486; my first real investment.
Software development
[ Load more ]