Friday, October 20, 2006

Ask Ms. Dewey

A high school buddy of mine, named John Reid, just lead an effort to launch Ms. Dewey. Our entire lab group had a great time playing with her today. I think the best way to describe Ms. Dewey is to let John do it:

"She's a sassy know-it-all micro site that we've created that serves up some
hilarious video clips to your search queries. She's really smart (she has 3
brains, seriously). You can ask her anything, and she?ll not only know what
your asking, but serve up a snarky (yeh, I said snarky) response."

I personally found that she was oddly accurate with her video clips. She's also got a bunch of easter eggs that were pretty entertaining to stumble upon. I hope a lot of people stumble upon this because it really is a lot of fun to play with!

Monday, October 16, 2006

Solar Cell Efficiency Boost

Interesting approach to boosting solar cell efficiency. In a nutshell, solar cells cannot convert light from the lower end of the spectrum into energy. Some very smart people have figured out how to chemically combine two low energy photons into one high energy photon which can then be used by solar cells to generate electricity. Linked here.

Tuesday, October 10, 2006

log4j and UNIX syslog

I couldn't find Java code examples anywhere on how to get log4j to log to Unix syslog. I'm sure they're out there, but I'll be damned if I could find them. I spent a few hours with log4j today and managed to decode what's going on. Here it is in all it's glory:

import org.apache.log4j.Logger;
import org.apache.log4j.SimpleLayout;

class FOO {

public static void main(String args[]) {
FOO foo = new FOO();

public FOO () {
SimpleLayout layout = new SimpleLayout();
SyslogAppender appender = new SyslogAppender(layout, "localhost", SyslogAppender.LOG_DAEMON);
Logger logger = Logger.getRootLogger();
logger.addAppender(appender);"This is just a test");

I'd write more about how cool log4j is, but I'm under a deadline and have to get back to work...

P.S. If this still doesn't work, then you probably forgot to make your syslog daemon listen to a socket....

Thursday, October 05, 2006

2001 Saturn SC2 PCV Valve

I got my oil changed yesterday at one of those Grease Monkey(TM) shops. They're annoying because they always want to upsell you on stuff (and yet I keep going back). This time they wanted to sell me a PCV valve for about $17.00 and an air filter for about $20.00. I know the air filter was about 4 times cheaper if I bought it myself. As for the PCV valve, I'd never changed one out, but from the looks of it, I knew it was pretty cheap to buy. In addition, they had it out in about 30 seconds, so I knew it wasn't hard to replace either.

Today on my way home from work, I stopped into an auto parts (Auto Zone) store to get a PCV valve and an air filter. The PCV valve cost me about $5.00 and the air filter would have cost me about $5.00, but I opted for the snazzy KnR filter that lasts for the lifetime of the car. I got out of there for about $45.00. For my money, I got a new PCV valve and an air filter that will never need to be replaced. If I'd opted for the Grease Monkey(TM) parts, it would have cost me $37, but I'd still have to replace the air filter every 12,000 miles. I figure if I drive my car for 96,000 miles I'll break even on the KnR filter, although I haven't factored in inflation against the potential ROI if I'd bought the cheap filter and simply invested the other $35. If I always bought Grease Monkey(TM) filters, then the KnR filter would pay itself back in about 24,000 miles.

So anyway... Now that I had this PCV valve, I needed to install it. After a bunch of poking around, I found it sitting right next to the oil cap. It was incredibly easy to replace. I just pulled out the old one and plunked in the new one. Didn't even require any tools.