Just in case anybody needs to know this: one way to see all but the first line of a file is to run the command sed '1 d' on it.
(I was sure there was a good Unix way to do this, but it took me about 20 minutes to find it.)
March 4th, 2006
Just in case anybody needs to know this: one way to see all but the first line of a file is to run the command sed '1 d' on it.
(I was sure there was a good Unix way to do this, but it took me about 20 minutes to find it.)
March 3rd, 2006
You’ve (or at least I’ve) got to love this:
Among those who ate the most chocolate–averaging more than four grams a day–average systolic and diastolic blood pressure was 3.7 and 2.1 millimeters of mercury lower than their chocolate-spurning peers. This result did not hold true for other sweet foods nor did it vary among men who also smoked, were inactive or consumed a lot of alcohol. And, despite being strongly associated with greater intake of calories, chocolate lowered the overall risk of cardiovascular or any other disease by as much as 50 percent.
I was a little dubious, though: the high consumption group only averaged four grams a day? A bit of googling turned this article up:
The 4.18g/d intake of cocoa in the highest tertile is equal to 10 g of dark chocolate a day and about a 10th the dose used in most intervention studies, Buijsse said. This suggests that a small amount of cocoa may lower blood pressure.
So that 4g is cocoa powder, and even dark chocolate (by which they mean what exactly – 50%?) contains a fair amount of other stuff. Still, 10g of chocolate is a really low amount: most evenings, for example, we split a bar of good chocolate three ways; that gives us each an ounce or so of chocolate, which is a good deal more than 10g. So I guess I can’t really use this as an excuse to further increase my chocolate consumption; but I’m not about to stop eating the stuff, either.
I would appreciate it if researchers could next turn to proving that milk fat is good for you. I suggest cheese as a place to start – honestly, does it sound all that implausible that some kinds of cheese might have mysterious health benefits? I suppose ice cream would be a bit of a stretch, though…
March 3rd, 2006
I finally got around to knocking off the oldest saved post in my RSS reader today; only 79 more to go. If that were my mail inbox, that number would be just fine, but I kind of doubt that I’m going to take the time to seriously think about (and blog about) what’s in those posts. So: time to wield the axe a bit, I think.
Having said that, I’m glad that I finally got around to listening to the webinars mentioned in that blog post: good to firm up my understanding of what product managers, project managers, and program managers do.
March 3rd, 2006
One of the most pleasant surprises about this townhouse was that we discovered, a few months after moving in, that the trees in between the houses are flowering plums. It’s really beatiful for a week or so every year; like having our own cherry blossom festival.
I was hoping to share some pictures with my new camera, but this year has been a bit of a downer. I’m not sure exactly what the cause is, but it probably has something to do with the weather – two weeks ago, we had record-setting highs (the paper said mid seventies, but I think it hit eighty one day), last week was kind of chilly, and this week had quite a bit of rain. So the trees probably didn’t quite know what to think; two of them bloomed a week and a half ago, and the rest have finally decided to send out some number of blossoms, but they’re not putting much conviction behind it.
March 3rd, 2006
When I got home this evening, I noticed that one of the dogs had pooped on the carpet. Which sometimes happens; they’re wonderful in many, many ways, but housebreaking is not their forte. Anyways, I took them out, and the phone was ringing as I got back in, so I ran to answer it. Once I finished that (vacation plans firming up, yay), I surveyed the damage; it turns out that they basically had the trots all over the downstairs carpet. Sigh; good thing that we were planning to do a round of steam cleaning this weekend.
So I started cleaning this up. Then I noticed little circles of poop in the kitchen. A bit of inspection revealed that, in fact, I’d tracked it in there; I guess I stepped in something while running to the phone. Oops. I hope I got rid of all of the manifestations; not sure.
At some point during this, I looked around in the kitchen, and noticed that the ant trails had increased. For whatever reason, we’ve had a lot of ants in our kitchen the last half-week or so; maybe the wet weather is driving them inside? They’d mostly been walking over the cutting board, which I really don’t understand – I suppose there must be some food ground in there (the turmeric stains suggest as much), but really, not a lot. At some point today, though, they discovered the Honey Nut Cheerios, which were very much to their tastes. The rest of the cereal cabinet seems okay for now, though. (And we learned long ago to store the high-risk stuff in ziplocs.)
At about this time, Liesl came home; with her help, it didn’t take too long to get the ant problem dealt with. And, honestly, the whole thing wasn’t that bad; one side effect of having a kid is that you get pretty blase about poop – it’s just a fact of nature. I’m glad this sort of thing doesn’t happen every day, though, and it’s just as well that we’re going out with friends on Saturday instead of inviting them all over for dinner – they might think twice about eating our food if they saw the number of ants in the kitchen.
Anyways, I hope that I have brightened all of your weekends!
March 2nd, 2006
A few months ago, I finally started appreciating the Customer role in XP: it made a real difference to us when we stopped doing our iteration planning ourselves (with advice from others, to be sure), and started having somebody else pick the stories for each release. (We still plan the work in our weekly iterations ourselves, within the framework given by the monthly release plan; this doesn’t seem to me to be a particular problem right now, thought it’s something to think about in the future.)
But that’s only half the work that the Customer is supposed to do: the other half of the work is that the Customer is supposed to write the acceptance tests. (With the help of a Tester, to be sure.)
We’re not doing that; I’m starting to realize how it’s hurting us. A week or two ago, for example, I started discussing the user interface for a feature we were implementing with somebody who is more customer-facing; it turned out that his ideas for how it would best be designed were considerably different from our ideas for that. I’m really glad we had that conversation; it would have been nice if similar conversations had happened at other times recently. As it is, I’m worried that there are other features that I consider “done” that will magically flip to being un-done when somebody else looks at them and discovers that they’re not implemented the way they should be. Or, more frighteningly, the features make it out to the wild as-is, and real customers don’t like them because of things that we could have fixed months ago, if only we’d communicated better.
And it’s not just that I privately consider them done: I’m being asked to sign off on features as being done without feeling that I really know how other people are interpreting my sign-off. Which is an uneasy situation to be in: part of my job is to take responsibility for certain things, and I’d like to know exactly what other people see me as taking responsibility for.
Of course, it’s not like I’m without options here: I should start pushing back more on these issues. It will be a bit delicate figuring out the most productive way to do so – our current resources aren’t going to magically change, and there’s nobody who’s a perfect fit for the Customer role in our current setup. Hopefully we can start making incremental improvements. And it helps a lot that we don’t have much of a culture of blame: it’s a lot easier to be courageus in situations like that.
March 1st, 2006
I’ve ordered the new computers and the network equipment. The Ultra 20 and the network stuff will arrive in a week or so; the Mac will take more like four weeks. Which is just as well – it will give me time to transition my home directory and other assorted data away from this computer and onto the Ultra 20, without being tempted to play with the Mac at the same time. And I still need to shop for some of the hardware in person – I didn’t see any reason to order a keyboard, mouse, and monitor online. (But where to buy them, given my antipathy for Fry’s? Best Buy? Circuit City? Some place smaller?)
There are still a few things to do; the biggest is that I should learn how Macs work these days, since it’s been most of a decade since I used them regularly. So: what do I need to learn about?
February 27th, 2006
My current network plan is as follows:
I’ll think about it a few more days; I don’t want to order anything until next month, and it will take a week or so for the Ultra 20 to arrive.
February 26th, 2006
Hey, this JDBC stuff really works!
I could really do without checked exceptions, though: every single time I call a JDBC function, I have to add four lines of try/catch wrapper code, because an SQLException could be thrown at any time. Sigh. And I can’t think of a good way to avoid that, given that I want to wrap the JDBC code in an abstraction layer as quickly as possible, so I need to translate exception types; occasionally, a try block covers multiple statements, but not very often.
I’m still not writing all the data out – for now, all I’m writing is the table mapping entity numbers to entity types. I was going to first write the code (using my abstraction layer, not the real JDBC stuff) that would add all the data for each entity to the appropriate table, but I realized that, if I started there, then it would be too long before I could verify my work via acceptance tests. (And, in particular, I’d be able to put off using JDBC for too long.) So I changed my focus to getting to JDBC calls verified with acceptance tests as quickly as possible; that was a good move, and I’m honestly amazed at how easy it was to get a passing acceptance test. It should be smooth sailing from here on out – the rest of the code shouldn’t involve any new tricks and will be easily unit-testable. (Though I will throw in acceptance tests as well, of course, being a good boy.)
February 25th, 2006
As a manager who is drawn to XP, one question that reading First, Break All the Rules raises is: how compatible are agile methods with the book’s recommendations? Let’s start by going through the questions.
1. Do I know what is expected of me at work?
This is a strength of XP (and other agile methods): work is broken down in to chunks, is explicitly prioritized, and there’s a clear mechanism for resolving questions (ask the Customer).
2. Do I have the materials and equipment I need to do my work right?
XP talks about this to some extent; Scrum highlights it.
3. At work, do I have the opportunity to do what I do best every day?
Hard to say about this one: if what you do best is a core part of XP, then yes, otherwise no.
4. In the last seven days, have I received recognition or praise for doing good work?
XP seems neutral on this one, too.
5. Does my supervisor, or someone at work, seem to care about me as a person?
XP is probably positive here: you spend quite a bit of time talking to other people, which increases the chance that they’ll care about you.
6. Is there someone at work who encourages my development?
XP is probably slightly positive here: everybody works on everything, which should tend to encourage development.
7. At work, do my opinions seem to count?
XP should do well here: any two people can modify any piece of code, and retrospectives are a frequent practice. Of course, the flip side is that other people’s opinions count, too…
8. Does the mission/purpose of my company make me feel my job is important?
XP tries hard to make sure that people are working on high business value stories at all times.
9. Are my co-workers committed to doing quality work?
XP is very focused on quality.
10. Do I have a best friend at work?
Everybody works (or at least should work) with everybody, for better or for worse; it should give scope for friendships to develop. (But you don’t want them to be too exclusive.)
11. In the last six months, has someone at work talked to me about my progress?
XP is probably neutral here.
12. This last year, have I had opportunities at work to learn and grow?
My answer here is the same as to question 6.
Okay, that’s not too bad; XP seems no worse than neutral on any question, and is positive on several of them. Which is, to be sure, nothing to crow about – most methodologies are going to avoid actively screwing these things up, and will focus on a couple of them. Still, it’s a start.
But what about the rest of the book? They recommend that, after specifying the desired outcome, a manager should give employees as much free leeway as possible in the methods that they use to accomplish their tasks; the expectation is that different employees will take different routes based on their different talents. And here, it’s hard to say that XP does so well: it places quite tight constraints on how you get your work done (TDD, pair programming, constant refactoring, collective code ownership, …).
The situation isn’t completely bleak, to be sure. For one thing, an XP has several distinct roles: the programmers, the Customer, the Coach, and even testers (who help the Customer translate needs into acceptance tests). So there’s some room to place people with different talents into different roles. And for another thing, XP doesn’t expect people to be “plug compatible programming units”; in fact, one of the benefits of pairing is that it acknowledges that different people have different experiences and strengths, and allows those different strengths to work together to effectively tackle a problem.
But it’s definitely the case that some people have talents that lend themselves more to XP’s demands, and other people don’t. And, given the range of strictures that XP imposes, a single person is unlikely to be talented in all the appropriate areas. I, for example, took to refactoring and TDD relatively quickly, but it’s taken me a while to get used to, say, pair programming and acceptance testing. I’m learning those latter skills, but I wouldn’t say that I’m actively talented in them.
Of course, this doesn’t mean that XP is bad because it works best with people who have certain talents: saying that makes no more sense than saying it’s bad to hire people to program because not everybody is talented at programming. It does suggest, however, that, as a manager, I should pay extra attention to the authors’ recommendation that a manager’s first job is to be very clear about the talents required for roles and to take that into account when hiring: while managers should avoid gratuitously imposing talent requirements, they should face up to the fact that they do require certain talents.
(I’m sure many people will claim that XP does, in fact, gratuitously impose talent requirements. That is not my opinion, but I don’t particularly feel like discussing the matter at the moment.)
This is a particularly urgent question for me right now. In the past, I’ve been cavailier about this when hiring (and my initial team I inherited rather than hired), but I’ve gotten extremely lucky so far: I have a great team, and one that is quite good at XP practices. (Don’t get me wrong, we don’t do full-out XP, but we’re fairly far in that direction.) Unfortunately, one of my team members will be leaving soon; I’ll have to talk this over with my boss and parallel managers, but I expect the conclusion will be that his departure leaves my team understaffed, so I’ll be hiring soon. Something else that I’m not particularly talented at; I’ll do my best…
February 25th, 2006
When playing a video game, I usually start a new game once, and continue an existing game twenty or so times. So why do so many games default to “new game” every time I boot it up?
Maybe they could even use the annoying logo time during boot to look to see if I already have a save on my memory card, and present me with “new game” the first time, “load game” other times. And then there are games which avoid the issue entirely, presenting you with save spots that are either full or empty. Less common these days, though, now that games normally allow an unbounded number of save spots. (Which is a good thing, to be sure.)
February 24th, 2006
I believe I have complained here in the past about my DVD/DVR player that crashes periodically. Today, its DVD drive decided to stop reading disks, too. Sigh; by far my worst electronics purchase. And now is not a good time to be spending more money on stuff like that; fortunately, we have enough other devices in the house that can play DVDs that we’ll limp by for a few months.
February 23rd, 2006
I am typing this on a laptop that blinked a strange orange light when I plugged in the power cord, that has a red line on the left side of the screen, and where a large gap has developed in the upper left side of the case. Clearly, I have to be prepared, literally any evening now, for me to turn on the computer and for it simply not to work. I’ve already spent too much money this month; on March 1, however, I will order various pieces of electronics.
I’m comfortable with most of the decision making. But there will be one significant change that I don’t have much experience with: I’ll be going from one computer connected to a cable modem via an ethernet cable to multiple devices (computers and game consoles) connected largely or entirely to each other and the cable modem via wireless. And I’ve never set up, or even used, a wireless network before. (Actually, I’ll have questions on the Mac transition, too, but that can wait for a bit.)
So I offer up my plight to the collective wisdom of my readership. Here’s the setup:
So: what should I do? I’m assuming that I want to connect a wireless router to my cable modem in the den; any specific buzzwords I should look out for? Anybody have any favorite routers? What’s worth spending more money on, what’s not? (Presumably I want a device that can do 802.11g.)
As far as security goes, it sounds like WEP is quite bad, but WPA is decent. (And there are multiple flavors of each?) It looks like the DS only supports WEP; will the router support different devices using different encryption protocols (after all, I don’t care how well the DS traffic is encrypted), or is it an all-or-nothing thing?
How should I connect the Ultra 20? A wireless card? A hub? A router? A long ethernet cable? How does security work with wireless hubs? Any gotchas with Linux and wireless cards?
Is AirPort Extreme just Apple’s name for 802.11g, or do they have proprietary extensions?
Anything else that I’m forgetting to ask?
February 21st, 2006
A total cheese bomb – one pound of cheese is a lot of cheese if you’re pairing it with one pound of pasta. Requires managing three pots simultaneously, but it’s actually about as easy as can be imagined given that. It does take a bit of time, though, partially because of that but mostly because of the baking time.
This would seem to be the first recipe I’ve given from the best cookbook ever. Really, that cookbook was a total godsend – we got it a month or so before Miranda was born, and it’s a wonderful collection of quite good, varied recipes that are easy enough that, even if one of us was too zonked to help with the cooking, the other of us didn’t mind.
If you can’t find orecchiette, shells are fine. But orecchiette really does work better.
Pasta alla Anna, from Pasta Fresca, by Viana La Place and Evan Kleiman.
1 lb orecchiette
olive oil
1 large eggplant, diced
28-oz can crushed tomatoes
3 cloves garlic, minced
pinch red papper flakes
1 lb smoked mozzarella, diced
freshly grated Parmesan cheese
salt and pepper to taste
Preheat oven to 350 degrees. Cook orecchiette. Meanwhile, heat garlic and pepper flakes in olive oil in another pan, add tomatoes, and cook for a bit. Heat more olive oil in a skillet (quite a bit: eggplant is thirsty), and fry the eggplant.
Mix pasta, tomato sauce, eggplant, mozzarella, salt, pepper, and a handful of Parmesan. Put in a 9 1/2 by 12-inch baking dish; sprinkle another handful of Parmesan on top. Cover with aluminum foil, and bake for 40 minutes. Raise heat to 400 degrees, remove foil, and bake for another 5 to 10 minutes more.
February 20th, 2006
I wrote my first SQL statements today. I haven’t gotten as far as actually inserting data yet – they just create the tables as described here. But it’s a start, and I also started doing the modifications to the code to dump the data to the database. I’m definitely past my programmers’ block now: I have lots of small steps ahead of me, and I’ll even try to work on it some midweek if I can tear myself away from my blog reading/writing.
I’ve decided to stick with Michael Feathers’ dictum to avoid database access in your unit tests; it turned out to be easy enough to throw in a thin SQL-free layer that is forcing me to do most of the necessary code modifications. So I’m happy enough with the parts of the code that actually add entries to the database being only tested via acceptance tests. (The code to create the tables is written by hand, invoked by a shell script, so no Java at all there.)
As I created the tables, and compared them with, say, the SQL dumps of the database backing up the blog, I realized that I don’t know anything about indexing. Something to think about, though it’s not necessarily urgent unless I run into performance problems. Which I doubt I will for quite some time.
February 20th, 2006
We spent the middle of the day yesterday at the Asian Art Museum of San Francisco. The first time I’d been there; quite nice, I will go back again. Though my favorite part was just listening to Miranda and Jordan talk to each other while they were walking through the galleries together.
Anyways, I bought a pop-up book of Zen stories while I was there. Which is quite well done. But after I bought it, it struck me that the ideas of Zen and pop-up books are perhaps not the best match…
February 18th, 2006
I just finished taking a new manager training class at Sun. (I’ve been managing for a year and a half now; I only recently learned that I was supposed to take this class. Oops.) They gave us a copy of a book called First, Break All the Rules which, despite having a title guaranteed to annoy me, is really interesting. It will take me quite some time (and more than one reading, spread out across time) to process the book, and a few blog posts just to talk about my first impressions.
It’s based on what seems to be a well-done study designed to measure what’s necessary to “attract, focus, and keep the most talented employees”. The measurement that the study comes up with is that you want your employees to answer “yes” to the following twelve questions:
Which is an interesting enough list, and they do further analysis of the list: which questions are linked to productivity, which to profitability, which to retention, which to employee satisfaction; how different questions are important at different stages of an employee’s time with company. But, actually the book (or at least my perception of the book) doesn’t focus so much on these questions as on a quite different issue.
The first question suggests that managers should clearly set the expected outcomes. They then follow this up by saying: managers should give their employees as much leeway as possible in how they accomplish those outcomes. Different employees will find different paths to accomplishing outcomes, because they have different tastes, different talents.
Reasonable enough so far, though certainly some people (maybe even I) would disagree. Next comes: a manager should spend their time figuring out what their employees’ talents are, and focusing the employees on getting the most out of those talents; they should spend essentially no time trying to get employees to shore up their weaknesses. And they’re quite serious about this: if employee A is great at X and lousy at Y, find another employee who is good at Y and match them up. If employee B is great at Z and annoys everybody else, see if you can find a way to separate employee B from everybody else so you get the benefits of his or her talents without screwing up the rest of your team’s. If employee B isn’t so good at V, and you really need employee B to do V, then you made a mistake in hiring.
Which is, I think, an unusual approach: if you say “let people do what they’re good at”, then you probably won’t get much disagreement, but if you then follow that up by saying “and don’t worry about what people are bad at”, that’s a different matter. And, despite being given this book by a Sun course, I don’t have any reason to believe that this is really part of Sun’s corporate philosophy; in fact, at several places in the second half of the training course, recommendations were made that seem to contradict what the book says.
For example, in a discussion on hiring, the course (like the book) said that you should ask people to talk about their actual experiences in an area (“tell about a time when you convinced somebody to change his or her mind on an issue”), but the book says, if you don’t get a clear answer immediately, you shouldn’t trust any later responses, while the course talked about followup questions to probe the issue. As I read it, the difference is that the book is designed to find out what people are genuinely talented at (which are things that people think about enough to always have answers at hand), while the course is designed to find out what people are acceptable at (so as long as you get a real answer eventually, then the person is capable of acting competently in the area at hand).
More blog entries coming up: one about how, as a manager promoting XP practices, I should think about this, and one how this might affect me as an employee.
February 18th, 2006
February 18th, 2006
The GameCube version of Animal Crossing was one of the most addictive games I’ve ever played. I didn’t normally play it for hours at a stretch (though I did that more than once), but I played it for at least ten or fifteen minutes almost every single day for about a year. You live in a house in a village; there are other animals who live there, with animals moving away or moving in occasionally; you can get stuff to furnish your house, either from the store or as gifts from other animals; you can catch fish and bugs, dig up fossils, keep them or sell them or give them to your local museum.
If you don’t talk to another animal for a few days, they’ll notice. You can write them a letter; they will write back. They’ll notice if you don’t change your clothes for a week. There are occasional holidays or special events. You can enlarge your house, to provide more room for stuff. Every Saturday, a dog performs songs, which are quite charming. Multiple people can play, living in different houses in the same village.
This may not sound like much, but it adds up to a great game, and one that is addictive out of proportion to its greatness. As far as addictive goes: it hits the collection aspect very hard, in multiple ways: collecting fish/bugs/fossils, collecting songs, building a nice house containing interesting (and perhaps rare) items, building a nice wardrobe. And we’ve learned over the last decade that this is a great way to get people hooked – see Pokemon, for example. Also, there’s the whole social interaction aspect, where animals notice if you’re absent for any length of time, which keeps you coming back. (Not to mention that you get cockroaches in your house; ick.)
As far as greatness: it so boldly ignores many of the traditional video game conventions (fighting? plot? What’s that?), and you don’t mind a bit. And the social interaction aspect of the game is relatively new. And the songs are charming! And it’s quite well executed in general.
Anyways, there’s now a DS version of the game. Quite similar, though there are tweaks. The biggest issue is that, if multiple people are playing, they share the same house; I don’t see how this is a good idea. Though, to mitigate this problem, you have more storage space, which is good. The parser for your letters is better (or at least animals complain less often that you aren’t making sense; it’s not clear if the game does any real parsing at all). Animals are much less likely to send you on errands; on the whole, this is good (before, I would be leery of talking to animals if I only wanted to play for a few minutes), but I think the pendulum has swung a bit too far. If I had friends who played this and a WiFi connection, we could use that to visit each other’s villages.
Having said all of that, I’m not nearly as addicted this time: I gave it up after a month or so. Liesl, however, is still going strong after about two months. I don’t think my lack of addiction means that the DS version is in any way inferior to the GameCube version: I just need something new, which I’m not seeing. But if you haven’t played either version, you’re missing something.