Sunday, December 10, 2006

Learning to Read


A couple months ago, I picked up a copy of Crime and Punishment from the local used book store and started to plod through it. I usually make a bee line for the computer section, but was inspired by a coworker who told me he was planning on reading it. Having gone through engineering school and missing out on the liberal arts education exposure to the classics, I thought it might be a good opportunity to read and discuss with someone else.

About twenty pages in, I was quickly reminded why I prefer non-fiction to fiction; I couldn't tell what the hell was going on. I've observed that I actually find it easier to read something as dry as Structure and Interpretation of Computer Programs than a spy novel like The Polish Officer. I've pretty much accepted that fact, and used it to my advantage to some extent by constantly reading evermore about programming, but this time I wanted to take a stand.

Why is it, I thought, that I have such a hard time sticking with fiction (with the exception of sci-fi I'd imagine most middle schoolers can read)? It turned out to be the characters. About twenty of them in the first fifty pages. I'd come across yet another generic Russian name (Yakov Smirnov) and wonder whether it was the protagonist or some minor passerby whom I'd never encounter again for the rest of the book.

Eureka! It's my crappy memory. I can't remember people's names until I've met them at least a few times and my spelling is terrible (I've already been nagged a half dozen times by Firefox's new check as you go tool while writing this post), so no wonder I can't keep track of a barrage of new characters every time I open a new fiction book. With technical books, it's more of filling in a piece or two into a partially solved puzzle.

Having identified the problem I set out with a new tool: a pad of paper next to my bed. Each time I encountered an unfamiliar name, I'd look it up and jot down a few notes if it was really someone new, or refresh my memory if not. This worked really well. After the first hundred pages, I finally knew the main characters well enough to enjoy the book, consulting the pad less and less often.

I wonder if my brain will ever rewire itself to get better at this sort of thing. In the meantime, at least I have figured out how to expand my horizons a bit, even if I'm going to look like a complete dufus next time I head to the beach with a pad of paper to accompany my paperback:)

Wednesday, December 06, 2006

Aging Parents

My mom recently turned 59. That's almost 60, and my Dad's not far behind.

Over the years, my view of "old" has shifted to stay ahead of my parents. When I was 10, a 50 year old was definitely old. But then my parents turned 50, and I though, well, they aren't old; they're my parents! But 60, man, my brain is pushing back at me when I say to myself, "60's not old!"

Both of my parents are still vigorous, they work out, they work every day, they learn new things. My mom uses firefox. My dad embraces relatively new things like pandora.

They are showing signs though. Their routines are getting more hardened. They go to the same restaurant every week for months at a time. It's not Bill Knapp's though; they aren't that old :)

Sunday, November 26, 2006

To Roth or Not?

Among the most popular options for retirement planning are tax-deferred plans like 401k's and traditional IRAs, and tax-exempt plans like Roth-IRAs and Roth-401ks. With tax-deferred plans, you get to put pre-tax money into retirement, let it grow tax free, then pay income taxes on it when you withdrawal at the end. With tax-exempt plans, you place after tax money in, it grows tax-free, but you pay no taxes when withdrawing later on. In both cases, "later on" means after you are about 60 years old. And in both cases, you get the awesome benefit of the money growing tax free until it is withdrawn, instead of paying capital gains taxes every year on your investment income.

Even after having been schooled in these two options from my Dad, who's obsessed about saving for retirement, until recently I was confused about the differences between the two. I thought Roth-IRAs would actually yield more money in the long run since you weren't paying taxes on the much larger sum of money that would accumulate. That's bunk, however, due to basic commutativity of multiplication: whether the tax bill comes now are later, it is still being multiplied by the same stuff. With the same tax rate and return on investment, the same pre-tax income placed into a Roth-IRA and a traditional IRA will yield the exact same amount at then end!

Let's say you take 10,000 dollars in pre-tax income, and want to save for retirement, and you expect to make 8 percent a year on investments over 30 years. And let's say the tax rate is 20 percent. With a 401k, you have:

$10,000 * (1.08)^30 * 0.8 = $80,501.25

The 10,000 dollars is multiplied by the compound interest you make over 30 years, after which you take away twenty percent (multiply by 0.8) for taxes. In the case of a roth-IRA, the math is:

10,000 * 0.8 * (1.08)^30 = $80,501.25

You take out the 20 percent first, but you still have the same growth; in both cases the money grows tax free.

After understanding that fundamental point, there are still a couple subtle things to consider when choosing. First, your tax burden might be different later on. Some recommend the tax-exempt Roth style approach because they figure by the time they retire they won't be making as much money, and will be in a lower income tax bracket. Others think they will still be working, and perhaps be making more money. Still others thing there is no way to know what the tax laws will be decades from now, and feel better paying taxes now when they know exactly what it is.

A second very important thing to consider is the contribution limits. If the contribution limits are "the same", for example if your company gives you the choice between a 401K and a roth-401K, then you can actually save more money with the Roth. Let's say the limit is ten thousand dollars. Ten thousand dollars after tax money is more than ten thousand pre-tax dollars, so you will in effect be saving more money. For example, if your tax rate is twenty percent, you could contribute (1 / (0.8)) = 1.25 times more money into an account where it can grow tax free with the Roth style account. It of course requires placing more of your income into retirement, but at least it is an option.

Personally, I'm torn. I like the idea of being able to save more with Roth, due to the limits issue I just mentioned, but I suspect I'll be paying lower taxes later on given that I'm a software engineer and by the time I'm sixty years old I will likely have long since trained my fresh twenty year old replacement :)

What I decided to do is split it up fifty fifty. In the end, when one turns out to be the best option due to the tax bracket I end up in, I will have only blown it half way.

Sunday, November 12, 2006

TODO: check out hiveminder

Hiveminder is a slick piece of free online software I came across earlier today while looking for a way to keep a to-do list.

At first, I tried using google spreadsheets to keep a list, but it didn't work so well. For one, there is no natural way to prioritize or show dependencies between tasks. Once I started adding a column with a numerical priority, I knew I was trying to shove a square peg into a round hole.

After searching around, I came across a tag on lifehacker on to-do list software. After a brief perusal, it seemed hiveminder was potentially the best.

Anyways, after using it for all of twelve hours, I don't think I need to look any further. It has a clean interface, allowing you to quickly jot down a bunch of tasks free form, after which you can go back and flesh out any individual task with due dates, priorities and tags. You can say one task must be done before or after another, after which the main list only shows the first task in that dependency chain. And perhaps most awesomely, you can create a group list, which I'm already using to keep a common list of household and bill-pay type tasks with my wife.

Gad I love the internet.

Tuesday, November 07, 2006

Electronic Voting Machines seem OK in Santa Clara County

There has been a lot of hoopla over the problems with electronic voting machines. How there is no way to verify votes in case of a problem, how the code is not open to inspection etc. But the one I used this morning to vote in Santa Clara county was an electronic voting machine, and it did seem to fulfill the requirements of verification.

After I voted, it printed out a receipt that I viewed throw a plastic window, giving me an opportunity to verify that the votes printed out were true to what I touched on the screen. Only after I said 'yes' did it attach some official vote bar code and deposit the paper vote into some box. I imagine if I had said 'no' it would have given me a chance to go back and see why the votes were different, and if necessary ask an election official about it.

This doesn't mean there aren't voting machines out there that fail to provide a paper trail, but at least this particular one seemed OK.

Tuesday, October 31, 2006

Voting in California

Next Tuesday, I will vote in California for the first time since moving here from Michigan in the summer of 2005.  I have been pretty clueless on all the ballot initiatives (there are tons; isn't this supposed to be a representative government?), so tonight I printed out the state voters guide and started wading my way through them with my wife. 

Disclaimer: these decisions are tentative and are based on less than an hour of review.  Don't hold it against me too much if it turns out years from now I was incredibly wrong!  Also, the voting decisions posted are my own; my wife didn't necessarily agree with me on any of these :)

The first one we looked at was proposition 90, proposing restricting the powers of eminent domain.  At first glance, it seems like who wouldn't like it?  Who wants the government taking away their house by force and giving what they deem to be a fair price?  But I also wondered, how often is this used, and for what purpose?  Does the government low ball people?  Don't most state governments have this power?  For more insight on the matter I turned to Kevin Drum, a professional blogger who I've read on and off since he was just an amateur.  Through a site restricted search , I found this post that provided some more context.  It pointed out that, beyond preventing the government from seizing property, it allows property owners to claim compensation for any action the government takes that could decrease the value of their land.  This puts it over the edge.  Decision: no on prop 90.

Next, we checked out prop 87, which proposes four billion dollars in taxes on oil companies that extract oil in California to promote clean energy usage.  Anything that would add more funding for clean energy usage sounds good.  However, I don't agree with how it is funded.  How ever rich oil companies may be, does it make sense to basically gang up on them and make them pay for something we all value?  If we think it is so important, why can't we pay for clean energy promotion out of the general fund?  Plus, what really is bad for the environment is energy consumption.  I'd prefer a gas or carbon tax.  Making Hummer drivers pay $100 to fill their tanks will make them think a little harder than seeing than some commercial where Leonardo DiCaprio claims his Prius rules.  It may be true that a gas tax will never get passed, and this is the best option for a long while to get more funding for enviro stuff, but I gotta stick to my principles on this one.  Decision: no on prop 87.

The last proposition we looked at was 86, proposing more cigarette taxes, funding health care.  Currently, cigarettes cost about $4 a pack, about $0.87 of that going to the state.  If 86 passes, an additional $2.60 would be taxed, adding up to a whopping $6.60 per pack.  I know I just said I liked consumption based taxes in the case of energy, but come on!  It certainly would stop some people from smoking, but I feel like the people worst off would be the poor.  Someone who smokes a pack a day and can't quit would end up paying another 30 bucks a week, $1500 a year, on cigarettes, an amount that could seriously screw over someone making 20 grand a year.  I would be for it if it were a more moderate increase.  Decision: no on prop 86.

That's all I could stand to sift through in one sitting, stay tuned for updates on other decisions if I get around to blogging about it.  It is still a week until the polls open; I'm open to hearing more on any of these props and maybe even changing my mind.

Tuesday, October 17, 2006

Shared vs Starred, Tags and Folders in Google Reader

A couple weeks ago, google reader came out with a new interface that is quite a bit better. The main thing it changed was moving away from a single river-o-news model to an "inbox for the web". This works much better when you subscribe to a lot of feeds. Others have written plenty about it.

After using it a bunch for two weeks, a couple more subtle yet crucial improvements have become apparent: a new notion of 'shared', and a distinction between tags and folders.

Shared vs Starred

I'll start with the shared vs. starred idea. Ever since the first version of reader, you could star individual items. This seemed relatively useful, let's say I like a story and want to remember it somehow: I'll star it. However, there was a major flaw: when I clicked to view all of my starred items, the list was empty. I had to click on "view unread items" to see the items I had starred and (obviously) read. Then, when clicking back to the original stream of my feeds, there would be a bunch of crap I had already read and I'd have to uncheck the 'show read' button.

Later on, still in the older version, they introduced sharing. You could share your starred items and send a feed to your friends. My brother could subscribe to my starred items in his reader and automatically see what I had found interesting. Now, for the first time, stars were useful. However, they still sucked for remembering stories I wanted to maybe go back and read later.

In the latest version of reader, this problem is solved: starred has gone back to the meaning it has in gmail: flag this to make not of it to myself somehow. I can still share my starred items if I want to, but there is another feature for that purpose: my 'shared items'. Now, as I'm going though my stories, I'll hit the 'share' button on all the stories I think are interesting and want others to see, and star much more occasionally if I want to go back and read a particular story later on. I can click on a button to see my starred stories and it will show them (even though they are read); no need to 'show unread'. Yay!

Another nice feature about 'shared' items is reader automatically constructs a page for you to easily share with others, (see mine linked to as 'link blog' in the sidebar).

Tags vs Folders


Another thing that stunk about the old reader was that there was no difference between folders and tags; and they were both called 'labels'. You could label a feed, and label individual posts. But a labeled feed means all stories within that feed are labeled the same, so if any label used for feeds would overwhelm the individual stories labeled the same. I label slashdot as 'science', then, it's pointless to label any individual story 'science' because slashdot will always be spitting dozens of stories a day into that label.

With the new reader, 'label' is killed (with what seems to be some lingering references that are likely bugs in the UI). Google finally threw in the towel and started using the word 'tag' like everyone else (for reader at least), and distinguishes between categorizing your feeds (into folders), and further annotating individual stories (with tags). The folders help me quickly check out a bunch of related feeds within reader, and the tags help me occasionally further describe an individual story.

Sunday, August 27, 2006

What will EC2 be used for?

Update (9/6): I received another email informing me of more signups available (in my inbox at 2AM PT), but by the time I clicked on the link this morning I was too late. According to the email:

If you are unable to sign up in this round, we encourage you to stay ready. We intend on activating more beta users in the coming weeks.


Last week, I received an email from Amazon announcing a new beta web service named, "Amazon Elastic Computing Cloud", or EC2 for short. I had messed around with s3 before so I was given the opportunity to preview EC2. By the time I signed in, I was notified that,

The Amazon EC2 Limited Beta is Currently Full
We will e-mail you when we can accommodate additional users.


Ah well, I probably wouldn't have done anything with it anyway.

But this sounds really cool! One of the first things that came to mind is the power of distributed computing for short periods of time. Firing up a reliable web server is one thing, but this seems like it will really lower the barrier to using many machines at once; you don't have to own them, you just pay to use them for a little while then kill the jobs.

For instance, imagine firing up 100 instances of a linux box loaded up with a python script to vote for your story on digg and reddit, bringing you to the front page, and sidestepping whatever security they probably have in place to restrict multiple votes coming from a single IP address. As soon as the deed was done, you could halt the processes as well as the running tab. At $0.10 per instance hour, that might only cost you ten bucks!

It also reminds me of the command and control style bot networks used by spammers and denial of service attackers. The process of gaining control of people's computers via viruses seems like a pain in the neck compared to the ease of spawning the exact machine images you desire via EC2.

I'm sure Amazon has thought of the security implications, and the fact that you have to register with a credit card before using any of their chargeable web services would make it much tougher. Plus, they already mention, "If you wish to run more than 20 instances, please contact us at aws@amazon.com."

No matter the case, I look forward to see what comes of EC2, and eventually playing around with it.

Friday, July 14, 2006

Test Driven Design: Not Just For Weenies?

During the last couple of weeks, I've given Test Driven Design a serious try. I have been pleasantly surprised. Beyond the expected benefit of having better test coverage, I have found that it leads (at least in the case of the last two weeks) to more elegant design that does just what it is supposed to do and no more.

I first heard about TDD years ago, but wrote it off as eXtreme programming weeny stuff. Extreme programming is a process for writing software that mandates a set of practices, including:
- all code is written in pairs
- tests are written before the code; no functionality is allowed unless a test verifies it (this is test driven development)

I had a pretty strong reaction, my thinking went along these lines: why should I be forced to write code in a very particular way sitting next to someone? What if I didn't like that person? What if he didn't like me? (I would have used "he/she", but come on, this is programming.) And if studies show that it increases productivity, it must be because, in the average case, you're taking a bunch of miserable people who work on boring code and forcing them to sit together where they won't feel comfortable surfing the web and reading blogs all day to avoid writing boring code. It's like having the boss stop by every 2 minutes forcing you to alt-tab away from reddit and slashdot. Plus, testing is the boring part of programming, you mean I have to do it all the time? Can't someone from another team write tests afterwards? I'm a good programmer, I don't need some process to enforce quality in my code. Finally, the fact that it was named, "eXtreme programming" made me want to barf; you think a whiff of super macho man / slim jim / mountain dew bull shit is going to get me excited about you're crappy software practice you invented just so you could write a bunch of books about it? Huh? Did you!?

So what made me give the test driven development part a try? Well, I started working at a real company on a real project. Your code lives forever. Any problems will come back to haunt you. And once your code is live on a production website or service, fixing it isn't a matter of changing a few lines in a file, and then checking to see if the problem is fixed. You have to patch a change list into a special branch that has to go through an entire quality assurance process. Then it goes on a canary (a subset of production machines) where everyone waits to see if things seem to be going OK. Finally, it is pushed out to all production machines. At this point, at least a day or two has passed and many people have had to work to make it happen. Then, the problem might still be there! Oh crap! Anyway, you learn to fear seeing an email pop up in your inbox about some stack trace in the production logs.

Contrast this with back in school, where each project was finite. I wrote my code, got it to "work" and then it was done. If there was a bug or two, eventually exposed by the automatic grading script, well, hey, I still got an A-. Afterwards, I could throw it away, never forced to face any bugs.

Anyways, after a couple of those emails I mentioned earlier popping up in my inbox at work followed by a scramble to hack together a change as fast as possible to fix the problem, I got a lot more serious about verifying my code. I watched a tech talk online about test driven development. I picked up a book from a local used book store named, "Unit Testing in Java: How Tests Drive the Code." As I walked back to my apartment from the bookstore, I found myself turning the cover of the book towards my body, half expecting someone to drive by in a convertible and yell, "Weeny!"

Before reading about it, I had assumed writing tests as I programmed would help in a a simple yet direct way: I would be writing tests about each piece of code before I forgot about all of the functionality I was writing. No more scrambling to write tests after the fact. That is a benefit, but what I have learned from looking into it more deeply and giving it a try is that the process reaches beyond producing bug free code; it's producing modular, verifiable code. Most importantly, it avoids over design.

No code is written that isn't verified by a test. In fact, you write the test first, run it, see that it fails, and then write the code to make the test pass. That test is a specification for behavior. In essence, you're forced to think in a very concrete way, what is this code supposed to do? What exactly are it's input, outputs, error conditions, etc? And when you have finished writing the tests, you look at your code, it is amazingly simple. That polymorphic hierarchy I was anticipating writing? Well, it turns out a couple of if-else statements were perfectly sufficient. That design pattern I was chomping at the bit to apply? Totally needless in this situation. Some of that stuff does appear, but only after there is a proven need for it, namely code duplication.

There are a bunch of other benefits of TDD that I've read about, like the fact that when someone else comes along a couple years from now and has to modify my code to do something new, they will feel a lot more confident in making sure they haven't screwed anything up. We'll see, it hasn't been long enough to verify the rest.

In the meantime, I'll keep applying it the code I write and see if I continue to like it.

You might be wondering, have I drank the XP kool-aid? Will I start bugging my teammates to buddy up and sit next to me while I program, and start watching them? For now, no. But I will give those XP guys a little credit. Weenies.

Friday, June 30, 2006

Another Inconvenient Truth

Last night I saw the movie, An Inconvenient Truth, Al Gore's global warming movie. It's really good, go see it!



Then, this morning, I read this article about how driving while talking on your cell phone, even when using a handset, is as dangerous as driving drunk. Doh!

The study that the article is based on does a comparison based on a BAC of 0.08%, which, if I remember correctly from my DARE class, is about one beer's worth. Does this mean that people will soon be thrown in jail for the night, fined heavily, and sentenced to 45 days of community service for driving while talking on the cell phone?

Saturday, June 17, 2006

Ann Arbor on Google Earth

Last weeks major imagery update for Google Earth includes my hometown Ann Arbor, which previously had terrible resolution. Yay!

Update: it turns out that it is only for the eastern half of Ann Arbor, and doesn't include the down town and campus areas. Doh! I was fooled because the coverage includes my parents house.

Still cool though. Plus, now it's now available on google maps.

Sunday, June 11, 2006

DS lite: I'm in pizza face paradise

The Seed is Planted

Yesterday my neighbor Judd told me his rich friend had ordered him a DS lite so he could have someone to talk about it with. Apparently his friend does this from time to time; he also bought him a PSP when it came out. I'm going to have to introduce myself at some point to this guy.

Anyway, that got me curious; I didn't even know a new DS was coming out. I have heard whiffs here and there about the DS being cool, but it looked so clunky in the stores. Plus, I have been turned off to video games in general for the past few years. The thought of spending hours a night to create a character on World of Warcraft just to go online and get my ass kicked by a bunch of 14 year olds; no thanks. When the PSP came out, I was tempted, thinking that maybe it would have simple, fun games you could play for a half hour or so. But after borrowing Judd's a couple of times, I was pretty unimpressed with the games.

But Judd mentioned to me that the DS lite was supposed to be really cool, a new screen that was as bright and crisp as the PSP, a sleeker design. Most importantly, a bunch of cool games that have been released over the last couple years. The DS has slowly overtaken the PSP in market share due to its superior games despite its ugly appearance (and remember this is with the old ugly clunky one).

This got me curious, yesterday afternoon I went online and started checking out game reviews. There was a spruced up Mario 64, a new Mario Kart, and new 2d side scrolling Mario! I thought, "Ok, I want one!."


The Journey

On the way to Trader Joes last night, I stopped by a nearby Game Spot to ask them about it. I approached the store clerk, who looked like a store clerk at a video game store.

"Do you have the DS lite?"

"No."

"Will you have it tomorrow?"

"Yes. Do you have a reservation?"

"Hmm, no I don't..."

"Make that, 'no'."

Aw man, why the hell can't companies just ship enough friggin' systems!?? Then I remembered, way back when Nintendo 64 came out, I showed up to Best Buy really early and waited until it opened along with a bunch of other geeks, and was able to get one even though I was sans reservation. I thought to myself, "I can do the same thing this time!"

So this morning, I woke up at 8:30, and was dressed and at Best Buy by 9AM, an hour before they open. I had packed my I-pod, a luna bar, and the latest issue of "The Economist". As I pulled into the parking lot, my pulse quickened; would I be too late? Would there already be 50 nerds waiting in line staring at me with pity as I pulled in too late?

The parking lot was empty. I laughed to myself, half grateful I hadn't shown up 2 hours early, and pulled into a nearby spot where I could read and wait for an hour. As I read, I watched each Best Buy employee show up. Some of them looked at me with some suspicion, most didn't notice.


We're not Dissapointed

Anyway, I got the system along with 3 games, Super Mario 64 DS, Mariokart DS, and New Super Mario (the 2d side scrolling one). They are all really cool, though I've played the New Super Mario the most. It is a great game; a throwback to the original NES Mario games with some added functionality and flare. First impressions about the DS-lite itself:

- It looks cool, kind of like an ipod, with white plastic casing.
- The dual screen combo is effective. The bottom one is touch sensitive, and aside from that is actually used effectively while playing. For instance, in Mario Kart, you have a map of the track as you are racing around. You can see when shells are approaching from behind, etc.
- The wireless capability is intriguing. Once Judd gets his, I look forward to playing Mario Kart against him. If you get one, let me know, we can play online cross country even.

Perhaps most amazingly, my wife likes it. She hates video games, but as soon as she heard the familiar sounds of Mario grabbing coins, growing after eating a mushroom, throwing a fireball etc. she became curious. She used to like video games as a kid, and Mario was her favorite. So now she's grabbed the game from me, and I'm stuck writing this blog entry.

Oh wait, she has finally put the game down. Gotta go!

Karl

Monday, April 17, 2006

Why Statistics can't Explain what Joe Dumars Knows

In today's print Wall Street Journal, there was an article, "The Story That Stats Don't Tell" about how the effort of NBA organizations to use statisticians to optimize their player choices has yielded results far short of similar efforts in other sports, notable Major League Baseball. I would link to the article, but WSJ.com is complete abomination, and a search on the exact title of the article produces zero results. Anyway, it got me thinking again about how difficult it seems to quantify an individual player's worth in basketball, a subject I have pondered in the past as well as had lengthy geeky conversations about with my brother.

My interest in basketball stats began while playing fantasy basketball, where it's easy to figure out who the best player is in terms of the fantasy league: there is a published formula for 'fantasy points' that depends on conventional stats (a point is worth 1 fantasy point, a rebound 2, a block 4 etc). It was fun to use stats like fantasy points per game over the last X games to find the best players to pick up; one year I won the league (I also got butt lucky that year and had Kevin Garnett during his MVP season).

Next, I read the book Money Ball about how General Manager Billy Beane and statistician Paul DePodesta used stats to build a team of unconventional, unlikely players and take the Oakland A's to the playoffs and have the league's best record with a payroll less than a quarter than that of the Yankees'. Completely fascinating stuff: the geeks prevailed!

Then, there was the fact that my favorite team in the NBA, the Detroit Pistons, happen to be the Oakland A's of the NBA. I know, that doesn't really do them justice, but bear with me. A team of cast-offs with people that no other team really wanted like Ben Wallace and Chauncey Billups. A payroll less than half the awful NY Knicks (and a very good, but still inferior Dallas Mavericks). And they won a championship. They went to the finals last year, and they have the league's best record going into this year's playoffs. Joe Dumars is the Billy Beane of basketball.

All that, and apparently, the Pistons are NOT among the teams that make use of professional statisticians. The WSJ article named the Celtics, Sonics and Houston Rockets as teams that do, and they range from mediocre to sucky.


Why Basketball Stats Suck

1. All plays are fluid.

With the exception of free throw shots, every play in basketball occurs in motion, and is very hard to quantify. Consider a typical fast break where 2-4 guys are sprinting down court with defenders racing after from various starting positions and various speeds. That exact play, with the exact same players starting in all the same positions, may not occur again for years, if ever. Contrast that with each at bat in baseball. In baseball, the state of the game before the play is quantifiable: the game literally stops between each play. You know how many men are on base, where the fielders are, how well the particular batter has performed in the past against the exact pitcher he is facing etc. etc.

2. The stats that are recorded are vague

An individual player may have a great field goal percentage, but what are his shots like? If he makes wide open jumpers from 15 feet out because another player is drawing players away and getting him a great look, is that as good as someone who makes a turn around hook shot with a hand in his face? According to the stats, yes.

What about an assist? If a player hands the ball to a team mate right next to him who jacks up a 3 pointer and makes it, is that as valuable as a pass that threads between two defenders and gives a teammate a wide open layup? Again, according to the stats, yes.

3. Many stats aren't recorded

Some stats that are of clear value simply aren't recorded officially, such as taking an offensive charge. A defender plants his feet, stands in front of a driving defender, and falls over, resulting in a turn over and a foul on the offender. This is counted as nothing.

Another defensive action of real value that is not recorded is a defender's ability to alter opposing player's shots. Ben Wallace may get a couple blocks a game, but I'm guessing he makes opponents alter and miss five to six shots per game.

4. Individual Performances are very dependent on Teammates

The WSJ article mentioned this one too. In baseball, a player at bat is by himself; no teammate is going to help him hit the ball. In basketball, other players are involved in the vast majority of baskets. Some players set picks for others. The ball may be passed around the top of the key involving three players before an open man is found. Who gets what portion of the credit?


How to Do Better

1. Qualify Each Existing Stat

The first step in better predicting the value of players would be to start recording enhanced stats. Every shot, every assist, every rebound, would be qualified somehow. Perhaps something as simple as a subjective rating of difficulty from 1-5. Someone with enough money could hire and train people to watch every NBA game and keep track of these things. A shot: was it wide open? Difficulty = 1. Was it a turn around jumper with three defenders around? Difficulty = 5. A rebound: was it a simple rebound off a foul shot? Or did the player jump up and rip it down over several defenders? Each game could be independently kept track of by 3 - 5 players, and the averages could be kept, perhaps throwing out outliers.

Or one could attempt to be a little less subjective. The location of each shot as well as the distance and velocity of the defender could be estimated for each shot.

2. Record New Stats

An easy win would be to start keeping track of those unrecorded stats I mentioned, like altering a player's shot. You could record anything that you thought could reliably measured, really.

You could then do regression analysis to find each one's effect on the points scored and points allowed, winning percentage etc to discover how important each one is.

3. Team Performance With and Without an Individual Player

Another method might be to look at how a team performed with and without a given player. However, it is rare you will have good data on this; unless a player is injured for exactly half of the games, and you have many games vs the exact same opponent with the exact same lineup to compare with and without an individual player, this would unlikely produce anything but noise.


It's Still Tough

Either way, I doubt any of these efforts would yield anything close to as accurate as what is done with Baseball. I'm willing to bet the existing stats guys are already doing stuff like this; I doubt that the Rockets hired MIT MBA Daryl Morey to come in and say, "according to my calculations, Kobe Bryant is leading the league in scoring."

There are just too many ways to be a valuable player. How can you compare Richard Hamilton's ability to run around like a madman tiring out his defender, driving him into pick after pick to get open shots to Ben Wallace's ability to alter shots to others, when no one else has this strategy?

Ask Joe D

All of this is a tribute to Joe Dumars' genius. He's onto something for sure, but how does he pick? How did he know Chauncey Billups could be transformed from journeyman to Allstar and MVP-candidate? How could he have predicted that under sized Ben Wallace would the best defender in the NBA? Maybe it that's what makes the NBA so interesting to me; no one has cracked the code to automating the process of picking out unlikely valuable players.

Sunday, April 02, 2006

firefox crash recovery: crucial on OS X

I like firefox. I've grown accustomed to its features on Windows, Linux, and, since last year when I got an Apple Powerbook, on Mac OS X too.

I would use Safari, but a couple of key applications (gmail and google reader) don't work as well on it. However, while I haven't had any trouble on Windows or Linux, firefox crashes about once a day on the Mac. This isn't terrible, aside from losing the 10 tabs I have open at any given time.

Fear no more, firefox crash recovery is here. Nothing too special, it just reopens any windows and/or tabs you had open the next time you open firefox after a crash.

I also stumbled upon another use of crash recover when VPNing into work. I tried to open firefox remotely, and it complained that it was already open. So I manually killed it, and when I opened it, all of my tabs from work were open! I usually have 10-12 work related docs open, so a nice bonus when working from home.

Saturday, March 18, 2006

Improving Blogging Software

A couple of weeks ago, Steve Yegge wrote one of his rants about the shortcomings of blogs. He focuses on the lack of features to support essay publishing, such as the inability to display the entries ranked by popularity, rather than chronologically.

This reminded me that, about a year and a half ago, I thought a lot about how blogs could be improved too. It was one of those ideas that came into my head while I was trying to fall asleep, and was so pervasive that I had to get up and jot it down. Like most (all) of those types of ideas, I never found time to actually implement it, but it was fun to think about anyway :)

This was around the time leading up to the 2004 elections, when I was reading a lot of political blogs, such as Washington Monthly, where it is often the case that bloggers talk about the same issues over and over again, bringing in recent events to shed new light on them. I started to think, wouldn't it be nice if they could simply post their definitive opinion on a topic and then craft it over time? The opinion would be change tracked, and between each change, there would be a list of things (blog posts, user comments, links) that contributed to the change.

For example, let's say you had written a 1.0 version of how to make the best ribs. Then, you come across this recipe, give it a shot, and change your mind. You write a blog post linking to the site, and describing your experience. Then, you edit your best ribs article to reflect the use of cherry smoking wood, and in the change record, link to your blog post about using the recipe. That creates "Best ribs" 2.0. Anyone who comes to your site can see the article, as well as it's previous version. They will also see in between 1.0 and 2.0, a link to the post about trying out the new recipe.

I mentioned a lot of terms like change event, opinion, change tracking... Here are some definitions:


Blog post

This is your run of the mill, "I saw/experienced this article/link/event today and here's what I think" post. Presenting these chronologically makes sense because they are usually relevant to a recent event.

Article revision

An essay, opinion, article that is relevant for longer than a week. People might want to read this months later. It may change over time, influenced by user comments, recent events etc.

Article

An ordered collection of article revisions, between which there change events

Change Event

A collection of links to things that have influenced a revision change. It can be anything that is linkable, including comments, blog posts, web sites, etc.



Existing software like blogger do blog posts just fine of course, and that is enough for a lot of blogs. However, more and more I am seeing people shoe-horn in essay publishing into their blogs. They could simply post a separate page on their website (if they have one), but then there wouldn't be the built in ability for users to comment on it. Plus, revisions wouldn't be visible. So people use blogs. When users comment on what they have to say, the author might say a few things in the comments, clarifying a thing or two, changing his/her mind etc. Or they might revise their blog post, which unfortunately kills the original revision, making the comments that lead to the change seem out of place.

Some examples. Guy Kawasaki exclusively posts what I would consider essays. John Battelle uses his blog for essays in some cases, and as a normal, "check this out" blog other times.

So what would this post count as? Given that there are only two people who read this blog (when I ask them to), it probably doesn't matter either way, but probably an article. I mean, just reading over it right now, I can already see some new things that could be added (such as the concept of a link blog entry; nothing more than a link), but I don't feel like revising it right now. But I could throw it out there, get some feedback, and then write a revision citing what influenced it. Wouldn't THAT be fun!

Sunday, March 12, 2006

90s Music Wasn't so Bad After All

This article lists the top 100 albums of the 1990s, and does a pretty good job of it. I'll list my specific gripes below about some exclusions from the list, but overall it reminded me that while pop music in the 90s (think "Color me Badd") sucked in a hilarious way, there were some really good albums and new artists that emerged.


Should have made the cut:

  • Blackstar. You include DJ Shadow, and can't remember Mos Def and Kweli??
  • Black Crowes. At least "Southern Harmony Musical Companion", and probably "Amorica".
  • Alice in Chains "Dirt". They were the best grunge rock band of the 90s IMHO.
  • Medeski Martin & Wood: "It's a jungle in here", or maybe "Combustication". Either way, the best new Jazz group of the 90s.
  • Beastie Boys "Paul's Boutique"
  • Latyrx
  • Jurassic 5 "Quality Control"

Awesome Inclusions:

  • Beck "Odelay"
  • Tribe Called Quest: "Low End Theory", "Midnight Marauders"
  • Gza: Liquid Swords. The best Wu-tang album IMO.
  • Dr. Octagon. Freaky / Funny collaboration of Kool Keith and Dan the Automator (of Gorillaz fame).

Awesome Exclusions:

  • Phish.

Overrated:

  • Weezer. A couple of catchy tunes, but what's the big deal?
  • Dj Shadow "Entroducing". I have this album, and it's just "OK". I don't get this being in the top 10, especially given the exclusion of some other notable hip hop.

Stuff I'm curious about. There are some artists listed that I've heard of, but never really checked out, so now I'm tempted to finally give em' a listen:

  • Wilco
  • Built to Spill

Sunday, March 05, 2006

cool videos of the week

Wednesday, February 22, 2006

Marinade = Olive Oil + Garlic + acidic liquid + fresh herb

I've been grilling a lot lately since I finally got a gas grill a few days ago. I noticed a pattern for marinades: blend in some olive oil, something acidic (lemon juice or balsamic vinegar for instance), a fresh herb and some garlic and you can't go wrong.

Olive Oil + garlic + ...

1) lemon juice + cilantro : made for a delicious shrimp marinade (got it from a middle eastern cookbook).

2) lemon juice + basil : made for a great Tuna steak marinade (from a grilling cookbook

3) balsamic vinegar + basil : was awesome on portobello mushrooms (same grilling book)

How much of each you ask? Start with about a half cup of olive oil, mix in the acidic ingredient, about two tablespoons (half lemon or pour of vinegar) at a time tasting it until the balance tastes right. How much garlic depends on how spicy you want it; it could range from 2 to 10 cloves. Herbs? A handful or two of freshly chopped.

Karl

Saturday, February 18, 2006

Pirates Cove: fun board game!

My neighbor Judd bought Pirate's Cove today, and the four of us (him, his wife, me and my wife) played this evening. It's TBD whether or not it will be a classic like Settlers of Catan or Axis and Allies, but it was definitely a lot of fun.

The basic idea is that each player is a pirate, aiming to be the most famous and fearsome pirate of all the high seas (arrrr!). There are four Islands that at the beginning of each turn each player silently decides where they would like to go, and each Island has a certain type of resource used to build up specific part of your ship (hull, guns, deck hands or sails). The fun part is that if you happen to pick the same island as another player, you have to battle it out to see who gets to go to the island to get the resources there (the other pirate goes home empty handed).

I don't feel like explaining the whole game, but I will say that the game is a success for the following reasons:
- it doesn't take that long to pick up (20 minutes)
- it doesn't take too long to play (~1 hour)
- there is a reasonable amount of strategy involved
- it has a creative plot / gameplay (not another dwarfs vs goblins or military simulation game)

If you are looking for something new, try it out!

Karl