Re: Newbie requesting review

2013-03-11 Thread Marko Topolnik
> That's what the web ui expects (I'm not really using teachers and > students, but the actual data we do use is camel case) and there's actually > a really good reason it uses what it uses. I'll make sure I didn't miss > any others though, thanks! > You still have the option that I've ment

Re: Newbie requesting review

2013-03-11 Thread Craig Ching
On Monday, March 11, 2013 6:35:09 AM UTC-5, Marko Topolnik wrote: > > > This kind if formatting hurts readability for people used to the style > that most Clojure code adopts, which would look something like this: > > (defn- make-student [teacher-name student-name age] > {:id (str teacher-name

Re: Newbie requesting review

2013-03-11 Thread Craig Ching
Hi Gary, On Monday, March 11, 2013 6:02:12 AM UTC-5, Gary Verhaegen wrote: > > For the sake of nitpicking, you are still using camelCase instead of > hyphenation in make-student. > > This part? {:id (str teacher-name "!" student-name) :TeacherName teacher-name :StudentName

Re: Newbie requesting review

2013-03-11 Thread Marko Topolnik
On Monday, March 11, 2013 2:18:32 AM UTC+1, Craig Ching wrote: > Ok, I *think* I understand what you're saying. I did try an anonymous > function at one point, but gave it up, I don't know why I did because it > ended up working pretty well after reading your advice. How's this then? > > (defn

Re: Newbie requesting review

2013-03-11 Thread Gary Verhaegen
For the sake of nitpicking, you are still using camelCase instead of hyphenation in make-student. On 11 March 2013 02:18, Craig Ching wrote: > Alright, thanks Gary and Marko, I really appreciate the advice! > > > On Sunday, March 10, 2013 8:26:47 AM UTC-5, Marko Topolnik wrote: >> >> Several comm

Re: Newbie requesting review

2013-03-10 Thread Craig Ching
Alright, thanks Gary and Marko, I really appreciate the advice! On Sunday, March 10, 2013 8:26:47 AM UTC-5, Marko Topolnik wrote: > > Several comments: > > 1. camelCase is not idiomatic for Clojure. Prefer lowercase-dashed-style. > > 2. use :keywords for map keys and, more generally, for any > e

Re: Newbie requesting review

2013-03-10 Thread Marko Topolnik
Several comments: 1. camelCase is not idiomatic for Clojure. Prefer lowercase-dashed-style. 2. use :keywords for map keys and, more generally, for any enumeration-type values (coming from a closed set of options). If you want JSON output, transform these into camelCased strings only at the "ch

Re: Newbie requesting review

2013-03-10 Thread Gary Verhaegen
Your code looks fine to me. One alternative for make-students would have been (defn make-students [teacherName n] (map #(make-student teacherName (make-student-name %) 0) (range n))) In case you're not familiar with it, the #() notation creates an anonymous function in the same way as (fn [_]

Newbie requesting review

2013-03-09 Thread Craig Ching
Hi all, I wrote some code to generate some example data for a web ui that I'm working on and I was wondering if I could get some advice about it to ensure I'm on the right track in my clojure learning. Basically its a very simple program that generates a number of JSON files that contain info