On Dec 29, 2008, at 10:45 AM, Mark Volkmann wrote: > > On Mon, Dec 29, 2008 at 5:44 AM, Mark Volkmann > <r.mark.volkm...@gmail.com> wrote: > >> I would like to produce a version of the snake code that could serve >> as an example of the kind of code that the Clojure community thinks >> is >> "good". Unless it's part of an exercise to produce the shortest code >> possible, I think we should always write Clojure code with a goal of >> making it as easy as possible for others to read, while not >> attempting >> to serve as a Clojure tutorial. Again, my goal here is to get more >> developers to give Clojure a shot. >> >> My challenge to everyone on the list is to start with any version of >> the snake code you've seen and make it as readable as *you* think it >> should be by doing things like renaming variables and functions, >> adding comments and changing indentation. I'd really like to see what >> *you* think is the best way to write this code. The lessons learned >> from this exercise could then be applied to other code we write in >> the >> future. > > Okay, I took the challenge and produced a modified version of my > earlier code where I removed what I considered to be redundant > comments and did a little more renaming. You can see it at > http://www.ociweb.com/mark/programming/ClojureSnake.html. Feedback is > welcomed! > > I also started documenting some Clojure coding guidelines aimed at > making code more readable at > http://www.ociweb.com/mark/programming/ClojureCodingGuidelines.html > and would appreciate feedback on these. I expect there will be cases > where not following these is justified, which is why I refer to them > as guidelines instead of rules.
Much of Norvig's "Tutorial on Good Lisp Programming Style" is applicable to Clojure. http://norvig.com/luv-slides.ps [PS] http://www.cs.umd.edu/~nau/cmsc421/norvig-lisp-style.pdf [PDF] > > > -- > R. Mark Volkmann > Object Computing, Inc. > > > --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---