Google Calendar and Travel Time

A small improvement to Google Calendar would be to allow you to define travel time around an event. For example, the illustration shows that to attend the 6 pm meeting you need to leave by 4:30 as the meeting's location is an hour away and you need to find parking. (The drive home is shorter because you don't need to find parking!)

30G iPod for sale

If you are interested in a very lightly used 5th generation, 30G, white iPod I am selling mine for $165. You can buy it from me or buy it via Amazon.com. SOLD. I have had so much success with Amazon.com Marketplace. I highly recommend it.

ag×a.com

I decided that it would be useful to get the international domain name ag×a.com for Andrew Gilmartin & Associates. (I could not get "ag&a", "ag+a", "ag•a.com", or "ag†a.com" and there is no IDN for "№1".) I used the IDN Conversion Tool to get the ASCII version of the domain name "xn--aga-9ja.com" (this is the Punycode version). With this, I registered the name with GoDaddy. Neither 1and1.com nor Yahoo! support IDN just now. In a day or so I will have the domain forwarded to this blog.

Use the Unicode charts to concoct your own strange international domain name.

Oh, under Windows you need to type ALT-0215 to get the ×.

Model Railways

I attended the Amherst Railway Society Railroad Hobby Show yesterday. I have only gone to this show once before with Geoffrey some ten years ago. And it hasn't changed much. The crowd has gotten grayer but it continues to be a horrifying collection of gimps, geeks and retards. I fitted right in.

I started and ended active model railwaying in the '70s in England. A family friend was an avid railwayer and I caught the bug from him. He was a wonderfully patient and enabling mentor. It is a great hobby for me because of large range of skills it takes to be effective. If you want to model operations you have to design a track layout, rolling stock, and schedules that work together. If you want to model landscapes you have to learn the skills necessary to represent 3D space in miniature. Lots of fine mind and fine motor skills are necessary. I was never at a loss for something to do because on a model railway there is always something to finish or something to start.

For the last year I have been toying with the idea of starting again. When my mentor passed away, now several years ago, he passed along the collection of locomotives and rolling stock he had with him at the end. Every now and then I take them out of the boxes and have a look. Henry, especially, likes to look too. It consists mostly of modern US traction and sock. I am not sure why, near the end, he stopped modeling his beloved Welsh steam railways. So what to do?

There are two kinds of model railwayer or railroader. The first kind likes to create a place in time and so tends to focus more effort on the scenery. You construct buildings with great detail and place them in naturalistic settings. Buildings, people, and trains are aged and weathered. There is litter. This is the kind of modeling I did. The second kind likes to run a railway. They manage a division or, sometimes, the whole railway. Trains move from place to place because there are passengers to carry, live stock to transport, and goods to distribute. There needs to be rules of governance and operations and a timetime to keep. My mentor straddled the two kinds. I have vivid memories of sitting with him at the dinning room table with a blue school notebook, a ruler, and pencile and working out of the distances and timings of station runs. Accompanied by background sounds of locomotives coming from his record player -- an 0-6-0 shunting wagons in the fiddle yard with too much of a head of steam. I also straddle the two. So what to do?

What the show did for me was resolve the question. Do both. I will build an N-gauge layout primarily for operations. N-gauge allows for long runs in a smaller space and long runs are necessary to make the operations work interesting. I will also find a club that has a modular layout that uses a larger gauge -- perhaps On30 gauge -- so that I can create detailed scene. The Narragansett Bay Railway & Navigation Company is a fine example of which.

You had me at "Hello"

I have been been thinking about and exploring Groovy for the last few weeks. I have been looking (forever it seems) to something like the Rails web framework built on Java. There is much to like about Ruby but in the end it is just another imperative, object-oriented language with poor performance, bad threading, libraries "built on a learning curve" [*], and non-existent internationalization. Rails, however, is much more interesting than Ruby. The two parts of Rails that I most like are (1) the "convention over configuration" approach to associating components and attributing behaviors to them and (2) the integrated support for a version's development phases and migrations between versions. These are great boosts to productivity.

However, I am committed to Java for the foreseeable future for most commercial work that I do. (I also work in Perl and PHP but these languages are mostly used for integration projects.) Java offers a wealth of best of breed components of which most are open-source and use the generous LGPL or BSD licenses.

So I was excited to find out about Grails and, as mentioned in an earlier post, after reading Getting Started with Grails I found that it satisfied my need for a Rails work-alike based on Java. My concern was that it was written in Groovy and not directly in Java. And so, I spent the better part of three weeks working my way through Groovy in Action.

Groovy in Action covers the language in detail, its idioms, and its use in several problem domains -- XML, relational databases, GUIs, web application, etc. I am very impressed with Groovy. I was not expecting to be. It is another imperative, object-oriented language with reasonable performance, great threading, best of breed libraries, and end-to-end internationalization. The "You had me at "Hello"" moment came a third of why through the book when the author explores using "builders" to construct XML documents. The code is
def builder = new groovy.xml.MarkupBuilder()
build.number {
description 'Square and factors of 10..15'
for ( i in 10..15 ) {
number( value: i, square: i*i ) {
for ( j in 2..<i ) {
if ( i % j == 0 ) {
factor( value: j )
} } } } }
which outputs
<numbers>
<description>Square and factors of 10..15</description>
<number value='10' square='100'>
<factor value='2' />
<factor value='5' />
</number>
<number value='11' square='121' />
<number value='12' square='144'>
<factor value='2' />
<factor value='3' />
<factor value='4' />
<factor value='6' />
</number>
<number value='13' square='169' />
<number value='14' square='196'>
<factor value='2' />
<factor value='7' />
</number>
<number value='15' square='225'>
<factor value='3' />
<factor value='5' />
</number>
</numbers>
This is a compact and maintainable solution to the XML document creation problem.

The use of builders to construct complex hierarchical structures be they XML documents or Swing GUI interfaces is a very powerful facility. This shows the strength of Groovy's meta programming and its support for closures.

Next week I plan to take a few days off and build a web application with Grails and Groovy. Wish me luck.

[*] I love this phrase. So much of what is open-source is written by people either learning the language, learning the domain, or learning the patterns. The older the language or the library and the greater the likelihood that what you have in hand has had several generations of revision and revisers and is the best that it can be. SmallTalk's libraries are the epitome of this. Most new languages and libraries (Groovy included) are written by folks while they are "on the learning curve." The result is often baroque, idiosyncratic, flaky near the edge cases, etc. ¶ With that said, one of my employability facets is that I build on the learning curve all the time! ¶ I have no idea where I first heard the phrase "building on the learning curve." If you know to whom I can attribute it to please contact me.

Looking for a better web browsing history

I browse the web a lot. I see too much stuff for bookmarking either via client bookmarks or service bookmarks like del.icio.us and Yahoo! and so I need something else. What I have been thinking about is an augmented history. The history is a chronalogical list of sites visted. Each visit can be augmented with tags, notes, page captures (HTML+CSS+JS), and page image captures (PNG image). All of this is browsable and searchable. Does anyone know if there is such a beast? I am willing to use a FireFox extension, a local (desktop) proxy server, or a remote proxy server.

Update: A key notion I did not mention above is that I don't want to "catalog" the site during browsing but do so at some time later in the day. While browsing might not seem like a flow activity it is. Interruptions should be limited. Bookmarking is a secondary activity, at best, but it requires that I keep the activity in mind while browsing and take action at unstructured times.

Dartmouth Comprehensive's 1979 graduating class.

Dartmouth Comprehensive class of 1979I'm the one bottom row third from the right.

Forcing MySQL to use an index

Again, MySQL does stuff I don't expect. For example, the statement select * from T has very poor performance. While, the statement select * from T order by PK, where PK is the primary key, has very good performance. Since I don't care about record order both of these statements are effectively the same. MySQL's explain command says that the first statement does not use an index while the second does. Why on earth would an optimizer not use an index for the first statement? The upshot is that my DML is now scattered with extraneous order by clauses. Sigh.

Barack Obama speaking at Dr. Martin Luther King Jr.'s church in Atlanta

His hope and my hope is why I continue to live in the US.

"No Such Thing As Society"

I was born in England and lived there until 1979 except for the short 1972-1976 period. I have very fond memories of this time: The kids of Mayflower Close, playing in Old Mill woods, exploring the Britannia Royal Naval College, long walks to the castle and long bike rides to Blackpool Sands and the model railway shop in Totnes. Except for the occasional bulling I was unaffected by the deep depression that was going on in society. The memorable moments of this for me where the scenes on TV of strikers clashing with the police, the conflict in Northern Ireland, and the growing political power of the hate groups like the National Front. The only personal memory of the turmoil were the black-outs by striking electrical workers.

Amazon.com reminded me of al this this morning with the notice of the new book No Such Thing As Society. The blurb says
"The human costs of de-industrialisation and globalisation were the great central themes of the documentary photographers active in the North of England in the late 70s and 80s. The social disasters captured in Chris Killip's work extended into the darkly coloured, claustrophobic interiors of DHSS offices photographed by Paul Graham, and Martin Parr's lividly coloured documents of holiday makers in New Brighton, Liverpool."
There are a few photos at the accompanying exhibition . The two that stood out for me were these.



The generational change shown by the suited man and the half-naked woman.



The punk more afraid of his world than frightening to it.

Patent for bagging the parts of a model by the model's sub-assemblies

The FIRST Lego League Robotics Challenge is happening tomorrow (12 Jan 2008). This got me thinking about Lego's Mindstorms, wondering if I should ask Jessica to sell me hers, seeing what the price is on eBay, Googling Lego and Mindstorms stuff, and ending up at LEGO Engineering Symposium hosted at Tuft's this week. This took me to Googling the presenters which took me to patent EP 1 011 834 B1 A method of packaging toy building elements. The patent is for bagging the parts of a model by the model's sub-assemblies. I wonder if you can patent putting on your socks before putting on your shoes? Probably not, but how is this more obvious than bagging parts by sub-assembly?

I hate to pick on Lego because as far as I am concerned their products are some of the greatest on the planet. And, as a proto-information-designer, their assembly manuals (example) are fantastic. Henry and Owen agree.

p.s. MySQL statement performance close to infinity

I have had to restart the MySQL server twice today because it was unable to recover from an unexpected termination of the Java client -- that is, me killing the Java process 'cause the MySQL stuff was taking too long. I have never had to restart PostgreSQL due to a client error. Not on Linux, Solaris, or Windows.

MySQL statement performance close to infinity

I am using MySQL for a client's project. I am not a fan of MySQL -- I much prefer PostgreSQL -- but the client asked that I use it and I am learning a lot in the process. Somethings in MySQL are great, for example the consistent use of SQL for all management, and somethings are bad, for example, performance and performance analysis tools.

For example. I have a table (Q) with 22,000,000 records that a Java process is working through in batches of 200,000. After each batch I need to delete the processed records. Since the Java process can have multiple instances a temporary table (T) is created and initialized with a batch of records and then the Java instance processes the records in the temporary table. At the end of the batch the processed records are removed from the table Q and the temporary table T is dropped. The delete query was

delete from q where id in ( select id from t )

The performance of this statement is close to infinity as far as I can tell. Don't use it. Instead use

delete from q using q, t where q.id = t.id

MySQL's explain does not compare to the PostgreSQL version. So, I don't know why the first statement is so bad and the second so good. It's a mystery. The good news is the client's project can now continue forward.

Juice Analytics's Chart Chooser

If you need to make a chart in Excel or PowerPoint please start with the templates offered by Juice Analytics's Chart Chooser.

What to expect in an initial web site design delivery

I am managing the web site redesign for a RI non-profit. We recently engaged a firm and received their first delivery this week. This was their initial visual design for the site and it consisted of three home page designs. There is not enough substance in this for a customer to respond too. Every customer’s web site has several different kinds of content and I expect to see in an initial presentation a few significant pages. Having these in hand gives me more confidence that the visual design will fit the needs of the site.

There are two broad categories of visual presentation for a web page -- the casing and the content. The casing is the parts of the page that are used consistently across the whole site. The part’s purpose remains the same but the content might vary. For example, mast-head, logo, copyright notice, navigation, primary content, and secondary contents. The content is the body of the page, the primary content, and the reason that the page exists at all. This visual presentation is typically a layout of several paragraphs, pull quotes, side bars, tables, and figures.

Regards the casing, there are three kinds of presentation I would like to see:
  • "Home page."
  • "Section page", for example, the partners’ page.
  • "Detail page", for example, a partner page.
Navigation also needs to be presented as part of the visual design. There is the navigation that appears in the casing and the navigation that appears in the content. There are five kinds of navigation:
  • "Parent to child", for example, partners to partner.
  • "Child to parent", for example, partner to partners.
  • "Peer to peer", for example, partner to partner.
  • "Internal link", for example, partner to an engagement.
  • "External link", for example, to RI Foundation.
If you have pointers to exemplary public examples of this please send them to me. The examples that I have belong to Dynamic Diagrams, Ingenta, and their customers.

The flip table

I want to build this coffee table!

Treehuggers's long page navigation tool

I was at Treehugger today and noticed a novel interface tool. The home page is a list of stories -- much like any blog. Not all stories are interesting to all people. And so, to the right of each story is a vertical bar that when clicked skips the page ahead to the next story. Three bars are outlined in red in the illustration. That the navigation is ever present and in the same relative location makes this a very effective means of both skipping and reviewing a long page of stories.

GameKeeper moving to "the bucket"

The GameKeeper, a game store that for so long has been in the Arcade in downcity Providence, is moving as of Monday, January 14 to the Hope Artiste Village at 1105 Main Street, Suite 2225, in Pawtucket. The GameStore's owner is a great source of information about games for all ages. Henry, Owen, and I have had a great time playing the various games he has recommended.

FireBug and memory consumption

FireBug (for FireFox) makes debugging DHTML both possible and effective. The downside is that over the course of a long debugging session it consumes all the memory on the machine. As the picture shows, FireFox/FireBug is consuming 1.5G of virtual memory but worse 1.1G of actual memory.

Mixing literate programing and wiki markup

I have always liked the ideas around Knuth's Literate Programing and today I came across the LiteratePrograms! site. This site is a MediaWiki instance enhanced to support literate programming using the Noweb syntax. Best of all, one page can be used to generate multiple source files as demonstrated for this Java rot13 implementation.