Wednesday, June 6, 2007

Saw this interesting vehicle on Wyatt Way on the Island this morning:


I thought it was unmotorized -- the guy was pedaling as it went along -- but it was zipping along faster than anything else I've seen.

A closeup revealed that the wheel he was pedaling is attached to a generator (under the front bar) charging a battery (in the black box under the seat); this is attached to a motor which powers the rear wheel.

The front wheels are only for steering and braking.

I thought it was cool.

Tuesday, June 5, 2007

Heh... I just spent an amusing yet frustrating 8+ hours tracking down an obscure bug. (Non-coders, you probably want to stop reading now.)

I thought there was something bizarre going on with our logging framework. We're working on some new validation code (checking for things like invalid characters in names, etc.). One of the things we log is the number of calls to various functions handled in each request. The logs should look like (simplified):

Request 1: RequestHandler:1,Validation:1,IsClientAuthorized:1,IsValidName:1
Request 2: RequestHandler:1,Validation:1,IsClientAuthorized:1,IsValidName:1
Request 3: RequestHandler:1,Validation:1,IsClientAuthorized:1,IsValidName:1
Request 4: RequestHandler:1,Validation:1,IsClientAuthorized:1,IsValidName:1


Instead, I was getting:
Request 1: RequestHandler:1,Validation:1,IsClientAuthorized:1,IsValidName:1
Request 2: RequestHandler:1,Validation:1,IsClientAuthorized:1,IsValidName:2
Request 3: RequestHandler:1,Validation:1,IsClientAuthorized:1,IsValidName:3
Request 4: RequestHandler:1,Validation:1,IsClientAuthorized:1,IsValidName:4


This indicates we're calling IsValidName() four times on the fourth request. Huh? This is utter nonsense. That's got to be a bug in the logging framework or our log4j configuration, right?

Nope. We really were. My desktop started getting *really* slow around the 100,000th request.

The culprit? We screwed up a singleton initialization. The RequestHandler initializes the validation framework each time; the first call should do the real setup work, and the follow ons should be no-ops. Except... we forgot to set the alreadyInitialized flags and we were adding the same set of validations to the framework each time. For various obscure reasons, the setup actually appends to the framework rather than replacing it.

Amusing because I didn't believe what my eyes were telling me. Frustrating because it took 8 hours of me looking in the wrong place to track this down.

Sunday, June 3, 2007

I am the proud owner of a new cast iron skillet:


It's 17" across, which is the perfect size for making large pizzas -- which is exactly what we did today. The crust came out better than any other I've done.

Yes, I'm getting excited about cooking utensils. Eating well is important!

In other news, L-Com -- a provider of networking equipment and cabling -- knows how to appeal to the Y chromosome:

Yes, they're showing some networking equipment being run over by a truck.

Resulting conversations go something like this:
Husband: We need one of these.
Wife: (Comes over) What are you looking at?
Husband: It's an OC-3 to OC-12 media converter.
Wife: Err... it's a thousand dollars. Where are you going to use it?
Husband: I... don't know. But we need it!
Wife: What do you mean you don't know? How can you need it, then?
Husband: Isn't it obvious? It can survive being run over by a truck!
Wife: (Shakes head, walks away)

Wednesday, May 30, 2007

The recent mass deletion of "objectionable" communities and journals has me on edge. Not that it affects me directly -- none of the communities I visit were affected -- but the attitude being taken is so very big brother-ish. You can argue about legalese and how, as a corporation, Six Apart is not bound by the Constitution of the United States -- at a basic level, I feel there's been a violation of an implicit trust.

And, as an engineer, things that put me on edge spark me into looking for solutions to the problem. Technical solutions, not diplomatic ones (though I did pass the U.S. Department of State's Foreign Service Exam, I decided this isn't exactly my calling). It makes me wonder if there's a way to ensure this doesn't happen again -- e.g., by decentralizing the power that's currently centralized.

Ironically, solving this would solve a similar issue we're facing at work (, you might have seen my thread on sde-feedback@ about my ideas for a decentralized package store). I even have the basic idea in my head.

What I can't figure out, however, is how to restrict access in the manner of friends-only entries and the like. I mean, it's certainly possible -- a friends-only entry just becomes an entry encrypted with various friends' public keys. However, today I can trust that my restricted entries won't be reposted because I trust those on my friends list. With what I'm proposing, I would have to trust not only you, any software that you might run, and anyone who might acquire (illicitly or via other means) your private key, now and in the future.

That's a lot of trust.

I'm going to mull this over in my head a bit more. I don't know if it'll actually go anywhere -- honestly, work has left me in a zombie state most days. I'm angry, but I don't know if I'm angry enough to overcome zombie dacut.

Wednesday, May 23, 2007

Oof. Only a mile and change, but this left me wiped:


Swimming with a wetsuit feels like someone has attached rubber bands to my limbs. It's also nice, though a bit exhausting, to not have to turn around every 25 yards. :-)

Monday, May 21, 2007

Moron^H^H^H^H^H More on investing

Amazon's stock is up 7% today -- for no reason. I decided to sell my (small) holdings entirely.

I mean, rah rah company and all, but this is just irrational. Our P/E ratio is 107. In plainer English, this is thinking along the lines of: "If the stock price is tied to a company's performance, if I give you $107 today, I can expect this to be worth $108 a year from now."

This is a worthy investment in, say, a charity (where I expect to reap zero financial return). In a for-profit enterprise, however, it's silly. With inflation running a little over 1% per year, this is a net loss. Most banks will pay you a higher interest rate!

Now, there can be other assumptions being made in the valuation. Some of this is a correction for previous assumptions about stagnant profits, which were blown away during our last earnings report. It could also be shorts covering (an activity I'll explain below). Either way, this is not a position I feel a comfortable basis for investment.
What's this about "shorts covering"? No, it's not a way to hide your underwear. A short seller is someone who makes a bet that a stock fall over some time period. An example of how this works is:
  • Alice thinks Amazon's stock will fall over the next three months.
  • Alice borrows 100 shares of Amazon from her broker, Bob, which she immediately sells for $5/share, netting her $500.
  • Three months pass, and Amazon is now at $4/share. Alice buys 100 shares, costing her $400.
  • Alice returns the 100 shares to Bob and keeps the $100.


Ok, sounds reasonable. But what if Amazon's stock actually rises a month after Alice sells her (well, Bob's) shares? She could hang on, hoping that it will fall in the next couple months; on the flip side, she could decide to cover her losses and buy the shares back right now (before they rise further).

Like anything else, stocks are subject to supply and demand. When a lot of people want to buy the stock, this increases demand and the price rises. You can see how short sellers can create a feedback loop here: A positive report about the stock causes the price to rise; shorts cover their losses, causing the price to rise further.

Anyway, if this sounds a bit abstract and sketchy to you, you're not alone. I prefer a firm connection between a company's performance and its stock price.

Saturday, May 12, 2007

I think this short is going to give me nightmares.

Saturday, May 5, 2007

Canada does away with paper money

At least, that's what appears to be happening. They've just issued a C$1 million coin. It's 50 cm wide, 3 cm thick, and weighs 100 kg.

Sunday, April 29, 2007

What the hell?

From Microsoft's Knowledge Base:

When you enter a negative number in the ERF function or in the ERFC function, you receive a "#NUM!" error in the Microsoft Excel worksheet. The "#NUM!" error occurs when you enter a negative number as the lower_limit value or as the upper_limit value.

Additionally, if you enter a numeric value of 27.3345 or larger in the lower_limit value or the upper_limit value in the ERF or ERFC functions, you may receive a #NUM! error in the Excel worksheet.

CAUSE:
This problem occurs because Microsoft Office Excel 2003 and earlier versions are not designed to correctly process negative input values and input values that are larger than 27.3345. This is true even though negative input values and input values that are larger than 27.3345 are both mathematically correct.

Gee, thanks. What if I actually need to, say, compute erf(-1) for, say, comparing against a normal (bell curve) distribution?

Goddammit. Microsoft, you suck. I shouldn't have to write my own program to do something that should be so freaking trivial in Excel.

Wednesday, April 25, 2007

When I woke up this morning, I was quite a bit richer than I was when I went to bed last night.

Alas, it's all paper money, and I expect the irrational exuberance will settle down by the time my stock actually vests. Still, it's a bit nice to know that there's a possibility these golden handcuffs might be made of something other than fool's gold.

Thursday, April 12, 2007

Girl is incredibly attractive when wearing a black dress.

Friday, April 6, 2007

I'm not sure why I took this picture this way, but I like how it came out.

Saturday, March 31, 2007

Feeling much better today: everything is back to normal except appetite, which I can live with. Heck, that might do me some good.

In other news: one way to capture my interest is to put a big "OFF LIMITS" sign on something. In this case, a blacked out region on the Alaska/Canadian border on every satellite photo I can find:
Google Maps
TerraServer

Thursday, March 29, 2007

Ugh. I've been horribly sick the last two days, to the point where yesterday is a complete blur. I'm having trouble piecing together what was real and what was dreamed during my short fits of restless sleep.

Alas, the stinking, stained clothes in the bathtub indicate that the projectile vomiting was real.

Thank god I have a lovely wife who's willing to run out to Safeway at 6 am to buy Gatorade to rehydrate me.

Saturday, March 24, 2007

During a browsing stream-of-consciousness, I came across a YouTube video of the Dan Rather/George H. W. Bush interview during the 1988 presidential campaign. (Yes, I'm old enough to remember watching it.)

One thing I found quite interesting rewatching it: Bush 41 was perfectly happy to have his and others' testimonies provided under oath, and made quite a point of this during the interview. It makes you wonder why is his son so reluctant to do the same.

Wednesday, March 21, 2007

I just posted the picture of Athena widgets below in 's journal because she randomly mentioned widgets.

Looking at this -- what, 20+ year old? -- picture, it occurred to me: someday, there will be a revolt against all of these sculpted interfaces and eye candy, and people will be clamoring for the simplicity of Athena widgets.

Except the scrollbar. Sorry, but the Athena scrollbar's unintuitive behavior is just crap.

Tuesday, March 13, 2007

My quote of the day on Java and its fanboy community:

"Java is like an F-14 Tomcat. It can be a useful, deadly weapon. But you wonder what the heck you were thinking when you sold it to the Iranians."

Thursday, March 8, 2007

My job today was to be a babysitter. An overpaid, glorified babysitter.

This makes me regret that corporal punishment has fallen out of favor as a disciplinary measure.

Tuesday, February 13, 2007

Ugh...

Didn't quite make it to the 3 mile mark today. I was cramping up, badly.

Then, in the shower, I threw up.

Unpleasant^n. And I think I freaked out the head lifeguard, who happened to walk in as I was hunched over, trying to catch my breath.

Friday, February 2, 2007

My performance self-review for the past year is done and submitted. I have confessed to my crimes against productivity.

Yearly performance reviews are a joke, and Amazon's are no exception. The reality is they reflect what you've done in the last month (two if you're lucky).

Next week: peer reviews!
"Bob is a terrific coder. The only improvements I can suggest would be that he consider adding some actual logic and comments."
"Sally's code needs serious work. Although it saved the company $30M last year in reduced costs and increased uptime, she places braces on the same line as her 'if' statements. How can anyone be expected to maintain this crap?"