Jens Schauder is software developer since 1997. He loves software development for the constant challenges and constantly changing environment. A great chance to learn and teach. He is also blogger, author of various articles and speaker at conferences. Jens is a DZone MVB and is not an employee of DZone and has posted 89 posts at DZone. You can read more from them at their website. View Full User Profile

How to Get Unstuck

  • submit to reddit

Jeff Wofford singles out “getting stuck” as A Programmer’s Greatest Enemy. Stuck as getting stuck with a problem that you just can’t solve. This situation gets frustrating fast. Jeff even tells a story of a coworker getting stuck so bad that he got himself fired.

I agree getting stuck is bad.

Although I’d rephrase it: The real successful developers don’t get stuck. At least not often and when they do they get unstuck fast.

Unfortunately Jeff doesn’t offer any weapons against such an enemy. Michael Feathers offers one solution to the problem on twitter though:

When coaching I spend a good amount of time going around saying “that’s not working, do something else”

So having a good coach obviously helps. But what else is there to not getting stuck?

So here is a list that I think helps a lot.

  • Be a generalist: If you know only on thing and this doesn’t work you are stuck. If you know lots of ways you have lots of options to explore. It is less likely that all of them are blocked. Often it helps to think in terms of a different technology about a problem in order to get the idea that gets you unstuck.
  • Analyze precisely: More than once somebody asked me for assistance with a bug where the cause of the problem was nicely described in the call stack. So look exactly at the information you have (and the information you think you have). The first step is to actually read and understand error messages, stack traces and log files.
  • Ask for help: Work isn’t a competition. It’s team work. So ask a coworker to assist you. Often describing the problem to someone else is enough to solve the problem.
  • Know where to look for help: I’m quite surprised when people get stuck with a problem and I can solve it by asking google. Of course google is only the first step. For technical questions stackoverflow is a great source. Many libraries, frameworks and systems have their own specialized forums, mailing lists and wikis. Oh and don’t forget their bug trackers.
  • RTFM: I know it is boring to read documentation. But if you working with a technology every day you should read the main pieces of documentation. Yes I’m thinking of such interesting works like the Java Language Specification or Oracle Database Concepts or HTTP: The Definitive Guide.
  • Know whom to ask when your team mates can’t help: If you encounter someone who seems to be knowledgeable about a domain, make sure you have her email address available. And don’t be afraid to ask. Most people consider it a real nice compliment when somebody whom they only met once asks them a difficult technical question.
  • Use the source: A lot of the stuff we use today is open source. So when Hibernate doesn’t behave as you think it should or if Mockito does cool things which might be useful for your DSL, get the source code and get a look at it. If you don’t spend lots of time with it, you probably won’t really understand the source code, but often it will give you hints on what you might do to solve the problem.
  • Solve a different problem: Sometimes thinking about something else, taking a break and going for a work is all that it takes for a solution or at least a new idea to surface. Just make sure you have something to write with you.



Published at DZone with permission of Jens Schauder, author and DZone MVB.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)


Walter Bogaardt replied on Tue, 2011/10/18 - 4:03pm

Intresting point of ideas to get "unstuck". Most programmers get stuck and the ones that haven't will. The story of the guy that got let go is a bit different circumstance and probably not a good analogy. It would be better analogy to "keeping up with the jones", as in 1995 new languages and frameworks didn't really start to flourish as quickly as it has in the last 15 years. Back to being Unstuck the main problem is developers forget to "time block" their problems that they get so twisted up they start to confuse themselves. In more agile iterative development these problems show up quicker and team members can chip in automatically. I think this is also one reason in proper agile way we get less stuck.

Lund Wolfe replied on Sun, 2011/10/23 - 1:09am

Often you get stuck on something you'd like to solve, but you keep hitting dead ends and you feel you're going nowhere fast, but it is a problem that nobody is expecting to be solved or is even aware of, so there's no danger to your reputation or your job, just your pride.

The problem is usually not something that is really out of your comfort zone or beyond your pay grade, either. You may be narrowly focused on the wrong solution space. "If your only tool is a hammer, everything looks like a nail" or you're trying to "fit a square peg in a round hole". "If the hole you're in is too deep, stop digging". Sometimes you overestimate the problem scope, and you really only need to solve a smaller, more focused part of the original problem, which turns out to be easy. Sometimes you can't solve it because you really need to solve a much larger problem, which might actually be easier or it might make it an obvious "don't even think about it"/impractical fix. Sometimes it's too hard because you are trying to solve the wrong problem and you need to find out what the real problem is and why somebody thinks it is a problem.

Asking someone does put you in a frame of mind to see the problem from a new, more open perspective and frees you from feeling guilty and obsessive with its consequent narrow thinking. Just as bad, though, as mentioned, you may waste too much time or solve it badly with a hack or deviation from the original design. How many times have we seen this in code and only wished the original developer had been "stuck" and given up and asked for help.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.