Decided to try out Coffeescript. Why – to make javascript coding interesting again. It’s always fun to play around with new language, especially with one that has different syntax.

Installed in on my ubuntu following directions from [Installing CoffeeScript on Ubuntu or Debian](http://opinionatedprogrammer.com/2010/12/installing-coffeescript-on-debian-or-ubuntu/) and [Coffeescript.org](http://coffeescript.org/#installation). Installed node.js as well – wanted to try it out anyway after last [devclub.eu](http://devclub.eu) meetup.

For now just playing around with it – trying to write javascript using coffeescript’s syntax with the help of [Coffeescript Chrome Extension](https://chrome.google.com/webstore/detail/fldhkfldchaibgaheaogapecjmnkaepe).

It’s definitely fun, but don’t see any practical use so far. Syntax is similar to Ruby, so maybe it’s easier for Ruby developers to switch to Coffeescript instead of learning Javascript. Will see if it turns useful later on.

Was implementing BlueprintCSS on a website, and needed a way to put a conditional stylesheet. Remembered seeing it somewhere, but was not able to find it, so decided to do a little research on how it can be done. Here is a little reference on what can be used in `view.yml` `stylesheet` option.

If a stylesheet you include needs some options you should put them after a stylesheet url like this:

stylesheets:
- blueprint/print.css : {media: print}

Everything you put there will be used as an attribute to `link` tag. Certain keys have a special meaning.

`absolute: true|false` – Will make CSS url absolute

`condition: lt IE 8` – Will wrap `link` tag in a conditional comment

`raw_name: true|false` – Will use stylesheet name as a `href` directly. Ignores `absolute` option, does not attempt to add `/css/` before it

I am now learning Python and try to do all sorts of tasks I previously used PHP for using Python programming language.

This works quite well, especially with the help of a great [website for PHP developers switching to Python](http://php2python.com)

Was looking for a function similar to PHP’s `number_format()`, and to my surprise didn’t find any.

After more googling found that [in Python3 `format()` and `str.format()` allow to do that](http://docs.python.org/py3k/whatsnew/3.1.html#pep-378-format-specifier-for-thousands-separator). But I’m using Python2.7.1

Turned out, that it works as expected. The code I used in the end looks like this:

This question puzzled me for quite a lot of time now. It’s easy to get a first element of a “normal” array, but whenever I would need the first element of a hash I would go with code that just didn’t look clean to me.