[ Content | Sidebar ]

computer status

March 18th, 2006

I burned some FC4 x86_64 CDs earlier this week. Then I went to install them on my new computer, but did a media check first. Three of them failed. I re-burned them; the new copies failed, too.

Next: read an installation guide; it suggested that installation over a network or from a USB hard drive is possible. I don’t yet have the network working, but I’d bought some USB hard drives; no problem. Plug one of them into my laptop – it worked the first time! (Formatted as vfat; I guess I can deal with that.) Copy the ISOs over to the drive, run sha1sum to verify the copies; takes a while, but works.

Stick the CD into the new computer, and do ‘linux askmethod’. There was a hard drive option; select that. Hmm – no USB hard drive? Maybe I should have plugged in the USB hard drive before booting? Reboot, try again – there’s sdb, and looking into it, there are my images! Everything’s going great!

Then select one of the images. At this point, it complains about something driver-related. I try again; the machine crashes.

Try a few more times; half the time, I can’t see the USB drive, and in the times I can see it the computer crashes in short order. Sigh. I hope the x86_64 support in FC5 is better…

Well, I have two copies of the CD’s; hopefully they won’t be silently bad, and if they are bad in non-silent ways (which has been the case with me before), hopefully they’ll be bad in different places. So let’s give it a try.

It takes two tries, actually: once I screwed up the hard drive formatting. But then it works – victory! Though I’m a little curious as to whether or not I’ll be able to get as wide a range of 64-bit packages as I’d like – for example, it’s not clear that I have gphoto. (Poking around later, I would seem to.) No apparent problems with the CD’s – I hope there aren’t quiet problems…

More work to be done there (e.g. ‘yum update’), but things seem to be going okay.

Next: networking.  Which means configuring the wireless bridge.  It comes with a Windows setup CD (grr); I bring the laptop upstairs, plug it into the bridge, and boot it up in Windows mode. (Lazy me: web access to 192.168.1.226 would have worked, it turns out.) The network can’t come up. That’s okay – surely the setup CD will find the bridge anyways? Nope.

Hmm: maybe the laptop isn’t happy because the bridge (being just a bridge, after all) doesn’t know how to give the laptop an IP address, and the setup CD is too stupid to deal with that? The router has four ethernet ports; bring the bridge and laptop downstairs, plug them both into the router. Now the setup CD works.

So I configure everything, bring the bridge upstairs, plug it into the new computer. Doesn’t work.

Bring the bridge back downstairs, plug it back into the computer. Play around with settings; the setup guide’s instructions are notably shaky in places. In particular, it doesn’t explain the distinction between “Infrastructure” and “Ad-hoc” mode at all clearly, and the default gateway of 0.0.0.0 seems pretty iffy to me. Play around with changing everything I can; each time, though, when I unplug the ethernet cable between the bridge and router and plug the laptop into the bridge, I can’t get networking to work.

Give up on this; leave the bridge’s ethernet cable plugged into the router, and boot up in Linux. Do some digging around on the net, with no useful results (other than to remind me that the bridge has gotten many bad reviews on Amazon), then go to the web interfaces for both the bridge and router. Play around with settings a bit more; no obvious problems. After reading the manual for the bridge, I’m pretty sure I know what the settings should be. The bridge’s web page has a way to search for wireless networks; it can find five of them around me, and if I turn on SSID broadcasting for mine, it can find mine. So both my bridge and router seem to have functioning antennas, at least. Make sure all settings match (looking at the WEP key several times); reshuffle ethernet cables so the laptop goes through the bridge, but still no luck.

Look more closely at router settings – hey, WEP is turned off! I think I accidentally did that 10 minutes ago. Let’s try turning that on again. Then I ping my bridge’s IP address (which is still connected to the router through an ethernet cable) – I’m getting duplicate responses! Maybe things are working now, and the duplicates are because the packet is going both through the ethernet and the air? (Ethernet and ether, so to speak.) Reshuffle cables – everything works!

Bring the bridge upstairs; it works there, too! (But my computer got turned off at some point – I didn’t do that intentionally…)

Go downstairs, add entry in /etc/hosts on the laptop for the new computer. (Christened ‘panini.bactrian.org’, since I’ve run out of tropical fruit ideas.) ssh in; it works! Whoops, it doesn’t work, I’m logged into papaya (the laptop). Right, .10, not .100; remove offending line from .ssh/known_hosts, try again; it works!

Set up port forwarding in my router, try to log in from offsite. Doesn’t work. Whoops, I got the IP address wrong again (.200 this time, which is the bridge); once I get it right, everything works.

Go to my registrar, add an entry ‘home.bactrian.org’ that points to the IP address my cable modem currently has. Yay.

Log back into the new machine, do ‘yum update xemacs{,-sumo}{,-info}’; it installs quite quickly, so I guess the wireless network is working at good strength. (And the new package install doesn’t pull in 900 updates, too, which is nice; I’ll do ‘yum update’ at some point tomorrow, probably, but I’d rather not deal with that right now.)

So: I’m happy with the current state. Still some mysteries – did I get anything wrong the first time I configured the bridge, or is the bridge flaky? Why was the new machine turned off when I went upstairs? But I’m not too worried, all things considered.

Enough computer fiddling for the weekend; like I said, I’m planning to do ‘yum update’, but I want to devote my brain cells to programming. (If I have free time at all for computer usage tomorrow, which I hope I will.)

trinity score

March 16th, 2006

I was listening to Herbert Grönemeyer’s first two albums in the car today; as they always do, they reminded me of the game Trinity. It is by far the strongest association I have of any piece of music with any other work. (Other than soundtracks, of course.)

Which is pretty weird – the two have, a priori, nothing to do with each other. I just happened to be listening to those CD’s when I first played the game. But somehow the link stuck.

Why so strong a link? Part of the answer is obvious enough: most video games come with their own music, so it’s not surprising that, if I’m going to make a strong link between a video game and an unrelated piece of music, then the video game would be a text adventure. But why a video game? Why not, say, a book? I’m not currently in the habit of listening to music while reading books, but I’m pretty sure I once was.

Presumably playing video games opens up different neural pathways than reading books does; maybe it makes me more receptive to music somehow? I have commented before that listening to certain video game themes makes me feel happy: a few snippets of Zelda or Mario music, and I feel at home. (And I was just singing the Katamari Damacy theme to Miranda while she was brushing her teeth tonight.) So maybe this isn’t entirely a coincidence.

I’ve been working my way through the Grönemeyer oeuvre recently, by the way. (Well, most of it – the latest album I have is Chaos.) The earlier albums are actually holding up rather well; while I’m more familiar with his middle albums, and am very fond of them indeed, I have to admit that, while many individual songs on them are quite good, on the whole their instrumental work is rather overwrought. (But Ö is a quite solid album; in particular, I am a fan of “Mit Gott”, “Bist Du Taub”, and “Was Soll Das”, even the verlängerter neumix of the latter.) The earlier albums are much quieter, and I suspect that, once I listen to them more times, I’ll end up liking the lyrics about as much.

Looking through his website, it would seem that he was born in Göttingen; I did not know that.

playground scene

March 16th, 2006

During recess at school today, I saw three kids playing together. One of them was a kindergarten girl from Miranda’s class; another was a first-grade boy from Miranda’s class. The third was an older boy (fourth-grade, maybe?) whom I didn’t know; I kind of think I might have seen him at a PACT function, but I’m not sure, so he might or might not be in PACT. I have no idea how he knew the other two – maybe he met one or both of them in an Arts Focus class, maybe he knows them another way, maybe he’d never met them before.

They were playing with a hula-hoop: the older boy sent it spinning along the blacktop, while the other two ran after it. The girl usually got to it first; I don’t know if she just had more energy (she clearly did, but that might not have been sufficient), or if the other boy was just being nice and making sure that she was getting it her fair share of the time.

This went on for several minutes; all three were clearly enjoying themselves.

I am happy that my daughter goes to a school where this sort of thing can happen. And if PACT has anything to do with it, then go PACT! PACT may or may not have anything to do with it, actually: the school in general has many nice features.

I don’t want to paint it as the norm: in general, kids of about the same age (not exactly the same age, doubtless helped by the mixed-grade classrooms) and of the same gender play together. But this isn’t the only exception I’ve seen, though it is one of the more dramatic ones, in its own quiet way.

benjamin vikram staveley vakil

March 16th, 2006

Congrats to Alice and Ravi on their new baby!  (Born yesterday, for the record.)

router and static ip addresses

March 16th, 2006

My router seems unwilling to hand out static ip addresses to clients with certain Ethernet addresses. Which is unfortunate – unless I’m misunderstanding things (always a possibility), it seems that I’ll have to hard-code nameserver addresses on the machine that I want a static IP address for. And I’m not in control of the nameserver addresses, and I have no reason to believe they won’t change.

Oh well; I’ll try it that way and see how it goes. If it works particularly badly, I suppose I can try using a dynamic IP address for that machine – I’m not planning to turn it off, so there shouldn’t be much of a difference in practice.

more on octavia butler

March 16th, 2006

Here’s more on Octavia Butler, if anybody’s curious. (Requires clicking through a free ad first.)

red bean is changing computers

March 10th, 2006

The hosting collective that I’m part of is changing servers this weekend (to an x2100, yay), so don’t be surprised if this blog is offline for a few hours on Sunday. It will also be changing its physical location and IP address some time over the next couple of weeks, so it will be offline (and mail to my personal address will take a little while longer than normal to be received) while the computer is being moved and the DNS changes propogate.

octavia butler

March 10th, 2006

Octavia Butler died two weeks ago. I’d just finished her most recent novel, Fledgling, a week before that. Very good; I think of her as really hitting her stride, for while I seem to recall enjoying her earlier novels, I thought Parable of the Sower was great. I should go and reread that book and its sequel, Parable of the Talents; I’ve only read the latter once, and I’m not quite as sure what I think of it. Heck, I should go and reread all of her books. (I’ve spent too much money on computer stuff recently – time to reread books I already own instead of buying more new ones.) Lots of things I like about them; I was about to write down a list of qualities that they share, but the results were too reductive, so I’ll just say that they’re good SF which touches directly on important social issues of our time.

She was 58 years old; if I had to guess, I would have thought she was a bit younger than that. Too early for her to die, though.

apple is bad

March 10th, 2006

Since I’m about to become a Mac owner, and since I seem to be far from immune to Apple’s reality-distortion field, I suppose I should spend a bit of time reminding myself why Apple is, in fact, a bad company.

First, why I like Apple:

  • Nostalgia. My first computer was an Apple ][+; I got years and years of fun for that thing. Hard to imagine using the same computer for so long; I think we got it when I was about to enter sixth grade, and I used it through high school. I was very excited to get a Mac SE/30 when I went off to college.
  • They’re the underdog. They’re doing well these days, but Microsoft they aren’t.
  • They make products that are good in important ways.

(I could make a similar list of reasons why I like Nintendo, but that’s another blog post.) Also, they’re cool in a way that does have an effect in the circles I travel in.

Okay, those are reasons why Apple is good. So why is Apple bad?

  • It’s not at all clear to me that they’re on the right side on the content wars. It’s good that they released an MP3 player that has forced everybody to deal with the fact that digital media is here to stay. But they iPod and iTunes are verging towards a monopoly, and I don’t see Apple as being a particularly responsible steward. iTunes is a closed system, they don’t let content vendors sell unencrypted content, and their encryption standard isn’t open. (Hmm: is it clear to me that they’re on the wrong side in the content wars? From the iPod and iTunes point of view, yes. But they sell software to make it easy to create content, which is very much a good thing.)
  • They were one of the first bad guys in the software IP battles – remember the FSF Apple boycott over their UI patent? I wish I could say that those days were past, but I have no reason to believe that Apple wouldn’t happily do the same thing in the future; I really hope that this story will prove to be overblown, but I can’t say I’m confident of that.
  • Speaking of the FSF, Apple is a big free software user these days, but I don’t see them giving back to the community as much as they should. Apparently they’re making less and less of their Darwin code available; they do admittedly make significant GCC contributions, but their GDB contributions are pretty sporadic. Not the fault of the Apple people working on GDB – they’re just too few people with too much work to do, and the up-until-recently dysfunctional behavior of the GDB community didn’t help matters. But I do think the company should put more money towards giving back to the free software community.
  • Once my data is in the clutches of their software and hardware, they’re quite resistant to letting me have access to it in anything other than a tightly controlled fashion. The most obvious example here is not letting me use my iPod to transfer music – why can’t I transfer my music collection from my old laptop to my new one by just putting it on the iPod and plugging it into the new computer? But they’re doing this in much more petty fashions, too; for example, as this article points out, if you subscribe to a podcast with iTunes, and want to use the address of the RSS feed somewhere else, you can’t just cut-and-paste it!

Don’t get me wrong – I’d still rather support Apple than Microsoft. But I can’t honestly say that I think that Apple wouldn’t happily abuse monopoly power in the same way that Microsoft does; their underdog status means that they’re less like to have monopoly power to abuse, but that’s hardly praise. I still like looking at their stuff, and I imagine that I will like using the MacBook. But, at the same time, I really should figure out how to manage my iPod with free software…

sixteen cores

March 9th, 2006

It was nice to see our stock price going up today while the rest of the tech sector was falling; the cause was an upgrade from an analyst at Lehman Brothers. Apparently, he likes our new CFO; the CFO’s last name perhaps has something to do with that, but the analyst also thinks that the new CFO will signal a round of cost cutting. I confess to being a bit taken aback by the following quote from the analyst:

Last week, [the new CFO] indicated that all areas of Sun are being reviewed for reduction including the research and development department which had previously been relatively protected from cuts; however, given that most of the new products have been introduced, R&D may also be targeted.

I know we’ve been introducing a lot of good stuff recently, but why does the analyst think that we should stop? I think the Rock guys would have something to say about that; and while I’m a fan of our new Opteron servers, I don’t think it would be a good idea to rest on our laurels after introducing a pair of two-socket servers. Don’t get me wrong – if I wanted a 1U or 2U two-socket Opteron server with lots of maintenance and reliability features, they’d be what I’d buy (and, as it is, I’ve bought a couple of our slightly lower end one-socket Opteron boxes) – but surely we’re not going to stop there?

After all, AMD doesn’t just sell one-way and two-way Opterons: they also sell an eight-way model. So wouldn’t it be more fun if we, say, added an eight-socket Opteron server? At two cores per socket, you have quite a lot of processors to play with; I haven’t had a chance to use one of the prototypes myself, but I was pretty amused when I got e-mailed a boot message from one of the machines. I will say that using a 4P (all single-core) Opteron box does nicely speed up compilations; I’m not sure exactly how a 16-core server would do on our builds – the bottleneck might well have shifted away from processing power by then – but doubtless it’s the bees’ knees for many applications. (E.g. high-performance technical computing, if Tokyo Tech is to be believed.) If you need lots of threads to serve up web pages, or similar tasks, Niagara might be your machine; if you need a broader class of computing power, these guys should do nicely.

The article also mentions a forthcoming blade server. Which is, honestly, an area I don’t know much about, but I’m pretty sure that Andy and the rest of the NSG brain trust have come up with some nice designs there, too.

And meanwhile, the Itanium bad press just keeps on appearing…

gpl happiness

March 9th, 2006

I just got my new router; it warmed my heart to see the following right on front of the box:

This product may contain material licensed to you under the GNU General Public License or other open-source software licenses. Upon request, open-source software source code is available at cost from Linksys for at least three years from the product purchase date. For detailed license terms and additional information look at www.linksys.com/gpl/.

Who would have thought that the three-year clause was still being used in this day and age? (No need to write to them to get the source code, by the way: it’s available through that link.)

new theme

March 8th, 2006

I spent some time browsing WordPress themes; I found several that I like, and spent a few hours playing around with them.

My initial favorite was 2cDarkGrey; once I actually installed it, though, it seemed a bit dark for me. Also, there were various things that I wanted to tweak, and I had a harder-than expected time doing that.

So I started looking at lighter themes. My next try was Genesis; it was a bit too light, though, and the header was too plain for me.

After a little bit of dithering, I ended up on Kubrick, the new (since 1.5) WordPress default theme. Quite light, a bit of color contrast on the sidebars. I’m still not entirely thrilled with the header, but it’s okay for now.

Having said that, there were several things I didn’t like about it. For one thing, the text was too small for my aging eyes. (I really do need to get new glasses, but web designers also need to stop using small fonts.) I bumped up the text size, which then caused a cascade problem that the main body text area, already narrower than I’d like, really was too tight. In general, the page seemed narrow; I tried enlarging it, but that ran into problems with the images that the page uses. Presumably it shouldn’t be too hard to use gimp to widen those; for now, I left it at the original total width but shrunk the sidebar so the main text area had a bit more room.

Then I fiddled around with how it handles ul items, and added, reordered, and removed stuff from the sidebar. (Ending up mostly where I started, but the reordering stuck.) And darkened the text (aging eyes again), and turned off justification. And here we are.

I’m happier with the new look than with the old. I learned something from the tour, about what’s important to me and what isn’t. I finally started customizing WordPress themes, which will help me in the future. I feel a bit stupid ending up with the default theme, but I can live with feeling stupid.

Having said that, I’m not thrilled with where I’ve ended up. My main current pain point is the header – aside from limiting my width options, it looks pretty clunky. It would really help if I could come up with some sort of picture to use as a header; as it is, I’ve been ignoring themes that depend on an image at the top, and that’s not so good. I did like the texture that 2cDarkGrey used; maybe I could go with that after some sort of modifications?  Or find a nice texture elsewhere?  Dunno.

(Side note: I am not so happy with various aspects of the new interface for writing posts. I’ll live with it, though – downgrading is bad.)

test post

March 8th, 2006

I’ve just upgraded to WordPress 2.0.1. Seems to work okay; the main difference from my point of view is that the interface for writing posts has changed completely. (In general, the administrative interface looks quite different.) I suspect that I’ll end up liking the new interface, but it will take me a little while to be sure. (And to train my fingers that C-b doesn’t mean to go back a character – C-f, C-p, and C-n still work, though.)

Next step: see if I can find a theme I like. The old WordPress 1.2 theme doesn’t look so great any more…

random links

March 8th, 2006

Cleaning out my list of saved links:

Wow – that was too long. (16 bulletpoints, if my mathematical skills haven’t atrophied.) In a spirit of kaizen, let’s see if we can uncover some underlying process problems.

First, an analysis of what was in my saved links list. (There were seventy-odd entries, now only thirty.)

  • Book recommendations.
  • Music recommendations.
  • Articles that I thought I might want to blog about.
  • A bunch of GPLv3 stuff. (A special case of the previous, but big enough to break out.)
  • Articles containing interesting-looking links that I didn’t have time to follow up on.
  • Articles linking to works in other formats (podcasts, mostly) that I haven’t had time to look into.
  • Articles from Lawrence Lessig’s blog and How the World Works. (Special cases of one or both of the previous two, but big enough to break out.)
  • Stuff from Simon Phipps’ del.icio.us feed.

The last category is most relevant to this discussion: if I’m counting correctly, 8 of the 16 bullet points came from that feed. I was aware of them building up, but I felt bad at not only posting links without adding value myself, but not even being motivated enough to dig up my own interesting links, instead sponging off of somebody else! After all, if that’s what people want, they can just subscribe to Simon’s feed themselves. But, thinking about this more clearly, feeling guilty about that is pretty silly. Some better thoughts:

  • Most of you doubtless don’t subscribe to his feed, so I am potentially adding value by copying a judicious subset of the links. (If you like them, though, I encourage you to subscribe to his feed directly.)
  • The fact that I enjoy reading his feed means that I shouldn’t feel guilty about occasionally providing links with minimal commentary myself. I wouldn’t be happy with this blog if I didn’t spend a fair amount of time immortalizing my own thoughts, but there’s no need to do that exclusively.
  • The fact that I enjoy reading his feed suggests that I should spend some more time browsing del.icio.us for other interesting feeds. (Then again, it’s not like I need to spend even more time web browsing.)

So: process improvements.

  • Once every week or so, make a post of random links, for stuff I’ve seen recently that I want to point out without commenting on.
  • While I’m at it, go through my saved link list; for each link, figure out if I should delete it, do something with it, or postpone a decision for another week.
  • Recommendations can easily get promoted into another list that I keep of books/music/etc. that I’m planning to buy or get at the library.
  • Articles that I’m planning to blog about can get demoted into articles that I’ll just link to.

That should work well enough.

I hope that this post has satisfied your cravings for bullet points.

protected and package

March 7th, 2006

I have doubtless said this before, but the idea that protected visibility implies package visibility is screwed up. I’m in the midle of a refactoring where I’m creating a superclass out of an existing class; at some point in this refactoring, I wanted the compiler to force me to use the new superclass instead of the old class. No problem: I’ll mark the old class’s constructor as protected! But everything compiled unchanged: all its users are in the same package, and surely by marking it as protected I intended to grant access to all those classes, right?

Fortunately, there’s another way to get the behavior I desired: I marked the subclass as abstract. But really, package and protected should be orthogonal concepts. And, while I’m complaining, package should not be the default. And maybe package shouldn’t even exist, though I’m not sure – that is a delicate area of language design.

killer 7

March 7th, 2006

If memory serves me well, about a year and a half ago I was feeling kind of down on video games. The start of this generation had been quite nice (largely because of the Dreamcast), but for the last year or two, it had seemed like the best I could hope out of a game was that it was a well-executed example of ideas I’d seen before. Not that there’s anything wrong with polishing ideas, but I’d prefer a bit more novelty in my diet. Fortunately, matters quickly improved: Katamari Damacy, GTA: SA, Shenmue II, Jade Empire, Resident Evil 4, and Shadow of the Colossus are all great games, and I learned something from each of them.

Which brings us to today’s topic, Killer 7. Honestly, I just don’t know what to make of this game: it’s so different in so many ways from what I’m used to that my brain is having a hard time figuring out how to approach it. I’m not convinced that it’s not better than all of the games mentioned above (though what could be better than Katamari Damacy, really?); it probably has more flaws than any of them, but I also suspect game designers will still be (or should still be) learning from this game a decade from now.

I’ll start with my current basic categorization of video games: is this a game that I would allow Miranda to watch me play, or is it a game that I don’t want Miranda to watch? (That categorization is why I’m normally in the middle of two video games at any given time: right now they are KOTOR, in the former category, and God of War, in the latter.) This game unquestionably falls into the latter category; I don’t mind a bit of gun violence, but the weird creatures attacking you in the game are enough to disqualify it. (I don’t want to have her waking up screaming after dreams of invisible vaguely zombie-like monsters that lurch towards you, grab you, and explode.) I’m not sure I feel like explaining to her about the character who can break through barriers by slitting her wrist and spraying out a sheet of blood. And I’m not sure that she would react well to walking through a laundromat, opening a dryer, seeing a severed head in there holding a ring in its mouth, and having it talk to you. Probably the blood-spattered ghost of a boy that warns you about each level’s miniboss would not go over entirely well. And then there’s Iwazaru, who periodically gets lowered down from the ceiling via wires, wearing a red latex suit, a strange harness, collar, and straps across his face, whispering secrets to you; probably Miranda would be fine with him, actually, but it’s hard to say for sure.

(Completely unrelated note: there would seem to be an opossum walking through our backyard. Fortunately, the Zippy defense squad is on the case. I didn’t realize that opossums carried leaves and branches with their tail like that.)

The way the game handles multiple characters is fairly unusual. Multiple characters have always been a bit of a pet peeve of mine, though I won’t repeat my rant here; in this game, you have a choice of eight characters, who are all supposed to be alternate personalities of the same person, or something like that. (I’m not entirely clear on several aspects of this game.) You can switch between six of them at will (the other two of them are only for special circumstances), and they each have a special ability that you need to use in appropriate areas. It mostly feels like a game with a single character with several abilities, but there’s a bit of an RPG feel in there as well, since there’s a low key leveling-up system (using blood you’ve collected from killing enemies) which affects each character separately. It’s an interesting enough setup; works well enough, though I won’t say it’s rampantly successful. For one thing, the abilities are only used in certain specific areas; they could provide more differentiation between characters in the core gameplay, so that you could have a choice as to how to approach the game. (Which, actually, might not work so well in as strongly scripted a game as this one.) Also, most of the abilities are rarely used; for example, the aforementioned wrist-slitting only comes into play two or three times.

The game also tells you where to use each ability. (Though I think there’s a way to turn off those hints.) Which, surprisingly, doesn’t bother me too much – one of the things that I’ve learned over the last year or so is that, while I like it if a game requires me to do some amount of thinking, I’m actually pretty flexible on the exact amount as long as there’s enough going on to hold my interest. There are a few other puzzles in this game (e.g. using information from a poster that you saw elsewhere in the level to unlock a drawer); fine by me.

It’s done in a cel-shaded art style; I haven’t been thrilled with examples of that since Jet Grind Radio, but it’s a great fit here. Some levels also feature a distinctive style for their cut scenes – one level, for example, uses a superhero comic book style, and another level has a key enemy introduced in a very amusing anime fashion.

It doesn’t use normal controls for character movement – if the controls from the early Resident Evil games drove you crazy, then don’t think about picking this one up. You don’t use the joystick to move around: instead, the green button moves you forward, while the red button turns you around, so you can move in the other direction. And at some (but not all) places where the scenery branches (intersections of streets or corridors, fronts of buildings, etc.), you’re given a choice of directions to move in. If you hear a spooky laugh, then you probably want to select the R-trigger, which drops you into a first-person mode where you can look around freely (but not move at all). Which raises two questions:

  1. Why did they do this?
  2. Why isn’t it driving me crazy?

My best guess at an answer to the first is that it allows the designers to control the presentation and focus of the game. The game isn’t about you running around freely, exploring everywhere, developing a fighting style, searching everywhere for objects. It’s about you going where they want you to go, fighting enemies only as it advances the plot or as necessary to keep you from being bored while moving from place to place, solving puzzles in tightly scripted situations.

And my answer to the second question then is, their design is rich enough that I’m happy to put myself in the designers’ hands and go with the flow. The visuals, the character and level design, the plot are all the product of a strong vision; I’d rather explore that vision than fret about the fact that the game mechanics aren’t what I’d normally prefer. Don’t get me wrong – open-ended game play is great, too. But several games over the last year have taught me that games can do quite a lot of scripting for you, as long as they throw in a little bit of work for the game-player – witness the recent proliferation of Shenmue-style QTE’s, or the whole last chapter of Shenmue II.

There’s more to say about the game – its resurrection method of handling death deserves consideration, and I should say more about the plot (for that matter, I should figure out what on earth is going on in the plot) – but I’ll stop here. One question that remains: has Capcom always been this good? I am very glad that I played both this game and RE4, and Okami is the upcoming game that I’m looking forward to the most. In the past, I haven’t played many of their games, and in fact there are several well-regarded series of theirs that I’ve ignored completely; was that a mistake? I should investigate further.

my first time using bittorrent

March 7th, 2006

I need to download Fedora Core 4 x86_64 CD’s, so I thought I’d give bittorrent a try: the idea of distributed download servers appeals to me. It didn’t work too well, though: the download speed reached 50KB/sec and then stayed there. So, after about 10 minutes, I gave up, and downloaded the images off of a mirror site.

I assume that this works better if you’re actually downloading something popular?

populated database

March 5th, 2006

I’m now fully populating the database with information from my collection. It took longer than I expected; I’ll keep that in mind the next time I plan to work in a unfamiliar area. (It wouldn’t have been so bad, of course, if I were working in chunks larger than an hour or two at a time.)

The process was reasonably pleasant, and I ended up with a nice abstraction layer hiding the details of the SQL code. Some sort of layer was necessary just for testing purposes, though perhaps I could have found a pre-written testing layer. But writing my own testing layer wasn’t very hard – right now, I’m using a very small subset of JDBC, and doing just a handful of SQL queries – and it actually ended up making the code much more readable. For one thing, it helped me make a clean separation of SQL code from non-SQL code – I only used java.sql classes in three short source files, and the only job of those files is to translate into java.sql classes. (For the curious, they are implementations of abstract interfaces called SqlRow, which is an abstraction of a single row in a table; SqlRows, which is an abstraction of a collection of rows in a table; and SqlSource, which is an abstraction of a connection to a database.) And, for another thing, the abstraction layer gave me a convenient place to translate from my custom types into standard types – otherwise, I’d either have had to come up with a layer whose only job was to do that translation or done the translation by hand in many places.

Maybe the single most annoying thing was handling dates. I was aware that Java has a class java.util.Date which is now frowned upon, in favor of a superior class java.util.Calendar. And I’m even somewhat sympathetic to that idea – it’s good for people to have to deal with internationalization issues, and time zones are certainly part of that. But I don’t care about time zones for this project – all I care about are dates, and I can’t say that I’m too interested in the argument “not everybody uses the Gregorian calendar”. So the upshot was that I had written my own Date class (which was useful for other reasons, e.g. to handle books that I’m in the progress of reading right now).

But when writing out to SQL, I wanted to do things the appropriate JDBC way, which meant using its class java.sql.Date when writing out SQL dates. I was hoping that I could easily convert from my own Date class to the JDBC Date class – after all, an SQL date is just a date, it doesn’t have a timestamp, so there’s no need for, say, abstractions to handle time zones. And the JDBC Date class does have a constructor taking a year, month, and day, which I could have used, but it’s marked as deprecated. Instead, for better or for worse, you’re supposed to use the constructor whose argument is the milliseconds that the date started after January 1, 1970. (The argument can be negative, for dates before 1970, though the docs weren’t crystal clear on that matter; they also mutter something about normalization, which I can’t say I understand, either.)

After a while, I finally came up with the correct code: the right thing to do turns out to be

new java.sql.Date(new java.util.GregorianCalendar(date.year(), date.month() - 1, date.day()).getTimeInMillis())

Which is wrong on several levels. For one thing, when converting from one abstraction of a date to another abstraction of a date, I shouldn’t have to talk about milliseconds. For another thing, “getTimeInMillis” is a lousy method name. And for a third thing, why are months numbered from 0 to 11 while days in a month are numbered from 1 to 31? Sigh. I am glad that I’m starting to understand how to use Java dates “correctly”, but I’m not impressed with this aspect of JDBC’s design.

Anyways, I’m pretty sure I have the database populated correctly now. (And doing so turned up a couple of mistakes in my database schema, too.) The next thing is to write code to read from the database. I’ll have a bit of free time in the middle of the week, so I’ll be able to get it started soon; at first I was optimistic that I’d actually be able to finish it in the middle of the week, but now I’m thinking it will be a bit trickier than that. If it were just a matter of writing JDBC code to read from a database, then I don’t think that would take too long – it would take a little while, because I’ve never done that before, but I think I understand all the ideas, and have a pretty good idea of what most of the new necessary abstractions are.

(To be sure, I’ll probably spend a fair amount of time playing God of War instead of programming. Good game, though not quite as superb as some people make it out to be; not something to play while Miranda is around, though, while I can program when Miranda’s around, so I’ll probably spend a fair amount of time on that. And I have some blog reading and writing to do; in particular, I want to talk about the stunning Killer 7.)

But, setting aside other matters competing for my time, the next step will also force me to approach certain notions from a quite different angle than I’m doing now. For example, right now, when I create a book, I add that book to an internal table attached to that author, so that, when I ask the author to generate its HTML page, it can list all the books by that author. But, in the new world, the right way to generate that list is to look it up in the database; so, instead of keeping a collection of Books in each Author, I’ll either want each Author to contain a pointer to some sort of database abstraction, or I’ll want to pass a database abstraction to the method on Author that generates the HTML. Right now, I’m leaning towards the latter, but it’s not entirely obvious to me what the pros and cons are; I can easily imagine proceeding a fair way down one path, realizing that it’s a mistake, and backtracking and heading down a different path. (Hey, I just thought of a way to get the former to work well – each entity (Author, Book, whatever) already has a ‘Key’ associated to it; I could stick the database backpointer in that Key. That would only require minimal alterations of my current code, and it’s not immediately obvious to me that doing so would be inelegant.)

I am looking forward to the day when I can get back to adding new features. I really want to add a list of links to each entity, so I can have pointers from dbcdb to the blog, not just pointers in the other direction. And I just finished a book with three authors, which I currently can’t represent. And I’m thinking that it’s time to add more media types – CDs, certainly, and eventually DVDs. And at some point I want to switch to Ruby: I already suspect that working in a typed language will make my next step harder than it could be.

bok bun ja

March 5th, 2006

Last night, I had dinner with friends at Korea House in Santa Clara. (Which I recommend.) They had a raspberry wine on the menu, which I decided to try; it was okay, but the best part was the explanation of the name (punctuation, grammar as in the original):

A hungry monk, eating wild black raspberry on the mountain by chance found his chamber pot turned over while urinating the follow morning. He knew his urine was too strong because the wild raspberries had reinfonced his stamina. As a result, the fruit was first called ‘Bok-Bun-Ja’, ‘Bok’ meaning ‘turning over’ combined with ‘Bun’ representing ‘chamber pot’ and ‘Ja’ which stands for ‘man’.

shopping for computer

March 4th, 2006

I just got back from a shopping trip for accessories for the Ultra 20. I ended up at Micro Center, which was a good choice – fine price and selection, focused on computers (unlike, say, Best Buy), and not only do they treat people who enter in their store as potential customers instead of potential thieves (which is why I refuse to go to Fry’s), they even have a good number of sales staff (unlike no end of stores out there). I will be happy to patronize them in the future.

So now I have a monitor (19 inch 1280×1024 LCD, nice to see how cheap those are), a keyboard with a touchpad built in (good thing, saves me from having to find a pointing device that won’t kill my hand and figuring out where it will live), and a few cables. And I was in a good mood, so I bought an external DVD writer (hmm – why didn’t I buy an internal one? I thought I had a reason for that choice, but I can’t remember what it was), so I can back up the computer, and a couple of external hard drives. The main purpose for the latter is to back up my CD collection – a lot of the CDs are starting to go south, and I’d rather back them up raw instead of as MP3s. (Disk space is cheap, after all.) And having that in an external hard drive means that I can store the backups off-site. (We just got a larger safety deposit box; I have to fill it up somehow!)

The Ultra 20 and the networking stuff should be here by Thursday, so I guess I’ll spend the end of the week setting that up, and moving my home Linux use off of this laptop. (I’ll still use this laptop as an X terminal until the new laptop arrives. And probably even occasionally after the new one arrives, since Liesl will want to use the new one during those rare moments when she can pry herself away from Animal Crossing.) The only remaining task before then is to download and burn a set of x86_64 FC4 CD’s; easy enough to do.