Live data from Hacker News

Ask HN: What do you do when you get stuck while working alone?

news.ycombinator.com

1–10 of 13 posts

Ask HN: What do you do when you get stuck while working alone?

#1
I'm in the process of learning Obj-C and the cocos2d framework in my free time after work. I'm building a game incrementally.

I spent about 3 hours troubleshooting why one of my layers was not displaying sprites while another layer would even though they were seemingly identical. Turns out that by overwriting the init function to enable touch for the layer I overwrote something that dictates sprite behavior (seems obvious in hindsight).

This led me to ask, how do you guys manage bugs and problems when you're on your own and inexperienced?

Re: Ask HN: What do you do when you get stuck while working alone?

#3
Firstly, don't be so hard on yourself. Cheers to you for building something.

Secondly, be sure to test functionality fully and often. Like, when you start a method, after any big functionality in the method and at the end of the method? Or whatever works for you. In this example, when you overloaded the init method you'd probably have seen the error pop up? Just a thought, it is a bit of a pain though.

However, in general the best bug breaking strategy is simple... Take a break! Grab a coffee, walk your dog, get some groceries... Just get your mind off the problem and come back to it with a fresh pair of eyes... It's the next best thing to a new person. Just make SURE you aren't thinking about the problem while you're taking your break! It's gotta be a real break.

You might also consider looking into co-working spaces in your area?

Good luck! Have fun.

Re: Ask HN: What do you do when you get stuck while working alone?

#4
Oh yes, I know this feeling very well. First, I try to google sites with people who had a similar problem. If I wasn't lucky I check Stackoverflow more extensively, then the api documentation. When I still stuck, I try to find other examples try to run them and try to read and understand their code and finally I am reading the sources of the respective api. If it still doesn't help direct questions on IRC or Stackoverflow.

Re: Ask HN: What do you do when you get stuck while working alone?

#5
Stack Overflow, google search. I also go through the mailing lists which often will not show up in google results.

I develop apps using Android, so I have two workspaces, one for the product and another one to test the individual functionality so that I don't screw up the existing code.

Cheers

Re: Ask HN: What do you do when you get stuck while working alone?

#6
This is completely normal for development work, so its like asking, "what do you do when everything is normal." In your case you have a tricky bug, so tests are the best bet. When you are making the test, the cause of the bug will probably become apparent before you finish writing the code.

Re: Ask HN: What do you do when you get stuck while working alone?

#7
I talk to other people and tell them about my problem. It doesn't matter if they're a domain expert. The act of explaining the problem frequently causes me to see it from another angle and sometimes that's all it takes to get things going. It's the "stuffed animal helpdesk" effect.

I've been on both sides of this. Sometimes people talk to me just to get another take on things and they wind up finding it just by explaining it. Once in a while, I end up making a guess based on general knowledge and wind up being helpful anyway.

I got this idea from reading Usenet way back, and wrote about it more recently: http://rachelbythebay.com/w/2012/06/14/crash/

Re: Ask HN: What do you do when you get stuck while working alone?

#10
As already answered here I start by a few google searches, changing words multiple times as it is not always easy to sum up an issue in a google search. Then I look in my contact list on gtalk/skype trying to find someone who could have a fresh view of my code/problem. Most of the time, explaining my bug and my code to them leads me to a "oh snap that's it moment" or they provide some general ideas.

But I also still use IRC a lot. Depending on the framework/language there's always one or two IRC channels where you'll find people who can help you or at least point you in the right direction so you should search for some good IRC channels specific to obj-C development and hang there while you code.

Post reply on HN