Thesis

Several weeks ago I successfully defended my MSc thesis. For anyone interested here is the abstract and a PDF version.

The IP Per Process Model: Bringing End-to-end Network Connectivity to Applications

Abstract:

The application of the end-to-end principle in the design of the Internet has been fundamental to its success. One of the most important advantages of the end-to-end principle is that it allows the introduction of new services and protocols into the network without requiring changes to intermediate nodes. This greatly reduces the difficulties associated with developing and deploying new transport layer protocols and network services.

Traditionally network protocol implementations are placed inside the operating system kernel. An alternative to this design found in the computing literature is user-level networking. User-level networking places the protocol implementation and processing inside the application. Among other advantages this design simplifies network stack development and deployment.

This thesis offers a network stack model based on user-level networking which has the primary goal of extending the benefits of the end-to-end principle to applications. This model is referred to as the IP per Process Model. A prototype of this model named Pnet/UNL has been built and evaluated against the Linux network stack. Performance evaluation shows this prototype to compare favorably against the Linux network stack on a 100 Mbps network but the performance gap widens at 1 Gbps.

Thesis in PDF format

Ontario Linux Fest

This past Saturday I spent the day at the Ontario Linux Fest which was held at the Toronto Congress Centre. Despite this being the inaugural year for the event it was very well organized and I think, well attended. The number I heard was approximately 350 attendees. The most enjoyable aspect of the event was that it had a really nice community feel. Everywhere you looked there were groups of people chatting and having a good time. The only negative thing I can say is that many of the presentations were very high level. Given the broad audience this is not necessarily a bad thing but personally I was hoping for more technical detail. I really hope the organizers are able to this again next year because I’ll definitely be there.

I didn’t have a real camera along so the best I can offer is this picture of Jon ‘maddog’ Hall‘s closing presentation taken with my N800.

Picture from the Ontario Linux Fest

Theme update

I have been using the default WordPress 2.3 theme for the last little while. The reason for this is that I wanted to use the new widget functionality in WordPress but my old theme did not support it. The widget feature I wanted most was the pull-down menus for the archive and category lists. These lists were simply getting too long and taking up too much space.

This weekend I got around to modifying my theme to support widgets and also making a large number of other small changes. Nothing huge but the theme is a lot cleaner now.

Unfortunately, due to a couple of WordPress bugs (#4287, #5168) the HTML on this site won’t validate anymore. I find this quite annoying but manually patching WordPress files seems like to much trouble to do after each release. Hopefully these bugs get fixed soon.

Thesis writing using Lyx

When it came time to write my thesis several months ago I decided to use Lyx instead of using LaTeX directly. This is a short tutorial explaining this decision and how it was accomplished.

Lyx is a front-end for LaTeX. It gives you all of the power of LaTeX if you want it but also offers a more traditional word processor like interface. Lyx lets LaTeX handle all of the document layout and gives you the professional look that drives so many people to LaTeX. Lyx also allows you to write without having to see the LaTeX commands or worry about the document layout. The most important thing to realize is that Lyx is not a WYSIWYG editor like MS Word. This is a good thing. If you are used to WYSIWYG editors this can at first seem very strange. I personally find it quite liberating because I have the tendency to obsess over the visual details as I write. In a normal word processor this tendency manifests as losing my train of thought when I stop to format the document. When writing in LaTeX or HTML the same problem occurs when I switch to formating the tags. Lyx does however give you enough feedback about the layout through changing the font of chapter and section titles among other things that the writer does still get some idea of the eventual layout. Lyx also handles cross references and the bibliography in a nice intuitive manor.

Since the Lyx file format is text based it is also very easy to use standard version control software on the document as work progresses. Just as when coding, I view the use of version control software with a document of the size of a thesis as being absolutely essential. The ability to scrap a paragraph and know that you can quickly and easily revert to the old version if necessary frees the writer to attempt larger changes than would otherwise be convenient. It really doesn’t matter what version control system you use with Lyx. Any of Subversion, Mercurial, Bazaar or, if you are on Linux, Git will work great. At completion my thesis Git repository consisted of over three hundred commits.

A short note about figure creation is also in order. I used Inkscape for all of the figures in my thesis. Inkscape is a vector graphics program which uses SVG as the standard file format and is available for Linux, MacOS and Windows. I am not a graphic artist in any way but I found Inkscape easy to use once I figured out how all of the tools work. Making use of the various alignment and transformation tools is especially time saving. Since Lyx cannot make use of native SVG files my solution was to save the figure in SVG format in case I wanted to do future editing and also export an .eps file which Lyx has no trouble consuming.

If you writing a thesis it is quite likely that your university or department has a LaTeX document class available. You should make use of this resource because it will save you the large amount of work involved in getting the document to match the university requirements. Obviously using Lyx would lose some of its appeal if it was impossible to use the provided document class. Fortunately this is not the case.

If you look at your document settings in Lyx you will see a long list of document classes. I used the report class for my thesis. When first attempting to use the LaTeX document class from my university I spent a lot of time trying to get the document class to show up as an option in Lyx. You can find various pointers on how to do this but it never worked well for me and it was too much trouble. Fortunately I found a simpler solution. Rather than get Lyx to use the document class I wrote the document using the standard report class. When the document was complete I exported the document from Lyx to LaTeX (pdflatex). Once I had the LaTeX file it was simple to edit it and replace the document class name with the one provided by the University and add the additional LaTeX commands which were required. This task was probably simplified by the fact that the provided document class inherited from the standard report class. Modifying the LaTeX file may seem like a lot of work, especially having to make the changes manually again each time the document requires revision. Fortunately it is a simple matter to maintain a patch file with the necessary changes and apply it to the exported LaTeX file after revisions have been made. Note that there is little point exporting the document until it is very near completion.

The rest of this tutorial is specific to the UWO Computer Science document class. I hope this information will be useful to others as well. If you don’t already have a copy of the UWO CS Latex template I have made a local copy available.

After exporting your Lyx document to LaTeX (pdflatex) open up the file in an editor. In these examples the exported file is named thesis.tex. The first thing you need to do is replace

 \documentclass[12pt,english]{report}

with

 \documentclass[12pt,english]{uwo-thesis}

The rest of the modifications basically involve adding new LaTeX commands to the file. Since it is the way I did things, I am going to assume that within Lyx the beginning of your document contains the following in this order: title, abstract, table of contents, list of tables and list of figures. This is the order that the UWO thesis style guide requires.

Immediately after the \title LaTeX command add lines similar to the following (obviously filling in the values for your thesis).

\spinetitle{a shorter title}
\firstname{Dan L.}
\lastname{Siemon}
\degreeaward{Master of Science}
\university{University of Western Ontario}
\address{London, Ontario}
\copyyear{\the\year}
\supervisor{your supervisor}
\examinerA{first examiner}
\examinerB{second examiner}
\examinerC{third examiner}
\dedication{a dedication if you want}

These LaTeX commands are used to create the certificate that goes at the front of the completed thesis.

Next locate the \maketitle command in the file. Immediately after this command and before the \begin{abstract} add the following.

\makecertificate
\begin{frontmatter}

Following the close of the abstract section with \end{abstract} command you can add an acknowledgment section if you desire.

\begin{acknowledgements}
The past and present residents of MC240.
\end{acknowledgements}

Now you need to close the frontmatter section. This is accomplished by adding the following text after the \listoffigures command.

\end{frontmatter}

This leaves just one more requirement, the Vita which must be at the end of the thesis. I handled this requirement by creating a short LaTeX document called vita.tex and including it at the end of the file. Place the following immediately before the \end{document} command.

\include{vita}

All of these changes may seem like a lot of work. Fortunately this can be automated by creating a patch file. To create a patch file both the unmodified and modified files are required. First make a copy of your newly modified file. Then re-export the file from Lyx to obtain the unmodified version.

cp thesis.tex thesis.tex.mod

Export from Lyx again.

diff -u thesis.tex.mod thesis.tex > thesis.patch

Reapplying this patch after exporting from Lyx should be as simple as:

patch < thesis.patch

If you make large changes to the document the patch may fail to apply cleanly. In this case fix the file manually and re-create the patch file for future use.

Thanks to Andrew for a couple of the ideas presented here.

The Social Graph

I’ve been thinking about the social graph (though not by that name) for a little while now. It seems I am not the only one. My interest in this area comes from my dislike of walled gardens such as Facebook (which I have still been able to avoid joining despite the peer pressure).

Here are a few interesting links.

Thoughts on the Social Graph
Social Network Fatigue and the Missing Web 2.0 Address Book
Opening up the Social Network Graph
Using Open Standards to Free the Social Graph

Pinker on violence

Yesterday Andrew posted an entry about a TED presentation called A brief history of violence by Steven Pinker. Take a look at his post and watch the video. The video is only 20 minutes long. In short, the presentation offers data that refutes the idea that the human race was more peaceful in the past.

At around the 9:50 mark Pinker mentions that people link the ease by which a specific incident of something can be recalled with the perceived probability that it will occur. For many years I have avoided watching local newscasts for exactly this reason. When half of the newscast talks about car crashes and the other half talks about bad things happening at local schools one can’t help but think that car travel is very dangerous and that there are ‘bad’ people everywhere.

New keyboard (or bye bye RSI)

I spend a lot of time in front of a keyboard. It is one the negatives that come along with having your work and play intersect. As a result I have had some small RSI problems over the years. It has never gotten to the debilitating stage but it is has definitely caused me to go watch TV when I’d rather be working on the computer (I hate watching TV).

In an attempt to reduce the RSI problems I have tried a quite a few different keyboards. For many years I used my trusty MS Natural Keyboard. This is an original MS full size natural. I bought it as part of the first computer I paid for by myself, sometime around 1995. It still works perfectly. The layout is better than most keyboards but the keys are pretty stiff, this may be age related.

MS Natural Keyboard

I also have an really nice keyboard that came with an IBM iSeries server. It is a traditionally shaped keyboard but the keys are really nice. Unfortunately, using this keyboard didn’t do much good (or bad) for my RSI problems.

IBM Keyboard

I have also tried a small laptop size keyboard. This was probably the worst of the many keyboards I have tried to use. I don’t know what I was thinking.

Laptop-like keyboard

There are many more less memorable keyboards that I have tried which were also of little use in reducing the RSI pain.
Not only have I tried many different keyboards I have tried adding a keyboard tray with an attached mouse tray to get the proper posture and positioning. I think this helped but it did not solve the problem.

During the time I have been experimenting with other keyboards I knew about Kinesis keyboards. There are probably very few computer geeks who haven’t ooogled over a Kinesis contoured keyboard at some point. These keyboards look cool and are designed to be ergonomic. Unfortunately, they also cost a small fortune.

Kinesis keyboard picture 2

Kenesis keyboard picture 1

A few months ago, with the inspiration of my friend Andrew, I finally broke down and bought a Kinesis contoured keyboard. Honestly, this is the best ~$350 I have ever spent. After using this keyboard for a few months most of my day-to-day RSI symptoms are gone. It only took a few days to get reasonably fast at typing on the Kinesis but there are still moments when my fingers instinctively go to the wrong spot (especially after a day at work with a normal keyboard). The fact that the Kinesis lacks a keypad is also a nice plus; this keyboard actually sits centered in the keyboard tray and if you use it on a desk surface it doesn’t force your mouse to be far off to the right. The feel of the keys is also the best of any keyboard I have tried. I am reasonably confident that the combination of this keyboard and the keyboard tray is responsible for the improvement in my RSI symptoms because it only takes a few hours at a normal keyboard before the symptoms to return.

So why am I writing this little story? There is a lesson here. For several years I was too cheap to buy the proper equipment that may have helped my RSI problems and I paid for it a little each day with unnecessary pain. Don’t be like me. If you have RSI problems get yourself a keyboard designed for your hands not ease of manufacture.

I’m probably buying a second one to have at work.