24 Game Solver

My wife teaches elementary-school math, and I’m somewhat of a math nerd, so the 24 game is right up our alley.  Basically, you’re given four numbers, and you have to find a series of operations that makes 24 from those numbers.  For example, given 1, 2, 3, and 4, you might respond that  1*2*3*4 = 24.  Some sets of numbers are harder than others (much harder).

One day, my wife and her class were having trouble solving a particularly hard set, so she emailed me for help.  It took me a while to find the answer, and all the while I was thinking to myself “Self, I’m a programmer.  Why am I doing this the hard way?”  So now I’ve created the easy (cheater) way.  Go to http://jebware.com/24 input your 4 numbers, and it will tell you how to make 24.

Right now it does addition, subtraction, multiplication, division, and exponentiation.  However, it doesn’t understand the commutative property, so you’ll get a lot of answers that are essentially the same, like (1*2)*(3*4) and (4*3)*(2*1). I wrote it in javascript, and if you want the source or you want to improve on it, I made a repository on GitHub.

The “November Nor’easter”

That’s what the local news is calling it, at least. I went out yesterday and got some pictures. Keep in mind that I did this about five hours after high tide, so the water had already gone down a little bit from its morning peak.

These folks were trying to tow their minivan out of the water. I took this picture right after their rope snapped.
Police were blocking this street from both directions so that nobody would even try to get through. Which is probably good, because I saw people attempting some pretty stupid things.

Submerged cars. You’ll notice this becomes a theme.

These people were out taking pictures with their dog; I saw one of their pictures later on the local news’ website. I tried taking my dog along for this expedition, but she gave up after two blocks.

This vehicle wasn’t abandoned yet, I think the owner was still sitting in it.

Probably wishing you hadn’t parked your BMW on that particular block.

You want to know what’s sad? So far these pictures aren’t even tidal flooding. They’re just areas that don’t drain.
In the middle of this shot is Smith’s Creek. On the left is a road, Mowbray Arch a.k.a. the Smith’s Creek Annex. This is the only picture in this set with tidal flooding.

Remember that BMW? When I came back by a tow truck was fishing it out. I hear that the waiting list for tow trucks is getting pretty long.

“Neither rain, nor sleet, nor gloom of night”. What you can’t see in these pictures is that it was still raining hard. And the wind was blowing at 50 mph gusts.