Subscribe to Jack of all Languages        RSS Feed

Code Review

Icon 4 Comments
There is a design and it is incredible. It exists in documents and on whiteboards and in some unit tests but mainly it exists in my head. It's a marvel of software engineering, both efficient and elegant. It is instantly updated as my understanding of the problem evolves or as the requirements change or as my original assumptions are dashed in the face of feature requests.

The code is slow and sluggish by comparison. It doesn't stand a chance. It's as flexible and as extensible as I can make it but changes are made by hand. By the time it would be painstakingly sculpted into its new form, the mind has moved on to a different, better place and the direction has already changed.

And so, the design darts from place to place and the code trundles on never fully achieving the latest design and never fully excising the previous. It is a bastardisation of the ideal, riddled with legacy from a stupider, more ignorant self.

In one simple project, graph theory idealised the domain and some simple, well-known traversal algorithms solved the problem. To the demise of the design, the program was useful to others and the feature requests flooded in. Individually they were easy to add but together the program became a behemoth with data structures and algorithms and aspects desperately clinging onto and strangling the increasingly fragile and decreasingly elegant remnants of the original code.

Do not mistake me. Refactoring was done, injection was sought, code standards and naming conventions were upheld. But indirection (or misdirection) confused and obfuscated. Dead code, difficult to detect with the chosen tooling, weaved its rotten tendrils through live code. It stifled flexibility and sapped maintenance effort.

But all is not lost for there is a new design. All the features are perfectly balanced around a new, all singing, all dancing data structure. The original algorithm is still in there. It has pride of place as the most used and most useful feature. It has been nourished out of its fragility and it's code reads (or will read) like a poem once again. But it is just one feature.

Today I'll be adding something new. As I do, I'll take my scalpel to the old code and take the first small step towards the new design. I'm excited by the new direction and am eager to show off the brilliance of the design. But I know that before the old code is completely cleaned up I'll have a newer, better, more exciting design to work towards and the cycle will continue.

4 Comments On This Entry

Page 1 of 1


05 February 2015 - 08:45 AM
Heh.. noice!


05 February 2015 - 09:09 AM
Thanks. :)


11 August 2015 - 01:54 PM
Good writing, but what are you trying to achieve with this...I need just a enlightenment lol.


12 August 2015 - 05:26 PM
Thanks. :) It was a reflective piece.
Page 1 of 1

Trackbacks for this entry [ Trackback URL ]

There are no Trackbacks for this entry

May 2022

2223 24 25262728


    Recent Entries

    Recent Comments

    Search My Blog

    0 user(s) viewing

    0 Guests
    0 member(s)
    0 anonymous member(s)