Friday, August 31, 2007

Kids ride a zip line to school

Kids ride a zip line to go to school. Click and goto the video.

Jeff Thompson sent me this link. As a parent this scares me quite a bit, but the kids doing it seem to be enjoying it. Watch the video.

Advice on preventing Identity Theft

Today I received an email from Ellen Richey containing a letter that was supposedly sent from a company attorney to employees to help them prevent identity theft.  This may be true.  If so the attorney simply sent the recommendations from The Consumer Law Group web site FAQ.  It has some good advice, you can find it on the web at http://www.theconsumerlawgroup.com/faq.cfm.

Bicycle Crash

I was riding to work yesterday morning and the right pedal of my Dahon Speed D7 sheared off. The metal post for the pedal broke off.  This happened when I was in 7th gear going fast and hit a hill and then stood up on the pedals.  The pedal snapped and I went down.  Luckily I was helmeted and suffered only road rash and a light headache.  I work with a bunch of Mechanical Engineers (www.cocreate.com) and after examining the broken pedal they concluded that the part had a manufacturing flaw.  I would hope so, since the bike has only been used for three months and I only weigh about 130lbs.  When I was filling out my warranty form online (thought it would be prudent to be in the system before I show up at the bike shop today), I noticed that there was a small sticker down by the serial number that said “Assembled with parts made in the U.S. and China”.  Makes me wonder if this part was not suffering from what is now becoming the “China” syndrome of poorly manufactured products.  I will keep readers up to date as I find out more.

I still like the bike a lot, just not sure I trust it.

Wednesday, August 29, 2007

Object Oriented Design (OOD) Patterns: The Retriever Pattern

I find myself using this pattern quite a bit in my Java coding for CoCreate and I decided to name it the “Retriever Pattern”. Now it might have another name but, I have not seen it published anywhere. The retriever pattern is an optimistic getter. Here is how it works.

Algorithm:

- Given a reference to a data source.

- Get the data and cache it locally.

- When asked for the data, check to see if the data can be retrieved again.

- If not return the local cached value.

Uses:

- The object providing the data is out of scope.

- The database result has gone out of scope.

- The object providing the data is synchronized and you may deadlock.

Cautions:

- A retriever is not as reliable as a listener. If a data value has been updated, the update will not be seen until the data next retrieval.

- A retriever will not update once the source data object goes out of scope. From that point forward it is static.

Advantages:

Using a retriever there is no need to worry about objects going out of scope in the middle of a presentation of the data. I have found this very useful in web services when creating a soap response from database data. I can reliably close out the database connection, and perform other business logic, prior to assembling the soap response object. The soap response object can be assembled as if the original database object was still in scope.

The same business objects can then be used in a fat client where the underlying data objects will not go out of scope. This simplifies coding and encourages reuse of the same business logic in the fat client as well as the web services.

Sample: A simple Java Retriever class that uses a week reference. I use these a lot to keep our systems at CoCreate from having garbage collection issues. All the JavaDoc and sample files can be found at http://www.davegraham.org/samples/javadoc/





package org.davegraham.retriever;

/**
* Used in a Sample of the Retriever pattern. Consider this your persistent storage class.
* See PersistentDataStorage.java source file.
* @author DaveGraham.org
* @version 1.0
* @since JDK 1.5
*/
public class PersistentDataStorage {
private static String mockDatabaseStore;

/**
* Used to read the value from the persistent data storage area.
* @return The current value stored in the storage area
*/
public static String read() {
return mockDatabaseStore;
}

/**
* Used to write data into the persistent data storage area.
* @param value The value to store in the storage area
*/
public static void write(final String value) {
mockDatabaseStore = value;
}
}


package org.davegraham.retriever;

/**
* A sample business object bean for understanding the OOD Retriever Pattern.
* See BusinessObject.java source file.
* @author DaveGraham.org
* @version 1.0
* @since JDK 1.5
*/
public class BusinessObject {

/**
* Constructor and initializer for the sample business object.
* @param value The value to initialize the business object
*/
public BusinessObject(final String value) {
this.setValue(value);
}

/**
* A getter to obtain the value as used by the business object.
* @return a string value from the business object
*/
public String getValue() {
return PersistentDataStorage.read();
}

/**
* A setter to set a new value into the business object
* @param value the new String value for the busines object
*/
public void setValue(final String value) {
PersistentDataStorage.write(value);
}
}


package org.davegraham.retriever;

import java.lang.ref.WeakReference;

/**
* A sample class that implements the OOD Retriever Pattern for
* a weakly referenced object.
* This retriever pattern object is constructed around a BusinessObject
* in such a way that the BusinessObject may go out of scope
* and the retriever will continue to return "reasonable"
* results about the value within the BusinessObject.
* See Retriever.java source file.
* @author dgraham
* @version 1.0
* @since JDK 1.5
*/
public class Retriever {

private final WeakReference weakReference;
private String cachedValue;

/**
* Constructs a retriever pattern object around a BusinessObject.
* @param businessObject The busines object from which to retrieve data
*/
public Retriever(final BusinessObject businessObject) {
weakReference = new WeakReference(businessObject);
cachedValue = businessObject.getValue();
}

/**
* Returns either the current value or the last known value
* that was contained in the BusinessObject. This is the
* retriever pattern at work.
* @return the retrieved value
*/
public String getValue() {
BusinessObject strongReference = weakReference.get();
String result;
if ( strongReference == null ) {
result = cachedValue;
} else {
result = strongReference.getValue();
cachedValue = result;
}
return result;
}

/**
* Gets the WeakReference to the BusinessObject.
* Normally this would not be exposed in a retriever pattern.
* It is exposed here to demonstrate in the RetrieverTest unit
* tests that the garbage collector has indeed flushed away
* the BusinessObject reference.
* @return the WeakReference to the BusinesObject
*/
public WeakReference getWeakReference() {
return weakReference;
}
}


package org.davegraham.retriever;

import junit.framework.*;
import java.lang.ref.WeakReference;
import org.davegraham.retriever.*;

/**
* These tests demonstrate the advantages and disadvantages of the retriever pattern.
* They exist only as a sample for people to understand the retriever pattern.
* See RetrieverTest.java source file.
* @author DaveGraham.org
* @version 1.0
* @since JDK 1.5
*/
public class RetrieverTest extends TestCase {

public RetrieverTest(String testName) {
super(testName);
}

public static Test suite() {
return new TestSuite(RetrieverTest.class);
}

public static void main(String[] args) {
junit.textui.TestRunner.run(suite());
System.exit(0);
}
/**
* This test demonstrates the basic operation of the retriever pattern.
* It shows that even after the business object has gone out of scope
* the retriever keeps working and returning the last known good value.
*/
public void testBasicOperationOfRetriverPattern() {
BusinessObject businessObject = new BusinessObject("apple");
Retriever retriever = new Retriever(businessObject);
assertEquals( "Initial value incorrect", "apple", retriever.getValue());
businessObject.setValue("orange");
assertEquals( "Current value incorrect", "orange", retriever.getValue());
businessObject.setValue("bannana");
assertEquals( "Current value incorrect", "bannana", retriever.getValue());
businessObject = null;
System.gc();
assertNull( "WeakRefrence should have been cleaned up by garbage collector", retriever.getWeakReference().get());
assertEquals( "Last known value incorrect", "bannana", retriever.getValue());
assertEquals( "Last known value incorrect", "bannana", retriever.getValue());
}

/**
* This test demonstrates where the retriever pattern fails.
* A retriever is not as strong as a listener so it does not get
* notified of new values. It can only return the last known good value.
* This demonstrates that retrievers are best used in conditions where
* its life time beyond the existence of its source (BusinessObject) is
* not expected to be long.
*/
public void testTheFailureOfTheRetrieverPattern() {
BusinessObject businessObject = new BusinessObject("apple");
Retriever retriever = new Retriever(businessObject);
assertEquals("Initial value incorrect", "apple", PersistentDataStorage.read());
assertEquals("Initial value incorrect", "apple", retriever.getValue());
businessObject.setValue("orange");
assertEquals("Initial value incorrect", "orange", PersistentDataStorage.read());
assertEquals("Initial value incorrect", "orange", retriever.getValue());
businessObject.setValue("bannana");
assertEquals("Current value incorrect", "bannana", PersistentDataStorage.read());
assertEquals("Current value incorrect", "bannana", retriever.getValue());
businessObject.setValue("grapes");
businessObject = null;
System.gc();
assertNull("WeakRefrence should have been cleaned up by garbage collector", retriever.getWeakReference().get());

// This is the important part! Examine these two lines!
assertEquals("The PersistentDataSorage is the last value set.", "grapes", PersistentDataStorage.read());
assertEquals("Last known value is not the value in the PersistentDataSorage", "bannana", retriever.getValue());
// A listener pattern can solve this problem. But listeners create there own problems particularly
// when it comes to garbage collection. The retriever pattern is very friendly to out-of-scope problems.
}
}

Tuesday, August 28, 2007

How to purchase a used car or van at 25% below Blue Book

I stumbled upon this trick just last week and thought I would share it.  I purchased a 2001 Chrysler Town and Country Van that had an average Blue Book value of ~$8750 for $6300, a 28% savings.  Here is the secret:

 

You want to purchase from a small independent rental car/truck business.  Most franchise rental agencies have special car purchase and sale arrangements with car manufactures and dealers.  They will only keep the vehicle a year or two at most and sell it through their network.  A small independent rental business has more incentive to get the most out of their vehicles.  In our case, the van in question was a 2001, had been used 6 years and had just turned over 100,000 miles.  The 100,000 mile mark seems to key indicator as to why this rental company was ready to let go of the van.

 

Before you buy, pretend to need to rent.  Go by the local independent car/van rental location, scope out the situation; see if they have any candidates that they many want to turn over in the near future.  In our case, we actually needed to rent a van.  Our old van the AC was broken and this summer we wanted to go on a weekend away with my parents.  We were looking for a cheap rental price and knew that an independent rental business would likely be much cheaper than the franchises.  The first place I called did not have any vans available.  The second place I called, which was primarily known as a U-Haul renter did.

 

This is important to note: The business we purchased from was primarily known for renting U-Haul equipment.  They also rented pickups and vans along with SUV’s with towing hitches to allow you to rent both a vehicle and a trailer if you wanted.  So don’t discard these types of places from your list of potential sellers.

 

As it was, we rented the van, drove it for 400 miles that weekend and returned it.  Upon returning it, my wife asked if they were going to sell it anytime soon.  The guy said they had been considering it.  My wife left our name and phone and said we would be interested.

 

Now this is another curious point.  We had actually rented the van so we had a high degree of confidence as to how it would perform.  I suggest that after isolating a potential sell/buy vehicle (remember ~100,000 miles) that you may want to rent it for a day to see how it performs.

 

When the business called a month or so later to indicate that they were ready to sell, the owner offered the direct wholesale cost of the vehicle.  I speculate that the reason for this approach is simply that he wants to minimize the effort to move the vehicle on.  This is the value of the vehicle if he were to have sold it into a dealership as a used car.  This value was $6500 for our particular van. Remember the business makes its return on investment on the rental. The end of rental sale is not a particularly large contributor to the overall profit generated by the vehicle.

 

Not one to purchase a vehicle without having a mechanic inspect it, I asked if we could take it to an inspection.  The answer was yes.  I stopped by and picked up the keys and drove it over to the mechanics.  This is the great think with doing business with an independent car/van rental agency.  He never asked for ID or anything, just gave me the keys and asked about what time I would be back.

 

The mechanic turned up about ~$950 worth of work that the van needed.  Quite a bit of the work was stuff that would normally be done at 100,000 miles.  I think this is the primarily motivator for independent rental agencies to sell at this point.  The mechanic was also nice enough to work up the average Blue Book value of ~$8750 (this includes the high mileage discount).  He did that with me over at the checkout counter averaging the retail value and trade in value of the van.  He also mentioned that it needed new tires.

 

The final deal: Armed with the knowledge from the mechanic I counter offered.  He would not give credit to the mechanical maintenance, but did concede some of the cost for new tiers and the final price was $6300. The final value was 72% of the average blue book value.

 

My suggestion is simply look for that 100,000 mile candidate at your local independent auto/van/truck rental business.  Rent it for a test drive.  Indicate that you have interest in a purchase.  Have it inspected. Leverage the information you have. Then do the deal.

 

One last note:  The van has 104,000 miles on it. My friend Arne has a van with 104,000 miles he is thinking of selling.  It is a KIA, a van that is in a lower price category.  It is a 1997 van while the one from the rental business is a 2001.  This indicates that the rental vehicle managed to put on miles 66% faster than the family owned van.  The take away is that the body condition of the rental van is much better than the family owned van.  Six years of regular vacuuming compared with ten years of children and dogs (cracked windshield, broke radio, stains in carpet and seats).  If I am going to purchase a van at the 104,000 mile use point, the x-rental van seems to be a great deal.

Monday, August 27, 2007

How did Al Gore appear at the Tokyo and New York Live Earth Concerts without a lot of CO2 from Air Travel?




Al Gore who was the host of the Live Aid concerts appeared upon the stage at the Tokyo concert as well as the New York concert. How did he do it without a flight half way around the world that would have produced large amounts of CO2? Holography! The holographic image of Al Gore was projected onto the stage at the Tokyo concert. The image appeared to the audience to be in 3D and he was able to speak and make hand gestures and directly address the audience. The technique used by Musion Eyeliner to create there holography is a technology that I believe will become more and more cost effective with time. Read about it at their web site. It continues to emphasize a point I believe is rapidly becoming reality. You do not need to be a world traveler to be a world citizen. The future continues to show that worldwide collaboration will not require the energy needed for travel. How much money are companies unnecessarily spending on travel? How much are they contributing to Global Warming?


Friday, August 24, 2007

Did Sputnik launch your dreams -- or your career?

Today I filled out American Public Media’s survey entitled “Did Sputnik launch your dreams -- or your career?”  Although I was not born yet, it very much effected my path in life.  Here is what I had to say.

 

What story can you tell, if any, that embodies Sputnik's effect?

 

Only that in 1972, I was 5, my father and I went out and looked at the full moon from our front porch and told me that right then there were men walking on the moon.  I never forgot that.  The whole thing was triggered by Sputnik

 

What in your career and life can you trace back to the Sputnik launch?

 

In 1985, I went to Florida Institute of Technology to study the Space Sciences.  In 1990, I started work as a contractor for NASA.  I am a product of the Space Age.

 

In your experience and observations, what are the specific, lasting effects of Sputnik (cultural, technological, etc.)?

 

The whole modern Science Fiction genre got it start during that time of the space race.  Young people like myself were fired up with visions of colonies on the Moon and Mars.  In many ways, those of us of the X-generation that grew up in the wake of the space race feel that the government ripped us off.  There was some serious failure to carry through to the next level.  Now that we are older and have our own money, some of us are saying "to hell with the government" and now you see the fledgling new space craft and space travel private industry.  I think if you were to interview many of the players in this new private race to space you would find them disillusioned by a lack of government follow through on the dream of bringing humans to space.

 

How would you compare/contrast America's response to Sputnik and its response to today's threats of global terrorism, a rising China, or global warming?

 

Modern US society is one of entitlement.  There is no such thing as sacrifice in our cultural system.  I see this in the unwillingness for others to kick in cash(taxes) to support the war.  Even though I disagree with the war, I think only a small percentage of Americans are actually sacrificing for it.  I think our managers (not leaders - there is no leadership in the White House) are content to not force the point in fear of losing more support.

 

Back to the question at hand.  I think we need a mobilization on the Global Warming thing.  Where are the leaders?  Can America change course to one that involves sacrifice?  The space race was a great technical accomplishment.  I think WW2 was a better example of a people coming together to achieve something large.

 

The rise of China is of little worry to me.  I know that they will be the next world super power.  The US will take a back seat with Russia and the EU.  The reason this is coming about is simply because they are willing to lead.  The US is unwilling to lead the world.  It has turned in on itself.  Always concerned with the “best interest of the US”, we will never lead the world again until we can really engage with interests outside of the US.

 

As for global terrorism:  The US approach is to smother the fire in coal.  Until we stop feeding weapons to unstable areas thinking that will stabilize it. Until we stop treating others as second class people.  Until we stop trying to impose the "Right" way of doing things.  People will continue to resent us.  Only fighting poverty, creating economic opportunity, ending hunger, encouraging human rights, and acknowledging of the great contributions of other cultures, will we get some traction in the world.  Could we start such a project on the scale of the space race?  I would hope so.

 

Wednesday, August 15, 2007

Black backgrounds on web pages?


Lauren Spangler-Young sent me a email about Blackle.


The email claimed:



"This is something we should all implement....


If Google had a black screen, taking in account the huge number of page views, according to calculations, 750 mega watts/hour per year would be saved.


In response Google created a black version of its search engine, called Blackle, with the exact same functions as the white version, but obviously with lower energy consumption:


Spread the word... use http://www.blackle.com/"




There is some infomration in Wikipedia.



"The principle behind Blackle is based on the fact that the display of different colors consumes different amounts of energy on computer monitors.[3] The creators of Blackle cite the US Department of Energy’s Energy Star information page which states that a monitor displaying white uses 74 watts, while a monitor displaying black uses 59 watts. [4] They also cite a 2002 study from Roberson, who tested a variety of CRT and LCD monitors and found that an all black screen consumed less energy than an all white screen on all of them.[3] ..."


The Citicism Section says:


"The creators of Blackle have been criticised for lack of clarity regarding the type, size and manufacturer of monitor that the power usage claims refer to.[4] One critic, a technology journalist who reviews computer hardware, tested 4 cathode ray tube (CRT) monitors and 23 liquid crystal display (LCD) monitors, and found that power was saved by the CRT monitors, but was less than that claimed by the blog post that inspired Blackle. The LCD monitors tested showed increased power use in the majority of cases, although some of the larger (24 inch) monitors did use less power displaying a black screen.[1][5] Despite these concerns, the environmental impact of Blackle is also uncertain, as the 750 MW hours of energy that the original blog[6] claims could be conserved if Google used a black background amounts to about 5 billionths of the total energy consumed annually worldwide."


Appears that black may save some energy, but I would suggest replacing CRT monitors with LCD will save more energy.

Tuesday, August 14, 2007

Giant LEGO Person floats up on Dutch resort beach


Thank you Mary Pat Aukema for sending me this story.
A giant LEGO "Minifig" floated up on the beach at the Dutch resort of Zandvoort. Some construction workers fished it out and now it has been installed in front of the drink stand they were constructing. The LEGO person has the words "NO MORE REAL THAN YOU" printed on the front of it's torso and the name "EGG LEONARD" and the number "9" on the back. A quick video available at Reuters.

Wednesday, August 8, 2007

Letter to Barack Obama

I sent this letter to Barack Obama today.  I seem to have come to the conclusion that he is America’s best bet at this point.

 

Dear Barack Obama:

The formula for a wining campaign:

Assemble a “Dream Team” cabinet now and run the Team.

The job of president is so big, that the president has a cabinet to help him with policies and decisions.  His choices say a lot about his leadership style.  Gorge W. Bush has surrounded himself with a few power brokers and a bunch of yes men.  America can see that!  And we do not want it.

My suggestion is simple.  Build a “dream team” of the best of the best right now.  For example: Bring in an expert on security to be your Secretary of Homeland Security after the election.  Put that person on the campaign trail and build American confidence in a vote for you is a vote for good security.  Then find an expert for Secretary Commerce, think big, perhaps invite Alan Greenspan.  There is a name that Americans will get behind.  Keep doing that until you have an unstoppable team.

Be diverse in your selection; remember America is fed up with Yes Men in the administration. We want competent people who can debate the merits of Government Programs.  Dare to cross party lines.  I would suggest bringing back Collin Powel.  A person who many of us Americans believe has a great deal of integrity and got screwed by the Bush administration.

The goal: Create a group of leaders who are diverse enough to have broad appeal and determined to lead this country forward (most Americans feel stagnated).  Have this group assembled early in the election cycle and put them on the road as surrogate candidates.  Build America’s confidence in each area of expertise so that even if they are not sure if you personally have a plan, they believe that you have surrounded yourself with great individuals who can work out a plan.   A plan that is balanced and fair that has had the input of diverse opinions.

I like your campaign and believe your relative youth in the system allows you to break norms.  No one has ever tried to run a full executive team for President before.  I think the first person who does will dominate the election cycle and forever change how US Presidents get elected.

Who am I? I am Dave Graham an individual who has a personal interest in the study of leadership.  I have many more ideas around this concept; let me know if you are going to pick it up.  Please feel free to call me at (970) 484-4577. I am happy to talk with your campaign staff. 

Dave Graham

 

 

 

Monday, August 6, 2007

Live Edge Electronic Design Competition


My friend Gregg Osterhout sent me a link to the live-edge electronic design competition. Thanks Gregg! He knows that I am looking for examples of design competitions and open source design projects as I continue to work on the System Big Play project. This competition seems to be more design to generate traffic to a group of affiliated online electronic parts vendors. I like the sentiment though. It is a great marketing ploy which has the kind of value appeal that will likely get people to participate. Check it out on the web site http://www.live-edge.com/info/index.html.

Wednesday, August 1, 2007

The Darjeeling Limited

Producer Wes Anderson is the nephew of Jim Hunter who is a team member of mine at CoCreate. He showed us the trailer of Wes' latest project, The Darjeeling Limited. It looks like it will be a fun film. Great job Wes!