Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
Cyanide857371dVToMap does V TO MAP. Ha! Simple as that.
Cyanide857371dJoke apart, I agree with you. Comments should be there. In every code. No excuse.
enclaver11571dI would comment on vtomap. But i hate seeing unnecessery comments
electrineer337171dThere should be comments but they should answer question 'why' instead of 'what'.
EpicNewton6370dThere 2 ends of the story stupid comments on methods like getters which say “gets the name” are just polution. And no comments at all is just a middlefinger to the next developer who touches that code.
I believe that eveything in your code schould have a purpose. So comments should have a purpose to clarify business logic or explain complex parts.
Proximyst246670dI usually do obnoxiously long and descriptive names instead of comments. A standard thing could be:
(defn concatentate-and-prefix-strings [arg & rest]
(str *prefix* arg (string/join rest " "))
Small functions with obvious names and obvious code is much better than commenting everything
simulate291670dAlso, commenting helps you as the author yourself. If you can't comment your code well, you can't talk about your code and you are probably not implementing a well articulated design.
Maybe one should even write a few comments before writing the first function?
Your Job Suck?
Take a quick quiz from Triplebyte to skip the job search hassles and jump to final interviews at hot tech firms
Get a Better Job