Tagged articles
Immutable
50 articles · Page 1 of 1
This article explores Google Guava's core utilities for Java developers, demonstrating how Joiner, Splitter, and CharMatcher simplify string handling, how Immutable collections provide true immutability versus JDK's unmodifiable views, and how Multimap, BiMap, and Table solve common collection gaps. It also covers primitive utilities, functional transforms with Functions and Predicate, null-safety via Preconditions and Optional, a self-maintaining local Cache, and ListenableFuture for cleaner async callbacks.
CachingGoogle GuavaImmutable
0 likes · 11 min read

This article explains how deadlocks arise from four necessary conditions, shows how to detect them with jstack, outlines practical ways to prevent deadlock, distinguishes livelock and starvation, and presents three prioritized approaches—immutability, thread confinement, and synchronization—to achieve thread safety in Java.
ConcurrencyImmutableJava
0 likes · 16 min read

The article explains why traditional telescoping constructors and JavaBean setters fail for objects with many optional fields, and demonstrates how the Builder pattern—both the simplified static inner class version and the full GoF version with a Director—provides readable, step‑by‑step assembly, mandatory validation, and immutable results, with guidance on when to apply it.
Builder PatternDesign PatternsImmutable
0 likes · 20 min read

Learn how to tell whether a domain concept is an Entity or a Value Object by asking if its identity matters or only its attributes, see concrete examples with Money, Address and Order, understand immutable design, proper equals/hashCode implementation, and validation through unit tests.
ImmutableJavaValue Object
0 likes · 13 min read

This article explains Java's immutable String class, covering three ways to instantiate strings, methods for length, concatenation (concat and +), character access, substring extraction, splitting, replacing, searching, and comparison using equals versus ==, with concrete code examples and key rules for each operation.
ImmutableJavaString
0 likes · 12 min read

The article explains how to move beyond basic ConfigMap and Secret usage in Kubernetes by covering core principles, immutable configurations, multi‑layer architecture, naming conventions, split strategies, security hardening, GitOps workflows, and concrete code examples for reliable production deployments.
ConfigMapGitOpsHelm
0 likes · 38 min read

The article explains how the Builder pattern in Spring Boot eliminates the telescoping‑constructor and unsafe‑setter problems of complex objects, improves readability, immutability and maintainability, shows hand‑written and Lombok implementations, provides usage examples for DTOs, API responses and queries, and offers best‑practice guidelines.
Builder PatternDesign PatternsImmutable
0 likes · 10 min read

This article reveals how Java records serve as immutable data‑modeling tools, demonstrating compact constructors for validation, embedding business logic, static factory methods, pattern‑matching integration, and response‑object usage, while also outlining their thread‑safety benefits and scenarios where records are unsuitable.
Compact ConstructorDDDImmutable
0 likes · 8 min read

This article enumerates ten classic mistakes when handling Python strings—covering immutability, identity vs equality, truthiness of empty values, misuse of strip and split, Unicode length, performance of concatenation, encoding issues, and trailing backslashes—to help developers write safer, more efficient code.
ImmutablePythonString
0 likes · 7 min read

This article explains why returning multiple values in Java can be cumbersome, introduces Apache Commons Lang3’s Pair and Triple utilities—including mutable and immutable variants—shows how to add the Maven dependency, and provides clear code examples that demonstrate their creation, modification, and safe usage in real‑world scenarios.
Apache Commons Lang3ImmutableJava
0 likes · 14 min read

This article explains what Python dataclasses are, how they simplify data‑oriented class definitions, and demonstrates advanced features like custom field behavior, the __post_init__ method, and immutable (frozen) classes with clear code examples.
Code SimplificationImmutablePython
0 likes · 4 min read

Python’s augmented assignment operators like += look simple, but their behavior varies dramatically between mutable and immutable objects, affecting performance and causing surprising bugs; this article explains the underlying data model, demonstrates with tuples, lists, and mixed structures, and reveals the hidden mechanics behind in‑place and object‑creation operations.
ImmutablePythonaugmented assignment
0 likes · 14 min read

This guide explains Python tuples—immutable ordered collections—covering their definition, creation methods (including packing, unpacking, and single-element tuples), element access, common operations like concatenation, repetition, slicing, membership testing, length retrieval, nesting, and built‑in methods such as count, index, and conversion from lists.
ImmutablePythondata structures
0 likes · 11 min read

Apache Commons Lang3 provides Pair and Triple classes that let Java developers return multiple related values without custom wrappers, offering immutable and mutable variants, easy Maven integration, and clear APIs for handling key‑value pairs and three‑element tuples, improving code readability and maintainability.
Apache Commons LangImmutableJava
0 likes · 15 min read

This article explains what makes a class thread‑safe in Java, illustrates common race‑condition pitfalls with sample code, and presents six practical design strategies—including stateless, immutable, synchronized, volatile, concurrent collections, thread‑confinement, and defensive copying—to help developers build robust, high‑performance concurrent applications.
ConcurrencyDesign PatternsImmutable
0 likes · 11 min read

This article explains the differences between Python lists and tuples, covering their definitions, mutable vs immutable nature, syntax, performance, common pitfalls, and best-use scenarios such as dynamic collections, fixed data, and dictionary keys, with clear code examples.
ImmutableListmutable
0 likes · 9 min read

This article introduces Python tuples, explaining their immutable ordered nature, core characteristics, and provides eleven practical code examples ranging from basic definition and indexing to unpacking, concatenation, using tuples as dictionary keys, and converting them to lists, illustrating common use cases and best practices.
Immutablecodingdata structure
0 likes · 8 min read

This article explains Guava's Multimap feature, covering its core one‑to‑many mapping capabilities, common methods, various implementations (ArrayListMultimap, HashMultimap, LinkedHashMultimap, TreeMultimap, immutable and synchronized versions), and provides concrete Java code examples and a social‑network scenario to help developers choose the right implementation.
Google GuavaImmutableJava
0 likes · 13 min read

This article explains the Java BigDecimal class, detailing its internal storage mechanisms, precision handling, immutable design, and common pitfalls, and provides best‑practice guidelines for constructing, comparing, dividing, and converting BigDecimal values to ensure accurate numerical computations.
Best PracticesImmutableJava
0 likes · 10 min read

This article provides a step‑by‑step guide to Java concurrency, covering core concepts such as threads, runnables, thread lifecycle, synchronization primitives, wait/notify patterns, volatile variables, ThreadLocal storage, and how to design immutable objects for thread‑safety, all illustrated with concrete code examples and detailed explanations.
ConcurrencyImmutableJava
0 likes · 17 min read

This article details the design, three major benefits, optimization steps, and extensive benchmark results of the limu immutable data library, demonstrating how meta handling, prototype manipulation, and Map‑based storage dramatically improve performance compared to other libraries such as immer, mutative, and structura.
ImmutableJavaScriptbenchmark
0 likes · 15 min read

The article explains how the Value Object pattern, combined with PHP 8.1/8.2 features like readonly properties and named arguments, can eliminate primitive‑type validation duplication, prevent parameter‑order mistakes, and ensure immutability, thereby making PHP code more robust, maintainable, and self‑documenting.
Design PatternImmutablePHP
0 likes · 12 min read

This article explains the memory‑management differences between mutable and immutable Python objects, demonstrates how each type behaves with code examples, and shows how immutability improves thread safety while providing practical synchronization techniques for mutable data in concurrent programs.
ConcurrencyImmutablePython
0 likes · 9 min read

This article outlines seven essential practices for creating immutable Java classes, including declaring the class as final, using private final fields, omitting setters, performing deep copies, overriding equals() and hashCode(), avoiding this‑escape in constructors, and protecting against reflective modification.
Best PracticesImmutableJava
0 likes · 2 min read

This article explains Java thread‑safety concepts, classifies five safety levels from immutable to thread‑hostile, and details synchronization techniques—including mutual exclusion, non‑blocking CAS, and no‑sync approaches like reentrant code and thread‑local storage—to help developers write safe concurrent code.
ConcurrencyImmutableSynchronization
0 likes · 10 min read

This article introduces Google Guava's powerful utilities—including Joiner, Splitter, CharMatcher, primitive type extensions, Multiset, Immutable collections, Multimap, BiMap, Table, functional Functions, Predicate, null‑checking, local caching, and asynchronous callbacks—demonstrating how they simplify Java development and improve code readability and safety.
ImmutableMultimapfunctional-programming
0 likes · 10 min read


政采云技术Jun 22, 2021 · Frontend Development
This article explains what immutable data structures are, outlines their advantages such as reduced complexity, memory savings, easy state rollback, and functional programming benefits, and demonstrates practical usage of Immutable.js in React components and Redux integration with code examples and best‑practice tips.
ImmutableReactRedux
0 likes · 14 min read

This article explains Python’s core principle that everything is an object, detailing the distinction between type objects, instance objects, and metaclasses, how built‑in types like int and str fit into the hierarchy, the role of the object base class, variable naming as pointers, and the differences between mutable, immutable, fixed‑length and variable‑length objects.
ImmutablePythonmemory management
0 likes · 23 min read

This article introduces the core features of Google Guava—including Joiner, Splitter, CharMatcher, primitive type helpers, Multiset, immutable collections, Multimap, BiMap, Table, functional utilities like Functions and Predicates, Optional, Preconditions, and a powerful local Cache—showcasing how they simplify Java development and improve code readability, safety, and performance.
CacheGuavaImmutable
0 likes · 9 min read

This article explores Python’s core concept that everything is an object, explaining how variables reference objects, the role of the id() and type() functions, and the differences between mutable and immutable objects with practical code examples.
ImmutableObjectsPython
0 likes · 8 min read


JavaEdgeJun 25, 2020 · Backend Development
This article explains how Java's Optional class provides a lightweight proxy for null values, preventing NullPointerExceptions, and demonstrates best‑practice patterns for immutable objects, field validation, and clean API design with concrete code examples.
ImmutableNullPointerExceptionOptional
0 likes · 6 min read

This article explains the Stage‑1 JavaScript Record & Tuple proposal, showing how the new immutable value types are created with a leading #, how they differ from objects by using value‑based comparison, and why they improve deep equality, sharing, non‑destructive updates, and usage in Maps and Sets.
ECMAScriptImmutablerecord
0 likes · 10 min read

This guide explains the Linux chattr command, showing how to add immutable or append‑only attributes to files and directories, verify the settings, and later remove the protection, with practical examples and command syntax.
File protectionImmutableappend-only
0 likes · 6 min read

This article explains why Java's Arrays.asList and List.subList can produce unexpected behavior, how mutable and immutable List implementations interact with their backing arrays, and provides safe alternatives and best practices to prevent ConcurrentModificationException and hidden memory leaks.
ImmutableJavaList
0 likes · 10 min read

This article explains Python tuples, contrasting them with lists, covering their immutable nature, how they enable functions to return multiple values, performance advantages, creation syntax, updating via slicing, deletion, and membership operations, all illustrated with clear code examples.
Immutablecodingtuple
0 likes · 6 min read

This article explains Python tuples as immutable ordered collections, covering their creation, indexing (including negative indices), slicing with optional stride, concatenation and replication operators, and useful built‑in functions such as len, max, and min, while contrasting tuples with lists.
ImmutablePythonSlicing
0 likes · 8 min read

This article explains Groovy's immutable Tuple classes, shows how to create and use Tuple, Tuple2, Tuple3, and demonstrates their read‑only behavior with practical code examples, highlighting why they are ideal for returning multiple values from methods.
BackendGroovyImmutable
0 likes · 4 min read

This article lists the ten most common errors Java developers make, explains why each is problematic, and provides clear code examples and best‑practice alternatives to help you write safer, more efficient Java code.
HashMapImmutableJava
0 likes · 11 min read

At a GitHub China meetup, the author reflects on Rich Harris’s critique of React, compares mutable versus immutable reactivity in Vue and React, examines functional programming foundations, and proposes a unified approach integrating mutable, immutable, and reactive patterns to transcend framework paradigm disputes.
ImmutableReactReactivity
0 likes · 9 min read

This article explains why using Java's Arrays.asList with primitive arrays can produce unexpected list sizes, why the resulting list is immutable, and provides correct usage patterns with code examples to avoid UnsupportedOperationException and other bugs.
Arrays.asListImmutableJava
0 likes · 6 min read

This article explains Python's object model, the difference between mutable and immutable objects, how references work, and provides clear examples of shallow and deep copying—including when each method should be used to avoid unintended data modification.
Deep CopyImmutablePython
0 likes · 11 min read

This article introduces Scala's collection library, explaining the distinction between mutable and immutable collections and detailing common types such as List, Set, Map, Tuple, Option, and Iterator, accompanied by example code for each.
ImmutableListOption
0 likes · 3 min read

This tutorial explains how Scala treats strings as immutable Java objects, shows how to create and modify strings using literals, explicit types, and StringBuilder, demonstrates length retrieval, concatenation, formatted output, and provides a comprehensive list of java.lang.String methods usable in Scala.
ImmutableScalaString
0 likes · 14 min read

This article introduces Python 3 tuples as immutable ordered collections, explains how to create, index, slice, concatenate, and replicate them, and demonstrates built‑in functions such as len, max, and min while comparing tuples with lists and showing conversion techniques.
ImmutablePythonSlicing
0 likes · 9 min read

This article explains Python's frozenset type, detailing its immutable nature, creation syntax, differences from mutable sets, supported operations, membership testing, and practical code examples illustrating set algebra and method usage.
ImmutablePythoncollections
0 likes · 9 min read

This article explains Python's id() function, how objects and references work, and demonstrates parameter passing behavior with detailed code examples illustrating memory address handling for immutable and mutable types, including lists, integers, and strings, and clarifies why variable assignments may share the same address.
ImmutableObjectsid()
0 likes · 8 min read

This article explains Python's variable storage model and demonstrates how assignment, shallow copy, and deep copy affect object references and memory addresses for immutable and mutable types, using string and list examples to illustrate the differences.
Deep CopyImmutableMemory
0 likes · 4 min read

This article explains Java's String class, covering its automatic import, how to create string objects without the new keyword, concatenation, immutability, common methods like replace, and provides useful API references and code examples for practical use.
APIImmutableJava
0 likes · 6 min read

This article explains the difference between immutable and mutable objects in Python, using clear examples to show why modifying a list parameter inside a function changes the original variable while altering a number does not, helping beginners master function arguments and avoid common interview pitfalls.
ImmutableInterviewList
0 likes · 3 min read

This article describes how the YIcon project tackled severe React performance bottlenecks—such as repeated renders, slow diffing, and inefficient key usage—by applying shouldComponentUpdate, component splitting, immutable data structures, stable keys, and production‑grade webpack optimizations, ultimately achieving an 80% speed gain.
ImmutableOptimizationReact
0 likes · 9 min read
