
Avoid magic numbers by giving constants meaningful names. In the circle area example, replace the 22/7 with a named constant and use radius squared to improve readability and maintainability.
Explore choosing minimal, appropriate variable types across languages, including booleans, integers, and chars, with attention to memory use, floating point limitations, and real-time constraints.
Learn how missing an exit path in recursion leads to an infinite loop, as shown in a factorial example where the function keeps calling itself without an exit.
Organize for change by adding a new derived class instead of modifying the existing one, minimizing impact on interacting classes and managing versioning.
We write code, it works, but it is not elegant. it is not based on the software design principle. Sometimes it is not very much readable, not easily extensible, not easily explainable to others. Such a code might work, but it is not a clean code.
Clean code is actually Craftsmanship.
Writing a clean code requires knowledge and work. For writing clean code, we need to know the common mistakes which we may leave behind and the best practices which we should follow.
This course covers the knowledge part of writing the clean code. The knowledge is about learning from our own and from others experiences. Learning from others mistakes or experience is more important and should be done early as it saves huge cost of making the same mistakes ourselves. Understanding and walking the right path is easier if we adopt it early in our journey i.e. when we are learning to code.
This course also covers the common mistakes and the best practices of programming. It tells you about the common mistakes which are made while using the loops, in formatting the code, in using recursion, how we end up getting a dead code etc. We write code, it works, but it is not elegant. it is not based on the software design principle. Sometimes it is not very much readable, not easily extensible, not easily explainable to others. Such a code might work, but it is not a clean code.
Clean code is actually Craftsmanship.
Writing a clean code requires knowledge and work. For writing clean code, we need to know the common mistakes which we may leave behind and the best practices which we should follow.
This course covers the knowledge part of writing the clean code. The knowledge is about learning from our own and from others experiences. Learning from others mistakes or experience is more important and should be done early as it saves huge cost of making the same mistakes ourselves. Understanding and walking the right path is easier if we adopt it early in our journey i.e. when we are learning to code.
This course also covers the common mistakes and the best practices of programming. It tells you about the common mistakes which are made while using the loops, in formatting the code, in using recursion, how we end up getting a dead code etc.