mogwai_poet,
@mogwai_poet@mastodon.social avatar

You may have seen the Balatro Discourse, which consists of people looking at a screenshot of code that it straightforward and getting angry that it's not more complicated.

I'd just like to posit here that a straightforward solution is an excellent default and you should have a really solid argument for the advantages of a complicated solution before you choose it.

jmac,
@jmac@masto.nyc avatar

@mogwai_poet Also, I am convinced that giant carbo-chains of if-elses power 90% of all code in production, worldwide.

mogwai_poet,
@mogwai_poet@mastodon.social avatar

@jmac Extremely plausible

jmac,
@jmac@masto.nyc avatar

@mogwai_poet There is also this now-deleted but memory-indelible Terry Cavanagh tweet from early 2020: "Every screenshot I see posted of terrible things in the VVVVVV source code only makes me more powerful"

(Cited in this Polygon article: https://www.polygon.com/2020/1/13/21064100/vvvvvv-source-code-game-development-terry-cavanagh-release)

foone,
@foone@digipres.club avatar

@mogwai_poet I ranted about that one on Tumblr, from the perspective of someone who does reverse engineering: every published game does this kind of shit, because that was what was needed to get it released. I'd rather have an inelegant game that exists than a perfectly architected unfinished prototype

tomw,
@tomw@mastodon.social avatar

@foone @mogwai_poet Video game code is very much not the place for some fancy class inheritance pattern or whatever. If/then all the way

Nifflas, (edited )
@Nifflas@mastodon.gamedev.place avatar

@mogwai_poet I'm not intending to get too mixed up in that. On one side, if it works it works. The main skill of making a game is honestly just be able to make and especially finish it. Anything that gets a game done is good

I really value good abstractions tho, they save me huge amounts of time these days and lower the technical debt by far - but it took me years of making messy convoluted spaghetti abstractions that in many ways accomplished the opposite, to finally get good at that craft.

mogwai_poet,
@mogwai_poet@mastodon.social avatar

@Nifflas Yeah, if I saw this code in a project I was working on I would definitely look for a possible refactor. But there isn't an obviously correct fix just looking at that screen shot.

And that code, as it is? Pretty readable. Pretty obvious what it does and how to make changes.

Nifflas,
@Nifflas@mastodon.gamedev.place avatar

@mogwai_poet Oh yeah, no disagreement at all, and there's a great cost in using the wrong abstractions. I've become careful to not start adding abstractions before I'm confident about what those abstractions should be.

The better I get, the less I want to tell people rules about how they should do things. My own coding style have disadvantages too and others may value different things.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • magazineikmin
  • vwfavf
  • thenastyranch
  • Youngstown
  • slotface
  • Durango
  • ngwrru68w68
  • rosin
  • kavyap
  • tsrsr
  • PowerRangers
  • osvaldo12
  • khanakhh
  • normalnudes
  • hgfsjryuu7
  • cubers
  • everett
  • cisconetworking
  • InstantRegret
  • mdbf
  • tacticalgear
  • ethstaker
  • tester
  • modclub
  • GTA5RPClips
  • Leos
  • anitta
  • All magazines