Manish Chakravarty's Blog

Thoughts. Musings. Suggestions, Ramblings


14 years of loving Linux and Virtualization - all on a Mac!
[info]manish_chaks
14 years ago I got my second computer [1]

It was a Macintosh LC  475, fondly called the pizza box.

Here's a picture:



I was used to live in Patiala then and we had to drive to Chandigarh - a good 60 kilometers to buy a computer. We went to this "computer expo" ( I forget the actual name, it's been 14 years after all) and the choice was between an IBM PC running Windows 95 and an Apple machine running Mac OS System 7 ( that's a good 9 versions before Snow Leopard! ).

As a kid I remembered seeing "Mission Impossible" and all the good guys used Apple machines while the baddies used IBM machines
I wanted the Apple machine. Dad wanted to buy the IBM machine for two reasons:

1. It was cheaper
2. The dealer promised me that "Windows 96" was right around the corner ( Yes, you read that right "Windows 96 - the next version of Windows 95" )

I insisted on having the Apple macs and after a brief fight and a one-month long waiting period, we got the Apple Mac LC 475. It ran a Motorola 68040 CPU running at a mind-boggling 25Mhz with 4MB of RAM and 256kbytes of video memory and a whopping 640MB of hard drive space.  I still have this machine in my house in Kolkata and it still boots :) 

I started writing programs with HyperCard and while it was cool, I didnt see any command prompt to type in cool commands like "Computer network security override". Of course I didn't know what a command prompt was then, but I knew I wanted it.

After all, System 7 used to look like this 





While Tom Cruise's Apple machine used to look like this:



Clearly the UI was different.

Then I came across a PCQuest. It used to be a geek-focussed magazine then - it's a boring CIO focussed magazine now. In article written by Atul Chitnis I read about something called "Linux" [2]. And most importantly, PCQuest came with a CD of Slackware linux. I cannot recall the exact version. But I remember that Slackware was for the x86 architecture and thus it could not run on my Apple Mac.

A year had passed, I got good results and I got a PowerMac 7300


It had a top-of-the line Power PC 604e CPU. It was also the time when Apple was in the midst of its first transition, from the Motorola to the PowerPC architecture.

It also had a CD drive and I bought my first VideoCD - "Terminator 2: Judgement Day"

What is important however, is that the PowerMac came with a very interesting piece of software from Connectix (later acquired by Microsoft) - called the "Connectix Virtual PC". It could emulate the x86 architecture on the PowerPC, enabling people to run MS Windows 95/98 on the mac


(Note the System 7 Tabs underneath the windows task bar and the ethernet / hard disk lights. Virtualization on SOHO segment computers is nothing new - I had this in 1998. Mainframes have been doing virtualization long before I was born - from the 70's )

Once I got Windows 95 running the Mac, I remembered that the Slackware CD from PCQuest came with detailed instructions on how to setup Slackware on a "PC". Since I had a Virtual PC I decided to give it a shot.

After around a week of effort ( it was 1998, I was in Class Xth and I had no internet connection) I managed to install Slackware on my box. It would be one whole year before I got (what I used to call) "X Windows" running on my machine with Tabbed Window Manager running on my mac. This is how TWM looks:


While it took me a year to get X running, it wasn't without it's joys.
I found out what modelines were, how to write my own X configuration files ( and running X -configure multiple times). I learnt how to compile the kernel, load and unload modules. I would watch compilations all day long. And since this was a virtualized environment, I rarely got any benefit of the long and slow complies. But I loved the "make config" and the "make menuconfig" scripts. ( one would run the kernel compile configuration in console and the other in an ncurses type interface )

My biggest achievement was writing my own man page. Slackware shipped with a package which had the entire The Linux Documentation Project's HOWTO's tarballed and that was an education in itself. I decided to write my own "man page" ( a Unix Manual page ) and started reading through the offline copy of the Man-Page HOWTO that shipped with the distribution.

The day before my Class Xth board exam I wrote an man page for a shell script that I'd written using nroff

My love affair with Unix had started.


========
Footnotes:

[1] My first was the Sinclair ZX Spectrum +


I was around 10 years old then. The first thing I did after getting the computer was to type "What is the population of the world" in the BASIC prompt. To my dismay it did not give me an intelligent answer; it said it could not recognize the command. I thought computers knew everything!

[2] = Many people prefer to call it "GNU/Linux" as well.
  • Leave a comment
  • Add to Memories

Simple productivity tip: Reduce distractions, use web apps!
[info]manish_chaks
At any given day, we have a lot of applications - even when we are working/pairing
Here's my typical scenario:
- Multiple IM accounts. Google Talk ( personal ) , Yahoo ( friends from TW and previous companies ) , TW's internal chat ( based on Jabber ) and sometimes IRC when I need geek-help. ( I am on IRC all the time outside of work, though )
- Multiple email accounts -Like most people my TW Mail account is open all day. And like most people I check my personal email from time to time. 
- Yammer - We have an internal Yammer account for collaboration
- Facebook - not open all day but I check it multiple times a day , like most people
- Mingle for project management

Applications that are usually open all the time during work: 

Adium - All IM accounts and sometimes for Facebook chat as well
Colloquy - For IRC
Mail.app - for my TW and personal GMail accounts
Yammer.air for our internal Yammer server
Murmurs.air for reading/posting murmurs to the project's Mingle instance.


And last and definitely not the least Growl which gives us notifications for all of these apps above!

I noticed things were clearly going out of hand and I needed to optimize - so I came up with this rule -
"Stop using desktop clients & rely on the web apps"

This is my current setup.
  • Safari set as default browser during working hours. TW Mail is typically open on it
  • Chrome for all personal work - typically have my personal GMail account open in it
  • Firefox for all web development work - I like to not use Firefox for casual browsing. Firebug and Web Developer toolbar are my friends. I know you can do almost all that these plugins provide i
  • Leave a comment
  • Add to Memories

Falling in love with Black and White photography
[info]manish_chaks
I have always loved black and white photographs. They seem more.. "expressive" to me than color photographs though I really cannot explain why.

The Lonely Guitarist

This is my all time favorite picture. I was passing through Place D' Arts metro station in Montreal and I found this old gentleman playing the guitar ( And he was playing really well )
The Lonely Guitarist

A flight of stairs at St Joseph's Oratory
I went to St Joseph's Oratory of Mont Royal and found a bunch of stairs at the side of the building, leading towards the top.

This picture would have made a very ordinary color photograph - but it looks much better in black and white

Just a flight of stairs at St John's Oratory

Jacques Cartier Bridge Montreal
This photograph was taken while I was sitting on the front seat of a running taxi. The iron-alloy pillars and support structures give some depth to the photograph. I had taken this picture in color mode initially , but when I converted it into black and white the "effect" of the depth really came out:

jacques cartier bridge montreal

Pier 21 - Halifax Harbor front
Millions of immigrants passed thorough this port to enter Canada. This is Canada's Ellis Island. I wanted to capture the notice in the foreground with George's Island in the background - did a poor job at it.

The view from Pier 21 - millions of immigrants arrived here during the World Wars and later


====================

Most photographs of static objects and people look more beautiful in Black and White than in color. Or maybe it's just my perception

Setting up a JRuby on Rails 3 + NetBeans dev environment
[info]manish_chaks
Aim: to get a dev environment up and running for what would be a mixed-mode Java/JRuby project using NetBeans as the IDE.
If NetBeans is your IDE of you choice then this blog post should help you out.
I have done these steps using a macbook pro / OSX Leopard with NetBeans 6.9 - steps should be pretty much the same on other platforms.

==========

Download JRuby from here and extract it in a directory of your choice ( I used /Users/manish/Desktop/jruby-1.5.2 for this example )

Fire up neatbeans
Go to Project - > New Ruby on Rails project.

We will now attempt to point NetBeans to the latest version of JRuby that we downloaded.

Click on the "Manage" button
New Ruby on Rails application - manage the ruby platform

In the Ruby Platform Manager, browse and point to the "jruby" binary in the "bin" folder :

We will now attempt to setup the ruby-debugger.
Download the jruby-debug-base gem from here and save it.
Install the gem locally.
Here's the command-line trace
% ./jruby -S gem install -l ~/Desktop/ruby-debug-base-0.10.3.1-java.gem
Successfully installed ruby-debug-base-0.10.3.1-java
1 gem installed
Installing ri documentation for ruby-debug-base-0.10.3.1-java...
Couldn't find file to include: 'VERSION'
Installing RDoc documentation for ruby-debug-base-0.10.3.1-java...
Couldn't find file to include: 'VERSION'


Now pull in the ruby-debug-ide gem

Here's the command-line trace
% ./jruby -S gem install --ignore-dependencies -v 0.4.6 ruby-debug-ide
Successfully installed ruby-debug-ide-0.4.6
1 gem installed
Installing ri documentation for ruby-debug-ide-0.4.6...
Installing RDoc documentation for ruby-debug-ide-0.4.6...


Switching back to netbeans, give your project and name and choose the correct platform as shown below:

Choose the correct target platform

Configure the DB - I would strongly suggest using SQLite or MySQL unless your team has a good reason to use a different database. In the example I have used derby but I do not recommend it.


We now go to the installing rails page:
We have three action items - I have marked them with blue arrows


Click on the "Install Rails button" - you get the following dialog once it gets done:
Rails installation done

After this I also installed Warbler and JRuby openssl.
Hit next and let netbeans complete the project creation.

Now that we have a JRuby on Rails 3 project created on the site, lets find out how to debug this application inside of netbeans.

Firing up the debugger ( Command-F5 ) - Netbeans tells me that it's downloading the glassfish debug gem - I am not sure why this is there - but I let it go ahead nonetheless.


Turns out I was wrong - I changed the server preferences to webrick.
Right click on the project name in the left pane , select "properties" and select Webrick server from the drop down as show below:
Change netbeans server preferences to Webrick


You would also need to comment out the entry referencing the sqlite-ruby gem in the Gemfile ( Line #8 ) as show below:
Comment out the need for sqlite3-ruby in the gemfile

We now need the activerecord-jdbcsqlite3-adapter ( we commented out sqlite in the previous step )

The command line trace on my system is as follows:

% ./jruby -S gem install activerecord-jdbcsqlite3-adapter
Successfully installed jdbc-sqlite3-3.6.3.054
Successfully installed activerecord-jdbcsqlite3-adapter-0.9.7-java
2 gems installed
Installing ri documentation for jdbc-sqlite3-3.6.3.054...
Installing ri documentation for activerecord-jdbcsqlite3-adapter-0.9.7-java...
Installing RDoc documentation for jdbc-sqlite3-3.6.3.054...
Installing RDoc documentation for activerecord-jdbcsqlite3-adapter-0.9.7-java...



Hit F6 to run your app and voila!

Safari running JRuby on Rails 3

==========

Further reading:
1. JRuby Debugging
2. JRuby and Rails 3 ( This information in this link is a bit outdated though )

RIM: Make it easy for us to develop Blackberry Apps
[info]manish_chaks
I want to develop a Blackerry App for Mingle Murmurs

Here are RIM's terms and conditions for signing up for the App World:

Administration Service Fee


  • There will be an initial $200 USD administration service fee in order to complete registration and submit applications.

  • In the event your account is not approved, this $200 USD administration service fee will be refunded.
  • This initial fee will allow for ten (10) application submissions.

  • If you have used all ten (10) application submissions, an additional $200 USD administration service fee will be applied on your next submission, adding another ten (10) application submissions to your account.

  • Multiple versions of the same application will not count as separate submissions. (Example: An application might have a version for the BlackBerry Storm and the BlackBerry Bold)

  • An upgrade to your application, resulting in a submission of new COD files, will be counted against your ten (10) application submissions.

  • Resubmission of a rejected application will be counted against your ten (10) application submissions.

  • Removal of an application will not affect your remaining balance of application submissions.



All I want to do is to write a simple free BB application. Paying 200 USD for it is too much!

Solaris no longer free: The FUD around OpenSolaris
[info]manish_chaks
There have been many articles posted on the demise of OpenSolaris now that Oracle/Sun made Solaris a paid download.

To clear up

1. Solaris GA releases ( Solaris 10 u1 - uX ) were never open sourced.
2. Solaris code base was open sourced under the CDDL. The Solaris Express and OpenSolaris distros came out of this
3. Belenix ( http://belenix.org/ ) is a distro created by Moinak Ghosh and Sriram Ram Naraynan ( who is from ThoughtWorks ). It is built on the OpenSolaris code base
4. The word "OpenSolaris" itself means three things a. The distro b. The code base c. the community
5. Most of the OpenSolaris code base is available at http://src.opensolaris.org/source/. This is the source belenix is built on.
6. Thanks to the CDDL, Belenix development can go on.

For any further questions, post to the Bangalore OpenSolaris User Group at mailto:ug-bosug@opensolaris.org

First Ever RubyConf in India - Organized by ThoughtWorks India
[info]manish_chaks
RubyConf India is being organised by the Ruby community in India and actively supported by Ruby Central. It will feature keynote addresses and talks by Chad Fowler, Ola Bini and other key figures in the Ruby community.

Sidu is our point man here.


Visit http://rubyconfindia.org !




Tags: ,
  • 1
  • Leave a comment
  • Add to Memories

An nice distribution for my netbook – help!
[info]manish_chaks

I've a Acer Aspire D250
It's got WinXP SP3 + Android in a dual boot configuration ( preloaded / factory option )
My review of it -> http://manish-chaks.livejournal.com/103322.html
My usage:
This netbook is going to be my travel machine. I use the "reliance netconnect broadband+" datacard to remain connected to the matrix.. err. the internet while I'm travelling.
While XP SP3 was fine initially, I'm beginning to miss Linux on this machine.
The Android OS is pretty good, but it lacks
- anyway to recognize and dial the data card - so no connectivity in places without WiFi - the biggest deal breaker
- Apps for organizing / editing photos
- other native apps that I use less frequently but would be good to have while travelling
XP SP3 has pretty much everything I require, but
- As I install more software, it seems to be slowing down ( Standard windows problem)
- Lack of a good CII
- It's windows.


What I want:
I want to install a nice, "lightweight" distro , which
- works flawlessly with all the hardware I have - sound, wifi , datacard and hibernate/sleep are a must
- doesn't hog too much RAM.
- a good-to-have would be that the distro is compiled specifically for the Atom CPU, so that  I can extract the maximum out of this netbook ( I'm open to cross-compiling Gentoo for this , if that helps )
- KDE4 would be a good-to-have, although I can live with fluxbox + some basic apps as well.
- Good power management - I'm not sure how good/bad linux is with power management as I mostly use it on my desktops or inside a VM on my mac.
- Please dont suggest Kubuntu - anything Debian or RHEL/CentOS based would be desirable - I dont mind not have the bleeding edge software - I can compile what I want -  I want stability above all else - irritated with breakages in the Ubuntu/Fedora world. [1]

Any suggestions?
( posted from my notebook from the train - from somewhere in the middle of nowhere )

[1] - I've had Ubuntu and fedora kernel upgrades breaking sound, VMWare modules and Wifi amongst other things. Used Debian for a year on another laptop ( till mid 2009 ) and never faced any problems


Review: Acer Aspire D250 Netbook with Andriod
[info]manish_chaks

Since I am travelling a lot, I bought I needed a light netbook – bought the Acer Aspire D250 for slightly less than 18k INR

acer-aspire-one-d250

Tech Specs:

  • Intel Atom Processor N280 – 1.66 Ghz, 667 Mhz FSB
  • 1 GB Ram ( will upgrade it to 2 GB Shortly 0
  • 6-cell Li-ion battery ( has been giving me 5+ hours of backup )
  • 160 GB HDD
  • Card Reader
  • Android OS as a standard dual boot option -  more on this later

Initial Feel;

  • The keyboard felt nice – I am very particular about keyboards and this one seems to be pretty nice initially. The laptop itself is pretty small though and your fingers will cramp up after long hours of usage ( I started having problems after 4+ hours)
  • The 6-cell battery gives me 4-5 hours of backup on my usage ( more on usage below ) – I’m more than happy with it.
  • Atom processor is powerful enough for my usage on this machine
  • The display is glossy and nice. The area around the display is prone to fingerprints though
  • The laptop is really light – around 1kg and thin, Though nowhere as thin and light as the Macbook Air, it’s pretty good and light for my needs and it’s in my budget :)

How I use it

I made a conscious decision to keep the software stack on my machine as light as possible. I use windows XP SP3 on this ( came preloaded ) along with Android OS ( more on this below).

Firefox is the primary application that i use on my machine. I try and use web applications where ever possible. Which means I used GMail and Google Apps (for my TW Mail ) instead of using a Outlook 2007 as my mail client. I did try using Windows Live Mail , but I found the web interface the best deal.

I use Pidgin for all my IM needs – it’s got all my accounts ( my Y!, Google Talk and TW Jabber account) linked to it. Sometimes I use meebo as well. The heaviest application that I use on this machine is Eclipse – it’s way slower than my Macbook Pro – but then netbooks are really not meant for heavy development work. Java6 + Eclipse do really drain this machine – also because it’s got just 1 GB of RAM.

The only other development that I’ve been doing on this laptop is Firefox extension development – the laptop seems more than adequate for this task - Notepad++ being my editor of choice for this work.

I also have Emacs for windows installed on this machine – though I’ve been rarely using it.

The machine did not come with the windows XP Home CD/media with it. Acer provides a software for backing up the laptop into disks/DVD’s. I havent bothered with it cause I am going to get rid of windows and install Linux on it once I get back to Bangalore anyway.

The Android OS

When I bought the netbook, I noticed the “Android ready” logo on the right palm-rest area. I thought it was marketing shill till I installed/activated the Andriod OS ( you can do this from within windows – very cool ) and booted into it. Android asks your for your Google Account credentials and then syncs with it. All your Contacts / Calendar / GTalk friends list etc are automatically synced. It lacks some essential (for me at least) apps such as Twidriod but I assume you can install it somehow – need to explore more once my travels end and I get back to Bangalore.

Acer supplies its own ‘flavour’ of Android. I didnt use the word ‘distro’ – the Android world has not yet seen the kind of fragmentation the Linux world has, which is a good thing. I plan to install the vanilla Android OS once I get back – hardware support being a non-issue as everything seems to run well anyway

It’d be interesting to try out Chrome OS on this once it comes out – I've a gut feeling that it should work on this machine too many issues.

Verdict

If you are looking for a netbook which gets the job done and lets you play around – go for this one – I’m positively in love with this once I bought it.!


A glimpse of life inside thoughtworks studios
[info]manish_chaks
The Entrace

Vivek , Jayanth, Thrivikram - In that order

Thanks Vivek, Jayanth and Thrivikram for you..

For all the pics, go here

You are viewing [info]manish_chaks's journal