Sunday, September 20, 2009

My obsession with your nostalgia...

I have read many posts written by the people from the era of 80s or 90s talking about how great the computers or networks (respectively) were in there days. I was born in 1991 as I didn't own a computer till the age of 12 and had broadband when I was 15, I missed the whole apple IIe and C64 era and most of the BBS and network hacking era (also contributing to the fact is that I was born in india which is not so into computers till the IT boom here). Thus, I hear many times dialogs on IRCs along the lines of "You have to be there to feel it" or "you don't know hardware till you have installed with your bare hands". I have mixed feelings about the dialogs, as its still the same with our complex computers today but that's somewhat besides the point. I have read many books and watched many documentaries of those times, my personal favorite being Underground (http://www.xs4all.nl/~suelette/underground/justin/). And now I am kinda obsessed with those times. I constantly seek knowledge of those times. Like people find solace in pulp radio dramas from the 1950s, I find solace in old video games, mostly which were available on cartridges for my old video game which directly hooks up to my TV.

I am always thrilled by stories from those times. I find them much simpler. Not simpler in the sense that it was easy, no definitely not. But it was definitely simpler in the sense that you can dive into the hardware and software right away. Hack away on you commodore 64 or just hook up your apple IIe with your phone lines and you had access to a vast variety of mostly like minded people. Today its much easier but not simple. Hardware is much more complex and you just dont get the satisfaction on printing just "hello world" on the screen that you got when you did it with a apple IIe or better yet programming an altair 8800 with raw hexadecimle vaules. Today you have seen so much of GUI that you just cannot appriciate the work of art you do by just printing "Hello world", you dont know the hardwork done by your compiler or interpreter. And the internet is no longer the world of techno citizens. There are too many trolls around and there are just a few places left like Hacker News where you can count on it that the person commenting is worth his salt at all.

I am not saying that people born in my era are just not smart enough or cool enough (well i am biased on the cool part...but anyways), I just crave for those simpler times.

PS: if anyone can point me to better resources where I can feed my hunger more please leave the link in the comment.

Saturday, May 16, 2009

Computer Archeology

Just read this and my jaw fell somewhere between the discovery of basic and the date of the origin of PC (I am not saying computers coz that is not the case here it was IBM PC not home computers). The article teaches us a major lesson about human tendency to improvise on what we have already done. As the author uncovered every layer of his computer's system I had chills going down my spine through the legs and into the floor. He demonstrated how amazing amount of knowledge is hidden in the depth of anything we create and I am talking about the knowledge of our basic instincts.

Every human being has a set of basic instincts like survival, attraction towards an appropriate partner (well however your sexuality interprets that) and above all to improvise on things. It was thrilling to know that at the base of it all we have the starting and someday we may be able to dig out bundles of knowlege from all things.

Thursday, September 11, 2008

Why artists should make mistakes.

"Paresh you make horrible mistakes in your usage of poetic devices". This was what my teachers used to say when I would walk up to them recite to them my latest answers. This was because I used to give _horrible_ similes. But now I have a perfect answer to there question (alas, there is no one who asks anymore). I think artists are allowed to make mistakes. No actually this is there moral duty to make mistakes. If we must, we should first define what a mistake it. As I see it a mistake is something which does not match the reality. But as far as we know reality is what masses believe. 1500 years ago everybody knew that the earth was flat. 500 years ago everybody knew that we cannot go out of the earths atmosphere. 100 years ago everybody knew that we will run out of food some day. 50 years ago everybody knew that computers could not be home appliances. And that was the reality that time. Any statement contradicting that would be considered a mistake.

But now we know that they were far from mistakes. They were the prophecies of the future. So we gather that a _mistake_ is a relative term. Its definition changes from time to time. Now think about this, aren't we not a result of some big mistake. No really before the big bang some system made a mistake which resulted in the formation of the universe. Then earth was mistakenly grabbed into the gravitational field of sun, it started to cool down. Then some molecules made mistake of combining falsely and made a living organism. But they were all unicellular. Then an unicellular organism made the mistake of tearing off falsely and created a multicellural. This process of mistakes went on to create other complex creatures, which lead to us proud humans. Mistakes are the basis of evolution. If all of this would not have happened imagine how boring it would have been.

The same is with artists. If they all fail to make horrible mistakes in the form of there arts they will never be able to generate anything new. Imagine how boring it would be if all the artists follow a thumb rule for there art and never look at different, untouched aspects of there art how predictable it would be to go into a art gallery. After all Art (and in this context anything) is a live form of expressing your thoughts.

So as I was saying to make a mistake is not that bad. What is bad is doing it realizing it and then not thinking about the new areas it has opened to think and ponder on. So please don't stop people from making mistakes because this is the essence of art...

Friday, July 4, 2008

Shoe-Laces (how to get a grip on shoes) part I

Shoe-Laces(I)
How to get a grip on Shoes

This is my how-to-do-it guide to shoes,a small gui app building toolkit by _why. I first came across it when i was working on rubylearning.org. There a japanease teacher told me about the toolkit. He wrote a paper on how to build a mp3 player in shoes. Well i decided to give it a try. I tried _why Nobody knows shoes but soon found out it was not my type. So soon after I started to give the in built mannual a try but yet again was dissapointed because it after all was still a mannual no tutorial for me. So I started reading the mannual and taking notes. I developed some programs to understand the concepts myself. But then as always i felt an urge to write what i didn't have when i started. A how-to-do-it tutorial. So here is my attempt. Do give feed back.


Lesson one:- What is shoes

Shoes ultimatly is a tool kit to make gui apps in ruby. The thing that makes it distinct from other tool kits is that it makes the code look more ruby and less anything else. The tool-kit is inspired from the web, but its not really a web developing language (though people have written articals on how to do it with merb). You can make just about GUI using sheos and ruby. The beauty of the code lies in the fact that on the first look it looks more like and mathematical algorithm. So you can gather how easy it is to write an application.

I presume you have a fair knowledge of ruby programming language. If not go read some books on it like one at techotopia or take an online course at www.rubylearning.org.
Also I assume that you have to ruby and shoes installed. If not please read the instrutions on there sites
I am writing this on a (Arch) linux machine so I will presume your on a console (either *nix or dos). I dont really know how things work on OS X coz i have never used it so i won't comment.
Lesson two:- Getting it started

As this is a how-to-do-it tutorial lets get started. First of all the basic. A shoes app is essentially a loop on the shoes class. Something like this

Shoes.app do
alert("Hello")
end
OR
Shoes.app {alert("Hello") }

(Dont worry about the alert funtion yet i will explain it to you latter). What you just saw is the worlds smallest GUI hello world program. Now to run it just save it,by a name say file1.rb, open a console and type:-

$shoes /path/to/file1.rb

and it will give you an nice alert box helloing you. Now what did we gather from this is that a Shoes app is essentially a loop.
Lesson 3:-Some basic functions
Now as we have learned how to make a skelaten shoes app and run it, lets make something useful (at least useful enough to brag about it to friends). Now we will make a new file basic.rb, and start a new loop with some styling.Styles in shoes are basic attributes of the app window(like its title breadth and width). So lets set these

Shoes.app(:title => "A basic shoes app",:width => 200, :height => 200) do
end
(I prefer the do end blocks over the {} because it looks too c++ish,you are free for your choice)

When you run it you will be supplied with a neat 200x200 box (well nothing very facinating about it for seasoned programmer but for beginners it feels like they have just hacked a supercomputer). Now in this part I will sho(e)w you how to make a very basic app with only few funtions background,rgb,ask_color, gradient,button & alert. Bacially here is the synopsis in my way (refer to the manual for the formal synopsises)

button(caption_here){ working_here}
alert(caption_here)
background
ask_color()
gradient(int,int)
location()
confirm()
(the names are self explainatory i think)
Also we will be using some inbuild constants.
Our basic app will use these functions to answer the most basic questions and change some colors around.

1 Shoes.app(:title => "Basics of shoes",:width => 500,:height => 500,:resizable => false) do
2 background rgb(0,100,0)
3
4 border("paresh",:strokewidth => 50)
5 button("Quit") do
6 if confirm("Do you wanna quit")
7 exit()
8 end
9 end
10 button("Change Backgound color") do
11 color = ask_color("Give the color")
12 background color
13 end
14 button("Make gradient") do
15 color1=ask_color("Enter color # 1")
16 color2=ask_color("Enter color # 2")
17 background gradient(color1,color2)
18 end
19 button("Where am I") do
20 alert(location())
21 end
22 button("What am I using") do
23 alert("You are using shoes-#{Shoes::RELEASE_NAME}-#{Shoes::RELEASE_ID} with the subversive number #{Shoes::REVISION}")
24 end
25 end

You can get the source code from here.

Ok lets start by putting up the carcass of shoes app
Shoes.app(:title => "Basics of shoes",:width => 500,:height => 500,:resizable => false) do

This starts a shoes app loop with some initializations. We have passed the basics here the height, width, title and making the resizing flase (this is my personal intrest to make resizing false).

Now lets start by setting up the background
background rgb(0,100,0)
Now this is two new functions.
First is "background" which will set the background color.
We are passing the color generated by rgb to it.
rgb is a funtion which accepts red blue green values and generates the color code for it.

Next we make our first button

button("Quit") do
if confirm("Do you wanna quit")
exit()
end
end

a button in shoes is also essentially a loop. We pass the caption to the button (which is displayed on the button). And then pass a loop which is executed whenever the button is pressed.
Now for the loop we have passed. confirm pops up a Cancel-Ok dialog box. It returns true if ok is pressed returns false if cancel is pressed. If Ok is pressed we have exit() which exits the shoes app.

Moving on
button("Change Backgound color") do
color = ask_color("Give the color")
background color
end
Now we made another button to change the background color. ask_color pops up a small color panel where you can chose your fav color the funtion returns the color code which we have caught in color (this is the best thing about ruby I dont have to determine of what type color is , it is done by the interpretor!!). Then we pass color to background function which sets the background.
Now to move on

button("Make gradient") do
color1=ask_color("Enter color # 1")
color2=ask_color("Enter color # 2")
background gradient(color1,color2)
end

Again a new button to make a gradient. gradient function excepts two colors and generates a nice gradient from it. We get those colors from the user by the ask_color function. A gradient is essentially a type of background that can be applied. So we pass it to background function. You see its nice to see a gradient as a background.

To the next

button("Where am I") do
alert(location())
end

alert() is a function which pops up a small applet on the screen with text written on it(which is passed to it). location() gives us the location of the current app in the file structure. Combining these two we have created a popup box which gives us the location of program (neat isn't it)
Now for the las but not the least some constants
button("What am I using") do
alert("You are using shoes-#{Shoes::RELEASE_NAME}-#{Shoes::RELEASE_ID} with the subversive number #{Shoes::REVISION}")
end
These are just some constats we have predefined by shoes
Shoes::RELEASE_NAME - gives the release name of the shoes you are working on.
Shoes::RELEASE_ID - gives the release id
Shoes::REVISION - its the subversive release number.

So kids thats about it (don't forget to put and 'end' to the shoes loop).

Well in this lesson i have tried to get us some basic knowledge of how to use shoes buttons and alerts. May be (if i get enough responce == 2 or more emails and 7 or more comments by diffrent people) next time I will tell more about making a nicer app (may be a calculator).
Do write comments. Don't be too harsh this is my first attempt at making a ruby (or for that matter of any kind) tutorial and i am nervous about my way of presenting it.

Monday, April 21, 2008

How I came into the open land

It was a really fine evening. I was watching TV. Normally i dont really bother what is on the news. But on that day it was fate that I switched to one of the many 24 hour news channels. There was a program on kids going on. I thought that it would be fun watching these kids doing the regular discussion stuff. But that day was different. The show was about the achievements of kids. It had people,kids rather, from all over the world. Some of them were sports persons, some chess players, some scientists. I was really irritated. I thought that why would someone wast there time on such nonsensical things when there are so much better things to do. I switched the TV off. It was sleep time already so off I went under the covers.
Next thing I saw I was at the dhaba(a small street hotel) working as a waiter. It was horrible. I was going from table to table. i was wearing Pajamas and tee shirt. Then i saw one of my best friends ashish entering the dhaba. He was dressed well. In a suit and had a person by his side who was showing him sumthing in a file. I got delighted seeing an old friend. When i tried to walk up to him his sec walked up to me and stopped me. " I will give his order. Its pathetic that a famous and rich businessman likes to breakfast here" he said.
" Oh it is his fav place we used to come here bunking our classes" I said.
"What do you mean we".
"He is my childhood friend"
"Sir does not know anyone working in a DHABA".
"It seems he does"
"Let me ask"
he walked up to him.
"Sir do you know this guy... hey whats ur name."
"PARESH"
"Sec do I know anyone named paresh" Ashish said to the one holding a file.
"No" the guy said.
"Next thing i knew i was being dragged off the floor"
NO...NO .... his is my friend.... one of the best... we used to work together....dont drag me ashish ashish its me...
SNAP I was all wet (because of sweating) on my bed. Fighting with my pillow. It was all a dream no not a dream a nightmare and a really bad one. Anyways it was time for school and went into the shower. There was when I started to think of my life right in the shower. And the whole day I kept thinking. I said to myself here I am working like a dog the whole day just to get an A in the reports. Heck man people 2 years older are coming on TV. They are not just plane lucky or even if they are i am not. I must get it straight. What would happen to me in this rate. I must do somthing or i will be left behind.
I asked myself. What am i good at? umm...um.. yup i do right stories. Nobody is interested in your stories you idiot. Heck writing wont work(this was b4 i read about Creative commons). Then what can i do. Let me see i can program in c++. But who cares i dont have any degree. Thats when I turned to google and shooting strange queries at it. Then I hit linux. I thought it would be cool to have an distro who people rarely use on my computer.I thought i can become the youngest person who uses linux. Then i started to search for the pirated CD. FIrst i went to my local CD library. He thought linux was a game and said he doesn't have it. So i thought i will again have to do my cyber cafe trick.(What i used to do was i went to a cyber cafe, we dont have serious security in cafes in india, i put the download on and sit there for half an hour dont stop the download. walk out and return again the next day to copy the file.) But then i realized that linux was a free download. Also i hit the ubuntu shipit page. I was like what they are giving me a free CD. I searched the whole page for a catch but as everybody knows there is no catch. I ordered one.
Then as the perfect timing we had our own broadband connection at home. I started to surf about linux and learned about the OPENLAND. And rest is the same for everyone

Thursday, March 13, 2008

Being an Indian

"India" what does that word makes you visualize.Lets see some of you think of a glorious past and a even glorious future, some of you see a physical body, the seventh larges country in the world, second in population, you see colorful flora and funa.But people always said i was different.And in this perspective they are right.I must say the word "India" make me visualize thousands of people helping each other, walking forward rapidly breaking obstacles to dust as they are marching forward.
I think India is no physical abstract of the world map. India is a feeling. India resides in our hearts. Anybody can at anytime create India at anyplace. India is the love that binds. India is sympathy that's deep down.
But then you may say that what about those people who live in India but don't actually feel Indian. Are they not Indians. The clear answer is no. Those are equal to terrorists or even worse (at least terrorists don't deny they did it). Some may argue that I am mixing Indian culture and Indians.They may say that India is just country. The culture is the feeling. I ask them which culture (not in the denying sense). Really which culture are you talking about. Does India have any uniform culture. In every state cultures are so different that you can't draw a common thing.But there are still a few (and those support my argument hehe:)). they are love, sympathy & sharing. Do your really think you can define Indian culture. No, neither can I. Because it cannot be put in words. Its just a feeling.
If you see a rich guy helping someone in any part of the world. That will make him an Indian. Even if he is a brite. Actually and Indian is not someone who resides in India.He is someone who feels India.
let us disscuss one more thing.As history tells none of us belong here. Yes don't fret on that thought, its true (for at least most of us). The original residents of India were the Dravidians .That is the people of the southern part of India. We were some nomads who decided to settle here. So what does that prove. That we are not Indians no absolutely not.
So my vote is an Indian is not someone who lives india but someone who feels India

Exam fear now here

Being in India I march is the season of exams. The time when everyone takes there books out (and ppl like me wipe the dust on them). Yesterday night when I was anxiously waiting for the oh-so-important sleep to come something dawned upon me. I thought I am giving those exams for the past 11 years. Every year I slog hard to get more score in my score card. But for what? Just to show them to my parents and make them happy. Being in a family with very conventional idealism my studies were very much emphasized upon. I lived in an environment of comparison with my ever-so-high scoring elder sister. She always scored so much and I was made to study harder and harder to catch up with her. I was considered a below average student in my primary and middle school were I was made to study everything even things I knew I wont remember after giving the exam. After I joined High School I was given a light choice on things by allowing three different "streams" namely science, commerce and arts.
I chose science and started dreaming about how the life will change. I will be able to think freely and science itself means to think different from others. But no!!What I got was raw deal. We were made to sit in the class and I found all the classes big time boring because in all those we were made to sit and mug up a set of facts which are standard for every child of your age. All in all we were trapped in the jail of facts with our teachers looking over us like big brother. This made me to hate the education system more. Then one day I was made to speak my views on the education system and radical changes that are braught about in it. I spoke and spoke about it for about 10 mins till my teachers stopped me saying that my time has exhausted. I also hated my computer class because my teacher was a pure mugger. He emphasized on mugging up of algos which killed the whole concept of the computer science class. And whenever i used to tell a new or better way of doing things he just used to say his standard words "Well it cat be done that way but whats the use in remembering two ways of doing the same thing". It killed the whole concept of the computer science and science in general because science tries to find more ways of doing things as many as possible.
I will (dis)like to point out things in our education system.But there are so many of them that google wont provide enough space in a free blog. But still I will like to list the most disliked points :-
  1. Murder of freedom :- Our education system wants us to mug up everything that is written in the book. What our teachers tell us is "what the book says is true". Many point out foolish mistakes in our books but still say that we must "go by the book" as this will fetch us marks. This takes away the fundamental right of every student - to think freely. We are not given time to think freely. Even in the drawing and painting class where we are supposed to expand our minds we are supposed to copy what the teacher wishes. Classes of science should be filled with new ideas but they are zombies who have exception memories. Those who can mug good gets the first rank and the praise of the teachers and parents refer to them as ideal kids who deserve to study but this is my open challenge to those toppers to come and match with standards of those who want to think freely and dont mug up the answers by the book but write in their own view but eventually lose marks. Another thing is that they allow you to have only a set of combinations. If you have to study economics and math , which go closely, you just cant that also murder the freedom of choice.
  2. Credit for marks not intellect :- Our education system gives credit only to those people who have good marks. Get a 90% you are Einstine even if you cant read out of the book what is happening actully how the things you mugged up are applied in real life. Get a 60% or even a 75% you are a normal average boy/girl who dont have any good qualities. Even if you reinvent the bulb you will still be a average in your report card with remarks to improve in a particular subject. So what does that prove. That proves that you have to get marks not brains to be a good student.
  3. Examine your memory :- Thats the worst part of the education system. It examins your memory not your skill. It can be a good option for a arts student but not for a science or even a commerce students who are made to write definitions and derivations instead to applying the knowledge they gained to numbers or problems. Aint that the murder of the whole concept of education where you learn things to apply them
All in all i am starting to hate the system more by the day as its ugly head is ruining my life i could write on and on but the system has decided that the child should go to give his examinations. So off i go to my study table and try to recreate the derivation which i was mugging up right now.....