shredbx logo
shredbx shredbx shredbx shredbx Personal
  • Home
  • Lab
  • Portfolio
  • Experience
  • Services
  • Profile
  • Contact
AClaude
  • Home
  • Lab
  • Portfolio
  • Experience
  • Services
  • Profile
  • Contact
Andrei Solovev
Knowledge
Search knowledge... ⌘K
Knowledge · Anti-Patterns

Smell Mutable Data

Code smell indicating overuse of mutable state that makes reasoning about code difficult

Andrei Solovev

Tags

refactoring-fowlercode-qualitymaintainabilitycode-smell2nd

Impact

Changes to data can often lead to unexpected consequences and tricky bugs. Functional programming is based on the notion that data should never change and updating a data structure should always return a new copy with the change, leaving the old unchanged. Even when not going fully immutable, limiting where data changes occur makes code easier to understand and reduces the opportunities for bugs.

Symptoms

  • Changes to data can often lead to unexpected consequences and tricky bugs. Functional programming is based on the notion that data should never change and updating a data structure should always return a new copy with the change, leaving the old unchanged. Even when not going fully immutable, limiting where data changes occur makes code easier to understand and reduces the opportunities for bugs.

Source

Martin Fowler — Refactoring: Improving the Design of Existing Code, 2nd

shredbx logo shredbx shredbx shredbx shredbx Andrei Solovev

Solution Architect & Lead Software Engineer

ExperiencePortfolioResearch & ExperimentsEducationCertificationSkills
GitHub ↗LinkedIn ↗Email ↗
AVAILABLE FOR NEW PROJECTS
// MY LATEST BEATS
Hobby & Interests

Lab

  • The Lab
  • Framework
  • Components
  • Packages
  • Games
  • Process (SDLC)
  • Knowledge
  • Blog

Andrei

  • Portfolio
  • Experience
  • Services
  • Profile
  • Contact
  • Lifestyle

Team

  • Team
  • Andrei
  • Claude

Legal

  • Privacy
  • Terms
  • Cookies
© 2026 shredbx.com. All rights reserved. — Andrei Solovev |