Tuesday, August 21, 2007

Some Project Ideas for Students

1. RemoteFS:
- Ability to mount a particular filesystem over the network.
- Support for NFS, FTP, SMB/CIFS and other filesharing protocols

2. Automated Mail Generator:
- Usually marketing companies have this requirement of sending out a common mail to a large list of users. The only thing that could possibly change is the name of the person in the body of the email and the email of the person in the To field.
- Provide a way to accept a common email with the variable fields in the mail.
- Take a list of email id's and send it to individual id's.
- SMTP and POP3 support shoudl be available.
- Easily configurable based on the mail server (smtp or pop).

3. RemoteCmd Shell:
- Ability to connect to any machine (ideally running any OS).
- Ability to fire commands on the machine.
- Ability to provide a common set of commands which would be translated to the native commands on the backend OS. This would help the user in knowing just one set of commands but when the user fires a 'dir' on the command prompt and if the user is connected to a Linux/Unix machine, the command that should be fired on the backend machine should be 'ls' and not 'dir'.

4. C++ to Java code convertor or vice versa

5. Server Management Tool
- Ability to manage/monitor various server machines and do a lot of active activities
- Activities include installing a software on various machines remotely for a Master server.
- Monitor all the machines and display the status of the machines on the master Server in a nice GUI.
- Remotely manage machines i.e. should be able to shutdown, reboot a machine from the Master Server.

Will post some more if they come to my mind...

Monday, June 18, 2007

SanDisk Cruzer micro 2.0 GB
I ordered a SanDisk Cruzer memory stick on www.futurebazaar.com and got this slick and smart looking memory stick.

The pen drive comes in dimensions of 2" X 1/2" (yeah its that small!) and packs in a whopping 2 GB of data. This drive comes pre-loaded with software to manage and install on your Windows 2000 or XP machine. Yeah thats the only 2 flavors of Windows supported... And that too Windows 2000 with SP4 and above :( The software included has an anti-virus and some games. On my XP machine I did not have to do anything after plugging it in! It just starts off on its own. The data transfer speed is awesome. Copied some 800 MB of data within 3 minutes! (I think thats fast) It has a slider which when pushed reveals the USB 2.0 connector.

All this for Rs. 999 with an offer where they are giving away 10 Sprint Blank CDs free with the pen drive... Happy shopping :)

Sunday, June 03, 2007

WMI: Windows Management Instrumentation a.k.a. WBEM
Recently, while working on an assignment to get various performance parameters from my driver, I was re-introduced to WMI (I had read about it a long time back and knew what it was but did not know how to use it) for writing performance counters for my driver.

So, I started like anyone else who has no idea about WMI, Google on the subject and read, read and read... So I came up with a few links on Microsoft, CodeProject and OSR but I must say the documentation on Microsoft was not enough for me to get started (Disclaimer: well thats what I believe). One of the best resource that I found was on OSR and can be accessed here (to access, you have to register for free). This link gives a brief explanation of how to do it but make sure you know all the WMI terms before you try reading that article. The terms that you would want to know are WMI, MOF file, WMI Provider, CIM Repository, etc.

Now, I begin with talking more about what they missed in the article on the OSR site.

1) Make sure the names of the files in front of the tag 'NTTARGETFILE0' should be exactly same as the files specified in the Makefile.inc file. This was not written anywhere and gave me nightmares to build the code.

2) Look at the .rc file, where they have mentioned about adding a line describing the MofResourceName. Remember this string very carefully. We will need this later.

3) When you look at the source code of the sample driver, they have implemented an AddDevice routine and set the callback in the DriverEntry. This routine holds only for PnP (Plug and Play) drivers. But if you are writing any non-PnP driver as in my case, a simple filter driver, this routine does not make sense, it will never be called. So, now how do we get the PhysicalDeviceObject which is the only reason to write an AddDevice routine. Don't worry, we don't need one for a non-PnP device driver.

4) The GUID List that you pass to the WMILIB_CONTEXT structure should have flags of each element in the list as 0 (zero). This flag is specifed as WMIREG_FLAG_INSTANCE_PDO which will be OR'ed with the flags specied in the WmiQueryRegInfo callback.

5) Look at the routine WmiQueryRegInfo or whatever is equivalent in the code. Here all you need to do is provide an InstanceName, MofResourceName, RegFlags which are OUT parameters to the routine. The RegFlags should not have the WMIREG_FLAG_INSTANCE_PDO set because this specifies that we will be providing a Pdo(PhysicalDeviceObject) which in our case does not exist. Just specify WMIREG_FLAG_INSTANCE_BASENAME. InstanceName could be anything your instances will be identifed as, MofResourceName should have the same string that you specified in your .rc file in point no. 2. In the sample it is "MofResourceName", so set the out param to "MofResourceName". This also was not mentioned anywhere and gave me a hell lot of troubles to make this run...

6) Thats it, if you follow each and every word of the article, your non-PnP driver should run smoothly... But one thing that I forgot to tell you is that this has been tested on Windows 2003 Server and I cannot guarantee it should work as it is on Windows 2000. Also, your driver's counters will not be visible from 'perfmon' and the reason I figured out for this was that, while you compile your MOF file, it adds the schema to the root\wmi namespace whereas perfmon expects it to be in the root\cimv2 namespace. I haven't really found a solution to this one. Will post one when I find it.

Till then HAPPY CODING :)

Tuesday, May 15, 2007

Get paid for receiving ads on your cellphone...
There was mail from one of my previous managers about a site called mGinger which pays you for receiving ads on your cellphone and they let you decide the kind of ads you receive in a day, the time frame in which you receive those ads in a day and the content of the ads. That sounds cool. I don't know if this really works but whats the harm in giving it a try. I have registered for it to see if it actually works. What are you waiting for. Register at: mGinger.com

Sunday, May 06, 2007

Classification of human beings!
Recently I got a mail saying "Find out what type of a person you are, based on your blood group" and I said to myself that this was yet another mail in the series of mails floating around trying to classify people into various categories based on different parameters. ( Oooh! that was a long sentence :) )

So why do we need to classify people into 4-5 or any number of categories based on various parameters like date of birth, blood group, day of birth, sleeping posture, etc. People tend to believe in the way these mails talk about the tendencies of a group of people who are either born on the same day or a range of date or have the same blood group. Can people really be classified on this basis?

What I feel is that the reason most of us tend to believe these mails is that most of us just read the category we fall into and not others. Usually these categories are written in a generic way thus giving a person an illusion to believe in whats written out there. And most of us have some percentage of every characteristic that these mails talk about. Like for e.g. if I am a Leo and I start reading my horoscope, I feel most of it is true because I try to adjust events in my life with what has been predicted. If I assume to be an Aries and start reading the horoscope for the same, I will start feeling that whatever has been written is actually true. Its just an illusion so to say. Try doing this, whenever you get any such mail(s), try reading a category you don't fall into and I can confidently say that you will feel that you actually fall into this category by words though not by birth... Try it.

Wednesday, May 02, 2007

Make your own Microphone in times of emergency.
I was watching this television show about gadgets and stuff and in the end they showed a crude way to build your own microphone in no time, in case of urgency. But this is not a replacement to your conventional microphone and is only meant to be used in case of an EMERGENCY.
This is how it goes:
Take your normal earphones that came with your i-Pod's or walkmans with the stereo jack or pin (whatever you wish to call it) on the other side. Attach it to your computer in the microphone's slot. And then open up Sound Recorder in Windows from Start->Programs->Accesseries->Entertainment->Sound Recorder or if you don't have it installed at this location you can search for the executable at %Windows_Installation_Directory%\system32\sndrec32.exe. e.g. on my machine it was located at c:\WINNT\system32\sndrec32.exe. Just press the record button and start speaking on each of the earphone one by one. You should see sound waves in the Sound Recorder. By speaking in the earphone one at a time you can figure out which one works best and then use it for your purpose. But this is not going to replace your microphone as the sound quality is not as good as it should be...

Now, the question that must be popping in everyone's mind (like mine) must be that how can something like that work? The answer they gave on the show was: the way these earphones and microphones are manufactured is almost same. I am NOT convinced by their answer, so am still searching for a satisfying answer. Will post it when I get one...

Thursday, April 12, 2007

32 bit to 64 bit Safe!
I was working on a porting task from 32 bit to 64 bit. Man, its a hell of a job to do. Loads of data types and API's change over the two variants. There is a nice article by Microsoft which can be found here. I am not an expert in doing the porting though, but have learnt one fact: Write code that is 64 bit compatible even though you are targeting 32 bit. In doing so, the code will almost be compatible with 32 bit. As the industry has been moving towards making every piece of software 64 bit, by this approach we make sure that we have a working 32 bit as well a 64 bit code base.

Tuesday, March 27, 2007

Latest Addition to the Stable!

Hmmm... You guessed it right from the pic :) I recently (on 24th March '07) got a Pulsar 150 DTS-i for myself. Here are some pics of the cool bike. I am in awe of the design and the bike is just amazing. I can just keep going on and on about it as long possible...

The bike has a lot of cool and NEW features. The new features that come with the so called UG-III Pulsar are:

1. The engine is a 149 cc compared to the 146 cc of the older 150 versions.

2. It has a new gearbox with changed gear ratios. The gear pattern is the same as the 180 DTS-i.

3. The bike comes with the new design at the rear with new LED tail lamps. The bike is a few inches longer than the older Pulsar (thats was cool).

4. The bike also comes with a digital console, which is the selling point of the bike. The console display the speed of the bike, the total distance travelled and a trip meter to calculate distance of upto 12 trips! The display also has a digital fuel level indicator. Though the RPM meter is still analog... The orange back light looks cool.

5. The bike has one very great feature for the first time in bikes in India. It has auto-cancelling indicators for left and right indication. The moment you complete the turn the indicators go off on their own as they are in cars!

6. The typical problem with most bikes is that the indicator rubbers are hard and break off frequently. Then you need to fix them up with tape. But this bike comes with flexible indicator rubbers that make the indicator lamps flexible (you can actually turn them around) that don't break.

7. Other accessories are default as is from the previos DTS-i models like alloy wheels, NitroX suspension, front disc brake and electric starter.

8. The front of the bike has also got a bit of a change. The plastic on the previous Pulsar was flat whereas this one has an edged out sharp surface for the pilot lamps which looks cool.

9. The bike also has back lit switches which are convenient in the dark. This is also a first in Indian bikes...

The price difference between the 150 and 180 versions when I bought it was just a mere 1.5 grands. I could have gone for the 180 engine but chose the 150 for its fuel efficiency. There is very less difference between the two bikes except for the 30 cc increase in power and the black look in the 180. Apart from that everything else is the same. The other thing is, looking at the traffic in the city and the kind of roads we have in Pune, a bigger engine is hardly of any use. Where would you actually open up the throttle and race? Thats what I asked myself and the answer was the 150 cc DTS-i.

I also got a remote controlled security system fitted on the bike as an addon accessory offered by the company showroom.

On the whole a nice bike which costed me a whopping 63 grands (On road + accessories)... But I think its worth the price for all the features it has to offer.


Thursday, January 25, 2007

Got a Sony Ericsson K750i :)

I recently bought a Sony Ericsson K750i. The cell is a good combination of features at that price. Well got it for ten and a half grands and additional 1 GB memory for another grand. Totals to eleven and a half grand. Thats a good price for a phone with 2 Mega-pixel camera, Radio, Media Player and Internet capabilities alongwith 1 GB of memory card... The phone sounds good and works smooth as well... The camera can take nice crisp images with 3 different image sizes. Well forgot to mention that the camera sports a 4 X digital zoom. Though not quite good at times but works fine for me. The best part about the phone is that it has a powerful flash light which can also double up as a torch. This is something very handy for taking pictures in the dark. Pictures come out really very well in the dark :) The media player plays a lot of different formats but mp3 is what is recommended. Though the phone does not play wav files and some of the midi files directly copied from the computer. The phone also is unable to play Real medi formats. Well Sony-Ericsson should do something about it... The phones memory is easily accessible once connected to the computer. The phone memory shows up as a drive in Windows and you can just drag and drop files onto the phone memory. As simple as that!

Some of the impressive features include PhotoDJ to edit your photos, MusicDJ to create own ringtones and VideoDJ to create/edit videos. The keys of the phone are sometimes annoying but they are nice. There are a hell lot of free themes available for this phone and the phones looks cool with these themes. I have got some 60+ themes on mine! There are 3 games that came with the phone which are quite amusing and entertaining...

All in all a nice package for a good price. What say?

Monday, January 08, 2007

From the Penguin's to the Windows World...
I am back to the Windows world after working with the Penguin for more than a year :) There are a lot of differences in the two but I love and hate both. While on the Penguin's side, it was just a black console with lots of white characters, here the scene is different. There are a lot more colors to add to my life now :) But I love the simplicity the Penguin offers... I will surely miss it. But I promise I will be back at it soon. I am trying to find a box with the Penguin because I feel lonely without it, I am missing it seriously...

Well for now, I am learning to debug a driver in kernel mode. I say its a very different experience... But a learning one ;)