Monday, January 23, 2012

Recent JavaScript Projects

Every now and then I like to write little JS snippets. Lately I've been a bit busy with work but there's always time for some casual coding. In this post I'm going to go through a few of these. I will present the following projects:

Thursday, December 29, 2011

Blog Highlights of '11

It looks like this year is nearing its end. Thanks for tagging along! I thought it might be fun to write a post that highlights some of the nicer posts I wrote this year. So far I've been blogging around two and a half years.

I think blogging is slowly starting show its advantages. Just a while ago I needed to solve certain Django specific problem. After googling around I happened to find the solution at my blog. In essence this blog serves as a kind of auxiliary memory of mine. As a side benefit some other people might find my ramblings useful too. This in turn might lead to new chances. Blogging is definitely a good way to market yourself if you're into that sort of thing.

There has been some talk on whether or not blogging is dying. The basic premise is that social mediums such as Facebook and Twitter are eating its popularity. That's probably partially true. I believe blogs will remain to have some influence. After all you'll need something to discuss and tweet about. Most importantly blogs are more permanent by nature. It's easier to refer back to some concrete blog post than some obscure Twitter conversation ages ago. Different mediums serve different purposes.

Now that I got the intro bit out of the way, let's take a look at the year. Quite a few things happened. While at it I'll try to outline some possible ideas for the next one. It's not like I'm running out of ideas. On the contrary. There's still plenty of material left I need to get out there sooner or later.

Wednesday, December 28, 2011

Replacing iTunes on OS X with Something Better

Some time ago I finally had it with iTunes on OS X. It's a really bloated piece of software these days. So as a result I decided to look for an alternative. I wanted something simple that supports multimedia keys for playback. Apparently a combination of Clementine player and a fix to disable default bindings does the trick.

In this post I'll recap my efforts. I tried various solutions before coming up with this specific combo. I'm not a big fan of Clementine's playlist driven user interface but it does the trick on a minimal level.

Tuesday, December 27, 2011

How to Write a CSS Preprocessor Using Node.js?

CSS preprocessors seem to be really popular these days. At least there are many to choose from. See Stylus, Sass and LESS for example. These kind of tools provide some functionality missing from vanilla CSS and make it more fun to write. Some popular features include variables, functions, mixins, nesting and overall lighter syntax.

Node.js (or just Node) is another emerging technology. It is currently the leading server-side solution available for JavaScript. Effectively it enables us to use JavaScript in the whole stack instead of just client side. Some claim this makes it easier to develop (no linguistic context switch). Anyhow it's one the hot technologies out there at the moment.

In this post I'm going to show you how to use Node to write a CSS preprocessor with a selected few features. Since "less is more" I'm simply going to call this little project as "more.js". Hopefully this post gives you some ideas on how you might write your own preprocessor.

In principle they're very simple. You just take some data in, transform it and finally spit it out. Most of the magic happens in that transformation stage. I'll start with the ends (read file, write file) and move onto actual business logic right after that.

I'll be using Node v0.6.6 since that's what I've installed on my Mac at the moment. If you are a Mac person too, you can easily install it via MacPorts simply by invoking "sudo port install nodejs" at terminal. If you are using Linux you should be able to find Node from your local package management system. Note that it might not be the freshest version available so you're probably better off installing it by other means. You could just grab a package directly from their site and install that. There's a Windows version available too.

The code will likely work with a lot older version of Node as well. I used only a couple of Node specific features (mainly file IO). The rest is just vanilla JavaScript.

Monday, December 26, 2011

Brief Primer to Immaterial Rights

Disclaimer: I am not a lawyer and cannot be held legally liable if something bad happens because you read this post. M'kay?


Immaterial rights seem like a necessary bad. At least they're something we've to live with. It doesn't hurt to know something about them. In this post I'll try to explain some basic terminology related to them and not to bore you too much. If you want some real advice, consult your legal expert. This is here just so you can get started with the topic.

Wednesday, November 30, 2011

Lean UX - Better Software, Faster?

As you might well know, most software projects are considered failures. We've developed software products for a long time and we still don't get it right. What's going on?

I believe it has something to do with the intrinsic complexity of software development. Barriers between various stakeholders definitely aren't helping the situation. In addition we're bound by basic laws of communication. In this post I'm going to provide some kind of way, lean UX, that can help us to deal with these issues better. Read on if that rang a bell.