Black Belt Factory: a great way to learn and show off what you know!

Not long ago I stumbled accross a community driven certification site called Black Belt Factory.  I've always enjoyed participating with the community over various software engineering topics but Black Belt Factory is not like any other community site I've been involved with.  The most interesting thing to me is how Black Belt Factory creates a place where exams and courses for said exams can be created by a community of developers and is constanty improved upon by past and present exam takers. For instance, you may be taking an exam for say Java Fundamentals and when the exam is completed you have an opportunity to report problems with any question you were presented during the course of the exam.  Exam questions are taken from a pool of questions designed, refined and voted on for inclusion, by the community.  As a reward for contributing to the exams and other social funcitons of the site you are allowed to take additional exams.
Black Belt Factory contains a wide variety of topics such as: Java, tooling, XML, Groovy, etc.

When you join Black Belt Factory you are given a profile, and your exam progress and community participation are tracked by your profile.  As I have been job hunting recently I've noticed some employers ask for URLs showing your internet presence or demonstrating work you've done.  Your Black Belt Factory profile could be an excellent submission there.  Building a strong profile showing all the topics you've studied and all that you've given back to the community can be a notable feather in your cap.

Anyway, if you need to study for any upcoming exams or are just looking to establish what you know, I highly suggest getting involved with the Black Belt Factory community.

Harsch Family at Stepping Out to Cure Scleroderma 2010


Wow! What an event the Stepping Out to Cure Scleroderma event was… We all had a lot of fun and with the help of 25 sponsors, friends and family, we managed to raise $1301!! (With 2 more donations on the way). Thanks to all your support, it turns out we were the 5th largest independent fund raiser for the event.


The walk itself was great. The kids and I walked the 2mi together (I mistakenly called it a 2K earlier). Cole, who had just beat a virus he had for the three days prior, walked about a half mile and then wanted in the stroller. Mason, dragged a little in the middle, but then got really excited at the end and couldn’t wait to cross the line. I was so proud of her. Lori was already at the finish line waiting for us and helped see us through!



Lori enjoyed the 10K run, and it turns out it proved to be her fastest yet. Several of the middle miles were under 10 minutes for her, so she achieved a pretty major milestone during the run. She never ceases to amaze me.

We really wanted this to be a memorable event in memory of my mother so we designed shirts that you can see in the photos. They had the heart graphic you see here which we put on the back, it says “Stepping Out In Loving Memory Of Betty Harsch”. On the front they say “Stepping Out to Cure Scleroderma May, 16 2010”.  I really feel we did a good thing to help those struggling with this horrid disease. Scleroderma, being a rare disease has not received much public support, which means your contributions were direly needed. There were a lot of things we learned about doing fund raisers, and you can bet that next year we will be back at it.

The Chile Enchiladas auction was a big hit.  As it turned out we had a three way tie for the Red Chile dish, so we've decided to make a third.  So, in total the Red Chile dish brough in $150 and the Green Chile brought in $81.12!

This really was a growing experience for us all and we were very happy to be a part of the event.  See you next year!
"A Million Thanks to All Our Sponsors!!"

Harsch Family First Goal Achieved!

Wow!  We've been really blessed with an outpouring of support.  As it stands as of this writing, we've met our first goal of $400, and then some, to total $510!  There is one week left, and we're hoping to rally support from a few others so we're setting a second goal of $800!  Hopefully, if we get some more bids on the enchiladas and a few more donations we can really help the fight against Scleroderma.  Come on friends and colleagues won't you please help out?

Also, our daughter Mason has really taken an inkling to running... she runs with Mom on practice runs and last week she ran 1.75 miles.  She's going to kick my butt on this 2K!!

Red Chile Enchiladas - Auction for Scleroderma

Any of you lucky enough to have had Lori's Red Chile Enchiladas know they are worth their weight in gold!  You, however, only have to be top bidder or second top bidder to get this tasty dish delivered right to your door.  Here's how it works:
* Check out the Harsch Family fund raiser page for Scleroderma for details about our walk, taking place Sunday May 16th.
* Bidding is easy - To bid just add a comment to this blog post with your name and amount. Starting bid = $10.00.
* Top two highest bidders win yummy Red Chile Enchiladas, that feeds four.
* Winners get the dish delivered to their door (must live within 25 miles of Livermore, or be otherwise capable of arranging to get the dish from us) on Sunday May 23rd (or later by arrangement).
* Auction ends Friday May 14th at midnight.  Winners must donate to our fund raiser page by the next day.

You'll help a worthy cause, support families dealing with a dreadful disease, raise awareness and research a cure.... AND enjoy a fine meal.  So, please bid on...

(those not living close enough to participate in the auction, your kind donations to the fund raiser are still appreciated)

[Click here to go to Green Chile Enchilada Auction]


==> Bid in Comments <==
( NOTE: If you do not use an account capable of posting comments below just send me email and I will post your bid for you).

Green Chile Chicken Enchilada Casseroles - Auction For Scleroderma

Any of you lucky enough to have had Lori's Green Chile Chicken Enchiladas know they are worth their weight in gold!  You, however, only have to be top bidder or second top bidder to get this tasty dish delivered right to your door.  Here's how it works:
* Check out the Harsch Family fund raiser page for Scleroderma for details about our walk, taking place Sunday May 16th.
* Bidding is easy - To bid just add a comment to this blog post with your name and amount. Starting bid = $10.00.
* Top two highest bidders win a yummy Green Chile Chicken Enchilada Casserole, that feeds four to six.
* Winners get the dish delivered to their door (must live within 25 miles of Livermore, or be otherwise capable of arranging to get the dish from us) on Sunday May 23rd (or later by arrangement).
* Auction ends Friday May 14th at midnight.  Winners must donate to our fund raiser page by the next day.

You'll help a worthy cause, support families dealing with a dreadful disease, raise awareness and research a cure.... AND enjoy a fine meal.  So, please bid on...

(those not living close enough to participate in the auction, your kind donations to the fund raiser are still appreciated)

[Click Here to go to Red Chile Enchilada Auction]

==> Bid in Comments <==

( NOTE: If you do not use an account capable of posting comments below just send me email and I will post your bid for you).

My Life Forever Changed

I was only about eight. Mom (Betty Harsch) had noticed dryness, chafing and tightness around the webs of her fingers. I remember her looking scared at my father when they discussed it. She saw our family doctor about it, and he, being a small town general practitioner had difficulty recognizing it for what it was. It was 6 months later that she was diagnosed with Scleroderma. She was told by one doctor she had 6 months to one year to live. She lived with it for fifteen years (longer than most) before it finally took her. She had a heart attack. The disease can be systemic and can affect the organs of the body as well, and I guess her heart was the first to go… though she had major problems in her other organs too.

Any disease as crippling as Scleroderma, of course, is horrible and really shouldn’t have to be endured by anyone. But, what some people don’t realize is what it does to families. My father and mother had come from hard working families and had worked hard during their lives, in order to give to their children a better future and to ensure for themselves a decent situation for their retirement years. One would probably consider them upper middle class. Dad was a timber faller specializing in falling trees in hard to get at places or in hazardous situations. Together they owned a retirement home and operated that for 20 years. They had done all the right things in the ways of insuring and protecting themselves with life insurance, home insurance and health insurance. Within 2-3 years, thinking they were well protected, her expensive health care needs would soon hit the cap of what the insurance would cover and that was it, just a letter in the mail. Thank you for 20 years of payments, but you’re on your own now. They would spend the next four years tapping savings, selling the business, selling the assets and finally our home. We ended up in an apartment and on a variety of social welfare programs to get by.

Her suffering and these events forever changed who I am. It has been fifteen years since she died, and I can honestly say there hasn’t been a day gone by I haven’t thought of the disease or the horrible sadness it brought us all.



In this photo you can see her hands, she had no ability to make a fist and could only get thumb and forefinger about an inch from touching, they were little more than useless paddles really. I recall walking in a clothing store with her one year and a woman approaching us stopped some 15-20 feet away, looked at her with her mouth opened and asked quite loudly “My God! What happened to your hands?” My mom replied rather hotly and with even more volume: “The pressure cooker blew up on me!” It would have been hilarious if only we could have forgotten the demon responsible for that interchange. A minute later we left, with her crying softly.

I’ve kept this recollection short and well haven’t divulged too much, you see there are memories for me that are too painful to share here… all I can say is that I wouldn’t wish something like Scleroderma on to my worst enemy. I pray that some day there will be a cure and that no one and no family will ever endure living with this crippling, slowly life draining disease again.

This year, my family and I will participate in the first annual “Stepping Out To Cure Scleroderma.” My four year old daughter and two year old son will walk with me in the 2K fun run. My wife, Lori will run in the 10K timed run. We are asking that our friends, family and contacts find it in their hearts to give as generously as they can by sponsoring us in the event (under my name: http://www.firstgiving.com/timharsch)

My children will never get to meet the spit fire that was their grandmother. But they will learn the spirit of giving by participating in events like these… and hopefully Mom will be with us on that day.

Herbs_Raw15030610 on Flickr - Photo Sharing!

Tonight I scanned in an entire photo album lent to me by my Uncle Herb (my dad's brother and that last living of my Dad's kin). We went to see Herb last summer and I finally got around to scanning the photos. They are still raw, as I'll need to go through them all and crop them out into singles and rotate them and what not, but in any case they are least preserved for now.

This album page has a photo of them next to their motorcycles. Uncle Herb tells me motorcycles are in the blood. I think he's right...
Herbs_Raw15030610 on Flickr - Photo Sharing!

Converting Disconnected Graphs to a Collection of Connected Graphs (revised)

In the original post: Converting Disconnected Graphs to a Collection of Connected Graphs I achieved my goal of converting a disconnected graph into a collection of connected graphs. After some discussion on the JUNG support list I was pointed in the direction of WeakComponentClusterer. Compare this method to the original to see:

* the implementation is now just a few lines of code
* this can be used as a template to provide Collections of other graph types beside just DirectedGraph without having to rewrite the implementation.

Some negatives of this approach over the former:
* it should not perform as well since it first performs some computation to create the vertex set and then performs computation to convert the set into a Collection of graphs. Consequently the set of vertex sets is discarded between the two operations.
* perhaps not a negative but at least notable is the fact that it uses reflection to create a copy of the input graph.

package jung;

import java.util.Collection;
import java.util.Set;

import com.google.common.base.Function;

import edu.uci.ics.jung.algorithms.cluster.WeakComponentClusterer;
import edu.uci.ics.jung.algorithms.filters.FilterUtils;
import edu.uci.ics.jung.graph.DirectedGraph;

public class DisconnectedDirectedGraphToWeaklyConnectedDirectedGraphCollection<V, E>
  implements
  Function<DirectedGraph<V, E>, Collection<DirectedGraph<V, E>>> {
 public Collection<DirectedGraph<V, E>> apply(DirectedGraph<V, E> from) {
  WeakComponentClusterer<V, E> wcc = new WeakComponentClusterer<V, E>();
  Set<Set<V>> vertexSets = wcc.transform(from);
  
  return FilterUtils.createAllInducedSubgraphs(vertexSets, from);
 } // end method

} // end class
And here is a simple test class:
package jung;

import java.util.Collection;

import junit.framework.Assert;

import org.apache.log4j.Logger;
import org.junit.Test;

import edu.uci.ics.jung.graph.DirectedGraph;
import edu.uci.ics.jung.graph.DirectedSparseGraph;
import edu.uci.ics.jung.graph.Graph;

public class TestDisconnectedDirectedGraphToConnectedDirectedGraphCollection {
 private final static Logger logger = Logger
   .getLogger(TestDisconnectedDirectedGraphToConnectedDirectedGraphCollection.class);

 @Test
 public void testSubGraphs() {
  DirectedGraph<String, String> dg = DirectedSparseGraph
    .<String, String> getFactory().create();

  // g1: a connected graph
  uniqEdge(dg, "A", "B");
  uniqEdge(dg, "E", "B");
  uniqEdge(dg, "B", "C");
  uniqEdge(dg, "B", "D");

  // g2: another connected graph
  uniqEdge(dg, "F", "G");
  uniqEdge(dg, "F", "H");

  // g3: a pair of nodes connected by an edge
  uniqEdge(dg, "I", "J");

  // g4: a loop
  uniqEdge(dg, "K", "K");

  // g5: a weakly connected graph
  uniqEdge(dg, "L", "M");
  uniqEdge(dg, "N", "M");

  logger.debug(dg);

  DisconnectedDirectedGraphToWeaklyConnectedDirectedGraphCollection<String, String> f = new DisconnectedDirectedGraphToWeaklyConnectedDirectedGraphCollection<String, String>();
  Collection<DirectedGraph<String, String>> g = f.apply(dg);
  logger.debug(g);

  Assert.assertEquals("union of disjoint graphs is not the correct size",
    5, g.size());
 } // end test

 private void uniqEdge(Graph<String, String> g, String src, String dest) {
  g.addEdge(src + dest, src, dest);
 }

} // end test class
And here is the output of the test case:
2010-02-25 14:47:51,058 [TestDirectedGraphToDisjointUnionOfWeaklyConnectedDirectedGraphs.java 43] DEBUG - [Vertices:K
Edges:KK[K,K] , Vertices:I,J
Edges:IJ[I,J] , Vertices:F,G,H
Edges:FG[F,G] FH[F,H] , Vertices:L,M,N
Edges:NM[N,M] LM[L,M] , Vertices:D,E,A,B,C
Edges:AB[A,B] EB[E,B] BC[B,C] BD[B,D] ]

Converting Disconnected Graphs to a Collection of Connected Graphs

I recently discovered JUNG, and I have a use case to treat all weakly connected subgraphs of a directed graph as separate graphs. So given any directed graph, be it just one connected directed graph or several connected, strongly connected or weakly connected directed graphs this code will return to you the disjoint union of all graphs as a collection of connected graphs with edge direction maintained from the original.

The code uses implements Function from google collections, since it could be useful to apply this code to a collection of input graphs. Also I just prefer google collections over jakarta. It however does use Jakarta collections as well since that is what JUNG uses.

package jung;

import java.util.Collection;
import java.util.List;
import java.util.Set;
import java.util.Stack;

import org.apache.commons.collections15.Factory;

import com.google.common.base.Function;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;

import edu.uci.ics.jung.graph.DirectedGraph;
import edu.uci.ics.jung.graph.DirectedSparseGraph;

public class DisconnectedDirectedGraphToWeaklyConnectedDirectedGraphCollection<V, E>
  implements
  Function<DirectedGraph<V, E>, Collection<DirectedGraph<V, E>>> {
 private Set<V> visited;

 public Collection<DirectedGraph<V, E>> apply(DirectedGraph<V, E> from) {
  List<DirectedGraph<V, E>> subGraphs = Lists.newArrayList();

  Stack<V> verticesRemaining = new Stack<V>();
  verticesRemaining.addAll(from.getVertices());

  Factory<DirectedGraph<V, E>> graphFactory = DirectedSparseGraph
    .<V, E> getFactory();

  do {
   visited = Sets.newHashSet();
   DirectedGraph<V, E> newGraph = graphFactory.create();
   dfsCopy(verticesRemaining.pop(), from, newGraph);
   verticesRemaining.removeAll(visited);
   subGraphs.add(newGraph);
  } while (!verticesRemaining.isEmpty());

  return subGraphs;
 } // end method

 private void dfsCopy(V v, DirectedGraph<V, E> from, DirectedGraph<V, E> to) {
  if (!visited.add(v)) {
   return;
  } // end if

  for (E e : from.getInEdges(v)) {
   V neighbor = from.getSource(e);
   to.addEdge(e, neighbor, v);
   dfsCopy(neighbor, from, to);
  } // end for
  for (E e : from.getOutEdges(v)) {
   V neighbor = from.getDest(e);
   to.addEdge(e, v, neighbor);
   dfsCopy(neighbor, from, to);
  } // end for
 } // end method
} // end class

And here is a simple test class:
package jung;

import java.util.Collection;

import junit.framework.Assert;

import org.apache.log4j.Logger;
import org.junit.Test;

import edu.uci.ics.jung.graph.DirectedGraph;
import edu.uci.ics.jung.graph.DirectedSparseGraph;
import edu.uci.ics.jung.graph.Graph;

public class TestDisconnectedDirectedGraphToConnectedDirectedGraphCollection {
 private final static Logger logger = Logger
   .getLogger(TestDisconnectedDirectedGraphToConnectedDirectedGraphCollection.class);

 @Test
 public void testSubGraphs() {
  DirectedGraph<String, String> dg = DirectedSparseGraph
    .<String, String> getFactory().create();

  // g1: a connected graph
  uniqEdge(dg, "A", "B");
  uniqEdge(dg, "E", "B");
  uniqEdge(dg, "B", "C");
  uniqEdge(dg, "B", "D");

  // g2: another connected graph
  uniqEdge(dg, "F", "G");
  uniqEdge(dg, "F", "H");

  // g3: a pair of nodes connected by an edge
  uniqEdge(dg, "I", "J");

  // g4: a loop
  uniqEdge(dg, "K", "K");

  // g5: a weakly connected graph
  uniqEdge(dg, "L", "M");
  uniqEdge(dg, "N", "M");

  logger.debug(dg);

  DisconnectedDirectedGraphToWeaklyConnectedDirectedGraphCollection<String, String> f = new DisconnectedDirectedGraphToWeaklyConnectedDirectedGraphCollection<String, String>();
  Collection<DirectedGraph<String, String>> g = f.apply(dg);
  logger.debug(g);

  Assert.assertEquals("union of disjoint graphs is not the correct size",
    5, g.size());
 } // end test

 private void uniqEdge(Graph<String, String> g, String src, String dest) {
  g.addEdge(src + dest, src, dest);
 }

} // end test class

And here is the output of the test case:
2010-02-25 14:47:51,058 [TestDirectedGraphToDisjointUnionOfWeaklyConnectedDirectedGraphs.java 43] DEBUG - [Vertices:K
Edges:KK[K,K] , Vertices:I,J
Edges:IJ[I,J] , Vertices:F,G,H
Edges:FG[F,G] FH[F,H] , Vertices:L,M,N
Edges:NM[N,M] LM[L,M] , Vertices:D,E,A,B,C
Edges:AB[A,B] EB[E,B] BC[B,C] BD[B,D] ]

NOTE: See this follow on post for a revised version

Pound for Pound Challenge



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

The Last Carnegie Ride?

Kyle 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

Wait, 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...