Programmers != Commodity

Just happened to go through the post of a Professor of University of Northern Iowa, a very interesting read. Interesting that it comes out at a time when movies like this propagates messages on ‘stealing ideas’ and making empires !

No matter what, the hard truth is that the people (programmers here) who sweat out to implement things are more practical-minded and contributes significantly to the success of the so-called ‘ideas’.  We meet a lot of those ‘Idea people’ in our lives, and  it is high time they realized the meaning of  this phrase , quoting Thomas Alva Edison – ‘Genius is 1% inspiration, 99% perspiration’ .  Courtesy : Slasdhot, http://developers.slashdot.org/story/10/12/06/0124241/I-Just-Need-a-Programmer#commentlisting

 

After so long..

Yeah, so after a long break, I am here. As thought out in my “Hello world” post, blogging wasn’t any necessity to me. I needed an identity and I chose wordpress. And here I am.
Anyways, being after an exam recently, there were many pending things ‘TODO’ once the exam gets over.
One was to move our academic project Tuxidow to sourceforge. Tuxidow is a simple ext2 filesystem read program, written for Windows. Initially it was hosted at geocities and it was there for about 3 years. Geocities got shutdown last October, and since the project was in public domain, and to not let the project ‘disappear’ alongwith geocities, I decided to move it to sourceforge.
The new page is here : http://sourceforge.net/projects/tuxidow
I also put up a simple web page for the project home : http://tuxidow.sourceforge.net

Shimoga, Jog falls

Jog falls

Jog falls

Last week, myself and my good ol’ friend Kurian found ourselves at Shimoga visiting our beloved Lijo Achan. On that Sunday evening we set forth for the Jog falls – a plunge waterfall situated around 100 kms from Shimoga town, which has its origin from river Sharavati.

We spotted a peacock

We spotted a peacock

The way to Jog was picturesque with all those distant hills and corn plantations , tall trees..
Though not in its full splendor Jog was a grand view. The falls can only be seen in its full might when the Sharavati (Linganamakki) dam gets filled up.From a distance I could not percieve a height of  900 ft falls, until comparing the size of tiny moving people at the bottom of the falls. We wanted to climb down the rocks, but it started
raining making the descend slippery and we had to abandon the idea.

Definitely a refreshing trip, and I will be visiting again sometime soon – to watch Jog of post-monsoon :)

Kurian, myself and Lijo achan

Kurian, myself and Lijo achan

View from Bhadra dam

View from Bhadra dam

Downloading F11

Fedora 11 was released 2 minutes ago.. mmm.. Can’t wait the download

Being a long time fedora user, was eagerly waiting for F11 release.. This time around I couldn’t try beta testing !, but I pledge to do the next time.

Some of the cool features which I am really looking forward are

  • default ext4 fs, time to mess with debugfs (don’t know if debugfs really supports ext4)
  • 20 second startrup
  • nouveau driver for my nvidia card and kernel modsetting
  • and daring to try btrfs too..

Photography, this time

Arecanut tree leaves

Arecanut tree leaves

No better time killer than fiddling with a newly bought camera , and going around looking for light green leaves and rivers and watching the sun die in the horizon. I bought a SONY DSC-W120 last December (7.2MP, 4X zoom with a 4G SD card).  The gadget is  very sleek and small, with good enough picture quality, easy user controls , macro focus mode (very close focus) and bundled with features like face detection, smile shutter (I still wonder what that algorithm could be) etc.

But a few things I dislike of DSCW120 are  – No zoom possible while in video mode(aargh!),  noticeable noise while shooting in low contrast locations, very delicate camera parts such as the battery lid, zoom buttons (hope things won’t snap off)

Plantain green

Plantain green

I got a chance to stress-test the device when we shifted our house recently . Pictures were taken to keep the old memoirs every now and then , and most of those turned out to be average( especially in the hands of  a newbie :) . December08 vacation,  back at home I tested my skills again (this time the theme is nature!!). I have them uploaded in flickr .

spot the boat

spot the boat

Most of them are taken with the default settings with compulsory flash, red eye reduction ( yea I know, ugly for sceneries ). But I like many of them, including the arecanut leaves casting a silhouette, the evening scene etc.

Beautiful eve

Beautiful eve

With an added dropshadow (thanks to ImageMagick, we can have scripts to group-convert images to add drop shadows/effects). nature photographs will look really cool.

Here’s the bash script for mass-converting, Just copy the script to the directory where the images are, and run it. Before adding a drop-shadow I resize the images to a low resolution (running shadow algorthims on 7.2 MP images are daring!). I chose a width of 1440, so that it fits perfectly on a 15.4″ widescreen monitor. Now comes the drop shadow thingy, which is more or less the documented method ( http://www.imagemagick.org/Usage/convolve/#shadow ). It first clones the given image, applies gaussian blur on it and generates the shadow. The original image is given a white background and the layers are merged. The blur mechanism is time consuming  but produces better shadows.(there are less costlier methods than ‘-shadow’ , like  the ‘montage’ command of ImageMagick)

#!/bin/bash

for file in *.jpg
do
    convert $file -resize 1440x1440 working.tmp.jpg
    convert working.tmp.jpg \( +clone -background black -shadow 90x16+12+12 \) +swap -background white -layers merge +repage "shadowed_"$file
done

Right brain, Left brain and.. Wikipedia

Here is my first image on wordpress.. and it features my firefox addon-ed to have an extra search box after the google search : so that wikipedia is just a C-k <space> away.I did this with the ToolBar Thinger extension which lets you add additional search boxes..

Can't live without wikipedia

Can't live without WP

Today ‘All searches lead to wikipedia’, (Does not really rhyme well with ‘All roads lead to Rome’ – but has a similar meaning). Google takes me to this wealth of knowledge to  90% of my searches, and so is the case with other search engines. No wonder google announced Knol to fight this search domination and redirect the web traffic to google domains! But WP is here to stay, atleast for another 100 years!! While the GFDL licensed articles can ensure the knowledge is free for everyone, it will also ensure the quality(as well as the quantity) of the text there improve over time..

Listen to King Jimbo on WP goals..

Here are a few funny xkcd pages on WP..

mplayer AC-3 sound boosting

Movies, movies.. All those classics which I always wanted to watch(So far I have covered Schindler’s List, The Bridge on the river Kwai , Rashomon etc.) and in my favourite media player. To my dismay mplayer didn’t  give good enough sound for AC-3(Dolby digital) encoding. While vlc can boost sound beyond my tolerable rates, mplayer really disappointed me there!. This was even with my PCM volume set to the max.

Enter, the extensive range of Audio Filter options in mplayer. mplayer has an excellent man page (For the hacker-kind the mplayer man page is a treasure trove.) Combined with a lil’ bit of googling the solution was to tweak the software volume control filter.

mplayer -af volume=<gain in dB>
The man page says 'Sets the desired gain in dB for all channels in the stream from -200dB to +60dB, where -200dB mutes the sound
completely and +60dB equals a gain of 1000 (default: 0).'

With a gain set to 20 I could boost the sound much higher. And, for much of my videos a value of 32 consistently gives the max. sound, beyond which is a low signal to noise ratio. It nearly blasts at this range even on a headphone!!

Another option is to use the volnorm under audio filters that would give reasonably good sound without distortion.There are many more cool options under audio filters, which I still have to experiment with.

Now I have to rephrase my earlier statement. While vlc has a limit for the max. sound, mplayer rocks!!

Cool Cool Mechanize

Last week I was playing around with python modules, and found something really cool – the mechanize module. mechanize.Browser subclass can do things like opening URLs(not just HTTP),  filling and submitting forms, etc. etc. This would mean that one can easily automate things that he do with the browser!. I still have to go through all the features in mechanize like back(), reload() methods, automatic HTTP refresh etc.

The python module seems to be inspired from Andy Lester’s perl module WWW::Mechanize, and there is also a ruby version available.

Hands-on : Rapidshare auto-downloading

I wrote a small python script using mechanize to automate the rapidshare ‘Free User’ download process(which is otherwise a pain as one has to go through the wait-submit_freeuser-waitagain-download cycle). This can be handy if there are many files to be downloaded one after another. The script is rather ugly – as I make lots of assumptions on the web pages – and forgive any logical redundancy of this python newbie :P

#!/usr/bin/env python

import re
import os
import time
from mechanize import Browser

br = Browser()

urlfile = open('urlfile.txt', 'r') 

for line in urlfile:
    print line
    br.open(line)
    # Assuming the first form is the Free user form
    br.select_form(nr=0)
    resp=br.submit()
    print resp.geturl()
    # resp.read will have the page with URL info, grep this for the pattern and retrieve the URL.
    file = resp.read()
    data = file.split("\n")
    url = 0
    for rapidline in data:
        a_match=re.search("var tt", rapidline)
        if(a_match):
            url=rapidline.split("\"")[3]
            break
    if url:
        print url
            # We need to wait here for the almost 80-85 secs countdown timer.
            time.sleep(100)

        # Thats it! Download the file.. Here I assume the host OS is linux/*NIX and has the wget command available
        # I wanted the progress bar , and hence I use wget. Alternately one can try the urllib.urlretrieve with reporthook
        cmd_wget = "wget " + url
        os.system(cmd_wget)
    else:
        print "No URLs found"
        print file

To use the script

  • install mechanize first(go for the easy_install procedure),
  • save all the rapidshare URLs into ‘urlfile.txt’ – with line breaks after every URL
  • run the script.. and go for a sleep ;)

Hello World!

Whoa!!
So here begins my blog adventures :)
Hmm.. I havn’t had dared this so far, as I prefer to keep my scribblings in my personal diary – a text file that lives serenely in my Linux laptop.
I don’t know If I will ever blog again, But I felt the need for a blog and here it is. At times we would need to Sign posts or comments in forums/mail threads, and as long I don’t own a website I will use this blog as my identity. So far I have been using my wikipedia user page as my identity, and now I have a wordpress account!

Personally I am a calm, quiet 23 year old guy with a lot enthusiastic towards computers, good ol’ UNIX, open source,  etc. I have a small taste for art too..

And I am a big follower of FOSS .. I have strong views on free software/open source (will post them once I feel like sharing my thoughts). This is also the reason why I opted for a wordpress blog. With only 15 minutes spent with wordpress so far, I have fallen in love with the simple, elegant interface :)

So, thats it for now. Bye. Got to tweak my wordpress settings!


 

May 2012
M T W T F S S
« Dec    
 123456
78910111213
14151617181920
21222324252627
28293031  

Follow

Get every new post delivered to your Inbox.