I like to write code that is clean. This takes a deliberate effort and a lot of time. It also takes skill and experience. In the long run, this is a best practice if you are going to use that code any time in the future.
However there comes a time when you just need to slap something together and get it work. This is usually caused by some external time constraint. Maybe you have entered a challenge and have seven days to clone a game like Angband.
More often than not, there is a customer demand which requires you to just hack a fix without regard to future maintainability. Often times such a customer needs a fix yesterday and does not care about the long term ramifications. The problem is that you have to pay sooner or later.
LeetCode Getting Downright Ugly - I continue doing LeetCode exercises. Worked on another "Medium" difficulty problem today. Seemed straightforward enough. Find the longest length of any su...