Avoid ESC in Vim

OK, this is one of those times when I’ve been humbled again.  I’ve been using Vim for over a decade now, and once in a while it occurred to me that using ESC to exit to normal mode is NOT the most efficient thing ever.  Maybe my little finger is too little, or maybe my keyboards are too large.  But reaching ESC with while in the middle of crazy typing session broke my concentration a few times.  But somehow I just thought that it is one of those most natural Vim things that I had to get used to.  Today, I came across something genius that told me that I don’t have to.  If you have the same problem, edit your .vimrc file and add the following lines:

" exit to normal mode with 'jj'
inoremap jj <ESC>

Once you load your new configuration, typing ‘jj‘ in insert mode will be equivalent to press ESC key.  Brilliant!

GitHub’s free alternatives

Personally, I love GitHub.  And I try to promote it as much as I can, and I’ve even got a few organizations setup their repositories there.  However, I am still asked once in a while for a good alternative.  These work either for people who don’t have the money to pay for GitHub’s private repositories, or who are required to keep their code in-house.

Here are a few alternatives to the GitHub hosting service. There are two types of software: locally installed software and hosted.  These are decent for smaller companies that don’t have the budget for licensing a hosted service.

Free Local Install

  • gitlabhq.com – this project looks really good, with new releases every month.
  • gitorious – solid, free alternative to GitHub.

Free Hosted

  • gitorious.org –  open source projects are free, like github.
  • bitbucket – unlimited free private repositories for up to 5 users. The pricing model is similar to the other Atlassian products.

Also, have a look at Sourcegraph, which you can host yourself or pay for a hosted service.

hack {cyprus} *12

I’ve heard the hack {cyprus} *12 announcements for a few weeks now, but unfortunately was too busy with my own projects to attend.  If you missed all the noise, hack {cyprus} *12 is a hackathon-type event, where a bunch of people get together decide on a few ideas they want to implement and jump into coding.  They usually go at it non-stop for approximately 24-48 hours, after which they present the results.

These are quite common in all the countries where programmers live.  Now, we can proudly say that programmers live in Cyprus too.  The picture above is from a few minutes ago.  Just for the record, it’s Saturday night, after 1:00am!  That’s nothing but impressive.

The event seems to be quite well organized, with its own website, Facebook page, Twitter, and more.  (Have a look at their live stream page for latest updates.)  It is also being sponsored by quite a few companies, including Microsoft, Cyta, and Cyprus University of Technology.

As I said, unfortunately I was preoccupied with something else to book my attendance for this event.  However I am planning to go see the presentations tomorrow (care to join me?).  According to the schedule, some time around 5-5:30pm the teams will show off what they have managed to achieve in such a short time.

On builds and releases

Once in a while I find myself in a conversation on builds and releases.  It’s one of those where before the conversation everyone seems to be on the same page, but immediately after the conversation starts, there’s a massive fight and argument as to how the world works today and what’s the best path into the future.  And it gets messy.

I believe that the old approach of one release a decade is dead.  Especially in web application development.  The world is much more dynamic now, and so should be the release plans.  This seems obvious to many, and yet, not a lot of people understand the implication of this.  Making releases more dynamic means making the release operation cheaper, ideally – free.  Can you release a new version of the project once a day?  How about every hour? Why not?  You should be able to.  Regardless, whether you will actually release every second or not, the path to making releases cheap is automation.  And that means you have to have some form of software version control, and some form of build or deploy script.  And, of course, some form of rollback script for those times when things go hairy.

One of the things that I do at my current job is setting up such a deployment process.  I’ve done it before, but it’s been a while, and given how fast these things change and improve, I’ve been looking around for new tools and ideas.  While doing so, I came across an interesting GitHub blog post.  And while their requirements and environment are different from mine, I still found it useful.  One of the things that shows how well their process works is the stats at the end of the post.  Just look at them.

That’s about 100 deploys per day! Not bad, not bad at all.