Programmer and sysadmin (DevOps?), wannabe polymath in tech, science and the mind. Neurodivergent, disabled, burned out, and close to throwing in the towel, but still liking ponies 🦄 and sometimes willing to discuss stuff.

  • 0 Posts
  • 2 Comments
Joined 2 years ago
cake
Cake day: June 26th, 2023

help-circle
  • The older something is, the more people grow used to it, but also have had a chance to get burned by it:

    • C was released in 1972 (52 years), C99 was released in 1999 (25 years), hasn’t changed much since
    • C++ was released in 1998 (26 years), there are 7 versions of C++ with notable changes
    • Rust was released in 2015 (9 years), it’s still on the same 1.x version implying backwards compatibility

    Rust was created to fix some of the problems C and C++ have had for decades, it’s only logical that people like it more… for now.


  • Neither.

    If you can code it in a week (1), start from scratch. You’ll have a working prototype in a month, then can decide whether it was worth the effort.

    If it’s a larger codebase, start by splitting it into week-sized chunks (1), then try rewriting them one by one. Keep a good test coverage, linked to particular issues, and from time to time go over them to see what can be trimmed/deprecated.

    Legible code should not require “reverse engineering”, there should be comments linking to issues, use cases, an architecture overview, and so on. If you’re lacking those, start there, no matter which path you pick.

    (1) As a rule of thumb, starting from scratch you can expect a single person to write 1 clean line of code per minute on a good day. Keep those week-sized chunks between 1k and 10k lines, if you don’t want nasty surprises.