The best approach to take when you can’t figure something out, and you have no one to ask

language-agnostic

The second part of that question is key. If you are one of a few programmers, and after banging your head on your keyboard for endless nights you can't figure something out, with no one else in your organization to ask, what do you do? Not having someone to ask has more to do with the fact that it would take too long to bring them up to speed to even have them assess the problem. Are these the instances where you have uncomfortable conversations with management and tell them a third-party contractor with more experience will be required?

Best Solution

There is a time and place when everybody hits a problem where there doesn't seem an obvious way out.

1) Ask yourself if you are the first person ever to solve this - if not, then there is likely to be an answer out there. Try Google, SO etc.

2) Take a break and try and do something else for a while - it's amazing what a few hours away from the keyboard and thinking about something else can do.

3) Try talking about the problem to someone else, even if they aren't technical - sometimes the process of explaining a problem to someone who isn't technical or involved can lead you to the right answer or an approach from a different angle.

4) Admit it's harder than you had envisaged or you are stuck. A good boss will help you get to the right outcome, for both you and their business. Make them aware of the effort put in and the conclusions and decisions you've made to date.

5) If all else fails, help your boss choose the contractor as you'll probably have to maintain their code :-)

Related Question