Fork me on GitHub

i want to practice some clojure fullstack programming. i've been able to install clojure(script) tooling now (although i am still not sure about what editor to use), and i need some book, or course or something that would guide me to learn the most common patterns, any suggestions? i already understand the syntax and i used csp and datascript before, so that i am less curious about. more about data modeling inside clojure. like if i have some random postgres dump, how to do something with it.


@U0VQ4N5EE I'm not sure how much you already know but if you like books then "Living Clojure" by Carin Meier is a good start. If you already know most of that stuff, then "Clojure Applied" is the very good and practical book (but not exactly for beginners) to teach you some domain modeling, etc.


as for the editor, I love spacemacs. It has some learning curve, but I've found it very pleasant. (and I did use Intellij IDEA a lot in the past thus I could easily chose Cursive but decided otherwise 🙂 ). If you're curious to learn a bit about my spacemacs workflow checkout


i only have a small netbook with 8G ram


i would like to use the most lightweight setup possible


spacemacs is a bit heavy i think, although maybe it can be configured to be fast?


and thanks for the book suggestions, will check out when i will have enough money to buy them


When I was using Clojure on a small netbook, I tended to use plain ol' Emacs. I would expect either that or Vim to be your most lightweight options.


Spacemacs doesn't seem very heavy to me, so you might want to try it before deciding against it, but vim is definitely the lightest-weight option (unless you want to use, say ed 😉 ).


In a fdef spec, how much detail should I add to the :fn before I just start putting them into my unittest project?


@grierson fdef specs can be extremely useful with or without a :fn clause -- even just checking the args is worth a lot. I'd add them to your project as soon as you feel they add value.


@eggsyntax I agree, adding fdef's has helped me a lot. I understand :fn is used to check the functionality by using property based testing but I was wondering were the line is between adding to :fn or adding to the unit test project.


Oh, I see, I think I misinterpreted your question — I thought you meant, “how complete does an fdef need to be before I add it to my project,” but based on your response I think you’re saying, “How complex can the :fn clause of an fdef get before it’s better to move the contents out into a unit test.” I have no useful insight on the latter 🙂 . I’ve mostly kept my :fn clauses fairly simple.