Beware of the technical solution

time to read 2 min | 268 words

Imagine this fictitious scenario, you are working on some functionality, and you are pretty pleased with what you have so far. Then, a new requirement come in, and it require something that is plain out not possible with the approach that you have taken so far. Then you start to investigate it a little further, and you find that if you do this, and push that, and maybe not look too closely at the end result, you can get what you want, without major changes to your code.

I have done this. I have done things to the GridView that should make it weep in shame, and there is a reason why I know the System.Web.UI.Calendar.Render() has a special case for Hebrew calendar and Cyclomatic Complexity of 42.

The problem with these types of solutions is that they are a Hack. As such, they may serve an immediate need, but they will prevent me from continuing to evolve the software in any meaningful way. This is getting into technical debt in a serious manner. I finally drew a line in the sand when I found out that I would need to do multi threading in javascript, and I actually had an idea about how to make it work (don't ask!).

Next time, I believe that I will draw that line much sooner. Better to cut my loses and build the functionality again than having to deal with the complexities of an inappropriate technical solutions and hacks on top of it.