Header Ads

Devs Answer: What are the best comments left in your code?

Comments: the video game graffiti of programming.

Comments: the video game graffiti of programming. Whether you're cracking open a new engine, leaving reminders for yourself, or just trying to cope with the mind-racking difficulty of a hard programming puzzle, comments are the best way to leave notes for yourself or other people that may not be noteworthy until they're read at the most (or least) opportune moment.

In honor of the misbegotten messages left behind by brave programmers, we asked our readers on Twitter for their favorite comments left behind in their code. Their answers may inspire to explore your own game's code, like a mysterious traveller unearthing the secrets of a lost civilization.

Remember, if you're interested in participating in these conversations in the future, make sure to follow @Gamasutraon Twitter. The questions usually go out on Fridays in the late morning, Pacific time, alongside Tweets of our regular news, blogs, and original writing.

Our first batch of readers tell stories of some---creative examples, giving programmers a chance to flex their creative writing muscles alongside their computer science backgrounds.

@gamasutraI once left a crepe recipe in some code. I've also read a poem in comments about how badly a particle system was written.

— Brett Douville (@brett_douville) April 8, 2016

@gamasutraI once had a programmer working through some code, and all of his commit statements were a back and forth between him and God

— Ethan Moore (@EthanHMoore) April 8, 2016

@gamasutraNot in a game, but I once left all of my comments in rhyming couplets.

It was not an interesting project.

— Spencer N (@SpencerMRNelson) April 8, 2016

@gamasutra @ferricideIt was this rambling, meta-joke that kept going into more and more jokes within itself. I'll see if I can find it.

— Garr (@garrbage) April 8, 2016

@gamasutra//blackmagic

— Justin Ng (@thatjustinng) April 8, 2016

This group of readers discovered a series of ominous warnings, remind us all that code can sometimes be more akin to magic then science.

@gamasutra"// The equation on the following line is correct, do not change all the signs (again)"

— Dom Camus (@fastramdesign) April 8, 2016

. @gamasutraA shader named "no clue but don't delete"

— Kevin Wong (@ThatKevinWong) April 8, 2016

@gamasutra @krisgraft// WAIT NO JUST DO THIS

— Steve (@steve_coan) April 8, 2016

@gamasutra//This should never happen

— Jacob Blanch (@HarvokBjergson) April 8, 2016

@gamasutra"// To see how this code works, ask Dale" (no dale worked at that company, at least not for 10 years)

— Will Teixeira (@General_Willest) April 8, 2016

@gamasutra"//DON'T remove. Does nothing. Can't tell why it breaks without this block. This time it's personal."

— Daniel J Pool (@Gywair) April 8, 2016

@gamasutra// Abandon all hope, ye who enter here
I had to enter there

— Nejc Pintar (@poisonedslo) April 8, 2016

@gamasutradon't know what this does but breaks everything if removed

— petosorus (@petosorus) April 8, 2016

@gamasutrawhile(1); //to fix memory leaks

— erik sgtsar (@eriksgtsar) April 8, 2016

@gamasutra @ferricidejust the good old-fashioned

// ugh

— RavenWorks (@RavenWorks) April 8, 2016

And finally, there are just those bits of code that help seem to help programmers make it through the day. Or at least, the build.

@gamasutraI put jokes in my error/exception handling code, to make myself laugh when my game crashes :-D #gamedev

— Mass KonFuzion (@mass_konfuzion) April 8, 2016

@gamasutrabad designer, no twinky.

— Christian Allen (@Serellan) April 8, 2016

@gamasutra// TODO: EVERYTHANGS!

— Eric Howard (@theLucre) April 8, 2016

@gamasutraThis is my favourite that I've written, if simply for the uselessness of it pic.twitter.com/LdvWSrfaNz

— pip turner (@dwarph) April 8, 2016
Powered by Blogger.