3

Is it normal for developers to have to code first to design and not document what they did until they are completely done? I usually write basic docs before starting and progress it throughout the development process.

Comments
  • 3
    What is this "document" thing you are saying?
  • 1
    It’s good that you are, it really helps to ramp up new people who join the team. As long as it doesn’t give away too many implementation details which can change frequently
  • 5
    It depends. When I don’t know in advance how the structure will look like, then I don’t add any comments because they will need to be rewritten completely after that part of the code is done.
    If it’s trivial or if I already have a good idea of what it will look like, I write the documentation right at the beginning.

    The most important thing is to not write useless documentation if the code is sufficient and to write self documenting code instead. Explicit documentation should be rare.
  • 2
    it's objectively a bad choice, but very very normal. 100% of the places i've ever worked at deliberately do this while simultaneously lamenting that there's no documentation for any of their code. what can you do, people are stupid.
  • 5
    @Lensflare

    "Explicit documentation should be rare."

    // increment me

    me++;

    // increment me harder

    me += 10;
  • 1
    @Demolishun exactly 😄
  • 0
    Normal? Yes.
    Should you do that too? It depends on your particular case
  • 0
    Basically what @jestdotty and @lensflare said. If it's small, you can start right away and then document when you know where you're going to. If it's bigger, at least draw a basic design to know how stuff will interact.

    What you should always do and I really mean always: if you're using some crazy logic, you should always (repeat: always) and instantly document what you're doing cause even your future me will have trouble sometimes. Document it as if you had to explain it to an idiot or you will hate yourself if you ever have to work on it again. Plus: others will hate you even more :p
  • 1
    Aim for agile development. You can't document shit before you've gone through some iterations, and documentation is usually outdated the second you save it.

    Let your code speak for itself, aided by some overview documentation that shows concepts and a birdseye view of what you're building.
  • 0
    Well yes, especially when time is off the essence due to deadlines.
    Deliver first & ask questions.
    Also do designs & docs later.
  • 0
    Good devs document their code on the go, this is why i use sublime text and not the shitty VScode.

    But, yes, sadly people document AFTER writing code which is counter productive and time consuming. AND ONLY IF THEY DO IT AT ALL !
Add Comment