I just joined the Biggest Loser - Pound for Pound Challenge. I pledged to lose 8 pounds by event end ( I think it's in June ). Anyway, hope this helps me and some family in the community.
Pound for Pound Challenge Home
Pound for Pound Challenge
Tim Harsch, Wednesday, January 13, 2010The Last Carnegie Ride?
Tim Harsch, Saturday, January 9, 2010Kyle and I went riding at Carnegie (near Livermore,CA) this morning for what may be the last time... I certainly hope not, but they plan to close it, I think, next week, for what might be a permanent closure.
They had most of Corral Hollow Creek closed off (this is the area close to the rode and near the entrance to the park). But, otherwise with the fog keeping the ground a touch wet the traction was great, and the temperature was about 50 degrees. So, the conditions were near perfect. I sure hope they don't close this park for good: So many families have had great times there.
I've always felt that the dirt biking community is a small community, full of hard working folks who can barely speak up for themselves and are often picked on by larger communities like environmentalists. Don't get me wrong I'm more green than many but environmentalists have so many bigger fish to fry. Unfortunately, they have trouble battlign the big boys like gas companies and automobile makers. So, it's just easy to get a few wins against the little guy.
For more info see:
http://www.sharetrails.org/releases/media/?story=671
Vote to keep it open here:
http://carnegieforever.org/
Why engineers and motorcycles don't mix
Tim Harsch, Monday, January 4, 2010Wait, I'm an engineer (software engineer :-) and I ride motorcycles... maybe the title of this blog entry should be "sometimes engineers and motorcycles don't mix". That would have applied to me a few times I can think of...
Triplet class
Tim Harsch, Wednesday, December 30, 2009I wrote a Triplet class, it seems general purpose enough to share, so here it is:
package harsch.sandbox;
import org.apache.commons.lang.builder.CompareToBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
/**
*
* @author Tim Harsch
*
* @param <L>
* @param <M>
* @param <R>
*/
public class Triplet<L, M, R> implements Comparable<Object> {
private final L left;
private final M mid;
private final R right;
public R getRight() {
return right;
} // end getter
public M getMid() {
return mid;
} // end getter
public L getLeft() {
return left;
} // end getter
public Triplet(final L left, final M mid, final R right) {
this.left = left;
this.mid = mid;
this.right = right;
} // end constructor
public static <A, B, C> Triplet<A, B, C> create(A left, B mid, C right) {
return new Triplet<A, B, C>(left, mid, right);
} // end factory method
@Override
public final boolean equals(Object o) {
if (!(o instanceof Triplet<?, ?, ?>))
return false;
final Triplet<?, ?, ?> other = (Triplet<?, ?, ?>) o;
return equal(getLeft(), other.getLeft())
&& equal(getMid(), other.getMid())
&& equal(getRight(), other.getRight());
} // end method
public static final boolean equal(Object o1, Object o2) {
if (o1 == null) {
return o2 == null;
}
return o1.equals(o2);
} // end method
@Override
public int hashCode() {
return new HashCodeBuilder(17, 13).append(this.left).append(this.mid)
.append(this.right).toHashCode();
} // end method
@Override
public int compareTo(Object o) {
Triplet<?, ?, ?> other = (Triplet<?, ?, ?>) o;
return new CompareToBuilder().append(this.left, other.left).append(
this.mid, other.mid).append(this.right, other.right)
.toComparison();
} // end method
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append('<');
if (left == null) {
sb.append("null");
} else {
sb.append(left.toString());
} // end if
sb.append(',');
if (mid == null) {
sb.append("null");
} else {
sb.append(mid.toString());
} // end if
sb.append(',');
if (right == null) {
sb.append("null");
} else {
sb.append(right.toString());
} // end if
sb.append('>');
return sb.toString();
} // end method
} // end class
UPromise
Tim Harsch, Tuesday, December 29, 2009I use a service called UPromise, which I think any parent planning for a college education should use. You can simply sign up and then register a credit card that you use with them. From that point forward, any purchases that you make with any of their affiliated sites will get you a percentage kick back, which goes into your Account and can be transfered to a 529 college account. The nice part is it costs you nothing and you would be making the purchase anyway, so why not get the extra points. Oh, and it doesn't matter if your credit card already earns you miles, points or cash back. You get the college savings anyway!
Java Maps Inline Initialization
Tim Harsch, Tuesday, September 15, 2009I found a blog sometime back at
http://nileshbansal.blogspot.com/2009/04/initializing-java-maps-inline.html
It shows how to inline initialize a Java map, like so:
Map
put("Harry", "Potter");
put("Ron", "Weasley");
put("Hermione", "Granger");
}};
I find myself forgetting the exact syntax if I haven't used in awhile so I thought I would blog it :-)
An alternate way is using Google collections:
Map<String, String> map = ImmutableMap.of( "x", "y" );
More Shocker
Tim Harsch, Friday, August 21, 2009Work on the shocker continues. Check this out!
