Monday, August 27, 2012

Predestination Book

I have consolidated my blog posts regarding predestination into a book.

Predestination - A Survey of Scripture

Lulu (PC and Mac EPUB, paperback)
Barnes & Noble Nook Bookstore (Nook eBook)
Apple's iBookStore (
iPhone, iPad, or iPod touch)
Amazon (paperback)

Thursday, November 10, 2011

Grand Rapids Give Camp

My son and I spent a weekend at www.grgivecamp.org.  A great way to give back.  We captured the weekend in this video.  www.youtube.com/watch?v=sF8Hwm7F4vI.

Tuesday, December 7, 2010

Silverlight: Junior Golf Tour Application


The Silverlight application for Premier Junior Tour is now on CodePlex. JuniorTour makes it easier for golf tour operators to publish tournament results for multiple divisions and multiple seasons. You'll no longer have to manually edit player pages, tournament results, or compute rankings. It's developed in C# and Silverlight.

http://juniortour.codeplex.com

Monday, November 29, 2010

C#: Lamda, Closure, Yield and Enumeration

Given the following code in C#:

        IEnumerable<Func<int>> EnumA()
        {
            var ret = new List<Func<int>>();
            for (var i = 0; i < 3; i++)
                ret.Add(() => i++);
            return ret;
        }


        IEnumerable<Func<int>> EnumB()
        {
            for (var i = 0; i < 3; i++)
                yield return () => i++;
        }


        void Test()
        {
            foreach (var funcA in EnumA())
                Debug.WriteLine("A" + funcA());


            foreach (var funcB in EnumB())
                Debug.WriteLine("B" + funcB());
        }


The output is:
A3A4A5B0B2

The enumerator returned by EnumA() is a List.  As a result, the lamda expression (() => i++) is not executed while EnumA() executes.  Changes the lamda expression makes to i are done after EnumA returns.  Because of closure, funcA() begins with the latest value of i, which is 3.

The enumerator returned by EnumB() is implemented using yield return.  As a result, the lamda expression (() => i++) could be executed while in EnumB(), depending on the consumer of the enumeration.  In this example, the lamda expression is executed once (the call to funcB()) while EnumB iterates.  Because of closure, funcB() shares i with EnumB(), effectively double-incrementing i.

Consider pasting the code into Visual Studio and stepping through the execution with the debugger.

These links provide more insight on closure.

http://www.codethinked.com/post/2010/06/22/C-Closures-Explained.aspx
http://diditwith.net/PermaLink,guid,235646ae-3476-4893-899d-105e4d48c25b.aspx

Friday, November 12, 2010

Sailing: Getaway Tips on Lake Michigan


We sail our Hobie Getaway as often as possible each summer on Lake Michigan.  The Getaway is a 16.5’ catamaran with wing seats.  We trailer-launch it directly into Lake Michigan at Weko Beach in Bridgman.  I’ve learned a few things over the years that might be useful for others.
Summer storage
  • Keep the sail, jib, and all sheets in the garage, on a long strip of old carpet against the wall.
  • Leave the side stays connected (and safety wired) to the head of the jib all the times.
  • Keep one paddle threaded under each wing seat.  Just place it under two bungee cords, because it is too hard to get out quickly if you thread it under the whole length of the paddle.  Also, make sure the handle is facing the bow, so you can pull it out backwards by the blade.  Otherwise you have to pull it out forwards and wave may catch the blade.
Preparing to travel to the beach
  • Lay the tiller crossbar along the length of the boat on one side, just overhanging the bow spreader.
  • Lay the jib (with side stays) along the length of the boat on one side, with the foot of the sail just overhanging the bow spreader. 
  • Lay the main sail on the side of the boat, just overhanging the bow spreader, using the connected downhaul to tie it, the jib and tiller crossbar to the bow spreader.
  • Rig the jib sheet, using the excess to wrap the back end of the main sail to keep it from flapping while driving to the beach.  An alternative is to use some furler line.
  • Snap the life jackets around the wing seats.
  • Connect the main sheet.
  • Tie down the mast.  Check the four screws holding the mast float, or use loctite.
  • Put ice and drinks and snacks in one hull cooler.
  • Put dry bag and main halyard in the other hull cooler.
  • The dry bag should contain: marine radio, flares, cell phone, wire wraps, snippers (to cut wire wraps), extra clevis pins, milk jug caps, and cash.
  • Tie a thick 10’ line to the center of the front spreader and wrap around the mast pole on the trailer.  This is all I use to keep the boat on the trailer for the short 2 mile trip to the beach.
Solo rigging in parking lot
  • Untie the main, jib, tiller crossbar.
  • Unfold the wing seats.
  • Plug the hulls.  I know from experience that it is bad if you forget this.
  • Run the halyard through the mast and tie ends together to form a big loop, leaving the halyard on the parking lot.
  • Climb on the boat (by the forward crossbar).
  • Connect the head stay/jib to the mast, using a cable tie to keep shackle pin from turning and loosening.  I am not comfortable using a snap shackle for this critical connection.
  • Use marine ball lock pins (instead of the clevis pins) to connect the side stays – check for tangles.
  • Place a towel (or shirt) between under the mast and over the rear crossbar and slide the mast backwards until the base of the mast is by the mast step ball.
  • Place a milk jug cap on mast ball before stepping mast to prevent squeaking.
  • Double check to make sure the side stays are not tangled and there are no kinks on the mast tang.
  • When needed, use a towel (or shirt) to keep your hands from burning on the hot mast as you raise it.
  • Once the mast is up, grab the main halyard loop, swing it around a side stay, and quickly walk forward before mast falls backward.  Loop the halyard around the trailer mast post to keep the mast up while connecting the forestay.
  • While squatting on the front trampoline, place the furler on top of one knee, using the knee to keep the furler as high as possible, connect the forestay using a ball lock pin.  It is helpful to use a little tape to keep the two adjusters on the forestay together.
  • Untie the halyard from the trailer and lasso to a cleat at the base of the mast.  Otherwise the halyard will blow in the wind and you will look silly trying to catch it later.  Also, if you leave the halyard connected to the trailer, all kinds of problems happen when you try to push the boat off the trailer.
  • Connect the tangle preventer.
  • Disconnect the trailer light cable.
Launching:
  • Untie the 10’ line from the trailer, but leave it tied to the front spreader.
  • Float the boat off the trailer, keeping hold of the 10’ line.  If the waves are rough, don’t back the trailer into the surf, but time the waves and quickly push the boat off the trailer.
  • Turn the boat around in the water (can be a chore if the surf is rough) and back it onto the beach, pointing into the (offshore) wind.
  • Attach the rudders and tiller crossbar, connect the jib sheets, tighten the battens, raise the main, store the halyard, connect the main sheet, and attach and tighten the downhaul.
  • Make a mental note of all swimmers, and wait as long as needed until they clear.
  • Push and then quickly board from the back of the boat – but be careful of the tiller arms.
  • If the surf is rough, two strong paddlers at the forward crossbar (not at the front spreader) can save a lot of embarrassment.
Sailing
  • Keep an eye on the weather, squalls come really fast.
  • When going even slightly downwind with a brisk breeze, keep the weight on the back of the boat to keep the tips of the bow from going under a wave.  Be real careful when heading up from this position too.
  • When tacking, be sure to pull the jib and the main in real tight before heading to wind.  Shift sides when the main goes limp.  While changing sides, uncleat the main.  Let the jib get backwinded to help turn the boat until you are comfortable you made the tack.
  • Move the 10’ line to the rear crossbar, dragging it in the water.  One at a time, allow a swimmer to hang on and get dragged behind the boat.  It is considered rude not to remind the swimmer to tighten bathing suit drawstrings.
  • To board the boat, the swimmer hangs by their arms from a wing seat, next to a side stay, facing the stern.  Then the swimmer places both heels (one at a time) onto the top of the hull and arches their back, and swings their body onto the boat.
  • When beaching the boat, be sure to have enough weight in the back to keep the rudders from coming out of the water if the wave you are riding gets past you.
  • Release the sails and pull the boat completely on shore, lift the rudders, then lift the bow and turn it into the wind.
Sunset
  • Get off the lake one hour before sunset.  It’s the law without lights, plus the wind usually dies just about then anyway.
  • For two or more people, leave the mast on the boat.  For solo on a wavy day, take the mast off to reduce the weight.
  • Float the boat with the current and then push onto the trailer from the rear and the right time.  If there are decent size waves, solicit help for this tricky operation.
  • Once on the parking lot, solicit help from someone to unpin the forestay while you stand behind the mast.  Lower the mast by walking backwards on the trampoline.
  • Clean up the mess.

Wednesday, November 10, 2010

Proof

Indefensible claims are rampant, as demonstrated by this sentence.  When people make a claim, I always wonder, how do they know?  How do they know that their favorite form of government is best, or that their view of morality is right, or that their god exists?  Most answers fall short of proof.  An appeal to common sense, an appeal to history, an appeal to the majority opinion, or an appeal to empirical evidence is not a proof.

Logically, a proof is defined as a sequence of steps that argue from axioms to the proposition.  Axioms are not to be proven, they are basic.  For if you set out to prove an axiom, it would no longer be an axiom, but rather a proposition to be proven by other, more basic axioms.

So, what are your axioms?  Is it that common sense is the foundation for truth?  Is it that the majority is always right?  Is it that today’s scientific theories can be trusted not to be overturned tomorrow?

I have accepted Scripture as my axioms.  From this I can prove Solomon was at one time prince, being as he was, the son of King David.  I can also know that it is right for me to call you to repentance and accept Christ as your Lord.

So, what are the logical implications of your axioms?  Is there such a thing as absolute, timeless truth?  Is there a purpose to your life beyond hedonism?  What is the purpose of the history you studied?  What is your guide to ethics?  I urge you to write this out and ponder it.  Now.

Under your axioms, was Bertrand Russell right when he said that the significance of man's history would be lost under the great march of the cosmos, and we have no choice but to accept “unyielding despair”?

I urge you to repent and accept Christ as your Lord.