2 minutes
Fail fast and fail hard
“Fail fast and hard” is a phrase i try to follow when developing and testing a new feature.
This phrase can meet you at many different phases of your work.
When junior developers who are less confident with the codebase and are tasked to fixing some bug or adding a small feature they will probably have multiple iterations and multiple code reviews until they get their desired result.
But of course, depending on the project, testing and validating your code can be a very expensive operation - Either by time or resources used for running this iteration.
So when applying the phrase for this example, a developer should attempt to make their iterations as quick as possible, there are many ways to accomplish this, depending on your task, I’ll share a few examples below.
- Developing some ansible playbook and keep failing on a specific task? No need to run the entire playbook, use
--start-at-task
to only run your specific task before running the full playbook for final validation. - If you need to iterate by running on some other build server and not locally - Try to find a way to run locally, maybe even creating a small program locally to test your feature(But don’t over do this).
- When developing some software feature, a function or a class for example, use unit testing to be able to quickly validate nothing is broken.
The phrase “fail fast and hard” is applicative at so many levels, lets look at someone who has an idea for a startup. Some people can get so invested into trying to get it perfect from the start, choosing the ‘correct’ platform, choosing the ‘perfect’ language.
All of these factors and many more are not the ones which will be the deciding factor of a startup(In majority of the cases), working to perfect your idea for 3 years only to realize 1 month after release that your idea might need a complete architecture redesign based on the feedback only received now can be a deal breaker and can be too hard to fix. In my opinion, when working on a new and uncharted waters, you should iterate quickly, try to implement your ideas in a hacky way - this will allow you to gather feedback while not going too deep into the rabbit hole and seeing if this idea is worthwhile.