Hacker News Comments on
The Joy of Clojure
·
3
HN comments
- This course is unranked · view top recommended courses
Hacker News Stories and Comments
All the comments and stories posted to Hacker News that reference this book.I approached learning Clojure the way I approach learning everything else. I survey the resources available, then pick the two best books. Ideally, I want them to come at it from different perspectives. e.g. one may place an emphasis on doing stuff with Clojure while another may be more about functional programming.At the time, they were:
https://www.amazon.com/Clojure-Programming-Chas-Emerick-eboo...
https://www.amazon.com/Joy-Clojure-Michael-Fogus/dp/16172914...
I then wrote a data processing app in Clojure; consuming financial data and finding patterns in it.
My suggestions are: 1) If this is your first time learning a functionally-oriented language, clear your mind from any kind of assumptions picked up from other languages.
2) Get a handle on the core tenets of functional programming: immutability, purity, composition, and functions as objects. If you know Javascript, then a lot of this stuff may already be familiar to you. JS is underrated in that department imo.
3) To me, writing programs with Clojure is akin to playing with Lego. You write your base functions, then higher-level functions which use those base functions, and so on. Functions all the way down.
4) Write something with it; it'll force you to decompose your program and think functionally.
Clojure is a simple, opinionated language. I don't think you'll have a hard time picking it up at all. The hard part will be to think in a manner amenable to it.
These days, I think Clojurescript has overtaken Clojure in terms of traction, so if you're into webdev, then CJS would be a natural next step.
⬐ happyslobroWhere did you get this financial data for your first project? Is it a public feed / API? This sounds like exactly the sort of thing that I would like to start playing and eventually working with. I had been assuming that this type of data would only be available to the kind of entities that have a compliance officer, but I would love to have that assumption proven wrong.⬐ Veen> You write your base functions, then higher-level functions which use those base functions, and so on. Functions all the way down.I'm hoping to follow a similar trajectory to you, but with Elixir instead of closure. At the moment though, I tend to do things the other way around: write the top level functions and then fill out the base functions.
So I'd start a module with
def whatever(something), do: something |> function1 |> function2 |> function3
Then I'll write function1, 2, and 3 and whatever helper functions they need. And so on until it works. Maybe doing it your way is a better approach: helps you think it through first.
(although I'm aware some would say that tests should come before everything else anyway)
⬐ fsloth"some would say that tests should come before everything else anyway"Which some others consider a cargo-cult practice if done mandatorily for it's own sake.
Good luck on your studies!
⬐ bpicoloIt is useful and necessary to use both directions at times. You can't always presuppose the relevant details. But do be ready to factor away functions at a moments notice
Clojure: The Joy of Clojure. Not for beginners, but it's excellent.http://www.amazon.com/Joy-Clojure-Michael-Fogus/dp/161729141...
I've heard good thing about Clojure for the Brave and True, free online:
⬐ brudgersHalloway's Programming Clojure isn't exactly recent, but it's available used, has a lot of depth like Joy of Clojure, but is targeted at beginners. Clojure from the Ground Up is free and online, it's awesome and so is Aphyr.
Code Complete 2 [1] was one of the first coding books I've read. As with anything else, it's good to look around (HN is a good place) for people who have problems with the book. I think I learn as much reading the commentary people make about books like that as I do from the book itself.I think I've listened to every podcast on software engineering radio a few times [2]. The older ones are especially nice because they usually pick a specific topic and cover the high points. I liked that I could listen to it while I was driving, or otherwise not in front of a computer.
It's specific, but Javascript: The Good Parts is probably the most used book I have on my shelf. It has such a perfect amount of usable information in it. It's pretty great. Again, it's definitely worth looking up critiques and counterpoints.
I've also got Introduction to Algorithms, which I use as a reference, sometimes. I switched over to The Algorithm Design Manual [5] after I saw it referenced in an older Steve Yegge post [6]. I read through the intro and it seemed like a book that would be more appropriate from an autodidactic standpoint. I really have no idea if that's going to pan out, since I'm not that far into it, but we'll see, for sure. Doesn't kill me to have an extra algorithms book laying about, though, and I've always got intro to algorithms for cross reference. I've found that I really need to have as many sources available as possible when I'm learning alone. Usually I don't get something until the fifth person describes it from the tenth different angle.
That's most of what I can think of off hand. I really enjoyed The Joy of Clojure [7], though haven't checked out the newer version. Programming Collective Intelligence [8] is a fun book, and is what made me want to go back down the maths route to get more into machine learning.
And of course habitually reading hacker news for an hour or three every night :)
So that's my totally inexpert list of random stuff that I enjoy
[1] http://www.amazon.com/Code-Complete-Practical-Handbook-Const... [2] http://www.se-radio.net/ [3] http://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockfor... [4] http://www.amazon.com/Introduction-Algorithms-Thomas-H-Corme... [5] http://www.amazon.com/Algorithm-Design-Manual-Steven-Skiena/... [6] http://steve-yegge.blogspot.com/2008/03/get-that-job-at-goog... [7] http://www.amazon.com/Joy-Clojure-Michael-Fogus/dp/161729141... [8] http://www.amazon.com/Programming-Collective-Intelligence-Bu...