Skip to main content

Why code commenting sometimes sacks

Code commenting is one of the best coding practices. However, if misused, it is bullshit! Whether bullshit or meaningful, it highly depends on how you’ve used comments in your code. However, good code is self-documenting, meaning that it doesn’t require comments. But this doesn’t mean you should never comment on your code. Commenting can reflect the good, the bad and the ugly in coding practice.

The Bad and Ugly Side of Commenting Your Code

  • Documentation comments can make your code very “noisy” and difficult to read for those responsible in maintaining it. However, many code editors support code folding which allows comments to be collapsed so as to focus on the code.
  • Clarification comments smell because they tell you that your code is too complex. The code should be made simple instead. 
  • Some developers could vent their frustration in code comments therefore resulting to comments that are depressing, cynical, dark or mean spirited. 
  • Commenting could go against the Don’t Repeat Yourself (DRY) principle. 
For examples, click here

Comments

Popuar

Why Agile does not work in some projects

I know when you think of agile, what probably comes to your mind is the fact that it is the most widely employed and successful software development methodology today because of its iterative and flexible approach. Agile leveraged together with DevOps has revolutionized software development. However, this doesn’t imply that it is the right way to handle every situation or project. In some projects, Agile plus DevOps will not work at all because the incremental approach and flexibilities associated with this technologies are not feasible or compatible with those projects. Situations in Which Agile is Not Helpful Agile cannot be applied in physical projects such as the design and build of a new hospital. Agile welcomes requirement and design changes even in late development but this would be unworthy in the hospital project as changes would have major impacts on the project cost and schedule. In physical projects like the hospital design and build contract, the design remains a maj...

MVP in project management

What is MVP in project management? In Project management, MVP is an acronym derived from the term Minimum Viable Product. If you’ve never used or come across such an idea, don’t worry because by the time you’ve finished reading this article, you will have gained a clear insight of what the concept is about. To start with, the concept is usually used to improve planning in agile project management. Similar to agile software development model which emphasizes collaborative development and responsiveness to customer feedback, agile project management offers a way for managing the almost constant changes we experience in today’s organizations. And what is this MVP? As already mentioned, MVP is the Minimum Viable Product. In more clear terms, it’s the simplest prototype which could be put into use. The goal of MVP is to put the simplest version of the product into the hands of the users so as to be convinced that you’re on the right track and then to identify things of highest-priority...

Lean Methodology

Lean Methodology is a subset of Agile Methodology and it meaningfully applies to both startups and software development. It can therefore be used to develop both businesses and products. By being fans of the Agile methodology, we must be interested in learning more about lean startup and lean software development. The Lean Startup Concept The idea upon which the lean startup concept is anchored revolves around avoiding the creation of a product that doesn’t work or that which is not needed by people. It is therefore advisable to find a problem worth solving first before building a business model around it. Lean startup is a perfect fit for entrepreneurs and startups that are still seeking out a business model or product that generate genuine value. However, larger organizations can still use it if they can be flexible while responding quickly to new information and listening to customer needs. In the lean startup model, entrepreneurs will summarize untested hypotheses (basically...