That makes me think that maybe there's a need for more books about Clojure. There are many introductory books but nothing more advanced such as best practices, patterns, etc... That's maybe a problem for someone like me who wants to "do things right" from the start. Should I read books about Common LISP and functional programming in general?
On Friday, December 27, 2013 5:55:57 PM UTC+1, Luc wrote: > > It took us some time to structure the code at the time and now > with protocols we went under a other restructuring a year ago. > > I agree this part can be hard (structuring the code) but at the time we > started > protocols were not yet there hence some of the restructuring. > Best practices also evolved for a couple of years. > It's much more stable these days. > > When I say write some code, well you need to choose a domain > aside from simple things like "hello world". Which makes it harder > to write some code :) but forces you to question yourself about > how to do this right the first time. > > > This is the list of my favorite items that I keep an eye on: > > a) abstractions, choose them according to your business domain, do not > try to re-invent the wheel or create alien terminology. > This is a starting point to get your name space structure right. > > b) In your APIs try to stay generic by not assuming implementation > details. > This step can be hard to achieve. Keep doors opened. > > c) You may want to redefine the implementations of > your abstractions or provide different flavors or some flexibility in > your APIs. > Protocols/multimethods become handy at some point here. > This is the part that may feel a bit like OO but this is the one you > have to > think last. (remember point a and b) > > d) Do not hesitate to refactor. There's less code than in most other > languages > that get some support for refactoring from their IDE so you should not > wait until it becomes a mess. If a name space is not rightly named > anymore, > chane it. If more separation of concerns is required, add/change name > spaces accordingly and reorg the code. > > e) A good indicator of the stability of your APIs is how much your test > code > gets messed up when you do change something. It could be > related to implementation details leaking out, bad choice in name > space > design, .... > > I am not an advocate of TDD but at some point when the code of a > name space is stable enough, a few test cases can be used as > health signs. > > f) Search for existing librairies, there are enough of them out there, > either Java libs with/wo Clojure wrappers or Clojure centric ones > to speed you up not having to rewrite the universe. > > g) Read the code of the libs you are pulling in as you go along. > This will probably light a bulb in your brain about tricks you should > apply to your code. > > The above should sound familiar :) It's not that different in Clojure to > me > than in many other languages. > > If you have some specific concerns, send them to me off line. > I may share some code privately to answer some of your questions. > Sorry for the other folks on this thread but there are copyright issues > here :) > > Luc P. > > > I've seen Clojure in action and I know it's extremely concise and > > expressive. What I wanted to know is how it copes with complexity when > you > > develop complex systems. You can't get an idea of that just by writing > some > > code and getting a feeling about the language, IMHO. When I studied OOP > at > > University my professors taught me that OOP was extremely successful in > > reducing the complexity of big systems. I was given many examples of > that > > in the many courses of software engineering I took. FP was relegated to > > some theoretical courses about paradigms. With such a background it's > not > > easy to accept some of the things the Clojure community claim. The fact > > that I'm here asking questions should mean that I'm more open minded > than > > most :) But please understand where I'm coming from. > > > > On Friday, December 27, 2013 3:50:23 PM UTC+1, Luc wrote: > > > > > > I would add that you *need* to > > > write some code to get a feeling > > > about a new language. > > > > > > Feature comparisons may help you up > > > to a certain degree. However deciding about how efficient > > > you may become using a new language requires you to dive at > > > least a bit into it. Not all brains are wired the same. > > > > > > Luc P. > > > > > > > Then we have more in common > > > > than you may think :) > > > > > > > > I learned Ruby first, went through > > > > Scala which appeared in the same > > > > time frame, > > > > all this to pick up the language of > > > > choice to replace Java and Ruby > > > > which we used to prototype our > > > > product. > > > > > > > > All this took around 9 months > > > > including the time to get the prototype > > > > working. > > > > > > > > Choose carefully... :) > > > > > > > > Luc P. > > > > > > > > > The point is that Clojure is not the only modern language out > there. I > > > > > can't possibly learn them all in depth just to decide which > language > > > to use > > > > > for my production code. That would be time-inefficient because my > goal > > > in > > > > > not to learn languages, but to pick up a new language suitable for > my > > > needs. > > > > > > > > > > On Friday, December 27, 2013 3:04:18 AM UTC+1, Luc wrote: > > > > > > > > > > > > This depends strictly on your learning speed which I will > > > > > > not comment here :) > > > > > > > > > > > > It took me three months full time to start to feel at ease with > > > > > > Clojure writing production code and I was around 45 years > > > > > > old at the time. > > > > > > > > > > > > Learning is never inefficient... when you want to learn. > > > > > > > > > > > > Luc P > > > > > > > > > > > > > > > > > > > On Thursday, December 26, 2013 11:04:00 PM UTC+1, Luc wrote: > > > > > > > > > > > > > > > > Ok I'll drop the subject. Still cannot understand why people > > > cannot > > > > > > > > try something new w/o sticking to the stuff they know > already > > > until > > > > > > they > > > > > > > > are > > > > > > > > totally immersed in the new thing. And by that I mean use > the > > > new > > > > > > thing as > > > > > > > > it was intended. > > > > > > > > > > > > > > > > Then you can generate useful conclusions and get some > benefits > > > from > > > > > > > > this learning process. > > > > > > > > > > > > > > > > > > > > > > Learning every single language just to find the right one is > not > > > very > > > > > > > time-efficient. > > > > > > > > > > > > > > -- > > > > > > > -- > > > > > > > You received this message because you are subscribed to the > Google > > > > > > > Groups "Clojure" group. > > > > > > > To post to this group, send email to > > > > > > > clo...@googlegroups.com<javascript:> > > > > > > > > > > > Note that posts from new members are moderated - please be > patient > > > with > > > > > > your first post. > > > > > > > To unsubscribe from this group, send email to > > > > > > > clojure+u...@googlegroups.com <javascript:> > > > > > > > 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+u...@googlegroups.com <javascript:>. > > > > > > > For more options, visit > https://groups.google.com/groups/opt_out. > > > > > > > > > > > > > -- > > > > > > Luc Prefontaine<lprefo...@softaddicts.ca <javascript:>> sent by > > > ibisMail! > > > > > > > > > > > > > > > > -- > > > > > -- > > > > > You received this message because you are subscribed to the Google > > > > > Groups "Clojure" group. > > > > > To post to this group, send email to > > > > > clo...@googlegroups.com<javascript:> > > > > > > Note that posts from new members are moderated - please be patient > > > with your first post. > > > > > To unsubscribe from this group, send email to > > > > > clojure+u...@googlegroups.com <javascript:> > > > > > 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+u...@googlegroups.com <javascript:>. > > > > > For more options, visit https://groups.google.com/groups/opt_out. > > > > > > > > > -- > > > > Luc Prefontaine<lprefo...@softaddicts.ca <javascript:>> sent by > > > ibisMail! > > > > > > > > -- > > > > -- > > > > You received this message because you are subscribed to the Google > > > > Groups "Clojure" group. > > > > To post to this group, send email to > > > > clo...@googlegroups.com<javascript:> > > > > > Note that posts from new members are moderated - please be patient > with > > > your first post. > > > > To unsubscribe from this group, send email to > > > > clojure+u...@googlegroups.com <javascript:> > > > > 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+u...@googlegroups.com <javascript:>. > > > > For more options, visit https://groups.google.com/groups/opt_out. > > > > > > > -- > > > Luc Prefontaine<lprefo...@softaddicts.ca <javascript:>> sent by > ibisMail! > > > > > > > -- > > -- > > You received this message because you are subscribed to the Google > > Groups "Clojure" group. > > To post to this group, send email to clo...@googlegroups.com<javascript:> > > Note that posts from new members are moderated - please be patient with > your first post. > > To unsubscribe from this group, send email to > > clojure+u...@googlegroups.com <javascript:> > > 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+u...@googlegroups.com <javascript:>. > > For more options, visit https://groups.google.com/groups/opt_out. > > > -- > Softaddicts<lprefo...@softaddicts.ca <javascript:>> sent by ibisMail from > my ipad! > -- -- 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.