Sunday, August 22, 2010

The Bus Game on the Lunar Land


I thought of the title " An Hour at the Bus Stop" but that would have made it look like a 2nd Std Essay and would have taken away the exciting part of the 'game' that it is. So basically, this is a very interesting game that one gets to play at the Dindoshi bus depot. It requires a lot of brain, vigilance and physical power. People weak at any of these should not enter the Dindoshi Bus Depot.
RULE 1: This game is played from Mon-Fri.

So it is 8 15 in the morning. You are fully charged to face another day at the office. And you enter the lunar-surfaced Depot - but with two differences.
1. g(Dindoshi lunar surface)= g(Earth) in Dindoshi area.
2. This lunar surface has not traces of water but gallons of them. ISRO could supersede NASA this time in researching water on moon. I am here to help :)

After knowing all these technicalities, you reach a safe area doing the astronaut jumps.

RULE 2: Check if the game is already over.

You look around to see if the daily faces are still there or they have beaten you in the game for that day.

Now you start looking for THE resource: the BUS. There are options and their numbers mean nothing unless it takes you to or near your destination. But intelligent people will analyse to select the right bus.

RULE 3: Late entries are not given the liberty to use their intelligence.

Then comes in the vigilance - the most important quality required to win this game. There are many things to keep an eye on:
a. The BEST honey comb: the place from where the driver bee and the conductor bee come out. You should know the already standing bus (flower) on which they will land. Experience comes handy here.
b. The opponents. In case you are not good at point a, this one helps you. Observe each opponent very carefully. Not directly in the eye(they will shoot with their snipers..beware), but look askance. Try to read their inscrutable faces. Their excitement of seeing the driver come towards the bus will surely betray their will to be stolid.
c. The gate of the depot from where a bus could already come loaded with the driver and conductor.


So you have two threads already running in your OS. Now another one adds in. The one that actuates the process of running. As soon as the observation thread of three cases throws an event, the thread for "running" should chip in without any latency.

RULE 4: Go for the front door if you are a female. The front door is a female dominated place. Do not dare to try it if you are a male. Snipers galore. Males, go for the back door.

Now comes the physical test. You need the strength of a Spartan to push away everyone behind you and get into that door to heaven. Most lose their hope at this stage and the victors go to the next level- THE ENTHRONEMENT.

The Enthronement rules have recently undergone a revision; Rev 3 to be precise, which has made the game all the more difficult for males. But that makes it more challenging and men are always good at taking challenges...hihaha. In a ruling that speaks about growing female dominance, 6 rows on the right side (12 whole seats!!) have been reserved for females now. Damn it! OK..so the victors from the last level have to catch the right throne keeping in mind all kinds of reserved seats for the females, the aged and the handicapped. The reserved seats, if unused, can be used unless the owner comes to claim it. Failure to show respect to reservations can result in disqualification.

This ends the game. The rule for deciding the winners is as follows:

RULE 5: Window seat winners stand at first place. The "pillion" seat achievers stand at second. The "standing" stand nowhere and get their punishment during the journey. If the top two places feel pity about you, you could be promoted to their positions when they are already satisfied with the comforts the seat offers...though it hardly offers anything..something better than nothing should we say..the vigilance tips can help here to know the possible candidates who are oversatisfied with their positions.
So that's the BUS game..And there is always a chance to take revenge on your opponent...the next day and the next and the next...Interested ppl are welcome.....unwillingly :(

Sunday, January 24, 2010

A satisfying weekend.....

I have always had this inner feeling that I must develop all kinds of practical technical skills and learning, which will help me in dealing with theory better. And finally I had a satisfying weekend with respect to this wish of mine. I made my first home made PCB. The circuit was that of the USBasp-a popular and simple USB based programmer for the AVR family. Refer this link for more info.http://www.fischl.de/usbasp/. And all this..thanks to the friend who I consider as my electronics guru since my juniour college days-Tushar. He is the most down to earth person with the most of the electronics knowledge on this earth, according to me.
It began with a bit of planning on my side(thank you!), wherein I fixed this weekend for this activity, after a lot of procrastination. So Saturday morning, me n Tushar swooshed to Lamington Road- for those who do not know, it is THE place in Mumbai where all kinds of Electronics components reside. Tushar was walking through the lanes there, as if he owns them-after all, he knows most of the shops there, knows where you will find a particular component cheap. He has been going there regularly for the last 5 years. So basically I was lucky. Unfortunately we landed when the shop shutters were still sleeping. These guys are damn lazy. Always remember, if you want to go to Lamington road, be there after 11 am. Sunday closed. First Lesson for the weekend learnt.
You will find that a layout is already available for the circuit on the webpage that i referred to. But I did not want to copy it. So I made my own layout in Eagle along the week and made a list of components to be bought. I bought the components and the PCB fabrication materials required(Ferrous chloride, copper cladded PCB, drill and drill bits). We planned on working on it on Sunday morning, since we had to report to office and also had planned a visit to Elecrama2010. The Elecrama thing did not prove to be very useful, since we reached there when most of the stalls were winding up.
Come Sunday, we start off by printing the layout on a paper and then ironing it out on the PCB. After 4 unsuccessful trials, we learnt that a glossy paper(like most magazines have) is better for taking a print. a laser printer is mandatory. After ironing it out on the PCB, we dipped it in the ferrous chloride solution-all thanks to Tushar who has performed this process numerous times. After minute observation learnt that few tracks had merged, so had to separate them out using a blade. Drilled holes into the PCB(in the process, broke two drill bits), mounted the components and we were ready to go. But it did not work at first go. Again minute observation showed that a track was open. Bridged the track and hurrah....the programmer was born..........I have not grossed over the process details. You will find many Youtube videos on DIY PCB fabrication. All this made us again lose out on the last day of Elecrama2010, since we reached there an hour before the thing started closing. But all in all, it was a satisfying weekend for me....hope to have many such ahead.....Ohh..btw forgot to tell you that the first four unsuccessful printing trials made us think that perhaps my layout was faulty, and we reverted back to the one available on the webpage. So the one working now does not have the artwork done by me. But I am sure my design would also work. I will have that one printed too in the near future....and now heading for the week ahead.....

Speed Breakers

Somehow I have this thing about weekends. Guess, it is bcoz it is the only time in the week when I get to introspect. And this intospection can be killing, mind you. When the mind falls in a thought trench, it is difficult to climb up and come out of it. And in such cases, to the rescue come THE WEEKDAYS. Think of it as a road with speed breakers. You keep going fast, when suddenly you hit a speed breaker(in this case periodic ones). You go slow over them to speed up again. Is speed good? Dunnno..Would weekdays be good had they been like weekends..a BIG NO. But I miss the introspection on weekdays.....Thank God, they both exist...

Sunday, November 15, 2009

weekend ends...

Another weekend going by... I always end the Friday thinking I will do something exciting this weekend, learn something new, just anything that could help me widen the supposed-to-be "eyes of the mind". However, it always remains a mystery how the weekend goes by. So what did I do this weekend. I do not know..read a few random technical articles which tickled a nerve or two in the brain to be settled again as it was. Hmmm... well yeah, I saw Taare Zameen Par(TZP famously)
for a third time. The magnitude of tears being the same everytime I have seen it. It was shown on the local cable channel courtesy Children's day. The only message I get from the film is "Stop forcing your children to perform. Just encourage them and they will perform on their own."-a very important one. Even today a play was telecast called "Shyamchi Mummy"-a similar topic but showcasing a very opposite view. It must be a 6-7 years old play, when HSC exams were very critical for further admission.In this play, what happens is that the guy who is studying for the HSC is bullied badly by his mom who is bent on wanting to have him in the list of merit rankers. He hates doing all this, following schedules etc.. There's hell lot of jokes in the middle of how he tries to relax but ends up getting caught by his mom. But in the end, everything is happy since he tops the merit list. The messages from both these media quite clash and they only highlight the fact that it is the competition that is killing. I remember how when in school, getting the top rank was important...to me. It was only because of the importance that I attached with that position which made me frantic about getting it. I do not know how it became important for me. Maybe it was because of the praise that I was subjected to in school and at home whenever I scored it, that made me go for it everytime. But just out of school and going for IIT coaching and then juniour and engineering college proved to me how all these marks stand no value, especially in an Indian education system. I found out how I had forgotten sharpening my skills while running in the very local competition of the school. I found out that there were many more students coming from other schools who have scored maybe a below 10th rank but are truly talented and have nurtured their talents instead of running in the race and that is very important. I struggled to find out my interests after SSC, which would not have been the case had I considered many years ago. In fact I would have been much confident in the course that I enrolled, because till then the thought that it is the goal of life would have made a far greater impact in my mindscape. This is what I have learnt from my schooling years and wish to share with everyone. I feel the competition is important, but currently the competition is about something superficial, something tangible. What would be of much more help is if the competition is about bettering oneself internally, strengthening oneself internally, about making principles clear. And that, that would be a competition of oneself with oneself. This is what I have been telling whoever I meet, whoever I know who is yet to experience all this. And even if you have already lost all these crucial years like me, better late than never. Start it today, now. Strive for self betterment, strive for others to be better too...and then let people connect like systems....as the IBM ad goes....when systems connect the world gets smarter.

Thursday, November 12, 2009

I M BAK!!

My thoughts really seem to have gained some inertia....a long time since i wrote something..Anyways, it's been such a strange transition from the college days to the ones in my first job. Having this inertial mind as is, now a days, it's always filled of things about office. Back in college, it used to be about friends, family and studies. Quite literally. Just few weeks back, I realised that this has changed. And the thing to trigger this realisation was the fact that I had forgotten the birthday of my best friend....sad...indeed...But this is not always the case.. weekends is when nostalgia strikes and it strikes badly and yet you can do nothing more than chatting or a mail to dress it superficially.

Monday, June 15, 2009

FAT filesystem

In this post I have tried not to mention a lot of specifics, giving only an overview of the FAT filesystem. I know it's not very well written, but please bear...promise to get better with time.
The FAT file system actually refers to a family of filesystems consisting of the VFAT, FAT12,FAT16,FAT32, the numbers indicating the number of bits used to indicate the cluster number(FAT32 is an exception). The name comes from the logical structure that the file system uses-the File Allocation Table. This filesystem was used by DOS on the first IBM PCs and became a standard for the PCs that followed. The file allocation table provides information about allocation units. Now where did they come up? Well, generally, we think of files to be referred by the number of sectors of size 512 bytes on the disk. However one can imagine the performance issues that will be encountered when keeping track of big files in terms of the sectors. Hence the idea to group sectors into bigger chunks called clusters. The process by which clusters are assigned to files is called allocation. Hence clusters are called allocation units ranging from sizes of 4 to 64 sectors.
Every file must be allocated an integer number of clusters. This means that if a volume uses clusters that contain 8,192 bytes, an 8,000 byte file uses one cluster (8,192 bytes on the disk) but a 9,000 byte file uses two clusters (16,384 bytes on the disk). This is why cluster size is an important consideration in making sure you maximize the efficient use of the disk--larger cluster sizes result in more wasted space because files are less likely to fill up an integer number of clusters. The cluster size is determined primarily by the size of the disk volume after partition: generally speaking, larger volumes use larger cluster sizes.
The structure of a volume that is formatted using FAT filesystem has the structure as shown:

| Partition Boot Sector | FAT 1 | FAT 2(Copy) | Root folder | Other folders and files |


The Partition Boot sector:
The Partition boot sector is the first sector on a logical volume. A logical volume may be a primary partition, or a logical volume within an extended partition or a composite of two or more partitions. This file system boot sector is different from the master boot record(MBR). MBR is the first sector on the whole hard disk, while the partition boot sector is the first sector on a particular partition within the disk. During the boot process, after the POST is performed, the BIOS first finds a boot device, then loads the boot sector of the device. For a hard disk,this is the MBR. The control is passed on to the MBR code. The MBR code helps to load the boot sector of the active primary partition. Upto this point the boot process remains independent of the file system or the operating system used.
Now in case of FAT volumes that have Windows NT installed, the FAT boot sector is responsible for identifying the location of the file "NTLDR" on the volume, loading it into memory, and transferring control to it. Since execution control is passed on to the boot sector, there is need for an executable to be present at its first location. This is generally a JUMP instruction that serves to jump over the following "non-executable" locations. Then comes the OEM id that identifies the operating system that formatted the volume. Following the OEM id, there is a structure known as the BIOS parameter block that provides enough information to the executable part to find the NTLDR. It consists of info like sectors per cluster, sector size, number of FATs(including the multiple copies), root entries etc. On a bootable or non-bootable volume, the BIOS parameter block is followed by execuable code. The last 2 bytes in any boot sector are always 0x55, 0xAA.

The File Allocation Table:
The file allocation table contains the following types of information about each cluster on the volume :

* Unused (0x0000)
* Cluster in use by a file
* Bad cluster (0xFFF7)
* Last cluster in a file (0xFFF8-0xFFFF)

To protect the volume, two copies of the table are kept, in case one becomes damaged. In addition, the file allocation tables must be stored in a fixed location so that the files needed to start the system can be correctly located.
There is no organization to the FAT folder structure, and files are given the first available location on the volume. The starting cluster number is the address of the first cluster used by the file. Each cluster contains a pointer to the next cluster in the file, or an indication (0xFFFF) that this cluster is the end of the file.

The Root Folder:
The root folder contains entries for each file and folder on the root. In the conventional FAT system, the root directory is fixed in place after the 2 FATs. The file system hierarchy is thus anchored at the root directory. Even the size of the root directory has a limit. It can a hold a maximum of 512 entries in case of an hard disk. This is in contrast to the regular directory that can be placed anywhere and can have a variable size. One of the improvements introduced in the FAT32 version of the FAT file system was to remove these restrictions on the root directory. Under FAT32, the root directory is treated much more like a regular directory, and can be relocated and expanded in size like any other. An entry in the root directory contains information like name, attribute, time and date when created, last accessed date, last modified date and time, starting cluster number in the FAT and the file size. A FAT file has four attributes that can be turned on or off by the user-system file, archive file, read-only and hidden.

The root folder is followed by the storage of the other files and folders.

FAT32:
FAT32 is a derivative of the File Allocation Table (FAT) file system that supports drives with over 2GB of storage. Because FAT32 drives can contain more than 65,526 clusters, smaller clusters are used than on large FAT16 drives. This method results in more efficient space allocation on the FAT32 drive. The FAT32 file system includes four bytes per cluster within the file allocation table. However, the high 4 bits of the 32-bit values in the FAT32 file allocation table are reserved and are not part of the cluster number.

Ref: http://www.ntfs.com/fat-systems.htm

Adding Categories to Blogs

In case you are wondering how I have got categories on my blog plage, just read this one. I was dying to write on different topics but the thought of putting technical things juxtaposed to travel ones or others made me think of starting another blog for a different topic. But I thought of googling...and bang...some guru has done it already..http://makemoneywithkassper.blogspot.com/2007/06/how-to-add-categories-to-blogger.html

To explain the process in brief, I will tell you how I did it. First make this html script ready in any text editor. For me the script is:

<h2 class="sidebar-title">Categories</h2>
<u1>
<li><a href="http://e-nertia.blogspot.com/search/label/Introduction">Introduction</a></li>
<li><a href="http://e-nertia.blogspot.com/search/label/Technical">Technical</a></li>
<li><a href="http://e-nertia.blogspot.com/search/label/Travel">Travel</a></li>
</u1>

Replace the "http://........blogspot.com" with your blog homepage link and change the names of the topics as you wish(for me they are Introduction, Technical..). Make sure that the term in the link and the actual label are the same.
Now go to the Layout Page. It must be showing a skeleton of your blog page. The part of it that shows your blog archive and profile must also be having a link "Add a Gadget". Click on the link . In the new window that opens, click on the HTML/Java script option. Paste the HTML script that you have written in the text editor into the content box. No title is required. Save the changes. Done.
Now whenever you are writing a post that belongs to a particular topic, write in the box for the label the exact category that you have made for it. So for this post i wrote the label as Technical.
Happy Organisation!!
The challenge I faced during writing of this blog was printing the HTML script as text to show you the script. I hardly have any idea of HTML scripts. I saw the page sources of sites that have showed examples of HTML scripts. So, as a piece of information, i have replaced all the > with &gt; and < with &lt;