4Clojure with Me (part deux)

Last month I blogged about my efforts to get through 4Clojure in a collaborative manner via my github repository of 4Clojure solutions.

My 4Clojure efforts were a bit sidetracked by my efforts to jaunt through the Joy of Clojure, which can best be summed up as an interactive/online reading group trying to make our way through the Joy of Clojure.

Those two paths have now converged. The folks running the Joy of Clojure jaunt have set up their own github repository for 4Clojure solutions at https://github.com/probablywrong/wrong4clojure. It’s the same idea as mine. Post your 4Clojure solutions along with any relevant comments that you’d like to add that explain your solution. The difference is that this one is much more active :)

I’ll likely be abandoning mine in favor of the repo at probablywrong. There are already several solutions posted along with some great comments. If you’ve been following my repo, please check out the probablywrong repo, and of course, feel free to send pull requests with your own solutions. It’s also probably not too late to join in on the reading group. We’ve got a mailing list, an IRC channel (#probabywrong on freenode), and do weekly Google Hangouts. See my previous blog entry for more details.

A Jaunt through The Joy of Clojure

Last week I blogged about my endeavor to collaboratively work on the questions at 4Clojure.com. This week, my progress on that particular endeavor might slow down a little bit, or perhaps already has. It’s not forgotten by any means, but I’m juggling a few projects and multi-tasking as fast as I can.

Earlier this week, I was focused on my MongoDB for Developers course, which is currently in week 6 of 7. Last week I had completely forgotten about it because I was focused on the 4Clojure work. I remembered it Sunday evening, and it turned into a long Sunday evening (assignments are due on Monday). This week I wanted to avoid that scenario from replaying itself, so between Monday night and Tuesday night, I wrapped up this week’s MongoDB assignments. Go me!

Read More»

4Clojure with Me

I’m currently in the process of a renewed effort to become proficient with Clojure. We’ve been using it at World Singles in production for a couple of years now, but there’s been enough CFML that I’ve not really needed to do much in the Clojure beyond very superficial updates. But the CFML is shrinking, the Clojure is growing (well, not really… the Clojure code is much more concise than the CFML code, but you know what I mean), and it’s time for me to fully embrace Clojure.

It’s not that I haven’t tried over the past couple of years. But making the leap from self-taught ColdFusion developer to Clojure and functional programming has been no small task. Functional programming is such a different paradigm that I’ve stumbled over many of the basic concepts. Recently, however, I took a Coursera course on Programming Languages. That’s when the light bulbs started coming on. I had read Clojure books. I had gone to conferences. But sitting down and actually writing out code for the assignments, that’s when it started to click. To be clear, the Coursera course wasn’t Clojure-based. It wasn’t meant to teach any particular language. Rather, it was meant to teach programming concepts. And specifically, functional programming concepts. I started to understand the difference between recursion and iteration. The notion of variable assignments, and in particular, re-assigning a value to a variable, started to make me uneasy. Conceptually, the pieces were falling into place.

Now I’m tasked with fleshing out some code at work that relies on Clojure. Some of it is still CFML written in FW/1, but the meat of it is using the Clojure-based Expectations testing framework. It’s been a challenge, but as with the Coursera course, jumping into the code has proved to be very beneficial. But I still need to hone the Clojure skills in order to work efficiently. Enter 4Clojure.

Read More»

Sublime Text 2

Early last year, I blogged about TextMate, which I referred to as my “new IDE of choice”. Embarrassing choice of words really, since TextMate is anything but an IDE. That was primarily what drew me to it. It is a text editor with some extra features, and much more lightweight than a typical IDE. I was happily using TextMate for day-to-day work up until a number of months back when I switched over to ColdFusion Builder 2.

I’ll say up front that I’ve never really been a huge fan of Eclipse in general, which is the framework on which ColdFusion Builder is based. I think it’s a great framework, but it can be quite the resource hog. Yet I started using ColdFusion Builder because my boss used it, and seemed to really be a fan. I figured he knew something I didn’t (which is often the case), and that I just needed to start using it and getting used to it. I was sure that after a few weeks, I’d be over the hump and happily coding away.

It’s been pretty close to a year now, and I still don’t feel comfortable with Builder. It still feels like I’m trying to like it. But it still sucks up quite a bit of RAM, CSS editing is a chore (we have a few _very_ large CSS files that Aptana chokes on), and the keyboard shortcut for commenting a block of code is:

CTRL+SHIFT+OPTION+Q+Z+BACKSPACE+UP+UP+DOWN+DOWN+LEFT+RIGHT+LEFT+RIGHT+A+B+A+B+START *
* not intended to be a factual statement

Additionally, some things that I had gotten used to with TextMate weren’t present in Builder. I was used to a closing bracket/curly brace/parentheses being auto-inserted, and me being able to type over that character. But in Builder I kept ending up with 2 closing elements. I eventually turned off the auto-close feature. Long story short… it just never really flowed for me. It never felt “right”.

Read More»

Clojure in 3 Minutes

There are a few different ways to install and configure Clojure. I was shown this way, which seems to be the easiest, most straightforward way of getting Clojure up and running. I’m pretty sure it’s the most straightforward way that I’ve seen of getting any language up and running. Stick with me and you’ll have written your first line of Clojure locally within 3 minutes. Five at the most.

We’re going to use Leiningen to get Clojure installed and running. Taken from the readme file:

Leiningen is for automating Clojure projects without setting your hair on fire.

Working on Clojure projects with tools designed for Java can be an exercise in frustration. With Leiningen, you just write Clojure.

Read More»

Learning Clojure

Over the past few months, we’ve been making a pretty aggressive move towards using Clojure in our model at World Singles. We still have a CFML-based application in a ColdBox framework, but our model has seen a lot of CFML re-written as (fewer lines of) Clojure.

Before anybody asks, or leaps to conclusions, there will be no Helms-ian type blog posts where I bid adieu to the CFML community. Learning and using a new technology does not, and should not automatically equate to closing the door on any other. I’m not learning Clojure to replace CFML. I’m learning Clojure in addition to CFML. CFML will always be a tool in my toolbox. It just won’t be so lonely anymore.

Read More»
© Copyright Charlie Griefer