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.

Monday, November 25, 2013

What I'm Learning About Insurance - Part 1

As part of trying to get this whole mess worked out with the insurance companies (mine and theirs), we've decided to hire a lawyer. Under the tutelage of these professionals I've been learning a lot about how insurance works. If you're like me, when it came time to buy insurance for your car, you walked away from the experience not entirely sure if you understood what happened. Thanks to this experience, that ignorance has been largely erased.

When I bought insurance for my motorcycle, I actually bought multiple policies all at the same time and I bet you did too. Most of these policies are kind of self-explanatory and in my case, I ended up with four policies. We'll look at the two easiest first and I'll cover the more complicated ones in another post.


  1. Collision - This is the easiest to understand, kind of.  By buying this policy, my insurance company agreed to pay to repair the damage caused to my motorcycle in the event of a collision. These policies often have a deductible which is the amount the I must pay for repairs before the policy kicks in and covers the rest. For example, if a collision results in $750 of damage and I have a $250 deductible, I pay the first $250 and the insurance company pays the other $500.

    There is a slightly abnormal case that can arise with this policy. In the event that my motorcycle is not worth very much (age, mileage, style, etc) and the cost of repairs exceeds the value of my motorcycle, the insurance company can, rather than repair my motorcycle, choose to declare it a complete loss.  This is called "totaling" the vehicle.  In this case, I still pay the deductible and then the insurance company writes me a check for the current market value of my motorcycle.

    Additionally, in the event my motorcycle is declared totaled, the insurance company may offer to sell it back to me. Some people might be interested in this option if they have the time and ability to make the repairs themselves, sell the car, or sell parts from the car.  Here in Kansas, cars are often totaled due to dented roofs and hoods caused by hail storms. Since these dents don't affect the functionality of the car, it makes sense for the owners to buy them back after being totaled.

    In my case, my motorcycle ended up with a $3000 repair bill for a motorcycle worth $1500. The insurance company declared it totaled and offered to sell it back to me for $400. I declined, paid my $100 deductible, signed over the deed to them and got a $1400 check.

  2. Personal Injury Protection (PIP) - In the event of a collision that injures the policy holder, PIP steps in and acts as mini health insurance and supplemental insurance rolled into one. In Kansas, the minimum coverage for medical bills is $4500, which, is not much given the cost of medical care today. If you end up taking an ambulnce ride, this minimum coverage isn't going to go very far. For most people, traditional health insurance will end up covering most of the cost of medical care.

    The supplemental insurance is the more interesting aspect of this policy. In the event that an injury causes you to miss work, this policy will pay up to a certain amount for a certain period of time. Similarly, if the injury prevents you from doing household chores, this policy will give you a small amount each day to pay others to fill in for you.

    In Kansas, this policy is optional for motorcycle riders as the cost is often prohibitive; it is required for other vehicles. A motorcycle rider friend of mine advocated that I drop this coverage as I had health insurance through to cover medical bills. This thinking ignores the benefits of supplemental coverage and I'm glad I didn't heed this advice.
Next up, I share what I've learned about liability and uninsured/underinsured.

Sunday, November 24, 2013

Cranberry Sauce Reminder

Its Thanksgiving week here in the US and that means its time for cranberry sauce.  As I've previously written, making your own cranberry sauce is easy. As a public service, I will reiterate the (extremely forgiving) recipe here:

  1. Collect the following ingredients
    • One bag fresh cranberries (12oz)
    • One cup sugar
    • One cup water
  2. Combine ingredients in saucepan, heating over medium until cranberries have burst.
  3. Allow to cool (if you can wait that long).
The process doesn't take that long and it makes a perfect task for little kitchen helpers or other helpers who tend to be less helpful in the kitchen.

Try it out. You won't regret it.

Monday, October 28, 2013

Tuesday, October 15, 2013

Injury update

In the few weeks since I last wrote about my motorcycle accident, my life has been very predictable.  I lay on the couch all day, sleep in my own bed at night (to allow my wife better sleep) and go to the doctor's office on Fridays.  Those visits are themselves quite predictable: my plaster split is removed, the doctor looks at my foot, mainly to see how the swelling is doing, and a plaster split is re-applied.

The routine changed ever so slightly with the surgery a few weeks ago. I was in the hospital for a few days while the pain from the surgery resided and it was demonstrated that I could get by with pharmacy-stocked pain medication. Then back home, laying on the couch and Friday doctor's appointments, now looking at both the swelling and the healing of the incision site.

The end of bedrest is on the horizon, though. If all goes as expected, I'm in the final two weeks and after that I'll be starting physical therapy. I don't know what this will look like exactly but I'm hoping The end of bedrest will mean life will start looking a little more normal. We'll just have to see.

And in case you're wondering, there will be pictures coming, at least the x-ray of my new, metal-reinforced heel.

Monday, September 23, 2013

The End of the Motorcycle

If all goes according to plan, I will be having surgery in one week (September 30th) to stabilize/repair my right heel bone.  My foot was injured when I was struck by a car while riding to school on the morning of September 11th.  Thankfully, all the protective gear I was wearing prevented any other injuries, despite the fact that I was thrown from my motorcycle and bumped my head when I landed.  I can't express how grateful I am that I was not injured more seriously.

Unfortunately, the path to recovery will be long.  Under doctor's orders, I have been living with my foot suspended above my heart since the accident to help the swelling in my foot to go down. (This is the reason for the late post; I'm typing this all very slowly on the iPad which I find tedious.  Don't expect a lot more out of me until I'm able to use a traditional keyboard.) After the surgery, it will be several more weeks of the same. Once I am permitted to begin living in the traditional, vertical orientation, I will be in physical therapy for several months and won't be putting any weight on the foot until well into the new year. No driving, no walking, and only getting around on crutches.

I don't know the state of my motorcycle as I left the scene in an ambulance but given its age, I suspect the insurance company will declare it totaled; there's a good chance it will never ride again.  It was a good bike and I am sad to see it go.

Sunday, September 08, 2013

STEM Crisis

The professional electrical engineering society I'm a member of (IEEE) recently published an article looking into the alleged lack of STEM (science, technology, engineering, math) graduates.  I've been suspicious of such claims for some time mainly based on my (and others') experience managing a career in the field. If nothing else, a true lack of STEM workers would result in low unemployment rates and high salaries.  In the dozen years I've been in the field, I have experienced neither.

And now this article gives some research to my intuition and experience.  If you care about such things, I suggest you read the whole article but for those you don't, here are my take-aways.


  • Many reports and studies have been done looking into this alleged shortage and each seems to classify STEM differently.  Some include fields like social science, psychologists, and health-care fields.  Some do not.  As you might suspect, this can have a big impact on the results.
  • Not all STEM graduates find jobs in STEM fields (mathematicians on Wall Street being a great example) and not all STEM jobs are filled by STEM graduates.  Depending on how each study looks at these details can have a significant impact on determining whether there is a shortage or not.
  • Estimating demand in certain fields over many years can be tricky.  The Great Recession has invalidated many studies that assumed more linear growth in the fields over time. As an NSF study says, "Projections of employment growth are plagued by uncertain assumptions and are notoriously difficult to make."
  • Immigrant workers (often admitted on the famous H1-B visas) increase the number of STEM workers available for employment.
  • Reports from Duke University, Alfred P. Sloan Foundation, and Rand Corporation all conclude there is no shortage, now or in the near future.
  • “If there was really a STEM labor market crisis, you’d be seeing very different behaviors from companies,” notes Ron Hira, an associate professor of public policy at the Rochester Institute of Technology, in New York state. “You wouldn’t see companies cutting their retirement contributions, or hiring new workers and giving them worse benefits packages. Instead you would see signing bonuses, you’d see wage increases. You would see these companies really training their incumbent workers. None of those things are observable,” Hira says. “In fact, they’re operating in the opposite way.”
Nice to know I'm not just making this up.

Tuesday, August 27, 2013

College Group Board Games

I was recently commissioned to purchase a starting set of board games to make available to our church's college group for use after our weekly meetings.  Our hang-out time afterwards is generally characterized by talking and pancakes (yes, pancakes) and it was thought that the board games might provide some alcohol-free social lubricant.  We did a test run using our own games last Thursday and the response was positive so we got the go-ahead to make it official.

Based on our trial run I was looking for games that had some of the following characteristics:

  1. Familiarity to college students/people in general.
  2. Easily taught and learned.
  3. Relatively short (less than 30 minutes) to play.
  4. Good for larger groups (five or more will probably be common).
Not all of the games chosen fit all of these requirements but many come close. And here they are....








I've got a list of further additions if such a need arises but I'd be interested in any suggestions.



Tuesday, August 13, 2013

Vacation in Vancouver BC and Portland

Here are some photos from my recent trip to the Pacific Northwest.  The first week or so was spent up in Vancouver BC where I attended a conference and my wife saw the sights.  Our hotel was in downtown Vancouver and the living felt very urban.  Lots of people on the sidewalks at all hours, lots of bicycles, buses, cars, and pedestrians. We saw more pet dogs than children and it definitely seemed a place for yuppies to thrive.

Here's the view from our hotel window:
More than any other city I've visited (including Portland, OR) downtown Vancouver accommodated bicycles.  Note the dedicated lanes and bicycle parking in the median.  My wife rode all over downtown on a rented bike, something she won't do here in Wichita.


Downtown is largely surrounded by a harbor including a seaplane terminal.  I'm guessing this is where some of those vehicles go for fuel, the floating Chevron station.


A fair number of the buses downtown were powered by electricity from these overhead lines.  There were points on some of the routes where the drivers had to get out to switch lines so the bus could continue on its route.  


The Olympic "cauldron" from hosted 2010 Winter Olympics.


The city is very environmentally-oriented which includes growing a lawn on the convention center roof.  


I did not appreciate how major a shipping terminal the city was until I saw this.  Many, many freighters were in the harbor the entire time we were there.


More of downtown from the harbor.  The skyline was full of skyscrapers.  Particularly on the west end of downtown, virtually all of the buildings were over 30 stories tall.  As I said, very urban.


This is art.  There was a sign saying so.  It also said not to touch the art so we didn't.



My wife wanted to go hiking near waterfalls and I knew just the spot.  It had been many years since I had been down to Silver Falls State Park not too far from Portland.  Six miles, 8 waterfalls, good times.




I don't know what happened to this tree but it is clear it hit the ground violently.  I have never seen a trunk this large shattered like this.


Also in the odd-sightings category, a burned-out tree with only the bark remaining?  Maybe?

Tuesday, August 06, 2013

Lorenz in Living Color: Part 4 - Visualizing the System

As I mentioned previously, an error in my implementation of the Runge-Kutta algorithm on the Arduino left me convinced that I needed something with higher precision to do the necessary calculations.  This set-back would eventually sideline the project for several months but before I set it aside, I took on the chunk of code that would follow the calculations to find the solution to the Lorenz system, that I was having trouble with.  Given the z, y, and z values that would result from that calculation, I needed be able to determine the red, green, and blue values for all 50 of the LEDs I was going to be using.

This gets to a very fundamental question: once I did get to a place where I had a running list of coordinates of the solution points to the Lorenz system, how was I going to present those in an attractive way?  My first thought was just to use a row of LEDs each one representing a state of the system.  As the Arduino would generate the solution to the system for the next step in time, the new color would be shoved onto the string of LEDs, pushing all the previous solutions down one LED.  The result would look a lot like the animations form previous posts but here's what it looks like when all 50 LEDs are used:


My thoughts were to orient the string of LEDs vertically, maybe four or five feet tall and place them behind a piece of frosted glass or plastic, perhaps with some etching somewhat related to the weather.  I held onto this idea for quite some time before I was confronted with the reality that I had no way to etch a five-foot long piece of glass or plastic nor did I have any specific plans for what that art would be.  And if I was going to be the one to make the art, I suspected I would spend a large amount of time on it and the results would not be that fantastic.  The project would turn into one playing to my weaknesses rather than my strengths.

Lorenz, the man, is the one that coined the term "butterfly effect" to describe how chaotic systems can start out in very similar states but over time diverge drastically.  Interestingly, given the right set of parameters to the Lorenz equations, the shape of the solutions ("the attractor") takes on a vaguely butterfly-like shape.


I started of thinking of ways of trying to use this visual similarity. I still liked the idea of having the LEDs behind frosted glass to diffuse the colors; maybe a butterfly shape could be etched into the frosted glass?  Behind this etched glass I could arrange the LEDs in the shape of the attractor and as the solutions to the system were found, I could light up the LED that corresponded to that place on the X-Z plane with the color that corresponded to the X(red), Y(green), Z (blue) coordinates.  By arranging the string of LEDs in a figure-eight the looping path of the solution to the system would be shown by constantly moving LED with a color based on the the latest solution to the system.

But this would once again require me to create some kind of passible image of a butterfly to be etched. Seeking to avoid this complexity, I decided to switch the two images: I would etch the attractor on the frosted glass and arrange the LEDs in the shape of a butterfly.  I could generate the image of the attractor using Matlab and arranging 50 LEDs in the shape of a butterfly profile seemed something I could manage.

Once this decision was made, the next step was to write the code that would take the latest solution to the Lorenz system, an X, Y, Z coordinate, and define the state of each of the LEDs.

Tuesday, July 16, 2013

Lorenz in Living Color: Part 3 - Differential Equations on the Arduino Uno

We left off last last time with my successful efforts to implement a fourth-order Runge-Kutta algorithm to solve the Lorenz system of differential equations in Microsoft Excel.  To make this project all I hoped it to be, though, I needed to do the same thing using an Arduino Uno.

The Arduino platform is great in many, many ways because it is largely able to hide a lot of the details that have made microcontrollers tricky to deal with for decades. But once you start moving beyond simple flashing LEDs, controlling DC motor speed, and reading analog temperature sensors, that messiness and mandatory attention to detail begins to reappear.  Very quickly, trouble with execution time, accuracy, data types, memory management and program space become pressing.  For this project I had a few specific concerns.

The first was accuracy.  Like all chaotic systems, the Lorenz system is sensitive to small deviations which, over time, cause a divergence between states that started out very near each other.  Approximations at any step of the process can lead to widely differing results in short order.  This is particularly a problem when using a numerical solver because numerical solutions always involve some degree of estimation; you always only get approximate solutions.

For the purposes of this project, I was not highly concerned with the accuracy of the specific solution, only that the system continues to behave in the characteristically chaotic fashion.  As long as the colors kept oscillating back and forth I was OK; if the system ever leveled out and settled into a single color or small spectrum of colors I had problems.  Not knowing enough about the system, I was not sure what degree of accuracy was needed to make this work.  As the programmer reference states, floating point variables (values with a decimal place) only have six or seven digits of accuracy.  It was not obvious to me if this would be enough accuracy for my needs.

My second concern was speed. The Arduino Uno runs at 16MHz by default and the Runge-Kutta algorithm uses floating point values every step of the way.  Floating point operations are the slow on the Uno because it has no dedicated floating point processor so I knew calculating the solutions could be time consuming.  I was also concerned with the time it would take to send out the new color state to all of the LEDs I was using.  As I could tell from the tutorial from the distributor, each LED would need 24 bits sent and I was planning on using 50 LEDs.  For the system to work as I wanted, both the calculations and the updates would have to be fast enough that I could update the system in real time.

There was only one way to address these concerns: try and see how it works. My first pass at implementing the Runge-Kutta code was a failure and unfortunately for me, I didn't realize I had made a critical mistake in translating my work in Excel to Arduino code.  When I ran this faulty code the system quickly settled out into a constant value, leading me to believe that the Uno lacked the precision for this application. These results lead me to desperation and I decided to take an entirely different tack: I was going to cheat.

Rather than calculating the solution to the Lorenz system I decided to take the red, green, and blue values I had already found when implementing the Runge-Kutta algorithm in Excel and store them in the Uno.  There wasn't a ton of room in the flash memory available for me to use but it was enough and I was able to demonstrate that this could work.  The Uno would just play back the pre-calculated solution and then and use it to drive the LEDs.  It worked but I wasn't happy that I would only ever be able to display a fairly limited set of values, those stored in flash memory.  This small setback and the normal busy-ness of life led me to sideline the project for several months.

A month or two ago I  picked the project up again with inspiration from an artist friend of mine and did the hard work of remembering where I left off and developing new strategies to solve the problem before me.  I ordered a dedicated floating point processor with hopes it would provide me the precision I thought I needed.  I ordered a 32-bit Arduino Due which has this precision built in the microprocessor architecture (and it runs much faster).  I even ordered extra off-chip flash memory to store an impossibly large amount of pre-calculated values (worst-case scenario). And while I waited for those to arrive in the mail, I relearned how to implement the Runge-Kutta algorithm and looked over the code I had written.  With a more systematic approach to checking my work I discovered errors in both my Excel and Arduino code and after correcting both was greeted with surprising results.

The Uno had enough calculating precision and speed to do what was needed. The solution to the Lorenz system that it finds appears to be accurate enough though I won't be sure until I get the system entirely assembled and can let it run for hours or days.  This result greatly encouraged me.  I was getting close but there was still more to do.


Monday, July 08, 2013

Lorezn in Living Color - Part 2: Solving the System

So where did we leave off....?  Oh yeah, the Lorenz system.

The Lorenz system is a three dimensional system that has this intriguing property in that as the system evolves over time, the solution never repeats yet tends to follow a semi-regular pattern.  My goal is to map the three co-ordinates of the solution onto a red, green, blue (RGB) color space so that I can see the system in another way.

The first challenge to overcome: since I was planning on implementing this project on an Arduino, I needed to solve the system of differential equations numerically.  I knew that solving differential equations this way was common (almost every computing device solves in this manner) but having never done it myself, I was a bit intimidated.  I knew from one of my recent math classes that the most common way of doing this was using an algorithm called Runge-Kutta, the fourth order variant being the most common:

(From Wikipedia)

(In the world of math and science, the most fame you can reasonably hope for is getting something you've done named after you.  This carries very little value outside the math and science circles, though.  Can you name more than ten famous mathematicians or scientists?  Come to think of it, if you're reading this blog you probably can. But I bet your next-door neighbor can't.)

Even though I working on my PhD in electrical engineering, I am not used to looking at numerical algorithms described in equations and  implementing them for, say, the Lorenz system.  I decided rather than start by writing code directly on the Arduino, I was going to use tool of every of every rookie to the field of numerical analysis: Microsoft Excel.  When you're just starting, Excel makes things easier by explicitly showing the  intermediate values for every step of the process.  Each intermediate value in the process has its own column with each step in time (n from the equations above) getting its own row.

After messing around in Excel for a while I had figured out how to interpret the equations for the algorithm and seemed to have produced results that were consistent with what I understood about the system.  I could see the x, y, and z values oscillating over time, never running away to infinite or getting stuck at any particular value and always circling back and forth.  Always moving, never repeating.

But these were just numbers and its hard to get a feel for how they would look if represented as RGB values. Engineering/Artistic epiphany: I could use Processing (a close cousin of the Arduino development system) to visualize the changing state of the system.  Processing was designed for real-time animation and visualization and I was sure there would be a way to take the values from my Excel spreadsheet and use it to draw a string of circles filled with the colors produced by the calculations.

And it was.


(The full animation has 50 circles; you're just seeing a portion of it here.)

I noticed that the colors that were being produced by these solutions were not that, uhmm, colorful.  I was already scaling the values from the Lorenz solutions to make them fit the way the RGB color definition used by processing (0-255 for each color channel); a little bit more tweaking probably wouldn't hurt anything. It took a few guess-and-check attempts but I eventually found a simple equation that changed numerical solutions from the Lorenz system into color values I liked.  





Using Processing to check my work was a great idea and it gave me confidence I was on the right track.I could see the results of the Runge-Kutta algorithm, see the progression of the colors, and verify that, for my purposes, the system was producing useful results.

Next up: moving all of this work I had done in Excel onto the Arduino.



Sunday, July 07, 2013

Sedgwick County Zoo

A few weeks ago my wife and I spent the early evening at the Sedgwick County Zoo.  For being a smaller-ish city, the Zoo here in Wichita is great.  Ten points if you can name all the animals.












Wednesday, June 26, 2013

Birthday in Enid

My niece had a birthday party in Enid a few weeks ago that my wife and I attended.  Due to the large number of guests, and the crowding around for pictures: this is the only decent photo of her I got:



Her younger brother, on the other hand, was much more available...



... and so we got to spend some time with him, particularly out in the front yard where there were readily available ladybugs to be fascinated with.






Thursday, June 20, 2013

Male College Degree Holders

An article in Washington Monthly (summarizing a Lumina Foundation report) confirms a suspicion that I've had for a while; of those aged 25-29, 47% of women hold a degree compared to 37% of men.  I ask this in all honesty since I have not applied for undergraduate scholarships for some years: are there scholarships that target men?  When I was seeking to fund my education there seemed to be plenty scholarships that I couldn't apply for because I was not a woman.  I never saw any that were just open to men.

I regularly see reports and articles discussing the efforts to get more women into the STEM (science, technology, engineering and math) fields where they are not as well represented. I don't see similar reports of efforts to get men into fields where they are equally not well represented such as (and I'm completely guessing here) elementary education and nursing.

College funding is a politically complicated issue and I wish that it were not so.  I haven't done a lot of research but it appears that, with regard to gender,  the recent political efforts to restructure accessibility to higher education have been very successful.  Though it is not politically correct, the data seem to support the fact that our efforts have produced results that pass gender equality and are now significantly favoring women. I'm assuming that this was not the intended outcome and that with the victory of getting more women through college, we should rethink our choices.

Maybe the time has come to focus on getting men through college.

Thursday, June 06, 2013

One of these things is not like the others...

Taken in the power research lab I work in at Wichita State:


Even with my poor quality cell phone camera the baby blanket on the floor beneath the solar cells seems out of place.

Tuesday, June 04, 2013

Board Game Storage: Dominion - New Case

I know I said I wasn't going to move my Dominion set into a larger box until I needed the room but, well, it just kind of happened.

I made plans to go to Hobby Lobby to pick up a shadow box for another project and printed out the 40%-off coupon they almost always have on their website.  When I got to the store, they were having a sale on picture frames and shadow boxes (another common occurrence) which nullified my coupon. I was in the store, coupon in hand, and even though I didn't have immediate need of it, it seemed even more foolish to not purchase the larger box.  I didn't want to have to make another trip at some later date, right?  And I had the coupon, just begging to be used.

The next day, I was at the hardware store for an entirely different home maintenance project when I stumbled across some 4" x 2' x 1/4" maple slats that would work great for the dividers in the new box.  And they were being clearanced-out for $1 each.  With maybe a little bit less internal conflict over how small pebbles were beginning to turn into avalanches and slippery slopes were being danced upon, I bought five.

In just two days, purely by happenstance, I had purchased all the pieces I needed for upgrading my Dominion box. These pieces were sitting in my house, un-touched and still wrapped, not causing anybody any harm.  And I was doing OK with this; I had a lot on my plate with upcoming trips and trying to get some school work done.  I was actually feeling pretty good with just letting them sit there for a while.

A few days later I had got some time to kill while Katie was making dinner so I go out to the garage and cut the dividers from the maple slats I purchased. A day later I find myself sanding the dividers and the box in preparation for staining, another day I end up beveling one corner of the dividers so that the lid will close once they are installed. And so it goes: a little gluing here, a little staining there...


... and suddenly I'm putting felt into the bottom of the case....


... and transferring the game into the new box.



Its nice to see it with plenty of room for the other expansions and I'm happy with the final results.  Incidentally, the staining was done primarily because my Catan set is housed in the exact same box and I wanted an easy way to tell them apart.  The felt was recommended to help keep the cards from sliding around.  And they look nice, too.

Craftsmanship on this was probably a solid "B" and I am perfectly OK with this.  The stain pooled some in the corners, there is glue acting as a significant structural members to keep the dividers in place and the felt was not cut very precisely.  These imperfections were completely acceptable to me; I have taken the policy that the first time I build something it is effectively a prototype.  Get it done and learn from the process rather than making sure the end result is flawless.

But seriously, this was all a conspiracy of coincidence.  The box practically assembled itself.  Its not my fault.

So when do I get Prosperity, anyway?