Archive for July, 2003

So I have been doing interview questions and programming puzzles lately and it occurred to me that a lot of them are not very relevant to the actual daily lives of a programmer. Here’s an example. A somewhat frequently asked programming question is “given an array of N unsorted elements, what’s the best way to find the X highest element”? The simple answer is to use a common sort like quicksort and then find the X highest element. That isn’t the fastest way, because you’ll spend a lot of time sorting the whole array when you really only want part of it sorted. The correct answer is to use a heap sort and then just find the X highest element. This generally should save a lot of time. However the reality of being in software is that I have never once in my 7+ years as a developer actually implemented either a quicksort or a heap sort in my life. And I haven’t even had an occasion to make a decision of that type.

Giving credit for knowledge of algorithms and correctness in this situation is nice, but from a software engineering perspective, the simpler solution is for most cases better because it is simpler and has far fewer lines of code and therefore will be less error prone. If I were a manager and I wanted someone to get the Xth element of array, I’d much rather have them use an already implemented sort to sort the whole thing and then traverse it to take the Xth element. In java, it’d amount to just a few lines of code. Of course if the sort time is huge then it is worthwhile to implement the correct solution.

Leave a Comment

It’s really nice what writing a half-dozen tiny programs in C can remind you of. I thought my C was a bit rusty, and it is, but it comes back pretty quickly when you just apply yourself. I’ve also been reading Effective C++ and that gives a lot of tips on how to improve your C++ coding, but it’s terrible as a tutorial or reference. I wrote a simple linked list with a traversal, a string reversal program, a word reversal program, and another thing or to. Mostly just quick things I found on some links that have typical programming interview questions.

Oh yea, if you are on Friendster here is My Friendster page

Leave a Comment

So watching television during the day has lead to some interesting conclusions. Sports commentary shows like Rome is burning or Around the Horn live by being rapid fire, contentious in a Crossfire kind of way. I guess that satisfies the male ego. While shows like The View and Oprah try to build consensus and support. It’s sort of an interesting reflection on the male versus female perspective I guess.

Leave a Comment

So now that War3 has been out for a while. I have a decent record, but nothing great. It’s pretty cool how they show all my stats. Emetri and I make a decent team, but sometimes we play bad. I tend to make more strategic errors, he tends to not execute as well. We’re never going to be a super team, but it’s fun at least. I think some of the stats aren’t really that indicative of how I play. I think I actually play better with human than my stats show and certain heroes I haven’t used enough to say whether I’m good with them or not. Like my perfect record with the Lich has to be a fluke.

Leave a Comment

We spent three days near Lake Tahoe this weekend. It was pretty awesome because a friend owns a cabin right on the water. The weather was sunny, hot and beautiful. The water was cool and refreshing. The hikes were scenic and tiring. We also played some board games, including the classic Boggle and El Grande. I did some swimming and running while I was up there and I was pretty surprised how badly my aerobic capacity degraded at the 6200 ft elevation. I felt like I was running at about %85 of my normal speed with my normal effort level. I’m sure there’s something to the high altitude training that elite athletes do.

Leave a Comment

So one thing that some of my friends are now using is an application called Friendster. There doesn’t seem to be anything that great about it, but it does do it’s six degrees of separation thing pretty well. I guess now that I think about it, it’s my filipino friends, I wonder if there’s something to that. The web site is really unreliable because it’s heavily overloaded. I don’t see what all the hype is about frankly. Maybe it’s more of a way for single people to meet other new single people.

Leave a Comment

So a friend filled me in on a position at Nextag, and I was going to apply, then they had me try and solve their programming puzzle. It’s not hard at all when you read it, but the recruiter I had talked to told me it should be done in about a minute. So I spent a few hours doing it as you might expect, with brute force. I was talking about it with some friends and they came up with a super fast and elegant way of doing it. I won’t reveal it but it completes in constant time of just a couple seconds, no matter how large the input numbers are. While the brute force method has been going for more than a day and still isn’t complete.

Leave a Comment

I’m getting some interest in my resume lately, which of course is a clear sign that the economy is picking up. That reminds me of an article from The Onion. I have a couple different potential positions, all referrals from friends. So I’ve been brushing up on my technical skills mostly doing some reviewing and reading about Java and C, nothing too hardcore. I’ve also been browsing some of the new Java features that will be in JDK 1.5 and I have to say that I’m not sure what to think about support for generics(in C++ they are called templates). I guess it’s not necessary to use them if you don’t like them, but in C++ they were a bit difficult to use. They seem a bit cleaner in Java, but something about it still doesn’t feel quite right. Probably just me though. I am excited about the new way to create a for loop though. Of course it’ll be a while before the new for loop and generics make it into real applications, but it’s nice to know it’ll be there.

Leave a Comment

I’ve never watched Tour de France coverage before, but the Outdoor Life Network has been doing quite a job. More than 2 hours of coverage everyday. Lance Armstrong is still in the lead and there have been several dramatic crashes. But still those guys are just amazing. I’ll just have to put the Tour on my ever growing list of the things that I’ll never do, including climbing Mt. Everest, free soloing El Capitan, completing an Ironman(which I theoretically could do really), run a 5:00 mile, win a Nobel Prize, discover the Grand Unifying Theory of physics(although that would probably win the Nobel Prize so maybe I could get two for one there), and find a cure for cancer.

Leave a Comment

Hmm… Can’t say that much is going on. I finally had a decent showing at a multitable poker tournament, taking 4th in a 60 person tournament that cost me $109, and paying me $500.

I’ve decided that it’s unfortunate that my resume looks much better in html or pdf than in Word Doc format. Unfortunately some people only want to see it in word.

Leave a Comment