Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
Cyanide58989dVToMap does V TO MAP. Ha! Simple as that.
Cyanide58989dJoke apart, I agree with you. Comments should be there. In every code. No excuse.
enclaver1169dI would comment on vtomap. But i hate seeing unnecessery comments
There should be comments but they should answer question 'why' instead of 'what'.
There 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.
I 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
Also, 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