A peek at the Google Chromium OS

When I first learned that Google released the source code for their new operating system, I was determined to try it out. Unless you have been living in the Styx for the last year, you must have read that it described by many as a revolution in operating systems (1, 2), and that it will spell the end to Microsoft’s dominance in operating system software (3). So, when Google opened up the source code to developers (4), I decided to download the code, build the operating system, and give it a spin. In particular, I was interested in how fast it would boot because that was one of the most important design considerations.
Continue reading “A peek at the Google Chromium OS”

How to invoke a shell on a directory through Windows Explorer

In the past, there used to be the Microsoft PowerToys for Windows XP which would add in the capability of invoking a Cmd shell on a directory through Windows Explorer.  You could right click on the diretory, and it would have a pop-up item available to do just that.  But, PowerToys is not supported for Vista.  Instead, Microsoft added the capability directly into the OS. … Continue reading How to invoke a shell on a directory through Windows Explorer

Computing the nearest common ancestor

This post is about computing the nearest common ancestor.  It is the result of a month or so of reading papers and implementation.  Although there has been a lot of research into the problem, there are no implementations online of the two main algorithms presented.  Worse, examples in the papers are practically useless.  For example, the Alstrup-Gavoille-Kaplan-Rauhe (AGKR) algorithm was first described in a technical report in August 2001, but it did not contain an example.  In 2002, it was presented at a conference but again it did not contain an example.  Finally, in 2004, it was published in a peer-reviewed journal and contained an example, albeit still incomplete.
Continue reading “Computing the nearest common ancestor”

Bit hacks to compute floor(log2(int))

I wrote a program in the last day to determine the fastest method of seven implementations that I found over the Web that solves the operation “floor(log2(int))”. This operation takes an integer and determines the position of the topmost bit that is one. So, for example floor(log2(0x2)) would be 1, floor(log2(0x52)) would be 6. This operation is important in finding the nearest common ancestor of a tree (more on this in a book that I am writing).
Continue reading “Bit hacks to compute floor(log2(int))”

Netgear router monitor

Feeling bored and looking for some fun, I wrote a Netgear router monitor program. This is what programmers do.  I was interested in seeing what websites were accessed through the router at my home.  While there is a log available via the router, the buffer in a router are notoriously small and data that are only a few minutes old are lost.  This tool fixes that by polling the router every few seconds.  The tool looks for router that is a model WGR614v6, but other Netgear routers may work.  For other routers, I would expect a change to the code to parse the output.
Continue reading “Netgear router monitor”

Tree graph drawing

Finally, I seem to be making some headway into graph drawing.  Over ten years ago, I had a similar problem.  In 1999, I worked for a company that sold a UML modeling tool, but I did not like the way it worked.  I tried to convince management that it needed changes to make it more useful,  but they brushed me off. So, I decided to try to write a UML modeling tool on my own.   Moreover, I wanted to expand my knowledge of computer science to include graph drawing, which is the field in computer science that tries to find two- or three-dimensional representations for graphs.   Unfortunately, I never succeeded in writing the tool at that time. I did not have enough time to learn graph  drawing because of a job change.  I spent several weeks trying to learn the subject,  but I was not able to grasp even the most basic algorithms.
Continue reading “Tree graph drawing”