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.

A plugin system for clojure-blog

In order to support different syntax for posts, smileys and hook-ins in general I searched the web for inspiration and found the following link which have some cool info:

http://stackoverflow.com/questions/10272559/how-best-to-structure-and-build-clojure-apps-with-plugins

I’ve started small and decided to support changing the post content via a hook-in before handing it over to the html generator Enlive. The way it works is by registering any number of functions which can transform post content in a chain (vector). Zero functions means no transformation and the post content is serves as-is.

Here is some example code which can demo the thoughts behind the design so far:

(defonce changes (atom []))

(defn reg-change
  "Registers a fn (change) to a hook"
  [hook-name f]
  (swap! hook-name conj f))

(defn apply-changes
  "Applies all changes in the vector to the input"
  [change-vec input]
  (reduce #(%2 %1) input @change-vec))

(apply-changes changes "Test is good")

(defn good-is-bad [text] (clojure.string/replace text "good" "bad"))

(reg-change changes good-is-bad)

(apply-changes changes "Test is good")