Saturday, August 20, 2011
Plotting the ratio of two stocks
GOOG versus S&P 500 over the past year
Monday, March 7, 2011
Hot-water shower in my car for after surfing
Basically, I bought a 12V water pump and attached it to a cigarette lighter power plug. I use the pump to pump water from a 5 gallon storage tank to a hand-held shower head. The idea is that I fill the tank with hot water from my bathtub before I head out surfing, I put the tank and pump in my car trunk, and, after I'm done surfing, I plug in the pump and shower off with the water from the tank. By the time I'm done surfing, the water should have cooled to a pleasant temperature.
I've tested the electrical work and full system test to come soon!
Here's a pic of the work area while I was putting it together:
Update 3/12/2011:
Surf shower v1.5. The water system test was a success! The pump has quick-connect plugs to which you attach the hoses. Mechanically, they are rather fragile. To protect the quick connects, I've mounted the pump inside a rubbermaid tub and used electric conduit clamps padded with a bit of neoprene to guide the hoses so that the hoses can flex and move around without straining the connectors. I also mounted a lighted power switch on the other side of the tub. I used a copy of the disappointing 'The World is Flat' book as a backstop for the drill and cutting board for the neoprene.
Update 7/12/2011:
I've been using the shower regularly after surfing and it works wonderfully. The 5-gallon tank has turned out to be a good size. Most full-flow shower heads flow at a rate of 2 to 2.5 gallons-per-minute. So a 5-gallon tank (which weighs 40 pounds, when full) will last a bit over 2 minutes of continuous usage. I find that by turning off the water switch on the shower head while I soap, I end up using about 3 to 4 gallons of water, and usually have plenty left over at the end.
Here's the final setup:
The water flows out of the resevoir, through the strainer (the black circular device attached to the tube), to the pump, then from the pump to the hand-held shower head. There is a lighted rocker switch mounted on the right side of the tub.
Friday, December 24, 2010
Making slipper-socks from socks
- Start with a choice sock
- Put them on and trace out the outline of your feet on a piece of cardboard.
- Cut out the shapes
- Use the outlines to cut out a piece of fabric that has non-slip surface on one side (got it from a fabric store)
- Put the cardboard into the sock to hold the shape, and then glue the fabric to the sock, using fabric glue.
- For good measure, I then added a felling stitch around the edges to help hold the fabric on in case the glue doesn't hold.
And the results:


Quiet an exceptional piece of work, if I do say so myself :). One refinement I want to try next time around: When glueing the fabric to the sock, rather than pressing it against the sock with the cardboard inside, instead press it against the sock with your foot inside. I introduced a small registration problem with I pressed the fabric - I didn't quite center it to where my foot naturally rests in the sock. It's possible you could get away without using the cardboard at all.
Thursday, December 16, 2010
Full custom neoprene jacket for glass water bottle
On vacation with some time on my hands, and figured what better time to construct a protective jacket for the perfect water bottle (see my post earlier on the bottle). Pictured here is the result of a sheet of neoprene laminated with a cloth-like layer, 8 coat hooks, 2 yards of 1mm yellow line and a few hours sewing sprinkled with the occasional curse.
The intent is that the neoprene jacket will cushion the bottle if it falls on a hard surface so that it hopefully won't break. The important areas protected are the corners because they are what is likely to hit a hard surface if the bottle falls on the ground.
The reason for the separate pieces and line connecting is so that it is easy to remove and clean, and also so that you can see the contents of the bottle.
Update: As an alternative, I also tried a rough cut at a version using eyelets instead of stitching. In the image below, I haven't glued the sides or anything, so it appears a bit flappy. I like having a lower-profile to the protective case, but th eyelets pop out too easily. Also, not sure how the glue will work to glue the edges of each piece together...

Sunday, November 21, 2010
A candidate for best water bottle

My quest to find the best bottle to drink water out of has ended, at least for now. Read on... results at the bottom.
Background:
I used to drink water out in disposable plastic bottles. Then I started reusing the plastic bottles till I heard that disposable plastic bottles leach chemicals into the water and that reusing them is even worse. I switched to plastic bottles (e.g., Nalgene), then heard about the BPA issues. I started doing research and it seems like the next best thing was stainless steel bottles like Kleen Kanteen. Stainless steel doesn't leach plastic chemicals, though it does affect the taste of the water a bit. Kleen Kanteen is made out of food-grade stainless steel.
To take it to the next level, there's a stainless-steel bottle originally made by Guyot out of surgical-grade stainless-steel that I also started using. Surgical-grade sounds like it just has to be better than food-grade, doesn't it? I couldn't help myself. I think technically, the main difference between the two is that surgical-grade steel (Guyot is 18/10, also known as 316 stainless steel) is a bit more resistant to corrosion in salt-water. Yeah, I know that we're not using it to store ocean water, but it's the principle, right? Maybe there's a couple of grains of salt in your water on occasion... On the other hand, there is a concern that the nickel in the stainless steel isn't good for you.
So what's the ideal bottle that doesn't leach chemicals or interact with the water in any way? The gold standard for this is glass. Turns out there are some consumer glass water bottle makers, like Lifefactory and Takeya. I had two issues with these bottles. First, the largest size is 22oz, which is a bit small for me. Second, the bottles apparently may break if you put boiling water into them. This is an issue because I use boiling water to clean my stainless steel water bottles. I like cleaning with boiling water because you don't have to worry about soap residue taste and you know any bad stuff is killed.
There's gotta be a better bottle! Turns out that there is, though it's not for consumers. Remember high-school chemistry class? Glass is often used to contain chemicals. If you look at chemistry supply websites, there is a class of glassware called "media storage bottles". These bottles are intended to store potentially nasty chemicals, so the ability to store the chemical without leaching junk from the bottle is a priority. I looked around for the best media bottle. Some makers are Corning, Schott/Duran and Wheaton.
The best bottle I could find is.... [ drum roll please ]:
Duran Pressure-Plus Laboratory Bottle

Cool properties of this bottle:
- Made from Duran glass, which I think is basically Pyrex. Check out the link for more info. It can handle boiling water (and apparently contents up to 500 degrees Celsius). It's super resistant to all kinds of chemicals and very inert. It can handle thermal shock up to 100 degrees Celsius (e.g., boiling water on one side of the glass and an ice-cube on the other). Also, the glass is pretty thick and sturdy, though I haven't dropped it yet.
- The Pressure-plus bottle in particular can handle pressure between -1 bar (a vacuum inside of the bottle) and +1.5 bar (1.5 atmospheres of pressure pushing outward). One caveat is that if there is a pressure differential between the inside/outside of the bottle, the thermal shock resistance is lower (they claim up to 30 degrees Celsius difference maximum when at maximum rated pressure).
The main downside to this bottle is that it's bulky and that it it doesn't come with any consumer niceties like a holding strap, a protective silicon case or a cap. It takes a standard cap size called GL-45 - I use the cap from a runner-up bottle not described here from Corning.
Thursday, May 6, 2010
Getting MAME working on Ubuntu 9.10 (Karmic)
- Install mame and the pulse audio driver:
sudo aptitude install mame libsdl1.2debian-pulseaudio
- At this point, sounds was crackling, but enabling multithreading fixed that:
mame -multithreading
Also, Mame seems to be the best supported emulator. I tried to get a few others (nestra, fceu) working without success.