Nit: I wish people wouldn’t mention programming and computer science in the same essay, unless it’s something very technical such as discussing synchronization algorithms. Most programming isn’t science. Most programming isn’t even engineering. Most programming is contracting or DIY tinkering. We use ridiculous metaphors like constructing an airport, when most programmers are tradespeople working on renovations. Have…
Many games are held together by duct tape
31–40 of 155 posts
Re: Many games are held together by duct tape
#32I run a small MMORPG and I'm considering open-sourcing the whole thing but the code is a complete mess. The source code of VVVVVV is a work of art in comparison. What holds me back are 1. I'm ashamed to reveal the monstrosity 2. I'm afraid the code is too messy for anyone to be able to make contributions 3. it will make it much easier for hackers to find exploits. It's a shame because I think the game would be really…
Could you take pride in rewriting the code? Maybe as an open source adventure with others? Going through the shame of showing it off is more valuable on its own merits than leaving it as is, regardless of the code quality or social outcomes.
If you are working in a global company with a distributed workforce, well-written code is mandatory because it is a way to communicate and to maintain the code in the long term. Even more so if this is a critical code that could kill.
But if you started as a lone developer for a game hobby project, the achievement is not about the code quality, but more about the product as a whole you managed to ship and have users or customers.
So I don't think there is anything inherently shameful in writing bad code, it highly depends on the context
Re: Many games are held together by duct tape
#33Nit: I wish people wouldn’t mention programming and computer science in the same essay, unless it’s something very technical such as discussing synchronization algorithms. Most programming isn’t science. Most programming isn’t even engineering. Most programming is contracting or DIY tinkering. We use ridiculous metaphors like constructing an airport, when most programmers are tradespeople working on renovations. Have…
Actually most programmers I know are vastly intellectually overqualified for their jobs. We are talking like science PhDs.
It's not "tradespeople working on renovations" it's more like rocket surgeons making mud huts.
Re: Many games are held together by duct tape
#34Watching speed runners play through games is a great way to visualise not only this aspect (that games are flimsy at best), but to visualise the same practice in any software - if you don't code defensively, often a simple mis-input breaks the game. A common pattern in many speed runs is finding some glitch through a door, and then the game logic kicks in and says "you are past this door, so you must have got the key…
Thanks to Breath of the Wild, I've recently enjoyed watching a few speedruns and it's amazing to see the number of glitches in BoTW. Check this out https://www.youtube.com/watch?v=JEtHpCfi_DE I also don't understand how anyone can accept speedrunning through glitches as a world record, but I guess if everyone does the same run with similar or the same glitches then it's fair? Seems like it just becomes a race to know…
Re: Many games are held together by duct tape
#35Watching speed runners play through games is a great way to visualise not only this aspect (that games are flimsy at best), but to visualise the same practice in any software - if you don't code defensively, often a simple mis-input breaks the game. A common pattern in many speed runs is finding some glitch through a door, and then the game logic kicks in and says "you are past this door, so you must have got the key…
Thanks to Breath of the Wild, I've recently enjoyed watching a few speedruns and it's amazing to see the number of glitches in BoTW. Check this out https://www.youtube.com/watch?v=JEtHpCfi_DE I also don't understand how anyone can accept speedrunning through glitches as a world record, but I guess if everyone does the same run with similar or the same glitches then it's fair? Seems like it just becomes a race to know…
Re: Many games are held together by duct tape
#36Re: Many games are held together by duct tape
#37A friend of mine in gaming though had an insight I found illuminating. The difference with games though is that there’s often an element of “One and Done” in that unlike much of web development, the starting from scratch for the next generation is more of a given. There is less need for long term support as games are expected to meet its twilight much sooner. With web development however, it is a regular risk assessm…
I mean I still buy and play games that were made 20+ years ago. Shame they have so many bugs we can't really fix. I don't buy websites that were made 20 years ago. Almost every commercial site has seen multiple rewrites in that timespan.
But I often have to work on website code made 10 years ago. THe fact that it's used does not matter much. The interesting difference here is how long will the code be maintained.
Re: Many games are held together by duct tape
#38Earlier quoted context omitted.
s/web/software/ s/internet/everything/ I can't tell you how many times I have to reteach myself this lesson. I'm not advocating for writing sloppy/bad code on purpose but I fall into the trap way too often of trying to make my code a work of art or overly-clever. No one cares, don't spend twice the time to try to abstract something within an inch of its life. Write working code and move on. Once you've done something…
Sounds more like too little care rather than too much. Of course it also depends on how much maintenance is going to occur on that code. I think in production code one should already look for an abstraction if something is done twice. The goal is not to create a work of art or an abstraction that stands the test of time. It is just to remove some duplication, distribute code a little better over functions, give thing…
Now, I'm a bit more careful. There's a pretty famous quote by Sandi Mentz: "Duplication is far cheaper than the wrong abstraction."
https://www.sandimetz.com/blog/2016/1/20/the-wrong-abstracti...
Make sure that you're picking the write way to think about the task at hand, rather than blindly following DRY.
There are times when even a single instance of a code call would be made clearer with abstraction, and there are times where having the same piece of code duplicated multiple times (or duplicated with one piece changed) is far clearer than trying to abstract it.
This Reddit Comment also has an interesting take: https://www.reddit.com/r/programming/comments/5txp5t/duplica...
> The main purpose of abstractions is not to remove or reduce duplication, and not even to make code "reusable"; it is to make semantic patterns and assumptions explicit and, if possible, first-class.
The further comments provide more discussion.
---
I agree with the rest of your comment that refactoring and code-cleanup should be done in pieces and that, as with everything, striking the right balance is key.
Re: Many games are held together by duct tape
#39I run a small MMORPG and I'm considering open-sourcing the whole thing but the code is a complete mess. The source code of VVVVVV is a work of art in comparison. What holds me back are 1. I'm ashamed to reveal the monstrosity 2. I'm afraid the code is too messy for anyone to be able to make contributions 3. it will make it much easier for hackers to find exploits. It's a shame because I think the game would be really…
Re: Many games are held together by duct tape
#40To be fair,everybody in web development knows the same thing is true for the internet.
Web developers constantly need to fulfill new requirements so having a good level of code quality is important.