Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
xenira7658yI only include salted hashes of my comments. Now all the evil h4ck3rs cant decrypt them
-
I prefer not commenting on easy code and commenting on hard code so all code is understood at the same level of hardness.
-
n1had22998y@tisaconundrum thanks, now I'll always convert my comments to binary
Maybe even Morsecode -
@tisaconundrum You comment literally in ones and zeroes or comment (hex editor?) the binary file? If the second choice - do you at least give the courtesy of not stripping the dev release?
-
shasha3448yIf you're a professional you should comment your code if it's not trivial. Sometimes the code is self explanatory, sometimes you should search through many files to understand just few lines of code.
First, you have to write good code which does not require comments. That doesn't happen most of the time.
If you're expecting that people just understand because you do at the time of writing try looking to your code after a year. Still clear? That means you're project has the complexity of a 'Hello World!'.
Second, projects require documentation. That is a way of documenting something. -
@shasha in my experience 9 times out of 10 you're not writing for other people - it's for the future you! So really how much time do you want to spend with it down the road? If you like puzzles without all the pieces or if you're a professional code golfer (note to self: does that exist?!) Then no comments, otherwise don't be a jerk to future you.
-
@shasha completely agree. For sale of completeness and by way of example, here is a recent commit to "ls.c" -- literally a patch for the 30 year old ls command (if your on Windows.. don't worry, I'm sure 'dir' is well commented but that code is a golden trade secret. Last commit was during cold war ( :) Anyways.. http://git.savannah.gnu.org/cgit/... I think there is more comment than code, but suffice to say that the devs are "professionals"
-
I sometimes write comments before code as a way of organising my thoughts as to what the code should do before I write it.
-
@chrisrhymes great tip. Thx man.(right now i am on simple stuff so i don't need it. But later it will be helpful.)
-
@bp85 I think that was addressed at me?! I don't normally go by bloke but wth...
It's not that I want to, but rather if a bug ticket comes back and people refuse to touch it unless you're out of the office. Personally, I was taught to pull the ticket, fix, verify, ship it, but this shop's different I guess. -
jeffreestar1220dLike many aspects of programming, the decision to comment or not depends on the specific context and the preferences of the development team
-
timothyferriss-3220d@jeffreestar Striking the right balance between clarity, conciseness, and documentation is key.
Real programmers don't comment their code. It was hard to write, it should be hard to understand.
undefined
oneliner joke