My Writing

Archive

Recent

The Dog Project

The arrival of a dog in the apartment has brought about a small issue. The dog is a little sensitive and doesn’t like to be left alone. Once alone, he’ll start whining, then barking incessantly.

He’s a cute dog, but a bit needy, and we can’t have him doing this while we’re at work and he’s home alone bothering the neighbors.

To combat the incessant barking, I’m trying out a technological solution. I recorded the girlfriend saying a variety of commands to tell him to stop barking, and I wrote a program that would listen to the microphone and play one of those sounds if the volume got too high. If he does it too many times, a text message is sent so that we know he’s being too loud for too long and that the neighbors might start to get annoyed.

The microphone is a pretty standard microphone. Any will do. Because my computer is upstairs and the dog downstairs, the microphone hangs over the side of the loft and down to the ceiling, pointing slightly out.

The software itself is simple as well. I wrote it in Python (my first Python application in fact!), and it’s running on an Ubuntu desktop. There’s a small interface that shows the sound level, and a slider for setting the threshold. If the sound level gets above the threshold, it’ll pick one of the sound files and play it. There’s a setting so it’ll only play a sound once every ten seconds, so it won’t go every time he makes a noise. If it goes too many times, it’ll send the text message.

So far, we’re still in the testing phase. It appears to do exactly what I programmed it to do, but we don’t really want to make the dog bark unnecessarily, so we’ll wait to see if it works as well as I think it will.

Here’s the code. It only took a couple hours, which isn’t bad considering this is my first Python app, my first Linux app, and my first time working with the microphone and speakers:

import alsaaudio, time, audioop, datetime, pygame, random, smtplib, email
from Tkinter import *
from email.mime.text import MIMEText

#email setup
emailfrom = "myemailaddress@bobbaddeley.com"
emailto = "myphonenumber@txt.att.net"

#set up the microphone
inp = alsaaudio.PCM(alsaaudio.PCM_CAPTURE,alsaaudio.PCM_NONBLOCK)
inp.setchannels(1)
inp.setrate(8000)
inp.setformat(alsaaudio.PCM_FORMAT_S16_LE)
inp.setperiodsize(160)

#set up the audio player
pygame.init()

#how many seconds between commands
#we don't want to say something every time there's a bark, so we only
#allow it to happen every n seconds at most
timeoutperiod = 10

#set up the last time we played the sound (-timeoutperiod so we can play it
#immediately if necessary)
lastplayed = time.time()-timeoutperiod

#start to set up the window
root = Tk()

#a label so we can track when the timeout period has expired
timer = Label(root, text="Time before reset:")
timer.pack()

#a label so we can look at the current audio level (useful for deciding what
#to use for the trigger level
level = Label(root, text="Audio level:")
level.pack()

#a slider for setting the trigger level
slider = Scale(root,from_=0, to=200, orient=HORIZONTAL, length=200)
#in my apartment the ambient noise is at 12, so setting it to 14 will work)
slider.set(14)
slider.pack()

#number of times the trigger has been set off
badcount = 0

#the number of times the trigger gets set off before we send an email
badcountlimit = 10

#label for the number of times the trigger has been set off
badcountlabel = Label()
badcountlabel.pack()

#called every few milliseconds
def tick():
	global lastplayed, inp, badcount,badcountlimit,timeoutperiod
	global emailfrom, emailto
	now = time.time()
	# Read data from device
	l,data = inp.read()
	if l:
		# Return the maximum value of all samples in a fragment.
		# Divide by 100 and compare to the slider value. If it's below
		# the trigger then we know we have to do something
		if (audioop.max(data,2)/100>(slider.get())):
			#if we haven't played a sound in a while
			if (now-lastplayed>timeoutperiod):
				#update some variables
				badcount = badcount+1
				lastplayed = now
				#pick which file to say
				numtosay = random.randrange(1,3,1)
				pygame.mixer.music.load("baddog_"+str(numtosay)+".ogg")
				#and play it				
				pygame.mixer.music.play()
				badcountlabel.config(text="Trigger Count:"+str(badcount))
				#if we've hit our limit, send an email				
				if (badcount==badcountlimit):
					server = smtplib.SMTP("mymailserver")
					msg = MIMEText("The dog has triggered the barking limit.")
					msg['Subject'] = 'Bad Dog'
					msg['From'] = emailfrom
					msg['To'] = emailto
					server.sendmail(emailfrom, emailto, msg.as_string())
					server.quit()
		else:
			#show the current audio level
			level.config(text="Audio level:"+str(audioop.max(data,2)/100))
	#show how long until the timeoutperiod is over
	if ((now-lastplayed)<timeoutperiod):	
		timer.config(text="Time before reset:"+str(round(timeoutperiod-(now-lastplayed))))
	root.after(10, tick)
tick()
root.title("Dog Sitter")
root.mainloop()

What I Read

I’ve been doing a lot of interviews at work lately, and one of the questions I like to ask is what they read to keep current. In my job I am constantly evaluating new technologies and incorporating new things into our work, and it’s essential that I stay up to date with the latest in news, software development practices, gadgets, and just the field in general. I can’t count how many times I’ve seen something in my daily reading and used it in my work or at home. I rarely comment or contribute to the sites; I prefer just to watch and not participate in what’s usually a flame war by people with questionable qualifications. I read some of the sites at work, but most at home after work.

So here is my list of things I read daily in the industry:

  • Slashdot - I’ve been reading this for 10 years and have only commented a few times, but I check this many times a day and have used information I’ve found on this site for all kinds of things.
  • Yahoo News - I read this a few times a day to keep up with the news in general. I’ve found this site is the best news aggregation site of the ones I’ve tried.
  • Google Finance - I use this to track a few stocks and look at relevant business news.
  • Digg - I usually do this from home as it has interesting stuff in all kinds of categories.
  • Gizmodo - This site is useful for the latest in gadget and technology news.
  • Engadget - Almost identical to Gizmodo, and they often report on the same things, but sometimes they have a different interpretation.
  • Joel on Software - Joel Spolsky’s blog. Somewhat diluted with his own advertising for his talks and conferences, but often has good articles on managing a tech company.
  • Joel Reddit - This channel of reddit is for articles similar to the ones Joel writes.
  • The Daily WTF - Every day an article or two about some curious piece of code or business practice.
  • Lifehacker - Nifty tools and tricks for technology and geek life.
  • Fark - Mostly curious or silly news, this is great for keeping up with the strange stories that are likely to come up in conversations.

That’s every day, sometimes a few times during the day. I’d say I spend about 2 hours reading stuff each day, though only about 1/2 an hour to an hour of that is at work, and usually in a few spare moments while I’m in between meetings or tasks.

This list does a pretty good job of keeping me up to date in the world.

Laser Pointer Interface

A while ago I built a computer input device using a laser pointer and regular usb web camera.

It was a pretty simple setup, and I used a lot of existing tools as a jumping off point. Here’s a writeup of my work and details for how to replicate it and what I learned.

First, a video overview:

Materials

At a minimum:

  • A web camera
  • A laser pointer

Optionally:

  • A projector

Technically speaking, the laser is completely optional. In fact, during testing I just had a desktop computer with the camera pointed at a sheet of paper taped to a wall, and I drew with the laser pointer on that sheet of paper and used that as an input device. With the projector, you can turn the setup into a more direct input, as your point translates directly to a point on a screen. But that’s just a bonus. This can be done without the projector.

Physical Setup

Take the camera, point it at something. Shine the laser inside the area where the camera can see. That’s it in a nutshell. However, there are some additional considerations.

First, the more direct the camera, the more accurate it will be. If the camera is off to the side, it will see a skewed wall, and because one side is closer than the other, it’s impossible to focus perfectly, and one side of the wall will be more precise than the far side of the wall. Having the camera point as directly as possible at the surface is the best option.

Second, the distance to the surface matters. A camera that is too far from the surface may not be able to see a really small laser point. A camera that is too close will see a very large laser point and will not have great resolution. It’s a tradeoff, and you just have to experiment to find the best distance.

Third, if using a projector, the camera should be able to see slightly more than the projected area. A border of a few inches up to a foot is preferable, as this space can actually be used for input even if it’s not in the projected space.

Fourth, it’s important to control light levels. If there are sources of light in the view of the camera, such as a lamp or window, then it is very likely the algorithm will see those points as above the threshold, and will try to consider them part of the laser pointer (remember white light is made up of red, green, and blue, so it will still be above the red threshold). Also, if using a projector, the laser pointer has to be brighter than the brightest the projector can get, and the threshold has to be set so that the projector itself isn’t bright enough to go over the threshold. And the ambient light in the room can’t be so bright that the threshold has to be really high and thus the laser pointer isn’t recognized. Again, there are a lot of tradeoffs with the light levels in a room.

Software Packages

I wrote my software in Java. There are two libraries that I depended on heavily:

The JAI library is not entirely essential, as you could decide not to translate your coordinates, or you could perform your affine transform math to do it and eschew the large library that will go mostly unused. The neat thing about this transform, though, is that it allows for the camera to be anywhere, and as long as it can see the desired area, it will take care of transforming to the correct coordinates. This is very convenient.

The JMF library exists for Windows, Linux, and Mac. I was able to get it working in Windows, but wasn’t able to get it completely working in Linux (Ubuntu Jaunty as of this writing), and I don’t have a Mac to test on.

Basic Theory

The basic theory behind the project is the following; a laser pointer shines on a surface. The web camera is looking at that surface. Software running on a computer is analyzing each frame of that camera image and looking for the laser pointer. Once it finds that pointer, it converts the camera coordinates of that point into screen coordinates and fires an event to any piece of software that is listening. That listening software can then do something with that event. The simplest example is a mouse emulator, which merely moves the mouse to the correct coordinates based on the location of the laser.

Implementation Theory

To implement this, I have the JMF library looking at each frame. I used this frameaccess.java example code as a starting point. When looking at each frame, I only look at the 320×240 frame, and specifically only at the red value. Each pixel has a value for red, green, and blue, but since this is a red laser I’m looking at, I don’t really care about anything but red. I traverse the entire frame and create a list of any pixels above a certain threshold value. These are the brightest pixels in the frame and very likely a laser pointer. Then I average the locations of these points and come up with a single number. This is very important, and I’ll describe some of the effects that this has later. I take this point and perform the affine transform to convert it to screen coordinates. Then I have certain events that get fired depending on some specific things:

  • Laser On: the laser is now visible but wasn’t before.
  • Laser Off: the laser is no longer visible.
  • Laser Stable: the laser is on but hasn’t moved.
  • Laser Moved: the laser has changed location.
  • Laser Entered Space: the laser has entered the coordinate space (I’ll explain this later)
  • Laser Exited Space: the laser is still visible, but it no longer maps inside the coordinate space.

For most of these events, the raw camera coordinates and the transformed coordinates are passed to the listeners. The listeners then do whatever they want with this information.

Calibration

Calibration is really only necessary if you are using the coordinate transforms. Essentially, the calibration process consists of identifying four points and mapping camera coordinates to the other coordinates. I wrote a small application that shows a blank screen and prompts the user to put the laser point at each of the prompted circles, giving the system a mapping at known locations. This writes the data to a configuration file which is used by all other applications. As long as the camera and projector don’t move, calibration does not need to be done again.

Here is a video of the calibration process.

The Code

Here is the laser camera code (3.7mb). It includes the JAI library, the base laser application, the calibrator, and an example application that just acts as a mouse emulator.

Below are a couple snippets of the important stuff.

This first part is the code used to parse each frame and find the laser point, then fire the appropriate events.

/**
 * Callback to access individual video frames. This is where almost all of the work is done.
 */
void accessFrame(Buffer frame) {
	/***************************************************************************************/
	/********************************Begin Laser Detection Code*****************************/
	/***************************************************************************************/
	// Go through all the points and set them to an impossible number
	for (int i = 0;i<points.length;i++){
		points[i].x = -1;
		points[i].y = -1;
	}
	int inc = 0; //set our incrementer to 0
	byte[] data = (byte[])frame.getData(); //grab the frame data
	for (int i = 0;i<data.length;i+=3){//go through the whole buffer (jumping by three because we only want the red out of the RGB
		//if(unsignedByteToInt(data[i+2])>THRESHOLD && unsignedByteToInt(data[i+1])<LOWERTHRESHOLD && unsignedByteToInt(data[i+0])<LOWERTHRESHOLD && inc<points.length){//if we are above the threshold and our incrementer is below the maximum number of points
		if(unsignedByteToInt(data[i+2])>THRESHOLD && inc<points.length){//if we are above the threshold and our incrementer is below the maximum number of points
			points[inc].x = (i%(3*CAMERASIZEX))/3; //set the x value to that coordinate
			points[inc].y = i/(3*CAMERASIZEX); //set the y value to the right line
			inc++;
		}
	}
	//calculate the average of the points we found
	ave.x = 0;
	ave.y = 0;
	for (int i=0;i<inc;i++){
		if (points[i].x!=-1){
			ave.x+=points[i].x;
		}
		if (points[i].y!=-1){
			ave.y+=points[i].y;
		}
		//System.out.println(points[i].x + "," + points[i].y);
	}
	//System.out.println("-------------------");
	if (inc>3){//if we found enough points that we probably have a laser pointer on the screen
		ave.x/=inc;//finish calculating the average
		ave.y/=inc;
		PerspectiveTransform mytransform = PerspectiveTransform.getQuadToQuad(mapping[0].getX(), mapping[0].getY(), 
				mapping[1].getX(), mapping[1].getY(), mapping[2].getX(), mapping[2].getY(), mapping[3].getX(), mapping[3].getY(),
				correct[0].getX(), correct[0].getY(), correct[1].getX(), correct[1].getY(), correct[2].getX(), correct[2].getY(), correct[3].getX(), correct[3].getY());
		Point2D result = mytransform.transform(new Point(ave.x,ave.y),null);
		in_space = !(result.getX()<0 || result.getY() < 0 || result.getX() > SCREENSIZEX || result.getY() > SCREENSIZEY);
		if (!on){
			fireLaserOn(new LaserEvent(result, new Point(ave.x, ave.y), last_point, last_raw_point,in_space));
			on = true;
		}
		if (in_space && !last_in_space){
			fireLaserEntered(new LaserEvent(result, new Point(ave.x, ave.y), last_point, last_raw_point,true));
		}
//				System.out.println(result.getX() + "," + result.getY());
//				System.out.println(last_point.getX() + "," + last_point.getY());
//				System.out.println("----------------------");
		if (result.getX()!=last_point.getX() || result.getY()!=last_point.getY()){
			fireLaserMoved(new LaserEvent(result, new Point(ave.x, ave.y), last_point, last_raw_point,in_space));	
		}
		else{
			fireLaserStable(new LaserEvent(result, new Point(ave.x, ave.y), last_point, last_raw_point,in_space));
		}
		if (!in_space && last_in_space){
			fireLaserExited(new LaserEvent(result, new Point(ave.x, ave.y), last_point, last_raw_point,false));
		}
		last_time = 0;
		last_point = new Point2D.Double(result.getX(), result.getY());
	}
	else if (last_time==5){//if it's been five frames since we last saw the pointer, then it must have disappeared
		if (in_space){
			fireLaserExited(new LaserEvent(-1,-1, ave.x, ave.y, (int)last_point.getX(), (int)last_point.getY(), (int)last_raw_point.getX(), (int)last_raw_point.getY(),in_space));
		}
		fireLaserOff(new LaserEvent(-1,-1, ave.x, ave.y, (int)last_point.getX(), (int)last_point.getY(), (int)last_raw_point.getX(), (int)last_raw_point.getY(),in_space));
		on = false;
		in_space = false;
	}
	if (ave.x>0 || ave.y>0 && ave.x<CAMERASIZEX && ave.y<CAMERASIZEY)
		fireLaserRaw(new LaserEvent(-1,-1, ave.x, ave.y, -1,-1, (int)last_raw_point.getX(), (int)last_raw_point.getY(),in_space));

	last_time++;//increment the last_time. usually it gets set to 0 every frame if the laser is there
	last_raw_point = new Point(ave.x,ave.y);//set the last_point no matter what
	last_in_space = in_space;
	/**************************************************************************************/
	/********************************End Laser Detection Code*****************************/
	/*************************************************************************************/
}

public int unsignedByteToInt(byte b) {
	return (int) b & 0xFF;
}

This next part is pretty standard code for adding event listeners. You can see which laser events are getting passed. I intentionally made it similar to how mouse listeners are used.

Vector<LaserListener> laserListeners = new Vector<LaserListener>();
	public void addLaserListener(LaserListener l){
		laserListeners.add(l);
	}
	
	public void removeLaserListener(LaserListener l){
		laserListeners.remove(l);
	}

	private void fireLaserOn(LaserEvent e){
		Enumeration<LaserListener> en = laserListeners.elements();
		while(en.hasMoreElements()){
			LaserListener l = (LaserListener)en.nextElement();
			l.laserOn(e);
		}
	}

	private void fireLaserOff(LaserEvent e){
		Enumeration<LaserListener> en = laserListeners.elements();
		while(en.hasMoreElements()){
			LaserListener l = (LaserListener)en.nextElement();
			l.laserOff(e);
		}
	}

	private void fireLaserMoved(LaserEvent e){
		Enumeration<LaserListener> en = laserListeners.elements();
		while(en.hasMoreElements()){
			LaserListener l = (LaserListener)en.nextElement();
			l.laserMoved(e);
		}
	}

	private void fireLaserStable(LaserEvent e){
		Enumeration<LaserListener> en = laserListeners.elements();
		while(en.hasMoreElements()){
			LaserListener l = (LaserListener)en.nextElement();
			l.laserStable(e);
		}
	}

	private void fireLaserEntered(LaserEvent e){
		Enumeration<LaserListener> en = laserListeners.elements();
		while(en.hasMoreElements()){
			LaserListener l = (LaserListener)en.nextElement();
			l.laserEntered(e);
		}
	}

	private void fireLaserExited(LaserEvent e){
		Enumeration<LaserListener> en = laserListeners.elements();
		while(en.hasMoreElements()){
			LaserListener l = (LaserListener)en.nextElement();
			l.laserExited(e);
		}
	}

	private void fireLaserRaw(LaserEvent e){
		Enumeration<LaserListener> en = laserListeners.elements();
		while(en.hasMoreElements()){
			LaserListener l = (LaserListener)en.nextElement();
			l.laserRaw(e);
		}
	}

Considerations and conclusions

  • This algorithm is extremely basic and not robust at all. By just averaging the points above the threshold, I don’t take into consideration if there are multiple lasers on the screen. I also don’t filter out errant pixels that are above the threshold by accident, and I don’t filter out light sources that aren’t moving. A more robust algorithm would do a better job and possibly identify multiple laser pointers.
  • I’m not the first person that has done this, though from what I can tell this is the first post that goes into so much detail and provides code. I have seen other people do this using other platforms, and I have seen other people try to sell this sort of thing. In fact, this post is sort of a response to some people who think they can get away with charging thousands of dollars for something that amounts to a few lines of code and less than $40 in hardware.
  • Something I’d like to see in the future is a projector with a built in camera that is capable of doing this sort of thing natively, perhaps even using the same lens system so that calibration would be moot.
  • You may have seen references to it in this post already, but one thing I mention is having the camera see outside the projected area and how that can be used for additional input. Because the laser pointer doesn’t have buttons, its input abilities are limited. One way to get around this is to take advantage of the space outside the projected area. For example, you could have the laser act as a mouse while inside the projector area, but if the laser moves up and down the side next to the projected area it could act as a scroll wheel. In a simple paint application, I had the space above and below the area change the brush color, and the sides changed the brush thickness or changed input modes. This turns out to be extremely useful as a way of adding interactivity to the system without requiring new hardware or covering up the projected area. As far as I can tell, I haven’t seen anyone else do this.
  • I have seen laser pointers with buttons that go forward and backward in a slideshow and have a dongle that plugs into the computer. These are much more expensive than generic laser pointers but could be reused to make the laser pointer much more useful.
  • Just like a new mouse takes practice, the laser pointer takes a lot of practice. Not just smooth and accurate movement, but turning it on and off where you want to. Typically releasing the power button on the laser pointer will cause the point to move a slight amount, so if you’re trying to release the laser over a small button, that has to be considered so that the laser pointer goes off while over the right spot.
  • This was a cool project. It took some time to get everything working, and I’m throwing it out there. Please don’t use this as a school project without adding to it. I’ve had people ask me to give them my source code so they could just use it and not do anything on their own. That’s weak and you won’t learn anything, and professors are just as good at searching the web.

* If you do use this, please send me a note at laser@bobbaddeley.com. It’s always neat to see other people using my stuff.

  • If you plan to sell this, naturally I’d like a cut. Kharma behooves you to contact me to work something out, but one of the reasons I put this out there is I don’t think it has a lot of commercial promise. There are already people trying to, and there are also people like me putting out open source applications.
  • If you try to patent any of the concepts described in this post, I will put up a fight. I have youtube videos, code, and witnesses dating back a few years, and there is plenty of prior art from other people as well.

Broken Car Lock

It’s no secret that I love my car. It’s been extremely dependable, has treated me very well, has a good personality and an adventurous attitude, and doesn’t ask for much (it’s a 2000 Chrysler Neon, and yes, I mean Chrysler). I’ve had it for almost 10 years and put over 100,000 miles on it myself in addition to the 20,000 that were on it when I got it used. If I were to get another car, I’d look for something exactly like the one I have.

But once in a great while it will have small issues. Once a wiring harness broke loose and cause the rear lights to go out. Other than that, it’s worked very well and could probably go for another hundred thousand miles without problem.

About a week ago I put my key in the door to unlock it and found that it turned freely. I had to unlock the passenger side and then unlock the driver side from the inside. For a few days I drove around without locking the door. Monday I finally got an opportunity to examine the problem. I was able to disassemble the door relatively easily. It was fairly straightforward except for the part where the window handle was connected, but I managed to find the service manual online and pop the handle off. Then I could get in to the lock mechanism and see where the problem was. It didn’t take long to discover the problem. The rod that connects the lock mechanism to the key had slipped off. The piece that held it on was missing. Figuring it was probably at the bottom of the door frame, I felt around and identified it. Yep, there was the problem.

That piece should be symmetrical. The piece that had broken was about 2 millimeters wide and because of that the thing slipped off the lock and was no longer holding the rod in place. It didn’t take much jostling for the rod to fall out.

I didn’t have any parts exactly like that, and I was up to the challenge of fixing it with parts that I had around the house. I made a crude washer out of a piece of scrap tin from a can. Then I made a springy curl of stiff wire that would take the place of the part that broke. I installed onto the lock mechanism and played with it a little to make sure it was stuck pretty well. I tried to take it off to adjust it a little, but couldn’t even get it off without some serious effort, so I just left it on there. I tested it thoroughly before putting the door back together. With the door completely reassembled, I tested it out some more, and it worked exactly like it had originally worked.

I’m kind of glad that my car is mostly mechanical and doesn’t have a lot of electronic parts. Electronic locks or windows would have made this a much more difficult operation. I’m also happy that I was able to build the parts that I needed from scratch and basic tools. Plus, I always enjoy doing things with my hands and seeing the results and saving money in the process.

Partially Failed Cheesecake

Saturday I had a party for work, so I thought I’d throw together a cheesecake. I used the recipe I’ve used a few times in the past. Better Homes and Garden, by the way. Rather than melt some semi-sweet chocolate, I went instead with a bottle of Hershey chocolate sauce. I was getting to the bottom of the bottle, and I noticed that as I squeezed it would spatter out in neat randomness. So on top of the swirled cheesecake filling I sprayed the sauce, not realizing that it would ultimately be the cause of a huge problem.

The cake cooked fine, and after I took it out of the oven it still looked good, but the spots where there was sauce looked a little weak and were starting to crack. When the top of a cheesecake begins to crack, the cracks turn to crevasses as it cools down, and that’s exactly what happened. There were three pretty big cracks as it cooled. I looked around for something to fix it and found a block of milk chocolate that Erin had given me. I thought I’d shave chocolate onto the top to see if it would cover up the cracks. But the chocolate shavings weren’t as silky smooth as I thought, and they broke up into smaller pieces than I expected. It was time to go to the party, so I made the decision not to bring the cheesecake. That turned out to be ok, though, because there was already a lot of food there.

Aesthetically, the cheesecake was mediocre. It tasted great, though. Here’s a picture, but remember, it only looks average; it’s too bad I can’t make the web lick-able.

Seeing with closed eyes

I’ve been working on my laser pointer recently, and in the course of my work I made an interesting biological discovery. Laser pointers are ridiculously bright. You can shine them on a finger and they’ll light up the finger so that you can see it from the other side.

You’re not supposed to shine lasers directly into the eye because they are so bright. Most laser pointers, though, are class 3 or lower, meaning they won’t do permanent damage if exposed briefly. Still, my eyes are not something I like to risk, so I don’t shine it into my eye intentionally.

However, in the course of fiddling with the pointer while waiting for a process, I held it against my temple, turned it on absentmindedly, and saw some red. At first I thought that the laser must be reflecting off of something and getting into my eye somehow, but it didn’t make any sense. It was a blurry red light and was clearly more intense closer to my temple. The light wasn’t escaping outside and reflecting off anything, either, because the laser was directly against my temple. I concluded that the light was actually traveling through my temple and into my eyeball and hitting my retina without going through my iris.

This is not a huge discovery. In fact, you can simulate the effect quite easily with nothing but a bright environment. Close your eyes. Then put your hands in front of your eyes. It gets even darker. With just your eyes closed, light is still passing through the lids and into the eye. With the temple, it just takes more light to get through to the retina.

I’m not too concerned about losing my eyesight from doing this, but I’m not going to keep doing it. It’s interesting that I can see things without having it go through the front of my eye.

Camera Troubles

Erin handed me a camera a week ago that had gone through some tough times. It had been dropped while on, and the lens assembly was broken and askew. The camera couldn’t recover from it on its own, and so I was brought in to see if I could fix it. Having been able to revive Erin’s camera, which had the misfortune of a drop into sand, and having removed dust from my own camera many times, I took on the job. Since it was already broken, the owner of the camera didn’t have any expectations of getting it back anyway, so it was a riskless job. The first image is of the camera, though the lens problem is not visible.

Taking the camera apart was not difficult. There were lots of tiny screws, but for the most part the pieces separated fairly easily. Of course, as I did it I learned little bits about the assembly that made taking it apart easier. The second picture shows the partially disassembled camera. The lens assembly came out without any screws.

The lens assembly out, I was able to partially disassemble it as well. There were two main lenses. The first was the big one in the picture below. The second was the small one in the picture below that. Both were capable of moving.

In fact, it was the plastic on the smaller lens that had broken, and was sticking out, preventing the lens assembly from closing back up. This little piece of plastic, which is the part closest to the camera, turned out to be extremely important. I tried at first to just remove it and reassemble the camera, but it turned out that it wouldn’t focus without it. The piece was essential for guiding the lens forward and back and without it a small spring was pulling it in a direction it shouldn’t have gone. I was able to super glue it back together, but then had to take a small file to remove small jutting slivers that were adding too much friction to the assembly. The hardest part was putting the whole lens assembly together and back apart over and over, which took many minutes each time, and put wear and tear on some components that were only ever meant to be assembled once. In fact, a great deal of time was spent maintaining and guiding parts back together, and resetting springs that had to be unset.

I thought that I had been successful and had fixed the camera, but there was a problem. When I took a photo, the iris would stay closed, and it wasn’t until I would dismantle the whole thing that I could reopen the iris. Clearly this would not work in the field. I had to dismantle the assembly further to discover another unfortunate break.

The iris is controlled by two extremely small electromagnets, which apply torque to two magnets, which have small arms at the end of them. Those arms push and pull the thin pieces of plastic over the lens to adjust the light levels. Unfortunately, one of the arms was broken on the small magnet.

This was the deal breaker. Without the arm, the iris wouldn’t function properly, and the images would be overexposed (or possibly underexposed). The magnet wouldn’t take to super glue, and even the process of gluing was made more difficult by the fact that all my tools were metallic and would move the magnets as soon as they got near. For a sense of scale, the pic below is of an object that’s 4mm long at its longest

It took a lot of time to work on the camera and figure out how it all fit together. There were a lot of little pieces that had to be assembled just so, and it’s such a shame that the camera is perfectly good except for a few misplaced atoms, and because I won’t be able to find a replacement will now likely be discarded in its entirety.

The Subtle Mechanics of Popcorn Poppers

In my old apartment I didn’t have a popcorn maker. I would put some vegetable oil in a sauce pan, pour a layer of popcorn kernels in, cover it, and heat it until the popcorn was ready. I didn’t have an electric one. Now that I’ve moved in to the new place, Erin has the electric variety, so I’ve been using that. I was making popcorn this evening and thinking about the popcorn popper and how it worked, and specifically how kernels can remain unpopped.

By observation, at the beginning of the popping a kernel at the bottom will pop up, sending the kernels above it flying, and often out of the popper. This is a huge loss of kernels for no good reason. They’re perfectly fine kernels that were prematurely propelled out of the popper. As the popping intensifies, the popped corn doesn’t all escape out of the cylinder and into the bowl, forming a sort of protective layer to keep unpopped kernels from shooting out of the cylinder. The steady current of hot air elevates this layer and at times it looses cohesion and the layer breaks down and all escapes the cylinder into the bowl, allowing unpopped corn to escape again. It’s a delicate balance.

In order to preserve as many kernels as possible, I’ve played around with some tools. Initially I tried a spoon. By holding the spoon inside the chute and over the cylinder I could partially block the exit of the cylinder. A couple kernels still escape, but because I prevent the popped corn from leaving, the protective layer builds up faster. Further, I can control the flow of popcorn out of the chute, ensuring that the protective layer remains without breaking down early. The only catch was that the spoon was too short and the hot air was heating up the whole metal spoon and by the end burning my fingers.

I could use a large wooden spoon from now on. That would cover up more of the cylinder and eliminate the heat problem but could introduce a congestion problem if it gets in the way and clogs up the chute and doesn’t allow me the fine control of the protective layer.

A better design of the popper might have been a taller and slightly inverted funnel cylinder. Both the tallness and the funnel shape would make it more difficult for stray kernels to escape while also facilitating a sound protective layer and retaining the heat inside for longer.

The final adjustment that could be made to retrofit existing popcorn poppers would be to the clear plastic piece that fits over the popper. With the installation of an adjustable gate, you could cover the opening to the chute entirely, ensuring no kernels escaped and retaining the heat inside the popper for longer. As the popping progresses, the gate could be opened by varying levels to allow the protective layer to remain as popped corn passed through the gate.

But I’m probably overthinking this. The spoon will work for now.

My Empty Cupboards Project

For about a month leading up to my move, I stopped shopping for food. I was trying to clean out the cupboards and start over fresh. It was surprisingly easy. For a long time I was fine with meat from the fridge or freezer, for a few weeks I had fresh vegetables, and I had plenty of snackish food for between meals.

During the week or so that I moved my stuff, I had a hard time finding the motivation or the time or even the utensils to take care of too many meals, so I had fast food a couple days and pizza or sushi from Safeway a couple days.

Now I’m in the new apartment, and the project continues. I haven’t filled the cupboards yet. With the exception of a single cupboard that has baking stuff like sugar, flour, baking soda, etc., ALL of the food is in the fridge or on the counter. Having it on the counter has given me incentive to eat it, as it’s in my face and in my way. But it’s been about three weeks since I’ve moved and I’m still working away at the pile. In fact, I think I could continue this experiment for about another two weeks and still be ok.

A while ago I ran out of milk and eggs, and that had a huge impact on what I could do. Without those basic ingredients, a lot of the food became impossible. I couldn’t make bread or bake or do any kinds of desserts. A few days ago I broke down and got just milk and eggs, and that’s helped me along quite a bit.

Some of the things I’ve been making have been... interesting. There was an omelet made with mizithra cheese and diced prunes (it was actually pretty good), homemade tortillas with beans and salsa, beer bread with tuna salad, and other dishes. One of my favorite discoveries was that raw Ramen is an excellent substitute for rice cakes. Just open the bag, split the Ramen in half flat-ways (it’s easy to do), and spread jelly or peanut butter on it.

I’ve been craving a lot of meat, though, lately. I’d love to tear into a hamburger or a steak. And some of the food that I have left is more of a side dish, not a main course. I think I may break down and get some meat or vegetables so I can have the side dishes in a decent meal.

Another of my discoveries in this endeavor has been the strangeness of expiration dates. Perhaps it’s because of the dry and mold-free climate of this area, but I’ve been eating food that’s expired sometimes years ago. I had corn tortillas that expired in February of 2008, and they were still perfectly fine. They were a little dried out at the bottom of the bag, but I sliced them up and baked them to make chips. I haven’t really come across much that I felt uncomfortable about eating, and some of it was canned food over a year past it’s date. I think either we shouldn’t be so prudish about expiration dates on food, or we should be using a lot less preservatives.

Yet another realization was that food just seems to accumulate in the cupboards, and sometimes just never gets consumed. There’s no good reason for it, just entropy. I have a can of jellied cranberries that is a few Thanksgivings old, and I just haven’t done anything with it. I could easily have it as a side dish with pork chops, but instead other foods have a much higher turnover in my kitchen. I need to be better about keeping the cupboards tight. The good news, though, is that the average family could probably survive a lot longer than they think if they had to.

The experiment will continue until all the food is gone. Then we’ll go shopping and stock the cupboards more wisely. As I scrape the bottom of the barrel in the coming days, I’ll probably buy one or two things to supplement the meals, but this has been an interesting and difficult challenge.

I've Moved!

In mid-March I moved out of my old apartment and into a new one. It’s only a mile or two away from the old place, but it’s a big step up. If you want the address, just ask.

There were a few reasons for moving. I was getting tired of the old place. I just wanted a change of scenery. The old place was loud, too. The neighbors were constantly making a stream of noise from the tv, dog, and child. There wasn’t enough room to really host anything, either. And they were raising the rent again. Finally, it wasn’t big enough for two people and a dog.

So we’ve got a new place now. It’s a two bedroom loft style apartment. On the main floor is the kitchen, full bath, bedroom, dining room, and living room. Upstairs is a bedroom, bath, and utility room with washer and dryer. Splitting the costs of the place, it’s cheaper than what I’m paying now, I have twice as much space, a much quieter and cooler apartment, laundry here, a better neighborhood, and a 24 hour gym and rec room with indoor racquetball courts. We’ve already started playing racquetball twice a week.

I really like this new apartment, and I’m excited for all the fun times I’ll have in it.

TV Remote Alarm

We had an interesting problem at work. There’s a display in the main lobby of my building that shows the calendar of all the conference rooms and a map showing where they are in the building. It’s pretty handy for visitors and looks really slick. The problem, though, is night. There’s no point in having the display running 24/7. But the TV has a flaw where it won’t go into sleep mode when the HDMI cable is plugged in, even if the computer itself is asleep and there isn’t a signal.

The solution so far has been for a select few to turn it on in the morning when they arrive and off when they leave. Naturally, this isn’t a sustainable or reliable solution, as it doesn’t take a lot for the system to break down.

So Ian brought me in on the problem to see what I could do with it. I thought about some existing options. An outlet timer would work for turning it off in the evening, but not for turning it on in the morning (it would give the TV power, but not turn it on). I even found an alarm clock that was capable of being programmed to turn on and off a TV, which was really close to what we wanted, but it was discontinued, and reading into the manual it looked like it wasn’t going to work anyway.

I realized I would have to build something. I started off thinking of building off of the Arduino microcontroller board, which I’ve used for other projects and really enjoy using. I spent a day working on hooking up an infrared LED and trying to get it to output a standard on/off signal that the TV would recognize. I also tried to hook up an LCD screen and buttons for configuring the timer, but I quickly got frustrated as each part took way longer than I wanted, and wasn’t getting anywhere.

It made a lot more sense to work with existing electronics and cobble something together. It turned out I already had an alarm clock that I had stopped using in favor of my cell phone, and the alarm clock had two configurable alarms on it. And Ian had purchased for me a cheap universal remote. So I just had to get the alarm clock to trigger the remote control.

This was easier said than done. First I took apart the remote control. I followed the traces back from the on/off button and soldered a couple wires to them, then fed them out the back of the remote through a hole where the battery cover was. Next, I opened the alarm clock and went about trying to identify triggers I could use to determine the alarm state. I was hoping for something simple, like one node being +5V when the radio alarm was on and a different node being +5V when the buzzer alarm was on. Sadly, there was no such luck.

I’ll spare most of the details, but I never found a clean signal I could use. I ended up taking the radio alarm, cutting out the speaker, turning the volume all the way up, and using the speaker wire to drive two relays, which triggered the remote, then also fed to the alarm reset button. That way the radio would turn on, the signal would trip the remote, and it would reset the alarm. That one worked pretty slick.

It was even harder for the buzzer alarm. Not only could I not find a signal, but it didn’t go to the speaker, either. It went to a separate piezoelectric speaker, and the voltage to it wasn’t enough to trip the relays. So I had to build an amplifier circuit that bumped the signal up to something that would trip the relay. But then there was another problem. It was tripping the alarm reset button faster than it was tripping the remote, so it’d reset the alarm before the remote control had a chance, and the TV wouldn’t ever get switched. I fixed this by putting in an RC delay circuit on the alarm reset relay.

I put it all back together and tested it out. It’s in my apartment, so I had to try it out on the VCR (I had to take it out of its box), but it worked. The alarm clock dutifully turned off and on the VCR at the right times.

I’m bringing it in to work tomorrow to see if it’ll work on the intended television. It’ll probably sit on a counter across the lobby and point at the TV, and definitely have a sign that says what it is so people don’t get suspicious.

Here’s a picture of the completed project. I won’t show the insides because I’m a little embarrassed of the circuit. I could have done a much cleaner and more correct design, but it works now, so I’m happy. I hope people at work appreciate it, too.

Judging

Friday I took the day off to judge a middle school science fair. I’d never judged this particular science fair before, so the location was new to me. There were a few people I knew there, which was nice. It was the standard judging; lots of scientists and engineers from all the engineering firms and laboratories around, some house moms, and a spattering of retired folks. The first round I judged 8th graders. I got through my 12 and had my score sheet handed in right on time. Because it was required, there were over 150 8th graders, 175 7th graders, and the optional 6th graders had 5 entries. There was quite a variety of skill in the entries. Some of them were obviously done in the nights before and with little preparation or consideration. The worst was clearly the volcano; it’s such a cliche, and he didn’t even understand what was going on with the baking soda and vinegar, calling it an explosion and attempting to measure the height as his variable. There were also the ones where the parents helped a lot. Those are the ones where I ask questions they likely weren’t coached on. Things like “If you had changed this part of it, what do you think would happen?” and “Can you explain what the difference is between carbonated soda and flat soda?”. Some of the parents were sneaky; sometimes they’ll raid their labs for materials, but then make sure they’re using household ingredients instead of the lab chemicals. I always ask what kind of help they had.

The second round I took the 6th graders. There were 5 entries and 5 judges. We did each one, so each of the kids had to give their spiel five times. Two were clearly above the other three, though each had some really creative bits to it. One of the judges made me mad, though. Our ratings were exactly opposite, and his explanation was merely “they weren’t interesting to me.” That he was judging based on how interesting the project was to him was infuriating. The science fair isn’t about flashy or interesting, it’s about the scientific method; identifying a problem or question, designing an experiment and hypothesis, performing the experiment and measuring the results, analyzing the results, and forming a conclusion. There are steps like doing background research, validating your results, making observations, and ensuring safety and correct procedures. I make sure they went through the process, not look for the most interesting projects. Sure, the interesting projects will have identified a unique problem with a practical application and conclusive results, but not all science is like that. Fortunately the other 3 judges all ranked the 6th graders like I did and the girl who extracted DNA and compared the size of the DNA to the size of the genome and fruit for various plants beat the girl who used a flashlight and a glue stick to explain why the sky is blue without ever really understanding.

The second round took a long time because two judges from the other grades took forever to complete their score sheets, and the people going on to the next round couldn’t be determined until their ranking was done. So 45 minutes late we started the third round. I had 7th graders this time, and since it was distilled to the top 14 entries, they were all pretty good. I was a little concerned about safety with the girl who tested the amount of bacteria in various animal feces (including human), and fortunately she didn’t bring her samples to school. Sadly, school ended before we had a chance to get to everyone, so we were rushed at the very end and weren’t able to judge everyone. I filled out my score sheet as best as I could and left blanks in the middle of the pack for the two entries I hadn’t seen. That way their scores would be least impacted by the guy who hadn’t seen their entries, and the ones that I ranked highest and lowest would have their scores affected. I went back to work for an hour before heading home.

I made some brownies really quick and headed over to Nick and Carolyn’s place for spaghetti. Then we watched Flash Of Genius (a courtroom drama (more judging)). After that it was You Don’t Mess With The Zohan, which was surprisingly hilarious.

Saturday morning I woke up early and made it to the WSU campus for Science Bowl judging. I got my shirt and name tag and made my way to the room. There were a lot of judges there. More than we had duties for, in fact. It’s ridiculously difficult to break into the volunteering scene around here. I don’t know how many times I’ve tried to volunteer for something only to find out that there were too many people already and that they didn’t really need more judges. And getting to be veteran enough that you have any real important duties takes at least a decade. I’m not exaggerating; Carolyn asked. So I sat out for two rounds with no responsibilities at all. Fortunately, I did get to be the science judge for two rounds, and I got two read questions for one round. I absolutely love reading the questions, and I have to say I’m really good at it. I don’t mispronounce words, I don’t trip over my sentences, and I go at an even but quick pace that doesn’t allow for the kids to chat or get rowdy and gets through most of the questions in the round. Anyway, I’ve only been doing this for three years, so my room was one of the rooms that was only needed for the round robins until noon. After that the better teams went into the double elimination, and only some of the rooms were used.

I went home for an hour, then went to Emily’s to pick up the girls and go wine tasting (or wine judging if you prefer). Since I was driving, and I’m not a fan of red wines anyway, I stuck to only one or two tastes per winery. We went to Terra Blanca, Oakwood Cellars, Dessert Wind, Snoqualmie, and Heaven’s Cave. The girls bought something at each of the places we went, but I held out and only bought a single bottle at the last place; it was a unique and very tasty and smooth Riesling. The timing was perfect and we made it to our dinner reservation in Prosser at Picazo 717 at exactly the right time. We ordered a bunch of appetizers; sardines, calamari, flat bread, and a cheese plate, and they were all good. The others got paella, and I got a pork chop with apricot chipotle sauce that was delicious. I’m definitely going to have to try to make something similar at home. For dessert I had creme brulee. After the restaurant I drove people home and went home myself, satisfied with a pretty good day.

Hard Drive Surgery

A friend of mine recently had a minor emergency when a portable hard drive was knocked off a table and ceased to function. I was called in to help. Indeed, it did not work. When plugged in (and I tried on multiple computers and operating systems), it wouldn’t be able to recognize the device.

Since there was nothing I could do externally, I opened up the case, careful to make sure that anything I did could be undone. The case wasn’t even screwed together; it was two pieces of plastic that snapped together. After unsnapping all the way around, the hard drive was exposed. Again, no screws. It was held fast with some rubber strips on the corners. There was a piece of aluminum foil covering the electronics, so I carefully peeled that back. Glancing at the board, I didn’t see anything wrong immediately. The board was attached to the hard drive, and was easy to pull off. It turned out, the hard drive was a standard SATA connection, so I turned off my computer, plugged it in, and turned the computer on. It had no problem recognizing the hard drive and mounting it. I created a folder on my computer and immediately copied all the files over without any problems. Next I compared the file sizes to make sure I had gotten all the files and they added up to the right size. After that, I turned off the computer and removed the hard drive.

Looking again at the board, I noticed a small part near the USB connection that was askew. Looking more closely, it was indeed broken off the board and hanging by only one of the four solder points. The board was so small, though, and the connections tiny. I tried heating up the soldering iron and getting in there, but there was no way I’d be able to resolder it on. Just too small. I told my friend the data was fine and that the board was not and that if she got another portable hard drive I could copy the files over to it.

She brought me a new portable hard drive, so I plugged it in, copied the files, checked the size to make sure it was all copied, and unplugged it. Then I brought her the new hard drive, the old one, and showed her the parts and what had happened. Since the hard drive was still good, it didn’t make sense to discard it. It’s a 120GB laptop hard drive. She’s going to confirm that everything is there, and then I’ll delete the copy of the data I have on my hard drive.

The whole operation was surprisingly easy, and it certainly helped that the portable hard drive was so simply designed and used standard connections. I’m glad we were able to recover everything, though a little disappointed I couldn’t resolder the part back on.

French Toast Sandwich

Continuing an effort to finish off a loaf of french bread before it went stale, I decided to try to make a good breakfast. I can’t remember exactly how I ended up with the idea, but the combination worked extremely well.

I took some brown sugar and honey link sausage and sliced it in half lengthwise. Then I made my french bread egg mixture with egg, cinnamon, nutmeg, and a splash of milk.

While the bread was toasting on the frying pan, I scrambled some eggs in another pan, then cooked the sausages in the pan with the toast. I grated some cheese onto the bread, then put the sausage and eggs on, and put the other slice on top.

It was pretty much the best breakfast sandwich I’ve ever had. It was delicious.

Erin's Food Challenge

I recently received a pair of ingredients from Erin and was given the challenge to create an original dish with one or both ingredients, name it, and document it. The ingredients were wasabi cheddar cheese, and chili-cocoa powder. I tasted the powder and it was familiar but not extremely appealing. I tried using it as a rub on a pork medallion to see how it would work with other flavors. Again, familiar, but not extremely appealing. Almost done with the pork, I finally realized what it tasted like; mole sauce. Since mole is essentially chili and chocolate, this made a lot of sense. But I still don’t know what to do with it, so I’ll wait on that one.

The other ingredient made a lot of sense to me to use. I was at Safeway yesterday looking for something to eat, and I saw French bread. That triggered an idea for me; open faced grilled sandwiches. So I thought about what would go well on the sandwich with the wasabi cheddar. Obviously I’d need a green filler. I had spinach at home, but I thought sprouts would work better, so I picked up clover sprouts. I got a tomato, too, since that’s a staple for a sandwich. Then I thought about sushi and what goes into various rolls. I picked up an avocado based on that. For a meat, I had some salami at home, but I was a little worried the salami flavor would overpower or conflict with the cheddar. I also had some wasabi mustard at home that I thought about using in case the cheese wasn’t strong enough on its own. I saw a pear, too, and realized it would go perfect on the sandwich. You often have pear, cheese, and bread together. I checked out and headed home.

First, I sliced up all my ingredients:

Next, I started the bread. I sliced the loaf and heated some butter in the pan:

I toasted one side, then applied more butter and flipped the slices. While the bottoms toasted I put the slices of cheese on top to melt. I had to cover the pan to keep the heat in so that the cheese would melt before the toast burned.

Once I was satisfied with the bread, I added the other ingredients. Since this was an experiment, I decided to do 4 different sandwiches with the various ingredients:

On one sandwich is salami, sprouts, tomato, and avocado, with wasabi mustard as well. This one was really good. I think I would have used less wasabi and a milder meat, like turkey or ham, but it was still a really good sandwich.

The next one was mustard, sprouts, and pear. The pear turned out to be a really good choice, and it was also a tasty sandwich.

Next came the sprouts, tomato, avocado, and pear. This was my favorite. None of the flavors beat out the others, and it was all very good.

By the fourth, I was getting full. Plus, the fourth one had gotten a little too toasty on the bottom. I decided to pick everything off the top and eat just that. It was sprouts, tomato, and avocado, which are all very good, but the sandwich itself wasn’t noteworthy in any respect.

With my four sandwiches made and evaluated, the final part of the challenge was to pick a name. Since my favorite was the third, and it had green avocado, green sprouts, green pear, and greenish cheese, I wanted to give it a name, and incorporate green in the name. Some of the motivation behind the ingredients was from sushi, too, so I could incorporate the name soy perhaps. I think I’ll call it a “Soyless Green sandwich with tomato.” Don’t worry, it’s not made of people. But now I do wonder if I could put some kind of soy sauce in it. That could be pretty good.

Migraines

Friday night I had another migraine. It endured for about 10 hours, which was about normal for them. I don’t have them often, but I’m starting to figure out under what conditions they occur.

What they're like

Usually I can tell it’s starting at about mid-day. It’s a small pain in the back of the skull and right behind the eyes. I can continue to work until about 3-4pm before I have to head home. I try to sleep it off and can usually have a small nap. Sometimes if I manage a longer nap I can cut off the migraine. When I wake up I’m really hungry and have no problem eating and am fine the rest of the evening.

If the nap doesn’t work, I’m in for a horrible evening. The pain in the back of the skull is bad, but the pain behind the eyes is monumental. I get sensitive to light and sound. It becomes like a storm in my brain. I have thoughts really fast and really scattered, and my brain is constantly trying to think in sentences but can never finish them before moving on to the next sentence. It’s almost like my brain goes from a steady candle to a raging wildfire.

I can’t eat or drink during the migraine, either. I typically try to force a few nilla wafers down and some Gatorade, but that’s only so that I have something to come out during the inevitable oral evacuation.

I typically squirm in bed, trying unsuccessfully to get to sleep, uncomfortable with light and sound, and incapable of doing anything else. Somehow, finally, sleep comes. when I wake up, the head no longer hurts, and I’m starving and eat a late dinner.

What triggers them

I’m pretty sure that what triggers them is a combination of high stress, high brain activity, and little or no food. The hard part about identifying the triggers is that I think they’re preordained the day before.

I already eat dangerously little. Usually skipping breakfast and lunch, I often survive off whatever food is put out for free in the public kitchen at work. When I get home I make a dinner and try to make enough so that I can have leftovers for lunch the next day. So I bring a lunch about 2-3 days a week. This is fine for the normal work day because my intake matches how much I burn. I usually keep poptarts, fruit snacks, and beef jerky in my office for when I need to eat. But on days where I’m really busy, giving lots of demos, going to meetings, doing a lot of work, and spending 10 or more hours at work, I’m burning energy a lot faster, and I don’t have an opportunity to get more food because I’m so busy. The same thing happens when I’m on travel. I will be in unfamiliar places with unusual schedules and doing more than normal. That means I’ll be burning more and consuming less, which will trigger.

When I was in college I would get them regularly once a week on either Sunday or Monday. That was about when it started. Same symptoms, same triggers. I didn’t have as many my Junior and Senior years, but they started up regularly again during my first year in Richland when I was eating much less and working 10-12 hour days every day.

Attempted remedies

You’d think knowing about these triggers would encourage me to eat more. I really have no excuse. I like to cook. I like to eat. I just like to do other things more. And when I’m busy doing stuff I just don’t think about eating. During the migraines eating doesn’t help. Once the pain starts at mid-day, it’s too late to cut it off by eating, and throughout the rest of the migraine the food doesn’t stay down if I try.

I’ve tried the standard pills, like Ibuprofen, Aspirin, and Alleve, but they do nothing at all.

I’ve tried putting myself to sleep. I usually watch an episode of the Simpsons every night to fall asleep, so I tried to use a Pavlovian response and play a Simpsons episode, but that got me nowhere. Being in my bed in a dark and quiet room didn’t help, either. It’s really hard to get to sleep.

I’ve tried just thinking through it and concentrating on the pain and getting it out. Admittedly not a really scientific method, but I had time and no other ideas, so I tried that. Needless to say, that didn’t work, either.

Since my brain is usually running really fast, I tried to do something that would slow my brain down; something engaging and mind-numbing. Movies actually do fairly well as a remedy. Despite the sensitivity to light and sound, I can often watch a movie, though often I just listen without watching. The movie allows me to stop thinking and not focus so much on the pain. Sometimes it even helps me fall asleep as well, which is ultimately the only thing that cures the migraine.

Conclusion

I’m definitely not a fan of the migraines. They cut my day short, take me out for the whole evening, and hurt a lot. That I don’t have an instant remedy bugs me a little, and it would be nice if I could recognize a symptom and avoid the migraine instead of seeing a symptom after it’s already too late. I hope it gets better in the future, too. Maybe I’ll grow out of them. Maybe they’ll get worse or more frequent. Maybe I’ll figure out how to avoid them completely.

2009 Polar Plunge

This weekend I participated in a charity event called a polar plunge. The idea is simple. I get people to contribute money towards me doing something crazy, then I go do the crazy thing. Then Special Olympics Washington gets some money. I tried not to campaign too hard around my friends. I dropped a few hints, I mentioned it a few times. I sent out an email to some friends and family, I posted on a bulletin board at work, and the last day I kicked it up a notch and emailed a few people I knew would donate. On my web page for giving the money, I set up a bit of an incentive; the last digit of the amount I raise would be the way I entered, from cannonball to flip to backflip, and even including bellyflop. Of course, everybody tried to keep it at bellyflop, and I was least excited about that one. But at 10am the day of the event, I checked the site one more time and saw that it was at 817, so I had to do a bellyflop.

(Photo by Wendy Andres)

The day of the event I wasn’t feeling too good, so I was really concerned about the flop. Further, the event coordinators really wanted people to just jump straight in. At about 10 minutes before the event, I went into the tent to change clothes. For the last few minutes I wore a bathrobe over my bathing suit. There were a lot of people there, and they were being marched out onto the docks in groups of about 20-25. Then everybody would count down from three, and they’d all jump in, swim back to the boat ramp, and walk up, then get their towels and go back to the tents or the hot tubs that had been set up. The event was hosted by the police and fire departments, and they had all volunteered their time to be there. There were guys in dry suits in the water, ambulances nearby, and lots of people around in case anything went bad. There really wasn’t any danger with so many emergency people there; well, maybe to the rest of the tri-cities.

It came to our turn, and I took off my robe and set it on the hood of an ambulance. Then we all walked down there. I had a hard time finding a place along the dock and ended up towards the end behind someone. They counted down, and everybody jumped. I had to hang back a little because there was a guy directly in front of me, but I jumped as soon as I could:

(photo by Wendy Andres)

(photo by Ian Roberts)

(photo by Ian Roberts)

(photo by Ian Roberts)

(photo by Doug Love)

The jump started off perfect. I got spread eagle and was looking forward to the belly flop, but the person in front of me hadn’t gotten out of the way yet, and I barely avoided him. The water was indeed cold, but it was a different sensation than I had experienced during my practice run in the shower the day before. It didn’t feel like cold, but instead felt like my skin was discovering the sense of touch and all of my skin was yelling at me at once. I started to swim immediately for the shore and could only think of how interesting the feeling on my skin was. It was something very new to me. I kept swimming until I noticed that people were wading in thigh-deep water next to me, so I stood up and walked out of the water smiling. I went to my robe, put on my glasses, and walked towards the tent, giving Erin a very cold kiss on the way. There I changed and came back out. I chatted with some friends for a little bit, then headed home.

Overall, it was a lot of fun, and I’m very glad I did it. I got a few contributions afterward, and as of this entry raised $967, which is just a few dollars short of my goal. I’ll definitely do it again next year if I get the chance, but I may have to pretend I didn’t like it so much.

Going green(er)

I’ve always thought that I am pretty good about doing things in a decently Earth-friendly way. I keep my AC and heat at barely tolerable levels, I recycle, I turn off the lights when I’m not in the room, I turn off the water when I’m brushing my teeth, and I carpool when it makes sense. But I recently read the book Hot, Flat, and Crowded by Thomas Friedman, and while it’s a very good book, it scared me pretty good. So I’ve resolved to do even more to reduce my energy usage, carbon footprint, and resource usage. I’ve been doing some experiments around the apartment, and I’ve tried a few things out, and I think I’ve come up with some more reasonable things I can do to save. Plus, I’m saving money this way, which is a bonus.

  • Unplugged lights. People have said before that my place is pretty dark. Now it’s even more true. My bedroom is lit with a single 23 watt compact fluorescent bulb, and I’ve unscrewed half the lights in my dining room and bathroom. It’s enough to see clearly, and it’s not as dark as having candles. Plus, even though I was already turning off the lights when I left the room, having only half of them on when I’m in the room means a reduction of energy by 50%!
  • Unplugged peripherals. A huge drain on the power grid is devices that are in standby. So I unplug my microwave except when I’m using it, and I use my cell phone as my alarm clock and no longer use a standalone alarm clock.
  • Turned down the heat even more. For a couple days I turned it off entirely. However, when my fingers got too cold to let me type, and I started to get sick, I decided that going without heat entirely wasn’t an acceptable option. I did turn it down a couple degrees, though, to 62. Cold enough that I can’t lounge around in shorts and a t-shirt, but not so bad that I can’t type.
  • Turning my desktop computer off or putting it in standby. For years I’ve run my desktop computer 24/7 because it acts as a server. I’m now trying to move those services off my computer and onto hosted servers or finding alternatives. Now I can have my computer off or in standby most of the time.

These simple things should reduce my electricity consumption even more. I’ve saved my utility bills every month, and created a graph that shows my power usage each month:

There are some obvious things to note about this graph. It looks like most months I hover just under 400 KWH. Looking at the trendline, there’s an obvious spike in the winter months, with a tiny spike one month in summer when it’s unbearable without some AC. My hope this year is to reduce everything by 25%. I think it’s entirely doable, and using less light, less heat, and having my computer off more will go a long way towards that.

I’ve also been dabbling in energy generation. I built a stand for my bike so I can ride it indoors. Then I took a motor and attached it to the outer rim of the bike so that the spinning wheel would turn the motor and it would generate a current. I put a voltage regulator on it so that it would keep the voltage at +5 so that I wouldn’t blow out my cell phone, then hooked the wires up to a USB port so that it could charge my phone.

Surprisingly, this actually worked. Well, it was easy enough to generate electricity, and getting up to 5 volts was no problem at all, but my phone didn’t appear to be charging. So I sped up. And up. And up. I was cranking it as hard as I could in top gear before the charging light came on. I was also smelling ozone from the motor, so I decided to end the experiment. It was clearly not a sustainable solution, even though it did work for a few seconds.

So I thought the next approach would be to gear down so that I would have more resistance on the bike and it would spin the motor faster. The only set of gears I could find in my apartment were from an old CD player. I tried those and while I was still testing to see what kind of a current I could get I managed to put so much energy into the gears that they quickly melted and then broke. So that wasn’t going to work. Now I’m looking into buying used car alternators, which is probably the way I should have been going from the beginning. Still, it’s good to know that in a pinch I have the knowledge to generate electricity to power a small device.

Finally, I’m working on reducing my consumption in other areas. I’ll be even more vigilant about recycling everything, I’ll reuse things as I can, and I’m going to monitor how much trash I take out. I think that before I was taking out a single plastic grocery bag a week (I don’t buy garbage bags), which is pretty good, and I want to keep track of that to see how that continues. I’m also going to figure out a timer for my showers, and I’ll flush less frequently. That’s actually pretty hard because I’m so accustomed to lifting the seat, putting it down, and flushing that I often don’t realize until I’m washing my hands that I flushed when I shouldn’t have.

It is my hope that watching my consumption and taking small steps to reduce it will have a better effect on the environment and my pocketbook, without reducing my quality of life.

Christmas 08, New Years, and a long vacation

On the day before Christmas I took a much deserved vacation that turned out to be fun and relaxing and happy. Well, it didn’t start that way. The original plan had been to go to Corvallis for a couple days to see the family, then drive up I5 to Winlock to see Erin’s family then go back to Olympia for a few days, then go up to Seattle for New Years, then spend a couple more days in Olympia, and finally go home on the 4th. Weather changed some of that. The road through the gorge to Portland was closed for days. All the other roads through Oregon to get to Corvallis were just as bad. Passes were closed, too. I could have ended up stuck in Richland for Christmas. At the last minute I had to cancel the Corvallis part of the trip. The gorge had opened that night, but it was very sketchy, and even the Portland metro area had chains required for all vehicles. My family was sad, but I wasn’t the only one that had to cancel because of the weather. The good news, though, was that both Snoqualmie and White Pass were open. Erin had gotten her car stuck in the snow, so she wouldn’t have been able to meet me in Winlock, so I decided to go through Snoqualmie, pick her up in Olympia, then go with her down to Winlock. I started the drive down there and it was hairy the whole way. I don’t think I traveled a mile without snow or water on the road. There were accidents all along the roads; cars off the side, tracks leading off the road and back on it, even a few semis in various stages of not right side up. So my white knuckles went well with the rest of the scenery.

It was when I got to the pass, though, that things got particularly exciting. It went from traction tires advised to traction tires required right after I passed the sign, and I didn’t have traction tires. I chugged along, though, and despite the conditions did ok. There wasn’t a lot of traffic and the traffic that was there was all polite and reasonable. The roads hadn’t been plowed in a while so we were making our own tracks and trying to stick to lanes but also drive safely. I made it to the peak and hadn’t had any problems yet. I put my car into a lower gear for the ride down and didn’t encounter another car for a few miles down the slope. I thought things would be great soon as I got down and out of the snow zone. The next 50 miles were anything but.

The snow was pretty high on the roads. In fact, it was deep enough that I was scraping the underside the whole way. It was soft snow, so it wasn’t going to hurt my car, but it meant that I had to push harder and had less traction. Riding in tracks helped a little, but I was still sliding around a lot. It was a barely controlled ride on a very big sled. I didn’t have to deal with a lot of other vehicles, so I stayed in the middle of the road and took the corners at exactly the right speed not to start sliding. Every second my car was telling me it was scared and barely holding on.

The scariest moment came out of nowhere. I had bunched up with a few cars, and as we came around a curve there was a semi off the road on the left and another one off the road to the right. Not completely off the road, but on the shoulder. This acted like a funnel in the middle of the curve, so all the cars had to bunch together some more, which was really bad. Since we were all slowing, too, I started to slide horizontally down the bank of the curve. I tried to keep my speed up and even it out and get back in line without doing anything drastic, and kept sliding until I was into untouched powder on the side of the road. It was high enough that it started coming up over my hood, but I was not about to give up and stop. That would have been very bad, not just for me, but for all the cars who would probably be in a similar situation behind me and have to try to dodge my stuck car. So I plowed through and kept trying to get back on the road. I think the car right behind me was having issues too because he was right in my blind spot and wasn’t giving me room to get back on the road. I assume he wasn’t in total control, because as I started to creep back his car suddenly turned and he swerved into another lane. I’d rather not think there was malice in the car behind me, but I have been wondering what was going through his mind as he saw me struggling to stay on the road and not have him hit me. Anyway, I made it back on the road and did everything I could to get my speed back up to something maintainable so that I wouldn’t stop. The whole time I never got below 25mph, but if I had lost any more momentum than I had, it would have been a very different story. Fortunately, everything turned out ok. In my rearview mirror I saw the others that came around the corner with me and miraculously there were no accidents and nobody left the road.

That wasn’t the end of the excitement. The bunch split up again and I had most of the road to myself, but the snow was just as deep and scraping my bottom, and it turned into a whiteout. I couldn’t see more than 100 feet. Fortunately, I found a car ahead of me and got to a distance where I could just barely see his taillights, and I followed him until there was visibility again. Eventually all the snow disappeared and we were almost in Seattle. The rest of the road down to Olympia was just wet and very easy. That is, until I got into Olympia, where there was at least 4 inches of packed slippery snow on the roads. I didn’t so much park on the side of the road as slide into it and resolve that since I couldn’t move it would have to do as a parking spot. I picked up Erin and we had some adventures pushing my car out and getting back on the road.

Getting to Winlock wasn’t any better. For miles Erin and I drove through pouring rain/snow, and Erin’s dog got scared enough watching the road that he hid behind the driver seat. Once we arrived in Winlock, we made it towards her parents’ house, only to be thwarted by a very steep and slippery hill. We put the chains on and barely made it there. I parked and was very glad to have made it all the way safely.

Staying with Erin’s parents was fun. We had a good Christmas party with a lot of their relatives, and a white elephant gift exchange, and some games. The next day we went for a walk in the woods and played in the snow and watched some movies. The next morning we returned to Olympia, this time in much better weather and without nearly as much excitement. Parking was still a matter of accepting where you landed more than putting the car where you intend, but I didn’t plan to move for a few days.

Monday and Tuesday Erin and I worked. I had brought my laptop with me so I was able to work from her place while she went to work and did her thing. We made dinner together, watched movies in the evening or went out to play pool. It was all very nice and happy and cooperative.

On the 31st we drove up to Seattle. We had gotten tickets for a huge party on the waterfront with 5000 people and 5 dance floors playing club, salsa, 70s, 80s, and lounge music, plus a stand-up comedy stage, and we were pretty excited. We checked in to our hotel, took a break, and got ready for the evening. We took a taxi down to a group of restaurants near the waterfront convention center and had some good sushi and bento, then walked to the party. We explored the enormous complex and did some salsa, then happened to run into Erin’s friends just as we were wondering when they would show up. The four of us stuck together for a while, but it quickly got frustrating as we all waited for the others to smoke, get a drink, go to the bathroom, disappear for a while. With 25 minutes to the countdown Erin went to the bar to try to get us drinks to toast. After standing in line for 10 minutes and not getting anywhere, she came back, and I gave it a try. I had been watching the bars, so I had an idea where to go and how to insert myself into the throng to get to the front. I showed the bartender my cell phone with my order typed out and she laughed and gave me the drinks. With 12 minutes before the countdown, Erin and I gave up on the others and went to do what we had planned to do. We went over to the retro dance stage where there were windows looking out to the space needle. At the countdown the fireworks started, and we counted down out loud with everyone else crammed up against the windows, celebrating at the new year.

We then did our own thing for a while. We took a break at the live comedy, went to a couple of the other stages and danced a little, and managed to meet up with the others as things were starting to simmer down and lots of people were leaving. Erin got her coat, and we made our way outside to try to find a cab.

Finding a cab was tricky. First, it was raining and cold, and I hadn’t brought a jacket, and Erin was in a dress and heels, so we were a little more exposed than I preferred. We walked up to where we were before with the restaurants and saw a few taxis, but finding one that wasn’t already taken was tough. So we used the Chicago strategy we had developed and started walking in the direction we thought they were coming from. I saw a taxi that almost seemed to be hiding and made eye contact with the driver, who showed he was available. I grabbed Erin and we hopped in. Before we could close the door, another guy was talking to the driver saying he had been waiting over an hour, that he would pay more than we would, and that he wanted to share the cab even though he had four people and was going in a different direction. The driver said no and the guy cussed a little and left. Then the driver pointed out that the guy could have walked there in less than ten minutes. The bad news was that the cab was a fixed $20, about triple what it cost earlier that night. We weren’t in a position to argue, and we had a discussion about civil engineering and concrete as he zipped through traffic and did some creative driving. We made it back to the hotel safely.

The next morning we got breakfast barely in time, and didn’t really do much during the day. We walked across the highway into Capitol Hill, and ate at a nice Nepalese place called Annapurna Cafe. It was good food. Then we walked back and drove over to Chinatown to see a very unusual but decently entertaining play/shadow puppet show. After that we headed back to Capitol Hill and a place called the War Room, where we had fascinating conversations and made ourselves uncomfortable as the only white people in a room dancing to reggae. After that it was back to the hotel.

The morning of the 2nd we checked out of the hotel and stopped in Tacoma. We went to the Glass Museum, lunch, and the Washington History Museum, then drove back to Olympia. The next couple days we didn’t do a whole lot. We went bowling, we played pool, we cheated the foosball machine by stuffing wallets into the goals so we wouldn’t run out of balls and could play as long as we wanted.

Sunday morning it was time for me to return, and we said our goodbyes and ended after ten days together almost the whole time. We could easily have kept going.

Thanksgiving 08/Portland

The four day weekend was a great opportunity to see a lot of people. I was going to see my Oregon family as I had for I think the last seven or eight years. It’s always nice to see them and catch up on things. I asked what I could bring for food and ended up with cheese balls. Granted, a lot of people were going to be there and since I was traveling further than most of them I could hardly be expected to prepare the turkey or one of the other essentials. Still, I was a little unhappy with cheese balls. However, it ended up an opportunity instead of a chore, and I had a lot of fun with it.

Knowing that it would likely be one of the less-consumed appetizers, I wasn’t about to make a large volume of it. I also know that if there are multiple flavors people will likely try all of them. So, with my interest being to create something that would be completely consumed, I set out to make many small cheese balls. I looked at a variety of recipes and saw some similarities and some interesting twists. Cheese balls are essentially cream cheese, other cheeses, and flavoring. I made a base of cream cheese, mozzarella, and cheddar. I split that in half and added more mozzarella and cheddar to it. This gave me two different consistencies of cream cheese, one harder and one softer and easier to dip. So that was a learning experience. Next I split those halves again into four separate cheese balls. Then I added flavors. For the first one I had some blackberry jam that Erin had made and given me. I thought a sweet berry flavor would go very well as a cheese ball, so I added it until it tasted right. That one was one of my favorite of the four. I took another of the balls and put sliced green onions in it. It was ok; seemed pretty traditional. The third was ranch dressing, which I thought was the most traditional, but which ultimately was my least favorite. The fourth one I tried something spicy; chili sauce. The red kind you would find in a Thai restaurant. I added that until it tasted right, and indeed it did taste right. It was soft at first as the cream cheese said hello to the tongue. After a moment the chili sauce announced its presence, not impolitely interrupting the conversation but instead like the coolest guy arriving fashionably late to a party and setting a whole new energy level in the room. Anyway, that one was awesome.

At around 11pm, though, I got an email from my cousin saying that she had considered my offer of a dessert and they would gladly have a cheesecake or key lime pie. I was one egg short of enough for the pie, but I had all the ingredients for the cheesecake in my apartment. I’m not sure what kind of a guy that makes me, that I would just happen to have everything. People have commented on the completeness of my cupboards. Anyway, I got to work, taking half the cheesecake and making it chocolate and then swirling it into the vanilla. I think it turned out great.

There was another reason for the cheesecake, though. Erin and I had been talking that week, and it occurred to us that Portland was right in between Corvallis, where I would be staying Thursday and Friday night, and Winlock, where Erin would be staying. So we decided to see each other Saturday night and spend some time in Portland. So if things worked out how I expected, I would be able to save some cheesecake from the dinner and give it to her that weekend. I had made her a blackberry cheesecake a while before when she came to Richland, but she hadn’t taken any back with her and regretted it. This was an opportunity to make it all better.

I got to bed at around 2am, and was up bright and early so I could make the drive to Portland. I arrived right when I said I would, and everyone was happy to see me and vice versa. We talked, we watched a little TV, we argued politics, we cooked, I played with the boys, it was all good. The food went over well, and it was interesting hearing who preferred which cheese balls. The pre-dinner and dinner and desserts were all great, and I was a very happy boy. Then I drove down to Corvallis to hang out with my aunt and uncle and spent the night there.

The next day Uncle Les took me duck hunting. I’m not really a fan of hunting, but I don’t have any objection to it, and it made my uncle happy, so I thought I’d tag along and see what he enjoyed about it. We got all geared up, and drove out to the duck club. Once we had signed in we trudged over to the duck blind and sat and waited and talked. It certainly wasn’t a thrill a minute, but it was enjoyable. We saw a lot of geese, but it was fairly late in the day to see any ducks, so we were starting to lose interest. In a flash, though, a duck went by the blind, Uncle Les jumped up and aimed the gun as I moved to give him room, he fired, and I caught a glimpse of the duck dropping exactly like it does on Duck Hunt for Nintendo. Cass, the dog, ran out after it and grabbed it out of the pond, then proceeded to bring it back to shore; the far shore. Les went chasing after it and crossed the pond and finally got the dog to behave and relinquish the duck before they came back to the blind. While he de-feathered the catch, we hung around the blind some more in the hopes of seeing another duck, but were not lucky a second time. We gathered up our things and headed back to the truck, then home.

That evening I went out to a Chinese buffet with my Grandpa and then back to his house to chat for a couple hours. Then it was back to bed. In the morning I got up and made my way North back to Portland. Erin and I had decided to stay at the Jupiter Hotel, where I had stayed with my friends for the Phantom of the Opera, and she arrived before I did. We had a mid-afternoon drink and light dinner at the hotel bar, the Doug Fir, then watched some Mythbusters while we decided what to do with our evening.

Carolyn had suggested a place called Oba Restaurant, so we went there. It was really good food. The chili mojito was less good, but the soup was so tasty and filling we had a hard time getting through even half of our entrees and we had to tell the waiter to cancel the dessert, which was really disappointing since we really liked the place. We had planned to go out to the bars, but weren’t feeling up to it, so we just took a taxi back to the hotel. In the morning we looked around for a place for breakfast and were supremely disappointed with Old Wives’ Tales restaurant. The food wasn’t good; the hot chocolate was the worst I’ve ever had (how do you screw up hot chocolate? they found a way).

It was about noon on Sunday, and we had checked out of the hotel and both wanted to get back during daylight, so we said our goodbyes and drove back to our cities.

 
Copyright 2007, Bob Baddeley