• @First@programming.dev
    link
    fedilink
    111 year ago
    • Don’t code in a language/style that requires you to write code that makes prefixing necessary - divide and conquer instead
    • Readable code and well written unit/BDD tests is much better than separate documentation that will go out of sync the minute another Dev does some surgical incision into the code
    • Be verbose if you need to in order to convey the relevant semantics, the characters are virtually free
    • Use the casing that is mainstream/recommended by its’ developers for the language at hand
    • @erogenouswarzone@lemmy.ml
      link
      fedilink
      English
      11 year ago

      I have to disagree on some points, but I def feel like you’re helping me learn, so for that I am grateful.

      I feel like you’re speaking from the perspective of a perfect coding environment, which if you have that, that’s great. Maybe all your code is in one place, maybe you have an IDE that does a lot of the work for you, and that’s great. However, for most of us, that’s rarely the case.

      Prefixes have been an absolute game changer for me personally, and I will never not use them again.

      I have also found that verbosity of variable name and readability are mutually exclusive. A long variable name, most of the time, takes away from the logic. Yes, they are “free” as far as memory, but are very expensive to reliability.

      Units tests, again are great, but most places think unit tests are like golden toilets. It sucks, but that’s the way it is. Usually you’re given a task, and if it’s not done next week, maybe you’re not as good as they thought.