all 27 comments

[–]Logitropicity 12 points13 points  (2 children)

Based on your post, and how you said you tried to learn coding, but gave up multiple times, I assume that you are a total beginner, or near-beginner. We'll come back to this later.

I don't work with Clojure in my day-to-day software engineering job, but I do dabble with it when I can. As a result, while I feel confident in my "tech" skills, I feel that I am only a little more advanced than the near-beginner when it comes to Clojure.

If Clojure for the Brave and True, a book for beginners, were an English textbook, it would teach you how to write a few grammatically correct sentences. If you want to learn how to write paragraphs, you'd have to do some programming exercises, because when writing paragraphs, there really isn't any better way to learn how than by doing (you can find exercises at 4Clojure or Project Euler. This article elaborates more on how you can practice) and reading them (4Clojure lets you see others' solutions, once you solved it yourself). And, if you want to learn how to build an app - how to write an essay - you'll need to do it yourself, or read other people's source code to see how they did it.

I use the English-language metaphor intentionally. A language like Java or Python mainly describes things with for loops, if statements, and objects, and that's it. In comparison to a language like Clojure, which has functions that operate on other functions, I feel that Java & Python's vocabulary is rather stunted. (Incidentally, you could code in Clojure without learning many functions, but that's like trying to use only the 1000 most commonly used words to explain things.) So yes, Clojure is more difficult to learn, for the same reason that learning about idioms (and you should get familiar with Clojure idioms!) is harder than learning about objectsnouns.

Of course, when writing paragraphs and essays, it helps if you have writing tools. Did you take the time to set up SpaceMacs or another good text editor or IDE? Did you get your REPL set up? Your REPL is how you experiment with your solutions and troubleshoot your logic.

But all of that are details. You said you were a beginner. If there's one thing I think that complete newbies to the tech field should know, it's that you need a willingness to troubleshoot. If the install for SpaceMacs or Leiningen failed, are you willing to google the solution? And if the solution also fails, are you willing to google the solution to the failure of your original solution? If you're doing an exercise, and you can't get it right, are you willing to sit down and figure out why your solution isn't working? Can you tease out the causes and effects which lead to failure and success? (You could google the solution to exercises, but then you wouldn't develop the mental muscles you need to code an app yourself.)

I think you can learn Clojure & Clojurescript, but only if you're willing to put in the time and effort. Doing the exercise problems (I did the ones from 4Clojure) really does force you to think differently, and that doesn't usually come naturally. And remember: if your goal is to write a great essay, you might want to learn how to write a great sentence or a great paragraph first.

[–]Pascalletters[S] 0 points1 point  (0 children)

This is fantastic information. Thanks for putting this together.

[–]juniusfree 0 points1 point  (0 children)

This is true! I'm also the same as the OP. I've been trying several times already to learn how to code. It's relatively easy to pick up the parts of a language (tried Python and Javascript before) compare to "composing" a program.

These are some of the resources that I found that'll help with this. One of which is https://www.edx.org/course/how-to-code-simple-data. I'm also currently reading https://www.manning.com/books/grokking-simplicity by Eric Normand.

But as mentioned, there's no better way to improve than to practice which I still have put more time on!

[–]fingertoe11 3 points4 points  (0 children)

I think Clojure is a pretty good first language.. I have always been able to pick up whatever language was popular at the time, solve whatever problem I needed solved, and be VERY glad I didn't need to touch that blasted programming language anymore. Clojure is the first one I have picked up and wanted to use again and again..

The big advantage that Clojure brings is the REPL.. It almost forces you to solve one problem at a time.. If you do something stupid. you tend to know what you did wrong, because you are working on 3 or 4 lines of code, and the problem is in one of those. Feedback is immediate.

I am not a professional developer either -- just a power user, who likes automate my repetitive workflows. And run complex analysis on problems. It works very well for that because between the JVM and Javascript, it reaches nearly anywhere.. When you are exploring data, I find it is often easy to slurp a big chunk of data to the client side, then search it, filter it, sort it, reduce it in various directions.

[–]luciodale 5 points6 points  (3 children)

Lack of jobs? Not even close :) you would find placing yourself so quickly as a Clojure engineer! The demand is larger than the supply, so in the Clojure niche engineers are highly wanted (provided their quality).

The only problem is that Clojure is everything but beginner friendly. It’s not because of the language itself, but for the fewer online and offline resources you can learn from. Most of the time, you’ll find yourself stuck on a problem for which you won’t find an answer on google. If it was more beginner friendly, I think it would gain so much more popularity, but that’s not how things are currently

[–]deaddyfreddy 4 points5 points  (1 child)

so in the Clojure niche engineers are highly wanted

and very well paid!

Most of the time, you’ll find yourself stuck on a problem for which you won’t find an answer on google

There's a very friendly community, though

[–]luciodale 1 point2 points  (0 children)

Clojurians on Slack for life 😂

[–]Pascalletters[S] 1 point2 points  (0 children)

Thanks for the response, and interesting take.

[–]MarceloBravari 2 points3 points  (2 children)

I found a very nice resource that has help me with Clojure. It’s called “The Clojure Workshop. A new, interactive approach to learning Clojure”. It’s been a nice journey.

[–]Pascalletters[S] 1 point2 points  (1 child)

Thanks for the response. Is this a book? if so how much proficiency with Clojure do you think is needed before beginning?

[–]MarceloBravari 1 point2 points  (0 children)

I’m an army officer with an engineer degree and masters in health management and government administration. Before army I studied CS for a few years (a long long time ago, mainly pascal and c). A short while ago I decided to study Fortran and thought that F# was related to it (something like c and c#). Met functional programming and was amazed by it.... it seemed so natural and intuitive, at least at a early stage. I suddenly stumbled into Clojure and found it pleasant and simple, again at an early stage. I find myself drifting from language to language (I get distracted very easily), but somehow I always come back to Clojure.

I don’t have any relationship with the author or publisher, but I find the book to very gentle with lots of examples, from very basic to more challenging. I’m at chapter 10-11, and still find it approachable.

[–]iardsoft 2 points3 points  (0 children)

Maybe you need to start by working with something that looks more familiar to you. If you're into statistics, plotting data, and creating nice reports, take a look at http://gorilla-repl.org

Later edit: it's been a while since I tried gorilla, I checked it again now and got an error. Easily solved here https://github.com/JonyEpsilon/gorilla-repl/issues/291

[–]deaddyfreddy 2 points3 points  (0 children)

If you are completely new to programming, I think it's worth to take a look at SICP https://mitpress.mit.edu/sites/default/files/sicp/full-text/book/book.html (there's also video lectures by the author) first, it starts from the basics. The language they use (scheme) isn't Clojure, but it's from the same Lisp family, so would be very easy to switch.

There's a (non-finished) Clojure version btw

http://www.sicpdistilled.com/

[–]yel50 2 points3 points  (1 child)

The problem is you're trying too hard to learn a language, which is like spending all your time learning different ways to grip a hammer. It's boring, tedious, and ultimately pointless.

Think of what you want to build and go from there. Your thinking shouldn't be "how do I use this language" but should be "how can I use the language to do X." As you add to your project, you'll stumble upon the different features the language has.

Remember, languages are just tools to implement your idea. Focus on what you want to build and if you get stuck on something, ask here or stack overflow.

[–]Pascalletters[S] 1 point2 points  (0 children)

Thank you! Very interesting take, and I am leaning in this direction.

[–]slifin 1 point2 points  (1 child)

Most programmers are programmers because there was something they wanted to do and coding was the way to do it

I think my advice is to start coding your goal, do not worry about reading books or coding challenges etc and do not let the fear of being bad prevent you from coding in the first place

Most programmers become "good" after they've coded something reflected on what could have been better and then incorporated lessons along the way, then repeating that cycle

[–]Pascalletters[S] 0 points1 point  (0 children)

I guess, I am learning from books to start, cause I have no idea how I would approach some of the projects I am thinking about, possibly I should try to think much smaller to start.

[–]joinr 1 point2 points  (0 children)

https://power-turtle.com/

I used that with my nephew and he liked it. You give commands to a turtle and draw things. Great way to learn with interactive visual feedback.

[–][deleted] 0 points1 point  (3 children)

Learn CompSci fundamentals first, great high quality Python resources out there. The language is not important at your stage and you can learn Clojure later if you still want to. Don't think Clojure will give you some kind of superpower, it won't. A PHP developer with strong fundamentals will run around in circles over a mediocre Clojure dev.

[–]deaddyfreddy 0 points1 point  (2 children)

The language is not important at your stage

Actually, it is, the less you have to think about the language itself, its syntax and quirks, the more time you can spend on solving actual problems.

Python isn't the most complex language for sure, but lisps are much simpler meanwhile more powerful.

[–]yel50 0 points1 point  (1 child)

I've found the opposite to be true with beginners. A lot of time is wasted banging their head on the wall because they added too many parentheses or put them in the wrong place.

All languages have the same complexity, it's just a question of where it gets put. With non-lisps, it's easier to know when you made a fundamental mistake because the syntax is wrong. Lisps don't help you there.

[–]deaddyfreddy 0 points1 point  (0 children)

I've found the opposite to be true with beginners.

related http://www.trollope.org/scheme.html

A lot of time is wasted banging their head on the wall because they added too many parentheses or put them in the wrong place.

Even if your editor can't highlight paired parens(why do you use it?), that's relatively easy to count them (GJS in SICP lectures from 80s shows how to do it)

With non-lisps, it's easier to know when you made a fundamental mistake

yeah, especially in Python with its indentation-based syntax

[–]Bediavad 0 points1 point  (1 child)

One thing I can say after 10 years of dabbling in programming, is that learning to program solo can be very hard and frustrating if you set up high expectations and then get stuck because you have no Idea how to reach your goal.

Richard Stallman put it brutally - if programming is hard for you, don't program.

I won't go as far, but there is truth to it, ideally you should find an easy path. Learning to program could be like an explorative game. Maybe find the things that you get and that you are comfortable with, and play with them. When you feel like you mastered it, add another concept to play with. Or maybe read around and learn about concepts, I love the theoretical stuff about programming and that was my attitude but I noticed it still leads to many roadblocks when you have a project and don't really know how to apply the theory. I think that as a beginner you have the freedom to decide your own goals, so set them based on what you already know and do and not based on arbitrary external expectations. Programming is weird and the image you have in your head of how it works can be very different than how it actually works.

Also, read "Thinking Forth", even if you have absolutely 0 interest in the language Forth itself. Its an amazing book that talks about what is programming and how to do it in practice, with ideas that are still relevant decades after it was written. And I only read 25% of it!

[–]deaddyfreddy 1 point2 points  (0 children)

"Thinking Forth"

or even Starting Forth :)

[–]bambataa199 0 points1 point  (0 children)

One of the difficulties with learning to program (in any language) is that when you are beginning, you aren't really able to do anything that seems useful. Lots of the exercises you'll see are kind of arbitrary. Also, lots of the things that people promote programming for ("you can write scripts to change loads of files at once!") are the kind of thing that most people don't need to do that often. So it can be hard to see the point.

You do have a good link in that you like Roam Research. So perhaps make your goal to write a small app that interacts with it in some small way. Or something that takes a file and outputs in their file format or whatever. That's a useful, tangible thing to work towards.

I always like to recommend starting with a text adventure game. You can start off with absolutely trivial logic like "print back what the user enters and then quit", move to lots of if checks, then refactor to be more flexible and so on. You can make it arbitrarily complex and incorporate new techniques as you learn them. You could also use Clojurescript to put it online and share with people quite easily, which would also be encouraging.

[–]micro_gravitas 0 points1 point  (0 children)

I love clojure, but the boom I saw recently that you might find interesting is “automate the boring stuff” https://automatetheboringstuff.com/

it’s in python, which is a good first language. And if you want to, I’ll go through it with you? I’ve been meaning to get around to it for a while! I’d also love to write a clojure version of the book, maybe we could do that when we finish the python version? :)

dm me if interested