Virtual Method Tables

commentsMay 8, 2011

One of the ingredients of the Concepts of Programming Languages course I teach at TU Delft, is an introduction to the C language. In two lectures I went through the language, emphasizing functions, structs, pointers, and memory management based on Kernighan & Ritchie and a nice piece by Nick Parlante on Pointers and Memory. The students were supposed to be able to understand basics of expressions and control-flow from exposure to Java and Scala.

For the lab assignment, William Cook had given me the idea of expressing dynamic dispatch in a procedural language as a method (no pun intended) to understand both the OO mechanism and appreciate the difference (and hard work) of memory management in C. The idea seemed simple enough, but while understanding the idea conceptually, I had never actually done the exercise myself. Searching the web did not result in a whole lot of information, but for this example. In case anyone needs inspiration for their course, here is the text of the assignment I gave the students in which I explain the code in the example and provide a slightly larger Java program for them to translate. (Corrections of my poor understanding of dynamic dispatch or C are welcome as well.)

(Thanks to pandoc for helping convert LaTeX to Markdown.)

Read more

A Reusable, Fixed-Width Page Index Template

commentsMay 7, 2011

As soon as I announced that I had restored content from my old blog, a response followed about a bug. The page index at the bottom of the page overflowed, as previous applications did not have to deal with more pages than would fit on the breadth of the page. A quick fix was to set the overflow property of the content to hide so that the page index or any other content for that matter would no longer stick out of the content box. But that was not a real fix of course.

High time to generalize the pageIndex definition in the library.

Read more

ICMT 2011 Preliminary Program

commentsMay 3, 2011

The ICMT 2011 preliminary program is now online at researchr using its new conference program feature.

Blog History

commentsMay 1, 2011

While converting my old blog entries I came across a couple of 'starting a new blog' entries. From May 2003 to December 2004 I maintained a micro-blog in a wiki page. On July 19, 2005 I started a blogger.com blog (which is still online). That was followed up on January 1, 2007 by an installation of a Serendipity installation at a hosting provider. When that died in late 2010, I decided to write my own. It took a couple of months before that happened, but on April 7, 2011 I launched my new WebDSL based blog.

For all the hype on the cloud, I'm very happy that I now have full control over data and software.

Importing Legacy Data in a WebDSL Application

commentsApril 30, 2011

WebDSL has been designed for greenfield development. That is, the database schema for an application is derived from the data model defined with entity declarations. There are no provisions for mapping such a data model to a legacy database schema. This has been done consciously so that we have full control over (optimization of) the database schema and do not have to deal with all sorts of corner cases, or schemas that do not map naturally to WebDSL data models. But once in a while, one comes across some legacy data.

My original blog was a PHP Serendipity application that I had running at a hosting service. Since it died because of some changes in the PHP setup I had meant to take out the posts and convert them to my new WebDSL blog application. Today, I bit the bullet and went ahead with the conversion.

Read more
Previous12345678910111213141516...333435Next