HDD (and it don’t mean Hard Disk Drive ☺) is intuitively a bad approach on Software Development. If someone tells you that many times is doing Hope Driven Development, only by name you might say “Oh that’s a bad thing. Stop it now!”
But everyone is doing it… Not always, not even most of the times, but sometimes it happens. Why is that?
First of all let me give you my definition of HDD and please do comment on that.
Hope Driven Development is an approach to Software Development that encourages the developer to write code, hoping that this code will run always as expected and ensuing that belief by praying. HDD also encourages the developer to overlook the fact that this code might not work as expected and points out that it might work. Last but not least, when someone is doing HDD it’s possible (yet, less likely) to believe that when the time comes and everything goes wrong a magic unicorn will come and save the day.
Now that we have a definition (or at least we think we have) we must figure a way to tell when we are doing HDD.
- So by definition, when we use phrases like: “should/might work”, “even if it breaks no big deal” (deep down we know it will but hoping that this day will never come), “it got to work” etc then we probably doing HDD. And I ‘m not talking about the entire process of Development. I ‘m taking about that tiny piece of code that we are referring to.
- When we don’t have unit tests (or we have an empty project that we call “Tests”).
- When we are worrying about performance too much. ex: I expect a Person argument in this function and I shouldn’t validate it cause I already validating it three calls behind. So I believe and hope that I will always get my argument validated.
- You are writing “spaghetti” code and no-one else in the team wants to hear about that code (hoping they will never have to find out)
- You are writing “spaghetti” code and you your self want to forget that you wrote that piece of code (hoping that you will never have to change it again)There is also a possibility when you write spaghetti code and you love it plus the team want to know more about how this could be more complex. In that case you are not doing HDD. You are just weird
How can you change your HDD approach to a project?
STOP doing the above
This post is more of a note to myself because there are times that the pressure is huge and wrong seems right…
Comment and share if you feel the need to…