3
horus
2y

You deliver a new feature. After the functionality, how do you prioritize?

- having clear variable- and function names
- having meaningful and orthographically and grammatically spelled commit messages
- having a clean commit history
- having perfect linted syntax
- having it covered with unit-tests
- having a wonderful documentation

Comments
  • 0
    the unit tests, then the documentation, are the most important. the rest is luxury.
  • 0
    The same order as you’ve written them.
  • 1
    Linting isn't an issue if you have a half decent linter

    If the functionality can be tested without a substantial amount of new mocks, this is second. The more test code can be written and the less of that code is emulating dependencies, the more emphasis on testing

    Names are important, what can't be expressed through names goes in comments. I usually make sure a function does its job and then document and refactor it in a single phase, because this way I can make sure variable names represent added value besides a verbal description of the expression they were initialized with

    Commit messages I usually don't bother with unless I can describe what I did in a concise manner. This is something I know I'm bad at because I personally never really read commit messages; usually I find commits by line changed from the editor or a feature branch, in both cases the code is more useful information than the message
  • 2
    A clean commit history is even less useful to me than a good commit message, it's very time consuming and has a higher entry barrier than any other policy because you need to thoroughly understand Git, so I almost never bother with it. The moment I work with someone else they're gonna screw it up anyway
  • 0
    documentation first, tests come last
  • 1
    I'd say the most important are the tests. Next would be good naming, docs and linting.
    Two of my collegues are obsessed with vommota messages and history rewriting and never write tests until they are forced with a gun in their ass. Can absolutely not relate.
Add Comment