Hacker News new | ask | show | jobs
by dimal 941 days ago
> I was expecting it to be very easy, smooth sailing for me. On the high level, it's all very simnple stuff. It's just refactoring the codebase a bit, reorganizing it, making it cleaner and more structured, and it's supposed to be easy.

Sigh. Refactoring is hard. Finding the "right" structure (whatever that means) is hard. Changing the existing code from one structure to another is hard. There is a huge amount of uncertainty and so many ways for it to go wrong. There are an infinite number of ways to change things and you don't really know which change is "best" until you try a lot of them and then look at what you made. Now that I'm 25 years into this, I have a sense of where the dead ends are and how to avoid them, but after 10 years a lot of people don't. And I still go down dead ends sometimes. The key is realizing when you're on a dead end as quickly as possible, then stopping and doubling back. Cut that sunk cost loose.

If you go into something with the expectation that it will be easy, you won't have the right mindset to deal with difficulties. When you hit difficulties, you'll strain against them instead of calmly taking a step back and reassessing the situation. The problem isn't being dumb. It's the act of straining itself, which makes you dumb.

Most difficulties are caused by not fully understanding the problem being solved, and the "easy" solution turns out to have overlooked some of the essential complexity that needed to be solved, which leads to kludges piled on kludges. Understand first. Then solve.

It's important to have a problem solving process. Look at times that you did find a solution. How did you approach it? What was helpful? What wasn't? Refine your process over time, keeping what works and discarding what doesn't. Then trust your process and relax. It's just a website.