Monday, July 16, 2012

Just write less, will you?

There are Alan Kay's comments re: you cannot understand programs with O(10^7) lines of code, and Ian Piumarta's comments re: ideally you would have programs written very succintly because then you have a chance to read and understand them within your lifetime.

And it's not just code.  There is also the problem of simply saying a lot of words without really saying anything useful.  A significant amount of social media text traffic follows this pattern.  And so does the media's comment section.  Most such stuff is gibberish.  You shouldn't feel entitled to write such things and then think you did "something" useful, just because *you can*.  The issue is that then someone else will have to read all that, and have to make sense out of it.  Sifting through the garbage is extremely time consuming, particularly when there is a lot of it.  Faced with the impossibility of dealing with gibberish, there are two options: either you do not read it, or you delete it.

All of a sudden, doing "something" isn't that helpful, huh?  Either people read it without paying too much attention (perhaps adding their own layer of stuff on top of yours), or nobody reads it, or someone deletes it.  Gibberish is just profoundly useless.  So stop making so much of it, already!  For example...

  • When you write test suites, write the test suite so it enumerates all interesting cases itself.  If you cannot, at least be complete and write test cases for *all* cases.  If not, there's always the lingering suspicion the code is just junk.
  • When writing software in general, and C in particular, pay attention to *every single detail*.  Being productive is not a matter of producing a lot of code, it's more about writing something others can depend on.  If you don't do your homework, then others will have to clean up behind you at great expense of time.  Or will just not read it, or delete it...
  • Stop writing comments that anyone else could write.  Take a hint from G. H. Hardy already: by definition the majority's opinion already has enough exponents, so stop repeating the argument of the majority.  Similarly, follow Dijkstra's advice and solve problems that only you can solve.  If there's somebody else that could fix the problem, then don't do it: chances are many will get the idea to fix whatever at the same time, and it will result in duplication and loss of time.  Therefore: no more comments about what somebody else said, no more "sharing" google results for the sake of grabbing attention, and no more comments about the obvious.
We have an enormous capacity to produce stuff, but we should stop and think if we really should.  Otherwise, just dealing with what we produce will lead to stuff we don't understand because the junk overload makes it harder to concentrate.  And if we don't understand what we have, then we won't be able to use it to achieve our goals.  Even our goals will be distorted by the sheer amount of nonsense.  And who can succeed like that?

Really.  Take your time before you speak.  Make the thought worth sharing before you open your mouth or tap on the keyboard.  And if it's not worth it... just don't do it.  Please.