by Kiro · 3y ago · 0 comments
If you manage to make a successful game don't take shit from anyone about the way the code looks. They're just Monday-morning quarter-backing.
Then there's cases like that Yandere Simulator game, the source code of which got released/leaked and apparently it was so bad that people were making videos taking it apart, but also possibly because they disliked how the developer was leading the project: https://www.youtube.com/results?search_query=yandere+simulat...
But also apparently even the Oracle database source code was pretty grim, this HN post and its top comment still bounces around my mind sometime: https://news.ycombinator.com/item?id=18442637
I wonder what other codebases exist, where the code is inspirationally bad, as in, to the point of making most folks feel better about whatever they're writing and to dispel the illusion of code always needing to be perfect.
Communities like /r/programminghorror (https://old.reddit.com/r/programminghorror/top/?sort=top&t=a...) and /r/softwaregore (https://old.reddit.com/r/softwaregore/top/?sort=top&t=all) are probably sobering in that regard as well.
All that's missing is a site that shows examples of a bad code and how to make the code better besides that, maybe with discussions and different suggestions, based on what people believe in.
I really don't enjoy the discourse regarding "code cleanliness". A lot of the time it's just about "I prefer writing things this way" rather than the code actually being slower/harder to read/maintain/whatever. There's a billion ways to write something and none of them are outright wrong!
He's the exact kind of "I'm the best" that every professional has run into before and cleaned up after.
This wasn't some amateur doing his best with limited resources to give a fun experience to the world, this was a hateful, angry person earning $3500 a month in patreon subscriptions begging for free 3D models from his fans, berating them for giving him free 3D models that "weren't good enough", and refusing to spend a single dime of that revenue on fixing, finishing, polishing, improving etc his abortion of a video game.
Agreed, that's why I think there's arguments that can be made in favor of both DRY/WET, as well as SOLID/CUPID/whatever, even when those are in contradiction with one another, as well as more freeform approaches and KISS/YAGNI. Whatever works for each team and project.
> There's a billion ways to write something and none of them are outright wrong!
However, when your app is doing 2000 DB calls to render a list with some data because of the N+1 problem, I'd say that the code is definitely written wrong. When you need to jump around 20 different files across 6 layers of abstraction that could have easily fit into half of that, then the code might definitely be wrong and unmaintainable.
Code formatting is nonstandard, but consistent. It's readable as text.
It's not very comprehensible as code. Lots of magic constants. Class game extends menu button? There isnt a whole lot of design here.
I've seen and written worse code, but I would not call this beautiful code, just well formatted.