Skip to main content


Showing posts from 2008

Git it done, Rubyists

The small article I did for the Ruby Advent 2008 went up on 9th December. It was aptly named Git it done, Rubyists . I went through the basic steps to create a Git repository and how to play with it using your beloved programming language; Ruby. Two libraries ( Grit and Ruby/Git ) were given a brief introduction and that's almost it. The article was aimed to be an introductory and a short one. I hope someone will find it useful. Ruby Advent 2008 is an advent calendar with the Ruby flavour. Lakshan , a fellow Sri Lankan Rubyist organized this years Ruby Advent following the tradition from 2006 . I can't judge my own article, but I can assure that the rest of the articles are excellent. Ruby Advent 2008 was featured in RubyInside , RailsEnvy podcast , and many other sites including RubyFlow and RubyFu. IMHO, this years calendar was a success. A bunch of awesome Ruby community members contributed contents convering many interesting topics. Mast read for anyone interested in Rub

Open Source, FOSS Politics, GitHub and rise of a new era

This post is a response to a blog post by Chintana Wilamuna . Actually, it's rather an addendum than an answer. I do agree with him. This is something I want to add. It got longer than I thought, but could make good (enough) reading when you ignore the typos. Here we go. There is no denying that Open Source movement has a great impact on the ICT industry and by proxy, to human society. If you don't believe me, clearly you haven't been paying any attention to ICT or mass media for that matter. Do your homework and if you still disagree, you can contact me if you want. Anyway, my point is that the Open Source movement has been a success. It has, in my opinion induced and/or inspired other phenomena such as Wikipedia and the rise of social networking ( Eg : Twitter, Facebook , MySpace , etc.). An Open Source project is usually a software project which is community driven and self centric (the software itself). The community focus is usually on the software it's develo

Howto Setup a Subversion (svn) Repository for a Rails Project + Bonus

Setting up a Subversion (svn) repository is something development teams have to do fairly regularly, not that I want to use Subversion. :) If you listen to me, go use Git . Subversion is undoubtedly very good. But after using Git for about a year, you can't simply get me to switch back. Git is that good. :) I've written about Git before . In cases where you can't use Git (or you feel too castrated by TortoiseSVN, pardon me for the pun) you can use Subversion. In this post I'll go through the steps you have to follow to get a basic Subversion setup up and running on a CentOS 5 Linux host. However I think you should be able to use this on other Linux distros too. There's more than one way to host a Subversion repo. I'm going to stick with one way involving WebDAV. Don't mind the buzz word. It's the most common usage for this purpose. If you want a repository where you want to checkout and commit remotely, this is an easy way of getting it done. In addition

Updated: A Simple Diagram on Distributed VCS (Hint: Git)

This post is an update of a post I made on 29 May. So if you like you can skip the whole post and just download the diagram ( PDF / PNG ). PDF version looks better. This is a simple diagram to illustrate the use and the difference of a Distributed Version/Revision Controlling System (DVCS) opposed to a traditional/centralized VCS. The post will target a generic audience and will not include in detail technical information. It will rather be an introduction to the DVCS in general. As you already know that Git is my favorite VCS software and the diagram will also have some reference in that sence. My purpose of drawing the initial diagram was to explain DVCS (namely Git) to a client. However I wanted to change a few things and here is the results. I didn't think that this is that important to create a new version. But I wasnted to try out Draw as a diagramming tool. The older version was done in Dia. After trying OO.o Draw, I think I'm going to stick with it for m

Errno::EPIPE (Broken pipe) MySQL Error in Rails

I've been working professionally with Ruby on Rails for a few months. To be exact that's mostly in SysAdmin capacity. During the time, I've seen some weired errors which I had not seen anywhere else. Time rolled on and now those things don't look weired at all. Actually I should have looked more carefully. Later, I did and found my way through. So here's some stuff I found. Hope this will save someones time. (My Ruby servers post is coming shortly,.. really, and will include details about Thin and Passenger too. Actually I was waiting Phusion Passenger AKA mod_rails to be released. For a quick peak of the post, I'm currently running Thin in production and also evaluating Passenger. Update: I've moved about 6 apps to Passenger. So far so good. Thin is still my first choice though. You can look forward to the post along with some Capistrano scripts too, ...soon. :) 1. Errno::EPIPE (Broken pipe - The Major Pain in the Neck) The team I'm working with are usi

Arthur C. Clarke: The Odyssey Concludes

As most you have already heard, Sir Arthur C. Clarke , the British/Sri Lankan writer and visionary passed way this morning in Apollo Hospital. Clarke who was a house hold name in Sri Lanka was living in the country from 1956. It is said that the souther sea is what brought Clarke here. It is a know fact that he really liked the places like Unawatuna, Roomassala, etc. Clarke was a worldwide known person for his famous work like the Odyssey series (2001, 2010, 2061, 3001) and Rendezvous with Rama, Fountains of Paradise, The Deep Range, etc. and also for inspirational visionary work. For me, "The Deep Range" is the favourite, not at any rate because of the Sri Lankan connection in the book, but because of the illustration of Ocean and creatures it creates. I'll always keep re-reading it to experience that wonderful feeling of being in the Ocean. This is also the book where Clarke points that we could look into the sea before going to walk among the stars. Sir Clarkes passin

Google Summer of Code 2008 Mentor Organization List Announced

Summer is going to be upon us very soon and it looks certainly awesome. As usual Google is brightening it up. Google Summer of Code or more lovingly called GSoC or SoC has been announced for the fourth consecutive run! (Meanwhile let's hope lives would be better for the people affected by the forces of nature in past few days.) Google Summer of Code is a student program where university (BSc, MSc, etc.) students can work for an Open Source software project for 3 months under Google sponsorship. I was one of the lucky students last year (but had to resign due to a couple of domestic bereavements). This years program is announced and I hope at least a few excellent coders will be interested in this news. Please convey this news to relevant students, while I check out any interesting project for me. :) And remember last year about a 20 add students were selected from Sri Lanka. So don't think you don't have any chance. You just have to be enthusiastic, skilled (in coding) and

Howto setup a MySQL Connector/J 5.1 for Tomcat on Linux

Again, I'm not switching to Java. :) For clarity, I'm helping one of my online buddies to setup and use Ruby even as I write this. This work was something I had to do for a Rails project which used JSPs and stuff with a MySQL database over JDBC. The application setup was quite interesting calling JSPs to work with a Rails webapp. Actually the following things are found on the Internet. I cannot remember all the sources I looked at, but one was the MySQLs own documentation and Apache Tomcat documentations. So if this works (which in my case did), credit should not be mine. :) Here's the setup. GNU/Linux (in my case CentOS 5, although should work with any Linux distro) Apache Tomcat (5.5.25, should work with Tomcat 5.5 range) Sun JDK (1.6.0_04) MySQL (5.0.22) MySQL Connector/J (5.1) 1. I assume that Java is setup ( See my previous post for more details on setting up Java manually), and your MySQL is running on the same host on port 3306. Please replace your actual settings i

Howto Setup Sun Java on Linux Manually

I'm not switching to Java. :) But this particular thing is something I've answered several times. So instead of repeating it every time, I'll put the details here and point others here. Installing Sun's Java (JDK and JRE) manually, without using something like yum, apr-get, urpm, etc. seems to be something many desktop (or whatever) Linux users want. For example they want to run certain applications like NetBeans, FrostWire, etc. which require a JRE to be available. This tutorial is going to take you through the steps you need to setup a working JRE/JDK on a Linux system. You may as well take this idea and tune it for your non-Linux environments like Solaris, *BSD. Note: This howto assumes you have 'sudo' configured for you. If you don't have 'sudo' configured, you'll have to either use 'su' or login as root to use the commands I have provided with 'sudo' at the beginning. Please replace file names and paths in this howto with you

Open Source Revolution: Episode N - Attack of the Phones

Once upon a time in a galaxy far far away called the Milky Way, there were phones! Some of the creatures there, were smitten by the iPhone or Nokia N Series or so called smart phones which are jam packed with features. And yet for some of us the whole requirement would be a Nokia 1100 or a Motorola F3 (or whatever brick which can make phone calls). Whatever the cause maybe, you should be well aware that the arena of mobile phones is expanding it's horizons like a frenzy. And being a FOSS geek, I can't help feeling optimistic about the current state of the art. This far the mobile phone has been a gadget we buy from a vendor, use it as it is, not allowed to meddle with, preloaded with proprietary software (which usually is ugly literally and metaphorically) and so on. In regions like US, EU and so most of the phones come bound to an operator (so called locked phoned). Fortunately in Sri Lanka it has not been that ugly where we buy unlocked phones then put a SIM from any GSM oper

I'll be Back on This Blog, Very Soon

I know it's been a while since my last post, but I'm still around despite the rumour that I might have been in Fort Railway Station bomb blast. That's a joke, a very bad and a tasteless one, I know. Shouldn't joke about security (literally). So let me apologize from everyone and convey my condolence to the close ones of all who lost their lives and were affected by recent terrorist attacks in Sri Lanka. Then let me give this brief note. I've been too busy past couple of weeks (actually months) with a lot of things including my new employment. So I wish to let you know that I'll be back very soon, and I already have a couple of things as drafts. So stay tuned. Good news is that I have loads and loads to say about things (Tech/Non-Tech), especially web servers (Apache, Nginx , Mongrel , Thin , etc.), Ruby, Rails, web hosting (sliced/VPS), rails deployment ( Capistrano , etc.), GNU/Linux, Open Source (as usual), Open Source mobile phones ( OpenMoko , Android ), ran