Hey Tim, Just wanted to say thanks for this post and this is a great discussion. I have the privilege of being able to spend a small amount of my time working on "official unofficial" projects at my work. I had seen an earlier post by you where I think you may have posted the same code to extract source from a literate file. I had always been intrigued by literate programming and your post especially inspired me to try it out.
I've now written a substantial amount of my project in Clojure in the literate style. I'm using the "HTML" version of the literate syntax + markdown and writing in vim. I just wanted to chime in that one of the biggest things I've noticed was how much more scrutinized my code has become. In trying to describe my code to the reader, I'm looking it over much more than I ever normally would and it's forcing me to really think about my design decisions. Anyhow, just wanted to thank you for your inspirational words and I'm excited to check out your video. Sincerely, Michael O'Keefe On Wednesday, February 1, 2012 5:51:53 AM UTC-7, daly wrote: > > On Wed, 2012-02-01 at 10:43 +0000, Sam Aaron wrote: > > On 30 Jan 2012, at 17:07, daly wrote: > > > > > > The key result was that I discovered what I call my personal > > > "irreducible error rate". If I do 100 things I will make 3 errors. > > > This was independent of the task. So typing 100 characters has > > > 3 wrong letters which were mostly caught while typing. Writing > > > 100 lines of code had 3 errors somewhere. Composing email > > > introduces 3 errors per 100 lines of code. > > > > I wonder if that rate has changed since the time you measured it. > > > Unfortunately not. However I am now able to identify several > errors that I continue to make. The 2/3 keys get mistyped. > The _/+ keys get mistyped. I seem unable to overcome this. > Which is really bad considering my hobby is computer algebra. > > The largest contribution to my errors is using copy/paste. > It is responsible for about 50% of all errors. If I could > convince myself to stop using it my error rate would drop. > On good days I don't use it but I get lazy. > > Curiously I do have a lower error rate in Lisp than I do in > other languages. In C, for instance, I get caught by things > like float to double conversions on calls, despite knowing > about it. In Java I miss the null case checks despite being > aware that Java is brain-dead about null. In Python I skip > "self"ing things. In Javascript I miss the 'var' occasionally. > > Lisp "just works" and works just as I expect. It eliminates > whole categories of errors. (The most annoying thing about > Clojure is the "null pointer exceptions" from Java.) When > I want solid, correct code I reach for Lisp. For random > segment faults, C. For heap exhaustion or null pointers, > Java, etc. Rich did a marvelous thing by forcing alter to > require dosync. It eliminates a whole class of errors. > > When I find a mistake I still try to find the root cause. > Then I try to change what I do so the mistake cannot exist. > This changes the type of possible errors but the 3% is still > there. I just make "more sophisticated, higher level errors". > I am hoping that Literate Programming will raise my errors > to truly epic proportions :-) > > One of my personal motivations for literate programming is > to eliminate errors. I have no tool that will catch errors > in reasoning, missing cases, bad design, mindless stupidity, > and horrible inefficiency. Writing an explanation of the > code is the best way I have found to catch errors of this > kind. > > One of Rich's stated motivations for Clojure was that he > found concurrent programming in various languages to be > very error prone and wanted to create a language that would > eliminate concurrent errors. In some sense, we are trying > to achieve similar goals. > > So Literate Programming is not about tools. It is about a > change in mindset. I want to be a better programmer and this > is an effective tool to help me generate higher quality (ie > less buggy) code. > > Tim Daly > > > -- 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