Road-Blocks: What Technical/mundane Actions Do You Take

Started by
2 comments, last by 21st Century Moose 7 years, 8 months ago

Whats your strategy when you run into a road-block when coding? When I say road-block I mean the bug you cant fix, you've just discovered that your approach/design wont work because the drone you ordered only has Bluetooth and not WIFI so you need to rethink your whole approach, your call to GetWindowRect is returning illogical numbers that don't seem possible (right is 100 and left is 1000) and without fixing this you can't test that your task bar docking component works. I have about 3 hobby projects going a once and I tend to find when I encounter a road-block in one project about 50% of the time I move on to a different project for a while then come back and revisit it and 50% of the time I go full OCD and devote hours to fixing/solving this road-block (which sometimes is not the most time efficient), trying every little tweak to figure out if this fixes it and getting grumpy as shit with life.

Explain what actions you take from the technical to the mundane, ie, 'move on to another feature and revisit the problem with a fresh perspective (of time)' to 'get up and go make a coffee or shoot the shit with co-worker x'.

I'm interested to know if you say 'I'm not going to work on anything else till I solve this road-block and get it working' or 'I am going to start on a different feature/project and come back to this' or etc.

Advertisement

Nearly always I go to "rubber duck debugging". Explain every step exactly to an imaginary person, or to my water bottle, to make sure I fully understand everything that is going on. Usually if something is difficult to explain to that imaginary person it is a likely area for the issue, and normally that is enough to find the issue.

Once I've done that if the problem remains, I prepare but don't send an email to the person who wrote the system or someone who is an expert at that system. In the process I include all the function calls, the parameters, and the return values. I try to anticipate all their questions and provide the information. This normally finds the remaining portion of the issues.

If I've done both of the above and still can't find the solution (which is rare) I actually send the message, and get another person actively involved. If they don't see it or have recommendations after reading the email, I get a buddy and we repeat the steps together, walking step-by-step through the problem until the problem is solved.

Doesn't happen often but usually play games for a while or talk about it to other people or both.

There are different kinds of roadblocks but I'd categorize the main ones I've experienced into two broad types: (1) I went into it with incorrect assumptions and it's never actually going to work at all, or (2) I'm doing something wrong and I can't proceed until I do it right.

Assuming I'm not in type (1) I like to circle around a problem; look at it from a different side and see how things are. If it's a client/server problem on the server side, start looking at it from the client side. If I'm drawing a mesh wrongly, build the correct mesh and reverse the calculations to arrive at the raw data. At some stage along the way it typically becomes obvious what's going on.

If I am in type (1) the only solution to to hope I realise it quickly enough, and am willing to walk away from it (or find an entirely different alternative) when I do realise it.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

This topic is closed to new replies.

Advertisement