Seiteneffekte

interessieren halt doch?

Und weil ich mich mal wieder ueber Kollegen aufgeregt habe, die jede Methode fuenf Felder umschreiben lassen und deren State aussieht wie nach einer Explosion in der Variablenfabrik - hier eine kleine Handreichung fuer das naechste Code Review.

Manche nennen es Legacy Code. Ich nenne es Seiteneffekt-Orientiertes Programmieren.

Eine Linksammlung zum Thema Immutability - als argumentative Munition oder stille Lektuereempfehlung.

Books

  1. “Clean Code: A Handbook of Agile Software Craftsmanship” by Robert C. Martin

    • This book emphasizes writing clean, readable, and maintainable code. It discusses the importance of avoiding side effects and managing state effectively.
    • Clean Code on Amazon
  2. “Effective Java” by Joshua Bloch

    • This book includes numerous best practices for Java programming. It highlights the importance of immutability and the benefits of returning new objects rather than modifying existing ones.
    • Effective Java on Amazon
  3. “Refactoring: Improving the Design of Existing Code” by Martin Fowler

    • This classic text provides strategies for refactoring code to improve its structure and readability, including techniques for reducing side effects and improving immutability.
    • Refactoring on Amazon
  4. “Functional Programming in Java: How functional techniques improve your Java programs” by Venkat Subramaniam

Blog Articles and Online Resources

  1. “The Value of Immutability” by Eric Elliott

    • Medium Article
    • This article explains the importance of immutability in software development, particularly in the context of JavaScript, but the principles apply broadly.
  2. “Why Immutability Matters” by John Sonmez

    • Simple Programmer Blog
    • This blog post discusses the benefits of immutability and how it can lead to more predictable and maintainable code.
  3. “Avoiding Null and Immutability in Java” by Martin Odersky

    • Scala Blog
    • Although focused on Scala, this blog post by the creator of Scala discusses general principles of immutability that are relevant to Java developers.
  4. “Java: The Benefits of Immutability” by Richard Warburton

    • Java Magazine
    • This article from Java Magazine highlights the advantages of immutability in Java programming, including simpler code and fewer bugs.
  5. “Why Functional Programming Matters” by John Hughes

    • Research Paper
    • This seminal paper explores the benefits of functional programming, including the use of immutable data structures and avoiding side effects.

These resources provide a comprehensive overview of why avoiding side effects and embracing immutability are critical practices in software development. They offer both theoretical foundations and practical advice for improving code quality.