It Begins

posted on 2010-12-29 - amd.im/J5qv

And so it begins, another of us catches the motorcycle bug. My nieces got a tiny Kawasaki dirt bike for Christmas, complete with Training wheels. Scarlett wasn't that interested, but Adelaide got right into it and was reving the engine and asking when the weather was going to be clear enough for her to take a spin around the yard.

Focused

posted on 2010-12-12 - amd.im/73P2

I went with my nieces to the ice skating rink yesterday. Scarlett had fun, but was very focused during her time on the rink. You can really see the effort that she's putting in.

Bloom Energy

posted on 2010-11-11 - amd.im/8Req

Well, tomorrow will mark my last day at Apple. The last two and a half years have been an incredible experience. Interesting, educational, exasperating, and still hard for me to believe. I think it will be a long time before I've fully processed all the experiences I've had working at Apple, but that processing can begin as my days at Apple have come to a close.

A great opportunity came up with Bloom Energy so I'm moving from Apple and consumer electronics to Bloom and green energy. It's an interesting company with an even more interesting product. For those of you who aren't familiar with Bloom's fuel cells from the recent news coverage here is the feature that 60 Minutes did on Bloom Energy. If that doesn't satisfy you there's a bunch more links on the Bloom Energy news page.

I will look back fondly on the projects I worked on and people I worked with at Apple, but I am very excited to see where this new adventure will lead me.

Wish me luck.

Laguna Seca Track Day

posted on 2010-11-02 - amd.im/EWrz

I took a PTO day and went to Laguna Seca with Alex for a track day of his.

There were a couple cool vintage cars having a day of it and it really made me want to work on my 2002.

Unfortunately, I brought a camera with dead batteries, so I didn't manage to get a photo of the 2002 Roundie that was there, but I did manage to get one shot of this 66 Mustang before the batteries totally died.

Server Side Dynamic Elements

posted on 2010-10-06 - amd.im/9PCQ

I am a big fan of Ruby and most of the things that come with it. The exception to this is the overhead generated by dynamic websites built upon it. Server side dynamic content generation is a big issue that I have run up against many, many times. In light of these issues, I had originally planned to do client side parsing of the Twitter, Flickr, and Delicious streams that I integrate into amdavidson.com.

This worked fine until I left the country on a business trip to China and realized that the Great Firewall of China would not block the client side scripts from getting at Twitter, but just let them time out. This led to awful page loading times.

I have been looking to switch amdavidson.com back to Ruby for some time as I don't much like working with PHP. This gave me a good opportunity for a rewrite and here's some server side parsing that I worked out.

For Twitter I wanted to pull the JSON data stream and do some basic formatting and linkify the usernames and URLs in any of the tweets. I came up with the following code:

<%  if twitter_enabled == true then
    require 'open-uri'
    require 'json/ext'

    twitter_url = "https://api.twitter.com/1/statuses/user_timeline.json?screen_name=amdavidson"
    response = open(twitter_url, 'User-agent' => 'amdavidson.com').read
    tweets = JSON.parse(response)

    def linkify(text)
      text = text.gsub(/(?i)\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?]))/, '<a href="\\1">\\1</a>')
      text = text.gsub(/@([A-Za-z0-9]*)/, '<a href="http://twitter.com/\\1">@\\1</a>');
      text
    end


    for t in tweets[0...5] do
  %>

      <div class="tweet tweet-<%= t["id"] %>">
        <a href="http://twitter.com/<%= t["user"]["screen_name"] %>"><img width="48" height="48" src="<%= t["user"]["profile_image_url"]%>" rel="<%= t["user"]["profile_image_url"] %>" /></a>
        <p class="text">
          <span class="username"><a href="http://twitter.com/<%= t["user"]["screen_name"] %>"><%= t["user"]["screen_name"] %></a>:</span>
          <%= linkify(t["text"]) %>
          <% if t["in_reply_to_screen_name"] then %>
            <span class="time"><%= DateTime.parse(t["created_at"]).strftime("%B %e at %l:%m") %> in reply to 
            <a href="http://twitter.com/<%= t["in_reply_to_screen_name"] %>/status/<%= t["in_reply_to_status_id"]%>"><%= t["in_reply_to_screen_name"] %></a></span>
          <% else %>
            <span class="time"><%= DateTime.parse(t["created_at"]).strftime("%B %e at %l:%m") %></span>                         
          <% end %>
        </p>
      </div>

  <%    end
  end %>

Breaking that down a little, I pulled the stream using open-uri, then parsed it using JSON.parse, then linkified it using John Gruber's excellent (and extremely long) url matching regex and a regex of my own design for linkifying the twitter usernames that are mentioned in a tweet. The rest of the code is just formatting.

Here's a bit simpler code for my 12 most recent Flickr images:

<%  if flickr_enabled == true then

  require 'open-uri'
  require 'json/ext'

  flickr_url = "http://api.flickr.com/services/rest/?&method=flickr.people.getPublicPhotos&format=json&nojsoncallback=1&api_key=#{ENV['flickr_key']}&user_id=#{ENV['flickr_id']}&per_page=12"
  response = open(flickr_url, 'User-agent' => 'amdavidson.com').read
  photos = JSON.parse(response)["photos"]["photo"]

  for p in photos[0...12] do
    square = "http://farm#{p["farm"]}.static.flickr.com/#{p["server"]}/#{p["id"]}_#{p["secret"]}_t.jpg"
    medium = "http://farm#{p["farm"]}.static.flickr.com/#{p["server"]}/#{p["id"]}_#{p["secret"]}.jpg"
    url = "http://flickr.com/photos/#{p["owner"]}/#{p["id"]}"
%>

<a class="preview" href="<%= url %>" rel="<%= medium %>">
  <img class="flickr-img" src="<%= square %>" alt="" />
</a>

<%  end
end %>

And my code for Delicious:

<%

if delicious_enabled == true then

  require 'open-uri'
  require 'json/ext'

  url = "http://feeds.delicious.com/v2/json/#{ENV["delicious_name"]}"
  response = open(url, 'User-agent' => 'amdavidson.com').read
  links = JSON.parse(response)

  for l in links[0...5] do      

%>      
    <li>
      <h2><a href="<%= l["u"] %>" title="<%= l["d"]%>" target="_blank"><%= l["d"]%></a></h2>
      <p><%= l["n"] %></p>
    </li>


  <%    end 
  end %>

None of this code is very light on the server, if you have lighter methods. Please let me know. I would love to lighten the loads, but in the mean time I plan to try to mitigate the load with the Varnish HTTP caching that is built into Heroku.

Wordpress XML to toto

posted on 2010-10-06 - amd.im/Iphx

In my efforts to convert my blog at amdavidson.com I wrote a little script to convert the xml file that Wordpress can export into text files that toto understands.

It's extremely hackish and will likely not generate 100% solid data, I had to edit ~10 of my 140 posts. Do not use this on a production system and check your posts before hand.

If you're still inclined, here's the gist:

#!/usr/bin/ruby

require 'rubygems'
require 'nokogiri'

puts 'parsing xml file'
parsed = Nokogiri::XML(open("./wordpress.2010-10-06.xml"))

puts 'pulling titles'
i = 0
title = Array.new
parsed.xpath('//item/title').each do |n|
title[i] = n.text
i += 1
end

puts 'pulling dates'
i = 0
date = Array.new
parsed.xpath('//item/pubDate').each do |n|
date[i] = n.text
i += 1
end

puts 'pulling content'
i = 0
content = Array.new
parsed.xpath('//item/content:encoded').each do |n|
content[i] = n.text
i += 1
end

puts 'pulling name'
i = 0
name = Array.new
parsed.xpath('//item/wp:post_name').each do |n|
name[i] = n.text
i += 1
end


puts 'muxing arrays'
if title.length == date.length and date.length == content.length  and content.length == name.length then
posts = [title, date, content, name]
else 
puts 'length broken!'
end

puts 'printing'
i = 0
while i < title.length do
filename = "articles/" + DateTime.parse(posts[1][i]).strftime("%Y-%m") + "-" + posts[3][i] + ".txt"

file = File.new(filename, "w")

# puts "filename: " + filename
file.puts "title: " + posts[0][i]
file.puts "date: " + DateTime.parse(posts[1][i]).strftime("%Y/%m/%d")
file.puts "author: Andrew"
file.puts "\n"
file.puts "#{posts[2][i]}"

i += 1
end

Note that the filenames and directories are hard coded... be sure to update them before running.

Do Not Cross

posted on 2010-09-27 - amd.im/hXvJ

Been dealing with a lot of bureaucracy in the last few weeks working with the vendors in China. This photo felt strangely significant.

On a related note, I love the camera in the iPhone 4.

Re-introducing Shorten

posted on 2010-09-14 - amd.im/QS2j

After toying a bit with yourls, I went looking for a way to get a URL shortener setup that was a bit less complicated and could be deployed on Heroku (a service that I have recently become totally enamored with). This is what I ended up with.

After a few Google searches I came across this posting by Andrew Pilsch. In the article he bluntly explains how to set up your own URL shortener and provides code for a Sinatra based URL shortener.

This seemed perfect, Sinatra was something that I have also been wanting to tinker with and this seemed like a good place to start.

The codebase provided was a good framework for what I wanted but didn't quite check all the boxes so I set out modifying it to be deployable to Heroku and to generate random short URLs (a la bit.ly) rather than the sequential ones that it had originally been configured for.

I posted my fork of the code on Github and have a running example at ➼.ws.

Check it out and let me know what you think. If you get it running somewhere else, let me know I'd love to see it.

I found it to be a bit of a bear to get PostgreSQL installed on my OS 10.6 Snow Leopard system. So as I was going along I took notes. Here's how I managed to get it up and running.

Despite the ease of pushing to Heroku for my projects, I like to have a local development environment. I have never used PostgreSQL before, and want to make sure that there are no issues with bringing it up for a new project I am starting. I first checked what version of PostgreSQL Heroku was running and endeavored to get that running on my local installation.

First, install MacPorts on your machine.

Then install PostgreSQL with the following command:

$ sudo port install postgresql83 postgresql83-server

Configure a default database with the following commands (these will also be listed at the end of the MacPorts PostgreSQL installation):

$ sudo mkdir -p /opt/local/var/db/postgresql83/defaultdb
$ sudo chown postgres:postgres /opt/local/var/db/postgresql83/defaultdb
$ sudo su postgres -c '/opt/local/lib/postgresql83/bin/initdb -D /opt/local/var/db/postgresql83/defaultdb'

It seems that some users, including myself, have issues with the last command. If you get the error:

shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
could not identify current directory: Permission denied
could not identify current directory: Permission denied
could not identify current directory: Permission denied
The program "postgres" is needed by initdb but was not found in the
same directory as "initdb".
Check your installation.

Try running this command (from here and here):

$ sudo dscl . -create /Users/postgres UserShell /usr/bin/false
$ sudo dscl . -create /Users/postgres NFSHomeDirectory /opt/local/var/db/postgresql83

After the dust has settled and you have PostgreSQL running, you'll likely want to get the gem installed for Ruby to get integrated.

Make sure that /opt/local/lib/postgresql83/bin is in your $PATH. Then installing do_postgres is as easy as running:

$ gem install do_postgres

Hope that works for someone.

For those of you who travel internationally like myself, I am certain that you are frustrated when you search Google and find that the results come back in the local, unintelligible language. There are preference settings for this, but for me, they never seem to stick. Here's my solution.

Here's a handy bookmarklet that should bring you back to the good old US English Google for search pages. Drag this link to your bookmarks bar and click it whenever you see a Google search page in the wrong language.

Google English

For the curious, here's the code behind it. It's a bit simple and probably leads to Google receiving two localization strings, but fortunately they seem to only use the last one in the URL.

javascript:window.location=window.location.toString()+'&amp;hl=en-US';

Chicago

posted on 2010-09-11 - amd.im/e3ku

Over labor day, Naomi and I went to visit Kyle in Chicago. Just a quick three day trip to see a city that neither of us had ever been to.

Great food, cool sights to see, and wonderful weather all lead to us have a great time in the city. I'd love to go back.

About 4 hours before takeoff, I got my hands on a new iPhone 4 and decided to put the camera through it's paces a little. I posted the shots I took on Flickr with zero editing and really very little effort going into each one. I'm rather impressed with the quality and think that with a little bit of work it could take some really great stuff. I'm also curious to see what the new HDR photos look like with the firmware that came out this week (and after the trip).

I have been setting up a YOURLS server at amd.ws just to have a shortened URL that a is a bit more unique than bit.ly or tr.im. I had some issues with my unicode domain and here's how I fixed it.

I was getting redirects to WEBSITE.WS parking pages in Safari and failures to redirect in Firefox 3.6 and 4.0 when I tried to visit shortened urls that did not exist yet, like http://amd.ws/nonsense.

The issue lied in the encoding of my config.php file. If you are seeing problems like this, try using a good text editor like BBedit and save the file with "UTF-8 with BOM" encoding and see if that is more successful for you, it solved all my issues.

Sunrise over Shenzhen

posted on 2010-08-10 - amd.im/Uj93

Here's a shot of the Windows of the World amusement park in Nanshan, Shenzhen.

I changed my travel plans yesterday to return home early. There just wasn't enough work over here to warrant me staying. This marks the first time that has ever happened.

As usual I stayed up all night in an attempt to get some sleep on the plane and head off a bit of the jet lag. Wish me luck with that as there is plenty of work to be done back home.

Quiet Reflection

posted on 2010-08-07 - amd.im/iYsb

This is a shot of the pond at my parent's house. It tends to be pretty peaceful out there and I think this silhouette captures that well.

Shot on Ilford Delta 400 pushed to 800 with a Graflex 22 TLR and a 85 f/3.5 lens.

Salvageable Seca Shot

posted on 2010-08-06 - amd.im/AGhO

This is the one salvageable frame I got from the 2010 MotoGP race at Laguna Seca.

Unfortunately, my Mamiya did not respond well to my foam replacement and leaked light all over my roll of Provia.

Shot on Provia 100 with a Mamiya M645 and a 80 f/2.8 lens.

2011 Porsche Cayenne Release

posted on 2010-07-12 - amd.im/PpTv

I happened upon this one night when coming home for dinner.

It was dress rehearsal for a 2011 Porsche Cayenne reveal party that was happening in conjunction with the Shenzhen-Hong Kong-Macau International Auto Show.

The rehearsal seemed appropriately ugly and childish, given the ugly, cutesy redesign of the Cayenne.

A Wedding and an Old Camera

posted on 2010-07-01 - amd.im/ZlWr

A couple weeks ago I found a Graflex 22 at an estate sale. Last weekend I had a wonderful opportunity to use it, the wedding of Jeff and Stacey LaBarge.

The Graflex is an interesting piece. It is over 50 years old and doesn't look a day over 10. Don't get me wrong, you can see signs of use in the leather case, and it had a thick layer of dust. But there is no dust or fungus in the lens, the foams all look good, and the shutter seems to operate smoothly and consistently.

The Graflex has never had the cachet of a Rollei or Mamiya TLR, but I am impressed with this little camera. It's my first TLR, my first camera with no light meter, and my first square format camera. With all those firsts I think I managed to squeeze out a pretty good roll. I had a bit of a back-focusing problem, I'm going to need to do some bright daylight trials to see if that's operator error or not.

The wedding went off without a hitch, they had a great ceremony in a beautiful part of the state. It was great to be a part of it and I wish Jeff and Stacey the best in their new lives together.

Toilets

posted on 2010-06-24 - amd.im/jIkO

The conference room we use is right beneath a bathroom and has a great deal of large exposed piping, amplifying the sound of every flush.

We call it "toilets" and everyone instantly understands whether Chinese or American.

1000 Year Old Trellis

posted on 2010-06-07 - amd.im/CohO

I posted a bunch of shots from the honeymoon on Flickr, check em out. I also made a separate set for my Mamiya shots that I will continue to upload to as I get them developed and scanned.

Enjoy!

Naomi at 45 Feet

posted on 2010-05-24 - amd.im/yF4V

A shot of Naomi during our dives today. This was taken at about 45 feet below Patang Bay in Bali, Indonesia.

Naomi parasailing in Bali.

posted on 2010-05-23 - amd.im/TgGy

We're having a great time in Bali. Wanted to post something to keep everyone up to date. Today Naomi went parasailing for the first time and took this video.

First Medium Format Frame

posted on 2010-05-18 - amd.im/Xus4

First good frame out of my new camera!

Naomi got me a Mamiya M645 1000S as a wonderful wedding present and I snagged this frame of my cousins wearing sweet shades at my wedding.

Valve Overrun

posted on 2010-05-04 - amd.im/mLfr

Took Lucy out for a test run last night and revved the engine up to over 5k, something that I had been hesitant to do when she was in such a weak state.

Well, she overruns quite a bit and when you back off the throttle she dumps a big cloud of smoke.

Fortunately it seems to be limited to over 5k and I haven’t seen a need for that in driving her over the last week or so, so a head rebuild can wait.

That’s good because the suspension needs a lot of work….

My MacBook Pro has had a very rough life. It started out as a test unit and was subjected to untold miseries that were not described to me, but were evident in the contorted unibody and scuffed display housing. A few days ago the notebook broke down, with the trackpad failing to respond to clicks.

It led to an interesting opportunity though; I had a shiny new iPad in my office. I quickly decided to put the iPad through the ringer and see what life would like using only an iPad for the day as my MacBook Pro went in for repairs.

At first I took advantage of it’s mobility and battery by working in various places on campus, but soon became frustrated with typing emails of much substance on it’s keyboard. It’s fantastic for the first few sentences, you feel astonished with the speed with which you can type, but it soon becomes a bit lack luster, and you realize that typing a “%” symbol requires losing your train of thought and hunting through a tertiary, symbols keyboard to find the correct ‘key’.

I returned to my cubicle a bit disappointed, but paired my bluetooth keyboard and started blasting away with much greater speed and key-familiarity.

The turning point was in my realization that I was being very productive (nearly reaching inbox zero). I think this has nothing to do with the keyboard and really nothing to do with what the iPad can do, but rather with what it cannot do.

I was simply doing email. There were no distractions from IM or calendar invitations or any of the other applications that are constantly running on my MacBook Pro. The only multitasking afforded to me was the music playing in the background. It was nice.

Some of you will realize that this is possible with a regular computer. ‘Just close the other applications’. However, for whatever reason, I don’t ‘just close them’ and neither does anyone I know.

I may recant this statement come this fall, but when iPhone OS 4 comes out, I’m not really looking forward to the multitasking. The application isolation has some interesting perks and I know I’m not the only one who notices this.

Jeff Rock on the iPad Case

posted on 2010-04-09 - amd.im/YZhO

I'm not even sure why I bought it in the first place. I hate cases. What I want isn't a case so much as a slip. Just something that keeps the iPad covered and clean while it's traveling. This isn't about protection so much as transportation and subtlety. It's the same reason I don't strap a bra on my car. Sure, the hood will get nicked but I'll take the dings over making a BMW look like it's on its way to an S&M convention.

Link

The hardware we've seen in years past... are laptop computers with the keyboard section broken off. They're not fundamentally touch-based computers, they're the products of old thinking. When Apple looks at a fingertip, they see a warm, living thing that can feel. They don't see a poor substitute for a mouse.

Link

Small Town Germany

posted on 2010-03-31 - amd.im/rLVJ

This week and part of last I have spent in a very small town in Germany.

I grew up in a different small town in California, and in some ways it reminds me of home, but at the same time, it is ever so different.

Hotel Sign and Yard

The hotel’s sign and front yard

The hotel I am staying in has somewhere around 10 rooms. Mine is on the 3rd floor, right next to the owners’ apartment. It’s my understanding that all the employees of the hotel are family, and it appears that all, or nearly all, of them live there. Because the guy who checks you in also cooks you dinner, and the lady that brings you coffee also hooks up your internet (more on this later), it has a bed and breakfast feel.

The first night I stayed in this hotel, I arrived rather late after having driven all the way from Frankfurt, both GPS-less and hopelessly lost. I panicked to see that all the lights were off and the door locked. After spending a few minutes wondering who to call to resolve this (I had not made the reservation myself), I noticed that there was an intercom somewhat near the door. I rang it and was told in heavily accented english that “[I] must be Mr. Davidson, and that my key was inside on the chair and I could let myself in”. Sure enough, they unlocked the front door and my key was sitting on a chair with a hand written note with my name and room number.

A couple nights ago, I think I was the only guest staying in the hotel. I’m told this is commonplace during weekends as most people only come to visit the few companies here and leave for larger cities on the weekend when they are not working. I followed suit and went to Stuttgart for the day (see my earlier museum posts).

When I returned I found that again, the lights were off and the owners nowhere to be seen. This was another inconvenience but not because I couldn’t get in (I now had my key) but because I was planning to eat at the hotel and I needed the lady to log my room onto the internet, a daily process that seems horrifically antiquated but provides a reasonably fast internet connection.

Fortunately, I had a remedy for the food. Earlier in the day I had asked for recommendations of good places to eat from one of the vendor’s employees and he gave me the name and address of a restaurant not far from the hotel. I plugged the info into the GPS of my new rental car and got there with no trouble. I was surprised to see that the restaurant was being run out of what appeared to be the living room of a man’s substantial home. I walked in and was again the only person in sight, besides the owner/waiter/cook. He was a nice gentleman who spoke excellent English (again fortuitous because I could not read the menu). He told me that his ‘deer medallions’ were excellent and that I should order those. They were, in fact, quite good as were his ‘black forest noodles’.

The internet was resolved in a different way. I took the early evening of the innkeepers as a hint and laid down with a book early.

Mercedes Benz Museum

posted on 2010-03-30 - amd.im/AI2a

Not to leave a minute to waste in Deutschland I also visited the Mercedes-Benz museum on their factory campus not far from Porsche in Stuttgart.

I am not a rabid fan of Mercedes. I respect some of their early work, but don't really get the same thrill out of their later stuff. That might change in my septuagenerian years of life as it seems to do for many.

The museum was fun and interesting some of the cars were neat to see such as the world's first motorcycle and a wonderful wedge-shaped, rotary concept car but all in all it was much less appealing to me than the Porsche museum.

If you have some extra time, or are a big fan of Daimler-Benz it's worth a couple hours. But do not spend any amount of euros on their simulator. You do not get to drive the cars and it is a very poor simulation of much of anything.

Porsche Factory Museum

posted on 2010-03-29 - amd.im/gHx9

This weekend I also visited the Porsche Museum at their factory campus in Stuttgart. It is somewhere I have wanted to visit for years, but never really imagined I would go to.

It was a great sight. Unlike most museums the cars were not cordoned off with ropes and glass, a great deal of them were just sitting on the floor with people milling about. Some were elevated slightly, but it felt as though that was more for you to be able to easily see them rather than to separate them from you.

I also greatly appreciated that while the cars were clearly shined up for museum duty, many of them were not truly restored, with dings and cracks in the paint from years of use as drivers. Something that all cars such as these should experience.

If you ever find yourself in Stuttgart (or anywhere near it) visit this automotive mecca.

Burg Hohenzollern

posted on 2010-03-27 - amd.im/2wsd

I visited Burg Hohenzollern on my day off today, thank goodness for Germany and their stern reluctance to work on weekends.

One of the guys at the vendor sent me a list of things to do and one of them was to check out the Hohenzollern castle. I figured it sounded as good as any idea, being that I was in a country with castles, and I generally cannot say that.

It was a fairly quick drive from the hotel, down some fairly pretty Germany side roads through small villages and farmland. I could already see the castle up high up on a hill when I was still 10km away according to the GPS in my car.

I was too cheap to pay for a guided tour in German that I couldn't understand, but wandering the grounds was nice. It was smaller than I expect it to be, but it was still pretty big for a family home, even if it was for the Kings of Prussia. I posted some other photos of it that you can check out as well.

Sunset over Lake Geneva

posted on 2010-03-25 - amd.im/kCuc

Sunset over Lake Geneva

I got into Lausanne last night for a one night stay to visit a vendor. I drove here from Zurich and found the drive to be quite beautiful.

That being said, Lausanne was no disappointment even after the beautiful drive down here. I had a few free hours in the evening so I took a walk down to Lake Geneva and took this sunset shot while down there. You can see a few others as well.

IMG_1349

I don’t know how many people have heard, but we’re planning on doing a motorcycle tour of some of the temples around Angkor Wat while in Cambodia during the honeymoon. That all sounds fine and good until one realizes that I have never ridden anything faster than a 150cc scooter and Naomi has never driven anything with a clutch, much less a motorcycle. With that in mind we set off to Livermore with David and his family and a dirt bike borrowed from a 13 year old girl.

After some prep and a few minutes of lessons from David, Naomi took off first. Well… “took off” might be a little strong, she did not exactly launch out of the gate, but after a few laps around an empty parking lot she was really moving and by the end of the day she was getting a micro-second or two of airtime off the jumps on the beginner track!

It was my turn next and I think I fared fairly well. Definitely somewhere between a toddler and Ricky Carmichael. Tanya also took a spin on the bike and did great save for one incident.

All in all we had a great time. Even the girls had fun, though were not all that interested in the motorcycles.

Thanks to David for the instructions and gear and sourcing the bike and thanks to Alex for taking a bunch of the photos while we were tooling around with the bike.

If you are trying to implement a search field in your website but do not plan on having a submit button (relying on the user to click enter), you're going to want to put instructions somewhere.

Here's how I handled it.

In my case, I decided to populate the box it self with the words "Type and press enter to search".

&lt;input type="text" name="q" value="Type and press enter to search." id="searchfield" /&gt;

Unfortunately, this left the user with the task of manually deleting the text in the box before searching. Adding a tiny bit of javascript to your HTML element will automatically remove the text when the user clicks on it and if the user doesn't enter anything it will add the text back when the user clicks away.

&lt;input type="text" name="q" value="Type and press enter to search." id="searchfield" 
  onfocus="if ( this.value=='Type and press enter to search.' ) { this.value = ''; }"
  onblur="if ( this.value=='' ) { this.value = 'Type and press enter to search.'; }" /&gt;

Hopefully it works for you all, I have only tested it in Firefox and Safari on a Mac.

Montana De Oro HDR

posted on 2010-03-11 - amd.im/PD5E

Took this HDR last weekend in Montana De Oro state park.

I'm definitely no tonemapping / HDR expert yet but I thought it was interesting enough to post.

Black Horse Swill

posted on 2010-03-08 - amd.im/eFri

Naomi and I took a nice trip down to San Luis Obispo this weekend for our engagement photos and took some time to visit all of our old spots. I took this shot of Naomi on our first morning there as she was enjoying some of Black Horse’s finest espresso-laden beverages.

We had a great time and our photographer was a lot of fun. The weather was generally wonderful, except for rain during the 2 hours of our engagement shoot. Fortunately it was expected and we were prepared, and I think the photos are going to turn out well regardless. I’ll try to get one or two posted once I get my hands on them.

Good Morning Schramberg

posted on 2010-02-23 - amd.im/xGwk

I’m currently in a very small town in Germany visiting an equipment supplier.

This is the road leading up to my hotel. It’s way off the highway and took a lot of wrong turns to get to, but it seems to be a nice enough place, which is good, because I think I’ll be back here before too long.

Sunlit Water

posted on 2010-02-22 - amd.im/Vsrx

A shot of the fountains outside the Crowne Plaza hotel in Suzhou.

An Interesting hotel; it’s styled like a cruise ship, both inside and out. The effect permeates everything and is quite effective.

Unfortunately, the only shot I liked of the hotel was of the fountains out front.

Suzhou River Cruise

posted on 2010-02-21 - amd.im/3uCP

Saw these two gentlemen cruising down a river during a walk in the Suzhou Industrial Park this morning.

The Bridge near Rainbow Walk

posted on 2010-02-19 - amd.im/4fMU

A shot of one of the bridges in the Suzhou Industrial Park near Rainbow Walk.

via vimeo.com

Last night was Chinese New Years eve and I have to say, the fireworks last night were nothing short of amazing. The video above was a panning shot from my hotel room window on the 42nd floor of the Royal Meridien in downtown Shanghai. There’s another static shot here.

I took a few photos as well (here and here) but they really don’t do the display justice.

It started around 8PM when the sun had set and darkness had set in, and i just sat by the window watching and reading until the show started to die out around 1 in the morning. The sound of the explosions was a low thunderous rumble continuously through the evening and by the end of the night the smoke from all the powder had thickened the sky so much it was nearly impossible to make out the fireworks themselves, they had turned into a dull twinkling of lights across the sky.

If you ever have the opportunity to witness something like this, make it happen. It is definitely something I will not soon forget.

Happy Year of the Tiger everyone.

Just Off The Main Drag

posted on 2010-02-13 - amd.im/X3ir

Well, the fabric market was closed today in honor of New Years Eve, so I took a walk down Nanjing Lu.

For the uninitiated, Nanjing Lu is one of the fancy shopping streets in Shanghai, closed to cars and always packed with people. Wild children, window shoppers, buskers, pick pockets, it's got it all.

What's interesting to me, and what seems to hold true anywhere I go in China, is that it is all a thin veneer. Just past the Omega dealer and the LaCoste store, you get right back into the run-down streets of the rest of Shanghai.

This door caught my attention today and drew me off the main drag and back into the alleys and side streets, where there always seems to be more to see.

Shanghai Morning Stroll

posted on 2010-02-09 - amd.im/oQ5T

Saw this building today when I went for a walk in Hongqiao Park, around the corner of my hotel. The architecture is do different from what one normally sees in Shanghai.

Most of the windows had some amount of paper covering them up and some of the pathways next to he building were boarded up.

I wonder if it’s under renovation or just going to waste as so many buildings over here seem to.

nook verifying update

posted on 2010-02-05 - amd.im/0OIC

When updating my nook it let it’s Linux/Android guts show.

Regarding the iPad:

I know, it's not everything you dreamed of... but that doesn't mean it's not awesome… It doesn't come with a keyboard. It doesn't come with a microwave either. And you're going to have to use your own subway to get it back from the store and your own scissors to get it out of the box. O woe!

from squashed.tumblr.com, via marco.org.

Great response to all the people complaining about the iPad's lack of “this” or “that”.

Used to be that to drive a car, you, the driver, needed to operate a clutch pedal and gear shifter and manually change gears for the transmission as you accelerated and decelerated. Then came the automatic transmission. With an automatic, the transmission is entirely abstracted away. The clutch is gone. To go faster, you just press harder on the gas pedal.

That's where Apple is taking computing. A car with an automatic transmission still shifts gears; the driver just doesn't need to know about it. A computer running iPhone OS still has a hierarchical file system; the user just never sees it.

That's not to say there aren't trade-offs involved. Car enthusiasts (and genuine experts like race car drivers) still drive cars with manual transmissions. They offer more control; they're more efficient. But the vast majority of cars sold today are automatics. So too it'll be with computers. Eventually, the vast majority will be like the iPad in terms of the degree to which the underlying computer is abstracted away. Manual computers, like the Mac and Windows PCs, will slowly shift from the standard to the niche, something of interest only to experts and enthusiasts and developers.

via daringfireball.net

This seems exactly right to me.

Squaw Day

posted on 2010-01-30 - amd.im/ONdT

Snowy but nice day at Squaw Valley.

The Apple iPad

posted on 2010-01-27 - amd.im/2AOD

Well, the secret is out!

I’ve had to keep my mouth shut for well over a year, but the product is finally announced. It’s been an exciting road, lot of travel-time, a lot of long hours (and more still to come). Let me know what you guys think.

Booted!

posted on 2010-01-23 - amd.im/orT3

For some time, I have had a sweetcron install setup as a lifestream at amdavidson.me. It has worked out alright, for the most part, but I think it’s time to put it out to pasture.

At first glance, lifestreaming seemed like a neat idea. One place to aggregate all of the content that I generate around the web. A “one stop shop” to see everything that I had been up to. It worked out exactly as it was intended. SweetCron faithfully sat in the background, pulling in RSS feeds from around the web and publishing them to my site.

Unfortunately, SweetCron is no longer actively developed. Yong Fook, who created the software, has open sourced it but there seems to be no real movement towards continuing it’s growth. He posted his reasons for this on his blog.

He makes a few very valid points in that post. The one that is most interesting to me is the impersonal nature of the lifestream. I think that really nails one of the aspects of the lifestream that never satisfied me. I don’t much interaction on any of my sites just a few views and even fewer comments. But the SweetCron site took it to another level, it removed my interaction from the site. There was (probably literally) no one involved.

The SweetCron site is still up and will be for now, but I won’t pay much attention to it. Instead I’ve been toying with a tumblelog for storing the things I find interesting around the web. For content that I create: check back here.

nook

posted on 2010-01-19 - amd.im/Jdk5

I got my Barnes & Noble nook in the mail last night (finally…). Here are my first impressions.

Pros:

  • Ergonomics are much better than my Sony Reader.
  • Page turn speeds not nearly as bad as early reviews said (running v1.1.1 software).
  • Sony Reader ebooks were easy to side-load

Cons:

  • User interface is clumsy and awkward.
  • Heavier in the hand than expected (but not overly heavy).

Moving Day (Part 2)

posted on 2010-01-19 - amd.im/X7au

This site is no longer the home of AMDavidson.com…

I am keeping it around for now, and may continue to use it as a tumblelog, but in all likelihood the site will remain dormant.

For the latest content, head directly to amdavidson.com. If you want to know my reasons for switching a second time in less than a week take a look here.

It's absolutely clear now why five years from now, Apple will have 3 to 5 percent of the player market.

Rob Glaser, CEO RealNetworks (via Daring Fireball)

Google reconsidered their stance on China's Great Firewall and decided to un-censor their search results.

I applaud Google on doing the right thing here, even if it does end up meaning losing a valuable marketplace.

However, this means there's going to be yet another thing I need VPN access for when in China.

Moving Day

posted on 2010-01-12 - amd.im/WMYz

It’s moving day. Not in the literal sense, perhaps, but today my blog has moved over to Tumblr.

I’ve had my run at coding my own blog software, but it just became too cumbersome and limiting. There are so many features on other platforms that I could just never match up to.

So off to Tumblr I go. I now have access to a pretty solid iPhone posting app, a bookmarklet that will allow me to post things I found around the web, and solid theming that allowed me to copy the theme from amdavidson.me to Tumblr with no trouble at all.

The only thing that I lost in the process was the 10 or so comments that people had left on my posts over the years. I don’t think there’s a way that I can inject them into Disqus, but if I find a good way I will.

Feel free to check out the old content (it’s all there), and hopefully check back for new content more regularly now that I have much better facilities for posting varied content types.

about

amdavidson.com is a simple blog run by Andrew Davidson, a manufacturing engineer with a blogging habit. He sometimes posts 140 character tidbits, shares photos, and saves links. You can also see posts dating back to 2005.

Search