> Now it's been a long while since I wrote code to put food on the table - > but back then if I saw C or C++ code written like this I would describe it > as obfuscated - the sort of thing I would expect to see in the (now > defunct?) annual obfuscated C competition. It's concise and rather clever, > certainly, but hardly self-documenting: it's not very clear what it's doing > at all- with a couple of magic numbers thrown in for good measure. Rather > arcane in fact.
Actually there is no such thing as "self documenting code". In order to understand code one must "be the machine", a skill that is long in the making. There is nothing wrong with concise, clever code. It is, after all, written for the machine. However, if code needs to be maintained it is probably best to write English text. In order to understand text one must "be human", a skill I can't rightly claim on my resume yet. But writing "for the human" is important if code to live beyond the original author. Notice that thousands of Sourceforge/github/Savannah projects are considered "dead" because the author stopped changing it and nobody else understands it. The code still works and is probably very concise, clever, and efficient. Death awaits undocumented code. There was a conference in Portland called WriteTheDocs (http://conf.writethedocs.org). They should be posting videos shortly. I gave the talk on "Literate Programming in the Large". There are a lot of people begging programmers to write text. Not everyone has internalized the "fetch-execute cycle". Those that have are not going to waste cycles decoding "self documenting code". Tim Daly Curmudgeon at large. -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.