[ Content | Sidebar ]

over/under

February 16th, 2006

I had a very pleasant lunch yesterday talking with some other people at Sun about XP. At some point, the conversation turned to “superstar programmers” who do their best not to help other people, giving perfunctory answers to questions, sending various signals that they don’t want to be bothered, and even being actively insulting to others. (Perhaps not coincidentally, many of the hypothetical examples in the managing course that I just finished dealt with people like that, too.)

One of the participants mentioned an interesting stat that shows up in hockey: over/under. This is the number of goals scored by your team when you’re on the ice minus the number of goals scored against your team when you’re on the ice. Maybe somebody who scores lots of goals or assists would have that first number be larger than normal, but if his defense is particularly porous, the second number could also be large; over/under weighs both. More interestingly, somebody who hogs the puck might score a lot of goals himself, but his team might still score fewer goals than average while he’s on the ice, hurting the offensive part of his over/under. And I imagine there are hockey players whose contributions are hard for the casual fan to pinpoint but who somehow manage to have a good over/under.

Hard to see how to generate a statistic like that to measure programmers – it’s hard enough to generate any useful statistics to measure programmers – but maybe we can get some sort of inspiration out of it.

mea culpa

February 16th, 2006

I earlier complained that “if Bush walked into a 7-11, pulled out a gun, and killed everybody there, the papers wouldn’t venture an opinion as to whether or not doing so is illegal”; given the events of recent days, it would seem that I was perhaps a bit pessimistic.

Most kind of the executive branch to provide us with evidence on this score.

introducing malvasiabianca.org

February 15th, 2006

As previously threatened, I’ve moved this blog to malvasiabianca.org. (You can also use .com and/or stick a www. in front, if you feel compelled to do so for some reason.)

The old address should redirect to the new one, as should all links within the old one (e.g. the RSS feed). If not, please let me know! Though, if not, you’re probably not reading this. Could the first person reading this please leave a comment letting me know that it works, so I don’t have to worry?

I hope the new address will be permanent. And don’t worry, John, I’m still using a tilde in my home page address…

nel mezzo del cammin di nostra vita

February 15th, 2006

Happy birthday to me. Not that I would describe my current life as a selva oscura; the first half has been pleasant and is ending quite well, and I am optimistic about the second half.

multi-touch

February 13th, 2006

Given my recent DS-sparked interest in touch screens, I suppose I should link to this. I can’t say that I was as impressed as I was expecting to be, though, given that it was linked to by three blogs that I read. Sure, you’d like a touch screen to be able to handle being touched in multiple places at once, but there are more ideas in a random ten-second snippet of the Revolution teaser.

i love egg

February 13th, 2006

Or at least like it; the episodes don’t do much for me, but the Egg Song is quite something.

plain and simple

February 13th, 2006

It will take me a while to process Plain and Simple. (Which I learned about from the bibliography of the XP book, for what that’s worth.) Some facets:

  • There can be well thought-out, stable systems of behavior that are strong enough to exist for quite some time next to American society without being absorbed.
  • It’s not necessarily a good idea to spend time thinking about whether you enjoy what you’re doing at a given moment, or whether it’s drudgery.
  • If your brain is trying to tell you something, listen.
  • Be careful of following a path because it’s what your past experiences and environment have set you up to do.
  • Having good aspects in one area does not mean having good aspects in all areas.

Don’t get me wrong – I’m actually quite happy with the way my life is turning out. But it is good to be reminded of these things.

fit

February 13th, 2006

Acceptance testing has not been one of my fortes. Honestly, it took me a long time to be convinced by it – why isn’t unit testing alone enough? I’ve been caught out enough times by acceptance tests which I put off writing and which, when written, turned up bugs, that now I’m pretty religious about writing them. But, even so, I can’t say that I still completely “get it” (and it may be that those bugs are just places where we didn’t do as good a job of unit testing as we should); in particular, I still have yet to be in a situation where I really need acceptance tests to communicate with the business side.

Anyways, it seems like all the trendy agile people these days are using Fit (usually combined with FitNesse) these days to do their acceptance testing. And there’s a new book out about it, Fit for Developing Software; it’s gotten good reviews, so I gave it a read.

It’s a very good book; extremely readable, and I suspect that it should be readable by business types, not just programmer types. In fact, the entire first half of the book doesn’t talk about programming details at all: it talks about how you can use Fit to enable business people and programmers to clearly communicate their expectations, and the wonders that will result from doing so.

Anyways, what Fit does is let people from the business side (the Customer, as XP would say) write automated tests in as simple and natural a way as possible. The form that tests take is tables (e.g. on a wiki page, though you can use straight HTML or even Excel, if you wish); the tables give inputs and expected outputs, along with enough information to enable programmers to write a bit of glue code (a “fixture”) saying how to interpret those tables. And then you can easily run the tests expressed by those tables; it will color the cells corresponding to expected outputs either green or red, depending on whether or not the tests passed!

There are two basic kinds of tests: ones to test calculations and ones to test events. The former look pretty much as you’d expect: an example might be an application handling rentals, where you would want to calculate the late fees based on the kind of item, the rental period, and the time that the item was returned: you could then have a test with four columns, where the first three columns gave that data, the fourth column gave the expected late fee, and each row was testing a different late scenario. Then the cells in the fourth column would turn either red or green, depending on whether or the code calculates the late fee as expected.

The others are action based. I’ll give an example from the book, using vertical bars to separate cells, since I’m too lazy to figure out how to do tables in HTML:

| fit.ActionFixture |
| start | BuyActions |
| check | total | 00.00 |
| enter | price | 12.00 |
| press | buy |
| check | total | 12.00 |
| enter | price | 100.00 |
| press | buy |
| check | total | 112.00 |

So the ‘check’ rows are ones that test if some output is as expected; the other rows represent actions. (Except for the first two, which set up the fixture.) You can think of this as, say, representing a user entering data into a form on a web page, clicking on buttons, and looking at the updated web page, and you could even write a fixture that did just that; if your application is architected correctly, then the web page details will be abstracted away in a presentation layer, and you can hook your fixture into a somewhat lower layer, making the test faster and more robust to change.

Some things that I found interesting:

  • I’m not used to seeing action-based tests expressed that cleanly; it’s definitely a vision to aspire to.
  • I’m used to thinking that “acceptance test” equals “end-to-end test”. You can use Fit to do that (and probably should, to some extent), but Fit also allows the customer to write tests that get a little closer to the underlying models. Which is good; it makes for faster tests, and for clearer discussion of the underlying issues. In fact, some of the Fit tests look pretty similar to unit tests; I wonder how much unit test / acceptance test duplication turns out to be a problem? As problems go, though, that one is not so bad.
  • I don’t want to go into details here, but I was impressed about how easy it looked to write the fixtures connecting the tests to the underlying code base.

I’m not about to lobby for switching our current project over to Fit, and I’m not sure Fit is the best fit for many of the issues that my team has to face. (We have some hard testing problems that are different from what is front-and-center in most XP environments, I think.) But I’ll definitely keep it in mind in the future, and the reminder that people from the business side might be interested in non-end-to-end tests is a good one.

ready to start using sql

February 12th, 2006

I’ve finished working through the examples in that SQL book, I’ve read a JDBC tutorial, and I’ve downloaded a JDBC connector for MySQL. So I guess I don’t have any excuses not to start getting my fingers dirty. (I first typed “getting my features dirty”; I hope that isn’t a Freudian slip…) Next weekend is a three-day weekend; we’ll see what I get done then.

Good thing, too: just a week after finishing a book with no author, I’m about to start a book with three authors. And I currently can’t handle that, either, and I’d really rather not do so until after the SQL conversion.

JDBC seems straightforward enough. One weird thing: it has yet another iterator variant. This time, rather than leaving accessing, advancing, and querying validity as separate operations (as I prefer), or combining accessing and advancing, as Java traditionally does, it combines querying and advancing. Which is kind of strange – it means that your iterator starts out pointing before the first element, for example – but it does have the advantage that you can go through elements with a simple while loop. Also, it combines the iterator with the object pointed to, which actually isn’t so bad in this case: there’s no real reason to have a separate Result object outside of a ResultSet, I suppose.

choice of url

February 12th, 2006

I’m beginning to feel like my choice of URL for this blog is hopelessly unstylish. Back in the dawn of time, I used my job for e-mail and web pages: carlton@math.stanford.edu, http://math.stanford.edu/~carlton/, and so forth. But when I realized that I was going to be leaving academia, that strategy obviously became inappropriate, so I grabbed bactrian.org. Which is definitely a good move; honestly, everybody should grab a domain name for their own use.

I still stuck with the ~carlton at the end of my home page; the theory was that Liesl or Miranda might want to start using the domain at some point, too. Which is a possibility that I might still want to allow; but there really aren’t a lot of people using URLs with tildes in them these days, are there? I suppose I could just get rid of the tilde, or go to something like http://carlton.bactrian.org/ – after all, the ‘www.’ part isn’t exactly pulling its weight, either. I’ll stick with http://www.bactrian.org/~carlton/ for the time being, though – there’s no compelling reason to change, and honestly I don’t spend enough time on my home page to really care how people access it.

The more blogs I read, though, the stranger the URL for my blog looks. And I did get a separate domain name for my go bibliography; I’m spending more time on this blog than I did on that bibliography, and I’m not planning to stop any time soon; why not get a domain name for it, too?

Here’s the current (tentative) plan; no ETA for carrying it out.

  • The current URL will continue to work, presumably being forwarded to the new one, so there won’t be a need to change RSS feeds to point to the new location.
  • I’ve just bought the domains malviasiabianca.{com,org}. I’m planning to use the latter, with the former redirecting to it.
  • While my fingers still habitually stick www. into a URL, I’m pretty sure that’s going the way of the dodo. Plus, just typing ‘malvasiabianca’ is already enough work. So the official URL for this blog will become http://malvasiabianca.org/.

Another possibility would be to use malvasiabianca.bactrian.org. But that’s way too much typing; and malvasia.bactrian.org sounds wrong to me, too. Besides, domain names are cheap enough. Anyways, I think my mod_rewrite skills should be enough to carry all of this out without too much work.

2003 miranda pictures

February 11th, 2006

I finally got around to putting up some 2003 pictures of Miranda. Which is good; it was embarrassing to have skipped an entire year. Acceptable when one’s child is older, but, up until recently, she looked quite different from year to year. (And yes, I know there aren’t any 2005 pictures up, either; they will appear soon, honest.)

They were taken just outside Boston in the late winter or early Spring; you can see the snow on the ground in one of the pictures. We were visiting Liesl’s grandparents, Miranda’s great-grandparents, who I’m happy to report are still going strong.

perplex city

February 11th, 2006

I’ve never been interested in collectible card games, but Perplex City sounds pretty cool. It probably wouldn’t be wise to indulge, though: if I enjoyed it, I would be tempted to spend rather too much money on it…

meteos

February 11th, 2006

Meteos is a DS puzzle game. It’s in the “objects falling from the sky” genre; a new take, enabled by the touch screen. The goal is to line up three blocks of the same color (either horizontally or vertically); you can do this by moving blocks up and down in a column using the stylus. When you do this, the blocks in question and ones above them launch up; typically they start falling back down, though, so you have to create more lines of blocks out of the chunk of blocks that are falling down. (DS features used: the touch screen is essential to the game, but the second screen isn’t used in any important way.)

Pleasant enough; I probably would have played it more if I hadn’t had a zillion other games to play at the same time. Or if I weren’t constantly reading blogs or writing blog posts. Or if I could pry the DS out of Liesl’s hands. (Not that I blame her: there’s a reason her game of choice is sometimes called Animal Crack. She likes Meteos too, by the way.) I’ll happily bring the game along the next time I’m travelling.

One nice thing: you can use the blocks that you send off into space to buy stuff: new places to play (with slightly different physics models), new items that occasionally appear instead of blocks, and music to listen to. More and more games include stuff like this; honestly, I don’t understand why every game doesn’t have some sort of store aspect to it. It’s easy to do; it gives another way for people to feel like they’re making progress; and if people don’t like it, they can just ignore it…

beatles christmas records

February 11th, 2006

I did not know about these.

responsive blender

February 9th, 2006

I’m really not sure what to say.

ta-da

February 9th, 2006

One of the trendies of new companies is 37 Signals. They have three claims to fame:

  • They’re one of the early AJAX pioneers.
  • They take a delightfully minimalist approach to software design: they figure out a set of core features giving you the value, and make those features as useable as possible.
  • They wrote Ruby on Rails.

So I’d been looking for an excuse to give their stuff a try for a while, but nothing had really clicked. But then I was at work, and thought of a blog post that I wanted to write. But I didn’t want to write it at work, or even log into the blog from work, and I don’t really like e-mailing stuff to my personal account to then be transferred to the “future blog topics” list. Normally, when this happens, I just trust myself to remember the topic, which works well enough, but this time I thought about ways to set up a list which I could easily access from both home and work. Which one of their free products, Ta-da Lists, is suited for, so I decided to give it a try.

And it’s totally charming! All you can do is add entries, check them off, and edit them or move them around; I have yet to use the latter, and the UI for it is correspondingly less intrusive. It requires a minimum of mouse clicks. (Well, almost a minimum: I wish there were a keyboard shortcut to get to the “add new entries” mode, but once you’re in that mode, you don’t have to click on the mouse again to add multiple entries.) It’s nice and responsive, and a single click of the back button (or alt-left-arrow, in my case), and I’m out of it.

Like I said above, I’d been looking for an excuse to try their software; I didn’t honestly think that the result would be superior to other alternatives I could come up with. But I really like it; now I not only have a forthcoming blog topics list, but also a miscellaneous to-do list for stuff that I’m thinking of at home or at work to do in the other place. And I may well add other lists as well. I don’t have any current needs that seem like a fit for any of their more complicated software, but if I did, I wouldn’t hesitate to use it, and to pay money for it. They also seem to be suitably non-possessive of your data, providing XML export of your data and web services APIs to manipulate it.

chocolate mousse

February 9th, 2006

Somebody was just asking about this recipe recently, so here it is. From the excellent Bittersweet; I’ve presented the version that is for standard bittersweet/semisweet chocolate (50 to 62 percent); if you’re using darker chocolate than that and want to know how to modify the recipe, buy the book! I did include some of the other variations; in particular, you can make this non-dairy if you wish.

We had chocolate mousse many times in Paris; in general, I liked their texture a bit better than mine (it was somewhat firmer), but mine tastes better. For which I can take no credit: I think I was just using slightly better quality chocolate than they were. (Scharffen Berger; I do hope their acquisition by Hershey doesn’t spoil them.)

I’m writing this for a double boiler, but you can just float a stainless steel bowl in a wide skillet of simmering water instead. Also, if you’re paranoid about egg yolks, you can heat the egg mixture in a double boiler (or substitute) until they reach 160 degrees. Do this before beating it, but whisk the mixture first.

Works well with whipped cream on top, but even better is the cocoa bean cream from the same cookbook. And if you don’t have ramekins around, just put it in some coffee mugs or something.


Chocolate Mousse, from Bittersweet, by Alice Medrich.

6 ounces bittersweet or semisweet chocolate, chopped
1/4 cup water, coffee, or milk, or 1/2 cup heavy cream
1 1/2 Tbsp brandy, rum, or liquor of choice (optional)
3 large eggs, at room temperature
3 Tbsp water
3 Tbsp sugar
Six to eight 4- to 6-ounce ramekins

Place chocolate and water/coffee/milk/cream in the top of a double boiler over barely simmering water. Stir frequently until the chocolate is nearly melted. Remove from heat and stir until it’s completely melted. Stir in the liquor, if using, and set aside.

Combine the eggs, the 3 Tbsp of water, and the sugar in a bowl; beat with an electric mixer at high speed for 3 to 4 minutes, until the eggs have a texture like softly whipped cream. Fold a quarter of the eggs into the chocolate. Scrape the chocolate mixture back into the remaining egg mixture, and fold just until evenly combined.

Divide the mousse among the ramekins, and chill them for at least one hour, or until set, before serving.

cost-saving measures: oops

February 9th, 2006

It turns out that I misinterpreted the comment about not sending the new iPod to me because of the cost. So they will be happy to send it to me, if I or a coworker can’t pick it up in person; it will just take a little while, because the person who would take care of that is overworked. I was about to say “as am I”, but the truth is, I’m not overworked, I just never have 35 minutes of empty time in my day where I have nothing better to do than to drive to Menlo Park and back.

ipod number two

February 8th, 2006

I would seem to be quite the lucky fellow: I won another iPod at work. They asked us all to bang on the Sun Grid for a little while before its launch, to try to find some bugs; I did my banging, and my name was drawn out of a hat.

About which I feel a little embarrassed; maybe I should give it to one of my coworkers? Then again, most of them didn’t take the time to bang on the grid. And maybe Liesl or Miranda will find a use for it, or maybe my current iPod will die.

I don’t actually have the thing yet, though: I have to go to the Menlo Park office to pick it up. I asked if it could just be sent to me; the response was “no, that would cost money”. Hmm, let’s see: it would take me maybe 35 minutes to drive there and back; putting it in the mail would cost somebody else maybe 5 minutes of time, plus the shipping costs. So it comes out balancing a half-hour of my time versus the shipping costs; I won’t reveal my exact salary here, but I’m pretty sure that, even without accounting for the overhead in employing me (insurance, the space I take up, the services that I use), Sun would come out ahead by just shipping it to me.

Maybe it’s all a plot to figure out which of their engineers have too much time on their hands, so they can fire them. I dunno. I will ask.

It’s a nano of some sort; better to jog with. I’m not sure how much memory it has, but I do have more than 4GB of music stored on my current one, so I’ll have to pick and choose what goes on it. I hope iTunes handles that well; it probably does, since I can’t be the only person who has to deal with this issue. Honestly, I’ll probably just let it sit in a box until we do the computer upgrade. Which may be sooner than we had planned: yesterday, the laptop screen developed a red line towards the left side of the screen. (What would cause that, anyways?) I don’t think the new MacBooks are shipping, though, and I’d rather give them a little while to shake out bugs. I should get around to doing our taxes soon, at least, to make sure we can afford to upgrade…

more mercury news political coverage

February 5th, 2006

A followup to my earlier complaint about the Mercury News’s coverage of the wiretap story: today, they ran an article (the link will go stale in a week, I think) giving a much more nuanced view of the matter, written by somebody (Cass Sunstein) who actually knows something about the topic. Bully for them.