• xmunk@sh.itjust.works
    link
    fedilink
    arrow-up
    19
    ·
    11 months ago

    I’d rather people err on the side of readability… senior devs should know the importance of readability but still lay decent groundwork towards performance… do things the right way when it can be simple.

    Junior developers should just focus on readable code. Chances are their code will be slow, indecipherable, and wrong - I’d rather they focused on fixing the indecipherablity, the wrongness, and then the speed.

    But, to sort of generally undermine my own point - no rule should be an absolute in software development - sometimes premature optimization is totally justified - you just need to use common sense.

    • xxd@discuss.tchncs.de
      link
      fedilink
      arrow-up
      5
      ·
      11 months ago

      I agree that junior devs should focus on readability, rather than focusing on everything and just getting it all wrong. but as you say, if you have more experience, performance should be a point of consideration.

      • CapeWearingAeroplane
        link
        fedilink
        arrow-up
        2
        ·
        11 months ago

        I think people talking about premature optimisation are often talking about micro-optimisations. Those are almost always unnecessary until you’ve identified choke points. Optimising the overall architecture of the code base on the other hand, is in my opinion something that should be thought about before you even start coding. That’s where the major gains can often be done anyway.