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.

On Third-Party Android Markets

I’m not sure what happened in the last two weeks, but I got directly contacted by three different companies.  All three have third-party Android markets, and they wanted me to participate.  That’s all well and good; I have a moderately successful freeware app, so I’m getting used to companies emailing me out of the blue to tell me about their Android-related products.  Two of these companies started with short email pitches of why I should participate, and left the ball in my court to act.  I’m not going to name these companies here, so that their names aren’t associated in any way with what comes next.  When I found some time, I looked at what they had built, read through their developer agreements, and signed up.  Win-win.

Appslib, on the other hand, is wildly unprofessional.  Here’s the first email
Well that’s interesting, I certainly didn’t sign up for any account on my own.  I would have remembered that.  I’ll just ignore them and hope they go away.
Thanks for posting my application?  I didn’t post a thing.  This is getting pretty pushy.
Huh. I’m glad to know my app runs on tablets, even though I didn’t ask for it to be tested.  At least they’re waiting for my confirmation to publish the app.  Let’s just search their listings to be sure. Nope.  They lied again.  They stole my app and published it without my consent.  Well, they have a Twitter account and it’s active, so I’ll tweet at them asking what gives….

Crickets…

No response on the twitters.  I guess they just don’t care.  They’ve already put my app out there, as though I had signed up with them (I didn’t), agreed to their Developer Agreement (I didn’t) or published my app to their market (I didn’t).  With dishonesty like this throughout their business, I’m going to assume that the whole thing is a fraud, and recommend to other developers and to consumers to steer clear of Applib, they’ll probably steal from you, too.

Please let me know if this happened to you, too.  We need to fight back on this.  Publishers can’t just take our hard work and do with it as they please.  It’s theft.  And it’s wrong.

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.

Virginia Traffic 1.1.1 Release – Bugfix

Today I’m releasing an update (version 1.1.1) to the Virginia Traffic app which fixes a small bug that had been bothering me for a while. Here’s a quick shot of what the bug looked like before:

As you can see, the incident list had moved up to obscure the dropdown and button at the top. Now here’s what the screen is supposed to look like:
If you’re not an Android developer, thanks for dropping by, and you can stop reading here. The bug is fixed, so please continue to enjoy Virginia Traffic. If you want to know the geeky details, keep going…
I have one big LinearLayout that encompasses the whole screen for the main Activity, and I had previous set the android:clipChildren property to false. Ooops. If you look at the documentation, this means that child objects aren’t being limited to drawing within their bounds. So I had a ListView that was coloring outside the lines, so to speak. Every time I scrolled the ListView, I think it had some trouble syncing up between the exact position of the screen and due to some rendering issue was drawing outside of its boundaries in an attempt to have a smoother draw of the ListView. Setting android:clipChildren to true fixed the problem.