Sunday, June 15, 2008

Sqlite3 with Rails

Sqlite3 is an easy to use DBMS available as a library. It is a self contained and server less SQL database engine. Because of its ease of use and small foot print it has become DBMS of choice for low traffic web applications.
Using Sqlite3 with rails is real easy. Grab the binaries from Sqlite3 download page. for windows you will require and Unzip these files and add them to your PATH environment variable ( or u can simply put the unzipped files to your ruby/bin directory) and you are ready. All Sqlite3 functionality is accessible via sqlite3.exe which you just unzipped and added to path.
To use sqlite3 with rails install sqlite3-ruby gem using gem command. Finally you will need to specify sqlite3 as the connection in the database.yml file of your rails application. Given below is development section of a sample database.yml

adapter: sqlite3
database: db/development.sqlite3
timeout: 5000

Notice that there is no username or password fields as they are not required.
When you do rake db:migrate database file will be created if not already exists.

Note: as of rails 2.0 sqlite3 is the default database and you will need to -d command line option when creating a rails application using to change it or you will need to change database.yml manually.

Thursday, June 12, 2008

REST in peace

I have been hearing this term (REST) alot lately and during my quest to find telecommuting work on internet I saw this term many many times. So today when I had a little free time I decided to do little research to find out what the hell it is. Once again, to no surprise, its a complicated term for a simple simple concept. Its not a framework or a standard or a protocol. Its simply a way of building web applications or web services. You can build RESTfull apps using any framework Rails or DJango or whatever you like.

Here you can find a simple tutorial about REST or you can follow this link to see how to build RESTful applications in Rails

Sheritech - What went wrong

For long time now I have been thinking to write about my experience at Sheritech.I had, and still have a lot of complaints but when I finally sat to write all I could remember was that I enjoyed my stay there. Question is why? Did I enjoy not getting paid or working long hours or working unpaid overtime. I think it was because I was in the company of my friends.

But this post is about "what went wrong" so I will try to stick to the topic :)

Generally people working in startups have stakes in them. This is what compensates for things like overtime and late or small salaries, and makes people, who are part of that startup, feel like they are doing it for nobody but themselves. And this was my and others (you know who) expectation from Sheritech but when things got documented we came to know that this was not the case. So obviously I started to look at things differently and i believe same is true for other people working there.

Startups require lot of hard work and little SLEEP. It is not possible for a startup to be successful when its CEO is almost never available (I believe you know the reasons for his unavailability :D). This thing wasted the best resource that we had and destroyed the office environment.

Startups require focus and determination. It is important to have a game plan before starting a new company. If one partner is thinking one thing and other is thinking another, it is never going to succeed.

Lastly and most importantly in any business owners/partners should be fair with each other and employees. You cant deceive people for long and it always ends badly when you try to.

The most important thing that I learnt from Sheritech and which I want to share is "Never ever work for your friend" because if you do you lose both.

Wednesday, June 11, 2008

Some Thing

In last few days I have been told by many friends that a blog is not supposed to be empty and that I should write some thing on it. So here it goes "SOME THING" :)