Reflections on software development

Very python oriented, keeping an eye on the rest of the world though :-)

Archive for the ‘Anti-pattern’ Category

Anti-pattern overdose and bad smells

Posted by goofy4u on March 9, 2006

Today I was doing some occasional code reading.  In fact it was a colleague that let me read some source code he stumbled upon.  We never saw so many anti-patterns in one code read session : magic numbers, middle man, spaghetti code, very long functions with huge switch statements, code duplication, it was all there.  I was wondering what to do with this discovery : go to the author of this marvelous piece of code and explain our objections or refactor the code ourselves?  The former options seemed attractive but after reflecting a while I chose not to bother because, after all, the code worked and management does not care about clean, maintainable and optimized code.  So my colleague decided to refactor it himself…  I decided to do some research and write a tutorial, both for beginners and advanced programmers on how to properly design and write clean code using design patterns and be aware of bad smells in code…  The only problem remaining then will be on how to motivate people to put the theory into practice.  To be continued…

Posted in Anti-pattern, C++, Design Patterns, Source code | Leave a Comment »