👨‍💻
Software Engineering
Clean Code: Agile Software Craftsmanship
Clean Code: Agile Software Craftsmanship
  • Clean Code
  • 1: Clean Code
    • There Will Be Code
    • Bad Code
    • The Total Cost of Owning a Mess
    • Schools of Thought
    • We are Authors
    • The Boy Scout Rule
    • Prequel and Principles
    • Conclusion
  • 2: Meaningful Names
  • 3: Functions
  • 4: Comments
  • 5: Formatting
  • 6: Objects and Data Structures
  • 7: Error Handling
  • 8: Boundaries
  • 9: Unit tests
  • 10: Classes
  • 12: Emergence
  • 13: Concurrency
    • Why Concurrency?
    • Challenges
    • Concurrency Defense Principles
    • Know Your Library
    • Know Your Execution Models
    • Beware Dependencies between Synchronized Methods
    • Keep Synchronized Sections Small
    • Writing Correct Shut-Down Code is Hard
    • Testing Threaded Code
    • Conclusion
Powered by GitBook
On this page
  • Why do we write bad code?
  • We've All Done It
  1. 1: Clean Code

Bad Code

PreviousThere Will Be CodeNextThe Total Cost of Owning a Mess

Last updated 9 months ago

Wading: The experience of being significantly impeded by bad code.

Why do we write bad code?

  • Were you trying to go too fast? Were you in a rush?

  • Perhaps you felt that you didn't have time to do a good job; your boss would be angry if you took the time to clean up your code.

  • Perhaps you were tired of working on this program and wanted it to be over.

We've All Done It

  • We've all looked at the mess we've made and chosen to leave it for another day.

  • We've all said we'd go back & clean it up later.

  • LeBlanc's Law: "Later equals never"

Why You Won't Fix It Later
Logo