Archive

Archive for the ‘History’ Category

How to enumerate device drivers?

May 21st, 2007 Sarath Comments

One of my friend said that there’s no documented API to enumerate the device drivers loaded in the system. But I could exactly remember I had done it 2-3 years back when I was just joined in the company. But I could not exactly rememeber which was that API. Still the smell of those good old days where I was fresher so that I was fascinated about learning the new stuffs and do experiments. Now the busy schedules and responsibility and also laziness not allowing me to be like that old ;) . At that time I was really interested in writing a process viewer. A small wish of a fresher and I could really do that. Just started with enumerating process but it opened many doors infront of me. The cool APIs of PSAPI library and alot more to experiment and I enumerated most of the things in the system whcih can be acheived through direct documented APIs and put in my process explorer and also learnt about the stuffs of drawing under windows as part of creating my GUI :). Unfortunately I missed those code anyway I will try to repost it once if I get those from the archived CDs. hmmm still the smell of good old days!!

Here’s the sample snippet snippet. It’s still there in MSDN :)

#include <windows.h>
#include <psapi.h>
#include <tchar.h>
#include <stdio.h>

#define ARRAY_SIZE 1024

void main()
{
        LPVOID drivers[ARRAY_SIZE];
        DWORD cbNeeded;
        int cDrivers, i;

    if( EnumDeviceDrivers(drivers, sizeof(drivers), &cbNeeded) && cbNeeded < sizeof(drivers))
    {
        TCHAR szDriver[ARRAY_SIZE];

        cDrivers = cbNeeded/sizeof(drivers[0]);

        _tprintf(TEXT(”There are %d drivers:\n”), cDrivers);
        for (i=0; i < cDrivers; i++ )
        {
            if(GetDeviceDriverBaseName(drivers[i], szDriver,
                sizeof(szDriver)/sizeof(szDriver[0])))
            _tprintf(TEXT(”%d: %s\n”), i+1, szDriver);
        }
    }
    else
    _tprintf(TEXT(
                “EnumDeviceDrivers failed; array size needed is %d\n”),
                cbNeeded/sizeof(LPVOID));
}

Categories: Code, History, Tips Tags:

It's funny

April 9th, 2007 Sarath Comments

Today I wish to share some of the funny output/bug I’ve ever seen/heard about some academic projects done by my seniors in my polytechnic. Anyway I’m not going to mention their name.

California Callin’

We shall call him Don. Don’s proposal for academic project was to implement a custom protocol in C. The proposal goes as follows “By Implementing this protocol one would be able to communicate with another computer through Internet. For e.g. It will be able to communicate from a machine in Sree Rama polytechnic to a machine at California using this protocol through Internet.
Don started implementing this. Finally his 4-member team realized that it’s not easy to implement such a protocol within the time available for them.
So they updated the proposal again as “By Implementing this protocol one computer would be able to communicate with another computer through Local Area Network polytechnic.
Anyway the project ended up somehow and his batch mates saying (for fun) that Don updated the proposal again with Serial port as communication medium and he could not implement that too so finally data transfer happened with the help of floppy disks.
So the project started from California came down to floppy disk and flopped as well.

Patient Killer (a.k.a. Hospital Management System)

Don’s another classmate did a project named Hospital Management System. The system functions well but they didn’t get time to implement a feature. It was to automate the room reservation”
The operation of this HMS as follows
1. Registers Patient.
2. To allot a room for patient, we should enter the room number manually.
3. Complete the registration.

So I can explain the operation again in a broad manner  (Just kidding)
Normally attender will be assigned for this manual checking of the room s available and will report back to receptionist. If the patient’s condition is serious and if the hospital is bug enough (say 7 stored) the patient’s story may end upon there. And if an attender does the job for a week, he may also enter to ICU.

Contrastive offers of Hotel Management Systems.

Another guy did a project called Hotel Management System. It also had functioned in all aspect and they have added up one more feature called “Offers” in the system. They caught some funny bugs on preparing for demo(testing).
One problem was, if a person comes to rent a room, he need to order all the dishes going to have from the restaurant for the period of his stay. If he stays there for one week, he need to order every dishes for breakfast, lunch, dinner etc…. anyway they kept bug as open.

Another problem was, if we use the offer and if the offer is “Fried Rice”. If the person orders one bottle of Mineral water too, he will get the fried rice. Finally they have removed the “Offer” feature from the system.

P.S: I’ve exaggerated some stories for fun anyway I’ve introduced this before blogging this.

Categories: Anecdotes, History, Misc, Personal Tags:

The New Year Bash of 2007

January 12th, 2007 Sarath Comments

This is my first blog post in this year. I’m so much font of celebrating new year with friends. In India, it’s very rare to see the new year count down especially in Kerala. So I’ve decided to check for a place here to see the New Year count down. Anyway Google Showed me some inputs for celebration which has driven me to the website of  Tokyo Disneyland. The place is superb to celebrate the new year. But unfortunately all the entry passes were sold out by the mid of November 2006. Finally my customer Yoneyama-san here in Toshiba Medical Systems suggested me, IKSPIARI to celebrate the new year as the Disney tickets were sold out. I was never interested to go for IKSPIARI since I don’t know how to reach here and what are the cost for seeing the live music show and count down, how much it costs for the train tickets and all.

Normally Japanese are celebrating new year with their family. On 31st DEC and 1st DEC, they will be simply spend time with their families and sometimes will go to some Shrines for prayer at 00:00. Now the Youth of Japan is not ready to sit simply inside the house. They are celebrating new year with friends in some clubs or parks like Disneyland or somewhere else to make their party.

Finally on 31st morning I decided to go for IKSPIARI for new year celebration. I also invited some of my friends from nest for going together to the party place.

The 8 member gang started from Nishinasuno to Tokyo by 12.30 PM and get down at Akihabara to purchase some gadgets and portable hard disk for my friends. After the purchase, we went to Indian Restaurant nearby to taste some Indian Dishes. The buffet costs around 1000 Yen (nearly 400 INR and almost equals in price to a Japanese Lunch). We just reached before closing the hotel and had loads of food as were very hungry( even if we were not that much hungry, we showed some hungriness on seeing food). The aunty in the restaurant packed some Butter to Nan for us and we thankfully left from the restaurant.

In between all these, my friend DJ (Dhananjayan) took some photos. Hi Canon S3 IS was on night mode (if we are not careful in taking pictures in S3 IS night mode, photos will be blurred. we have to wait a while till it grasping the image :( ). So most of the photos he has taken were awkward to see :( (I looks very bad in his camera.. bad camera and a fool cameraman)

We’ve planned to reach IKSPIARI by 9.00 PM. So we decided to spend 2-3 hours in Tokyo and went there. When I was coming to Japan, the guide who helped me to reach my destination from Tokyo. She has given some maps and tourist guide of Tokyo Prefecture. So making it as reference we decided to see Rainbow Bridge between Shibaura and Odaiba. None of us were familiar with the Japanese language and the different lines there in Japanese railway system. Finally at 8.30 PM we reached there near the rainbow bridge. The bridge is very beautiful in the night and the place were we get down is harbor area. The entry to the rainbow bridge from the railway station will be closed at 6.00 PM. That was a new information for us. DJ took some more blurred photos with his crap camera settings (Sorry till now I don’t have a digital camera) and we came back to Tokyo and from there we caught the train to Maihama station, station near to Disneyland. Ahh… forgot to say. Actually IKSPIARI is part of Tokyo Disney Resort and it has Cinema theatres, shopping complex, restaurants etc…

Accidentally our team were divided into two and we four people Sarath, Dhananjayan, Anup and Divine were roaming inside & outside IKSPIARI.

After seeing the shops and restaurant, we entered into the Hawaiian Burger Shop to have something. The burger is a bit costly but we could not a suitable place for us to eat something before the live music show @ 11.30 PM. There was a small queue in front of the restaurant to be seated. We were waiting for other people to leave the table. Suddenly DJ found that, there’s 4 chaired table is available and in that excitement, he called the waiter, “Sumi maase” (excuse me in English).. naalu seat avide free aayi kidakkunnundu… (he shouted in pure Malayalam to that Japanese waiter in the excitement. means, 4 tables are available there. please allow us to enter there.) he loudly conveyed the matter. We laughed a lot on seeing all these “performance of DJ”. Finally we had the burger and went near the circle inside the IKSPIARI to see the live music show and count down. I’m not remembering the name of artist performed there. It’s a bit tough name :(  She started with Latin music. The whole people were really enjoyed her performance. On 11:57 the screen showed the beginning of count down. Suddenly it disappeared. I’m not that smart enough with English Language to explain about the countdown happened there. See the countdown video below.

WTF I can’t embed the YouTube Video here :(

See the Count Down here…

After that there we saw a beautiful fireworks at 00:00.

See the fireworks video here.

We went back from there after the celebration, and reached Tokyo at 1.00 AM. We went to Ueno to catch the train to Nishinasuno (were we resides). But unfortunately the final train had left so early.  So again came back to Tokyo railway station and slept on the icy cold floor for 2-3 hours. At 5.00 AM, we got the train from Ueno to our apartment and I slept whole in the New Year Day. This year’s new Year celebration was so memorable.

See I’m laying down on floor and sleeping :)

From New Year Bash

Have a look at some photos.

Categories: History, Personal Tags:

Sad Demise of Rappai chettan

December 10th, 2006 Sarath Comments

The news is here. Anyway its a big lost for Thrissur.

Categories: History, Personal Tags:

It's nearly three weeks in Japan

December 10th, 2006 Sarath Comments

There’s only 24 hours in a day and lot of time we are wasting for many things.. still I could not update my blog… Excuses are many… But still excuse me dear…

Today it’s strong wind out there. I could not move out… I just woke up…

I just completed three weeks in Japan. As I said before, the language is the only issue here but everything else is really superb, neat clean and oraganized. I’m staying in the company apartment at Nishinasuno. There are nearly 35 NeSTians are here as the part of their onsite assignment. The apartment is not that much big enough but optimum use of the space. We have two bedrooms and one of my old roommate also here in my apartment. There are all other home appliances like Fridge, Washing Machine, Oven, Airconditioner, Rice Cooker, Cooking Range, TV everything here. Most of the TV channels are in Japanese and we have to pay extra for any other international channels here. cable TV is really cheap in India. We get nearly 100 channels just for 200 INR. Company provided Internet connection and machine for use but here most of the people owns a laptop. I’m not planning to purchase one at this. May be  a bit later.

This may be a new information for you that I’m planning to buy a property by the end of this month at my hometown. So now I’m a bit miser in behavior to save amount to buy that property :) . Hope everything will happens fine. It’s my dream to have nice home for my family. Reasons are many and from many tragical histories. At this pleasant moment I’m not interested to share anything…

Cook ourself for our dinner and lunch is a really nice experience. First two (still some particular) days, the dishes were like art film and flopped in the box office because I and my room mate are neither experts in cooking nor tried it before. Now it’s a bit improved.

Last week I, Chandrasekhar and Sarath Ravindranath went to see Autum park just a kilometer apart. It’s not that much big place but was beautiful enough with the Autumn leaves. It will be my pleasure if you see my photos.

The office is a nice place to work and the customer is friendly enough. A 20 minute travel in bus required to reach there. It’s a big campus located industial area at Nozaki. We can see some snowy mountains far away if we look outside of the office.

Once I took lunch from the Toshiba canteen. The dish was Japanese one and it made up of some kind of meat and rice and also a half bioled egg topped that meals. It was a bit hard for to take that half bioled egg and I wasted many food because of that. After that I’ve never taken lunch from canteen. :)

Woek is is not that much tigh at this point… it coming a bit tight as we started the testing of the module. Hope I can accomplish my assignment well.

Roads are very neat and clean and people are strictly keeping the traffice rules. People are very polite here (I don’t know much more about the new generation). Once we 2-3 people were in a hurry to catch the bus to Toshiba and we were running along the street. We were simply breaking the traffic rules by not crossing at zeebra lines and not waiting for signals to catch the bus. All these time, the vehicles will suddenly stop even they are many meters away from us. Finally we turned to pocket road. Still we were running along the middle of the road because that was not a rushy road. One car came in that way and on seeing us, he just switched off his car and waited to pass by side. People are taking extra care at junctions even they are going through small pocket road. Now I’m thinking about my days in India which I had many rash drives through the street and pocket roads. Now I’m a bit feared on seeing this…

Another day I was walking along in the street… A ‘wroooooooooommmmmmm’ sound was slowly catching up our ears, I told him… Somebody coming very fast it’s vey rare to see here in Japan. When I was coming to the apartment from Tokyo, I saw one riding through the street fastly as I’m seeing in the English movies… mean while I shared the above incident and curiosity to my friend and was loking to see a fast drive. That ‘fast vehicle’ approached very slowly(30-50 KM Speed). This happened my times and I understood that I’m a bit faster than these ‘fast guyz’. May be these are because of the strict police rules and big fine in Japan…

Nowadays I’m strongly taking chicken. I know it’s not good for health but still I have to because I don’t know which other meat better than chicken and easy to prepare for us. Sambar and Rasam are the vegitable dishes for the week. Other days are filled with chicken and fish.

Being honest, I’m loosly wasting my time in browsing, listening songs. In the weekdays, after coming from office, I have to cook in the alternate days. So chatting with people in india till 9 PM is quite common and we are sharing a PC here. So I’m not geting time to participate in the forums and other activities which I was involved. I came here with some books to read. but still it’s not happening. I’ll be bit late to wake up in the weekends. Am I lazy or not?

Categories: History, Misc, Personal Tags:

From Japan

November 19th, 2006 Sarath Comments

Two weeks ago, I was in Goa for my exams. After that my exams I spent two days with my family since I was coming to Japan as part of testing and integration of the product which we are developing there. My primary task is to integrate and test the echo-cardiac application developed for the new Ultra Sound Machine of Toshiba Medical Systems Japan.

I started from there Friday night from the Trivandrum International Airport. I hadn’t any friends from my company (usually people are coming here as batch of 3-4). It was my first foreign trip and I enjoyed a lot even I’m a bit tensed.

From the Trivandrum Airport, I got a company his name is Kiran working at US Technology and Resources. Kiran and his friend was going to U.S.

After 4 hours of Journey, I reached Singapore Changi Airport. It’s really a nice place to see. Lot of shopping places, restaurants beautiful sceneries… I visited both of the terminal of the airport. They have Sky Train to reach one terminal to another. Mean while I had a long talk with my friend Ajish from the free public phones available there. Ajish has resigned from nest quite a sometimes back before and now working for Siemens, Singapore.

The Boeing flight of Star Alliance taken off from there at sharp 9.40 AM (Singapore time). The service in the flight was comfortable and slept for sometime since I could not sleep for previous day. After that I just watched the Hindi Movie gangster from the small TV available for each passengers. When we were flying over Taipei, it was something like watching earth using Google Earth :)

I reached Tokyo, Narita Airport by 5.00 PM (JST). An agent was there to pick me from airport. She helped me to exchange the US$ I had and also helped me to take Tokyo city. The evening seemed like night in whole Japan. It’s winter time here. When I reached Tokyo the temperature was 2 degree at that time.

NeST engineers are residing the rented apartments at Kyoto, Nasu Shiobara. From the Tokyo I have taken a ticket for Shinkansen (Bullet Train) to Nasu Shiobara. It was relatively fast and I reached Nasu within 1 hr (150 KM from Tokyo). Our senior manager Sunil came at railway station to pick me.

I hadn’t taken the winter coat. So it was a real encounter with Japan’s weather.

Today morning I went out with Anup (my room mate) to do the purchases for the week. We went to a Supermarket names ‘Shiobaraya’ to get the fruits vegitables, fish etc for the week.

Japan is really costly when comparing to India. For a packet of biscuit we have to pay nearly 100 INR. The comparison with INR will always end up in tears. So I’m not doing it anymore. I have brought one tiffin box and winter coat from here.

The people here are very polite and also in the streets they are keeping the rules. Communication is a problem here. Most of the Japanese haven’t the basics of English. It’s very difficult to talk with the in English and unfortunately I don’t know Japanese. I have to learn something before I’m leaving from here.

Here bicycle using for travel to short distances. It’s raining here from morning . I forgot to buy an umbrella :( . I have reach office by 8.15 AM. Toshiba have the free Transportation for the employees and for others working for them.

I’ll give the updates tomorrow.

Categories: History, Personal Tags:

Happy B'Day To God's Own Country

October 31st, 2006 Sarath Comments

The States Reorganisation Act of November 1, 1956 elevated Kerala to statehood. On this November 1st Kerala celebrate it’s 50th B’day. Salute the 50 year old tradition called K E R A L A.

This one really makes me mad. It’s happening every year at my hometown

The Great Thrissur Pooram

Categories: History, Personal Tags:

Love People Instead of Judging them

October 27th, 2006 Sarath Comments

This is quite an old story, but worth reading.

A man and his girlfriend were married.

A few months later, the wife comes to the husband with a proposal: “I read in a magazine, a while ago, about how we can strengthen our
marriage.” she offered.

“Each of us will write a list of the things that we find a bit annoying with the other person. Then, we can talk about how we can fix them
together and make our lives happier together.”

The husband agreed. So each of them went to a separate room in the house and thought of the things that annoyed them about the other. They thought about this question for the rest of the day and wrote down what they came up with.

The next morning, at the breakfast table, they decided that they would go over their lists.

“I’ll start,” offered the wife. She took out her list. It had many items on it. Enough to fill 3 pages, in fact. As she started reading the list of the little annoyances, she noticed that tears were starting to appear in her husbands eyes.

“What’s wrong?” she asked. “Nothing” the husband replied, “keep reading your list.”

The wife continued to read until she had read all three pages to her husband. She neatly placed her list on the table and folded her hands over top of it.

“Now, you read your list and then we’ll talk about the things on both of our lists.” She said happily.

Quietly the husband stated, “I don’t have anything on my list. I think that you are perfect the way that you are. I don’t want you to change
anything for me. You are lovely and wonderful and I wouldn’t want to try and change anything about you.”

The wife, touched by his honesty and the depth of his love for her and his acceptance of her, turned her head and wept.

“If you judge people, you have no time to love them. Never take some one for granted. Hold every person close to your heart because you might wake up one day and realize that you have lost a diamond while you were too busy collecting stones.”

– Mother Teresa

Categories: Anecdotes, History, Personal Improvement Tags:

scanf in C : Reading single line of text using "scanf" function

October 25th, 2006 Sarath Comments

I have done it 4-5 years ago, that to read a whole line of text (including space) using scanf function.

When I was preparing for my exams, I went back to the old days of a “C” student. Nowadays I’m a bit used with C++. So I forgot the format specifier to specfy inside the scanf function. Finally my memory retrieved it back

Here’s it is:

char name[100];

printf(”Enter the name:”);
scanf(”%[^\n]“,name);

Something cool no?

Categories: Code, History, Tips Tags:

Gaja sangamam ( A meeting of Elephants )

September 14th, 2006 Sarath Comments

Please see the photos Gaja sangamam ( A meeting of Elephants ), happened at Thrissur ( My hometown)

 

 

 
Photos Courteously: Pramod C E

Categories: History, Personal Tags: