Archive for the ‘State of the Code’ Category

Refactoring Is Not Up To You

Sunday, May 9th, 2010

As a software contractor, and previous employee at many software shops, I have seen some amazingly well built code, and unfortunately my fair share of the horrible. To steal a quote from one of my favorite movies:

“I’ve seen things you people wouldn’t believe…”
 – Roy Batty, Nexus 6 Replicant, Blade Runner

I’ve seen the use of design patterns for the sake of having used a design pattern, with interfaces so generalized that types have been thrown out the window so as to refer to all parameters and return types as simply java.lang.Object. I’ve seen applications written in C++ where pointers to proper objects have been re-cast as unsigned long, totally stripping type information (and the fact that the value is a pointer), passed around and then re-cast to a (hopefully appropriate) object type elsewhere. I have seen Translator objects, written to perform translation between DTOs and general Beans meant to be consumed at the User Interface level, that also including translation from HTML form attributes to both DTOs and Beans. I’ve seen hard-coded character buffers in C/C++ applications that are easily overrun when std::string was readily available.

I have seen the Big Ball of Mud up-front and personal. (more…)