Misc
Misc
I am moving to a new blog - http://geekswithblogs.net/suniljagadish/ after bearing with comment spam for quite sometime and also suggesting to the admins to include CAPTCHA to prevent comment spam. No response so far. Its irritating when you find an email saying - “XYZ has posted a comment on your blog” and then you find out that its only a list of sites where you can play online casino.
I know its really annoying to ask someone to open their blog roll or their RSS agregator to update the feed link to my blog/feed. Please take the trouble of updating your links. I thought it would be a good idea to use feedburner to manage my RSS feeds. So here is the new RSS feed url - http://feeds.feedburner.com/geekswithblogs/suniljagadish
With me moving to a new blog, you will definitely find me posting good amount of code apart from the tech bytes. Thanks to dotnetjunkies for hosting my blog all these days.
Cya!
Moral of the story: User experience is very important.
Sorry if you mistook this to be a Microsoft VB6 event which was coming up. :)
If you are a VB6 fan and feel that you have been over-shadowed or drowned in the world of the “uncivilized semi-colon” languages (as Raj calls it), check this out - Microsoft Visual Basic 6.0 Run.
This reminds me of the VB6 projects that I had done. It was about 3.5 years back when I thought of learning Visual Basic 6. I purchased the Visual Basic 6 Bible which is no way a recommended book for beginers. I tried to follow the samples given in the book but was not completely successful with it. After a short term course, I set out writing small applications including an Astrology software, IVRS Voicemail retrival system and stuff like that.
I had a very good time working on iCafe' Manager - an exhaustive Internet Cafe' management appllication which Sharath and I had done as a part of our academic project, for which we ended-up with an ultra-cool UI (3D bars, shadows, animated menus, etc.) . Thanks to Photoshop and the Visual Basic timer control. We had used almost 10 timer controls to animate the scrolling of menus and other parts of the UI which could be hidden/minimized. It was more of fun doing this though we didnt get much time to optimize the code we wrote.
I did some serious development using VB6 for my final semester project (BCA) which was a ready-to-market 'Email Management over SMS' suite. It was targetted at corporates who wanted to give their employees Email access on the move (when GPRS wasnt as affordable as they are now). This was the first time did some serious development with Winsock (in contrast to winsock chat applications where one usually starts off). Socket based communication with POP and SMTP servers are not always straight-forward. Thanks to Kurian and JK of Xtend Technologies, Cochin, I used their XSMS platform to communicate with the GSM world. I very badly needed to use multi-threading when I was developing this but a VB6 developer would know what that means. Thanks to .NET. Life has changed.
Offlate I have been trying to experiment with the Microsoft Windows Embedded Shared Source Tools - Bluetooth library. I have been facing some referencing problems with it, but will be out of it soon.
In continutation to the subject of our (Team: BlueCQ - Sabarish, Sharath and myself) team's participation in the Imagine Cup 2005, yesterday we had the South Zone finals in Chennai. We were geared up with our idea to dissolve boundaries using technology, calling it “BlueCQ” (as in ICQ). It is a bluetooth based people networking platform with lots of innovative; fun and business oriented features incorporated in it.
No twists, straight to the point...
Our team didnt make it to the next round (National Finals) because of the following reasons sighted by the judges and the concerned people.
- Bluetooth is going to die / Its already dead and 802.11b has already taken over
- Bluetooth is unreliable
- Bluetooth has a very short range (we had come up with an innovate solution for this but judges weren technically sound to understand and appreciate it... it was disgusting to note this)
When I first heard about Bluetooth I only knew 2 things about it - its a cool new wireless technology, its a substitute for Infra-red. The latter isnt obviously completely correct, which I realised after getting myself involved with Bluetooth programming for the Imagine Cup. Anil Dhawan's video on Channel9 is what motivated us to pick-up Bluetooth as the medium for communication. I started off by doing some initial research about what the technology is and how it works (the Bluetooth stack, the Bluetooth radio etc.). I didnt want to do a crappy job by starting off right away with some code.
According to the modules that we divided, I was the SDK for our platform which has been a very exciting experience for me. Wouldnt be explicit but, our project has a feature which the Bluetooth SIG (the body governing the Bluetooth standard) wants to incorporate into the Bluetooth stack after 2 years !!
We went ahead with this idea and landed up in Chennai on 13th May 2005 for the South Zone finals. We did have a few last moment preparations and sat coding in the hotel where we were staying. We were told that the judges would be from the “industry”. So, we were expecting a good technical interaction. However, expectations always do not turn in to reality. There was a tie with another team after the scoring and we didnt get through because we committed the crime of using Bluetooth (which according to them is dead).
Its really frustrating to note that people are not well informed of the technology and just speak what they “hear“ from others. Its the general notion that, when you ask someone about Bluetooth, his immediate reaction would be - “Naah, its dead.” (even without really knowing whats happening out there).
Even one of the Microsoft (India) folks said that Bluetooth has been replaced by 802.11b already !! Its unfortunate that probably the Microsoft guy hadnt seen this podcast from Microsoft MEDC 2005. To add to my arguments, Microsoft is also funding the Software GreenHouse initiative, which is currently working on a Bluetooth based social networking application which is hardly 50% of what our idea is. It called - “BlueJab”.
The war between different technologies will continue.
Hoping to see a better IC 2006.
:( My blog has been receving a lot of comment spam. I wonder if there is any way to get across this highly irritating problem. If you have any feedback/comments you can mail me suniljagadish AT gmail DoT com
Most of the text books which I had read as a part of my ciruculum explain Hashing in a very abstract manner. Some text books wrongly interpret hashing as something only to do with files and searching in a file. A better way to project hashing would be as a data structure that allows faster and effcient data look-up.
Many programs that we write needs to store some temporary data which may have to be looked-up later during the execution for some purpose. The usual way one would approach this is to declare an array and search the array using a search algorithm like binary search or linear search. The problem with this method is obviously the cost pertaining to the time taken to search for the value. The time complexity of such methods are in the order of O(N) or O(N/2). This method is fine for programs which are done for an experimental or learning purpose.
So, is Hash Table some kind of a searching algorithm?
Well, not exactly. As I mentioned before, it is better called a data structure.
Consider this analogy:
Lets say that I go to a library and I am looking for “Windows CE.NET Programming by Doug Boling”.
Traditional Scenario
The conversation happnes this way in case of a traditional search algorithm, lets say, which is being used by the librarian.
Me: “Hi! I wanted Windows CE.NET Programming by Doug Boling.”
Librarian: “Ok. Give me 2 minutes. I will find out and tell you in which rack you can find the book.”
[Librarian opens up a register and looks thru page by page for the title of the book...]
[I am still waiting for an answer...]
Librarian: “Here it is. You can go to Rack 3 in the Technology section.”
Me: “Thank you.”
The hash table way...
Now lets say that the librarian is using hash tables to look-up the register.
Me: “Hi! I wanted Windows CE.NET Programming by Doug Boling.”
Librarian: “You can go to Rack 3 in the Technology section.”
Ok, so you saw how quick that was. How did the librarian manage to find out the location of the book so quickly. This brings us to a point wherein we need to know what *exactly* is a hash table and what is a hash function.
A hash table may contain objects that have keys, and values. The hash table is made of an array into which objects may be inserted, and a hashing function. The hashing function takes a key as an argument, and uses it to calculate some index in the range of the table's array. This function is used to map different elements to different arrays in the table. Hash Table approach is a more “predictable” way to look-up into a set of values.
When we want to insert an element in to the hash table, we calculate its hash value (the result of activating the hash function on the element's key). We then go to the location in the array whose index is equal to this hash value, and insert the item there. If this location in the table is already in use, we look for the nearest free location and place the element there (there are various other variations for how to handle such "collisions". the method we describe here is called "simple hashing").
When we want to locate an element in the array (given its key), we calculate its hash value, and then start scanning the table at the location whose index is equal to this hash value. If we find the element (by comparing the keys), we are done. If we find an element with a different key, we move to the next higher location (moving back to the beginning of the array if we are at the last element). We keep scanning until we either find the element, or find an empty cell. Such an empty cell indicates that the element was not found in the table, and thus the search fails.
The time complexity with hashing (in case of a perfect hash) would be O(1).
I know that if not the the concept of hash table, the actual implmentation would still be unclear. I will re-direct you to some links which graphically explain how hashing works.
1. Follow the images: http://www.sparknotes.com/cs/searching/hashtables/section1.html
2. Cool animation: http://ciips.ee.uwa.edu.au/~morris/Year2/PLDS210/hash_tables.html Very lengthy explnation, but scroll down and you will find a “Run Animation” button. Its a real cool animation which explains Hashing in a very neat way.
I downloaded FreeSCO (Free ciSCO) a soft-router with firewall capabilities. I was on the lookout for a firewall, prefereably something which could be configured on a diskless PC. I preferred a diskless PC because of two reasons - easy and hassel free harware setup & not so easy for hackers to sneak in. Mr.Jayakrishna had suggested the use of FreeSCO quite sometime back. Now that I am getting a broadband internet connection, I definitely require something more than just a Zone Alaram. One can easily setup a custom firewall with two layers of firewalls. A FreeSCO box can be in the outer layer with an NT machine in the inner circle.
FreeSCO is an open source program that can run on a 1.44MB floppy disk and also it comes with lots of cool features and customizations that can be done. Being a command line utility it is not very user-firendly. All you need to do is to download FreeSCO and make a Floppy disk copy of the FreeSCO setup files. It is based on a 2.0.39 Linux kernel. And a sad part of it is that you need to tinker around with its code if you need to get internal modem support for it. I havent ventured too much into that direction but Skp was telling that there is a patch available for it. Yeah when I say modem, I reffered to a dial-up modem. It does support Leased line, Cable, DSL connectivity too. Support for PPPoE is also built into it. Another cool feature is that it has a web control pannel using which you can login from anywhere and control your firewall/router remotely. It can be configured as webserver to serve simple HTML content. Simple and cool implmentation of Linux.
Yeah obviously, it cannot be compared to a CISCO PIX or Checkpoint, which are real good enterprise ready and highly reliable products. Probably this is one drawback I see when you speak of many open source projects. They are not complete in the sense that not all features are built into it. Bug-fixes are a slow process. So if you wanna get a simple home-made low cost firewall, just go in for FreeSCO.
Imagine Cup being one of the major global competitions for students hosted by Microsoft definitely draws the attention of anyone interest in computers, software, graphics and game programming.
I learnt about IC an year or more back that was when the IC 2003 was on. I hadnt worked on .NET at that time and I always thought that it is only for the geeks out there. "Change" is what is driving everything today. I saw the IC 2005 video when Mr.Tyson Dowd visited Bangalore and he spoke about IC '05. I still hadnt made-up my mind whether or not I should participate. Finally when the Round 1 dates for India was nearing, I teamed-up with Sabarish, Sharath and Deepthi Rao and we decided to get into it.
Round 1 is about a chess program, wherein we are given an SDK and we are supposed to code for a function to find the checkmate move. It is definitely a good task to do but I felt that we are wasting time when we think of what participants in other countries would be doing. They would be working on their Software that would be submitted for the finals. We are stiil writing some crappy code for a chekmate. Phew...
After lots of discussion amongst ourselves we decided to start off with a brute-force method to get cracking with the program. After facing a hell lot of problems with MovePiceUnconditionally, we chaged our approach and now our program seems to be working fine except that it needs more tuning for performance. I read in the spoke "...so that you can save some precious nano seconds..." Oh. Please I wasnt thinking in nano seconds to compute the Checkmate in 1 move. The SDK is undoubtedly crappy in terms of ease-of-use, clarity and in some cases even the functionality.
Inspite of the fact that my exams are going on, I am not able to resist from "Spoking" (as in visitng theSpoke and Poke to see whats up). I also decided to make a program that will test the code that we write for different TestCases. After having some problems with loading different XML files (which contain the position of the different pieces) I finally have a working verion of the tester, which all of us will be using. It would also help our team to test for different cases and easily store & forward the results of the test.
One of the test cases:
<ChessGame>
<White>
<King HasMoved="True" Position="b7" />
<Knight HasMoved="True" Position="e7" />
<Knight HasMoved="True" Position="f6" />
</White>
<Black>
<King HasMoved="False" Position="d8" />
</Black>
</ChessGame>
theSpoke was hot with lots of discussions about whether or not people should 'openly' post the strategies that they are using in their solution and also some of them wanted to even post their DLLs!! Sriram said it right... Why dont they post the code itself if they want to really help someone?...
Lots happening for IC... India stands at No.2 in the number of registrations for IC too!
Yo!
Hi!
I am Sunil Jagadish (a.k.a HandledException – Sounds geeky eh? Not to worry. I am not so.) Ok if you know about me, that’s fine. Lets get down to business. If you don’t know much about me, I suggest you take a peek at my general blog http://suniljagadish.blogspot.com
I am learning .NET now. So the info what you can find about .NET o’er here would be basic stuff. If you still think that you would be interested, go ahead!
Critical comments, views, suggestions etc are solicited.
Happy programming!!