Live data from Hacker News

A Programmer’s Greatest Enemy

jeffwofford.com

1–10 of 41 posts

Re: A Programmer’s Greatest Enemy

#3
Many times when I'm stuck, I seem to draw the conclusion that this is because the documentation is lacking. It might be me scapegoating, but many times I find that it is because there is a lack of documentation that I spend hours on hours trying to figure something out.

Debugging on Windows, is a prime example. If you take someone from the normal Visual Studio give give them a PDB file, the compiled executable, limited / no source code, a crash report and a minidump, they're going to be stumped looking on the internet for some resources and instructions on how to debug the program.

Others include debugging in general, making the switch to and working in a *NIX environment (ie. sans IDE) from Windows, adding functionality to a large enterprise application that doesn't have comments or documentation (so essentially you're stuck for 3 hours trying to find this interface to that will execute a command), and so on.

Re: A Programmer’s Greatest Enemy

#6
I completely agree.

I sometimes find myself procrastinating, not able to get my head into the game.

And it _always_ turns out that I'm afraid of something. That there's something lurking ahead that I don't know what to do about - lacking requirements, a problem I don't know how to solve, technology that's being a massive pain to work with in the past.

The thing that works for me is stopping, working out where the fear is coming from, and then taking a bit of time out to work out what the solution is. Once I've done that my productivity skyrockets.

Re: A Programmer’s Greatest Enemy

#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 anything else) more than one hour and LOC written or changed = 0, then I'm officially stuck, and must move to GettingUnstuck mode.

to get out of being stuck,

The most effective way I've ever found to get unstuck is to get away from the computer. I take pencils, paper, and code listings and get away, always into another room, sometimes to another building.

I have learned that the reason I'm stuck is not because I don't know how to do something; it's because I don't know what to do. What needs to be determined away from the computer; how can be determined at the computer.

and to avoid getting stuck in the first place.

This is the one time I disagree with OP. Getting stuck is not the problem; getting unstuck is. If you're not getting stuck on a regular basis, then you're probably not working on big enough problems.

Never getting stuck makes programming like almost any other vocation. For me, getting stuck and then getting unstuck and making something cool work for the first time ever is one of the best feelings you can have.

Re: A Programmer’s Greatest Enemy

#9
I hope you didn't write this blog post because you got stuck. Besides that great read! I think every coder knows this special time when you can't boot up your mind because you're afraid of crashing somewhere.

Re: A Programmer’s Greatest Enemy

#10
The problem with knowing when you're stuck is that it's very analogous to the halting problem - virtually unsolvable but for a specific set of subproblems.

That said, usually when I feel like I've started spinning in circles I take a break, come back and ... delete the whole thing. Start from scratch.

I find this frees me to solve the problem with a new pair of eyes and from a different angle. most of all, my thinking isn't bogged down by everything I've already done.

Post reply on HN