Good morning!

Get your custom motivational alarm clock on Fiverr

  1. Order custom script. I wanted a reminder to check my calendar and list of tasks and do a quick exercise. (Greg)[] wrote an excellent energetic script for me.

  2. Order professional quality recording of the script. (Linnea)[] did a brilliant job.

  3. Set the recording as an alarm instead. If fear of sleeping through this alarm you might set up usual annoying wake-up-the-dead alarm couple minutes later - just in case. Then again, if you’re that sleep deprived, no motivational messages will help you :P

Total cost: $15.

Here’s the script I got:

Good morning sunshine, it’s time to get up and greet the brand-new day!

I can see by the smile on your face that you must have slept like a baby…

And by the spring in your step that you’re ready to take on the world!

Lying in your warm, cozy bed for another 20 minutes isn’t for you, is it?! Nope! You’re a go-getter, a self-starter, a high flier and an over-achiever.

Now get up and let’s do a little stretching and some quick exercise to get you ready for the day.

There’s no time like today to get out there, do your best and feel proud of yourself.

What’s your schedule look like? Make sure to check out your calendar so you don’t miss anything important.

Snap to it pal! Let’s see how fast you can get ready and get on out of here!

The big, wide world is waiting, but it won’t wait forever!

You know who the man is?! It’s you! You… are… the… man!

Now get out there and by god give it all you’ve got!

Feel free to download the mp3 and use it as your own alarm.

13 Plays

reinventing European train travel - with Loco2

If you ever wanted to travel across Europe by train, you know how frustrating searching connections and booking tickets can be. I’m excited to be part of the team who took this as a challenge.

Our main battlefield is Journey Search - a place for you to search train connections from different national rail companies and book tickets online.

But that’s not the end of it. I was fortunate to fall into company of train junkies thrilled by sheer prospect of traveling by rail, without the need for any destination, Open Source Software advocates who give back to the community and environmental activists.

Testing Rails callbacks and observers in isolation

[UPDATE 2012] OMG did I write that? I’ll add my new opinion at the end.

Up until recently I’ve been testing Rails callbacks like this:

class Post
    after_save :send_notification
    def send_notification

post =

…and thought that I’m so cool because I’m testing things in isolation and testing implementation of send_notification in a separate test.

Wrong! I’ve been testing the framework (testing that appropriate callbacks are being fired when the post is saved), not to mention that performing actual save is wasteful. So now I got:

post =

Much better! I’ve seen this idea taken further: tests that assert a callback is declared - and not triggering it. Good idea in principle but too radical for me for now. I’ll stay with the above method.

And now the pleasant surprise. run_callbacks triggers observers as well, so when I moved notifications where they belong I got:

post =


Nowadays (late 2012) I wouldn’t use ActiveRecord for this purpose at all. Instead I would probably create a separate model, like PublishPostUseCase which saves the post record and sends notification. It would capture knowledge about all things that need to happen when user hits “Publish”. I’d leave poor overused and abused ActiveRecord callbacks for things closely related to attribute values and persistence.

Retrieving Gmail thread IDs with Ruby

Regular IMAP provides us with a list of emails but we’re left with the task of grouping them into threads. This is not as simple as looking up “RE: ” and “FWD: ” in subjects, not even close. Mail-Followup-To and Mail-Reply-To headers are not reliable either. Gmail does a good job grouping emails into threads and we want to tap into this data.

Gmail IMAP implementation does offer this information: Gmail X-GM-THRID extension

Unfortunately, Ruby’s Net::IMAP throws and exception (“unknown attribute”) when parsing wich such an attribute.

I resorted to monkey-patching the IMAP library. Here’s a snippet from my app from my app:

Read more

Load Tumblr page as a widget in the layout

I’m not following Tumblr community so this may be obvious.

  1. Go to “customize my theme” view, find “Pages” section and click “Add page”
  2. Change dropdown selection from “Standard layout” to “Custom layout” (which effectively means no layout.
  3. Keep “show a link to this page” unchecked - we want it only as a widget
  4. Enter HTML/JS/CSS at will
  5. Go back to “customize my theme”. Edit either “Description” section, or edit theme html.
  6. Add and customize following snippet:

Read more

Why I’m deleting my oDesk account

4.958 hours of work history (that’d be nearly 3 years of working full time). 10 contracts with average feedback 4.9/5 and some glowing recommendations. Account featured in provider spotlight. And yet I’m deleting it.

Read more introduction - watch on Vimeo I say, I say, my first ever screencast in English. To be honest - my first ever screencast altogether. I’m sure in a year I will look back and laugh at this. You don’t have to wait (-: BTW it’s outdated already, the app has proper sort-of-user-friendly interface.

Marketing advice from 1885.

The first time people look at any given ad, they don’t even see it. The second time, they don’t notice it. The third time, they are aware that it is there. The fourth time, they have a fleeting sense that they’ve seen it somewhere before. The fifth time, they actually read the ad. The sixth time they thumb their nose at it. The seventh time, they start to get a little irritated with it.

Read more

Fetching original record values in jqGrid

jqGrid sports a peculiar in-place editing model. First it pulls JSON data from the server, puts cell values through “formatters” (for example encodes HTMLS entities) and renders the table. When you trigger in-place editing it uses “unformatters” to get original value and uses this original value as default value of the input.

jqGrid ships with a handful of formatters, for example one that turns email value into a mailto link. For each default formatter there is an “unformatter” - to following our example with an email it would extract email address from a mailto link.

Read more

Google Apps Script to import calendar events into a spreadsheet

I wanted to get calendar entries in my spreadsheet for further processing. Seems that Google Apps are slowly catching up with their PC parents.

What’s awesome is that I can use a programming language I feel comfortable with - JavaScript. Here’s the code:

Read more

Recurring stories in Pivotal Tracker

I want to handle recurring responsibilities in Pivotal Tracker. I don’t want Pivotal to implement this feature. Better to keep the application lean, instead this seems a great fit for a third party app.

In the mean time (while waiting for Pivotal Recurring Stories App) we can get by with a simple script that adds stories and run it periodically.

Pivotal team did a great showing simple cURL examples in their API docs

Read more

Agile Process

I often find myself explaining basics and benefits of iterative and agile development (and one particular: Scrum). I’ll try to gather some main points. I plan to update this. I really do. No – really.

Update 11/4/2010: I don’t think I will update this.


We organize the work in “sprints” one week long (sometimes two weeks). At the end of every sprint we bring you working software with new features completed.

If you don’t fund the project out of your own project, consider this: investors really prefer to get a demonstration of something working than a “progress update” and proofs of concepts instead of documents.

Read more

Access a subtree of svn repository with git-svn

Recently I needed to interact with largish svn repository containing some 10 years of development history. I tried the usual:

git-svn clone

The problem was it took way to long to download. I mean I left the workstation running for the night and in the morning it wasn’t done - what’s worse I had no idea how to estimate remaining time.

Read more

Save on Heroku’s Custom SSL addons

Heroku charges $100/mo just to support one SSL certificate. They have their reasons - they need to reserve a public IP number just for your application, and their platform - Amazon EC2 - gives only one IP per virtual machine, so they need to reserve full EC2 instance just to have a public IP.

If the app is small and requires only 2 dynos, then it’s three times the price of the hosting itself. Say you got a dozen of such small apps…

Read more

Protecting the business: my backup solution

My workshop runs on four Linux workstation, on Macbook and one Windows box. We also manage some VPS servers. Here’s backup solution in a nutshell:

Separate backup server (Linux), running Rsnapshot every hour, taking a snapshot of local workstations and VPS servers.

Each night latest backup is uploaded to Amazon S3. Besides that everybody archives their projects on DVDs.

What’s Rsnapshot

If you’re not familiar with Rsnapshot it makes copies of selected directories. Each snapshot is a full regular copy of all protected data - no big compressed archives, incremental copies etc.

Read more

Loading posts...