Google Chrome OS – Lets try to be positive

Posted in Opinions, Personal, Random Ruminations on July 9, 2009 by rubayeet

1489_540

Google’s announcement of stepping into the OS market with Google Chrome has generated quite a stir in the Net. While many have welcomed Google’s new venture, others have been busy with making absurd predictions. Some are talking about what current operating system it’s going to kill? Some saying they don’t need a new OS because they already have one they like. This fellow got more creative and ranted about ‘features’ of the OS before it’s even released! It’s like blaming an unborn baby for being bad in sports?

Personally, I don’t understand the motive behind this kind of negative thinking. Why not think about what new things Chomre might offer, rather than which popular OS it’s going to kill? Let Bill worry about possible market threat of Windows, we should worry about how to use Chrome. You already have the perfect desktop? May be that’s what you think and may be you are right. But should that stop others from trying to innovate, seek answers to problems you never realized you had? Google’s new browser introduced radical concepts in terms  of usability, may be the OS will do the same.

As developers we should be more open minded towards innovations, and throw away this die hard slash fanboy culture.  Technology isn’t religion, you won’t be denied entry to heaven for switching to a newOS/programming language. If nothing else, competition is good. It brings the best out of people. Let’s hope it’ll force Microsoft to make a more secure Windows, or inspire Linux people to create much user friendly desktop systems.

WinDirStat gives the real picture of the hard drive, literally.

Posted in Sys Admin, Windows on July 7, 2009 by rubayeet

If you are trying to find out what’s eating up your precious hard disk space in Windows XP/Vista, WinDirStat is your weapon of choice. A much helpful tool than the brain dead Explorer, WinDirStat analyzes the usage statistics of your hard drive/partition/directory and outputs(along with other data) a treemap, which is a visual representation of how blocks of data are organized on the disk.

windirstat

Clicking on a block shows you the file/directory physically taking up the space in the directory list(shown in the picture). Comes quite in handy. I just cleaned 1 Gigabytes worth of data cached by Safari 4. If it wasn’t for WinDirStat, I would’ve never known that Safari thinks your hard drive space is infinte! Who knows, may be Steve’s is really is?

Download WinDirStat from SourceForge.

Deploying Django application on mod_python and Mini Mac

Posted in Django, Mac, Programming, Python, Sys Admin on July 2, 2009 by rubayeet
Server  : Apache 2.2
OS      : Mac OS X 10.5.4 
Python  : Version 2.5.1
Django  : Version 1.0.2 final
Machine : Mac Mini

mac finder

Mod_python is a loadable Apache module which embeds the Python interpreter, so Python code can be run in-process by Apache. To deploy and run your Django application in an Apache web server you have to

  1. Download and install mod_python
  2. Load it in Apache
  3. Configure Apache to run the Django app.

In this post I’m going to share my experience on how to do all that on a Mac Mini that runs on OS X 10.5.

The Software & Hardware

Here was my system configuration

  • Server  : Apache 2.2
  • OS      : Mac OS X 10.5.4 
  • Python  : Version 2.5.1
  • Django  : Version 1.0.2 final
  • Machine : Mac Mini running on 2.0 GHz Intel Core 2 Duo processor with 2GB RAM

1. Get the mod_python source

Check out the mod_python source code from the remote SVN repository*

$ svn co https://svn.apache.org/repos/asf/quetzalcoatl/mod_python/trunk/ mod_python_src/

*The reason I’m downloading the source from an SVN trunk and not from the Apache website, is because the source available at the later one isn’t properly patched for Mac Mini’s architecture. In my earlier attempts, when I downloaded and built mod_python from stable releases, Apache was failing to start whenever the mod_python module was being loaded using the LoadModule Directive.

2. Build the source

$ cd mod_python_src

$ ./configure --with-apxs=/usr/sbin/apxs

$ make

$ sudo make install

3. Configure Apache to load mod_python when it starts

Open the Apache configuration file

$ sudo vi /etc/apache2/httpd.conf

Add the following line to the file 

LoadModule python_module libexec/apache2/mod_python.so

Now restart Apache

$ sudo /usr/sbin/apachectl restart

4. Configure Apache for Django 

Let’s suppose you have a Django app callled “mysite”. Copy you the directory to the Apache DocumentRoot

$ cp -r /path/to/mysite /Library/WebServer/Document/

Add the following lines to the httpd.conf file

<Location "/mysite">

    SetHandler python-program

PythonPath "['/Library/WebServer/Documents'] + sys.path"

     PythonHandler django.core.handlers.modpython

     SetEnv DJANGO_SETTINGS_MODULE mysite.settings

PythonAutoReload On

PythonDebug On

</Location>

This’ll make Apache to route any requests under URL “/mysite” to the mod_python handler. It passes the value of DJANGO_SETTINGS_MODULE so mod_python knows which settings to use.

Now restart Apache and go to the site http://localhost/mysite

If it works then congratulations! You’ve just deployed your app on Apache!

Troubleshooting tip(s)

If Apache fails to launch after you’ve installed and loaded mod_python, run it in debugging mode

$ sudo /usr/sbin/httpd -X

Look for any error message printed in the terminal, copy it and google it. You may find a solution online.

You should also check out

Here lies Michael Jackson(1958-2009), King of Pop

Posted in Personal on June 26, 2009 by rubayeet

michael_jackson

I was surprised to see Michael Jakcson’s name appear in the Twitter trending topics this morning. I hardly suspected death to be the reason for this sudden attention to the legendary artist.

As someone who was born and brought up in the 80’s, Michael Jackson holds a special place in my heart. There was no MTV while I was a child, and no Internet to download mp3’s. Yet Michael Jackson was a household name in this corner of the planet. You couldn’t find a kid who never heard of “break dancing” or “moon walking”.

Thriller got us thrilled, Beat it had us excited, Black or White mesmerized us with its impressive CGI,  They don’t really care about us made us stomp our feet or bang our fists on the table !

His personal life reeked of controversies. But that doesn’t make him any less of an artist in my eyes. I don’t know Michael Jackson the person, I only know Michael Jackson the singer.

Mark my words kiddo. He doesn’t belong to that group of suger-coated ‘pop stars’ your Ipod generation idolizes. He’s above them. The king has surpassed. And the throne remains unclaimed.