Live data from Hacker News

A Programmer’s Greatest Enemy

jeffwofford.com

11–20 of 41 posts

Re: A Programmer’s Greatest Enemy

#11
I am glad that I am not the only one, it's making me consider another line of work. I get stuck badly and often for many months - much longer than the timescales mentioned here, working on things that are beyond my basic level of ability and eventually having to give up if it's a solo effort or most recently have a more senior guy take over and finish the work. During this time I don't learn much. It's usually down to not having a crucial piece of information and being unable to determine what exactly isn't behaving as it should. On top of this, every other setback during the period that I'm stuck is magnified. Typically it tends to be cross platform stuff that works differently on different systems and one system, usually Windows, is holding me back. Perhaps the solution is to read Charles Petzold's Win32 programming book.

Re: A Programmer’s Greatest Enemy

#12
This is actually one of the few useful points in Pirsig's _Zen and the Art of Motorcycle Maintenance_: getting stuck is a bug report, and getting unstuck is debugging. It's worth a short quote:

___ “Okay,” I say. I tell him getting stuck is the commonest trouble of all. Usually, I say, your mind gets stuck when you’re trying to do too many things at once. What you have to do is try not to force words to come. That just gets you more stuck. What you have to do now is separate out the things and do them one at a time. You’re trying to think of what to say and what to say first at the same time and that’s too hard. So separate them out. Just make a list of all the things you want to say in any old order. Then later we’ll figure out the right order. ___

Pirsig is talking about writing here, but he also applies it to motorcycles and it can apply equally well to programming. The key thing is that stuckness is inside your head, and having tools to get yourself unstuck is vital.

Re: A Programmer’s Greatest Enemy

#13
You're stuck because you're demotivated, and you're demotivated because you are in unfamiliar territory. This is the cusp of learning. Take the leap and you'll discover the addiction of empowerment.

(Ok - that sounds like a load of crap ARobbins might spout.)

Stuck is the result of not knowing where to - and your reluctance to - begin.

Re: A Programmer’s Greatest Enemy

#16
Just wanted to thank everybody for the discussion here. I was stuck on a project for a while now and avoided working on it, because I had a good excuse (learning math).

I've had been cleaning up a mess of code that I've ported from a book whilst changing parts to fit my needs. I've got stuck on the process of cleaning up and now I'm going to reread the book and try to understand the concepts fully to then write my own code based on my understandings.

Even though I already considered doing that I still felt completely demotivated. The discussion here and the quote from the zen-book made me reconsider my options and think about what the correct next step would be.

I'm feeling relieved.

Re: A Programmer’s Greatest Enemy

#18
post #8

A programmer’s greatest enemy is getting stuck. Agreed. I often know where I want to go but can't seem to get there with code. This sucks and good programmers must find a way to get through this. A crucial skill in programming...is the ability to recognize when they’re stuck, Yes, and this is the only time I ever measure lines of code. Here is my metric: If I've been sitting at my computer (developing, not testing or…

My trick for getting unstuck is to start maintenance on the part where I'm stuck. Any kind of cleanup, comment clarification and so on will do. Once I'm doing that I'm doing something and moving from doing something to doing what I want to do happens more or less automatic at some point.

I got this trick from working in a metal shop. We'd get stuck trying to solve a problem all the time, and whenever that happened we'd simply start cleaning up. Usually after cleaning up the 'way forward' was crystal clear.

Now, of course one day there will be a problem where this will not work but for now it seems like a really good trick.

The underlying mechanism is as far as I can see related to being stuck in the same cycle in your head. As soon as you start cleaning up you force yourself to look at the forest instead of the individual trees and that's where you'll find the key for moving on.

ymmv, it works for me.

Post reply on HN