Now this is exactly the sort of thing we should be taking issue with (from the comments):
> A true noob should probably install java, download clojure and clojure-contrib, run the repl, and stay there for couple 2-3 weeks. No IDE, no web app dev, just functional and concurrent programming with clojure in a REPL. They'll be much better off in the long run because they'll either give up (and save time) or learn something truly outside their comfort zone (and understand the benefit of getting setup for real development).
When teaching someone a programming language, your first goal should always be to get them to the point where they've made something real in a domain they understand. Then, they can bootstrap that domain knowledge, and its application within the new language, and use it to "grow into" the rest of the language.
The best thing for Clojure would be something that lets you write web-apps (or games, or visualizations like Processing...) in it two minutes after clicking "Download"—because those users would be able to say they've done something in Clojure, be able to say they're sure of their knowledge (because if they weren't, the program wouldn't have worked, would it?) and be able to proceed to learn more with confidence. The worst thing would be to download Clojure and be stuck at a REPL invoking (defproto) to overload String methods with no goal in sight—because that kind of knowledge doesn't stick, and won't get you anywhere.
I totally agree with this. Forcing users to stay in the REPL, poking simple toy examples is just boring and useless.
Just telling, a lot of people got into python, because they wanted to solve a certain problem (I know of an RSS scraper and a state machine framework prototype), and these people just started with a book about python and NO knowledge and after around 3 days, they knew a large amount of python and were sold, because the problem was solved and the language 'felt very good'.
I think generally, programming language designers should stop assuming that their language is novel, or different or whatever and people will be clueless learning about the language.
If you know like Java, C#, Python or Ruby, NO object oriented language will present you with really large surprises (until you meet Javascript with prototypes, and things turn around a bit and common lisp with generic methods and things warp a bit, but still, the basic concepts behind the language are nothing surprisingly new, I still have my objects which receive objects and do things depending on the message receveid).
If you know something along ML, Haskell or some other functional language, it will be really, really hard to surprise you with a functional language. Cool, oCaml has references? Cool, Haskell has monads? That is true, those things might be a bit different, but the basic concepts of immutability, functions and recursion is all the same, no matter what happens.
So, tl;dr? You language is not novel, your language is not new, I have used a language which is similar to your language, I will just be bored if you throw me into Programming 101, because your language is new and I will probably just walk away.
This seems like an obvious and easily attainable goal, but in fact, it isn't. The article suggests Python and Ruby provide a better n00b experience and that is far from true. For instance, Ruby becomes a nightmare as soon as you start mixing your own gems with gems installed by the packaging system. That situation is hard to avoid, as distros usually only support outdated Rails gems and the n00b that thinks 'let me just grab the latest stable Rails version from github' is in for some nasty surprises concerning incompatible combinations of gems. We solved this by moving to Enterprise Ruby and keeping everything local and selfcontained, but it is definitely not very n00b-friendly either. With Python I've had similar experiences: when I was in need of a decent XPath library (mind you, this was over 4 years ago), the best one I could find (4Suite) needed to be installed manually, with all the usual problems of missing -dev libs, install paths and whatnot.
A summary of the problem is: the configurations people run are so diverse that it is hard to provide installation instructions that work for all, or even most, of them. As soon as someone wants something not covered by the simplest of tutorials, many of them will run into issues.
I think the only solution is documentation. The only thing that works is catalogueing all known problems people have encountered, so that others can easily find solutions to those problems. The largest problem of this solution is that n00bs need to understand their systems and they often don't.
The best thing I found so far is clojure-box: Clojure Box is an all-in-one installer for Clojure on Windows. It's inspired by the Lispbox: you simply install and run this one thing, and you get a REPL and all the syntax highlighting and editing goodies from clojure-mode and Slime, plus all the power of Emacs under the hood at http://clojure.bighugh.com/
BUT it is based on emacs, and unless you're familiar with emacs, its not going to be too friendly...
Then, if you want web-apps, you'll have to get your head around ring, compojure or some other library. If you want graphics, at this stage you are kind of limited to whatever java can provide, and there is no easy IDE inspector to show you what's available / defined at any given moment...
There are many ways to get around all of these, but they all seem to require a fair bit of digging around, google-fu and whatever else is needed to make it go.
Maybe what clojure needs is a simple executable wrapper that handles the java classpath requirements, provides a simple (but extendable) IDE, provides some common sample projects like a simple web app (blog), graphics (temp converter), maybe multi-threaded (the ants.clj example) all complete with good documentation.
I know that would have made my life a bit easier...
This is something node.js has done very well. Anyone with basic javascript experience (and really, isn't that everyone?) can go from zero to fast, functional web server in 2 minutes. Then hit github and figure out which simple web framework to play with (the fragmentation is either a problem or benefit depending on your view) and voila, another 5 minutes later, a full, integrated, single language web stack. Very good for noobs.
"When teaching someone a programming language, your first goal should always be to get them to the point where they've made something real in a domain they understand"
There are steps before that! The user's first concern is how to run the damn thing. If they can't get past this stage, they will give up and never return. The user should be able to download, install, and copy/paste/run "Hello, World!" with no bullshit. No IDEs, no configurations, no REPL. You have time later to sell all of that. A programmer who can't run from a file is tethered to your tutorial, even if they want to write more permanent code. Give them that freedom immediately, and give them a win immediately.
After they can actually run a program, then give an interesting example or two, and provide live links to up-to-date tutorials. It's irritating to see "official" links that are three versions out-of-date, and I see it too often. Examples should include a little bit of magic from the language, so the curious programmer thinks "Hm, that's not familiar. I wonder how that works!"
It may just be me - I have a really bad allergic reaction to Java at this point - but the notion of making your new language powerful really quickly by linking it directly to Java has always struck me as akin to learning to fly more quickly by handcuffing a B52 to your leg.
This article does little to relieve my suspicions. It sounds like the Clojure newb experience is still a superset of the Java newb experience and the Lisp newb experience.
1. Java the language? It has abominable syntax and execrable semantics. Clojure fixes this; interop makes even strongly Java-flavored code tolerable. With Clojure, even Swing sucks less.
2. The JVM? Honestly, the JVM is rather nice. Except for the startup time, it's refreshingly fast. With Clojure, you don't really need to restart the JVM very often.
3. Learning about the classpath? It's no worse than PYTHONPATH or GEM_PATH, and far more self-contained by default. This makes deployment much easier. Yes, you have to understand it up-front, but what is difficult about it? It's a list of libraries your app depends on. Clojure is one of those libraries. Unless you need to compile your Clojure code into .class files, that's it.
4. Ant? It's a poorly-designed monstrosity with horrific XML syntax. Don't use it. You don't need it.
5. Maven? Yes, it's a beast, and unfortunately, you need it. Luckily, the latest version of Leiningen wraps it very nicely, so you don't need to learn the details. You also don't need to look at its XML. You just make a project.clj file, put in your dependencies, and run "lein repl".
I've encountered several interesting languages over the years and they would all have been really nice and painless to use only if it wasn't for their lack of standard libraries that are just there.
Good set of standard tools and libraries are more important for a language's success than the language itself. The language has to be quite bad in order to drive programmers away from good libraries.
It's the Python problem: I know the shortcomings of Python quite well and I would happily use some other language instead except that Python has almost everything and despite the shortcomings of the language itself, Python is by far the fastest way to code a quick program to solve some random, particular problem.
I don't like Java but in the case of Clojure, the heavy machinery in JRE is a critical life-saver. Sure the Java side is ugly but at least it's there for Clojure.
The world is full of lisps that you can't do anything with. Clojure isn't one of them.
When I've needed to work with Java libraries from Clojure, I've continually felt that Clojure provides enough abstractions over Java's syntax/conventions to make it not an issue.
Java libraries are so numerous and prevalent that I'm growing to prefer that kind of availability. Coming from Python, I'm not uncomfortable at all with Clojure's java library use.
It really doesn't feel like I'm interfacing with Java. It feels like I'm interfacing with a library designed with OOP. (No more verbose or unwieldy than necessary, given an object-oriented library.)
This newcomer experience felt to me like someone trying too much too soon. I picked enclojure ide for netbeans, and started it in 10 minutes. If I did not have netbeans, I'd just have to install it, and add the plugin. Using the repl was as easy as right clicking and choosing from a menu.
Comparing to other newcommer experiences (on linux os):
- Python: $ python (it is installed by default)
- Ruby: $ irb (it is installed by default with high probability, if not apt-get install ruby first)
- Java: download eclipse/netbeans/intellij, create new project, that's it.
Newcommers don't need build tools (let it be rake, rubygems, sbt, gradle, ant, maven, ivy, sake, leiningen, etc).
Of course, I agree that a getting started guide should pick one tool (possibly an open source one, but on this case all of them are open source), and guide you with it. Also, installing clojure with a repl client easy executable as irb/python's on linux package management systems (with the proper java dependencies) would help tremendously.
I certainly had very similar issues when starting out with Clojure (and am still running into them now), and I'd had previous development experience with Java and used Emacs before Clojure.
That being said, I do believe the "noob experience" is improving, and the community Clojure fosters is inviting and welcoming to newbies, as far as I've seen.
I've begun work on a tutorial to get people up and running with Clojure, but I will be recommending Emacs in it. As someone in the comments on the blog noted, if someone's goal with Clojure is to crank out a web app in 24 hours, they've come to the wrong place. Emacs enriches the experience, and I truly don't think it is as daunting as it is often made out to be. Gaining basic productivity in Emacs, even if not excellent productivity, takes little time, and the benefits of using Emacs seem large to me.
Regardless, the sentiment expressed here is important to consider. There should be a sanctioned IDE for Clojure, and it shouldn't just be Emacs and clojure-mode.el + Lein, at least not to start. Along with clojure.jar, I'd like to see Leibke's clj script packaged and promoted. That way, like with python, irb and newlisp, you can download and immediately get started with a functional REPL to see if you like the language before investing the time in setting up the ultimate IDE.
And yes, documentation. Please, documentation. It's in the style of LISP to have little to none documentation in code, as the code should explain itself. And it certainly should, but a little exlanation here and there can only help to enlighten those not as familiar with the language and save the time of those in a hurry.
But now is an exciting tine for getting into Clojure. Don't let the initial challenge of getting into it deter you!
It's in the style of LISP to have little to none documentation in code, as the code should explain itself
Nearly every Lisp data type and all special forms take docstrings; documentation that gets compiled into your code that can be queried at run time. Lisp was the model for online Unix manual pages; APROPOS and DOCUMENTATION and builtin Common Lisp functions. There is even a defacto commenting style for documenting code at various levels; file-wide, top-level form, and small inline documentation.
The typical "Lisp experience" is a fat abundant system that rivals its underlying OS and platform. It even has a function, ED, to invoke the builtin editor/IDE, and some Lisps even have that builtin.
"I've begun work on a tutorial to get people up and running with Clojure, but I will be recommending Emacs in it."
I'd like to strongly encourage against that. Here's my story: take from it what you will.
2 years ago, I decided to get started with Lisp. I looked around, and the most "official" path seemed to be using "Lisp Box", which is Emacs based. I didn't have any experience with Emacs, but I did keep hearing about it, so I decided to jump in and learn it (I was, after all, in a learning mood).
Of course, learning Emacs isn't a one-day affair. Sure, I could learn enough to do some Lisp (and I did). But it feels like a waste. So I started to learn a bit more about Emacs. Then more. Eventually, I was spending so much energy learning Emacs, that I didn't have any time left to learn Lisp. To this day, I've never learned Lisp.
In contrast, with Python, I spent a day with the IDLE shell that comes packaged as part of Python. Then I moved on to working in files, with IDLE as an editor. Eventually, I moved on to looking for a good Python editor/IDE, a search I spent a lot of time on. But the point is, I didn't need to learn a completely new environment to use Python. Don't forget, a n00b only has so much time/energy to learn, you don't want them wasting it on the editor but on the language. The editor can always come later.
> I've begun work on a tutorial to get people up and running with Clojure, but I will be recommending Emacs in it.
Oh no. I hope I do not come off as a troll but this is exactly why I never could get started with any of the lisps. I can't stand emacs or netbeans or eclipse. This a personal taste for me but a very strong one. They all just feel wrong to me. Associating a sanctioned ide with a language is a bad idea. It brings unnecessary baggage for a new user. By closely associating your language to an ide and by having every tutorial throw it in my face, your community is just creating an unnecessary entry barrier for me. Please consider making the tutorial ide independent.
I haven't used it yet, but from the documentation it looks brilliant. Dead simple package management and REPL tied together in a single command line tool. A noob should be able to go far with just this plus text editor of choice.
> That being said, I do believe the "noob experience" is improving, and the community Clojure fosters is inviting and welcoming to newbies, as far as I've seen.
Indeed, if anyone complains about the noob experience in Clojure, it's probably a good sign that they don't use IRC. =)
The author complains that running Clojure per the simple instructions in the distribution is not a valid way to program, yet, then tears into the complexity of much more complex setups, which due to the fast-evolving nature of Clojure are often extremely fragile.
The command-line invocation of Clojure will work if you have a valid Java setup, and with the addition of jReadline, you have a decent, albeit bare-bones, environment for experimenting. Copy and pasting code and running it directly works, and once you figure out how to 'source' in a file, you can start building something modularized and significant.
I wrote about a 5000 line Clojure program, fairly early on, and ran development cross platform with just an SVN server at home on my mac, svn clients on mac and Windows, and notepad for Windows development, and TextMate on the mac. GUI design for Swing was done in NetBeans and could be loaded on the fly easily by Clojure.
Note the conspicuous absence of Vim, Emacs, Slime or any of the other fragile setups that people think they need.
Clojure has great facilities for modularization, and it's dead easy to use, but familiarity improves with practice in doing what actually happens instead of just pushing buttons in an IDE.
"The command-line invocation of Clojure will work if you have a valid Java setup, and with the addition of jReadline, you have a decent, albeit bare-bones, environment for experimenting. Copy and pasting code and running it directly works, and once you figure out how to 'source' in a file, you can start building something modularized and significant."
That's the really big "IF" that the article is trying to address, I think. If you already have your head firmly wrapped around java, then Clojure isn't a monster - but if you don't, you have to cover a lot of ground to actually produce production code with it.
From my own beginner experience, while it may become easy when you found your most suitable tools setup, it's not easy to discover it in the first place. Yes, it may be great and modular, but it takes effort to find all the pieces you need and put them together. And doing this usually involves reading a lot of grossly outdated blog posts and HOWTOs, because there is no Official Way(tm).
No one's mentioned the revolutionary perspective of this story: learning a JVM language in its own right, without regard to the JVM, nor Java, its libraries nor infrastructure. Most JVM projects do have regard to Java, because: the developers know Java and indeed are using it; and access to Java libraries and infrastructure is a key selling point. But it doesn't need to be that way. You can treat the language like a clean abstraction: most python programmers don't worry about the C underneath; most C programmers don't worry about the assembly underneath; most assembly programmers don't worry about the hex underneath. This a different way of seeing a JVM language.
It seems that the problems mentioned are common to all JVM languages (I was especially struck by similarities with JRuby, recently on HN).
Ideas: (1) look at other JVM languages. Copy their solutions. (2) someone develop a "JVM language support environment". It might include eg. a java server, so startup times disappear. (the JVM is damn fast, once it's going. And, kinda freaky to witness, it gets perceptibly faster, through JIT). Oracle might even include subsume it into Java, should it serve their business interest.
This article definitely speaks to my experience starting in Clojure. Lots of the Clojure pioneers seem to develop in Unix environment like Linux or OSX. A lot of times, their unix shell build scripts are not directly portable to Window's cygwin. Yikes.
That being said, with a lot of the Clojure IDE plugins and build system reaching usable maturity, the n00b experience has gotten a lot better than when I started a year ago. So, keep up the good works, guys....
> A lot of times, their unix shell build scripts are not directly portable to Window's cygwin. Yikes.
True fact: there aren't very many Windows users who are willing to help with portability issues. Of course there's a chicken and egg problem here to be sure, but if you'd like the situation to improve, you should volunteer.
(A great place to start would be by updating the .bat file that comes with Leiningen to work with version 1.2--hint, hint.)
The article's right that Clojure doesn't have a great newbie experience yet. However, the language and community is still very young:
Clojure: 3 years old
PHP: 15
Java: 15
Ruby: 15
Python: 19
Objective-C: 24
I think the fact that there are so many coders that want to try Clojure despite its young age speaks to how compelling and powerful it is. The slick user experience will catch up soon.
I'm afraid clojure will not catch up just by getting older. Improving the installation experience should not be too difficult, but for a community supported language to have great documentation is a monumental task. Writing documentation is boring after all.
Your list suffers a little bit from selection bias. It doesn't include all the old languages that never caught on. There are of course many reasons why a language doesn't become popular and lack of good documentation and ease of getting started is probably not the most important one.
I mean, there's C++, the language that managed to become popular by doing everything wrong ;-)
I don't think this is a good argument, because eg CPython was the reference implementation of Python since day 1.
In other words, since the very very first day of python, people could tell a new python user to grab that one very specific package from python.org and go ahead until he is able to judge the different implementations out there, which solves precisely the problem mentioned in the article.
I thought his point about the burden of having to choose a code editor was, well, not a good point. I mean, a Clojure source file is text. Open it in a frickin text editor and edit away! That technique is easy and has been working fine for decades now. Go with what you know: vi, TextMate, whatever. You don't truly need syntax highlighting or an IDE when you're just dipping your toe into the water. The bigger issue you have is learning the language and start slinging the code and seeing what happens. And that can be done just fine with a REPL and text editor.
Most of the other points were, at best, just pointing out things you'd expect with a new language and new ecosystem. It takes time to polish things.
Getting started with clojure can be tricky but the real hurdle is the language itself. It's beautifully designed but it's founded on some powerful but difficult concepts. Functional programming, iteration via recursion, multimethods, concurrency, macros, sexprs, the whole java stack under the hood you really do have to understand.
I'm all for making it as easy on the noob as possible but clojure will never be blub. It makes the hard problems easier but the price is that the easy problems are harder.
I don't think that Clojure isn't meant to be an easy language for newbies, like Java. Clojure is a master's tool, like Unix. Good tools require time to learn and for the user to develop a bond with them.
It's precisely the functional programming, multimethods, immutability, concurrency, macros, and sexprs that make up Clojure's value. There are enough blubs already.
I also had trouble getting started with Clojure because I was distracted by the official getting started documentation. I had smooth sailing once I decided to develop Clojure code the same way I develop Python code:
- Edit code in plain Vim.
- Run Clojure from the command line.
I have a single directory where I download the appropriate jars. I ignore Ant, Maven, Leiningen and all that other fancy stuff.
Noob -> Intermediate -> Good -> Expert. That's the only possible way. The easiest it is for a noob to start, the fastest he will become an intermediate programmer. I mean, when you've never used a language, why would you spend 3 hours trying to configure everything? That's the wrong order.. First, let me try the language and let me have fun with it, then I will try to become an expert in it.
That's where python, ruby and javascript clearly win over scheme and clojure. On the other side, C++ is weird. There exist a lot of "get started with C++" such as accelerated C++ but, in my experience, a true beginner won't understand it because the language is too complex.
A lot of this applies to other JVM languages, like Scala.
Although I think Scala does some of this stuff better, there are still a lot of pain points for the newbie when it comes to different build systems, java toolchain, classpath, library dependencies, binary compatibility issues etc.
On the one hand it's great that tonnes of toolchain options already exist for Java which can be used with these languages. On the other hand, when coming from (say) the Ruby or Python world you just want and expect there to be one main widely-used/well-documented way to do basic things within a language's ecosystem, like installing libraries and so forth.
Rather than first having to figure out how the java world works, then make some arbitrary-seeming choices of java tools without much guidance, and then figure out how to work with the new JVM language on top of those.
It's about making sure this new crop of JVM languages feel like first-class citizens, rather than just add-ons for a java ecosystem which you're implicitly expected to know a lot about.
It's so good that I think the clojure website should be linking to it. Here's the summary from the above link:
Labrepl is an environment for exploring the Clojure language. It includes:
- a web application that presents a set of lab exercises with step-by-step instructions
- an interactive repl for working with the lab exercises
- solutions with passing tests
- up-to-date versions of Clojure, contrib, incanter, compojure and a bunch of other libraries to explore
See instructions below for getting started with NetBeans/Enclojure, Eclipse/Counterclockwise, Maven, Mac/Linux command line, Windows command line, IDEA/La Clojure, and Emacs.
You shouldn't underestimate the importance of example code.
A nice, compact hello world example would help. I didn't see any example on the parent (I'll admit I skimmed). A nice example of being able to something fairly complex in a clear, simple fashion would excite me.
The size of the Java hello world program made me nauseous every time I've looked at learning it.
There was a thread a while back about how much patience people doing BS activities. Not only do I have little patience with wasted, I tend to think that intelligence correlates with not wanting one's time wasted.
If you can show me a language which is clear and won't waste my time, I'll love. I love Ruby (though it's just too buggy to use for serious programming still).
I really don't like the word n00b in this article. I feel like this article would be much better if they replaced the word n00b with beginner. When I read the title I thought the article was going to be about Clojure attracting to many childish people.
Exactly. To me, clojure is anything but a language for n00bs.
I consider it best suited for people with extensive knowledge of the Java platform and at least good notions of FP, needing a way to write more powerful and concise code without throwing away a proven codebase or compromising performance.
Even if new to Clojure (or Lisp) I would not call these people n00bs.
I'm very glad somebody brought this issue up, in a carefully written essay. It is a real problem. I come to Clojure from a Common Lisp background and the issue there was exactly the same (in spite of how old the language is): developers had their systems carefully tuned and weren't interested in newbie experience, while setting up a new environment was a major barrier.
The good thing about Clojure is that there are people who care about these things — see for example the leiningen and clj projects on github. Leiningen is already way beyond anything that was available for Common Lisp, for example.
I'd say the number one best practice for a programming language's main website is to show actual code on the home page.
And the number two best practice would be to get the novice to the point of writing and running their own "Hello World" program, in that language, as fast and as easily as possible.
More than syntax, I think the bigger issue is "thinking in clojure".
There have been far too many tutorials about Clojure-for-Ruby-users, etc etc.
But the problem is that clojure _strongly_ eschews object-oriented programming. But ActiveRecord and Django ORM are (or pretend to be) object-oriented.
Therefore, there is a strong mismatch conceptually (e.g. http://stackoverflow.com/questions/3067261/how-does-one-mode...).
More than an IDE, there is a strong need to migrate _thinking_ from Rails/Django, etc. to Clojure.
I agree with the spirit of the post, but not (many of) the actual points. Look at the list of languages the author points to in the first paragraph: PHP, Python, Ruby and Objective-C. Only one of these has anything remotely close to an "officially sanctioned experience" and that's because it's a proprietary system.
His first complaint is that getting started with Clojure involves starting a REPL and that this is not how actual development is done. Well, no, it isn't. It is however, where you will spend most of your time. Not only that, but the most accessible documentation on both the Ruby and Python official sites mostly involve using a REPL. Clojure's only problem is that running the REPL is slightly more involved. Also, Clojure 1.1 is not already outdated and I'm not sure where the author got this idea. 1.2 will have some great features, but AFAIK will be completely backwards compatible. I'm not sure where a beginner would even learn about 1.2 without some serious internet trolling.
Next the author complains about how difficult obtaining Clojure is difficult. There is a "Download" link right on the clojure.org homepage that lists zip files for both 1.1 and 1.0, both of which include the source. This is less difficult than getting Python or Ruby, which involves downloading and installing a pre-compiled binary or compiling it from source. Also, the author complains about 1.2 not being available, even though 1.2 has not been publicized and is still in beta; true beginners probably don't know that 1.2 even exists.
The author complains about the fact that there are a whopping three choices for IDEs for Clojure, despite the fact that each of these IDEs also have plugins for Ruby, Python and PHP. There are no fewer IDE choices for these languages. If you ask most Rubyist which IDE you should use many of them will tell you TextMate, and editor that is neither free nor cross-platform. The author then brings up Xcode; well, of course every Objective-C developer uses Xcode, they don't have much choice. Clojure's myriad of IDEs is not a problem unique to Clojure.
Build systems, again, I don't think this problem is unique to Clojure. Where is the great documenation for Rake? Or Buildr? What build system do Pythonistas even use? Seriously, I've been using Python for a while now and I have no idea if there exists a canonical build tool. Comparing these platforms to the likes of Objective-C and .NET in terms of tool support is just unfair, in my opinion.
Like I said, I agree with the spirit of the post. Clojure is not an easy language to get into, but it has very little to do with the points the author made. Much of the cognitive load involved in getting started with Clojure has to do with the fact that it's a Lisp and most programmers are used to ALGOL syntax and Object Oriented semantics. Another thing to keep in mind is that Clojure is an incredibly young language. Much, much, much younger than Python, Ruby, PHP, Objective-C or even Scala. Taking into account Clojure's youth it's amazing that it's as far as it is.
on Clojure being young: agreed. Criticism about Clojure lacking polish at this stage strikes me as somebody criticizing a toddler with, "Head too big. Bad balance. Can't feed himself yet."
regarding your point about Python build tools: myself, I've never found the need to use a formal build tool. Shell scripts work just fine. The beauty of writing a shell script is that (1) it doesn't reinvent the wheel (you reuse all the other shell commands & userland tools you had available anyway), (2) it's as short and simple as you want, and (3) as long as you only have to build on fairly similar systems (Unixen, Linux distros) it's really not that hard to make it cross-platform enough for your needs. True you don't get fancy target/lazy/dependency resolution semantics: but so? It sometimes just doesn't matter. Plus CPU + disk are cheap these days, programmer time is still not cheap.
[+] [-] derefr|15 years ago|reply
> A true noob should probably install java, download clojure and clojure-contrib, run the repl, and stay there for couple 2-3 weeks. No IDE, no web app dev, just functional and concurrent programming with clojure in a REPL. They'll be much better off in the long run because they'll either give up (and save time) or learn something truly outside their comfort zone (and understand the benefit of getting setup for real development).
When teaching someone a programming language, your first goal should always be to get them to the point where they've made something real in a domain they understand. Then, they can bootstrap that domain knowledge, and its application within the new language, and use it to "grow into" the rest of the language.
The best thing for Clojure would be something that lets you write web-apps (or games, or visualizations like Processing...) in it two minutes after clicking "Download"—because those users would be able to say they've done something in Clojure, be able to say they're sure of their knowledge (because if they weren't, the program wouldn't have worked, would it?) and be able to proceed to learn more with confidence. The worst thing would be to download Clojure and be stuck at a REPL invoking (defproto) to overload String methods with no goal in sight—because that kind of knowledge doesn't stick, and won't get you anywhere.
[+] [-] tetha|15 years ago|reply
Just telling, a lot of people got into python, because they wanted to solve a certain problem (I know of an RSS scraper and a state machine framework prototype), and these people just started with a book about python and NO knowledge and after around 3 days, they knew a large amount of python and were sold, because the problem was solved and the language 'felt very good'.
I think generally, programming language designers should stop assuming that their language is novel, or different or whatever and people will be clueless learning about the language.
If you know like Java, C#, Python or Ruby, NO object oriented language will present you with really large surprises (until you meet Javascript with prototypes, and things turn around a bit and common lisp with generic methods and things warp a bit, but still, the basic concepts behind the language are nothing surprisingly new, I still have my objects which receive objects and do things depending on the message receveid).
If you know something along ML, Haskell or some other functional language, it will be really, really hard to surprise you with a functional language. Cool, oCaml has references? Cool, Haskell has monads? That is true, those things might be a bit different, but the basic concepts of immutability, functions and recursion is all the same, no matter what happens.
So, tl;dr? You language is not novel, your language is not new, I have used a language which is similar to your language, I will just be bored if you throw me into Programming 101, because your language is new and I will probably just walk away.
[+] [-] Confusion|15 years ago|reply
A summary of the problem is: the configurations people run are so diverse that it is hard to provide installation instructions that work for all, or even most, of them. As soon as someone wants something not covered by the simplest of tutorials, many of them will run into issues.
I think the only solution is documentation. The only thing that works is catalogueing all known problems people have encountered, so that others can easily find solutions to those problems. The largest problem of this solution is that n00bs need to understand their systems and they often don't.
[+] [-] jurjenh|15 years ago|reply
BUT it is based on emacs, and unless you're familiar with emacs, its not going to be too friendly...
Then, if you want web-apps, you'll have to get your head around ring, compojure or some other library. If you want graphics, at this stage you are kind of limited to whatever java can provide, and there is no easy IDE inspector to show you what's available / defined at any given moment...
There are many ways to get around all of these, but they all seem to require a fair bit of digging around, google-fu and whatever else is needed to make it go.
Maybe what clojure needs is a simple executable wrapper that handles the java classpath requirements, provides a simple (but extendable) IDE, provides some common sample projects like a simple web app (blog), graphics (temp converter), maybe multi-threaded (the ants.clj example) all complete with good documentation.
I know that would have made my life a bit easier...
[+] [-] unknown|15 years ago|reply
[deleted]
[+] [-] sanderjd|15 years ago|reply
[+] [-] jakevoytko|15 years ago|reply
There are steps before that! The user's first concern is how to run the damn thing. If they can't get past this stage, they will give up and never return. The user should be able to download, install, and copy/paste/run "Hello, World!" with no bullshit. No IDEs, no configurations, no REPL. You have time later to sell all of that. A programmer who can't run from a file is tethered to your tutorial, even if they want to write more permanent code. Give them that freedom immediately, and give them a win immediately.
After they can actually run a program, then give an interesting example or two, and provide live links to up-to-date tutorials. It's irritating to see "official" links that are three versions out-of-date, and I see it too often. Examples should include a little bit of magic from the language, so the curious programmer thinks "Hm, that's not familiar. I wonder how that works!"
[+] [-] mechanical_fish|15 years ago|reply
This article does little to relieve my suspicions. It sounds like the Clojure newb experience is still a superset of the Java newb experience and the Lisp newb experience.
[+] [-] gcv|15 years ago|reply
1. Java the language? It has abominable syntax and execrable semantics. Clojure fixes this; interop makes even strongly Java-flavored code tolerable. With Clojure, even Swing sucks less.
2. The JVM? Honestly, the JVM is rather nice. Except for the startup time, it's refreshingly fast. With Clojure, you don't really need to restart the JVM very often.
3. Learning about the classpath? It's no worse than PYTHONPATH or GEM_PATH, and far more self-contained by default. This makes deployment much easier. Yes, you have to understand it up-front, but what is difficult about it? It's a list of libraries your app depends on. Clojure is one of those libraries. Unless you need to compile your Clojure code into .class files, that's it.
4. Ant? It's a poorly-designed monstrosity with horrific XML syntax. Don't use it. You don't need it.
5. Maven? Yes, it's a beast, and unfortunately, you need it. Luckily, the latest version of Leiningen wraps it very nicely, so you don't need to learn the details. You also don't need to look at its XML. You just make a project.clj file, put in your dependencies, and run "lein repl".
[+] [-] yason|15 years ago|reply
I've encountered several interesting languages over the years and they would all have been really nice and painless to use only if it wasn't for their lack of standard libraries that are just there.
Good set of standard tools and libraries are more important for a language's success than the language itself. The language has to be quite bad in order to drive programmers away from good libraries.
It's the Python problem: I know the shortcomings of Python quite well and I would happily use some other language instead except that Python has almost everything and despite the shortcomings of the language itself, Python is by far the fastest way to code a quick program to solve some random, particular problem.
I don't like Java but in the case of Clojure, the heavy machinery in JRE is a critical life-saver. Sure the Java side is ugly but at least it's there for Clojure.
The world is full of lisps that you can't do anything with. Clojure isn't one of them.
[+] [-] mcav|15 years ago|reply
Java libraries are so numerous and prevalent that I'm growing to prefer that kind of availability. Coming from Python, I'm not uncomfortable at all with Clojure's java library use.
It really doesn't feel like I'm interfacing with Java. It feels like I'm interfacing with a library designed with OOP. (No more verbose or unwieldy than necessary, given an object-oriented library.)
[+] [-] DanielRibeiro|15 years ago|reply
Comparing to other newcommer experiences (on linux os):
- Python: $ python (it is installed by default)
- Ruby: $ irb (it is installed by default with high probability, if not apt-get install ruby first)
- Java: download eclipse/netbeans/intellij, create new project, that's it.
Newcommers don't need build tools (let it be rake, rubygems, sbt, gradle, ant, maven, ivy, sake, leiningen, etc).
Of course, I agree that a getting started guide should pick one tool (possibly an open source one, but on this case all of them are open source), and guide you with it. Also, installing clojure with a repl client easy executable as irb/python's on linux package management systems (with the proper java dependencies) would help tremendously.
[+] [-] ihodes|15 years ago|reply
That being said, I do believe the "noob experience" is improving, and the community Clojure fosters is inviting and welcoming to newbies, as far as I've seen.
I've begun work on a tutorial to get people up and running with Clojure, but I will be recommending Emacs in it. As someone in the comments on the blog noted, if someone's goal with Clojure is to crank out a web app in 24 hours, they've come to the wrong place. Emacs enriches the experience, and I truly don't think it is as daunting as it is often made out to be. Gaining basic productivity in Emacs, even if not excellent productivity, takes little time, and the benefits of using Emacs seem large to me.
Regardless, the sentiment expressed here is important to consider. There should be a sanctioned IDE for Clojure, and it shouldn't just be Emacs and clojure-mode.el + Lein, at least not to start. Along with clojure.jar, I'd like to see Leibke's clj script packaged and promoted. That way, like with python, irb and newlisp, you can download and immediately get started with a functional REPL to see if you like the language before investing the time in setting up the ultimate IDE.
And yes, documentation. Please, documentation. It's in the style of LISP to have little to none documentation in code, as the code should explain itself. And it certainly should, but a little exlanation here and there can only help to enlighten those not as familiar with the language and save the time of those in a hurry.
But now is an exciting tine for getting into Clojure. Don't let the initial challenge of getting into it deter you!
[+] [-] mahmud|15 years ago|reply
Nearly every Lisp data type and all special forms take docstrings; documentation that gets compiled into your code that can be queried at run time. Lisp was the model for online Unix manual pages; APROPOS and DOCUMENTATION and builtin Common Lisp functions. There is even a defacto commenting style for documenting code at various levels; file-wide, top-level form, and small inline documentation.
The typical "Lisp experience" is a fat abundant system that rivals its underlying OS and platform. It even has a function, ED, to invoke the builtin editor/IDE, and some Lisps even have that builtin.
[+] [-] edanm|15 years ago|reply
I'd like to strongly encourage against that. Here's my story: take from it what you will.
2 years ago, I decided to get started with Lisp. I looked around, and the most "official" path seemed to be using "Lisp Box", which is Emacs based. I didn't have any experience with Emacs, but I did keep hearing about it, so I decided to jump in and learn it (I was, after all, in a learning mood).
Of course, learning Emacs isn't a one-day affair. Sure, I could learn enough to do some Lisp (and I did). But it feels like a waste. So I started to learn a bit more about Emacs. Then more. Eventually, I was spending so much energy learning Emacs, that I didn't have any time left to learn Lisp. To this day, I've never learned Lisp.
In contrast, with Python, I spent a day with the IDLE shell that comes packaged as part of Python. Then I moved on to working in files, with IDLE as an editor. Eventually, I moved on to looking for a good Python editor/IDE, a search I spent a lot of time on. But the point is, I didn't need to learn a completely new environment to use Python. Don't forget, a n00b only has so much time/energy to learn, you don't want them wasting it on the editor but on the language. The editor can always come later.
[+] [-] india|15 years ago|reply
Oh no. I hope I do not come off as a troll but this is exactly why I never could get started with any of the lisps. I can't stand emacs or netbeans or eclipse. This a personal taste for me but a very strong one. They all just feel wrong to me. Associating a sanctioned ide with a language is a bad idea. It brings unnecessary baggage for a new user. By closely associating your language to an ide and by having every tutorial throw it in my face, your community is just creating an unnecessary entry barrier for me. Please consider making the tutorial ide independent.
[+] [-] jimbokun|15 years ago|reply
This is the answer to so many of the concerns cited in this discussion, I'm shocked that it has not been more heavily cited in this thread.
http://github.com/liebke/clj
I haven't used it yet, but from the documentation it looks brilliant. Dead simple package management and REPL tied together in a single command line tool. A noob should be able to go far with just this plus text editor of choice.
[+] [-] technomancy|15 years ago|reply
Indeed, if anyone complains about the noob experience in Clojure, it's probably a good sign that they don't use IRC. =)
[+] [-] watmough|15 years ago|reply
The author complains that running Clojure per the simple instructions in the distribution is not a valid way to program, yet, then tears into the complexity of much more complex setups, which due to the fast-evolving nature of Clojure are often extremely fragile.
The command-line invocation of Clojure will work if you have a valid Java setup, and with the addition of jReadline, you have a decent, albeit bare-bones, environment for experimenting. Copy and pasting code and running it directly works, and once you figure out how to 'source' in a file, you can start building something modularized and significant.
I wrote about a 5000 line Clojure program, fairly early on, and ran development cross platform with just an SVN server at home on my mac, svn clients on mac and Windows, and notepad for Windows development, and TextMate on the mac. GUI design for Swing was done in NetBeans and could be loaded on the fly easily by Clojure.
Note the conspicuous absence of Vim, Emacs, Slime or any of the other fragile setups that people think they need.
Clojure has great facilities for modularization, and it's dead easy to use, but familiarity improves with practice in doing what actually happens instead of just pushing buttons in an IDE.
[+] [-] dedward|15 years ago|reply
That's the really big "IF" that the article is trying to address, I think. If you already have your head firmly wrapped around java, then Clojure isn't a monster - but if you don't, you have to cover a lot of ground to actually produce production code with it.
[+] [-] obiterdictum|15 years ago|reply
[+] [-] 10ren|15 years ago|reply
It seems that the problems mentioned are common to all JVM languages (I was especially struck by similarities with JRuby, recently on HN).
Ideas: (1) look at other JVM languages. Copy their solutions. (2) someone develop a "JVM language support environment". It might include eg. a java server, so startup times disappear. (the JVM is damn fast, once it's going. And, kinda freaky to witness, it gets perceptibly faster, through JIT). Oracle might even include subsume it into Java, should it serve their business interest.
[+] [-] mindblink|15 years ago|reply
That being said, with a lot of the Clojure IDE plugins and build system reaching usable maturity, the n00b experience has gotten a lot better than when I started a year ago. So, keep up the good works, guys....
[+] [-] technomancy|15 years ago|reply
True fact: there aren't very many Windows users who are willing to help with portability issues. Of course there's a chicken and egg problem here to be sure, but if you'd like the situation to improve, you should volunteer.
(A great place to start would be by updating the .bat file that comes with Leiningen to work with version 1.2--hint, hint.)
[+] [-] alnayyir|15 years ago|reply
I empathize with your pains, but you can't walk into a biker bar and ask for filet mignon.
[+] [-] jkkramer|15 years ago|reply
[+] [-] mkramlich|15 years ago|reply
[+] [-] fauigerzigerk|15 years ago|reply
Your list suffers a little bit from selection bias. It doesn't include all the old languages that never caught on. There are of course many reasons why a language doesn't become popular and lack of good documentation and ease of getting started is probably not the most important one.
I mean, there's C++, the language that managed to become popular by doing everything wrong ;-)
[+] [-] tetha|15 years ago|reply
In other words, since the very very first day of python, people could tell a new python user to grab that one very specific package from python.org and go ahead until he is able to judge the different implementations out there, which solves precisely the problem mentioned in the article.
Same goes to an extent for Java and PHP.
[+] [-] mkramlich|15 years ago|reply
Most of the other points were, at best, just pointing out things you'd expect with a new language and new ecosystem. It takes time to polish things.
[+] [-] arohner|15 years ago|reply
You can pry my preferred text editor from my cold dead hands, but not all developers think that way.
[+] [-] cageface|15 years ago|reply
I'm all for making it as easy on the noob as possible but clojure will never be blub. It makes the hard problems easier but the price is that the easy problems are harder.
[+] [-] yason|15 years ago|reply
I don't think that Clojure isn't meant to be an easy language for newbies, like Java. Clojure is a master's tool, like Unix. Good tools require time to learn and for the user to develop a bond with them.
It's precisely the functional programming, multimethods, immutability, concurrency, macros, and sexprs that make up Clojure's value. There are enough blubs already.
[+] [-] frognibble|15 years ago|reply
- Edit code in plain Vim.
- Run Clojure from the command line.
I have a single directory where I download the appropriate jars. I ignore Ant, Maven, Leiningen and all that other fancy stuff.
[+] [-] d0m|15 years ago|reply
That's where python, ruby and javascript clearly win over scheme and clojure. On the other side, C++ is weird. There exist a lot of "get started with C++" such as accelerated C++ but, in my experience, a true beginner won't understand it because the language is too complex.
[+] [-] technomancy|15 years ago|reply
http://www.try-clojure.org/
[+] [-] mjw|15 years ago|reply
Although I think Scala does some of this stuff better, there are still a lot of pain points for the newbie when it comes to different build systems, java toolchain, classpath, library dependencies, binary compatibility issues etc.
On the one hand it's great that tonnes of toolchain options already exist for Java which can be used with these languages. On the other hand, when coming from (say) the Ruby or Python world you just want and expect there to be one main widely-used/well-documented way to do basic things within a language's ecosystem, like installing libraries and so forth.
Rather than first having to figure out how the java world works, then make some arbitrary-seeming choices of java tools without much guidance, and then figure out how to work with the new JVM language on top of those.
It's about making sure this new crop of JVM languages feel like first-class citizens, rather than just add-ons for a java ecosystem which you're implicitly expected to know a lot about.
[+] [-] daveungerer|15 years ago|reply
http://github.com/relevance/labrepl
It's so good that I think the clojure website should be linking to it. Here's the summary from the above link:
Labrepl is an environment for exploring the Clojure language. It includes:
- a web application that presents a set of lab exercises with step-by-step instructions
- an interactive repl for working with the lab exercises
- solutions with passing tests
- up-to-date versions of Clojure, contrib, incanter, compojure and a bunch of other libraries to explore
See instructions below for getting started with NetBeans/Enclojure, Eclipse/Counterclockwise, Maven, Mac/Linux command line, Windows command line, IDEA/La Clojure, and Emacs.
[+] [-] joe_the_user|15 years ago|reply
A nice, compact hello world example would help. I didn't see any example on the parent (I'll admit I skimmed). A nice example of being able to something fairly complex in a clear, simple fashion would excite me.
The size of the Java hello world program made me nauseous every time I've looked at learning it.
There was a thread a while back about how much patience people doing BS activities. Not only do I have little patience with wasted, I tend to think that intelligence correlates with not wanting one's time wasted.
If you can show me a language which is clear and won't waste my time, I'll love. I love Ruby (though it's just too buggy to use for serious programming still).
[+] [-] csmeder|15 years ago|reply
[+] [-] pacoverdi|15 years ago|reply
I consider it best suited for people with extensive knowledge of the Java platform and at least good notions of FP, needing a way to write more powerful and concise code without throwing away a proven codebase or compromising performance.
Even if new to Clojure (or Lisp) I would not call these people n00bs.
[+] [-] jwr|15 years ago|reply
The good thing about Clojure is that there are people who care about these things — see for example the leiningen and clj projects on github. Leiningen is already way beyond anything that was available for Common Lisp, for example.
There's hope.
[+] [-] mkramlich|15 years ago|reply
And the number two best practice would be to get the novice to the point of writing and running their own "Hello World" program, in that language, as fast and as easily as possible.
Almost everything else is gravy.
[+] [-] unknown|15 years ago|reply
[deleted]
[+] [-] sandGorgon|15 years ago|reply
But the problem is that clojure _strongly_ eschews object-oriented programming. But ActiveRecord and Django ORM are (or pretend to be) object-oriented. Therefore, there is a strong mismatch conceptually (e.g. http://stackoverflow.com/questions/3067261/how-does-one-mode...).
More than an IDE, there is a strong need to migrate _thinking_ from Rails/Django, etc. to Clojure.
[+] [-] devonrt|15 years ago|reply
His first complaint is that getting started with Clojure involves starting a REPL and that this is not how actual development is done. Well, no, it isn't. It is however, where you will spend most of your time. Not only that, but the most accessible documentation on both the Ruby and Python official sites mostly involve using a REPL. Clojure's only problem is that running the REPL is slightly more involved. Also, Clojure 1.1 is not already outdated and I'm not sure where the author got this idea. 1.2 will have some great features, but AFAIK will be completely backwards compatible. I'm not sure where a beginner would even learn about 1.2 without some serious internet trolling.
Next the author complains about how difficult obtaining Clojure is difficult. There is a "Download" link right on the clojure.org homepage that lists zip files for both 1.1 and 1.0, both of which include the source. This is less difficult than getting Python or Ruby, which involves downloading and installing a pre-compiled binary or compiling it from source. Also, the author complains about 1.2 not being available, even though 1.2 has not been publicized and is still in beta; true beginners probably don't know that 1.2 even exists.
The author complains about the fact that there are a whopping three choices for IDEs for Clojure, despite the fact that each of these IDEs also have plugins for Ruby, Python and PHP. There are no fewer IDE choices for these languages. If you ask most Rubyist which IDE you should use many of them will tell you TextMate, and editor that is neither free nor cross-platform. The author then brings up Xcode; well, of course every Objective-C developer uses Xcode, they don't have much choice. Clojure's myriad of IDEs is not a problem unique to Clojure.
Build systems, again, I don't think this problem is unique to Clojure. Where is the great documenation for Rake? Or Buildr? What build system do Pythonistas even use? Seriously, I've been using Python for a while now and I have no idea if there exists a canonical build tool. Comparing these platforms to the likes of Objective-C and .NET in terms of tool support is just unfair, in my opinion.
Like I said, I agree with the spirit of the post. Clojure is not an easy language to get into, but it has very little to do with the points the author made. Much of the cognitive load involved in getting started with Clojure has to do with the fact that it's a Lisp and most programmers are used to ALGOL syntax and Object Oriented semantics. Another thing to keep in mind is that Clojure is an incredibly young language. Much, much, much younger than Python, Ruby, PHP, Objective-C or even Scala. Taking into account Clojure's youth it's amazing that it's as far as it is.
[+] [-] mkramlich|15 years ago|reply
[+] [-] mkramlich|15 years ago|reply