There are many ways to achieve something

We should not try to find the perfect solution: we’ll only find ourselves wasting our time.

When I started programming, especially in university classes, I first had the mindset that there was only a single solution to a given problem, kind of like a mathematics problem where there is only one solution to 2 + 2, and that it was my job to find that perfect solution.

Don’t fret. We just need to start somewhere, and go from there. Life is a giant playground: play around!

Otherwise, we fall in this “all-or-nothing” mindset, and it took me (too) many years to accept that this is almost never a good way to see the world.

Instead, and in programming especially, the situation is more like this: we sometimes know from the get-go that the answer has to be 4, and we have the freedom to decide how to get there. We could go with 2 + 2, or 3 + 1, or even 2^16 / 8^5 * sqrt(4) + 8 - 4 * 2. Of course, the simplest solution is often the best one.

Backlinks