Elektrine lite

← Feed

@TomF@mastodon.gamedev.place

Post #2716199

2026-04-24 19:25 UTC

So a top-notch coder should always be *thinking* one level below what you're writing. If you can't easily tell what's happening in that lower level, then your code is probably too complex and/or meta, and you're creating "write only code" - a debugging or performance headache for your future self.

Replies (4)

  • @meltedcheese@c.im 2026-04-24 20:05

    @TomF@mastodon.gamedev.place Absolutely. 💯 If nothing else, you can clobber yourself if you don’t know how data structures are implemented one level down. For example, I once had to use strings for implementing dynamic strided arrays. Lots of appending, prepending, insertion, deletion, etc. There was a x^2 penalty increase in memory and computation if you appended versus prepended! This was only evident at run-time. Luckily, someone else mentioned this online so I was able to make the optimization without suffering. You will be much happier if you know how your source language is implemented (compiled or interpreted).

    Open ##2716214

  • @mattpd@mastodon.social 2026-04-25 06:08

    @TomF@mastodon.gamedev.place On that note, also like John Ousterhout's "Always measure one level deeper", https://al.radbox.org/doi/10.1145/3213770. > "If you want to understand the performance of a system at a particular level, you must measure not just that level but also the next level deeper. That is, measure the underlying factors that contribute to the performance at the higher level."

    Open ##2716215

  • @TomF@mastodon.gamedev.place this reminds me of a point made in my early architectural design (buildings) career that you need to understand a design at the scale below the scale you were drawing at.

    Open ##2716216

  • @TomF@mastodon.gamedev.place Yes! Yes! Yes!!!

    Open ##2716217