Ask HN: How to rediscover the joy of programming?
483 pointsI remember in my teens I used to love programming. After 20 years of a career, I don't enjoy it anymore.
Have you rediscovered the joy of programming? Any advice?
Have you rediscovered the joy of programming? Any advice?
Comments (329) 141 threads
Show all comments
Showing thread 5 of 141
And learned Clojure.
You will feel like you know nothing. You will feel handicapped. You will be confused.
Then, one day, you will understand what simplicity means and how Clojure's design embraces that more than in any other language I know. By then you will have embraced the flying-by-your-pants-exploratory style of programming at the REPL. And don't want to go back anymore.
It's awesome!
It does take me a long time to get there though. It's kicking my arse to be honest. Which is fine, as it means I'm learning - far more enlightening than frustrating.
Side projects are always an option, I guess.
Continue this thread — 1 reply
The problem is I don't have a good track record for completing projects so competitors or collaborators would be greatly appreciated
I have gotten burned out of my personal clojure projects same as anything.
It's just a language people. Whether speaking Japanese or English, it's just a language. Yes culture is a part of it, but it doesn't imbue the speaker with some sort of superpower. Yes other languages are fun, but both get the job done. English has the word "love", Japanese has "yugen" but both peoples seem to get by just fine.
In PHP once a function is defined I can't redefine it and then call it again to iteratively build that function
Just because your language has a repl doesn't mean you can get a quick feedback loop from it, in fact the more compile time constructs you have like classes and interfaces the harder it is, particularly if they're sticky with dependencies everywhere
Bret Victor's work I think really illustrates how little respect and investigation we do into feedback loops
No. Most non-lispy (non-homoiconic) languages do not have "true" REPLs (and that includes Python as well). At best they are just that - interactive shells. To understand the distinction, one has to give a sincere heartfelt attempt to use a Lisp. Having able to evaluate any expression and sub-expression without any preceding ceremony is extremely empowering. There's a massive difference in the workflow - any experienced Lisper can attest to that. The benefits of homoiconicity are incredibly underrated in modern programming. Perhaps you just haven't used Lisp for long enough to learn how to appreciate it.
> It's just a language people.
Yes, it is. There are many different ways to express something like "number 42" - using ordinary objects like sticks, or by counting numbers out loud, or by writing the amount using words, or by applying mathematical sigma notation. And Mathematics is just a language as well. And when it comes to expressing something far less trivial than natural numbers, we have not yet discovered|invented better ways.
That all been said - Lisp syntax is not without certain disadvantages. But in many cases - the benefits outweigh the cost. That is why Lisp as an idea is still relevant, even after over six decades. And until we figure out (discover?) a better way, the ideas behind Lisp still would be very useful.
For anyone who wants to learn Clojure (or any Lisp) from scratch, here's my advice:
Don't try to learn it by reading books. What I mean: don't try to mentally parse and analyze printed code written in Clojure. For uninitiated Clojure code may look like unreadable gibberish. If you try to understand Clojure code by merely staring at it, it may feel very exhausting.
Remember: Unlike most other languages where the code is "dead" until you compile it an run it, Clojure code is a "living thing," analyzing its "static" properties without evaluating that code makes little sense.
Get an editor/IDE that supports "structural editing." Learn basic structural editing commands - slurp, barf, transpose. Learn/set a keybinding that allows you to evaluate the expression at the cursor.
And then eval your expressions and sub-expressions. That would make it much easier to learn. And would bring joy to the experience.
After some time it becomes clear - Lisp is not harder to read. For some people, it's the other way around - going back to languages with C-like syntax may feel awkward.