What helps you code?

Talk about your skill passion! Ask questions, get feedback, post something cool!

Moderator: samw3

TheLittleSettler
Posts: 120
Joined: Fri Nov 19, 2010 10:08 pm

What helps you code?

Postby TheLittleSettler » Sun May 11, 2014 7:56 am

So this week, some people (not coders, mind you) commented along the lines of "I'm surprised how much you've done. You've accomplished more [alone] than some teams who have 3 coders. "

First, a disclaimer. I don't claim to be a good coder (whatever that might mean). And the above is more due to their lack than my skill. But I've found some things helpful, most of which is self taught. I'd like to know what helps others.

How did I do it? Sans sleep. But that slowed me down more than it helped.

So, these are the things which help me code:

In order of least to most helpful...in an attempt (no doubt vain) to build suspense ;)

?. Listen to psalms
I have no idea whether to put this at #1 or #8, so I'll not number it. I don't do this all the time. It is particularly helpful when things are frustrating, stressful, urgent...etc. Christian music can be good too, but I find this better. There's a band, The Sons of Korah who play the psalms keeping the lyrics as close as they can.

As an aside, maybe this is a case of "Those who wait upon the Lord shall renew their strength" (Isaiah 40:31).

When I know what I'm doing is God-honoring, I enjoy it more, and don't get so frustrated.

Also, I have an expectation that when I pray "Please help me code this" "Lord, what's causing this bug?" that if its really all that important for me to have it done, then somehow it'll get done as I put in the work. If it doesn't, I ask myself how important it was. As long as my inability to code doesn't separate my from the love of God, what does it matter? So when I know that I don't have the time to code something given my own skill its a reason to pray and give it a crack. So...sometimes my coding is superhuman (that is to say, beyond human ability, not humanAbility++). :mrgreen:

[/tangent]

7. If I can't take a break, code something else
When I'm stuck on something for an hour or so but I still feel reasonably fresh, swap to another task. There's still the problem that I get carried away debugging for hours before I stop and see that I've gotten nowhere, but anyway...

6. Use the same language, ide, engine, etc wherever possible
Debatable. To me, learning is not its own end. It seems quite an uncommon stance. I still enjoy learning, but I don't think its a good use of time go out of my way to learn new things.

5. Programmer Dvorak and Cyborg
Really, dvorak took me a couple of weeks to learn but its made coding much more comfortable, if not faster. It increases typing speed and comfort while reducing typos which in turn reduces time wasted correcting time caused by errors caused by typos. Likewise I mention Cyborg, the makers of the MMO7 gaming mouse - which has 11 programmable buttons. These two things have improved the speed of iteration. FYI I wouldn't recommend the MMO7, as it has a couple of problems but compared to a standard 3 button mouse its awesome.

4. Sketch the logic
If a solution doesn't come to me straight away, I sketch how it might work with pencil and paper. I don't mean pseudo code. I mean graphically representing the logic. I use geometry to find out what I inputs I have to get the output I'm after, and also to make it clear in my mind what the pseudo code would be.

3. Let it stew in the back of my mind for a few days first
If its complicated, and it isn't urgent, I don't code it or even plan it on paper straight away. I leave it for a few days later. By then, I'll inevitably have ruled out most implementations, usually getting down to one or two options I believe will be best. I can code something else in the meantime.

2. Do the hardest things first
I'm always second guessing my ability. So I tackle the hardest bits first. It helps me stay motivated, and keep on track with what I'm trying to do.

1. Stop when tired
There's always a temptation to keep going late. I don't give in to it (except during crunch...when I shouldn't have given in, but did). Abandoning a bug till another time may feel like giving up. Ignore that feeling. My coding is so much better on my "good days", that it pays to make as many of those days happen as I can.


Some things I'm not in the habit of doing:

Unit testing
Is it just me, or is most game dev code usually so modular that unit testing seems without advantage. Since the main argument in its favour was regression testing. And when the modularity doesn't stop me, the abstractness of the problem generally stops me from writing tests. After all, what's there to test in a character controller? If it looks right and feels right, it'll do. That said, I'm in the habit of thoroughly manually testing everything I write immediately, so not very common (but not especially uncommon) to find bugs with something later on. Occasionally I write unit tests to help debug something, but I test manually first.

Source control
I've used it before. I've started to use it on some things. But its not habit. And tbh, I haven't reaped much advantage out of it except that I like to see the commits as a kind of log of achievements. I'm in the habbit of backing up stuff, so it doesn't help me to rollback. And because I mostly code alone, the ability to merge code and view changes doesn't help me ether.


So, what helps you?

Return to “Programming, Art, Design, Sound & Music!”

Who is online

Users browsing this forum: No registered users and 7 guests

cron