Scratch and programming for kids

Scratch is another graphical programming language oriented towards children. It is built in Java and has a programming environment and a runtime environment. The runtime environment is only needed if you want to share your (read-only) program with others via the web. The programming environment is a little too modal and other ways ridged for my tastes -- that is, with my "kid" hat on. When you watch kids play they clearly have a center and a periphery. Their tools need to model this.

RESTful search

I am working on a small project to build a web application using current best-practices and tools. To start, I am working on the RESTful interface -- the application's API. What I did not understand was how to do a RESTful search. Searching is not a GET because there is no one resource or all resources returned. It is not a POST because nothing is being updated. What I discovered looking around the web was that when using REST you are not limited to the gang-of-four HTTP methods -- GET, PUT, POST, and DELETE -- but instead are open to a whole other set of methods [a][b]. There is a SEARCH method at IETF in early draft state. This is good enough for my needs.

I will use Java for this project. I know how to implement the interface using the Servlet framework but I wanted to use a framework designed for RESTful interaction. I found the Restlet framework and really like what I see so far. (I have not coded anything yet and so don't know how practical it is.) There is also JSR 311, "JAX-RS: The Java API for RESTful Web Services", which is an annotation-oriented design. I like the Restlet's class-oriented design much better.

Paper craft and architectural and landscape projects

There seems to have been a resurgence in paper craft models. I think part of the reason is the ability of tools like Pepakura Designer to take a 3D model and determine the parts needed and layout them out on pages. (I would love to know how this is done -- at a moderate level of detail.) It occurred to me that you might be able to use this with Google's SketchUp to create models of architectural and landscape projects. Perhaps the resulting paper craft models are not of a quality suitable for client presentation but it sure would be fun.

Damn Small Linux

I have been thinking about teaching my kids how to use eToys. To do this, it would be best if they each had their own box and so I have been looking for cheap laptops. I found two Thinkpad T20's for $100 on Craigslist in various states of repair and bought them. I have worked on T20's in the past and so I know their idiosyncrasies well.

One of the idiosyncrasies is getting X Windows to work. I first installed Ubuntu and everything worked but at a glacial pace. The T20 only has a 700Mhz CPU after all. But even at 700Mhz X Windows should fly. The real problems are 1) Gnome is a system hog and 2) this machine only has 128Mb. (It still feels weird that 128Mb is not much RAM. I remember very well Carnegie Mellon University's 3M machines which were to have 1 million bytes of memory, 1 million pixels on screen, and 1 million instructions per second!) So I installed Xubuntu. And this time the pace was faster but only by a smidge. And boot time was still many minutes in duration. Application switching could take a minute.

Searching for a smaller Linux distribution I came across Damn Small Linux and installed that. Well, installed is the wrong word as I first ran it from the LiveCD. It booted the T20 within seconds. X worked. Internet worked. Everything worked. And worked fast. This was a truly usable system on a T20.

The down side, and this is something I am still fighting with, is that it is not a true Debian distribution. It has its own packaging and distribution system. DSL's author had to make significant changes to the Debian core to make a workable distribution that fit on a business-card CD. DSL is intended to be a system for recovering a broken box. I understand this and the understand the impact the changes would have on DSL's ability to use existing Debian packages. However, the impact is only for a few classes of packages. Most POSIX and GTK applications will run fine. I wish the time and effort put into building the packaging system had been used to allow for the installation of standard Debian packages instead.

Before I wrestle too much longer with DSL I need to get Squeak installed. Wish me luck.

Another tag cloud


Leigh Dodds had a link to the fun Wordle tag cloud. Here is mine from del.icio.us. What is striking is the large number of links I have tagged as "to-read". Too many interests for the time I have.

Yard Sale, June 21

Yard Sale
Saturday, June 21
8 AM to 1 PM

574 Saugatucket Rd
Peace Dale, RI
Help us clear out Chris's art stutio and my kids's rooms! Where again? Here!.

Roof woods

Roof woodsWhen you spend many weekends gardening -- new beds to dig, old ones to weed, plants to move, plants to add, grass to mow, etc -- sometimes you simply forget to look up every once in a while. Clearly, I need to clean out the gutters.

Groceries transportation

Groceries transportationNo excuse now for not riding the bike the few miles into town to buy groceries and small gadgets.

Log when your scripts start and end

When you write scripts that are the controllers for processing data make sure to log when they start and finish the work. It is so frustrating to debug an erroneous processing result -- often days or weeks later -- and not have any indication when the process actually started and finished. A missing finished log entry is the first indication that the processing ended abruptly.

So, in bash shell script use
#!/bin/bash
. logger.sh
info starting
....
info finished
#END
where logger.sh is somewhere in your path and has the content
#!/bin/bash

# logger.sh
#
# info, warning, error and fatal functions to display timestamped 
# messages to stderr. Use the infof, warningf, errorf and fatalf 
# functions to format the message using printf. A newline is 
# automatically added and should not be included in your printf 
# format string.

function info {
        log INFO $*
}

function infof {
        logf INFO $*
}

function warning {
        log WARNING $*
}

function warningf {
        logf WARNING $*
}

function error {
        log ERROR $*
}

function errorf {
        logf ERROR $*
}

function fatal {
        log FATAL $*
        exit 1;
}

function fatalf {
        logf FATAL $*
        exit 1;
}

function log {
        echo $(date +'%F %T') $* 1>&2
}

function logf {
        level=$1
        format=$2
        shift 2
        printf "$(date +'%F %T') $level $format\n" $* 1>&2
}

# END
Most other languages have extensive logging support.

Hardly seems worth posting such an obvious piece of advice, but look around into your scripts -- as I did mine -- and notice how few provide this data.

Remove shoes, cast vote

RI's Governor Carcieri has proposed that a photo-id be required to vote in RI. After all, (to paraphrase) "you need an id in order to fly". Perhaps we should also be expected to remove our shoes when voting too. It is hard to understand how our politicians continue to push for mechanisms to disenfranchise citizens.

How the States Got Their Shapes

I listened to some of How the States Got Their Shapes on the drive today. I was fascinated by the history of West Virginia -- a state that exists because of Civil War opportunism. How physical borders are negotiated is a great segue into how other kinds of borders are negotiated in families, sects, corporations, etc. Great source of projects for a high school, eg "Why is South Kingstown the shape it is?" or "Why does the Chariho school district exist?".

Oh no!

Two 3G iPhones + AT&T family plan + one mini Mac + development kit + reduced billable hours learning, developing & playing = one expensive Q3!

Goalkeeping & HTML Canvas

Henry is the goalkeeper for his soccer team. I was practicing with him the other day and trying to explain how to protect the goal by forcing the offensive player to have only one side of the goal to play the ball to and then only at a very acute angle. Henry is 8 and so none of this really sank in. Once again, I wished I had a pair of magic lens so that he and I could literally see the angles I was taking about overlaided on the playing field.

I was retelling this story to Geoffrey and I realized this was a small enough visualization project to perform my first canvas experiment. And here it is

Source

Update: Sometimes I am so old-school. I should be referencing augmented reality.

Sweet Cakes has a web site

The sign said "Cake is the new flowers". I do like both but tend to go to Sweet Cakes far more often than to Rose Shack.

Seeing code working

These internal views of how the browser renders an HTML page are fantastic. Here is how the browser sees mozilla.org's home page



The OLPC laptop has the "see code" button. What it really needs is "see code working" button.

Bookmarklet for world clock meeting planner

A bookmarklet for displaying today's world clock meeting planner times in CA+RI+UK.

Keep only the account name and password digests

It occurred to me the other day that both the account name and the account password should be recorded in the database as MD5 digests. There is really no reason to keep a clear text version of either of these datum.

Web experience needs the equivalent of Screen's workspace persistence

My web experience needs the equivalent of workspace persistence found in Screen. I am too often working with old web applications that process data as you wait. You submit the form and the application responds with "Please wait." And I do. And, when there is a lot of data to process, the wait can be for hours. During this wait nothing untoward can happen to the network connection or the browser. If something untoward does happen then the processing has to begin all over again.

What the Screen web equivalent would allow me to do is to browse the web as I normally would. When I detach from the internet, the pages I have displayed or the ones that are in the process of displaying would be available again when I re-attach to the internet. It is important to remember that these pages are the pages retrieved when I was previously attached to the internet. They are not pages obtained by re-requesting them. Doing so would only begin all over again the long data processing.

With workspace persistence, I could start the data processing using the old web application and not have the worry about a network hiccup or browser crash losing my work.

A road to solving this problem would be an augmented proxy server.

Enriching the search query

Most successful -- that is, used! -- online search tools have a remarkably simple query interface. The single input field is where your query interface needs to be. The wealth of your data is made available not by complicating the user's interface, but instead by automatically and intelligently enriching the query. Enriching the query includes the following, in no particular order,

  • term extraction -- words, acronyms, dates, numbers, email addresses, etc
  • term ranking -- some words are more important than others.
  • hyphenated terms -- query for both with an without hyphens
  • accented terms -- query for all extant variations of the term in the data (in the US, for example, accented characters are rarely used and so American's tend to drop the diacritics).
  • term spelling variants -- "color" and "colour", etc
  • term stemming and other transformations -- soundex
  • numbers and number names -- "101" is also "one hundred and one"
  • dates and times and date and time expressions -- "tomorrow" is "Thursday, 8 May 2008"
  • social relationships between authors -- Smith and Jones are frequently co-authors and so a search for Smith should include a search for Jones (within reason)
  • reference relationships between works -- the original linking
  • professional vocabularies -- nurses and doctors don't use the same terms for everything
  • lay vocabularies -- "cardiac arrest" is "heart attack"
  • spelling correction of terms -- only use the extant terms
  • broadening and narrowing of terms -- you say "tomato" and I say "solanum lycopersicum" or "vegetable".
  • ...
As always, do as much on behalf of the user as you can before asking them for more data.

David Coté and the South Kingstown Republican party's ineptitude

David Coté, of the South Kingstown Republican party, is once again in the local news. This time, he is not calling for the removal of several million dollars from the local school budget in his and the republican party's utterly inept effort to force competitive bidding on health care insurance for teachers, nor for successfully agitating for a referendum for a $500,000 cut, but instead recommending that the town would be better off giving the $10,000 budgeted to pay for the referendum to the Chamber of Commerce. Why would the town management, that has successfully held low the municipal cost increases each year to counter the ever increasing burden of the costs associated with federal and state mandated but unfunded educational programs want to give $10,000 to the Chamber of Commerce? The same Chamber of Commerce that recently spent almost $700,000 on new office space? The same Chamber of Commerce that is supported by the 700 businesses it promotes. David Cote should not be on page one of the paper, but in the funnies.

Where is sane political debate in this town? Clearly, not from the republicans. And clearly not from the democrates who continue to sit mute on the council.