dcsimg
Login | Register   
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


Tip of the Day
Language: C++
Expertise: All
Dec 17, 1999

WEBINAR:

On-Demand

Application Security Testing: An Integral Part of DevOps


Over Engineering, Wheel Re-Invention, and Other Diseases

Writing code from scratch, without any prior design or plan, is a very bad programming practice. However, the opposite, namely over-engineering, can be just as harmful. In essence, over engineering is the use of costly, redundant or "cute" features that are not truly necessary. A good example of this is using exception handling as an alternative to ordinary control constructs such as loops and while statements. Likewise, templatizing a class that is never used for more than a single type is an expensive and totally redundant task. Excessive typedef's and classes that simply replace built-in data types are other instances over enthusiastic code scribbling. Finally, "cute" features and puns such as the use of bitwise operators, macro tricks, or function pointers can also result in unreadable code. However, the worst bad habit is re-inventing the wheel. Writing custom container classes and algorithms instead of using the ones that already exist in C++ (in the form of STL) is a very expensive, bug prone, and totally uncalled for practice. One of the phases of design review and code review should consist of catching and sifting such instances of over-engineering, wheel re-invention, and "poetry".
Danny Kalev
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
×
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.
Thanks for your registration, follow us on our social networks to keep up-to-date