What's so cool about Clojure

Around 5 years ago a colleague of mine tried to spark some interest for Clojure. He described it using terms like functional, higher order functions, pure functions, composable, immutable data, lazy evaluated, code is data and vice versa, macros, concurrency etc. None of which I truly understood at the time but instead felt like buzzwords.

So instead of making me jump on the bandwagon, he left me with the question:

What's so cool about Clojure?

His enthusiasm and a little 15 minute REPL session showing off some data structures and concurrency made an impression I couldn't shake. It felt awesome and I couldn't explain why... I still didn't have an answer to my question, only a feeling!

After 3 years of naively waiting for Eureka, I realized that I needed to get out of my narrow comfort zone and commit to the learning process. So I decided to take the plunge and I felt good about it. After all I knew I still had a lot to learn - in retrospect that was an understatement.

The more you know, the more you know you don't know. - Aristotle

There was a gap in my knowledge about programming, sometimes entire concepts was unfamiliar other times I had "invented" similar concepts myself without knowing that it was "text book stuff" and it already had a name. To close this gap I needed to start out on familiar ground with something I could relate to and work my way up from there.

I now see that my journey to answer my own question has actually been more about programming in a broad sense than about Clojure as a programming language. The "buzzwords" is starting to make sense and it has got me thinking about how I would have introduced these to my not-knowing-self a few years back. Lately specifically "Lazy sequences".

I have some notes which might become a blog post in the near future... so stay tuned if you want to know what all the fuzz is about.

A new blog engine

For a long time I have wanted to find an alternative to Wordpress. It felt like an obstacle which needed overcoming every time I had an idea for a blog post. The result being that I didn't get any posts published (I have a few drafts which I never finished).

My own Clojure blog adventure was more about my trying to learn the Clojure language, and would probably have some of the same issues I experienced with Wordpress. Also when I stumbled on Jekyll my own blog project got subconsciously shelved, because it already implemented all my ideas so much better.

Apart from Markdown being a first class citizen, the blog can now be hosted on GitHub Pages.

Anyways all my old blog posts have now been migrated to Jekyll and the revamped layout now looks sufficiently good and works on mobile devices so I feel confident making a first release. I have "cheated" and based the design on the Jekyll theme called Hyde.

You are now looking at the result... lets see if this actually help on my post frequency :)

My Gnome 3 usability issues

I've just installed Gnome 3.6 (some packages might still be 3.5.9x) on my laptop by upgrading to Ubuntu 12.10 beta2 together with the Gnome 3 PPA for a few missing things like the updated Nautilus.

I'm a dedicated Gnome user and generally love the alternative focus Gnome 3.x has put on the desktop. But as with all software, no matter how mature (no - Gnome 2.x wasn't perfect either) there is room for improvement. The following is some of my usability issues, I've come across during my daily use of Gnome since 3.0. Some of this might be due to Ubuntu breaking the intended Gnome 3 behavior.

State toggle

It's possible to toggle both the overview (Super) and snap windows to the sides of the screen (Super + <left/right>).

I expected that it would be possible to toggle the new message tray as well with a subsequent Super + M. Instead Escape is needed to close the message tray. Having the Escape shortcut is fine, but I would like Super + M to work as well - just like with the overview. Also it seems that the Maximize toggle has been removed. Super + <up> still works for maximizing but for restoring the window you now need to press Super + <down>. For ease of use and consistency I would have preferred that a subsequent Super + <up> would restore the window (just like with the side-snapping).

When maximizing windows by dragging them to the top, I would like it to be more clear that the area next to the application menu is a drag handle. I'm not sure exactly how to accomplish this but here are my immediate thoughts on the subject:

  • A transition effect when dropping the window where the title bar slides up behind the top bar.
  • Something visual that connects the title bar and the drag handle on top bar to make it clear that the top bar now serves as the title bar for the maximized window.
  • Have a mouse-drag-pointer fade out / zoom out over the drag handle on the top bar upon drop.

Overview

From time to time I find myself wishing for arrow navigation between the application windows on the overview and to be able to select the window I want to have focus on my workspace with Enter.

Also if that worked it would be nice to also be able to move an application window to a new workspace using the Ctrl + Alt + Shift + <up/down> - just like outside the overview.

When a window is minimized I would like it to differ slightly visually from non-minimized windows - perhaps by being slightly transparent?... I dont know. When we look for a specific application I use everything we know about the application window to find it quickly: Application UI, window size, open content and if I could... the fact that it is minimized.

I don't like the automatic open of the of the overview when the last application is closed. Usually I have my windows maximized and can't always remember whether I have one or several applications on a workspace. I often find my self closing an application with Alt+F4 and pressing Super right after to open a new one. If the application was the last one of the workspace I close the automatic opened overview instead of opening it. This is slightly annoying.

File dialog

I expected that keyboard navigation for the file dialog would be like the navigation in Nautilus aka. Files. Ie. Alt + <arrows> for navigation. All that said the Gnome experience is awesome and I already can't wait for all the cool stuff in 3.8 and ahead :)

jQuery wizard plugin - now available on GitHub

I've transformed the example from my blog post yesterday to a jQuery plugin and pushed it GitHub. This removed some of the previous nessesary manuel added css. Also this opens up for adding different initialization options in the future.

Slide transitions between html sections using jquery

I needed to make the picture in my head of the interface and workflow for my pet project clojure-blog more concrete.

To split tasks up in multiple steps for the user (not the communication to the server) was essential. The transition Gnome 3 uses in "System Settings" was what I was looking for.

I've googled for it several hours only to find complex examples of something the almost did what I wanted.

I finally gave in and started to put something together which I expected to be at least as complex as all the code I had already seen through my search for a solution... it wasn't :)

The following is some very nice (short and readable) piece of very generic code which uses the new html5 tag section and normal links with internal references to structure the content.

You can demo an example of it here on jsFiddle

Both the html and js is clean... styles for body and h1 can safely be removed together with all css properties defining colors and margin.