Sunday, February 23, 2014

Dropbox Arbitration

Dropbox just recently updated their terms of service and one significant change is the inclusion of an arbitration clause.  Arbitration clauses are used by many companies to avoid the hassle and complexity of resolving disputes through the legal system.  Instead, the two parties use a neutral third party (the arbitrator) and agree to abide by what he/she decides.

General speaking, arbitration clauses are not good for consumers.  The arbitrators are almost always chosen by the corporations and most of the "rulings" are in favor of the corporations.  If the arbitrator doesn't decide in your favor, you are without recourse.

Besides, don't we already have neutral third parties to settle our disputes?  I think they're called "judges" and the entire civil legal system is designed to handle such cases.  It can be expensive and time consuming and the issue of "how much justice you can afford" is real but in the very least it is unbiased and therefore more likely to be fair.

It may seem silly but the ability to sue someone is an important legal right.  Civil courts are an expression of democracy, where social status or power are diminished and two parties are put on equal footing before a judge to resolve a dispute.  Even a system like ours which appears at times to have serious flaws is better than the alternative: one where justice is truly up for sale and might equals right.

Dropbox has made this easy for us.  If you don't want to go to arbitration to settle a dispute with them, you can opt out of this arbitration clause.  You don't have to stop using the service and find an alternative.  Just opt out.  By doing so, you give yourself the option of settling any dispute you may have with them in front of a judge not some arbitrator.

Take it from me, a guy who was hit by a car, is glad he doesn't have to sue as a part of the settlement process, but is glad that the option exists.

Saturday, February 08, 2014

Light Renovation

Over the past few days I've been adding lights to some much needed locations.

Under the kitchen cabinets...


... at my nerd desk...





... and in our storage closet



Sunday, February 02, 2014

Preparation for the Storm

The never-wrong weather-man says we're looking at many inches of snow starting in the early hours of Tuesday morning.  Rather than keep the SUV we're borrowing out in the driveway (making clearing the driveway very difficult and effectively trapping the vehicle in), I undertook the herculean task of cleaning up the "shop" half of the garage while my wife was making lunch.  With effort, our two-car garage now holds two cars.  Thankfully one of them is no an SUV.


Saturday, February 01, 2014

Breaking Madden: The Machine is Bleeding To Death

Through customizing the two teams in the video game Madden 25, an adventurous soul sought to create the most lopsided football game in history.  For example:



Letting the computer control the underpowered team resulted in some rather inexplicable behavior.  When you play this far outside the lines of normal, its hard to predict how the AI will respond to such overwhelming circumstances.



As my wife can attest, I've not laughed this hard in quite a while.

Seriously, read the whole thing.

Tuesday, January 28, 2014

First Day of School (Again)

The doctor has cleared me to return to school, good friends are able to give me ride in the morning, and I'm mobile enough that I can get around campus. Its time to get back to work!  Now what was I doing again?

I return to find that the printer is out of toner. In fact, its out of both yellow and black.  I'm betting his means the color printer was effectively a black-and-white printer until the black toner ran out, at which point it became effectively broken.  Last time we ran out of black I was the one that ordered the new toner and the first thing I did when I got in was order a complete set of cartridges.  When later installing them one of my lab-mates commented, "That thing has been broken since December."

My desk is like an archaeological site, with artifacts of the former occupant's life covered in a fine layer of dust. That former occupant is me and though this is all my stuff is mine, I hardly remember it at all.  I see a complex colored diagram I did of some of the system power flows and I remember thinking how useful it was but I look at it now and it puzzles me.  What was so important about this?  I see other scraps of paper with notes on them; are any of these worth saving? What's the number for the phone at my desk again?

I'm recounting the story of being hit by a car with my lab-mates and one of them mentions a class that he is taking this semester.  Its highly related to my research and I think it would be a great class to take.  Is it too late to enroll?  Do I want to officially enroll or just sit in to learn what I can?  I'm not very interested in doing homework and taking tests again and I'm really trying to get done with this degree but how can you pass on a class that is over half of your dissertation? For this week, I'm going to be sitting it in and see how it looks. How do I enroll in a class as an audit?

The clock in the lab isn't working.  Battery ran out?  Actually broken? Its high on the wall over a doorway so getting to it to diagnose the problem could be tricky.

Somebody unplugged/turned off the fridge over the weekend and everybody's food rotted. It stank in the lab until we were able to drag it out into the hallway and let everything air out. Now the microwave, which was on top of the fridge, is living in a chair in a semi-level fashion.

Really, we are all working on graduate degrees here.  I promise.


Friday, January 17, 2014

Data Security

I just got The Email from Target.

Sorry.  The Bad Guys got your name, phone number, email, and mailing address from us.  We know you hardly ever shop here and only ordered that one thing from us online years ago but, hey, we hold onto all that data. We have and now they have it.  You might want to sign up for this credit-reporting service because who know what's going to happen now.

I'm signing up and Target is footing the bill which is the responsible thing for them to do at this point. I hope its not too late as the theft of the data was weeks ago.

We all shop online because of the convenience but convenience has a cost and when it comes to computers, that cost is often in terms of security of data.  Many website that allow/force you to have an account will keep you logged into the site as a convenience to you.  Whenever you go to the site, you enter it already logged in; no password typing.  Of course, that means anybody using your computer will also enter the site logged in as you.  Spouses, kids, person who broke-in and stole your computer, whoever.

And if that site is a retailer, many go the extra mile and will automatically or upon your non-refusal (that is, by default) store your shipping information for you to make checkout easier.  Some will even offer to store your payment information to provide a one-click shopping experience.

Over the course of the past few years, Intuit, the makers of TurboTax has been offering an online version of said software.  Rather than buy a disc and install TurboTax on your computer, you go to their website and do your taxes there.  Being online, they are able to suck in a bunch of data from other online sources and save you some time from manually entering in the data yourself.  To use the software on your computer can, depending on the version you use, cost you more than the online version.

There are a broad range of attitudes and perspectives when it comes to data security.  We each have to decide what level of inconvenience we are willing to bear for a desired level of peace of mind.  But without any experience involving identity theft, it is easy to overvalue the convenience and underplay the risk.  Due to my recent experience of being hit by a car, I imagine it feels similar how I thought about insurance.  It wasn't until I was dependent on the other party's insurance and saw the actual price of emergency medical care did I realize how important insurance was. The financial side of that collision would have played out very differently if the details of our coverage had been slightly different.

I don't know what changes I am going to make in light of this personal data theft.  The data that was stolen from Target is probably enough to do some damage but pales in comparison to what a theft of my tax data would provide access to.  For the foreseeable future, I'm using TurboTax on my computer and not the online version.  With one big exception, I don't have any online retailers store my payment information and I choose to actively log in and out of accounts when I visit various sites and retailers.  The exception is Amazon.  I'm going to have to think long and hard about the convenience/security trade-off there.

I've thought about using my Mac's whole-drive encryption for my home computer.  Any computer made today has enough horsepower to run this service with virtually no loss in performance.  That would provide another layer of protection in case my computer was stolen. I'm going to have to do some more reading on it before I make a final decision.

Even though it is highly related, I don't even want to talk about passwords; that's a whole separate topic.  I'll briefly say I use the Mac's Keychain (and I've mostly been able to get my wife to do the same) and I think everybody else should too.  I've considered going one step further and using a more full-fledged password manager so that all of my passwords are a mess of un-memorizable characters but I'm not sure how that would play out in my life.  I routinely work on two computers and a mobile device and am not sure I how much of a hassle it would be.

See, convenience versus security.  Even nerds have to make choices.

Thursday, January 16, 2014

Christmas Board Games

This Christmas was a board game Christmas.  Virtually all of my gifts were board games and at this point, I have more than enough to keep me busy through the rest of the year. Perhaps even longer.

I've had a chance to play a few of them (though not all) and it is an interesting mix.



I think of this game as Puerto Rico set in space; a lot of the mechanics are similar.  Each player chooses an action that all players will execute but he/she gets a bonus for choosing it.  There are goods that have to be produced which can be turned into victory point or turned into money. Developments can be built that enable a variety of advantages such as greater yields during production or lower cost of expansion.

There are key differences, though, which makes the game far from a re-themed Puerto Rico. Most importantly, the game is a card game which makes it both simpler to manage (fewer bits all over the place) and more complex as the costs and advantages of each card are much more variable.  It kind of feels like a hybrid of a deck-building game where each card adds unique abilities and a role-picking/resource development game like Puerto Rico.

There are other differences which I find as advantages over Puerto Rico.  The game can be played with only two players with no compromises or alternative rule sets.  Once you've got your handle around the iconography, the game plays very quickly, less than 30 minutes for a two player games.  Though I've only played a few games, the possible strategies seem quite varied and of course, with any card game, there are a number of expansions to increase the variety.




Though I didn't get this game for Christmas, it has gotten a lot of play time among me and my friends lately. The first two times we played we used a modified rule set to try to get our handle around the rules.  The third time, a few weeks ago, we played using the full rules and the experience was great. At least I think so, as I was the sole Cylon traitor and despite making a few crucial errors, was able to destroy humanity right as they were about to reach safety.

I feel the game does a great job of capturing the desperation and paranoia of the the television show and I expect it will become a favorite among my friends.  Clearly, though, it is a tough game to learn.  It took all of us six or seven hours of gameplay to feel like we had a handle on it.  The first night we played, we had a string of bad card draws that made the game seem impossible to win and on the second occasion, this time playing without traitors to give ourselves a change, it seemed too easy.  It is due up for another play in the next few weeks and we'll see how that game turns out.



If you've played Apple to Apples, then you understand the basic play of this game.  For Dixit, though, the play revolves around cards with fantastical images rather than phrases or titles.  On a player's turn, he/she picks a card, gives a clue and all the other players contribute cards that they think best match the clue.  Points are awarded if the players guess the clue-giver's card and the non-clue-giver's get additional points if people guess his/her card is the clue-giver's.

The artwork on the cards is evocative and I think the game can really thrive when playing in larger groups with people who are capable of giving obscure and oblique clues.  The game is quick to learn and removes some of the arbitrariness and silliness that Apples to Apples can bring.  (Not there is anything wrong with those; sometimes that's what everybody wants).  I think of Dixit as the artistic, creative, and imaginative party game.


Monday, January 13, 2014

Making a Custom Board for "Power Grid"

I am thankful that I am not the only one out there that likes to modify, improve, and customize my board games. It was my exploration on the web that lead me to build a storage box for my Dominion cards, a similar effort for my copy of Carcassonne, and my latest board-game project: making custom boards for Power Grid.  The game board for Power Grid is a map of country or region with key cities connected by transmission lines.  All these maps are two-sided and the board that comes stock with the game has the US on one side and Germany on the other. There are many expansions you can buy that provide maps for places like Japan, China, and Northern Europe (to name a few).

Those with a more creative drive make their own maps and many have posted the image files for these maps online, freely sharing their work with others.  The quality of the work varies greatly with some appearing nearly as good as those professionally made and other with quality more in line with my own drawing and sketching abilities.  Two circumstances lead me to try to assemble my own custom board using some of the higher quality files I have found.

Circumstance one: a friend of mine had come upon a large-format color printer and needed some material to use for test printing.  He knew I had some larger Power Grid map files and suggested he try a couple of them.

Circumstance two: I was ordering some photo albums for my customary photographic year-in-review and noticed the same vendor offered a product they called "chipboard" which looked suspiciously like the material used to make game boards. I measured one of my existing Power Grid boards and discovered the smaller but thicker version they sold was very close to the correct dimensions.  It was 1/4" too short in one dimension and about 25% thicker but neither one of these was a deal breaker; I was convinced I could make it work.

My friend delivered the prints a few weeks ago and the blank chipboard showed up a week later.  With a little bit of spare time late this past week, I decided to try to put the pieces together and see how it looked.

The first job in making the board was trimming and scoring the board to the correct size.  The board has a quad-fold design which is easier to show than explain:


To make the cuts and scores I used a utility knife with a new blade along with an aluminum straight-edge as a guide.  Both cutting and scoring required three to eight passes but the results turned out great.  I ended-up reinforcing the hinge points on the board with book tape.  I suspect this is not actually necessary but its an easy precaution to take.

Scored and cut game board.


Book tape used to reinforce the hinges.

To mount the prints, I trimmed the margins off of each print and confirmed they would fit on the board.  First problem: the prints were not quite the correct size for the board with both being slightly smaller than desired; additionally, they were not the same size.  In the spirit of making a prototype, I decided to use the prints as is, re-trimming the chipboard to the size of the larger of the two prints.

Once these adjustments were made, I used spray adhesive to carefully attach the prints to the chipboard, one on the front and the other on the back. The alignment of the print to the board was not perfect but it was good enough and probably as good as I could do on my own.  Before the glue had fully set, I used a utility knife with a new, fresh, blade to carefully cut the mounted images along outer-opening fold-lines. (That is, fold-lines that expose the chipboard when folded.)

The final step was applying a protective coating of some kind to keep the surface from being easily damaged during game play.  Upon advice of the internet, I used a polyurethane spray wood finish, applying two or three light coats to each side.  The can says that the finish will "amber" lighter colored objects but most of the board is more darkly colored and thus not worth worrying about.

The final product:





For a prototype, I happy with how things looks. I haven't played on it yet so I'm not sure how it will hold up over time.  The varnish may or may not be thick enough.  The exposed edges of the board may be a problem and fray with use.  (The professional boards fold the image over the edge and attach is underneath the image on the reverse side.) Like I said, though, its a good first try.

Thursday, January 09, 2014

Dog Park in Winter

We've had a fair amount of snow and cold weather here in Wichita over the past few weeks and several times have taken the dogs to the snow-covered dog park near our house.  Almost nobody else is willing to go out in the cold to play but our dogs don't seem to mind.  Basil in particular loves rolling in the snow.






Wednesday, December 18, 2013

Proof Checking at Fedex Office

As part of keeping my Dominion box organized, I print off dividers that a wonderful soul has freely published onto cardstock via FedEx Office nee Kinkos.  The divider's I hadn't printed were for the latest release (Guilds) and so while having other fun Christmas-y stuff printed, I had these done as well.
The results are shown below.


Compare the above to the original file shown below:



Two problems here:
  1. Clearly the file didn't print properly.  Where the name of the card should be in the title banner a black box exists.  No PDF viewer, including the online proofer provided by FedEx office shows this black box so I don't know how it ended up getting printed but it did.
  2. Here is the full text of the pink note attached to the printed document.

    "PRODUCTION REVIEW SAMPLE
    Dear customer,
    I have compared the proof (if applicable), originals and the job ticket, and determined that it meets the FedEx Office standards of quality.
    All subsequent copies were produced to match this sample.
    We appreciate your business and look forward to meeting your needs in the future.
    (Team Member Signature)"

    Knowing that sometimes things get messed up, FedEx Office has a system in place where each print job is examined to ensure that it is getting printed properly and has an employee sign this verification. As the note clearly states, this includes comparing the printed product to the original. I know from trouble-shooting the problem with them after the fact that no digital representation of this file showed the problem, only the printed version.  They had a clear definition of the final product to use in comparing to the printer output and yet kind of blew it.
In my mind, the second problem is bigger than the first. 

Saturday, December 14, 2013

Bad PDF Rendering?

The general publication of the professional society I belong to, IEEE, is their Spectrum magazine.  To make my life easier and less paper-oriented I've elected to receive the publication as a PDF which I often read on my iPad.  In the November issue I noticed an odd typesetting error.  The letters in the body of the text closest to the gray text box seemed to have something wrong. I have so little experience with preparing print-ready publications that I'm not going to speculate as to the cause of this problem.



Friday, December 13, 2013

Mutant Paperclip

Paper clips have been commandeered for a long time to be misshapen and turned into semi-sharp, pointy, pokey tools.  One of the most common uses in the world of personal computers is to reach a recessed reset button, one that the designers wants to ensure could ever to be pressed by accident.  Back when I was in middle school, our first computer came with the instructions to use such a paperclip to get to a manual eject button inside the disk drive. It was a bit scary that the official trouble-shooting procedure involved poking around in the computer innards but that was the way things were done.

Or "are done" I should say.  The receiver for my wireless mouse broke and the manufacturer sent me out a replacement.  The instructions for pairing the receiver to my mouse involved this recessed-button poking but rather than asking me to use one of my own paperclips, they send me one in the receiver package, pre-bent.


(The manufacturer is Evoluent, by the way and I'm using their Vertical Mouse 4 to help reduce strain on my wrist.  The product is great and their technical support was top notch.  I called phone support, a real person answered, and once my problem was described, he knew what needed to happen and sent me out a replacement receiver.  The only downside: I have to drum up a Windows computer to run the mouse-receiver pairing software.)

Thursday, December 12, 2013

Reinstalling a Hardwood Floor - My Solution

I've been spending quite a bit of time thinking about the hardware floor problem my father-in-law handed to me.  At first the problem seemed kind of straight-forward.  There's a pile of pieces of flooring, make sets of pieces whose total length is 184 +/- 1 inch.  As I thought it about it more, though, it became readily apparent that the problem was more complicated than I first thought.

  1. No solution guaranteed - Though the total length of the pieces available sums to greater than the total length needed, there is no guarantee that the pieces come in lengths that will form 20 sets that each sum to 184 inches.
  2. Unique start and end pieces - Certain pieces can only be used as start and end pieces as they have been cut and lack a tongue or groove on one side.  Additionally, there are only 13 starting and ending pieces which means that some pieces with both a tongue and groove (middle pieces) will end up acting as a starting or ending piece.
  3. Cutting may be required - It may not be possible to find a solution EXCEPT if we allow middle pieces to be cut if they are at the beginning or end of a run, effectively making them starting or ending pieces.  If we don't allow for this scenario, we could end up in a situation where there are plenty of pieces left to complete the task, but they are none short enough to fit in the remaining space at the end of each run.  The flip side of the coin is that once a piece is cut, it can only act as a starting and ending piece so only want to cut pieces as a last resort.
  4. Permutations, not combinations - The biggest complication: since once a piece has been used in one run it can't be used in another, this is not a simple combination (order independent) problem but rather a permutation (order dependent) problem. An exhaustive search of the problem space would test not only which groups of pieces sum to the correct length, but the order in which the pieces are tried.  This is necessary because we don't know if a given piece must be joined with specific set of other pieces (a critical set if you will).
My "solutions" to these problems:

  1. No solution guaranteed - I have no actual solution to the "no solution" problem.  I worked under the assumption that there is a solution and wrote my program in such a way that it would stop looking after a predetermined number of attempts.
  2. Unique start and end pieces  - To handle the fact that only certain pieces can be used as starting and end pieces I wrote the program to pick one of each of these to form the basis for each run.  The program then worked to fill in the gap between the two by working from the middle pieces list.  Since the start and end list only had 13 pieces, I padded the list with zeros to bring it up to 20, the number of runs required.  This leads me to...
  3. Cutting may be required - The zero length pieces in the start and end list essentially represent middle pieces that act as end pieces. Furthermore, I allowed for longer pieces being cut down by allowing for runs longer than the strict 184 + 1 inches.  Any middle piece that ended up acting as an end piece would have to be cut down and in situations where dedicated start and end pieces were used in the run, this would make it necessary to cut those down as well.  This would not sacrifice a tongue or groove as the start and end pieces are already missing one or the other.  The larger the allowed deviation from 184 + 1 inches, the more material may have to be cut off from existing pieces.
  4. Permutations, not combinations - Ahhhhh. This was the problem that kept me thinking the most.  trying to find easy ways to add and remove pieces from trial runs, keep track of which pieces were being used, had been tried, or were being tested, intelligently resetting the trial to preserve sets that had not been proven to be infeasible... In the end I decided to cheat: pieces were chosen at random and I was fairly quick to completely start over.

    At the beginning of forming a run a beginning and ending piece is each randomly chosen.  Next, middle pieces are randomly chosen and added to the run until the length exceeds the maximum allowable length.  If the maximum length is exceeded, the piece just added is removed from the run, placed in a "already tried these" list and another candidate from the middle-piece list is added to the run.  By keeping track of all the middle pieces being tested (moving them from the middle-piece list to the tried-piece list) the program is able to exhaustively check all middle pieces to see if any of them would work.

    If a middle piece did work to complete the run, all pieces used to form that run were removed from their respective pools of candidate pieces and were saved off in a separate completed-run list.  Two more starting and ending pieces were chosen at random and the process repeated.

    If all of the middle pieces were tried and the run was always too short or too long, then the program ruthlessly restarts the entire process.  All pieces used in all completed runs are moved back to their starting lists and we start all over.  This all or nothing approach is draconian and the program does save off the results of that attempt if it has resulted in more runs being completed than on any previous attempt.  Again, I don't know if any solution exists and I wanted to have access to the best solution in case I never found the perfect, all 20-runs solution.  The program is also limited in the number of restart attempts it is given so as to prevent it running endlessly, looking for a solution that may or may not exist.
I implemented the above algorithm in Matlab (the programming language I currently know best) and set it to running.  I found that when I kept the maximum length requirement to the strict 184" + 1" requirement, the best solution that has been found so far was 18 complete runs.  When I relax the maximum length to 184" + 2" my best result so far is 19 runs and adding another inch gets me all the way to 20.  

These numbers are a bit deceptive, though.  The 184" + 1" result took somewhere in the neighborhood of 40 million restarts, the 184" + 2" took about 20 million and the 184" + 3" less than 0.1 million.  Again, I don't know if the 184" + 1" constraint has a full 20-run solution but I'm going to continue to run the program and see if it can be found.  For the longest time, the best solution was 16 runs but just last night an 18 run solution was found.  Once pieces start to need cutting, I don't know if the amount of material needing to be removed (one inch vs two) matters that much.  Depending on the tools, it might even be easier to remove more material as the saw wouldn't be working quite so close to the end of the board. 

As I said, the program is going to continue to try to find a full solutions for the 184" + 1" case but I'm going to send these results off to my father-in-law so that he can get his floor put back together.

2012-12-13 Update: I forgot to share my Matlab code; here it is. There are still some bugs in it that I have had to hack around so as to keep the iteration train rolling.  Most of the time, it works great but somehow, sometimes, some list variables end up empty when they shouldn't be which grinds things to a halt.  This happens infrequently enough that I decided to patch over it rather than fix it properly.  In this case, it was more important to have something that works 99.999% of the time rather than waiting to use the tool until it is at 100%.

Tuesday, December 10, 2013

Heel Healing

I was in to visit the doctor yesterday to take a look at my heel and was given great news!  The bone and incision wound are healing wonderfully and I've been given the go ahead to move on to the next phase:

  • I start five weeks of physical therapy today.  I have no idea what is in store except that it will probably be painful.
  • I can sleep at night without my walking cast.
  • I may be able to stop taking the drug I've been using to prevent nerve pain.  We might try going off of that as soon as this weekend.
  • I can try walking!  TRY walking. I've made it a matter of practice to hobble around the house using one crutch as a cane.  It is very slow going, painful, and what I can only imagine is an essential part of my rehabilitation.
My wife and I are discussing what other lifestyle changes could be made as well.  I probably don't need to spend most of my waking hours in bedrest any more so maybe meals can move back to the dining room (instead of in the living room where my bedrest couch is).  Once I'm off the insomnia-inducing neurological drug I should be able to get back to a regular sleep schedule and move back into our bedroom with my wife.  Also, assuming all goes well, I should be able to start next semester as planned though there are still questions about transportation as I no longer have a motorcycle and my bicycle riding ability is greatly diminished. (We did pick up a stationary bike that I plan on using to "train" starting sometime soon.)

Even though the endless bedrest made it seem like I was making little progress, it turns out my body is healing after all.  Who would have thought?

Saturday, December 07, 2013

Reinstalling a Hardwood Floor

Thankfully, this is not a story about one of my home improvement projects.  This is a story about programming.

To deal with a termite problem, my father-in-law recently had to tear out a portion of his living room floor.  His work in the crawlspace is nearing an end and he is ready to put the hardwood floor back into place.

Problem one: When tearing out the floor he was not anal retentive and did not mark where each piece originated.

Problem two: Not all of the pieces survived the removal and a new bundle of pieces was purchased having different lengths than the originals they are replacing.

The real problem: How do we figure out which pieces need to go where to reassemble the floor?

My father-in-law is an educated man and quickly realized that this might just be a job for a computer. He measured the lengths of all the pieces and entered them in Excel.  His question to me: was there a way to get Excel to take the list of piece lengths and pick groups of lengths that would sum to the width of his living room?  This got my brain turning right away because I too realized this was the kind of problem computers were made to solve.

I know there are a lot of programmer types out there that find the lay-man's reliance on Excel maddening.  Many of these complaints I also agree with but I do not share in their derision of those Excel-users.  Excel is, well, an excellent first programming tool.  Each cell is a variable, iteration can be done by repeating the formulas down the page using previous results, and for many people I suspect it makes abstract lines of code more concrete and understandable.  "I want to multiply this value by that value to find the interest rate and see how that will impact my mortgage payments."

Excel is a victim of its own success, though.  It is so easy use that it can quickly provide users with more than enough rope to hang themselves.  And because many many of its users do not feel ready to jump into more traditional programming languages (or even dip their toes into the built-in, full-fledged Visual Basic scripting/macro/programming environment), Microsoft tries to do what it can to make that hanging less certain.  Features like dependency tracing, input validation, and error checking are all essentially debugging tools built into the program so users that have this one hammer can be more efficient and using it on all the nails they may find.

So I'm not surprised that my father-in-law turned to Excel and I'm glad he did.  But my answer to him was that I didn't think Excel was the right tool for this job and I offered to see if I could put my modest programming skills to use.

For those of you playing along at home here are the details:
  • The total length of the living room is 184 inches.  Due to floor moulding on both ends, the accepted length for a giving run of pieces is 183 to 185 inches.
  • Due to the way the floor is assembled, there are specific pieces that must be used to start a run on one end of the room and specific pieces that must be used to end a run.
  • It will take twenty runs laid side-by-side to reinstall the floor. 
  • My father-in-law has already determined that there is enough wood to reinstall the floor but no guarantee that it has been cut in appropriate lengths.  This is to say, we don't know if there is actually a solution to the problem so it might be a good idea to find the best solution.  For our purposes, the best solution will be the one that completes the most runs with the given pieces.
So get to it my friends.  Here is a list of the lengths we have to work with. Let the iterations begin!

Starting pieces
Middle pieces
Ending pieces

(Right now, only 13 start and finish pieces are given.  I'm in communication with my father-in-law as to why this is the case.)

2013-12-08 Update: I've confirmed with my father-in-law that the list of 13 start and finish pieces is not an error.  The other seven runs will start and finish with middle pieces.

2013-12-12 Update: Follow-up article here.

Wednesday, December 04, 2013

Basil's Treasure

During the daily walk this morning, Basil made the sidewalk-find of his life:


The package of pork sausage must have been sealed because he didn't try to eat it.  I don't think it was until after we had taken it from him that he realized the value of what he had just moments before been holding in his mouth; he began to whine and jump up to peer over the counter ledge in hopes of locating his treasure.  This was much more valuable than the socks and Kleenexes he more frequently hunts.

If there was ever a moment for "finders, keepers", this was it.

Monday, December 02, 2013

Rainy Lawn

I forgot to get this posted back in August when it was relevant but I'm going to go with the "better late than never" approach.

This is what happens when you're out of town for two weeks and it rains nearly every day during that time:



I really enjoyed the vacation and am really glad we got the rain to relieve the drought in the area but I really didn't look forward to bringing this back under control.  Tools that didn't work so well: lawnmower and week-whacker.  I ended up using... (wait for it) .... clippers. That's right, I mowed most of our (not very large) backyard by hand.  It took many hours over many days but it was the best way to fell these 18 inch stalks.

Sunday, December 01, 2013

Bug in gas pump

As the textbooks say, the following is an exercise left to the reader (which probably means you won't find the answer anywhere in the textbook, or in this case, blog).


Question 1: What do you think the second sentence (the one that doesn't end in a period) should be?

Questions 2: For you programmer's out there, what kind of operation/function isn't doing its job very well to cause this kind of error?

Saturday, November 30, 2013

What I'm Learning About Insurance - Part 2

In my last post on this topic, I explained what I had learned about collision and personal injury protection insurance.  The other two policies I purchased for my motorcycle are a bit more complex.
  1. Liability - This is the policy with the most complex implications but is also the most common. If you live in a state that requires you to have auto insurance (don't they all?), then this is the type of insurance their talking about. The amount of liability coverage I buy determines how much the insurance company will pay out in the event I screw up. Higher amounts of coverage cost more.

    Fundamentally, its easy to explain. In the event I make a mistake while driving, the insurance company will pay for the damage I caused. This damage may come in the form of property damage (such as to another vehicle or structure I may have run into) as well as bodily harm to others.

    Establishing which party is liable in a given event can be tricky. Often it is up to the police to make this assessment and state laws come into play as well.  If I end up in a collision where it is established that I was 0% at fault then the amount of liability coverage I have is irrelevant; I am not liable for what took place and my insurance company won't be paying out under this policy.

    In the converse case, if I am 100% at fault, then all damage is paid by my liability coverage.  What if the amount of liability insurance I have isn't enough to cover all the damage caused? The short answer is that I personally am on the hook for all expenses past the coverage amount of my liability policy. For example, if I run into another car and am 100% at fault, causing $250,000 of damage and I only have $100,000 of liability coverage, then the insurance company will pay $100,000 and I personally pay $150,000. What if I don't have $150,000? This is where things get tricky and I deal with this later.

    If $250,000 of damage seems like it might be hard to cause, well, you haven't paid hospital bills lately. Remember that damages include bodily harm and unless you deal with the medical bills often you probably have no idea just how expensive things can be. Here's how things turned out in my case: I got an ambulance ride of 10 blocks during which time I was given an IV of fluids. Once in the ER I was carefully and simultaneously examined by a half dozen doctors, had several x-rays and an MRI of my foot taken and was administered some morphine. A plaster split was put on my foot, and I was taught how to use crutches. I spent a total of 4 hours in the ER of which half of that time I was literally laying around doing nothing in an empty room save one nurse and two student nurses. In terms of ambulance-delivered ER cases, I'm sure mine was relatively uneventful.

    I was billed $20,000 that morning in the ER just by the hospital. The state of Kansas requires no less than $25,000 of liability insurance.  Its easy to see that if you are liable in an auto collision that sends somebody to the hospital, $25,000 is probably not going to go very far. Most people who get ambulance rides to the ER will end up needing further medical treatment beyond that day. $25,000 just isn't enough. I think there is a case to be made for the state of Kansas to increase the minimum amount of liability coverage but that's another topic.

  2. Uninsured/Underinsured - If you understand how liability coverage is supposed to work, then uninsured and underinsured policies are straight-forward.

    Let's say I'm involved in a collision and am 0% at fault.  Furthermore, let's say the other party has chosen to break the law and forgo purchasing liability coverage.  In this case, they are 100% at fault and the damages I sustain would be paid out by the other party's liability policy.  But if he/she has not liability coverage, then there is no insurance company on the other side to pay for the damages I have sustained.

    This is where my uninsured/underinsured policy would step in.  Up to the dollar amount specified in the policy, my own insurance company would pay for the damages sustained even though it was entirely not at fault.  This would also be the case if, say, the other party liability coverage was insufficient to pay the damages.  Using the same example, let's say the other party had Kansas's state minimum of $25,000 but my damages totaled $100,000.  If I had a $100,000 uninsured/underinsured policy, their liability would pay the first $25,000 of damages and my uninsured/underinsured would pay the remaining $75,000.

    In my opinion, uninsured/underinsured policies are great. Though I can't control the driving behavior of others and I can't control their willingness to buy an appropriate amount of insurance (more than $25,000), I can provide myself some level of financial protection through this type of policy.  As I have found out the hard way, it is very easy to incur large medical bills and this policy can provide a lot of relief in case things go very wrong.

    And depending on your state, you may really need that coverage.  If the state you live in requires relatively low amounts of liability coverage, then you WILL NEED an uninsured/underinsured policy to cover the damages.  Again, in my case, even though I spent less than four hours in the ER, I incurred a $20,000 medical bill from the hospital alone. And of course, there are many, many more bills to come from doctors, the follow-up visits, the surgery I ended up having, etc. In my opinion, if you state requires less than $50,000 liability coverage, you should plan on buying yourself an uninsured/underinsured policy.

    And its cheap; really cheap.  After I was hit my wife and I reviewed our coverage on our car and made some changes to our coverage.  The extra uninsured/underinsured was something like an additional $50/year.  Unlike liability which will be more expensive, for the extra protection it provides it is a bargain.
That's what I've learned about my insurance so far.  My case is still pending and I am still learning; once I know more, I'm going to be sure to pass it along.