Tuesday, December 11, 2007

Let's work on your timing

Our cable internet is down as I right write this, so I'm on hold with Comcast. Perhaps they should put a little thought into what they advertise on the phone. After I had selected the choices for "problem with internet" -> "no connection," they still wanted to advertise their phone service and online troubleshooting feature. Really? They think I'm going to be receptive to getting phone service when my internet service is completely unavailable? And an online troubleshooter, as interactive as it is, is not going to be of use if I CAN'T GET ONLINE.

In other news, comcastmustdie.com

Wednesday, November 14, 2007

OK, let's try this again

Here's an update:

Tour d'Organics: A bike ride with the AIDS/Lifecycle crew. We were one of the few groups to do the century option, so when we finished the food was almost gone. This would have been disappointing, except all the food was vegan in addition to organic. Where's the beef?

Washington Monument

S and I went to Washington DC to visit her brother. I was surprised how collegiate the city felt, students scurrying to class were much more prevalent than the suits I imagined. Seeing how slowly people drove during off-hours, I can see why traffic becomes such a nightmare with more people on the road.

S, D, R and I went to the Ghiradelli Chocolate Festival. We "conservatively" got 45 tastings between the 4 of us and by the end of the day swore off chocolate for a week. My favorite was mousse brownies. On the way back we stopped by an art gallery. I asked one of the docents, "I saw a painting of a campfire on a beach when I was here a few months ago. Do you have the name of the artist?"



Within minutes S and I found ourselves in the "viewing room" with the docent, who had fetched the painting from an upstairs office, and the manager. Dimming the lights to show the layers of the painting, the manager explained Larry Horowitz's techniques for painting, his history, and how this gallery had found him. Soon after hearing the $3500 price tag, though, we had to say goodbye.

Later that week, I saw the Oakland A's lose for the second time this season. Getting a hotdog in that stadium is tortuous: an extremely inefficient serving process combined with unmotivated workers means that you have to spend an inning waiting for precooked food.

Closing out September was a trip to Yosemite. As we summited a trail that had passed Vernal falls and topped out at Nevada falls, it began to hail. Back at Curry Village that night, we celebrated with beer and pizza. Before leaving, we did a hike to Tafte Point, stopping for a pleasant sit on one of the crevasses.

Scenic seating

In November I saw friends from out of town, as well as went out of town to visit family.

Last week I celebrated my birthday at one of my favorite bars, Zeitgeist. It was a lively night; interesting conversations over a medium tasty beers and punctuated with rounds of "Happy Birthday." In recovery mode over that weekend, S revealed her surprise: a getaway to Santa Cruz. Secluded bed and breakfast, watching surfing competitions, spa and sauna, beer and wine tasting, a hike through a monarch habitat to the beach.


Wednesday, August 22, 2007

As Promised

This was my office for a week in Niwot, Colorado. We played, we brainstormed, we drank, we recovered from a datacenter power outage; it was a blast.

This week I got my bike tuned up and I'm preparing for my first big ride since AIDS/Lifecycle. Today I took this route up to work. If you don't mind a few surprise hills, Alameda provides an interesting route north. Varied neighborhoods, car free stretches, and a number of chances to get out of the saddle, today's ride was doubly rewarding. Sunday's ride is the Tour d'Organics.

Tuesday, August 7, 2007

Traveling

Looks like it's been a while. I've mostly been traveling.

Boston
S was finishing her rotational program at J&J, so I went out to visit. The hotel was nicely situated between Fenway, MIT, and the Boston Public Gardens, all of which I got to visit while walking around.

We had to wait 45 minutes to go on the Sam Adams brewery tour, but the beer at the end made it worth it. The tour itself was pretty short, but the host was funny and knowledgeable. The real standouts of the trip were our two meals at Neptune Oyster where we had raw oysters from all over the country and some of the best fish I've ever had.

Forest Hill
A friend I've known since 3rd grade got married over the weekend, and I was a bridesmaid :) I don't have any pictures of the wedding up yet, but here's a preview (a different wedding):


She has such a great group of friends and I had fun from the rehearsal through the after parties.

Colorado
I'm writing this from Niwot, CO where PBwiki is having a strategery retreat. Pictures will also be coming from much better photographers than I.

Wednesday, June 27, 2007

Orwell, PBWiki, and more biking

OK, this will be a scatter shot post since I have a few things to talk about, but not enough time to write full entries.

Orwell

This is the best essay
I've read in a while, though after reading and agreeing with it, one is constantly in fear of violating it's advice. What I like most about the essay is Orwell's ability to demonstrate the alternative to dreary writing: he tells of an author using "an accumulation of stale phrases [that] chokes him like tea leaves blocking a sink" and a sentence in which "A mass of Latin words falls upon the facts like soft snow, blurring the outline and covering up all the details."

I would love for artists to apply this advice to their lyrics and songs. I don't need to hear another identical song asking me to "hold on to me, and never let me go." Does that make you envision anything unique or memorable? To contrast, "a kiss on your molten eyes" is a wonderful line from the Shins that engages many senses to make the song more intimate. "Love is watching someone die" is a direct lyric from Death Cab for Cutie that begs for discussion and thought. Postal Service gives even cliched metaphors more realism with "Will someone please call a surgeon \Who can crack my ribs and repair this broken heart."

PBWiki

I changed jobs! This is my second week at a start up that hosts websites that anyone can edit. Running a book club, coordinating travel plans, or taking notes for your CS class? Make a wiki and let me know how it goes.

Rescomp and my various small projects are like living alone: you get to have almost complete control over your situation, but it's somewhat lonely. A9 was like living with your family: you have a lot of resources, but always have someone looking over your shoulder, telling you how they want it done. I don't know what PBWiki's metaphor will be, which is exactly the experience I wanted; "Fight the temptation to choose the clear, safe course. That path leads ever down into stagnation."

In the saddle

One thing that has not changed is my enthusiasm for biking. J and I completed the Page Mill-Skyline-La Honda loop, with the obligatory stop at Alice's. I've started a more varied, aerobic workout that I hope will increase my sprinting abilities. I'll let you know how the Old La Honda test goes.

Monday, June 18, 2007

Bay Trail

I wanted to take it easy my first time back on the bike after the ride, so I set out to explore some of the San Fransisco Bay Trail. The Southbay has a lot of surprises: Sunday I discovered a little park that overlooked the bay, complete with picnickers, a small lake with kayakers, and many families on bike. Unfortunately, the path behind Mofit Field is incomplete, so I had to take the long way around to get to the Sunnyvale sections.

Riding this loop was quite a difference. For starters, the trail is gravel, which I foolishly believed would just be temporary. I road on, simultaneously hoping for smooth asphalt and trying to convince myself that this could be justification for buying a mountain bike. The loop takes you by the lovely water treatment plant, with it's accompanying lovely smells of sewage. Asphalt is most useful spread on the ground for your riding comfort, not piled up on the side of the road, which is where I finally came across it.


Yes, that's correct: the road had actually been de-paved. My carbon renforced tires prevailed, though, and despite some fierce crosswinds I completed the loop without an accident. Without being pooped on either: I managed to disturb a huge flock of seagulls who proceeded to circle over me. Continuing the bird theme, I surprised a hawk while biking by its hiding place. What do hawks hide from? Well, as soon as it was out in the open, a group of crows started cawing and diving at it, chasing it 3 blocks along my route. "Common, you're a hawk," I wanted to yell, "end those jerks." Oh well, sorry about that, Mr. Hawk.

Even with some misadventures, being back on the bike was a great feeling. I look forward to navigating the rest of the Bay Trail soon.

Tuesday, June 12, 2007

I've Returned!

The AIDS/Lifecycle was an amazing experience again. I met another great set of people, stayed free of injuries, and felt much more confident on the bike this year. Here are a few interesting things I discovered on this year's ride:
  • I didn't miss TV at all. Talking with new people let me hear all the interesting stories I could want.
  • It's weird not seeing yourself for a long time. I only shaved twice on the trip, which were also the only two times I saw myself in a mirror. It was a strange feeling realizing you're not sure what you look like after all the sun and riding.
  • People can snore really loudly. At one point two people seemed to be having a snore war; I don't know how they are even breathing hard enough to produce noise at that volume.
  • I always looked forward to riding. I'm taking this week off to let my butt recover, but I'm looking forward to the next time I'm in the saddle.
Thanks again to everyone who donated and supported me. I look forward to riding with many of you in the future!

Saturday, May 19, 2007

Are You Ready?

Last year, not knowing what to expect on the ride, I was over prepared. This turned out to be great, though: I was able to have fun on the ride, lead a lot of drafting lines, and do harder events later in the year. This year, I have not had as much time to prepare, but I still feel ready.

Yesterday, J and I did 50 mile ride up to the Crystal Springs Reservoirs. Today, in an effort to practice back-to-back days on the saddle, I'm going try this ride out to the Pacific. Riding these distances is very liberating; with planning, I can basically travel anywhere in the Bay area without relying on anything other than my bike and my own legs.

Wednesday, May 9, 2007

What We Do

"I'm programming in the Bay Area," I usually reply. This superficial answer is unfortunately about as deep as non-tech people want to hear. Computer science has the dubious distinction of being the most popular profession that most people don't understand. It's certainly not helped by a media image of a loan hacker sitting in front of a glowing screen in a dark room. I'm going to try to boil it down so that my mom and sister can understand the basic areas of the computer profession. I try to avoid metaphors because I want people to understand what I *do* do, not what I "like" do.

Coders

OK, maybe not the best group to start with, since this group includes the load hacker in the dark room. But more commonly, these are the folks that write detailed instructions which tell the computer how to handle specific situations. For example, at Amazon, when you search for products, the words you type in the box have certain rules applied to them. When you type "shirts" products labeled with "shirt" need to come up, so you need a rule to singularize the words. But think about the English language: this isn't easy. Boxes, hoodies, shoes. So a coder needs to come up with instructions to handle all of these cases, the rule to "remove the last 's' from words that end in s" will only be a part of it.

Engineers

Computer engineers take real world problems, break them down into smaller sub-problems, and describe a general way to solve them. Coders take that general solution and write specific instructions to the computer to solve the sub-problem. Continuing the search example, engineers took a problem -- how can people find products they're looking for? -- and broke it into sub-problems: if people tell us what they're looking for, how can we give them suggestions? if we have a list of suggestions, how can we show them? Then they arrive at a general solution: people type in a short description of the desired product to tell us, we make a list of products that have all of the words they're looking for in their description, then we show some of the products on the web page.

Operations

This is my group. 'Ops' is in charge of keeping the software running. Sometimes programs crash; we develop software called 'cradles' which can restart a program in the event of a failure. Sometimes programs get overloaded when everyone logs in at once to begin their Christmas shopping; we set up new computers and faster networks to handle increased number of users. Sometimes software mysteriously starts running slower than usual; we discover assumptions that coders or engineers made that aren't valid and try to work around them. One example is if a machine runs out of disk space. We either produce software that detects this and removes old files, or do it manually.

Quality Assurance

QA teams develop and run tests against the software. They make sure that a search for 'shoes' matches products with 'shoe,' not 'sho.' Many techniques are involved in this: regression (comparing a new version of the software to the old), unit test (compare each part of the software, for example just feeding words into the part of the software the singularizes), corner cases (what happens in weird situations like using foreign languages).

Scientist

Computer scientists usually write two types of research: papers which solve hypothetical problems, or papers which analyze a class of solutions. The hope is that hypothetical problems will eventually become real problems for the former, or that by analyzing a class of solutions, an improved solution to an existing problem will make itself apparent. For the class I am taking, an example of the former is papers from the 1980s which try to solve how computers should keep in sync with each other: when I transfer money to your bank account, that money shouldn't disappear, it should either be in my account or yours. However, the techniques that were proposed at that time aren't working so well, so more recent papers are analyzing the techniques that engineers ended up implementing.

Now You Understand Completely

Well, not really. It turns out that most jobs are a combination on these fields. Engineers often code the specific instructions after they describe the general solution. QA folks have to understand what real world problems a program is trying to solve in order to think of test cases. Scientists work with companies to develop solutions for specific problems.

Additionally, this is just a taxonomy I wrote down after a little thought. Certainly there can be other ways to organize the field, and you won't get a definitive answer if you ask people "what category are you in?" Hopefully, though, this can give you a background for some of the issues that are discussed around the computer industry.

Outsourcing

Coding jobs are the main target of outsourcing. Because the process of coding is often closed -- general solution in, computer instructions out -- coding teams can be separated from the end customer.

Schools

Universities want to produce engineers, but often they produce a mix of the worst qualities of scientists and coders. They produce a scientist's attention to implementation details and a coder's attention to the overall problem being solved. Classroom projects are run in an academic setting and don't need to worry about security, portability, or decade long maintenance issues. Without a bigger picture, coders can product instructions that are technically correct, but which fail to anticipate customer needs and implicit requirements.

"Why aren't you programming?"

Graduate classes in computer science focus on the science aspect, not coding. That's why my assignments don't involve programming and why professors often need help setting up their Windows computer. When programming is involved, it is used to assess how well you understand a problem. If you can write instructions to the computer for every situation in a problem space, then you've demonstrated good comprehension of the problem and solution.

The Story Continues?

Agree, disagree? Write comments :)

Sunday, May 6, 2007

Take that, AIDS!

First, the awesome news: because of the generosity of many people, we broke the $7000 mark for AIDS ride fundraising! I'm so glad I decided to do the ride again this year, because my experience already has been very different. Last year, I started fundraising and training much earlier. Donations came in from mostly close friends and relatives: a steady stream that was encouraging. This year I began late, but if anything that seems to have made folks more motivated! I have been getting donation from a wider range of people, and my repeat sponsors are giving inspiring amounts.

For those who haven't had a chance to donate yet, even though we've surpassed my fundraising goal, I want to point out that we still haven't met the goal of defeating an epidemic that has killed 25 million people. Your support is still needed and appreciated!

Second is a change in plans. Earlier this year I had really wanted to do the Tour de Cure, 1 day cycling rides that raise funds and awareness for diabetes. Unfortunately, because of scheduling conflicts, I won't be able to do these rides this year. I encourage the other cyclists who read this blog to look into them, though, as I think charity rides are a great way to take the next step in the sport.

Thanks again for everyone's support!

Sunday, April 29, 2007

Beautiful Backyard

Thank you for the donations so far, guys. I got a late start this year, so if you're thinking of donating, don't delay! Today I completed a big training ride around the Open Spaces area. The weather was awesome, the hills were green, and I got to meet a bunch of people.

The route.

I think Moody is easier than the lower part of Page Mill because it slowly elevates before the big hills. Page Mill was very challenging, as usual: I think I set a new record on my heart rate monitor: 194bpm. Here's my favorite turn on Page Mill, taken last year:

Page Mill Switchback

There's a Y in the road where Alpine turns West that I like to stop and eat my snacks. Today there were a couple of bikers hanging out there as well, so I stopped to chat. They had driven from the Central Valley just to do this ride with a few friends. "You have a beautiful backyard here," they said. I'd have to agree, I can't think of a better place to train and improve. The hills are hard, but the scenery, bay views, and redwoods make every turn exciting.

There used to be this random water fountain on the south side of Page Mill. It was great because there are basically no other places to get water up on Skyline. It was removed some time during the winter, though, and all that's left is PVC pipe sticking up out of the ground. Luckily, though, I ran into a ranger who, when asked where the nearest fountain was, offered two of his own water battles. After ensuring that he didn't need them, I talked to him while I refilled my bottles. Apparently a rancher had set up the fountain for folks passing by, but the cold snaps we had last winter broke the water lines.

Coming back up La Honda, I stopped at my favorite burger place, Alice's, for refueling. The tables are big picnic tables, so I happened to sit with some mountain bikers. After a delicious burger and ale, I swooped back down the mountain, passing a couple slow cars that were polite enough to move over.

I do need to concentrate on training in the next couple weeks: ALC is only 5 weeks away!

Thursday, April 12, 2007

By Accident

This post was from February of last year. Miraculously, I manged to correctly navigate all of last year's AIDS ride. I still rely on S to get me back on track when I get turned around, but luckily those request have become much more infrequent. Without further ado:

I was chased by a dog today for the first time! Luckily it was a smallish dog... with stubbly legs. OK, it wasn't really a threat, but it was exciting. I was doing my longest ride yet, a loop around the South Bay. I made a little detour around mile 19, mistakenly thinking it would reconnect with my route. As I was turning around, I heard the barking of a dog preparing to protect it's territory. Rather than get off the bike and trying to settle the dog down, possibly involving small teeth embedded in my skin, I took off. Its instinct aroused, the dog gave chase. Winding through a small park, I eventually lost him as the park path connected to the street. I'm not saying that I look forward to my next canine encounter, but surprises like this turn out to be essential parts of my training, pushing me a little harder than I would on my own.

One of my most common surprise is the wrong turn. The Sand Hill/Alpine/Page Mill region around Portolla Valley still manages to confound me. My medium commute was originally going to be shorter, cutting into Palo Alto on Alpine Rd. instead of going around to Sand Hill. However, the "wrong" turn I made on my inaugural trip ended up being a much better morning workout; my original route would have shortchanged me.

Of course, the next time I rode, I missed the Arestradero turn, and ended up stuggling up Page Mill. After about 800 feet of climbing, and no real idea of when it would end, I decided to turn back. The climb was a great challenge, though; pushing yourself up hills like these are the best way to really increase the body's ability to process oxygen.

Last weekend's ride was determined en route as well. Rolling out of bed at 9, I realized that I had missed nearly all of the weekly AIDS training rides. Hastily I decided I could make the 9:30 roll out time for the South Bay group, but driving up to the Union City meet point, I saw the big group already cycling down the rode. Foolishly undeterred, I parked and hopped on my bike. Not knowing the route, though, I was never able to catch up to the main group. Riding in a southern direction, my best guess as to the route, I found myself serendipitously in S's neighborhood. After a quick consult of Google maps, and a good-luck kiss, I was back on the rode, solo. I don't think I would have attempted such a long route without having taken that first stumble forward. So, while next time I hope to be better prepared for a ride, I'm thankful for all of my surprises so far.

Wednesday, April 4, 2007

On the Road Again

It's official: I'm riding in this year's AIDS/Lifecycle! Last year I road almost 550 miles, slept in 6 new cities in a tent with a stranger, met hundreds of awesome people, popped 4 spokes, and raised $5,000 for the SF AIDS foundation. It was an amazing experience, and I knew I had to do it again this year. You can sign up to sponsor me now!
Paceline Crew
This year, I'm also planning on doing two Tour de Cure rides, so I'll post details about that when I sign up. My fund raising goals are $3500 for ALC and $750 for each TdC. (For the curious, this is approximately the ratio of days I'll be spending on each ride.)

I'll be reposting my entries from last year's ride, and keeping everyone up to date on my training. Thanks for your support.

Saturday, March 24, 2007

OpenGL Tetris in Haskell

Over the past couple weekends I've tried putting my new language interest, Haskell, through the paces by witting a version of Tetris with HOpenGL bindings. Herein is an overview of my progress, and a call for help from the more experienced in the Haskell community to show me and other newbies how this can be improved and why.

The Good
As noted, um, everywhere, Haskell is a really deep language. As a beginner, the features that have struck me are the ease of defining functions, pattern matching in definitions, currying, and the seemingly endless stream of higher order functions.

Making function definitions as easy as variable assignments in other languages encourages me to break apart logic and leads to cleaner code. Defining functions in the `where` clause I've found to be especially handy and elegant. Unlike imperative programming, where code with very similar functionality can hide in a jungle of statements, repeating code in Haskell is easy to pick out and convenient to factor out.

Pattern matching in function definitions has been incredibly handy. In Perl, I'll often use a hash to map things like tetris shapes to their set of points. Haskell's version is more useful because I can define a function which takes a shape and returns a set of points associated with it. The difference is I can pass this function around or use it in higher order functions without using extra syntax to do the lookup.

Currying without any extra syntax is a big contributer to Haskell's clarity. Now that I've experienced it's usefulness, I don't think I could go back to languages like Scheme without constantly complaining about its absence.

Besides the standard `fold` and `map`, I find myself thinking "Wow, that will be usefull" whenever I look through Haskell's standard libraries. Functions like `zipWith` or `unionsWith` make even the most useful Java classes look barbaric.

The Bad
When I first started writing Haskell, the thing I found most annoying was the big change in associativity. The downside of functions being treated exactly like data is that it becomes impossible for the compiler to correctly predict how you want things grouped. It didn't take long to become accustomed to Haskell's rules, but for whatever reason learning to use $ and . correctly took a bit time.

Monads obviously need to be included in this list, but I found understanding the simple monads such as IO, Maybe, and Either simple enough to quickly make progress. I have not implemented my own, and I suspect my Tetris code could be significantly improved with better understanding, so I'll be digging into this area again soon.

Typing has not been a problem for me. Haskell's typing inference system works great, and the times I've run into typing errors have been either an error in my code (most frequently), or, in my belief, a bad framework for what I was trying to accomplish.

The Ugly
I've basically run into the same problem with libraries and setup documented by Eric. Documentation of libraries could also use a lot of improvement. Here's an example of documentation for a function in some introspective code that I was trying to understand:
mkConstr :: DataType -> String -> [String] -> Fixity -> Constr
Constructs a constructor
Not very helpful.

What About Tetris?
First off, I don't think that Tetris and OpenGL map onto Haskell very easily. OpenGL in particular is very stateful, and even setting up a simple animation requires using Monads to work around Haskell's lack of side effects. I think this excersize is still useful, though, because in pushing a language to it's boundaries and forcing you to use it's less hyped features, you can often getter a better understanding of it's strengths and limitations. Before starting this project, I read over Michi's posts. In fact, his cube generation code is largely unchanged in mine.

What I'd like to see happen is for the amazingly helpful Haskell community (seriously, check out #haskell some time, it is the nicest, most helpful channel I've visited) to take my crappy code, explain why it sucks, and show me and other timid beginners how to do better. Just add a comment to where people should look for improved versions.

My code is available at PBWiki.

Tetris.hs
This is the code that kicks off the OpenGL loop. Callback functions are used to display objects, coordinate movements, and set state. You can see by the number of newIORef calls how much state is being passed around to each callback. The most confusing line here is probably the assignment to curMatrix. curMatrix keeps track of the matrix transformations that occur when the mouse is moved so you can use a "glass ball" type interface to rotate the tetris board around.

Display.hs
This file contains the display call backs that render the pieces and board. To implement the mouse interface, the display matrix is reset with loadIdentity. The new translations from the most recent mouse movement are applied, then the previous matrix is applied.

dropPiece drops the current piece, or sets the fallen piece and starts a new one.

idle is a callback that is continually called and it simply asks OpenGL to redisplay the screen in it's next loop. This is the alternative to calling postRedisplay after all movement changes.

TetrisPiece.hs
This file contains the code that keeps the coordinates for shapes and instructions on how to render them. translatedPoints is a function which can take the default coordinates of a shape and apply the transformations that the displayed shape receives so that collision detection can be done.

TetrisBoard.hs
Setup for the shape of the board and the boundary initialization are done here. tableMap is basically an array of all the (x,y) coordinates with False inside the boundaries (because there are no fallen pieces yet), and True along the boarders.

clearLines takes a board and clears any full lines; basically, the purpose of Tetris. Using foldl, it iterates over a list of lines given by their 'y' coordinate. For a given line, if that line is at or above 'y', it takes the contents of the line above it. The base cases are the boarders of the board, which should keep their boundaries.

Sorry for the mixed naming, by the way. 'board', 'b', 'tableMap', 'boarder' are all generally the same thing: the mapping of the contents of the Tetris board, ie the fallen pieces.

Bindings.hs
keyboardAct defines how a key press can move a shape on the board, while movePiece determines if this movement is valid.

Translations.hs
These functions are used to calculate translated points for collision detection and the "tetris unit" is defined here. Using `tunit` not only helps to keep things in correct proportion, but it also helps Haskell's typing inference when used as a unit.

Thursday, March 15, 2007

Lessons from Ops

I am a programmer who enjoys working "only slightly removed from pure thought-stuff." But when I left college I chose a job that was decidedly oriented toward beating this thought-stuff into the ground of reality. I wanted to learn the details of how to program large-scale, heterogeneous systems that were possible, if not easy, to maintain. Not "maintain" in the programmer sense of the word (ease of adding new features, finding bugs, etc.), but maintain as in enabling users to understand, control, build upon, and rely on the system.

Oh, That's Typical
I'm going to stay away from the common recommendations such as DRY because I'd like give specific pointers that apply to the situations I've seen. The hope is when I write programs in the future, the tips herein will pop back into my mind and I'll produce systems that are easy to debug, understandable by people uninvolved in the development, and predictable.

Doesn't Play with Others
A data problem was reported to our team the other day. Typically, finding the source problem requires a large amount of domain knowledge: where are the files that configure the various transformations that this data goes through? Who typically publishes this data type? Where are the logs that may have information about this document? The path to resolution is like a little known covered wagon trail through the Sierras: you need an expert guide and most of the time you get stuck at Donner pass. What should be provided is a yellow brick road: it may require a little work to get there, but you know where you need to take your next step.

Introspective vs. Transparent
At it's root, debugging is about figuring out what happened and why. To provide an easily debuggable system, simply provide the what and why at every step that business rules are applied. Just as importantly, provide it as a service in the same way that interested parties normally interact with your system. Adding `printf`s to your code is great for programmers who usually interact with a service on the command line or `tail` files, but it is nearly useless for clients.


The Boudin bakery in San Francisco is transparent, literally. You can see them mix the dough, cut bread, and bake it. But that doesn't let me understand any of the decisions they've made; I couldn't go home a bake delicious sour dough in which to put clam chowder. In order to do that, I'd need to interact with the cooks in the normal way: ask questions, have them explain what's going on.

Except for the most basic services, data transparency is not that helpful. Think about the questions you'll get from users. When did this data change? Who changed it? Where did it come from and how did it get transformed? How would the system react in different situations? These are the questions that need to be answerable in a straightforward manner.

If you're worried about performance, or exposing too much information to customers, keep in mind that introspection is a system property. It doesn't have to live in your main service, especially when lots of historical data is desired. It would be nice, since people don't have to learn a system with more components, but it's not a requirement. Unique identifiers (database keys, document IDs, URLs) should be usable across the system so a story can be put together programmatically. A coworker of mine suggested that the public password for a system we are developing should be the URL of a wiki page they should read before using the service. I love this idea because it eliminates an often fruitless search for information and directly ties the wiki service into the overall design. Think how useful it would be to have wiki links for each error your service produces along with the ID of the data that was involved in the problem.

You From Around Here?
Even programs with great documentation can't cover all of the potential questions from a new user. Often users can't express their issue in the jargon that would enable them to find and understand the solution. Providing a way to "show and tell" what's going on gives users a chance to understand from experience. Just as languages with an interactive shell and introspection let users get an intuitive feel, systems should provide users with meta-information that they can manipulate.

To Be Continued
This turned out longer than expected, so I'll continue in a later post. Leave comments so I can improve my writing and ideas.

Wednesday, March 14, 2007

Medium Work Route with Shortcut

This bike route to work takes me through Arastradero Open Space Reserve. This year I have only ridden the route with the Alpine shortcut. The ride takes about an hour at a strong pace. Two quick but steep climbs make the ride good for training even given its short length.


Since last year, they've repaved many of my common routes. Especially improved is the Ellen Fletcher bike boulevard that I take home from work. All last year I had to worry about flat tires, hidden potholes, and a generally jarring ride on a road supposedly designed for bikers.

With the weather getting up to the 80s, my whole house now a fan of cycling, and increasing time pressure to get ready for the AIDS ride, I hope to get out a lot more in the coming weeks.

Tuesday, March 6, 2007

Cycling the Saratoga Loop

J and I decided to bike out to Saratoga, he to get to I's house, and me to burn off some of the cookies I'd had at my folks' place over the weekend. We started off a moderate pace, and J, champion that he is, requested we kick it up a notch. Soon we were at the top of our first hill overlooking the Steven's Creek Reservoir. Here's the map on Google Maps.

The climb up to the Reservoir is about 250 feet, and the view is pretty nice up there. I've been meaning to have a picnic by the river in the valley; it's very lush and peaceful. Next was Mt. Eden, a tough hill for anyone, especially a beginning cyclist. In fact, it was about 1 year and 1 month ago that I had climbed this hill as a newbie and was so tired afterward that S came to pick me up from Saratoga. It's also about 300 feet, but squeezed into a single mile. But it too was conquered, and we wound our way down the hill and made it to I's house in about 1 hour. There I made my questionable decision to take a different route back.

With J dropped off, I decided I wanted to take a loop back. An additional draw was the fact that I hadn't taken the Hwy 9 to Hwy 35 route before, but I knew it had great views of San Jose and wound through the forest most of the way. The climb up 9 turns out to be just over 2000 feet. Who knew? Well, I do now, and it was pretty painful. It's good to know that I haven't lost too much cycling power over my break, but I think it would have been healthier for me to work up to rides like this.

Wednesday, February 21, 2007

Wine Tasting in Livermore

S and I went to Livermore to do some wine tasting. Yes, I'm sure it was wine, not bootleg grape juice brewed in the basement of a suburban sprawl home and run across the county line by a soccer mom in her SUV. We got a late start on President's Day so we only made it to three wineries instead of the dozen or so we were hoping for. I made a notebook of these Southbay Wineries. or you can buy my source, The Best of the Wine Country. WARNING: The following contains extreme yuppyism, for I am about to discuss wine. Please resist the urge to punch me in the face after reading this to restore your street cred.

Retzlaff Winery


Because of it's small size and smooth wines, this was a good place to start. When we arrived, the hostess was the only person in the tasting room. After tasting a few wines, I readily admitted that we were fairly new to the wine tasting circuit. This started a pattern that would repeat itself for the rest of the day: the hostess completely opened up, took us on a tour of the aging rooms, and let us sample different vintages, from the casks, for free. It was a great to see the evolution of the wine, starting with an '06 recently picked, to a dark '01. The thing that surprised me most was how much the wine changes in the first year ('06 compared to the '05). It was another example of the last 10% improvement costing the most.

Neither S nor I like Chardonnay, but the version here was very clean and didn't have the dry oaky flavor that normally turns me away. The reds were also clean; too clean actually. I prefer the bolder wines we found later that day.

Concannon Vinyard

Quite a contrast to Retzalff, Concannon had a large storehouse and tasting room. The medium sized parking lot was full, so we were looking forward to a different experience. President's Day weekend the winery opened its reserve wines for tasting, pouring them at different stations complemented by cheese or chocolate. Again I started asking newbie questions at one of the later stages and struck up a conversation with the folks behind the table. Before I knew what was happening, S and I were whisked away and had started a private tour of the winery.

We started outside, looking at the hoppers which separate the grapes from the stems and leaves. Taken through the distillers, mixers, and filters we asked questions and got to poke our heads into some of the empty steel containers. Andrew, our host, gave us a few lessons on how they buy, care for, and use the wine casks. The above picture is one of the original grape presses that was used by the founder, James Concannon.

Jim Concannon is the grandson, and now runs the vineyard. We met him in the storage room, where the casked wine was held at a constant 54 degrees. Jim told us about climbing around the old room when he was young, pointed out the grooves in the floor where the draft horses used to haul full casks in or press grapes, and explained that the winery was only able to stay open during the prohibition thanks to the communion wine needed by the local churches.

Petite Syrah is the Concannon specialty. For me, though, this wine ended very abruptly. The "full" Syrah was more enjoyable and the Merlot was excellent: very bold. They had a new-to-me Spanish style wine, Contenello (?), that was nice and spicy. The whites were disappointing.

Crooked Vine

Crooked had an enlightening barrel tasting scheme: there were three casks, two different types of grapes, and two different types of wood. I was surprised that the type of wood, French Oak versus American, had already altered the taste of the wine. These casks were also '06 wines, so they hadn't been aging long. We talked with the hostess about the job of the head winemaker: how do they know when a wine is done? What are they looking for? How do they blend? The answer to all the questions is basically "whatever feels right to him/her." This drove the personalization of the wine home for me: with so many ways for a grape to interact with its soil and environment, the resulting juice to interact with its cask, the resulting wine to be tweaked and aged by a wine expect, and the end product to interact with the taster, no wonder there are so many variations.

I highly recommend a trip to this area, and you'll be reading about my next one.

Saturday, February 17, 2007

2 Nights in Dublin

B is going to Dublin, Ireland for two nights, so I thought I'd write a schedule. I visited Dublin this last December, sent by work. I had an amazing time and was able to pick up a lot about the city from walking around, talking to people, and visiting the museums.

Background

The main part of the city is quite small, which makes walking around easy. If you have time, you don't really need a schedule since you can just walk to wherever you feel like visiting next. Additionally, walking around makes it easier to find the place you're going. There's approximately 50 million small streets in Dublin, and if that wasn't enough, the main through streets change their name every couple of blocks. I suspect this is why I never found any Mapquest equivalents for Dublin.

I think the best way to enjoy Dublin is to appreciate the contrast the city has. Visit an old museum, then sit in a bar talking to locals. Visit Kilmainham then view some modern art. One of the reasons visiting other counties is so interesting is because that kind of contrast doesn't really exist in America.
Schedule

OK, I'll stop rambling now. If you're there for two days, here's what I'd pack in.

Day 1 Morning
  • Check into the Paramount
  • Walk through the street market, get some breakfast at the food square at the beginning of Temple Bar district
  • Walk back past Paramount, take tour of Christchurch, including the crypts.
Day 1 Noon

  • Walk to Guinness Storehouse, take the tour, have a pint in the Gravity Bar
  • Look across the street, see the Digital Hub which is where the Amazon office is
  • Have lunch at Nash's, aka DUB0, on Thomas St.; order Guinness' seasonal beer
Day 1 Afternoon
Day 1 Evening
  • Catch last Hop-on-Hop-off bus, get off at Jameson's Whiskey stop
  • Buy tickets for Jameson tour (discount with bus ticket), buy an Irish Coffee while you wait
  • Sit in the front row during Jameson tour movie, immediately raise your hand when guide asks who wants to be a special taster
  • After tour, cross back over the river on Hapenny bridge and eat at Guel
  • Walk to Peter's Pub off Graffton, sit at the bar, talk to people, try Green Spot, drink Guinness
  • After 10:30p, go to O'Donoghue's watch great live music
  • Stumble back to Porterhouse, across the street from Paramount, drink more
  • If you're hungry, eat at Zaytunes
  • Sleep
Day 2 Morning
  • Have an Irish Breakfast
  • Catch Hop-on-Hop-off bus, listen to tour
  • Hop off at Stephen's Green, walk around
  • Buy Green Spot at Celtic Whiskey
  • Walk along Nassau street, buy things
Day 2 Noon
  • Go to Dawson's Lounge, have pint(s) and lunch (if you are hungrier than a sandwich, eat at Kilkenny's cafe)
  • Walk through Trinity College, see Book of Kells
Day 2 AfternoonDay 2 Evening
  • Get fish & chips at Leo Burdock
  • Go to Bar Restaurant on St. George's St., get a Guinness and a brownie at the bar
  • Walk through Temple Bar, get a cocktail at one of the sleek hotel bars
  • Go back to your favorite bar, or for a longer walk, go to Mulligan's
Day 3 Morning
  • Pack and take cab to airport
  • Have pint and go home. Good job!
What did I misss?

Tuesday, February 13, 2007

OK, This Is Very Exciting

Sam Adams has developed a new beer glass.


As my beer snobbishness grows, I find myself unable to drink out of plastic cups any longer. I suppose it's not long till I can't drink out of glasses not specifically designed for the type of beer I'm drinking. Frankly, I already have a hard time drinking out of glasses that have a Bud or Coors label on them. As a geek in general, I'm also particularly attracted to using the "do one thing and do it well" philosophy, so specialized glasses appeal to me.

I view Sam Adams as a middling microbrew that hit it big. The beer is still better than the rest in its class, but its class isn't great. I respect them for trying to raise the level of national American beers and maybe serving as a "gateway beer" for many people. Of light beers, Sam Adams is the best (probably because it was developed by the inventor of light beer), but again: not a class of beer I enjoy.

I like seeing companies using their popularity and profits to do interesting things that advance their field. Google is an obvious example. The glasses are on their way to me now, so I'll let you know if Sam Adams is now an example, too.