A bit of ingenuity

A bit of fruitful construction last year led to the replacement of old deck railing and addition of a line of 2×6 along the base to make the framework of the deck less visible. Not much has happened since then as I waited for the boards to weather before adding paint.  In the meantime, the bottom boards around the deck had gaps that needed to be closed up. A simple concept, though execution proved to be difficult.  At first, at least.

I unscrewed the lower boards from the deck, fiddled around with some hand clamps, adjusted, re-adjusted, reattached the boards, detached the boards, muttered to myself, reattached the boards, and stood back to see that little progress had been made despite the half-hour or so of effort. In the first few minutes of this bit of futility, my neighbor offer a pipe clamp to help out. I politely declined, thanked him, and then went back to my bout of inefficiency. What was a pipe clamp anyway? It could not be *that* helpful. Still, my curiosity was piqued and back I went to take up his offer.

Game. Changer.

The design is simple enough. Two pieces slide over a piece of pipe. One piece adjusts up and down to hold on to the surface to be compressed, wedging itself into the bar when force is applied. The second piece includes a screw that drives itself toward the other end to squeeze them together, hence the clamping effect.

Here it is in action:

pipe-clamp-e1501444142368.jpg

This beautiful tool saved my afternoon and allowed to make short work of what was turning into a rather daunting task. It even straightened out a warped section of board that would otherwise still be there. It also served as a humble reminder of how little I know about these tricks of the trade. Like so many challenges and tasks we are faced with, the vast majority have been solved and done so in elegant fashion. It often takes asking the right question or having the right person see what your problem is. The trick is figuring out what question to ask or finding that expert. How do you do that?

That is a good question.

Advertisements

Happy pi day!

Just wishing you all a happy pi day.  3/14/16 turned into decimal form (3.1416) rounds pi nicely to the nearest ten-thousandth.

This is much catchier than wishing everyone a happy “Ides of March eve”, which just sounds dreadful.

www.pidaychallenge.com/ makes for some entertaining mathematical puzzling.

www.expii.com is worth a look too with various problem solving sets in math and science set up by Carnegie Mellon math professor Po-Shen Loh, National Coach of the USA International Math Olympiad team.

Georgia Tech hosts a pi mile road race, which has run since 1975, and is actually a 5k (3.1068 miles, not 3.14159265… miles) since a change in 2002.  This is, confusingly, not run on pi day, but toward the end of April.  A portion of the course is on the Tyler Brown Pi-Mile Trail on campus dedicated to a former student government president and military serviceman killed in action in Iraq in 2004.

Enjoy the festivities, wherever you may be!

The leap day

I couldn’t resist posting on February 29th a little piece I wrote, well, about four years ago…


 

February 29th has come and gone with its usual fanfare being celebrated quadrennially.  That is, except every century when we skip the leap day, except every four centuries when we keep it.

Huh?  Perhaps I should back up a bit…

Our typical calendar year is 365 days (or 8760 hours, 525,600 minutes, 31,536,000 seconds, you get the point…) but our actual solar year, i.e. the time it takes the Earth to make one rotation around the sun, is approximately 365.242190419 days.  If we were to keep using 365 days per year, after a century December 31st would act a lot like a typical December 7th because we would be 24 days behind.  After 1000 years, we would be off by 242 days and celebrating New Year’s Day at a time when spring was just getting into full swing.  This is clearly a problem!  Hence, the “Leap Day” of February 29th.  Adding this every four years and our average calendar year becomes 365.25 days.  A much better result, but clearly we can do better!  To trim that average to 364.24 days, we skip the Leap Day every one hundred years.  So why, you may ask, did we have a leap day in 2000?  We celebrated this quadricentennial event because an average of 365.24 days is just not good enough!  By adding that leap day back every 400 years, our average calendar year becomes 365.2425 days.  This amounts to a deviation of 26.7 seconds per year or 0.0000848% and a much better result.  Of course, after 3200 years of this, we would be off by an entire day again, but that debate can wait a couple millennia.

What are the odds?

$1.3 billion!  That’s quite a hefty jackpot for the next Powerball drawing, even if the number is deliberately inflated to raise the hype.  Still, the lump sum payout is estimated to be $806 million; not a bad day at the office.

The odds are posted around the web, but how are they determined?

The updated version of Powerball started in October; five numbers are drawn from a set of 69 white balls and one number from the set of 26 Power balls.  To win the jackpot, your five numbers and one Powerball number have to match up with the drawn numbers.  Your chance of one of your five numbers matching the first ball pulled is 5 out of 69 (7.25% probability).  Once a ball is pulled, it is not replaced, hence the chance of one of your four remaining numbers matching is 4 out of 68 (5.88%).  This continues until the five white balls are chosen (3 out of 67, 2 out of 66, and 1 out of 65) and then the Powerball at 1 out of 26.  When all is said and done, out of the 35,064,160,560 ways the six total numbers could be pulled, you could win 120 different ways, since the order that the numbers are pulled doesn’t matter (permutations vs. combinations anyone?).

odds
Odds are 292,201,338 to 1

When does it makes sense to play?  Well, Walter Hickey has made a name for himself looking at this sort of thing.  His 2013 article says it only makes sense if you take the annuity and if the jackpot is greater than $345 to $380 million.  Mind you, this was when Powerball was way easier to win (odds were a paltry 175,223,516 to 1 back then!)  With the tougher odds, breakeven, assuming just one winner, looks like this:

expected value

Once the jackpot hits $491 million, you can statistically justify purchasing a ticket, since the expected value is above $0.  Of course, that is **AFTER TAXES**.  With a top federal tax bracket of 39.6% and state taxes ranging from 0% to 8.8% and some cities adding their own levies as well.  That means it only works with jackpots from $813 million to $1.029 billion!  Assuming multiple winners, which is more and more likely with more tickets purchased, that minimum number keeps going up.  This is getting ugly…

Long story slightly longer, the odds are such that it is nearly impossible to statistically justify purchasing a ticket.  Am I playing?  Uh… yes, I am.  Why?  Consider it a cheap insurance policy.  Should the office pool hit, I’ll have options.  Besides, it’s entertaining to share in the thrill of anticipation, even if it will undoubtedly end with a tiny payback.

Similes and Alt+Esc

Occasionally, from the mind fog of an early morning, a jumble of words makes its way out of my subconscious.  Observe:

He has the charisma of a bowl of shredded wheat.

Sadly, Ron Weiskind of the Pittsburgh Post-Gazette can lay claim to an earlier rendition of the phrase.  Curse you Google…  As useful as a simile, as they say.

Moving on.


I had an issue with an Excel program today .  A VBA script that wouldn’t die even though I “Ctrl + Break”ed (or is that “Ctrl + Broke” it?) a few hundred times.  Normally, I would restart Excel, but I would need to re-run the program for another 20 minutes to get the output I was looking for.  Google came to the rescue this time.

This post saved my bacon.  “Alt” + “Esc” caused my computer to flash between all of the open programs, but within a few seconds the program stopped its endless loop and brought a welcome sight:

interrupted

“Alt” + “Esc” is a different/faster version of “Alt” + “Tab” to switch between open applications.  It helps to switch between Word or E-mail or Excel or your web browser without having to use the mouse while adding to your geek cred.  Less mouse equals more better.  True story.

 

12/27/2015 = 42365?

Happy third day of Christmas!  ‘Tis the season for celebrating with friends and family, a bit of introspection, and a good a cup of coffee.  Best wishes to you and yours!

And now, for something completely different.

What is 12/27/2015?  My calculator tells me 0.000220567962503446.  My calendar tells me there are four days left in the year.  Half of the world’s population wonders what the 27th month of the year is.  As for Excel, it tells me it’s equal to 42,365. Of course it is…

Day 1, according to Excel, is January 1, 1900.  Day 42,365 is December 27, 2015, by Excel’s reckoning, though that’s not quite right.  Apple fans have a different quibble.

Converting the date into a number is useful for sorting data and for making calculations based on dates, but it’s a bit frustrating when you expect to see 12/27/15 and get 42,365.  This can be easily remedied by tweaking the cell’s format.

“Cntl” + “1” opens the “Format Cells” dialog box:

Format cells.png

Excel recognizes 12/27/2015 as a date, and represents it as such.  Don’t like it?  Pick another format!  “OK” makes the update.

A different way to format dates on the fly is with the TEXT() function.  Here are a few examples:

Formats
Several versions of the 3rd day of Christmas.  Formulas (Col. A) with output (Col. B)

By using TEXT(), we can change how the date is displayed without changing the format of the cell.  This also forces Excel to maintain your desired format even when it wants to change it for you.

TEXT() comes in handy for creating chart titles, but I’ll save that for another day.  As for now, I need to figure out what to do with these three French hens from my true love…

Control + Arrow

An easy way to appear to have ninja skills in Excel is to skip around a spreadsheet without a mouse.  With this easy trick, you can channel your inner Kal-El and leap 16,833 columns or 1,048,575 rows in a single bound.

  • Open a new spreadsheet
  • Hold down the “Ctrl” button (and don’t let go!)
  • Hit the right arrow key “→”
  • Hit the down arrow key “↓”
  • Hit the right arrow key “←”
  • Hit the right arrow key “↑”

Here’s an animation of what it should look like:

CtrlArrow
Run circles around your spreadsheet in under a second

Once through the procedure, you should be back to cell A1 (as a bonus, you also have 30 lives). Note that you can release the “Ctrl” button between moves, but it must be held down before pressing the next arrow key to make the next jump.

I’ll explore this trick further in spreadsheets with data as this comes in handy when working with blocks of information.