Wednesday, June 20, 2007

FooPlot is really Cool ...

I tried by manually entering x+1 with a liner line funtion y = x + 1 in 3D to see the graph,














http://fooplot.com/x+1 the plot is well shown in the site. I read from this site that in coming days, it will communicate with Google spreadsheets and interact with server-side scripts that do curve fitting and other tasks :) Probably i will skim through my engineering graphics book to study the mysterious curves...




+

Monday, June 18, 2007

Jakie ...

I come to know from my brother that our pet dog has left to heaven ... It was part of our family since 1997. It was so good and understands the commands well. I still remember, it never used to leave my legs when i go to home once in a while... Actually it happened a month and half ago, since i love it much, parents didn't tell me immediately ... I was passive for a while after knowing this news and found the snap that looks similar in flickr. I was thinking to bring it to my place from the place where i had born. Bringing pets to office is not a restriction/ constraint in companies like google, yahoo or amazon. She is great. I am sure i will get a new pet very soon.


+

Nokia N-series ...

This cool series has many features . . . Recenly got this N70 - phone. It comes with a real player song by rehman, the song seems like it dedicated for this series of phones. You can take snaps using 2 of its cameras. I will try to post pics from this mobile soon here in this blog . . .

Tuesday, June 12, 2007

One liner to ensure desired directoy hierarchy exists . . .

This tick reveals unix command line depth and expertise:
You have a predefined directory structure hierarchy and before you start the installation/pushing the binaries into them want to make sure you create the directory structure.

How can you write a command line which creates only the directory structure of a given directory. It should not creates the files, just only the directory hierarchy.

Context:

Present directory is /home/narayana/ and it has the below structure:
a
|------- b
|.........|----- c
|.........|.......|---- t1.txt
|.........|
|.........|
|.........|----- d
|.........|.......|---- t2.txt

Create a new directory called programs in /tools/narayana/ and copy only the directory structure to this.

Solution:
Create a t directory and cd to /tools/narayana/ and execute the below command to create this hierarchy.

ls -Rl /home/narayana/a | grep -e '/home/narayana/a.*:$'| cut -d ':' -f 1| awk '{print substr($1, length("/home/narayana/")+1)}'| xargs mkdir -p

This command creates it!!!

Explanation:
------------
Check it by doing recursive listing byls -Rl:
narayana.desktop% pwd
/tools/narayana/
narayana.desktop% ls -Rl
.:
total 4
drwxr-xr-x 3 narayana homedev 4096 Jul 7 13:24 a

./a:
total 4
drwxr-xr-x 4 narayana homedev 4096 Jul 7 13:24 b

./a/b:
total 8
drwxr-xr-x 2 narayana homedev 4096 Jul 7 13:24 c
drwxr-xr-x 2 narayana homedev 4096 Jul 7 13:24 d

./a/b/c:
total 0

./a/b/d:
total 0


Check with the actual directory format:
narayana.desktop% pwd
/home/narayana
narayana.desktop% cd a
narayana.desktop% ls -Rl
.:
total 4
drwxr-xr-x 4 narayana homedev 4096 Jul 7 12:41 b

./b:
total 8
drwxr-xr-x 2 narayana homedev 4096 Jul 7 12:40 c
drwxr-xr-x 2 narayana homedev 4096 Jul 7 12:41 d

./b/c:
total 4
-rw-r--r-- 1 narayana homedev 126 Jul 7 12:41 3

./b/d:
total 4
-rw-r--r-- 1 narayana homedev 9 Jul 7 12:41 4


+ This is useful in many instances where you just want to create the bins into which
a scheduled job can populate the stuff/demographics :)




+

Thursday, May 17, 2007

Prayer . . .

Lyrics of Hayley Westenra Prayer song.

It touched me . . . Came to know from one of my friends . . .

Tears dropping:
----------------------------------------
Let your arms enfold us
Through the dark of night
Will your angels hold us
Till we see the light

Hush, lay down your troubled mind
The day has vanished and left us behind
And the wind - whispering soft lullabies
Will soothe - so close your weary eyes

Let your arms enfold us
Through the dark of night
Will your angels hold us
Till we see the light

Sleep, angels will watch over you
And soon beautiful dreams will come true
Can you feel spirits embracing your soul [:(( ]
So dream while secrets of darkness unfold

Let your arms enfold us
Through the dark of night
Will your angels hold us
Till we see the light(x2)




+

Sunday, May 13, 2007

Some times you achieve nothing if you go in their way . . .

I was upset at some thing which i was expecting didn't happen. Life has become full of disappointments to me. Nothing is happening like the way i want it to happen. My brother is doing his high level schooling and asked my openion on how he can improve his aptitude skills. So inorder to assess his present skills, i posed him a question on aptitude, and even before i could finish the question, he started blaming me that the question was wrong. I was shocked for a while, i tried to convince him that the question was correct but he seemed to me in a confliction mode of state.

So i asked him to bring one of the aptitude books. He grabbed a book from the shelf and searched some pages and finally told me that my question was wrong, and casted me also that question is not there in the aptitude books. I took the book and searched for a chapter and finally found the question which was same as the one i posed. He became calm when i showed him the question. I didn't like the way he treated me when i posed the question. I asked him why did he behaved that way the answer he told me was "You ask me questions back when i ask you some thing, and most of the times you are in tensed condition and rudely respond to my queries". Then i understood the reason why he behaved in such a way. I was wandering in the hall from the beggining when this discussion had started.

I gave the books back to him, and started telling slowly why i usually respond rudely to him. I started saying some thing like this. See, i have lost most of the patience that i used to have. I am not only here to answer your questions, but also to do my work better and ultimate way in my office. Even with that much pressure, i was ready to help you. I asked him to 'Just show me one person who is guiding their bother or dependents right after the daily job hours' i was sure he can rarely find an answer to that question. He realized and kept quite, i didn't stop my class :). I know much about him, if i go in his way, a big war could have happened in between us.

But i kept quite, showed him the question, started the class 'don't misunderstand that the class here means a subject related, its just another way of warning/scoldings'. I was awaken till 5'O clock just before that day and he didn't notice it. I told him the reason for that stay, i was pushing some thing into the production and busy working. All this happned in 2 hours and the room was so silent. I swear i can see his realization in his eyes and the way he was sitting. I felt bad about it my self and tried to bring his individuality back again. And finally replacated him. He was quite happy as he got a solicitor like me. This is not at all new to me, i have seen many people in my life who made me feel like this and i never gave the chance to them to miss my lecture. My intention here is not to blame them or scold them with my experiece, but i want to let them understand the actual things behind this glimpse. We two are just staying together away from home and if we quarrel like this, no one will be happy. I know he would definitely break my leg or some thing if i try to attempt him physically, so i took the chance of changing his mind, and used the power of words to make him realize about the situation. Then suddenly we realized that it was 2'O clock and went to bed.

Education . . .



I have taken a long way to finish my education, still feel some times like i could have continued till PhD. But badly my education ended at the b.tech level it self. I had no idea what a computer is when i got the admission into the intermediate computer science education, a + 2 course that is offered to the people who get a 75% distinction in the ssc standard. 1st year i didn't attend any of the classes properly. And i used to take books from my college buddies just before the exams. There was a situation, i was not aware that a class called Engineering Electronics. One of our lecturers used to conduct this class every Sunday. Just one month before the final exams i came to know about this and attended only once class. Then i realized that i have missed a lot more such classes. I didn't feel bad about it because i had the confidence that it is just a 3+ hours exam, i can write some thing and pass in it. But the thing is that i didn't have any material with me and its not a easy subject too. But some how i got one of my friends book for 2 days, read it completely and wrote the exam. Whole class was surprised about my result. I passed that exam with very good marks. That's how my +2 ended. I used to spend lot of my time sitting at the skate land. It is a place where kids learn recreation activities.

Right after finishing the +2, luckily i got the admission into the second year of diploma in computer science and engineering. Believe me i am from a middle class family and my family couldn't support for my education at that time. But some how i convinced my parents and with the suggestions of my father in law, i got the admission in to the DCME. There were so many instances where lecturers got impressed with my knowledge and programmings skills in computers. I still remember one of my lecturer named "Vasundhara" she used to highlight the students if they did some thing interesting and good. I was one in that simple list. I used to play with Data Structures in the 2Nd year itself, and this madam used to pose me good questions. She promised that she would give a gift to the student who would come college first in the final year. I came but unfortunately, when i went to collect my certificates from the college, she already left the job.

Lets ffwd to b.tech . . .

Then coming to my B.Tech education, i was not in a mood to take up this course as my family needs support from me in all the directions. But i couldn't kill my interest and there was a miracle happened and i got the financial support from no one to get the admission. I really spent a perfect student's life in my b.tech. Believe me i was able take Reference books from the library. More over i used to read the books not in my syllabus. I don't know how, but i used to be pointed out by the lecturers to explain few topics. And i used to take it up from my side like i got the chance to prove my self. There were 2 incidents which i still remember. There was a class on DBMS and the lecturer was seriously telling about the importance of normalization and its advantages. Since i found the class like the narration of text book, i started thinking about an algorithm. But unfortunately the lecturer noticed it and increased his volume little. I thought it was because of some lady or student and was continuing my work. Right after few minutes he called my name and asked me to explain what he had told to the entire class. I had to do it no other chance to escape. So i went to the Dias and started in my way explaining 'what is normalization' advantages. Randomly i have chosen some sample data and explained the advantages by using that example. It was so nice and the entire class became fan of me, including the lecturer too. He never disturbed me after that in his class.

Another incident happened in my final year. There was a question in the internal exam asking 'What is step-wise refinement ? Explain it with the Merge-Sort Algorithm'. Actually this was not at all part of software engineering text book by Pressman. When i saw the question in the exam, it made me recall some thing that i had seen in algorithms+data structures = programs by wirth book. So i answered well with my simple English. After a week, professor distributed the papers to all the students and finally asked that question to the whole class, no body responded. So he called my name and said, only one person from this class wrote the perfect answer for this, and requested me to explain my answer to the whole class. I was feeling little shy but i know internally that i got one more chance to guide the class. So i took a small chalk lying on the table and delivered the lecture. This lecturer became close to me after that class and was so friendly.

By reading this blog entry at least you could have felt that i would have undergone a studious education. But you would have to admit me that it was not studious, it just happened like that and more over i had no one elder to me who could guide me to take up more challenges continuing education further till MS and PhD. The thing is that i don't like is procrastinating the work or tasks. I all ways wanted to finish the tasks as early as possible so that i can get some more time to think for new ideas and interesting stuff.

I have attended, few programming contests, one national (University) level technical quiz competition, you can see in the picture above. May be i will explain my experiences on these things some other time.