• 0 Posts
  • 122 Comments
Joined 1 year ago
cake
Cake day: June 26th, 2023

help-circle










  • Some of this is probably just getting to know your tools. Learn the language, look at others’ code and interrogate what they did and why. The higher-order functions (scary-sounding term, but they’re not actually scary) you mentioned are useful, go learn them and use them.

    Some of it might also be (I haven’t seen your code) getting a better understanding of the problem you’re trying to solve. Figure out what all the separate pieces you need are, and then break those pieces into their pieces and so on, until you’ve got simple, self-contained chunks of functionality that you can give simple names to. Some of those might be functions, or you may find that they’re simple enough that they don’t need to be. Refactor and think about how to make the problem simpler. I think a lot of it is just staring at your work and dreaming of ways the make it simpler and easier to read.

    If you really want to optimize for performance, that can come later once you really have a feel for it.