3 ms·
I got a new job in December. This company mostly uses Ruby and PHP. I was given an assignment for which they scheduled 2 weeks. I wrote the whole thing in Cloju
by lkrubner 14y ago
I got a new job in December. This company mostly uses Ruby and PHP. I was given an assignment for which they scheduled 2 weeks. I wrote the whole thing in Clojure, my new favorite language. I got it done in 1 week (6 days). After I was done, I asked if it was okay if I used Clojure. The folks I work with had no problem with that. They asked were impressed with my speed, part of which I attribute to Clojure.
I am the first person in this company to use Clojure, (although there is a small team in London that now uses Scala, and there is an official goal to move toward JVM technologies). I use it because it lets me work very fast. I have spent many years writing Ruby and PHP. I used to use them because I thought they were fast, and Java was slow. But one's point of reference shapes one's preferences.
Let me put it like this: I started using PHP in 1999. At that time, I felt strongly that this was the easiest way to write web apps. Java was verbose. The Struts framework was monstrous to the point of being offensive. Perl was ugly. I had never heard of Ruby. I became an evangelist for PHP, trying to convince companies that its use would make web development much more pleasant and faster.
Later I did some Ruby On Rails development. I like this language, though I have never understood the smug sense of superiority of some Rails developers, especially in their attitude toward PHP. In my mind, these are 2 similar languages with slightly different strengths and weaknesses, but at roughly the same level of power.
PHP was for a long time a Wild West of development. Every developer built their own CMS and then used it for everything. At some point after 2006, this changed. Ruby On Rails was a huge influence. By 2008, the only jobs I could find, for either Ruby or PHP, were using monolithic frameworks: Rails, Symfony, Drupal or Cake. I found myself bogged down reading endless documentation. I recall losing whole days trying to track down a bug in Symfony and then finding it was because of a setting in an obscure YAML file. The situation was not as bad as Struts, but I felt that somehow the world had taken a wrong turn. Once upon a time lightweight scripting languages offered freedom from Java and Struts -- and when you make that comparison, both Ruby and PHP seem like heaven. Bruce Eckel summed up the spirit of the change here:
"But for someone who has invested Herculean effort to use EJBs just to baby-sit a database, Rails must seem like the essence of simplicity. The understandable reaction for such a person is that everything they did in Java was a waste of time, and that Ruby is the one true path."
http://www.artima.com/weblogs/viewpost.jsp?thread=141312 http://www.artima.com/weblogs/viewpost.jsp?thread=141312
To me, Clojure is interesting for 2 different reasons:
1.) the language
2.) the eco-system
The 2 work in combination of course.
When I got done with my 2 week assignment, which I did in 1 week, I ran "lein uberjar" and gave a single binary to the sysadmin, so he could roll it out to the production machines. He asked where the other files were. I said "There are no other files, all the HTML, CSS, Javascript, images and code are in this one file." He asked how to start it. I gave him a simple 1 line startup command. He started it up and was amazed. He said, "That's it?" I said, "That's it." He said "Why can't they all be this easy?" He was used to dealing with complicated Capistrano and Jenkins commands for roll-outs.
To me, Clojure has that simplicity, speed and elegance that I was looking for in 1999, when I stumbled on PHP and decided PHP was the wave of the future.
I suspect the Great Age Of Lisp is still ahead of us. Stuff like Clojure makes me think there is a vast potential here, still waiting to be unlocked.
- deleted 14y ago[deleted]
- justin_vanw 14y agoSo, if I were to do your two week assignment in one day, in C, would that mean that C is much better than Clojure? What if I gave your Sysadmin a make file that would build a Debian package or RPM package rather than expecting him to maintain some complex and silly deployments system? The sysadmin would be my new best friend, but would that imply that the language I used was better? You are doing some seriously sloppy thinking here.
- lifeisstillgood 14y agoI have to disagree - he was talking about the eco-system of clojure as well as the language. We do get mixed up with complicated frameworks at the expense of simple (dare I say composable) solutions. Clojure is small and simple enough that it has not yet had the weight of working in a thousand different environments imposed on it.
- lkrubner 14y agoAs lifeisstillgood suggested, you are doing some sloppy reading here. I wrote: To me, Clojure is interesting for 2 different reasons: 1.) the language 2.) the eco-system You clearly read #1 but you seem to have missed #2.
- lkrubner 14y agoAs lifeisstillgood suggested, you are doing some sloppy reading here. I wrote: To me, Clojure is interesting for 2 different reasons: 1.) the language 2.) the eco-system You clearly read #1 but you seem to have missed #2.