In a new Gamasutra feature
, originally published in Game Developer Magazine and brought to you in association with Intel, various game developers discuss their programming pet peeves and how to avoid them.
Michael Carr highlights numerous coding nuisances, including obfuscated code, which he says can be a real, unnecessary hassle for a forgetful person such as himself.
"I couldn't tell you the intimate details of a function I wrote three weeks ago, let alone six months or a year ago," he says. "It's because of this that I consider obfuscated code a sin."
"This also fits nicely with working in a team of programmers where someone might have to debug and/or add new functionality to someone else's code. The quicker it is to understand, the easier it is for them to make the required modifications," he continues.
Noel Llopis warns about the dangers of vertical syncing during loading, noting that load times can be heavily affected if you're not careful.
Citing his own work, he says, "There was nothing horribly wrong with that approach... the rendering code drew the progress bar, and then did a present call with vertical sync on. That meant that most of the time the console was waiting for vertical sync instead of doing an actual load. Once I removed the vsync, loading times went down to about 20 seconds!"
A contributing anonymous developer also discusses the act of creating specific functions in place of cutting and pasting blocks of code over and over again.
"I frequently go for the cut-and-paste "solution" first simply because it gets me the result I want quicker," he admits, "but I pay for my sins, and usually end up having to refactor it away later, sometimes after a few more needless duplications."
The feature can now be read in full on Gamasutra