Archive for January, 2007

Life Hack: Toothbrush

I buy those cheap battery powered toothbrushes, and they are great, make my teeth nice and clean, but they have a serious design flaw. Namely, once the batteries die, it’s really tough to get them back together after changing the batteries.

It’s a simple problem really. The o-ring which acts as a gasket, keeping water away from the batteries, gets caught on the lip of the handle when you go to put it back together. What I do is clean it real good, spray a little PAM cooking spray on my finger and coat the gasket. Makes it go right back together.

Happy brushing!

Seriously

STOP IT. Someone for years now, has been putting a paper on my porch. How is that legal. Stop littering on my property.

Partials

I have put my lean web framework under the code link above. I don’t particularly recommend you use it, since there are no docs but it’s there.

Economic rambling

There have been several interesting articles and discussions online recently about economics. On the freakonomics blog there was chatter about the Sunk Cost Fallacy(SCF) (which Eric discussed on his blog). Then there is the Yahoo Finance article on income inequality.

Both articles, and Eric’s post, talk about rationality in economics (for Sunk Cost, read the 3rd paragraph of Eric’s post it’s a nice summation). SCF is a no-brainer, if recovery is not possible, get out and don’t throw good money after bad. Easy peasy. (I would add, that there are reasons to pursue a dying project outside of economics, such as one’s self image as successful/unsuccessful. Seeing a project through, even one that is ultimately an economic loss, could have value to the person).

The Yahoo article talks about a different emotional/economic connection, that is, relative wealth.

From the article:


In other words, we care less about how much money we have than we do about how much money we have relative to everyone else. In a fascinating survey, Cornell economist Robert Frank found that a majority of Americans would prefer to earn $100,000 while everyone else earns $85,000, rather than earning $110,000 while everyone else earns $200,000.


The author then goes on to posit:


Think about it: People would prefer to have less stuff, as long as they have more stuff than the neighbors.


I think he’s drawing the wrong conclusion personally. Let’s think of the question this way:

Would you rather make 100K while everyone else made 110K, or would you rather make 110K while everyone made 200K. You can have either, but only one, and no chance to change it afterward.

Personally I would choose 100K, and it’s not to be benevolent to the rest of the world. Even from the perspective of self interest, choosing a smaller income gap between you and the rest of society will (in my opinion) work out better for you.

It seems to be a simple market problem. If everyone else makes 200K, the market can bear higher prices for goods and services than it could if everyone made 110K. So, if you choose 110K, the market will bear higher prices and as a result you’d actually have less wealth than had you picked the smaller gap, that nets less real income.

Maybe I am being reductionistic, I’d like to hear what you have to say on the issue.

Gasoline

I have a 2001 Hyundai Elantra. This past tank of gas I hit the odometer, and then when I refuled, I divided the number of miles I had traveled by the number of gallons I had to buy. I averaged a little better than 33/MPG. Not bad. The disclaimer is that I have a wicked commute (62 miles each way) and it’s almost all highway.

More Wiki-History

I have heard of the Aliens and Sedition Act in the past. But I finally read the wikipedia page. In an odd way it’s comforting. I am glad to see that the power of the vote fixed a black mark on democracy.

In my research

In my research for the last post on when Ford was President, I found this wikipedia page. It shows a table of Presidents ordered by longevity. It’s very interesting. The bottom two (Kennedy and Garfield) were assassinated, then we have Polk who apparently died of Cholera.

After that the next youngest to die was Lincoln, also assassinated, then Arthur, who died of a cerebral hemorrhage (heck of a way to go if you ask me). Then we have Harding who “died of either a heart attack or a stroke” (Heh, in todays super science culture we would never be satisfied with that answer).

The rest I will allow you to discover for yourself…very interesting.

Ford

I have heard many opinions on the legacy of Gerald Ford in the past few weeks. While I was alive during his presidency I don’t recall it at all (the first President I remember is Carter). There have been a lot of folks characterizing the the pardoning of President Nixon as a selfless act that let the country heal. I am not sure that isn’t revisionist history, but what I do know is that when I see snippets of him on film, being interviewed or whatever, I do think he seems like a rather nice person. Perhaps had I been older than 4 when he was defeated I might think differently. I do know that as an adult, he seems like a grandfather and decent guy. For all I know he was a jerk and kicked old people and hated puppies…but he seems nice :)

Who knew…

That Valerie Plame was so hot:

http://images.google.com/images?hl=en&q=Valerie+Plame&btnG=Search+Images

Ruby Phrase Book

I didn’t read the whole book, however I was interested in the Ruby one liners section. I browsed over that and it’s funny, but I could think of shell equivalents that did the same thing and were shorter.

Them:

$: ruby -n -e 'print "LINE #{$.}: #{$_}" if /gtk/i' main.rb
 
LINE 1: require 'gtk2'
LINE 7: Gtk.main

Me:

$: egrep -rin gtk main.rb
 
1:require 'gtk2'
7:Gtk.main

Them:

$: ruby -n -e 'END { p $. }' main.rb
 
7

Me:

$: wc -l main.rb
 
7 main.rb

Them:

$: ruby -p -e 'exit 0 if $. > 2' main.rb
 
require 'gtk2'
require './gui/do_gui.rb'

Me:

$: head -n 2 main.rb
 
require 'gtk2'
require './gui/do_gui.rb'

Them:

$: ruby -0777 -n -r md5 -e 'puts MD5.new($_).hexdigest' main.rb
 
7067965ca3973c21012a7a34d682c48d

Me:

$: md5sum main.rb
 
7067965ca3973c21012a7a34d682c48d  main.rb

Them:

$: ruby -0777 -n -r sha1 -e 'puts SHA1.new($_).hexdigest'
 
371dd304bf08bc56e9c09954f31ac439fc9115ee

Me:

$: sha1sum main.rb
 
371dd304bf08bc56e9c09954f31ac439fc9115ee  main.rb

Them:

$: ruby -rnet/http -e 'Net::HTTP.new("nathanpowell.org").request_get("/index.php"){|r| r.read_body { |s| print s } }'
 
< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
...
</html>

Me:

$: links -source nathanpowell.org
 
< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
...
</html>

Anyway you get the point.

I should also say, at least 3 of the Ruby oneliners in the book were incorrect and I had to change them to make them do what the book said they would. After my brief interlude with it, I don’t recommend you buy it.

« Previous PageNext Page »