housing in the Boston area

My latest ‘project’ is… buying a house. (Sorry, not much geekery involved here.)

My wife and I have been looking at houses for a few months, so it’s been interesting to compare the typical features of houses here with those where I grew up.

  • Where I come from, normal houses are invariably built of brick (or more precisely, a blockwork inner layer with brick shell, with the air gap in between providing some insulation and protection from damp). Houses here are usually a timber framework with a skin of weather boarding like vinyl siding or wooden shingles, and insulation in between the inner and outer layers. British people tend to arrive here with the view that wooden houses are flimsy and liable to fall down if there’s a strong wind, but I have now learned otherwise.
  • Houses here have basements, which usually house the furnace, water heater and similar, and often the washing machine and dryer. The rest of the space may be used for storage, but we’ve seen lots of houses where part of the basement was turned into extra rooms, like a home office or ‘snug’. Houses I knew in England don’t very often have basements, so the heating system and laundry have to go elsewhere.

The process of buying a house also has some differences here. For a start, we did a lot of looking at houses by going to ‘open houses’, which are usually on weekend afternoons, and have a selling agent at the house letting anyone turn up and wander around. It could be an entertaining way to pass an afternoon if you are a certain sort of person. Some houses had listings saying they wouldn’t do any other viewings until after the first open house. Later we learned that some of the nicer houses would go under offer without ever having an open house (and before we saw the listings come up, in a couple of cases). We did find the house we are buying through an open house though.

Having decided to make an offer we realized we didn’t know how to do it, so found a buyer’s agent to help us. Buyer agents haven’t really caught on in England (apart from ‘Kirsty and Phil’!). Maybe the law doesn’t support them in the same way: I don’t really know. They seem to be quite popular here. We don’t have to pay ours directly, instead she gets a split of the commission that would otherwise all go to the listing agent.

The buying process is a lot more upfront here. Buyers are expected to have ‘pre-approval’ for some mortgage amount before they put in an offer, if they want to be taken seriously – so we did that a while back and can be fairly confident about getting the amount we want. Then even the offer is a written contract with conditions, so there is no ‘gazumping’ [1].

These would have stopped what happened to me when I was selling my flat in Enfield, where I had an offer from someone who then spent a couple of months trying and failing to get a mortgage. Here they would 1. probably not have made an offer without pre-approval and 2. the written offer would include fixed dates by which certain things would have to happen or it would become invalid.

We have reached the stage where we have a executed ‘Purchase and Sale Agreement’, which kind of says we’ve all agreed to sell/buy the house but the mortgage and final legal transfer of title is still to be done. Wish me luck.


1 Gazumping is where a seller has accepted an offer, and the buyer is proceeding with inspections, legal work etc. but another buyer makes a higher offer and the seller takes that instead. This is possible in England because offer acceptance is verbal: there is no binding contract until closing. I suspect it is not happening so much now the market has slowed down.

US vs. UK driving

It is about two months since we bought a car here, so I’m starting to feel slightly more comfortable with the US kind of driving. Whenever I mention learning to drive here to someone, they tend to reply with a comment about driving on the other side of the road. While being on the other side does take some getting used to, my experience is that there are other differences in the way roads are laid out and people drive which are more significant.

Automatic
The first thing I had to deal with was driving an automatic – I always drove manual cars in the UK, where they are the norm. Driving an automatic is much easier, once you get rid of the urge to step on the clutch and put the handbrake on whenever you stop. It also saves me from banging my hand on the door when I would want to change gear (which is what happened the one time I did drive a US manual).

Stop signs and four-way stops
There are very few stop signs in the UK, and nothing like the four-way stop. The idea of coming to a full stop at every junction is frustrating to me – it seems quite inefficient – though I’ve noticed that some drivers here don’t actually stop if they don’t have to.

A ‘four-way stop’ is a junction where there is a stop sign in every direction, i.e. no road has priority. Drivers are expected to stop and let other vehicles go through the junction in the order that they got there. The closest thing I can think of to these in the UK are mini-roundabouts, but they don’t have the same connotation of ‘taking turns’.

Concurrent Numbering
In the US when two routes share the same road, it gets numbered with both route numbers. For example, ‘I-95’ and ‘route 128’ are the same road around the western side of Greater Boston, so it has signs for both.

In the UK this kind of happens, but the road only ever gets signposted with the more major route. An example from where I come from is the A414, which you could follow west from Harlow until it disappears into the A10 near Ware, then reappears near Hertford, then disappears into the A1(M) for a short stretch through Hatfield, then reappears to head towards St. Albans and so on.

This is one case where I think the American way is definitely better, even if it occasionally ends up with a road that apparently goes ‘north’ and ‘south’ at the same time!

Highways
‘Highway’ is a bit of a loose term – there isn’t quite the same distinction as in the UK where ‘motorway’ defines a specific set of road conditions. US ‘interstates’ are generally equivalent to what we’d call ‘motorways’ in the UK, but so are some other major routes.

I am finding the highways scary for a few reasons.

  • The entrance and exit ramps (‘slip roads’ in British) are shorter and more curved than I am used to, so you can have to accelerate or brake hard, or slow down more before you actually reach the exit.
  • In quite a few of the classic ‘cloverleaf’ junctions, the lanes are arranged so that an entry turns into the exit for the other direction in a fairly short space, so you get cars trying to exit crossing over with cars that just entered.
  • There are sometimes exits off the left side of the road instead of the right, and lanes get added and removed on either side. This is particularly noticeable in the downtown Boston stretch of the I-93, which I’m convinced you should never drive through unless you’ve done it before.

Rhythmbox + iPod, part 2

I spent some time reading up a couple of web pages to try to figure out what the support was for reporting to last.fm the tracks that I’ve listened to on my iPod.

Apparently the reading was a bit of a waste of time – all I really needed to do was plug in the iPod and have a look at last.fm.

ignore caps-lock light

This is a bug which is amusing me. My keyboard at home is a unix-style one – it has ‘Ctrl’ where the ‘Caps Lock’ is on a typical PC keyboard. Which meant that I kept pressing ‘Caps Lock’ by mistake on the new keyboard at work.

Fortunately the Gnome Keyboard Preferences screen has a simple dialog to choose different layout options, so I selected ‘Make CapsLock an additional Ctrl’. The key is functioning fine as a Ctrl, but no-one’s told the keyboard – it keeps turning the CapsLock light on and off.

My keyboard at home doesn’t have any lights, so I’m used to not looking at them…

resolution woes

Argh! I had to manually edit a modeline and xorg.conf to get the right screen resolution on this new PC, which could be why Linux isn’t catching on more. I figured some of it out from this page) – basically you look in /var/log/Xorg.0.log and copy out some of the information.

As a memento (i.e. so I don’t lose it) this is the complete config file (including bits I commented out during trying to get it to work):

# xorg.conf (X.Org X Window System server configuration file)
#
# This file was generated by failsafeDexconf, using
# values from the debconf database and some overrides to use vesa mode.
#
# You should use dexconf or another such tool for creating a "real" xorg.conf
# For example:
#   sudo dpkg-reconfigure -phigh xserver-xorg
Section "InputDevice"
	Identifier	"Generic Keyboard"
	Driver		"kbd"
	Option		"XkbRules"	"xorg"
	Option		"XkbModel"	"pc105"
	Option		"XkbLayout"	"us"
EndSection
 
Section "InputDevice"
	Identifier	"Configured Mouse"
	Driver		"vmmouse"
EndSection
 
#Section "Device"
#	Identifier	"Configured Video Device"
#	Boardname	"vesa"
#	Busid		"PCI:7:0:0"
#	Driver		"vesa"
#	Screen	0
#EndSection
 
Section "Device"
        Identifier      "Configured Video Device"
        Option          "VideoOverlay"  "on"
        Option          "OpenGLOverlay" "off"
	Busid		"PCI:7:0:0"
        Driver          "fglrx"
EndSection
 
Section "Device"
        Identifier      "Configured Video Device"
        Option          "VideoOverlay"  "on"
        Option          "OpenGLOverlay" "off"
	Busid		"PCI:7:0:1"
        Driver          "fglrx"
EndSection
 
Section "Monitor"
	Identifier	"Configured Monitor"
	Vendorname	"Dell"
	Modelname	"Dell 3007WFP"
	Horizsync	30.0-100.0
	Vertrefresh	56.0-76.0
  modeline  "800x600@56" 36.0 800 824 896 1024 600 601 603 625 +hsync +vsync
  modeline  "800x600@72" 50.0 800 856 976 1040 600 637 643 666 +hsync +vsync
  modeline  "800x600@75" 49.5 800 816 896 1056 600 601 604 625 +hsync +vsync
  modeline  "800x600@60" 40.0 800 840 968 1056 600 601 605 628 +hsync +vsync
  modeline  "1280x768@60" 80.14 1280 1344 1480 1680 768 769 772 795 -hsync +vsync
  modeline  "1280x720@60" 74.48 1280 1336 1472 1664 720 721 724 746 -hsync +vsync
  modeline  "1280x800@75" 107.21 1280 1360 1496 1712 800 801 804 835 -hsync +vsync
  modeline  "1280x768@75" 102.98 1280 1360 1496 1712 768 769 772 802 -hsync +vsync
  modeline  "1280x800@60" 83.46 1280 1344 1480 1680 800 801 804 828 -hsync +vsync
  modeline  "1440x900@75" 136.49 1440 1536 1688 1936 900 901 904 940 -hsync +vsync
  modeline  "1440x900@60" 106.47 1440 1520 1672 1904 900 901 904 932 -hsync +vsync
  modeline  "1600x1024@60" 136.36 1600 1704 1872 2144 1024 1025 1028 1060 -hsync +vsync
  modeline  "1680x1050@60" 147.14 1680 1784 1968 2256 1050 1051 1054 1087 -hsync +vsync
  modeline  "1680x1050@75" 188.07 1680 1800 1984 2288 1050 1051 1054 1096 -hsync +vsync
  modeline  "1920x1200@75" 246.59 1920 2064 2272 2624 1200 1201 1204 1253 -hsync +vsync
  modeline  "1920x1200@60" 193.16 1920 2048 2256 2592 1200 1201 1204 1242 -hsync +vsync
  modeline  "2560x1600@60" 268.0 2560 2608 2640 2720 1600 1603 1609 1646 -hsync +vsync
	Gamma	1.0
EndSection
Section "Screen"
	Identifier	"Default Screen"
	Device		"Configured Video Device"
	Monitor		"Configured Monitor"
	Defaultdepth	24
	SubSection "Display"
		Depth	24	
#		Modes		"2560x1600@60"	"1920x1200@60"	"1920x1200@75"	"1680x1050@75"	"1680x1050@60"	"1600x1024@60"	"1440x900@60"	"1440x900@75"	"1280x800@60"	"1280x768@75"	"1280x800@75"	"1280x720@60"	"1280x768@60"	"800x600@60"	"800x600@75"	"800x600@72"	"800x600@56"
		Modes	"2560x1600@60"
	EndSubSection
EndSection
 
Section "ServerLayout"
	Identifier	"Default Layout"
  screen 0 "Default Screen" 0 0
EndSection
Section "Module"
	Load		"glx"
	Load		"GLcore"
	Load		"v4l"
EndSection
#Section "device" # 
#	Identifier	"device1"
#	Boardname	"VESA driver (generic)"
#	Busid		"PCI:7:0:1"
#	Driver		"vesa"
#	Screen	0
#EndSection
#Section "screen" # 
#	Identifier	"screen1"
#	Device		"device1"
#	Defaultdepth	24
#	Monitor		"monitor1"
#EndSection
#Section "monitor" # 
#	Identifier	"monitor1"
#	Gamma	1.0
#EndSection
Section "ServerFlags"
EndSection

canvas table overlay

One of the (many) problems with Javascript Canvas is that it doesn’t have a way of rendering text. Some people have tried to work around this using absolute positioned DIVs, but since I want to display tabular data for an app I am working on, I have been trying it by overlaying a table instead.

Here’s a simplified example. (Use ‘View Source’ on that to see the code, it’s a bit big to quote). Again I have only tested this in Firefox 2.0. It definitely won’t work in Internet Explorer.

A couple of comments on the implementation:

  • The ‘container’ DIV needs ‘position: relative’ to establish a positioning context for the things inside it.
  • I use my own functions xs and ys in the Javascript for transforming coordinates, because using the scale function on the canvas results in scaling the line thickness as well, which is awkward.

This kind of works, but has some issues:

  • I don’t have a scale on the y-axis – I need a bit more thought on how to fit that in.
  • Setting parts of a table to be sized by pixel amounts is fragile and may not work correctly. Anything that makes the cell contents larger could result in everything failing to line up.
  • In this example, there is a fixed number of columns, so it is easy to set the size. In my actual application the number of columns varies, so setting column widths is a bit more difficult – I have to ensure that the widths add up to the total size, or the table will try to allocate leftover space using its own algorithm.

canvas gotcha

I was learning to use Javascript Canvas recently, but was almost stumped by a little issue with sizing the thing. In Firefox 2 at least it looks like the canvas size needs to be set on the canvas tag. When I applied a width and height with CSS, it just resulted in the whole canvas being scaled up, with obvious artifacts. (Canvas has a default size of 300 × 150).

screen capture of problem in Firefox 2

Here’s an example page to illustrate the problem. The relevant bits of code look like this:

<script type="text/javascript">
function drawCross(canvas) {
	var ctx = canvas.getContext('2d');
	ctx.lineWidth = 2;
	ctx.strokeStyle = '#900';
	ctx.beginPath();
	ctx.moveTo(0, 0);
	ctx.lineTo(canvas.width, canvas.height);
	ctx.moveTo(0, canvas.height);
	ctx.lineTo(canvas.width, 0);
	ctx.stroke();
}
 
window.onload = function() {
	var c1 = document.getElementById('c1');
	drawCross(c1);
	var c2 = document.getElementById('c2');
	drawCross(c2);
}
</script>
 
<style type="text/css">
canvas {
	border: solid thin black;
}
 
#c1 {
	width: 700px;
	height: 500px;
}
</style>
 
<canvas id="c1">If you can read this, your browser doesn't support &lt;canvas&gt;.</canvas>
 
<canvas id="c2" width="700" height="500">If you can read this, your browser doesn't support &lt;canvas&gt;.</canvas>

some javascript hacking

My Currency Graph page now features javascript rendering of the graph, largely thanks to the excellent flot library. (I’m using the SVN version to get time scale handling).

In theory the page will degrade gracefully to use server-side images if the browser doesn’t support <canvas>, but I don’t have a browser which does javascript without canvas. Disabling javascript makes it degrade a step further to use a form submit.

running to stand still

I spent a busy evening working on updates and fixes to Giggle, with the end result of several hours hacking being… no apparent change as far as the user is concerned. Sigh.

The motivation for this seemingly pointless exercise was when I started trying to run the development version of the system locally and it wouldn’t. There have been some significant changes in libraries which meant it was broken against a ‘current’ Ruby installation. In particular removal of the require_gem method from RubyGems seems to have hit a lot of existing library code.

(It is interesting that the authors of RubyGems and Rails have been happy to remove deprecated methods after a period of a year or so. In the Java world there are methods which have been marked deprecated for ten years or more and are still in the libraries.)

The main problem for Giggle was its use of the Ruby OpenID library. In order to get a version which dealt with the Gem change, I had to upgrade to 2.0.x, which had some API changes compared to the 1.1.x I was using. This meant that the plugin I was using wouldn’t work. I looked around for alternatives, but didn’t see anything I could just drop in. In the end I started with DHH’s Open ID Authentication plugin and fixed it to work with the 2.0.x API, since I didn’t want to change my existing models or the external interface of the controllers.

Since I was doing heavy updates, I also went for Rails 2.0.x, which required a few minor fixes but nothing too significant.

The application is now using several plugins, and I had to learn about config.plugins to be able to get them to load in the right order. Gems On Rails has to load first since it is including OpenID libraries into the load path, and some of the other plugins are depending on those. Then I have my patched up Open ID Authentication, Active Record OpenID Store (from the OpenID library), the handy Annotate Models, Acts As List (previously in Rails core, but removed for version 2.x). Finally Dreamhost, which helps the application run a bit more smoothly on Dreamhost.

Next time I have a spare evening perhaps I can move on to actual bug fixes and enchancements. Wow.

more currency exchange fixes

Yuk, I had to do some more fixing of my currency exchange application.

The small change I mentioned at the end of my last post was not implemented quite right, so I tweaked it.

Then I noticed that when you drag currencies to the color bar, sometimes the graph was showing them in a different color. Part of the problem is that in the graph display code, the colors and currency codes get separated into two arrays, which are then expected to be in the same order – this is due to how the graph library I’m using works. But a method call that was looking up currencies based on their codes was not maintaining the order. I replaced it with an explicit loop.

This application could do with some refactoring…