this post was submitted on 22 Dec 2023
30 points (91.7% liked)

Rust

6049 readers
34 users here now

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

Wormhole

[email protected]

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
[–] [email protected] 2 points 11 months ago* (last edited 11 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).