this post was submitted on 22 Dec 2023
28 points (91.2% liked)

Rust

5999 readers
64 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] sugar_in_your_tea@sh.itjust.works 2 points 10 months ago* (last edited 10 months ago)

I agree for the most part, with some exceptions

  • test the easy things - having a test suite that passes feels good, having some tests makes it easier to add more later, and testing utility code is usually pretty easy and important
  • make the important decisions correctly, the rest can be sloppy - e.g. decide early if you need async or multi-threading and get the signatures of your core code right, then take shortcuts on the rest
  • don't refactor unless it's blocking new features - it's easy to get sucked into "perfect code," so leave notes instead of doing the refactor

Basically, follow the 80/20 rule, get 80% of the important stuff right for 20% of the effort. Once everything is working, add more tests and refactor while getting feedback from users (if applicable).