Welcome to MSDN Blogs Sign in | Join | Help

I know I never do this, but I just had to write two words:

Holy crap.

Echo... Echo... Echo... Echo...

Yeah, it's been a good while since I've said anything here. I could complain that I can't keep the world up to date about Gwynneth because there's just too much, and how I just keep not finishing that next technical article I was writing, but the fact of the matter is I've been spending the time I could spend blogging doing other things. Among those things is starting but not finishing a couple of interesting KawigiEdit and other TopCoder projects, sometimes I've been just playing an assortment of video and computer games, but most of the time has been spent increasing my rank on this list from around 120th to around 20th.

The Sphere Online Judge (or "SPOJ") is a very well-run online judge with ICPC-style problems of a variety of different types. On the whole, most of the problems are fairly hard, but there's also quite a few that are chances to try implementing several well-known algorithms (Dijkstra's algorithm, Prim's algorithm, Ford-Fulkerson, Knuth-Morris-Pratt, Matrix-Tree theorem, Extended Euclidean algorithm, etc). Sometimes the hardest part of such a problem is figuring out that it is "standard" and what the known algorithm for the problem is.

Anyways, I've been slowing down on there a little (I volunteered to put the problems from a different contest up on SPOJ, and some people passed me up lately on the rankings by solving those problems, which I apparently don't get points for), so I've been thinking I should come out and bug you people again.

Last week was Thanksgiving here in the USA. For those who aren't familiar with it, it's basically a chance to get together with friends and family and eat too much. It's actually a pretty big deal, mainly because most businesses (including Microsoft) give their employees two days off for it (and it's pretty safe to guess that not much exciting is going to happen that whole week unless you're in retail). My wife and daughter and I went to Denver (or thereabouts) for the whole week, and we had a great time. I'd spend a few paragraphs explaining all the crazy stuff that's going on with my parents and moving, but my sister has already done all that. I'll leave it at "Gwynneth was cute, and her grandma was happy".

One thing that happened when I was in Colorado is my dad and two brothers-in-law and I went to Best Buy. The reason we went was my dad was interested in looking at TVs (apparently their 43" plasma is seeming small in their new room), but we all looked around at other stuff for awhile while he talked to people about 1080p.

I found a gem, myself and decided to buy Ultimate Quake for a mere $20. I think the general idea with this package is that the Quake trilogy were instant classics, and selling them all together as Quake 4 is launching is a great tribute (and a fine way to get a few bucks off of old software :-) ). I admit I've been watching the software bargain bins checking to see if the original Quake was in there in some form, waiting for me to spend $10 on it, and I've been disappointed (probably because I didn't start looking until the game was already about 7 years old). Sure, if I REALLY wanted it, I could try getting it off of Amazon, but shipping? Bah.

For those of you who don't know about my video gaming habits, when Quake was big, I didn't own a computer :-) I played a little bit of it on other people's computers, but my real game of choice was the legendary Warcraft II (of course, it wasn't the "Battle.net Edition" yet), which I still think is probably nearly the best multiplayer game ever made. First-person shooters really hadn't caught on with me until around 4 years ago when school and most of my other hobbies involved a lot of thinking. At some point in time, I downloaded the demo for the original Unreal Tournament, and I learned to appreciate a good deathmatch with the easy bots and a bunch of rocket launchers after a long day. Since then I've bought Unreal Tournament (bargain bin) and Unreal Tournament 2004 (full price), and now the first three in the Quake series :-)

I've installed all the games now (they were pretty small compared to a lot of newer games), but I've only played the original Quake much. Maybe it's the nostalgia, maybe it's just the great general feel of the game. A couple days ago (maybe Wednesday or Thursday?), I finished the one-player mode for the first time on the "Easy" difficulty setting. Now I'm starting out on the "Hard" setting. No reason in particular to skip "Medium", except maybe to save time :-) (and I don't want to go to the "Nightmare" level just yet).

The best evidence that computer gaming has changed since Quake is that GLQuake runs faster and smoother than the original Quake with software rendering at the native resolution of my screen. On the other hand, I couldn't get GLQuake to effectively not crash on boot in that resolution without recompiling it (no changes, note that Quake is open source under the GPL) and deleting the "opengl32.dll" that the installer puts there. It still crashes at the end of a certain level for no explainable reason, but other than that it works fairly well, and (as I said) it runs faster than regular Quake (and looks better, of course). The reason for the difference is obviously wider support of hardware acceleration that just didn't exist when Quake was made (you'd spend hundreds of dollars for a 3D accelerator that would still be very primitive by today's standards).

Another observation I've made is that Quake is really the classical implementation of a truly 3D first-person shooter. Its predecessors placed you on a 2-dimensional world with a simple 3D projection that allowed the vision that you were in the room, but allowed the renderer to make certain assumptions so that the game ran smoothly. The most basic feature Quake had that had never been done before in a real-time computer game was the ability to look up and down. I'm not even sure if Doom and Wolfenstein 3D allowed you to jump or not. While Quake was revolutionary in its time, id Software had no way of fully knowing how it would be played, and as such, they made some decisions that could almost be considered mistakes in retrospect. In reality, though, the game is so powerfully customizable that with a little bit of effort, you can configure it to play like a more modern FPS.

The first "booboo" is that the "mlook" option is off by default. It was expected (I assume) that either people would prefer to look up and down with the keyboard, or that most people might be playing without a mouse anyways (but that even seems before its time). To make it so you can look around with the mouse (like most current FPSs), open the console (with ` - many other games have imitated this console, I don't think any have had nearly as many options) and type +mlook, or add +mlook to a file %Quake%\Id1\autoexec.cfg . The second was assuming that strafing was expected to be the exception rather than the rule (which is related to the whole mlook thing - obviously the left and right arrow keys would make you walk sideways rather than look sideways if the mouse was supposed to be used to look around). Another strange decision was that the right mouse button would make you walk forward. I think this probably was inherited from earlier FPSs, and I definitely used it that way when I originally learned Quake, but now it just doesn't make any sense to me. I bound the right mouse button in my autoexec.cfg to toggle a custom zoom (or "scope"), like the sniper rifle in Unreal.

Anyways, I recommend the game and if anyone has it or gets it and wants to set up a good old-fashioned deathmatch, let me know :-)

I think I told some people Saturday morning before SRM 299 that I'd upload a beta of KawigiEdit 2.0 if I didn't have any problems with it during the match. Well, things worked smoothly for me, as they usually have, so get your beta here!

A few things have been moved around, and I mainly want to know where it's rough around the edges or confusing, and where things just plain don't work. I hope this will be the most stable version of KawigiEdit ever, but then again, I always hope that, and I think that 1.0.3 and 1.0.6 have been the most stable ones so far (but people have spent a lot more time pounding on 1.1.0, and the biggest bug in it is that the problem timer crashes in European locales (this is fixed in 2.0, of course).

Aside from fixing a couple of bugs and all that, about 80% of KawigiEdit has been rewritten this time. Just some of the big things:

  • The entire command/UI infrastructure has been reinvented. Actually, what's really happened is there was no infrastructure before, and now there is one :-) No more ad hoc UI stuff glued to some code somewhere. In theory now, commands and settings could be run in some automated fashion (with a little effort, such an idea could even be useful). Also, the UI can be completely customized fairly easily now - you'd have to edit a few XML files and either repackage KawigiEdit with your versions or just manually change the ContestApplet config file to point to it (I can't remember exactly how, but I know it's possible. The problem is that there's no UI yet for editing the UI :-)). There's a few little bits I want to add to the UI infrastructure eventually, but for the moment, I think it's sufficient for what it needs to do, which is make it easy for me to add buttons :-)
  • The editor part itself has been completely restructured. Some of the same code is still there, but almost all of it has been moved to different places. This is a result of making a command infrastructure and making every keystroke recognized by KawigiEdit its own command and then making the keystrokes map to commands instead of entries in a big ol' if/else statement. The part that does the syntax highlighting is still basically untouched, though.
  • Snippets are stored in the same general XML format as the UI, so it's easier to edit with a text editor than the old Java serialized crap.
  • Testing code is generated in a different text editor than your code skeleton. This makes it easier to take out testing code (i.e. - you don't have to do it), and it still allows you to edit it on the off chance that KawigiEdit generates it wrong. Also, compiler output and program output come out of separate tabs now (I don't think KawigiEdit 1 was like that).
  • The watermark is blue now. I don't know if that's better or worse, but I was thinking about doing some kind of cool logo in blue tones, but I never did.
  • You need Java 1.5 to use KawigiEdit 2. The new command infrastructure pretty much requires it, and I've changed a bunch of the code to use generics where appropriate.
  • No more challenge tools. Sorry, I haven't used them myself in more than a year, and I'm not sure anyone else does, either (although I hear them mentioned in the forums occasionally). Plus, I haven't checked to see if they even work since TC's website redesign.
  • Did I mention I fixed the problem timer? All you international competitors who got a gray screen when you tried to open a problem in KawigiEdit, or everyone who had to turn it off but wanted it there can now rejoice.
  • It works standalone now. You don't even need to have ContestApplet.jar in the classpath. The idea was to make it easier to test changes you make locally without being on TC, and also give you a familiar environment for the GCJ if you want it. It may be slightly less polished, but all of the codepaths are the same where possible. I've been thinking about also making a setting to work better with SPOJ, but I'm NOT going to support all the languages that SPOJ does :-)
  • Testing code generation hopefully is more fixed than broken. It now handles VB characters correctly I think, and should consistently generate valid longs and doubles in all languages even in exceptional cases. If you find any problem for which KawigiEdit generates wrong testing code in any language, TELL ME. Emailing me at kawigi at yahoo would be appropriate, or just blab about it on the plugin forums. Sooner or later, I'll set up a real wiki on the KawigiEdit homepage that will have more robust backups that won't get vandalized as permanently.
  • Templates can no longer include custom tags and executable code generators. It sounded like no one used it, and it's not the easiest, most dependable piece of code to maintain, or for that matter, port. For most people, I think the template architecture will look the same (with maybe the names of one or two tags changed to make it consistent between languages).

Basically what I'm hoping is that a few people who are spending some time in the practice rooms will take some time trying this out for me and letting me know if they think it's ready for prime time. If you think you fit that description, get yours today!

I'm not sure if I picked that title because I'm half-way watching Shrek at the same time as I'm writing this, or because I was picked.

So right now there are two kinds of people reading this - there's a group of people who know exactly what I'm talking about, and a group of people who have no clue and want me to post new baby pictures. Yeah, I've got a backlog of those to upload and finally got some of them up last weekend.

So for those of you who don't know what I got picked for, you should take a glance at the Pick Me Contest rules. And if you want to skip to the good stuff, you might check out the results.

I've actually known I was the winner (or one of the winners) for this contest for about a week now (and if it weren't for Yahoo!'s spam filter, I would have known earlier). It's a challenge to keep something like that in for a week; TopCoder just likes to torture me, that must be why I can never hit the legendary 2200 rating line.

Once the results of the contest were FINALLY announced, the TopCoder community took the chance to discuss the winners and the winning entries. The community seems to have unanimously congratulated me so far, which is refreshing, although I expected enough from this fine set of people. More talk has been around the other two winners.

The main comment is that the other two winners (at least under these handles) have never competed, have never participated in the community, and appear to have just registered in order to enter into this contest. Sure, they have great credentials, but they aren't us :-) Now, TopCoder doesn't have the kind of community that hates people for not being them (there are other communities for geeks who want to feel 1337 without actual programming skillz). But in this case, the community specifically expected one of them to be chosen. The goals of TopCoder the company seems to have been to have fair and impartial judging.

In fact, one of them said (in response to questions from the community), "most identifying information (as much as possible) was removed from the submissions prior to voting." I'm more than just a little curious what my submission looked like with identifying information removed. Perhaps Mary Beth was referring to my entry when she said "most". My entry was 500 words of self-identifying information. My best guess is they could remove most identifying information by removing most of the 41 links from my entry before passing it on. Actually, they could leave in about 1/3 of them. But the main point is that I wrote my entry in such a way that the identifying information could hardly be removed without lessening the impact of the essay. I was, however, confident that either my identity or my writing style gave me a chance to win.

Another branch of the discussion on the other winners is the similarities of their entries - both had a sort of top-list countdown style (one of them counted down from 100 to 1 in binary, the other from 5 to 1 in some base >= 6 :-) ). Both put their considerable writing credentials on display without saying anything about why they want to attend the event. Both had the same number-one reason they should be chosen (that they are "fun"). And I'm pretty sure it's more than coincidence that they both go to the same school.

Well, enough about the community response, since there's plenty in the thread linked earlier to get most of that. I also promised in that thread that I'd take a minute to explain my entry from my point of view, and I thought I'd do that here.

First of all, my environment - Almost my entire entry was written in a version of Microsoft Word 2007 that's somewhere in between Beta 1 and Beta 2. The biggest advantage to using Word 2007 is that the status bar has been redesigned (getting rid of the useless stuff that used to be on there and putting stuff you might actually care to look at), and it now displays your word count there. If TopCoder is planning on putting word limits on stuff we write at the TCO, I may have to consider putting a Beta 2-ish version of Office on my laptop before I go.

Second of all, timing - I was probably just about the last entry they received before the deadline, sending my email with about half an hour left before the deadline. I'm living on the edge! Ok, so I just put it off until the day before the end of the contest. Either way, I just barely got it in.

When I started writing it, I'm not sure why I decided to write it like a blog post. For some reason it just came naturally. And I couldn't allow myself to type the word hyperlink without linking it to SOMETHING. That would seem almost hypocritical! Also, I'm not sure how I decided to say that a "hyperlink is worth a thousand words," it became apparent to me looking around the web that I probably coined that phrase right then.

In the second and third paragraphs, I phrase my statements in the general form of guessing what TopCoder is looking for in a winner. I said what I wanted to say, but let hyperlinks explain what I meant. One challenge in this kind of writing style is coming up with stuff to link to, and while I generally had a pretty good idea what to link, one of the links I had the easiest time thinking of was one where I didn't have anything appropriate to link. What made me think of that page? Not sure. Maybe the inappropriateness? Maybe just the complete lack of relationship with what I was talking about. I also found an opportunity to mention some of my contributions I'd made to TopCoder and the TopCoder community in this section, so many of the links are to stuff involving me, including one to a thread I hijacked in the forums that morning.

Following the barrage of 24 hyperlinks in those two paragraphs, I promised to cut down the hyperlinks as I started the final "phase" of my entry, which was appealing specifically to as many specific groups of people as I could. I made the promise to cut down the hyperlinks, ironically, one paragraph before linking to different pictures of my now nearly 6-month-old daughter in 15 consecutive words. Well, it should be obvious what I do besides TopCoder.

So I leveraged the baby to appeal to the first focus group, which was "people who like ultra-cute babies". This group has a high correlation with "people who are female." I've seen evidence of at least 5 or so females working at TopCoder, and I think it's likely that there are several more behind the scenes, so it seemed like a good group to get a few "votes" from.

The next group was "people who coordinate travel", which may be a subset of "people who are female" as well, but I left it in because it was easy to think of.

The next group was people who like good grammar and spelling. I caught myself being every so slightly politically incorrect in that section, so that seemed like a good chance to appeal to the people who have legal interests in my writing.

Finally, I stated that I'd be great to have at the TCO finals just as a spectator, and from a technical and cultural aspect, I'd understand what's going on.

Finally, at the end, I had just enough words left to make one more joke. Maybe that put me just over the line.

Of course, I'm not referring to the sea turtles in Finding Nemo, or the Teenage Mutant Ninja variety.

I grew up in Denver, and spent the largest part of my time away from Colorado in Utah. It was only during our occasional trips to California (where my grandparents and a few other relatives lived) that my sisters and I got to observe the little square reflectors that poke out of the roads all along the west coast. I imagine that they're actually fairly common in other parts of the country as well - in principle they are a great idea. Basically, they make it really easy to see the lines dividing the lanes on the road (which otherwise would merely be painted there) when it's dark. There are white reflectors that go on white lines on the road and yellow reflectors that go on the yellow lines on the road, and your headlights are perfect for illuminating them. Aside from those, some people don't notice that there are also irregularly distributed blue reflectors on the road. Those actually have nothing to do with assisting your driving, they actually mark fire hydrants (if you see one, look around - there's probably a fire hydrant right across the street).

Side comment - I never really thought much before about how reflectors work (both the kind on the road and the kind you put on bicycles). Apparently the idea is that they have tiny mirrors inside them that are angled 90 degrees from each other. If you shine light at any angle into two mirrors facing each other at 90 degrees, the light will always come basically straight back at you.

Where I grew up, it was unreasonable to have these on the roads, because they just don't last that long when snow plows are scraping stuff off the road several times a year. Here around Seattle, it only snows a couple of times a year, and almost never enough to justify heavy plowing. Apparently there are "plow-resistant" reflectors as well, but for how much more expensive they are, I suspect they still won't last more than a few years in a place where snow is so common.

Aside from the reflectors, in Seattle at least (my wife and I just can't seem to remember for sure if these existed in southern California where she grew up), there are a large number of white and yellow rubber dome-shaped things in the road. In fact, it often appears that they install these little "bumps" on the roads in lieu of actually painting lines on there. I suppose this way, the lines are even more visible (both night and day), and if you start drifting to the edge of your lane, you're basically guaranteed to hit a few so you can die awake. Of course, I can't imagine they are even in the same ballpark for cost, and I'm not sure that they have to be replaced much less often than roads normally need to be repainted. My wife started calling these little bumps in Seattle roads "turtles," although I'm not sure what inspired her to use the term.

So speaking of turtles needing to be replaced, there was one time when my dad was in town, visiting us, although also there for business meetings. He was driving along one of the state highways with my wife, and he saw one of these turtles strewn off to the side of the road, and he decided to pull over and pick it up. It seemed like a strange souvenir to keep from Seattle, but it was probably something like a novelty for him, having also lived his entire life in Utah and Colorado.

Well, awhile after this, my wife started keeping her eyes opened for turtles and reflectors that were detached from the road. Every once in awhile, she'll pull over and pick one up, or if it's convenient, just stop and tell me to open the door and lean out and pick on up that has been kicked out into the gutter. Other times, it's more of an activity for when we're stopped at a traffic light (there seems to be an abnormal number of turtles near intersections, corresponding to a large number of potentially detached ones). It seems like a worthy goal to just look around and collect a full set. Since we mostly drive on smaller roads, I'd say the ones we find the most are the yellow turtles. Next are white turtles, which we normally find just near intersections, but also on two-lane roads. More valuable still are the yellow and then the white reflectors. But only once in a blue moon can you find a blue reflector loose for the taking.

Now, to preface this, I want to make it clear that I wouldn't encourage anyone to try to loosen the reflectors, especially blue ones from the road. I just operate on the theory that if there's a reflector that's already broken off, it's unlikely that the city will reattach or otherwise reuse it (if you happen to know otherwise, though, do tell). The reason it's so hard to find a detached reflector should partly be obvious - it's mostly because there just aren't as many of them on the road. But there is a second force at work preventing you from finding loose blue reflectors, and that's the fact that they aren't always on the same part of the road. They all look out of place, so if you see one that seems like it's probably askew, more than likely it's actually still solidly attached (although it's worth noting if it's simply sitting at an irregular angle relative to the road).

Well, for some time now, I've thought about putting some of this strange new hobby in writing, but something happened this weekend which I suppose tipped the scales for me. On the way home from babysitting for a friend of my wife's, we were driving along a medium-sized road in Bellevue, and the road was uncommonly clear (particularly behind us). My wife slowed to a stop in the right line of the road, where there was a blue reflector just sitting in the gutter, and without being an impedance to traffic, we managed to pick it up and take it home with us. A true trophy!

2 Comments
Filed under:

A week ago, my wife and I were walking around downtown Bellevue (and I don't say that facetiously, like when I referred to "downtown Provo" the other day), in a fairly upper-class mall, when on a whim we went to the Verizon Wireless store. I had a hunch that we were probably supposed to be up for new phones with the new-contract discount by now.

Basically the general idea is that you get a free or discounted phone if you sign a two year contract. Then you do the same thing two years later. Our situation is "special", however - our plan had changed a few times before that two years was up. Once this was because we changed plans (I think we got more minutes or something, I don't remember exactly what the point was), and again when we changed our phone numbers to Washington phone numbers. In spite of already having basically signed another contract, my hunch turned out to be correct that we still could get the discount on new phones to replace our old crufty ones in October, two years after the original contract started. This was contingent on our contract being extended to two years after we got the new phones, which is only maybe half a year longer than our contract already was.

In addition to getting lower-priced phones, basically all phones had some kind of $50 mail-in rebate, and my wife (being the primary account-holder) had an additional $100 discount on her phone from Verizon. What this basically meant was that we could get one OK phone and one fairly nice phone for free (after rebates), but we had to buy any accessories ourselves. We decided to give me the nicer phone (on the premise that I'd probably enjoy it more I guess). They're both Samsungs, and they both have cameras included.

This camera thing is strange to me, since just a few weeks ago, we were looking at all these pictures taken by Sariah's cousin's phones and were complaining about how all theirs were grainy or pixelated compared to the clear, high-resolution pictures taken with our real camera. I certainly don't think we're planning on doing any real photography with our phones (any more than Jonathan would), but I've been surprised at the ways we've found to make it useful.

There's the obvious point of having a good way to set a wallpaper on the tiny medium-resolution screens that are becoming typical on cellular phones now. Then, in my case, there's the ability to take pictures of Gwynneth really quickly if she's being cute - not to leave digital photos for our posterity - so that I can show them off to people at work or when I take a trip. In addition to taking pictures, my phone is capable of taking a few seconds of low-resolution video (with sound!). This integrated A/V is just what it takes to make some people (particularly some females) smile and say things in goofy high-pitched coos.

The point where these things get really interesting (and I suppose one of the big ways they get advertised) is where you can start sending these pictures and videos around to other cell phones for a couple extra bucks per month. While I really don't think it's happened yet (sure, in some circles, sending pictures along with text messages is a really big deal), I think the media-centric cellular phone may some day do for telecommunications what DVDs did for home entertainment. Let me make the analogy.

In film, for decades (heck, nearly a century even), the only truly great way to watch movies was in the theater. For about half that long, after the movie's earnings at the box office started going down, you could also get the movie on a VHS cassette and watch it on your television through your VCR. Maybe I'm being generous or stingy with the dates, I honestly haven't done a ton of research around recorded video media. And there's been some other sorts of media for video as well, like laser discs and the infamous betamax, and slightly more recently, hi-8 tapes. And while I'm sure I'm missing tons of them, the bottom line is that VHS was the standard format to buy movies in simply because it caught on - whether or not it was better than anything or everything else, there was just a lot of movies already available for it. Now, many times, if there appeared to be a reasonable demand, it was fairly easy to start producing these same movies on the other types of media - you just had to record the data in the other format. If you could copy it from the original film real, you were basically guaranteed that it would be the best that movie could be on that type of medium.

But when DVDs started coming out (mid to late '90s, if I'm not mistaken), it started to look like the extra level of interaction possible with a video recording was something that we just hadn't even thought about before. The result is that some early movies ported to DVD didn't take full advantage of the interaction model, but then again, nothing takes full advantage of a brand-new technology. What was really interesting is that within a few years, it would almost be silly to release a DVD recording of a movie without special features. I daresay that some movies can be better experienced in the home though a DVD player than in the theater (although it's hard to beat a real movie theater when it comes to big explosions and stuff :-) ).

The (potentially negative) side effect of this is that older movies on DVD come in two general categories - movies that just get re-recorded to DVD with no extra features, and movies that need to be revisited to pull the special features out of some retired producer's butt. When buying or renting the first category, the consumer feels gypped, as if they didn't get their full money's worth from the DVD. In the case of the second, the consumer may wait for years before being able to enjoy the movie on DVD. Ever notice how Disney feels like it's never quite done moving things over to DVD? It can be expensive and challenging to make the DVD version of a movie from the pre-DVD era DVD-worthy. The reason? People weren't saving those deleted scenes, shooting extended scenes, keeping interviews with the actors, and doing behind-the-scenes documentaries for every movie they made 10 years ago.

Ok, enough about movies. This post was supposed to be about cellular phones, remember? My point is that we've been using telephones for a century as well. For a couple decades now, people have slowly started to adopt mobile phones (well, rather quickly in the last five years). This transition brings a few changes - people are easier to reach, it's way easier to pick people up from the airport, and almost everyone has a way to call someone in an emergency, or when they're lost. But these aren't sweeping changes - people still have the same format of phone numbers, they call people's home phones and business phones, it's all just more convenient for people who aren't at home or in the office.

But when telephones start getting used more and more for things other than telephony, there is potential for this sweeping conversion to a telecommunications medium that just plain can't be understood by the traditional medium. My home telephone just plain doesn't receive pictures, videos and text messages and do anything useful with it. With the exception of text messages, neither can my old cellular phone. This means that if there is a point where these sorts of things are what people expect their cellular phones (and those of others) to do, one of two things needs to happen to the older phones (including those on land lines here) - either they need to start talking the talk of the new cellular phones, or they will stop being people's primary communication medium.

Of course, for some people, the idea that one's primary phone number is their mobile phone is hardly something to look for in the future, but other people like having slightly larger, more comfortable phones in their home, particularly for local calls. Does my grandfather want a phone in his home that can receive pictures of my baby fresh off my camera phone? If it were easy and inexpensive enough to do, I'd say the answer is yes. But until someone invents the DVD player of home telephones, it just won't happen.

I had a good time visiting Utah for the BYU Career Fair yesterday. I got to see some relatives (my sister and her husband, my brother-in-law and his family, and my... cousin...-in-law), and I saw several people who I studied with, worked with, or TAed for when I was a student. I also saw Viper (a.k.a. Michael Bailey), my teammate at the International Collegiate Programming Contest.

Let me say for a second that in the 4 or 5 minutes I'm talking to a person with their resume in hand, I'll tend to ask what areas they're interested in, or technologies/products they think they'd most enjoy working on. I don't ever want to hear the answer "anything." "Anything" means that you're really passionate about "nothing" and probably not particularly good at anything yet either. Maybe that's harsh, but I think the point where I could say "such-and-such is what I've been enjoying doing lately", also the point at which I was probably doing that thing when I should have been studying, was the point where I started to stand out among my peers, and once I actually learned how to put together a sane resume, I got my internship at Microsoft the next summer.

This being the first time I've ever traveled for business, and I swear I'm not making this up just to link to this video, I was a little wary when I had a strange experience in an elevator. I got in the elevator of the hotel I was staying in (Provo Marriott, right in what I suppose could be termed "downtown Provo") and pushed the button to go the 4th floor where my room was. It went up and dinged as it hit the 4th floor, but didn't stop. Then it continued to the 6th floor, where it opened about a foot and abruptly closed again. Afterwards, it went back down to the 4th floor and opened. I'll tell you what - I looked around to see if some snooty-looking guy in a suit was in the elevator with me so I could let him go out first. Thank you, Microsoft marketing, for making me superstitious.

And speaking of superstition, a little bit of random buzz has been about in the various divisions around Microsoft Office about how this year's release - codenamed "Office 12" (don't ask me how a version number became a "code name") - will be followed directly by "Office 14". When asked about it, Steven Sinofsky said that while it isn't rational, it's still not unprofessional to skip the number 13 because it's unlucky in western culture.

Whenever the subject of Office 14 comes up in conversation, I can't help but mention that we should skip 14 instead of 13 in the far east. The primary "unlucky" number in at least China and Japan is four, because the word for four in those languages sounds very much like the word for "death." Just as some buildings in the USA skip the 13th floor, some buildings in China don't have 4th floors, hospitals never have wards numbered "four", and sim cards are cheaper if their phone numbers have a 4 in them. One study (can't find it now, hopefully I'll find it later) even suggests that Chinese-Americans are more likely to die of heart attacks on the fourth day of the month. So my big proposal is to "localize" 14 to 13 in the Far East. 13 isn't unlucky for them, and 14 is (actually, I should add that my mother-in-law, raised in Hong Kong, considers 14 even more unlucky than four). Of course, in the end, it will take us 2 years to decide that's a good idea, and then someone will be in charge of changing the versions based on locale (hopefully not me).

Anyways, until next time, don't use version 13 of any software, and avoid elevators at all costs.

As a few people know (but probably not most), I'm going back to Brigham Young University on Wednesday to represent Microsoft at their semi-annual career fair. If you are someone I know in Utah, and you want me to bring you anything from Seattle, you should let me know before Tuesday. If you're someone at BYU, it's Wednesday, 1/25 in the ELWC Garden Court.

I've never done a recruiting trip before, but it sounds like it could be fun. While I know that our booth will probably be swamped with Computer Science and various Engineering and Technology students with varying degrees of interest, as well as business and finance students with loads of interest but less of what we're looking for, I hope we won't be so swamped I don't have time to talk to the people. How am I supposed to find out who is worth having Microsoft interview if I only barely get to say hi? Anyways, if you're one of those really brilliant programmers and you come to talk to me, let me know that you're one of those brilliant programmers, so I can write you down. And if you're a mediocre CS student who's stopping by just to leave the resume with everyone who matters, mention that as well. Not that I imagine many people reading this will be there looking for jobs or internships are going to read this first, nor that they'll just come up and tell me that they're not really that good, even if they did read this first.

And speaking of Microsoft stuff, yesterday I got an interesting little piece of interoffice mail. It was a small bottle of hand sanitizer that said something on it about not spreading the flue. It also had the URL of an intranet site: "http://influenzareadiness". Occasionally, things like this get distributed around Microsoft, either by giving them away in the cafeteria, putting them in everyone's mailboxes, or sometimes sending people around to give stuff out in person. It's an activity they call "spreading awareness," which the more critical among us call "justifying your existence."

Basically any new product or anything that could be considered a "good cause" requires an intranet site, pamphlets, table tents, and some random item (in this case hand sanitizer, but I've gotten CDs, pens, paper weights, beach balls, and all kinds of other stuff), and a team of people whose purpose is to "spread awareness."

The best example I can think of is every year we have a month-long giving campaign where people are encouraged to give to charities through the company. During this campaign last year, Jeff Raikes, the President of the Microsoft Business Division, personally came around my entire building (in which most of the Microsoft Office organization works) and personally gave each employee a "spreading-awareness" cookie - if I remember right, it was a heart-shaped sugar cookie with green frosting with "http://give" written in white frosting. Now, I know that Jeff Raikes must have a +1 awareness modifier, but it just seemed strange that I was personally delivered a cookie to my office from my boss's boss's boss's boss's boss's boss. Does that make him my 4th great grand-boss? He reports to Steve Ballmer, who works for a guy named Bill Gates. Normally that sort of work is done by people who are paid a few orders of magnitude less. It's likely that the 10 seconds it took to say hi and give me a cookie was worth a couple bucks to the company. Anyways, just one more thing I maybe should have mentioned in reply to my sister's list of brushes with fame.

As you can imagine, our little baby girl has grown quite a bit in the third of her life that she spent in Hong Kong. Our primary reason for spending the holidays there was for a family reunion with my wife's mom's family (some of which live in Hong Kong). Being the youngest person at pretty much every event, she usually got plenty of attention (which she sometimes liked more than others).

As we were leaving, Gwynneth was starting to really smile when she was happy or otherwise found something humorous. Usually this was when she saw her mother after not knowing where she was for a little bit, but when you see a newborn baby start to smile (and realize that they're just learning how to do it), you can't help but get a huge grin on your own face. As the trip wore on, she started smiling more and more. The interesting thing about this is that we could really start to tell what things in life she really enjoys.

The most obvious and strange thing we learned is that Gwynneth really likes to have her diaper changed. It's generally hard to get her to actually smile for the camera, partly because the camera distracts her from whatever was making her smile in the first place, and partly because the smile will only normally last for a second, and our camera takes a second to actually take the picture. However, if you put her on the changing table and just take a couple pictures, you have pretty good odds of getting a smile (I haven't uploaded any of those yet, however).

So those of you who are in a really depressed mood and have a dire need to see a smiling baby to help you smile, and those of you who just love cute baby pictures, this picture is of my mother-in-law playing with the baby.

More pictures of Gwynneth are also available, both from Hong Kong and before. But if you're the kind of person who needs more than visual stimulus to raise your voice that extra octave, you might enjoy this sound bite. What is that, you might ask? Earlier this evening, after my wife came to pick me up from work, Gwynneth had fallen asleep in her car seat while my wife was cooking dinner, I came with our new computer microphone (for Christmas, from my father-in-law) and got an 8-second recording of little Gwynneth snoring. Enjoy!

1 Comments
Filed under:

Some of you have noticed I haven't been posting so regularly because of my trip to Hong Kong. Well, I'm finally home (and all you who have emailed me through this blog in the last month and finally got a response yesterday now know why). I don't think any company in the world makes having a baby easier than Microsoft - and the trip to Hong Kong was just a "clever" use of my 4 weeks of paid parental leave. I'm a father. I was never pregnant, and I still get 4 weeks paid leave.

Before I get too much more into my trip, I'd like to take a minute to thank Brian Clevinger for my official Quote of the Day: "Can we try that again, only without the stupid parts this time?" Sariah will attest that I was giggling pretty rampantly when I read that. I don't think she appreciated it as much, but that may be in part due to the fact that she didn't really get the joke before that.

So, flying with a baby across the Pacific Ocean - Going there wasn't too bad. Gwynneth slept through most of the 15-hour flight from Los Angeles to Hong Kong. Then we arrived at about 6:00 AM in Hong Kong, and while she didn't go to sleep that night until about 2:00 AM, that's what she had been doing in Seattle, we couldn't really attribute that to jet lag - she was completely lag-free!

On the way back, Gwynneth basically refused to sleep on the flight from Hong Kong to LA. By the end of it, she was obviously tired, but just not in the mood to go to sleep. While we were waiting in line at LAX, she fell asleep, and slept relatively continuously while we waited for our flight (it was delayed about 2 hours) and on the flight from LA to Seattle. She was so tired (and cranky when she was awake) that we didn't have the heart to try and wake her up, but that was the worst time for her to be getting her sleep. We needed her to sleep early in the other flight and then when we got home.

We got home at around 10:00 at night, and my wife and I were pretty ready to fall straight asleep, but little Gwynneth wasn't. In fact, Gwynneth wasn't ready to go down again until about 10:00 in the morning, which (as Sariah pointed out) is 2:00 AM in Hong Kong. Since then, we've managed to get her down earlier (maybe 9:00 AM), so at this rate, I estimate that she'll be on her regular sleeping schedule in around 2 weeks. The sad thing is that I think we wouldn't have had an ounce of "jet lag" if the baby didn't keep us up. Maybe the term "jet lag" is just something that babies made up so we don't blame them for not being able to sleep normally after a trip (or maybe it was invented by parents who couldn't remember that their sleeping schedule was already messed up).

One other thing that's both nice and annoying if you're traveling long distances with babies is what you do with the baby during the flight. The best case is what we did on our first flight from Seattle to LA - the flight attendant got the person next to us to move up a row and we put her in her car seat in our same row. On the same flight coming back, the flight was full, so we had to just hold her in our laps. On our transpacific flights, we were on 747-400s. On these planes, there are certain rows with no seats in front of them, and on the wall in front of the middle section of those seats (and this could be an airline-specific thing, but I seem to remember seeing them on other planes I've been on), there are these little platforms that fold down in front of the seats, at about chest level (higher than eating trays, which come out of the arms of your seats if you're in these seats). They are about the width of 2 seats (there are two in front of four seats), and the airline has bassinets that they can strap to these platforms for babies to lay in. The catch is that they're not supposed to be in there when the "fasten seatbelts" light is on - instead, they're supposed to be wearing their "baby seatbelt". I suspect the baby seatbelt is an airline-specific thing, because on the way home, the people on our last flight had no idea what they were. Basically, they're like a seatbelt strap with a tangent seatbelt loop that you buckle your seatbelt through, so the baby is seatbelted to your seatbelt.

Some other things should be noted about seats with no seats in front of them. As I mentioned, their eating trays fold out from the arms of their chairs. That's fine with me, even though they seem to sit lower and be a little flimsy, they don't move when the person in front of you reclines. The other thing that's noticeably different is that the TV screens they have on most large planes can't be on the seat in front of you, so instead they come up from under the arm of your chair. When they're folded out, they are on a little pole coming up from one side of you and they come up right in front of you, a little lower than they would be on a seat, but angled so you can still see it fine. Last time I sat in a row like this, the plane only had a projection screen in front of all the seats instead of using little TVs in front of each seat - you only have one choice of movie, but being in that row means you have front-row seats! This time, it wasn't so lucky. It turns out that the place where the TVs end up and the place where the bassinet platform folds to is the same place. And the way that they fold and rotate basically doesn't allow any way to have the bassinet there and the TV in any place where you can see it comfortably at the same time. The end result is that the baby is our in-flight entertainment.

In general, I enjoyed my flying. I'm really bad at sleeping on the airplane (I'm probably just not a regular enough traveler), so I would have REALLY appreciated having a movie or two during the flight, but the airline we flew for our long flights (a Hong Kong-based airline called Cathay Pacific) has some interesting little quirks. We didn't like their service too much on the ground (it seemed like they'd let us board early because of the baby, but they wouldn't tell us that or make a call for people to board with infants and small children like some US airlines do), but things were much better once we were in the air. They have a little area near their kitchens where they just left some cups of water and random snacks (which were swapped in and out during the flight) - peanuts, Tim Tams, biscuits - things like that. I think they called this the "communal snack area" (leave it to a Chinese airline to make everything sound Communist). I'm a fan, though, the snacks were good (I admit, my wife might have snagged a few Tim Tams for the road, since you can't buy them in the US), and having an easy way to get some water when you're on a flight that's a little bit too dry from air-conditioning is almost a necessity.

It gets better - a little-known fact is that you can also call a flight attendant and ask for a Cup O' Noodles. I'm not sure if there are other things available or not, but they go and cook it for you and bring it out with a spill-reducing base, a napkin and a pair of chopsticks. It should be noted, too, that the Cup O' Noodles you get in China is way better than the kind you get in the US, and again, after being in a dry airplane for about 5 hours, it's really refreshing to have some soup and inhale some of the steam from it. Plus, it tastes good.

Anyways, next time I'll talk more about the baby and not her sleeping schedule (speaking of which, I should be mean and wake her up now). Pictures coming soon, too!

11 Comments
Filed under:

Hopefully you'll forgive me for posting this later than I said I would - I was on a plane going to Hong Kong when I finished writing it, and just now had an opportunity to post it for your viewing pleasure.

Last week I explained what binary searching is and how to do it. However, checking for the existence of an element in a sorted array is just one (particularly easy to explain) way to use this technique.

Any time you have a problem where you could guess an answer to a question and dependably know if it's less than or greater than the desired answer, you can apply binary searching. Also, sometimes binary searching can be used to approximate values that can't easily be calculated exactly.

nth Roots

Let's take the example of finding the nth root of some number. Normally you can just call a library function to do it, but minus those tools, you could use binary searching to estimate the answer. Let's say we want to have a function that looks like:

public double nthRoot(int n, double x)

To make things easier, we'll assume that n is small and x is positive. The first step is to come up with bounds for where the answer could be. If x is positive, the nth root is also positive (sure, if n is even, it also has a negative nth root, but if someone wants that, they can negate it themselves!). That means we can start with a minimum of 0. Intuitively, we could say that the nth root will always be less than x, but that's not the case if x is less than 1. So, we can start our maximum bound as either x or 1, whichever is greater.

The next step is to ask ourselves how accurate we want to be. The more times we iterate on our binary search, the lower our margin of error will be (for each iteration, our potential margin of error is cut in half). If we iterate a flat 100 times, we'll be able to accurately find about 16 decimal digits for the root of a 10-digit number. That's probably sufficient for most of our needs, and also isn't too far off from the accuracy we can store in a double.

My code looks like this:

        public double nthRoot(int n, double x)
        {
                double min = 0;
                double max = Math.max(1, x);
                for (int i=0; i<100; i++)
                {
                        double mid = (min+max)/2;
                        double midpow = 1;
                        for (int j=0; j<n; j++)
                                midpow *= mid;
                        if (midpow > x)
                                max = mid;
                        else
                                min = mid;
                }
                return (min+max)/2;
        }

If we expected n to be larger, we could change the inner "j" loop to do something more efficient, but this is better for clarity (and most people don't care what the 2000th root of some number is).

AutoLoan from TopCoder SRM 258, Division 1 250/Division 2 500

The problem here is to figure out the Annual Percentage Rate of interest on a car if you know what the monthly payment is, the number of months it takes to pay off the loan, and the price of the car. The interest is compounded monthly (so the amount of interest charged each month is 1/12 of the APR). The input constraints on this problem are also important to consider:

  • The price of the car is between 1 and 1000000.
  • The monthly payment is between 0 and price/2.
  • The number of payments is between 1 and 600.
  • The answer is between 0 and 100.
  • We need to find the answer to with a margin of error of 10-9

Well, the first step is done for us - we have a minimum and maximum bound. We also know what accuracy we need (but to be sure we don't get surprised, we should go a little further). The basic algorithm we follow is just like the nth power code above, except for the contents above. If we think of a continuous binary search in this way:

max := some value
min := some value
while max-min > threshold
	mid := (max+min)/2
	find out if mid is too low or too high
	if mid is too low then
		min = mid
	else
		max = mid

The only thing left for us to figure out is deciding if mid is too high or too low. This can be done with a simple simulation - take the price, multiply by 1+mid/100/12 and then subtract the payment amount repeatedly for the number of payments, and if the final balance is less than 0, the interest rate was too low (otherwise it was too high).

Aggressive Cows, from USACO

When many people read this problem, it looks like an obvious Dynamic Programming exercise. Now, I won't tell you that it couldn't be solved with DP, but the way I found to solve it was with a binary search.

The problem is that you have N stalls at unique locations to put C cows (C is between 2 and N, inclusive), and you want to maximize the minimum distance. The locations of the stalls are on a single line, and you need to return the largest minimum distance between cows.

Since I already tipped you off that this can be solved with binary searching, you might be wondering what exactly you are binary searching on. Well, the positions of the stalls are between 0 and 1 billion, so we will never have an answer better than 1 billion, and we can't have them any closer than 1 if the locations of the stalls are unique. So there are some bounds. You could also come up with a better maximum bound - if you find the minimum and maximum actual values of stalls, you could divide the difference by C-1 and get a smaller bound, but in the end, it doesn't matter much.

Now all we need is to be able to decide, given a guess at a minimum distance, if it's too high or too low. If we sort the stalls, we can make a linear pass on the stalls and put each cow in the first one that isn't closer than mid from the previous. We can prove that if an arrangement exists where all the cows are spread out by at least mid, they can be assigned this way, because we can never come up with a better situation by skipping one that isn't blocked. Our goal is to find the largest mid for which an assignment exists.

Since we can figure out if a distance is possible, the only other piece of information we need to show that binary searching works for this problem is that there is some distance where all greater distances are impossible and all smaller distances have valid assignments. That way, given a guess, if there is a valid assignment for a given distance, it is less than (or equal to) the final answer. Otherwise, the guess is too high. This is easy to prove, because if a valid assignment exists for a distance d, that same assignment is a valid answer ford-1, so there can be no "islands" of valid distances.

DNAMultiMatcher from TopCoder SRM 187, Division 1 900

I'm almost positive the writer of this problem didn't intend for it to be solved with binary searching, but the fact that this difficult problem has so many valid solutions is what makes it so cool. I think the intended answer was to build a suffix tree (which is possibly improved by the fact that there are only 4 valid letters), but after reading the editorial on the match for which this problem was used, the solution that made the most sense to me was the one that used binary searching.

The problem here is to find the longest common substring between 3 long strings (each string is up to 2500 characters). The obvious solution is to check each substring of 2 strings by length (starting with the longest possible length and decreasing) and if we find a common one, look to see if it exists in the third. As with most obvious solutions, this one could take a good hour to finish on strings of this length.

The binary searching solution is to start by guessing the answer (as we like to do with binary searching), and then finding out if there is a substring of that length that is shared in common by all 3 strings.

In order for this to run under TopCoder's time limit, we need to be able to figure out if such a common substring exists in O(n2) time or less (so the runtime of the whole algorithm is O(n2log(n))). Even this part of the algorithm isn't obvious. The way we can do it is to create a hash-set of substrings of length mid for each of the strings - this can be done in O(n2) time - and then find the set intersection of the three sets (each intersection can be done in O(n) time). If you don't have good libraries to help you, the implementation is non-trivial, but the concept is valid. The Java standard library, STL and .NET Framework all have structures to efficiently do this, though, and those are the languages used on TopCoder. Using a tree-set could also work, but the runtime bound is raised slightly to O(n2log2n).

Summary

A problem may be able to be solved with binary searching if:

  • You can set a finite bound on the range of possible answers
  • Given a prospective answer, you can correctly identify if that answer is larger or smaller than the correct answer

As an exercise for the reader, a good (rather advanced) problem to try with binary searching is NegativePhotoresist on TopCoder (SRM 210, Division 1 1000). This problem has sentimental value to me, because it was the first division 1 hard problem I solved correctly during a competition.

One last note - a friend pointed out on last week's post that the arithmetic for finding mid ((min+max)/2) could overflow for large numbers. If the numbers you are using are particularly large, you might consider using min+(max-min)/2 instead. The problems discussed above are written so that the applicable range is small enough that this isn't necessary (the constraints on the Aggressive Cows problem were written so they wouldn't quite overflow a signed 32-bit integer if the arithmetic from last week was used).

It's about time I started actually talking about programming on this blog.

You start out with a sorted array of numbers a with n elements, and you want to find out if some number x exists in a. With a linear search, we could start at the beginning of a and check if each one is equal to x, and if it is, we return true. If we reach the end of the function without returning, we return false. On average, we will do n/2 comparisons if x is in a, and we will do n comparisons if x isn't found. The general runtime function is O(n).

However, we can take advantage of the fact that a is sorted - if we guess any location in a, we can figure out if the location of x (if it exists in a) is less than or greater than that location. An easy way to express this is using a recursive divide-and-conquer implementation, like so:

        public boolean find(int[] a, int x, int start, int end)
        {
                // Trivial case: only searching one element.
                if (start == end)
                        return a[start] == x;
                // Pick the middle element
                int mid = (start + end)/2;
                // If the middle element is too small, search from
                // the one after that to the end.
                if (a[mid] < x)
                        return find(a, x, mid+1, end);
                // Otherwise, search from the start to the middle.
                else
                        return find(a, x, start, mid);
        }

Is this really better? Yes! Now we will make at most log2n comparisons! It may not make any difference with small lists, but this means we only need to make one more comparison when our data doubles in size. If we have a list of 1000000 items, we'll make at most 20 comparisons to find what we want, and with 2000000, it just goes up to 21. This is (literally) an order of magnitude better than a linear search.

This can also be done easily without the recurrence:

        public boolean find(int[] a, int x)
        {
                int start = 0, end = a.length-1;
                while (start < end)
                {
                        int mid = (start + end)/2;
                        if (a[mid] < x)
                                start = mid+1;
                        else
                                end = mid;
                }
                return a[start] == x;
        }

This technique is called a "binary search." Normally, however, we aren't just looking for a number in a sorted list of numbers (although sometimes we are). There are actually lots of other practical uses for binary searching that most people don't think about, which I'll talk about specifically (with examples) next week.

Binary Searching Gotchas

There are a few things that are easy to mess up on with binary searching. In my opinion, it's alot easier to get binary searching right on continuous values (using doubles rather than integers like in my sample code) - you take your middle value, compare, and then the middle value becomes either the minimum or the maximum value.

However, you'll notice in the code I provided, I just check if a[mid] < x, and then either the minimum value becomes mid+1 or the maximum becomes mid. If you look closely, it's obvious that it's a proper application of knowledge, but why not use <=? Why do I choose to use < instead of >? There is actually a reason.

The case that's easy to mess up is making sure that you'll always terminate toward the end (because you're using integer division). When doing variations on integer binary searching, take a second to think about what will happen in those kinds of cases.

So, tune in next week for some interesting, less obvious applications of binary search. In the meantime, here are a few problems to think about for which I've used binary search (solutions to at least some of them next week):

  • Aggressive Cows, from USACO, hosted on the Sphere Online Judge
  • DNAMultiMatcher from TopCoder SRM 187, Division 1 900 (you might need to sign up for an account on TopCoder to see their problems.)
    • Tip - this problem is hard because of time - runtime on TopCoder problems is generally limited to O(n5) where n=50 (about 300000000 iterations, assuming the operations going on aren't too intensive). In this problem, the length of the strings is up to 2500. The naïve solution of iterating every substring of each sequence is O(n6), or maybe O(n4) if you use a better substring searching algorithm, but with that size of N, that's still about 100,000 times too slow. Of course, my favorite thing about this problem is that it was solved in 3 or 4 completely different ways, none of which were obvious.
  • AutoLoan from TopCoder SRM 258, Division 1 250/Division 2 500
    • There may be a closed-form solution to this, but using a continuous binary search is much easier to figure out.

Here's some assorted non-topical babble.

You all want to hear more about the baby, of course- the baby weighed in at 9 lbs 12 oz at her "one-month" appointment this week. That's a hefty gain of almost 3 pounds in her first 5 weeks. Now, granted, I could easily put on 3 pounds in 5 weeks, but could I put on almost 40% of my own weight in 5 weeks? I don't think so.

Something else I didn't know before - unplugging computers can help them boot. We had a power hiccup the other day and I think basically everyone's computers lost power for a second. One of my computers, however, wouldn't boot after the loss of power. I tried switching plugs and tried pushing the power button several times. It's power and disk lights came on, and then 2 seconds later they turned off again. Someone down the hall figured out that if you unplug this kind of computers for about a full minute, then plug it back in, it boots normally again. Add that to your list of trouble-shooting techniques.

My laptop can run Unreal Tournament 2004 with all the display options on and set to the highest setting (trilinear filtering on, all texture details on the highest setting, full shadows, my screen's native resolution with 32-bit color, etc) and still run smoothly. I'm not sure yet if it runs smoothly on every level (some maps seem to run slower than others), but I think that's pretty impressive. I'm also almost positive that my desktop computer couldn't do that, and probably can't run it with the default settings (but then again, maybe it can). Most people don't use their laptop as the workhorse/game machine instead of their desktop, but then most people don't have an 80% faster processor, twice as much RAM and 3 generations newer graphics hardware in their laptop.

It sounds like the Office 12 beta has been hitting the blogosphere, but if you're reading up on it, take the first couple reviews with a grain of salt - someone pointed out that some of the early reviews are really just there to be the first review out, and they probably didn't take too much time doing anything practical with the product first. That said, my favorite source for (public) information about Office 12 is Jensen Harris, and the other Office blogs he links to are worth looking at if they are topically interesting to you (many of them aren't as active as Jensen's, though). Perhaps I enjoy Jensen's blog even more because it's something I'm intimately involved in at work (one of these days I'll probably actually talk about what I'm responsible for at work).

I had a filling this morning, but I decided to have lunch at 12:00 with my coworkers like I would on a normal day. I had just enough feeling in my tongue to notice if I was biting it, and basically no feeling on the left side of my bottom lip. Eating with half your mouth numb is an interesting experience, and I think I ate slower than normal. The weird thing, though, was right before I finished - I took the last little swig of my apple juice, and I had the strange sensation of being able to taste the apple juice on my whole tongue, but only feel that it was cold on one side. It felt like I was drinking apple juice out of one cool straw and one lukewarm straw at the same time.

And now, it's time to talk about blogging. Some of you have noticed I abruptly stopped posting sometime almost two weeks ago. Part of that is because I've been distracting myself with other things (KawigiEdit, Unreal).  Part is because I've just been starting entries and not finishing them. I actually started this post on Monday, and just didn't get around to finishing it until tonight.

Another thing I started over the last two weeks and just didn't get around to finishing is a post about programming techniques (isn't that what this was supposed to be about?). I think I'll start doing a post about algorithms on Fridays - starting tomorrow with part 1 on Binary Searching (we'll call it a beginner's guide to David Plass's favorite trick).

As I've mentioned in passing before, I became a father recently. Gwynneth Kwun-Ning Reeder was born at a little after 7:00 PM on October 22nd. As she's just going on 4 weeks, I and others (basically my mom) have noticed that she has an endless shifting supply of facial expressions. My mom even claimed that she couldn't take a picture that would show how cute she is, because in order to really tell, you'd have to see her changes faces at you.

Well, obviously some looks are more potent than others. As I was explaining to my sister, Lisa, a few weeks ago, there's this one I like to call "Blue Steel." And then there's this completely different one called "Le Tigra." I think they're inspired from the infamous "Ferrari" look, but maybe I'm just imagining it.

When she's not working on her power-looks, she's really busy being cute (well, and converting milk to poop).

Abigail, one of my coworkers and infamous keeper of two blogs, recently stated that her child would be capable of forming perfect, complete English sentences by the age of one. She's a bit of a grammar Nazi. Now, I've only been a father for less than a month, but I felt it necessary to mention to her that once you have the baby, your standards take a bit of a dive. Where you thought you'd be congratulating them on their great achievements and acts of self-discovery, you find yourself congratulating them for every burp or fart they produce, or really almost anything they manage to do that isn't crying (including grunting, stopping crying, eating, pooping, peeing, making faces, moving their arms and pushing with their legs). I'd probably congratulate her for crying, too, except that such an action would likely just prolong the crying, and no emotionally stable people I know like babies to cry for long periods of time.

A few interesting things I've learned to do with babies. The first is something I get from my dad. My dad was always quite fascinated with the small number of instinctive reflexes babies have. My dad spent many years abusing my sisters and me by trying to get these reflex reactions out of us. Frankly, it's just about the only fun thing you can do with a newborn, since they haven't really learned how to play and laugh yet. The three reflexes that newborn babies have when they're born or usually relatively soon after:

  • The sucking reflex. This one is important for obvious reasons, and it's probably the only really practical reflex in the bunch. Still, some people think that babies come right out trying to suck on stuff, which just isn't the case. They still have to learn it. Jon sometimes says that the only intuitive user-interface is the nipple, but I think if we got one in the usability lab with some first-time users, we'd probably reject it. That being said, finding first-time users that were available to come to Microsoft's usability lab would be quite difficult.
  • The grab reflex. Within the first week, if you put something in the insides of a baby's fingers, they tend to grab it. Hard. Considering how underdeveloped their muscles are, babies have a reasonably good grip. Gwynneth is about strong enough for me to put my finger in her hand and pull her up by her grip to a sitting position. She doesn't quite make it, though, because the action of her lifting her head off the ground distracts her from grabbing (and she can't really hold her head up anyways). My dad used to put his thumbs out for us to grab and lift us up by his thumbs (not sure how old we were). My theory is that once Gwynneth discovers that her thumbs can grab in the opposite direction of her fingers, she'll be able to support her weight as well.
  • Finally, they have a panic reflex. Babies are adjusting to everything around them, so they don't just get startled by random things around them. Some things do startle them, though, at which point they instantly extend their arms and legs straight out. One good way to trigger it is to hold the baby, and just when they've basically dozed off, move one hand out from under them (I shouldn't have to say this, but DON'T DROP THEM). Part of their back will probably drop for a second, and then they'll stiffen with their appendages out. Similar effect sometimes if you just put them down somewhere. It's a lot easier to startle a sleeping baby than an alert baby, and often it won't wake them up.

My baby has a particularly interesting sub-reflex - she likes to poop when she's on the changing table. As far as I can tell, it's some kind of Pavlovian association she makes, and I'll start to change her, with a mildly wet diaper, and then the X-treme, Real-Time Diaper changing. Five minutes later, you have a diaper full of post-diaper-removal poo.

And I'm sure you all wanted to hear about that last part.

12 Comments
Filed under:

I talked a lot yesterday about TopCoder and Microsoft's hiring interest for Developers, but only hinted at the story that was really behind it all.

The reason this was all on my mind is really for two related reasons -

  1. TopCoder announced that MSN would be sponsoring 8 Single Round Matches (hereafter "SRMs") and advertised that MSN is hiring TopCoders.
  2. TopCoder Vice President George Tsipolitis (the link isn't that interesting) emailed me (as well as a few other notable members of the TopCoder community that work for Microsoft) that he and some other members of the TC staff would be in Redmond to give a presentation to MSN's HR staff.

Now, I'm really citing these two reasons in the opposite order from which I found out, but since there's really only a few hours' difference, I don't really care.

There was apparently a series of meetings between MSN people and TC people this afternoon, to which I and 4 other TopCoder members working at Microsoft were invited to one. As the meeting was about to start, we took some time to chat with the admins, which I had never met in person before (always wanted to, but never quite made it to their on-site tournament finals). Among the TC representatives were George Tsipolitis, who contacted me about the event in the first case, and Mike Lydon, who in my dealings with all things TopCoder is the one who I'd interacted with the most of the ones who were here. The TC members from Microsoft were myself, hilfiger (who should also blog about this), sjelkjd, gladius and zoidal, who, aside from being the highest-rated current TopCoder member in the state of Washington (guess who's second, I had no idea he was here.

The TopCoder staff encouraged us to participate in the meeting, but didn't make it particularly easy. While it's hard to anticipate the kinds of questions they will get and who is the best to answer them, I might have appreciated even a general "Does one of you want to field this question" kind of look from George as he was doing his presentations. Still, there was one question for which I didn't feel he gave an adequate answer, so I raised my hand and volunteered my two bits (which is basically right from what I said in yesterday's post).

After the meeting, the TC staff asked if we had a few minutes we could spend with them, and we consented. They started by asking us how we thought they were doing, both in the way they present TopCoder recruiting to companies like ours, and how we think the TC community views this side of TC's business. It was a good and very open discussion.

Then one of the people attending the meeting came and wanted to ask us some questions. I'm not sure who he was, but from what I could tell, he was a hiring manager of some kind and he knew zoidal. He asked us a few questions about how we thought Microsoft was viewed by potential recruits and how we came to Microsoft (and whether TopCoder had anything to do with it). I think most reasonably technical people can probably imagine the sorts of answers we had for the first subject, but I thought it was interesting that while none of us had really come to Microsoft through TopCoder, we all felt like our experience in other programming competitions (such as the International Collegiate Programming Contest or the Imagine Cup was part of what got us interviews at Microsoft.

Another topic that came up was how abnormally fun the interview process was for each of us. I referred to a Microsoft interview as being like a TopCoder qualification round or Single-Round Match with no hard problem. Since we solve interesting little programming problems in our free time, I think we'd all jump at the chance to be a professional Microsoft interviewee.

Anyways, the takeaway was good for me, although I didn't understand a lot of the HR process mumbo-jumbo that people were throwing around behind us. It was funny to see things come up, like how they showed a picture of someone's rating history (nothing to be ashamed of), and someone else's placement on the rating "bell curve" (I've never seen a bell quite like it).

Anyways, as it's well past my bedtime, I should probably wrap this up. Hopefully Office will start recruiting through TopCoder soon as well.

More Posts Next page »
 
Page view tracker