Explore the World's Best Ideas
Join today and uncover 100+ curated journeys from 50+ topics. Unlock access to our mobile app with extensive features.
The main objective when writing code is for it to be easily understood by humans. Remember, your fellow developers will interact with your code much more than machines will.
243
1.57K reads
Choosing informative and meaningful names for variables, functions, classes, and other identifiers helps your code speak for itself, reducing the need for comments.
228
1.08K reads
Each function you write should have a singular, well-defined responsibility. Keeping functions small and focused makes your code more maintainable and less prone to bugs.
229
972 reads
In well-written code, comments should be the exception, not the rule. If your code is self-explanatory, there's no need to add extra commentary.
225
878 reads
The way you format your code, including indentation and the use of whitespace, can greatly influence its readability. Consistency is key.
220
761 reads
Functions should avoid modifying the state of their inputs. Instead, return the results. This practice leads to clearer and more predictable code.
226
801 reads
Don't ignore errors. They should be handled and communicated effectively, preferably through exceptions, making your code more robust and maintainable.
219
657 reads
Knowing where to draw lines between software systems and how to manage those interfaces effectively can make a big difference in the complexity and maintainability of your code.
221
621 reads
Unit testing is essential for maintaining code health. Tests should be clean, well-written, and just as maintained as your production code.
219
523 reads
Classes should be as small as possible, with a single responsibility. This practice increases code clarity, reusability, and maintainability.
218
541 reads
Keeping system architecture clean and comprehensible is crucial. It's just as important that high-level structures are as understandable as low-level code.
218
509 reads
Good architecture often emerges from following simple practices: passing all tests, eliminating duplication, ensuring expressiveness, and minimizing the number of classes and methods.
217
488 reads
Concurrency brings its own set of challenges. Writing concurrent code requires explicit strategizing and testing to ensure correct functioning.
217
479 reads
Your code should undergo continual revision and improvement. By constantly refining it, you can maintain simplicity and flexibility in your software.
219
437 reads
Understanding your testing framework, like Junit, can make your unit tests cleaner and more efficient. Mastering your tools equates to more efficient and reliable code.
219
395 reads
The "Don't Repeat Yourself" (DRY) principle states that each piece of knowledge should have a single, unambiguous representation within the system. Duplicated code can lead to inconsistencies and bugs.
218
402 reads
Working with legacy code can be challenging but understanding and improving its structure can greatly aid in maintainability and extensibility.
219
397 reads
Employ tools like static code analyzers and linters to enforce coding standards and conventions. They can help you maintain high-quality code.
218
358 reads
Professionalism in software development means taking responsibility for delivering clean, functioning code. Take pride in your work and strive for excellence.
216
342 reads
Certain patterns, known as 'code smells,' can indicate potential problems in your design. Understanding these patterns helps you avoid problems before they arise.
217
438 reads
IDEAS CURATED BY
As an engineer with an official degree in software engineering, I am primarily interested in science and technology. I enjoy reading literature of many genres, and I especially like those from human behavior, sociology, history, and, should I say, science
Curious about different takes? Check out our Clean Code Summary book page to explore multiple unique summaries written by Deepstash users.
Different Perspectives Curated by Others from Clean Code
Curious about different takes? Check out our book page to explore multiple unique summaries written by Deepstash curators:
1 idea
Hossein Saniei's Key Ideas from Clean Code
Robert C. Martin
1 idea
maaoui nada's Key Ideas from Clean Code
Robert C. Martin
2 ideas
hei you's Key Ideas from Clean Code
Robert C. Martin
Discover Key Ideas from Books on Similar Topics
3 ideas
Grokking Algorithms
Aditya Bhargava
10 ideas
Atomic Habits
James Clear
5 ideas
Atomic Habits
James Clear
Read & Learn
20x Faster
without
deepstash
with
deepstash
with
deepstash
Personalized microlearning
—
100+ Learning Journeys
—
Access to 200,000+ ideas
—
Access to the mobile app
—
Unlimited idea saving
—
—
Unlimited history
—
—
Unlimited listening to ideas
—
—
Downloading & offline access
—
—
Supercharge your mind with one idea per day
Enter your email and spend 1 minute every day to learn something new.
I agree to receive email updates