Wednesday, May 31, 2006

Raining Cats and Dogs...

cat After the scorching heat of this summer (to anyone who thinks otherwise , try living under the asbestos sheet at my home),it finally rained today...and how!! To share my misery of feeling terrible in the heat,was my dear cat.It always gave me the feeling that someone was feeling worse than me. The only place i could see it the entire day was lying down half inside the bathroom. And whenever it got up it used to be half wet.It never even resisted the drops of water that i used to sprinkle on it occasionally.

I have had countless cats (stray cats) around me in my home for about 12 years now.All that i learnt from childhood was that cats hated water even touching their body. This cat came into my life , when it was hardly 2-3 months old, ... an outcome of the great floods that took place last year on 26th July. Now does that relate somehow to the behaviour it shows with water ?? If it were human it would rather have had some sort of a 'Water Trauma' or whatever-phobia it is called...

Even today when it was raining so heavily, it went to the balcony and sat on the parafeet wall till it got half wet...and then after some time on the window sill...again getting half wet..

This is what wikipedia quotes :

'If a cat is continually exposed to water from a very young age,
often it will develop a fondness for it; however, this rarely if ever
occurs naturally'

I guess I never understood cat psychology.... the only creature I have ever tried to understand... such a pity... maybe i'll have to do some googling...





* Took a line from wikipedia.. :-) Hence, this article is licensed under GNU FDL

Wednesday, May 24, 2006

Sound Recording using GNU/Linux


This short and informal tutorial is intended to help you to record sound on GNU/Linux. I will cover Krec first and then move on to a more sophisticated application - Audacity.

Why Krec?
I am definitely more of a GNOME person rather that KDE. I just adore the simplicity of GNOME. So, i thought,all i needed to do to record a sound in Gnome was to go to the Applications Menu->Multimedia->Gnome Sound Recorder and start recording. Well, that was not the case unfortunately. I could
get nowhere with Gnome Sound Recorder neither could the world wide web help.

Getting Krec:
Krec comes with the KDE Multimedia Module.

Recording sound using Krec.

1. Start Krec ( Alt+F2 and type krec)
2. You should see a screen similar to the one below.


krecStartup


3. Type Alt+F2 and enter 'kcmshell arts' (without the quotes)
4. You should see a window similar to the one below.


kcmshell


5. Check the Box which says 'Full Duplex'.

6. This would need restarting Krec to take effect.You may even need to restart the artsd daemon.

7. Now, if you have a mic attached to your computer and can see the recording level meter flickering for some disturbance in sound.....You are done.
Go on... hear the sweet sound of your own voice.

8. But there are chances that you cannot see it hovering up and down.
In this case,just open Kmix ( Alt+F2 an type kmix).
Check whether the microphone is set to mute.
You may need to change the switches too in some cases ( especially the mic boost).
The following is a screenshot from kmix version 2.2(using KDE 3.3.2).
That's pretty old.But the newer versions have similar interfaces.


kmix_input_settings


9. Goto Step 7.

You can also record a song currently being played on your computer directly
(without using the mic).
But with the limitations that Krec has, you can only record sound from
players that make use of the aRts daemon.(like Kaboodle,Noatun etc.)

To record a sound from a player minor changes have to be made in Krec.

1. Goto the Tools Menu->Audio Manager.

2. Click on the row which says 'KRec:IN'


audio_manager


3. A new window will appear, select the out_soundcard option.


select_bus


4. As simple as that.!! Now you should see the recording level meter
fluctuating if anything is being played in the players mentioned before.

The recorded file can be exported to different portable formats (like OGG vorbis,WAV)

**tried & tested in Debian Sarge and FreeBSD 6.0.

Krec satisfies all the basic needs for recording, but there is hardly anything you can do
with the recorded sound.You can't modify it,play with it,spoil it :-P ....

Enter -> Audacity

Introducing Audacity:
Audacity is a crossplatform GPLed sound recorder with which you can tinker,
play,make hell out of a recorded sound.Sounds nice eh?

Getting Audacity:
http://audacity.sourceforge.net
You can find distribution specific packages there.

Recording sound using Audacity.

Actually you don't need me for this, as it is a 'self learning application'*.(*term i learnt from Anurag). Things can't get simpler than Audacity. It's simply Audacious!! Just click on the red button (for recording) and start recording.!!!



audacity



GNOME users who skipped the first part, may have problems with recording in audacity.Check to see whether the microphone volume is not muted and the box next to Rec is checked in the gnome-volume-control.This should solve most problems.

(If you still have problems recording or if Audacity gives sound server errors on startup) try killing a few sound daemons ;-). It could just not co exist with aRts on my machine.(but runs like a dream with Alsa and even with OSS). So i had to do a killall artsd before running audacity.)

The various functions and facilities provided by Audacity are beyond the scope of this article. Do try out all the effects (from the Effects menu). They are simply Awesome (note the capital A).

You can also import a sound into Audacity (from the Project Menu->Import Audio) and consequently ruin it... or maybe improve it.!!!
Recorded or edited files can be exported to OGG Vorbis,MP3 or WAV formats.

**tried,tested and ruined (the audio) in Debian Sarge.

Do drop in a note if any of the above works flawlessly
on any other system and problems if any.

Sunday, May 21, 2006

Generosity Personified : ME


*sarcasm*

To Prove That : I am Generous

Proof:

Part 1:

From the Constitution of the Republic of India,we have,
Government subsidises fees of OBC students and waives it off for SC/ST students.

Hence,it has to reimburse all private colleges the loss incurred
to them. ...... (1)

This is done by some Tribal and Social Justice (or is it Social Welfare ?) department of the Government.

Now,
Government increases reservation to 49.5% of the total seats.

By statement (1)
Government has to reimburse more money to the private colleges. ......(2)

But,
The Tribal and Social something department paid 11 crores last year to private colleges.
....(Maharashtra Government Statistics)


using statement (2)
It now has to pay something around 14 crores.


Part 2:

I know that,
My parents work hard to earn precious precious money.

Also,
They pay significant proportions of their income as Tax to the
government. ..... (3)


Part 3:

Given that government makes most of its money from various taxes, and
using statement (3)
The government pays up those 14 crore using my
father's money.!!! ....... (4)

Knowing that,
My Father's money is my money in a way .... (5)

Also,
Students from the reserved category have 50% marks less than me and still i may get deprived of that seat ..... (6)

From (4) , (5) and (6)

The Government is denying me a seat, subsidising education for the student who will sit there,.... and guess what..??? I am funding this.!! (^_^) (and can hardly do anything about it)


Conclusion: I personify generosity . :-)

*end sarcasm*

Wednesday, May 17, 2006

Percentage of Control


The way things are going in the current reservation protests and the attitude of the politicians is really intriguing.

*sarcastic*

sort of pessimistic view:
x1 % seats are reserved for Caste A
x2 % seats for Caste B
:
:
and so on... but alphabets are not limited to the ASCII
Every letter of Unicode can fit in too (~_^)

So 'open category' people are protesting against the injustice.:-)

sort of optimistic view:
There still are 50 % reservations for the open
category!!!. (and to think about it the OBC may protest against it...)

*end sarcastic*

How many LOCs will our country have
One at Kashmir, the 50% line of control in reservations...er...i guess that's enough.I don't want to think about any more.

So many similarities....
* At both ends of the LOC the respective people feel they are right.
* In both the LOCs, only one side can infiltrate to the other side
merrily...:-)
* Both are the scars of history.....

and maybe you can quote many more...

Well... there's one BIG difference though.

The Kasmir LOC is dividing Kashmir.... but the reservations LOC is fragmenting India.

Saturday, May 13, 2006

Camping at BARcamp . (O_o)


*excerpts
from a conversation between /sharan and /icarus - his fictious friend

/icarus: hey where were you today.....you weren't at home. I thought you had exams next week.

/sharan:hmm....i took a break.I went to Barcamp Mumbai today.

/icarus:what break..? Do you even study to 'take a break' ? (O_o). anyway....i guess you can spare time now to elaborate what hapenned in Barcamp.

/sharan:To start with, it was at KReSIT,IIT Powai, with the banners of Barcamp reading 'Karwal Rekhi School of Information Technology' !! Well, i reached there at about 9:30 and found that hardly 10 people had arrived.People started arriving consequently, many of them with T-Shirts of Barcamp Bangalore,Delhi and one of them of FOSS.IN.Everyone was given a notepad of FOSS.IN (i somehow took 3 ;-) ) and a pen of IIT Bombay. Some corporate brouchure of DirectI was also circulating around. Three classrooms were to be used for Barcamp.Each were given weirdo names like 'Chaat & Chutney' , 'Baaji on the Beach' and 'Vada Pav'. Someone finally started speaking at around 10:15 in the 'Chaat & Chutney' room.

/icarus: Hmm.. almost on time eh...

/sharan: Well..even when it did start half the people were standing outside for some reason.Anyway, the first talk was by some Shantanu Oak on SMS Applications. Roughly it can be described this way. To use any applications you need to send keywords followed by arguments to a number 9860609000

example:

1. for email
mo send user@domain.com message

2. for updating a blog
mo netsend text

3. for calculations
mo clc sqrt(25)

4. some utilities
mo bus 332

When you send such a message to the number ( which is the gateway ) it forwards the keywords and arguments to a site name yubnub.org ( see yubnubwiki for help relating to it ). The site developed entirely using PHP and MySQL processes the request and sends back the response to the person who sent the SMS. The charges for the end-user is only the SMS charges charged by his provider for sending one message.The return SMS charges is apparently bourne by Shantanu Oak!!.

* the keywords used and how they work*
--> mo stands for mobile

--> send user@domain.com message
(email) (obvious)
will send the message to the email address. It uses some predetermined mail server to send the message.(more help can be found on this command by typing man netsend in yubnub.org)

--> netsend will update a predetermined blog named yubnubminiblog.blogspot.com by using the provision provided by blogger
of updating a blog by sending a mail to a email address. Yes it uses
'send' command internally.

--> clc sqrt(25)
will obvoiusly return 5.

-->bus 332
(developed by IIT....)
will give back some (according to me useless) info about that bus route


And yes the reply only consists of 160 characters - whatever fits in. Now the interesting part is that you can create custom commands and determine their behavoiur in yubnub yourself!!! and then use them using your mobile phone.

Get the gateway number correctly. I got it wrong the first time and got a reply asking me 'Who are you' :-) /.

/icarus: hey...that's interesting. Maybe it does have useful SMS Applications

/sharan: Sure.I went to get coffee ,samosas and what not ( free (as in coffee) i'm not interested in the source anyway!! ). And as i had got the number wrong , i went to him to get the proper number and he gave me a whole lot of applications to farmers et all ( as more number of people have cell phones than computers) . I got into some other room later.Some talk about RIA started.

/icarus: RIA who?

/sharan: It's actually RIA what? :-). RICH Internet Applications. Apparently they are desktop like applications for the internet. Common tools to make them are Ajax,Open Lazlo (GPLed) and Flex ( Adobe (formerly Macromedia's) ). The speaker Nirav Mehta (i'm not sure of the surname) said that Ajax is very problematic for such applications as there are many things to think about in the process ( from Javascript to XML to HTML ) (hearsay). And that Flex and OpenLazlo are very convenient as they use their own rendering and so on.Well.. i could get what he was speaking till there. After that i couldn't understand a word. The only thing i remember is that they had created some application for FOSS.IN using Open Lazlo which helped people identify others of similar interest ( i forgot the name of the app). Apparently, in the other room BluesMoon was talking something about User experiences and stuff over the web ( disclaimer : the last sentence is PURE hear say)....I wish i knew about that talk before. :-(

Pradeepto talked to me over the phone 10 minutes later...and told me to tpye in anything and everything about the Barcamp irrespective of whether i understand it or not :-). Too lazy to come,eh?

Shreyas and Kaustubh, two guys from Bangalore later talked about a
new initiative they had started named infinity radio (http://infinityradio.info). It streams independent indian music.By that i mean the 'aspiring bands' of the country ( strictly non commercial bands ).They take recorded music from such people and play it on their internet radio. Anyone can give their music to them and they'll play it.!!! They apparently spend everything to do the hosting
from their own pockets and don't charge ( i am not sure whether i got the money thing right ). Anyway they emphasizingly said that they do not follow Web 2.0.

Then we broke up for (free) lunch which also included awesome tomato soup and kulfi!! ( Anurag , Pradeepto forget the Barcamp, you missed the better part the kulfi and the soup.... :-))

/icarus:When did it start again?

/sharan:.....It started back at sometime around three ( in other words i came back at 3 :-) ), and Bluesmoon and Tarique Sani were speaking about the Creative Commons License. Do i need to elaborate about that? There was noting new.

/icarus: sure...skip that.

/sharan:Later, A final year computer student of Don Bosco Institute of Technology (Akshay Surve) gave a demo of some web 2.0 app. he had created in PHP named Tagsurfer Beta.What it does is improve the usability of the tag clouds that are seen on websites like flickr or del.icio.us He gave a demo in which you click on a tag in a tag cloud and all other tags disappear and new tags related to the clicked tag appear.And the new related tags are at a relative distance proportionate to their relevance to the clicked tag from it.

Following that, Tarique Sani ( some sort of a hobby photographer) gave a talk on different ways of storing photos on the web.He said there are two ways of arranging photos.
1. In a Photo Gallery ( in which photos are arranged in a user specific manner)
2. In a Photo Blog (where photos are arranged like in a blog...in a chronological manner)

examples of Photo Gallery were CopperMine Picure Gallery which uses PHP + MySQL (http://coppermine.sf.net). It is a Web 2.0 ready app. which has it's own API. There is also a KDE Client for the Coppper Mine pic gallery
(obviously) named Koppermine :-). (http://koppermine.sf.net)
examples of a Photo Blog were PixelPost (http://pixelpost.org) he didn't elaborate on this.

Also visit http://tariquesani.net for some really nice photos.

In any case, the sentiment that i could pick in the Barcamp was hate
for Web 2.0 and that it was controversial et all.

Next, in the schedule was something named 'NeoBinaries:Definitive Guide to newest and most popular Web 2.0 applications ...'. http://www.neobinaries.com

Some person wearing ear rings and a lady were speaking about it.
didn't understand a word...... :-)

i only remember him saying that some paid service ( which also provides
a 7 day trial) namely smugmug was better than Flickr.

/icarus
: What do you mean you didn't understand a word ???

/sharan: They were too boring and i was losing track of what they were saying constantly.!! Anyway there were some talks about other things going on parallely. One of them being something on search engine optimisation techniques.... i somehow ended up sitting in all the wrong talks.

/icarus: :-)

/sharan: Next on the list was some talk named India 2.0....another web 2.0 thing i guess. 5 minutes into the talk and someone came and wrote on the board that a talk on Hacking Emacs and Lisp was starting in the next room.....Was so happy that i went and sat there.....!! Some guy wearing a Cisco T-Shirt was talking about lisp.

i'll just roughly elaborate what he said.(mostly about Lisp)

Syntax:
expr:= idetifier
| literal literal
| (expr*) the multiple parameters thing ( any no. of params)
| `expr don't know
| 'expr what these are

expr is expression

Btw,Lisp is an interpreted Language

Some common expressions are given below.most of them are self
explanatory.Expressions are written inside round brackets. And all
expressions are written in prefix notation.

(+ 1 2) // 1+2
(* 2 3 4) // * is some func and 2 3 4 are params
(message "hi") // prints hi
(if foo 1 0) // if foo=true then 1 else 0

(setq foo (* 2 3) ) // sets foo to 6

(message foo) // prints value of foo

functions:
// defines a function
(defun factorial(n)
(if (<= n 1) 1 (* n factorial(- n 1))) ) // remember everything is in prefix notation...makes it simple to parse! logical expressions: (and p q) lambdas like in python: (lambda(n) (if (<= n 1) .... )) /// i didn't get this right actually..;-) Things were going on quite well...and was finally getting interested.But this talk was interrputed by some talk named "Jantar Mantar"... I sat for this for 10 minutes. I had no idea what that talk was doing in a Barcamp. I went to another room where some talk on Mobile applications were on.Some initiative named Webaroo was started by some person which caches web pages in some manner for offline usage (even on mobile phones). I had missed half of the talk so (possibly misunderstanding the concept) i asked what was the difference between it and GNU wget ;-). Apparently there was more to it. Anyway, at the end of the talk everyone was given a DVD of webaroo (installer) which had the entire WIKIPEDIA (6 GB) on it (As claimed it was just 4 days old).The installer was for windows though. Anyway i don't have a DVD ROM Drive.So anyone can have it, provided they make CD copies of it somehow and give it to me. Anyone ready?. That was it. The end of BarCamp Mumbai. Maybe i expected something a lot more technical out of it. I didn't find that. And moreover 95% of the people were using Windows XP even to surf the WI FI (let alone to demostrate their stuff). Neverthless was a nice experience...

Thursday, May 11, 2006

Reservations - A Necessary Evil


excerpts from /sharan's conversations with his fictious friend /icarus

/icarus : i was thinking about this reservations thing that's going around....i was wondering whether

**/sharan abrupts (as usual)

/sharan : ....do you even need to think about its existence. It should be scrapped, dumped and forgotten about. It's mere existence is debatable.

/icarus: there is a lot more to it than meets the eye sharan....

/sharan: Yes, all that post independence and stuff. Sure maybe it was needed back then.We've come a long way from there,right? . It's been more than 60 years!!. There is no place for it now.Those from the so called "reserved" live a more lavish life than the struggling "open category" people. Still, they get seats for nominal marks at nominalprices!! Justfy That.

/icarus: agreed that we were a frustrated lot during our admissions and all.... but

**/sharan interrupts

/sharan: ....frustruate yourself working hard during the exams,do all
the hard work and.....during the admissions it's as good as saying
"
yEs we love your marks, they're great. But sorry we can't take you
. You see there are the 'deprived' people standing out there (who
apparently may just have arrived in a merc). We need to give them
preference.
"

sure even they got there that way....i bet.!! is there even any respect for merit.!!! Why study icarus. I'd rather make a 'caste' certificate and 'hard'ly work the way they do!!

/icarus:... :-) .. but there are people out there who need such assistance...

**/sharan is making a habit of interrupting...he thinks he's on to win this argument
**/icarus is waiting till sharan gets exhausted


/sharan: Really, i don't think people need such assistance.We see countless number of people out there on the roads living on footpaths et all. Money does magic sharan. Everything they do ( and as for that matter everything that everyone does) is usually very strongly connected to money. What people need is financial assistance.Assistance should be given on the basis of the financial
status of the student's family. Not caste, we speak about unity in one place and divide the country into innumerable parts on the basis of caste.I wonder how many castes even exist in our country. A day will come when the politicians will say

"Now the time has come. Coming from
an 'open category' family, your parents must be pretty well off and
educated. You sit at home, learn from your parents, and study. The
premier institutions are 100% reserved for the 'deprived'. They need
the 'assistance'
"
!!!
....We are definitely on our way to development...i can see the future..... INDIA 2020.... nooooo i don't even want to imagine!! I don't think any developed country has this crappy system.!!



/icarus: The tendency to being frogs in a well is so common among us isn't it. We fail to see beyond our peripheral vision.Well, maybe i was more vocal than you about these things before .I am not the most pragmatist person in this world but i have seen things that have made me think, and wonder about the existence and validity of this reservation system. The so called 'reserved' category people ( they way you like to put it) .. They have been deprived of the basic necessities of life from time immemorial before independence. History is the best teacher. I'll tell you an example. Two of the most prominent castes of the Mahabharata......Brahmins (the sages et all) and the Kshatriyas ( the warriors)..... it was considered a crime for a Brahmin girl to marry a Kshatriya as it was a lower caste. The great sage Vishwamitra ( or was it Parshuram) used to refuse to teach the art of archery and fighting to Kshatriya students. Think about what the state of the innumerable lower castes was.!! These things do not change over a short period of time... I know well educated people behaving like rusted hinges.They need everything to be spoonfed and are so lazy that won't even remove the spoon from their mouth for a better one. That goes for people who have had a history of living the most comfortable social life.What do you
expect out of the lower castes?? Injustice done to people for ages can't just be wiped out in a flash . Even 60 years is quite a short time for that.!!!

/sharan: well...they are not living in the same condition now. Are they? Everyone is treated in a very equal manner nowadays.Infact they enjoy better privileges.!! ..... sure what you say is more like.
"They suffered for 'x' years now it's your turn"


/icarus: There is so much more to it sharan. Have you been to rural areas,remote places,villages.?? have you seen the condition of people over there ?. You speak about developed countries and stuff. Compare the no. of well-off cities in USA (say) and India. The proportion of people staying in villages to cities is enormous in India. ....

**/sharan interrupts again....
**/icarus is losing his calm now...

/sharan: sure , like expect it to stay that way ,,, no one wants to work hard anyway!!

/icarus:There are enormous number of people belonging to lower castes in villages. People who do not know what "developed" is.( People in my native place got cable TV just 2 years back !!) They've been living that way for ages.!! Carried on since generations, the future generations of their kind may follow suit. Maximum number of people in our country live a day-to-day hand to mouth existence. No sundays and vacations for them. A strike is called , factories closed and such people have to go hungry for that day.!! And believe me, a large number of such people are from the reserved castes.!!. You think they don't have aspirations,don't have dreams;you think they have no desire to see their children succeed and do well.Sure they do.But castles can't be built in air. You need money, and you need will power. People deprived to the extent to these people are, are more worried about whether they can live tomorow, leave alone after 5 years. You need to work to live. And for greter security and guarantee ( of a life tomorrow) they put their children to work at tender ages. These students are bought up in an unfortunate environment which is not at all conducive for education.Obviously you can't expect them to succeed the way the others do. What reservations make the Government say is
" We really appreciate the efforts that you have put in inspite of the hardships that you have faced ( most people in rural India.Cities are an exception in most cases) . Say what, we'll give you admission (on the basis of competition with others similar to you) to premier institutions so that you can study further and live your
aspirations.And we'll give you a concession (or a tution fee waiver)
"


Accept it. We all need some sort of a push , a drive to do anything.!! These people need a push even to start a better life, to improve their standard of living. When the parents of such people see that the government is helping them in improving their future life, something that they were so helpless about, they really appreciate it ( and vote consequently ).People from upper castes (most of them) have enough will power and determination to get them through most odds.That's what we are good at. !!



/sharan: What's the use. these people get into such premier institutions and drop out consequently as they can't handle it.The seats may well have been use by more deserving meritorious students.


/icarus: Every initiative/plan/venture can't be a runaway success.Why the heck are we fighting in Kashmir for that matter. The budget for fighting there is more than enough for subsidising education for every possible student for some years.!! And we have reached no where for that matter. There's no peace in the valley anyway. Any solution ?
NASA spends billions doing research et all. Much of it is unproductive ( take SETI for that matter which was the biggest ~unimaginable no. of dollars~ flop) but the productive part however little may it be goes a long way to detetrmine the future.So the US government keeps investing in NASA.

/sharan: well, but don't you think there are more people out there who work to fit into the reservation system (by not working) rather than work hard to end up use-ing the reservation system.( the actually deprive people).

/icarus: Agreed. That's a really bad thing coming out of this reservation system. The intended audience is hardly getting any benefits.Something, if you think about it is natural.But yes it has to be avoided.Maybe the government has to change the clauses to be more need specific rather than vote specific!!

/sharan: ....and definitely increasing the reservations is absurd isn't it.!! And well.... if at all one has to increase reservations it must be related to the financial status.

/icarus: hmm... i guess increasing the reservations (that too for something as vast and general as OBC ) is indeed absurd. That is indeed vote bank politics.
There should be some limit. Limits even on the level of education upto which reservation should be there (which ideally should not go >= the graduate level)

/sharan: .....and the last thing we need is reservation in Private Sector....

/icarus: right...i guess reservations in the public sector is enough.That too is indeed in-a-way necessary but not as much as in the education sector (infact very nominal....actually this can be,and maybe has to be removed completely. Even the caste wise promotions thing which really hurts,has to be chucked out ).Private sector is indeed something the government should not touch. The country should not head towards a communist type of economy.

**/icarus and /sharan agreed that reservations are a necessary evil.
It can't be done away with.If at all, an increase should be on the basis of economic factors. But to progress there should be some limit, which is actually a fine line , that the government should not cross. And definitely NO RESERVATIONS in the job sector.

disclaimer:
**/icarus and /sharan don't claim to be pragmatists