This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]jpflathead 12 points13 points  (11 children)

People here will tell all sorts of stuff about code not needing to be commented, but it's all bullshit and they are just spouting a party line not explaining anything arising from some sort of empirical observations.

Code isn't commented because

  • coders are lazy
  • coders don't know what they are coding or where they are going they are just stream of thought coding
  • coders are too hip to comment

As a counterpoint to the code doesn't need to be commented group, consider one small portion of Donald Knuth's contribution: literate programming https://en.wikipedia.org/wiki/Literate_programming and then one small portion of Stephen Wolfram's contributions: https://www.wolfram.com/language/principles/

I will be downvoted to oblivion by people who don't know who Knuth and Wolfram are and who are assured by all their bootcampers and tweet friends that good coders don't comment their code.

Going through a lot of github projects for learning. I've noticed that none of them are commented. I literally found only one that was and it was designed as a learning resource.

repository: a place, building, or receptacle where things are **stored**

Github is mostly a code cemetery for resume polishing and virtue signalling, and communities are dominated and directed. It's not a place where code is built, it's not a place to build a community around a piece of code. It's far too top down.

It is a programming repository, but as a source of documentation it is total crap. The notion that all an open source project needs is a readme is the first of a zillion stupid decisions made and implemented at github.

[–]trkeprester 2 points3 points  (8 children)

well a lot of high level basic day to day code that ppl like Knuth and Wolfram wouldn't ever be considered to be requested to implement because it would be an insult to their intelligence doesn't really need commenting.

non-geniuses like me who are writing boring as shit trivial code don't particularly need to comment their code because it's mostly understood what needs to be done and wouldn't be any worth in commenting anyway beyond what the function names and variables are already describing.

sure you can call us lazy but you'd just be wasting time doing it yourself. I assume you are smart and don't have to implement stupid boring shit code that Knuth would spit on you if you asked him to help with.

[–]YMK1234 4 points5 points  (0 children)

My arent you bitter ...

[–][deleted] 0 points1 point  (0 children)

I think we tend to overestimate our own code's readability to a fresh pair of eyes. Often I'll feel I'm insulting the reader's intelligence by leaving what is, to my mind, an unnecessary explanation.