I had a similar realization, but it’s not really about working hard vs. not working hard, it’s about knowing what’s important to your manager. Early in my career I would never say no to any task, and would give the time estimate I thought the manager wanted, and then work over time to get it done. Half the time the finished product had bugs, got delivered too late, or ended up not matching what the client wanted, so the “hard work” didn’t translate directly into success. Now I try to figure out what the client’s actual needs are and how to meet them as quickly and with as little work as possible, and when something is requiring overtime, I immediately stop working on it and communicate that it’s a bigger issue than expected, and either push the project, get additional engineers, or find a different way to solve the issue. I think programmers really enjoy solving problems and we never like to admit that something is more difficult than we expected because we feel like we failed, but actually that’s just an expected part of the job. Obviously this only works if you have a good manager who actually cares about results. Bad managers are easy to manipulate because you just optimize for whatever BS metric they’ve decided is important, but those jobs are soul crushing.