What's the Worst Code You've Ever Seen or Written?

Jeremy Grifski - Apr 29 '19 - - Dev Community

Earlier today, I published an article about the struggles of working in teams (it's a little personal, so apologies for the paywall). In that article, I wrote about a time when I was on a game development team, and I noticed someone do something I felt was truly horrific: they built a 100 by 100 game grid entirely by hand.

In other words, they created tile objects and hand positioned all 100 of them into a grid. Then, they gave each tile a name which corresponded to its position (i.e. (0, 0), (1, 0), etc.). From there, they wrote a script to find all tile objects in the scene, parse their names, and place them at the appropriate indices in a set of nested arrays. Naturally, the solution was unscalable, so we were stuck with that initial grid.

Honestly, I wanted to write a whole article about that story, but I don't really remember all the details. That said, I thought it would be fun to share what I could remember and see if anyone else had similar experiences.

I should mention that I'm not the first one to kick off this kind of discussion on the platform. Meghan Denny held a similar discussion over a year ago, so check it out!

Also, I don't intend for this to be a huge rant. I'm more interested in some of the lessons learned, so try to keep things positive and light.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player