24 November 2012

Heat Map Monkey

Way back in the day, I worked for a telecommunications company called Flowers Direct. The idea was to connect you, as close as they could, to a florist where you were actually sending the flowers. None of the mess of finding out they sent gladiolas instead of roses because they were out of roses that day ...

Not as useful in the Internet era and flat-rate calling, but this was back when Linux was being sold on card tables at the back corners of computer trade shows.

Learned a lot - like how zip codes and area codes aren't these semi-permanent things but change crazy fast, if viewed on a national scale. Or that there really are weird people who call up just to hear the automated voices speaking to them - and they will go down a line of pay phones as you block them off one-by-one. And I learned about marketing.

See, the marketing group at Flowers Direct was, essentially, the kiss-of-death. Everyone who had worked on that team was, in some way or another, forced out of the company in disgrace. Even the consultants weren't having a good time of it. And so, being the junior programmer and the junior employee - well, the marketing team needed a programmer, and I was going to be the sacrafice.

That's when I learned about the Census Bureau and their whacky statistics. And companies like Melissa Data, who aggregate it and a whole mess of other facts besides.

So I hatched a plan. If I was going to be driven out in disgrace, then I wasn't going to go quietly into that night. I was going to go out with a bang. I was going to correlate the data we had on our customers and produce the most far-fetched marketing plans that they'd have no choice but to conclude somebody had lost their sanity - and since I was the one with the data, it would be clear THEY needed the straight jacket.

"Sixty percent of the people who use our service have pools and guns," I would announce. "We need a promotional piece to emphasize firearm use and water sports!" They undoubtedly had visions of the skeet surfing from "Top Secret!" pop in their brains. "All of our customers our calling from the largest MSAs (metropolitan statistical areas) - we're losing the rural customers!"

They did not ask for these statistics. They did not want these statistics. And I made sure they really and truly did not want them. I would always tack one or two at the end of every report, every memo, and into every conversation.

I survived the marketing group. Sure - I eventually fell to the axe when the company hit bad times, but it wasn't because of marketing.

And then I read XKCD today

http://xkcd.com/1138/

21 June 2012

Skylab Weather

The amount of orbital debris currently circling the planet is simply staggering. Of course most of it is in the paint-chips and urine-icicles. But, according to NASA, there are more than a half-million pieces that are between 1 and 10cm in diameter. Now, a lot of it will burn up if it reenters the Earth’s atmosphere, but there’s always that chance.

Is anyone old enough to remember Skylab?

In July 1979, after six years in orbit, the space station known as Skylab was de-orbited by ground control and aimed at a spot in the middle of the ocean. They missed. Skylab did not disintegrate as planned and, combined with other errors, portions of the space station struck Western Australia.

The TV show “Max Headroom” would later parody the fall of Skylab, with the falling of space debris a time of celebration and partying, with everyone wearing fanciful hats or carrying decorative umbrellas.

NASA had estimated the chances of Skylab debris hitting a human being at 1:152, with a 1:7 chance that debris would strike a populated city. The Orbital Debris Program Office official position is that modern-day orbital debris poses no significant risk to life or property; most of the debris burns up, and anything that survives is more likely to hit a body of water than land.

I sense a conspiracy theory possibility!

The same NASA office that tells us that there is no risk from orbital debris slamming into the Earth also readily admits that, on average, one piece of debris fell back to Earth EVERY DAY FOR THE LAST 50 YEARS!

I think it would be awesome to have an app for that.

Pros:

  • Anything that supports a conspiracy theory sells. If you combine it with outer-space it sells even better. If it could potentially pose a direct threat, it sells better still!
  • It is the right combination of technical precision with abominable accuracy that directly appeals to geeks. Done properly, a good portion of geekdom will download the app simply for the nerd appeal

Cons:

  • Niche hobby app - the app solves no real problems and isn’t likely to be entertaining after the first 5 minutes
  • If you don’t pull the debris catalogs and do real math, you’ll face a lot of negative comments. If you do, you’ll truly have wasted your time
  • For best results, the app is going to be graphics-loaded. A good app will be a tricky design

25 May 2012

-- --- -. -.- . -.--

So here is the first of the app ideas from that grab-bag-o-stupidity discussed in the previous entry. The title is your clue: write a Morse Code decoder!

There are a bazillion Morse-style apps in the app store, but I was only able to find one of them that decoded Morse Code (from the microphone, that is) into text. It's a fairly simple-looking app and it sells for $9.99. The ratings are either very high and very low - there are few ratings in the middle. There appear to have been only two releases, with the last one in March 2012 - in other words, you won't be fighting a massively entrenched player!

This is exactly the type of idea that is worth pursuing. If the user interface can be made to appear friendlier you'd certainly be able to steal some sales. And coming in at less than $9.99 would almost certainly get you some sales - you could go freemium by including ads and selling an upgrade to remove them.

Pros:

  • Morse Code is well established and easy, so learning curve is not hard
  • The iOS devices include sophisticated audio capabilities that will make identifying tones and pulses easier than having to do all that by hand
  • Good portfolio app: it solves a real-world problem that even non-geeks can intuitively understand

Cons:

  • Well motivated enemy: the established app writer is a Morse Code fanatic and no slouch with audio
  • Difficult to stand-out: the App Store is overflowing with Morse Code apps
  • Limited general applicability: more of a "neat-to-have" than a "must-have" or everyday utility

23 May 2012

Ideas Are Worth Peanuts ...


... a perfect setup for a blog post from a Code Monkey!

So periodically across the various iOS web forums various posters begin moaning about their lack of ideas for new mobile applications.  I have never understood either the point of these posts or the method behind them.  Yes, once upon a time I was a child who would bother my parents with cries of "there's nothing do" when there was truly a vast world open for experience not more than a few yards outside ... youth is wasted upon the young.  How can a person lack an idea for development?

Posting snarky responses to these complaints was always fun, but I'd usually also open up my grab-bag-o'-stupidity and throw out a few of the ideas contained therein.  True, some of them were truly useless, such as the shoe-sizer estimator app - snap a pic of your foot and it calculates your shoe size! - but perhaps a few ideas had merit.

I think the real complaint, never expressly stated, was that the original poster wanted an app idea as successful as Angry Birds and as easy to code as Tic-Tac-Toe (though other posters seem to have inordinate trouble with TTT too!).  With Tetris and PacMan already taken, though, I could only leave our angst-ridden posters disappointed.

And yet this idea that the IDEA is all-encompassing seems quite misplaced.  It's not - success requires hard work and there aren't any shortcuts.  Defining success as a $100B Facebook evaluation seems misplaced and pointless - that level isn't going to happen to a lot of people.  But success in terms of a good salary, a good life, and enough toys to stay happy?  Seems easy enough.

Of course, if there's an excessive valuation on the IDEA of the idea, then I'd be a foolish monkey not to capitalize.  As the stock market always teaches - there's bound to be a bigger fool out there somewhere (note: if you can't spot him - tag!).

So I've got about 50 ideas sitting here on my desk gathering dust.  That's easily going to make 50 more blog posts.  And with a few more days of thought I can push that number up to the magical 101 - and then I've got a book.

Heck, in my time I've bought more than my share of "101 Circuit Diagrams", "The Engineer's Mini-Notebook", "Make", etc.  It's rather embarrassing, really - shameful.  It seems to be a successful bandwagon, though - watch this monkey grab his cymbals and bang!

28 December 2011

Monkeying with the Pirates

So one of my main concerns with this latest update of Bakers Game is the cost. The marginal cost of a solution is practically zero - and so is its utility. This forces the cost per solution downward.

There are other considerations involved beyond a pure profit from Bakers Game, of course. As a technological demonstration it will be a nice feather in my cap. It will tie a lot of disparate programming elements together to make a nice personal challenge. I can use it as a geek shibboleth at parties. However the costs have to be kept down.

The main problem with costs will be piracy. Bakers Game has already been hacked and is available on various and sundry Chinese hacker sites. Some of them charge 99 cents up-front for the cracked version (sigh). If any idiot can download a cracked version and dump a boatload of solver requests against my EC2 instances my utilization spikes and my wallet empties. Securing the requests with encryption is pointless - it would restrict me to US and Canada sales only (stupid export restrictions), and the Chinese would simply drop some coin to acquire the key. I would see one sale and then a million solver requests.

So if the set { app , phone , user } cannot be trusted, there are only two things left to trust. I can trust myself and the servers I setup.

The user will purchase solution credits via Apple's In-App purchase. The app sends the receipt over to my servers - and my servers can establish their own channel to Apple to verify that the receipt is valid. If the receipt is valid the user is credited - and the credit amount is stored on my servers. Sure, the user gets a copy - but the official record is on machines under my control. The app then receives a randomly generated token from my servers for each purchase, and this token must be sent for any request.

What this means is that some enterprising hacker group will purchase solver credits and embed the resulting token into their cracked version. Anyone who downloads their cracked app, though, plays in the same sandbox as EVERY OTHER pirate. My problems are solved - I'm selling solution credits rather than unlimited access. The more pirates the faster the credits are expended for ALL of them. But it's also fair if one of the pirates opts to go legit - the purchase of credits generates a new token sent only to that phone!

More posts on the architecture will follow, but meanwhile ... keep coding!

18 December 2011

The monkey breaks the silence

So it's been quite awhile since the last post. Let's remedy that!

It's time to update the Bakers Game application. There were around 1,000 folks who downloaded version 1.0, which was absolutely fantastic for it being my first app. This has increased to around 4,000 for version 2.0 - with around a 65% conversion ration (updates from version 1.0). Interestingly, there are still some updates trickling in even today!

Upping the game brought bug fixes, more game boards, a cheat mode, and card animation. So it looks a lot like the other card apps out there no, except, of course, my app is still free and ad-less! And there are still very few solitaire games available that guarantee a winnable board. I find this strange, as it is not all that difficult to build such boards. I spent about $20 on Amazon EC2 - surely Big Company Inc can swing that!

So version 3.0 has to bring an even bigger change to the table ...

*** SHOWING YOU HOW TO WIN! ***


Let's be honest - there's more power in my 2nd generation iPod Touch than ever there was on a Commodore 64, but still nowhere near enough. Heck - there isn't even power on my 2.8 Core2 Duo except that I traded memory for speed - an option not available on a simple iPod, and not available even on the new iPad. However, there is an "always-on" Internet connection - and Amazon AWS services cheaply available.

The present planned architecture is going to use Amazon's Elastic Beanstalk to run the front-end processor, reserved EC2 instances for processing, SQS to move requests from the front-end to the processors, SNS so that the components can tell each other of jobs & solutions, and S3 as a backing store. The app will simply submit a request to the front-end, obtain an estimated callback time, and check back periodically.

Expensive? Hardly - the entire thing should weigh in at less than $100 per month.

Profitable? Hardly! All prices eventually get pushed down to just over their marginal costs, and the marginal cost of solving a board is INSANELY low. That said, I haven't run a market analysis so anything is possible.

DDOS attacks? Amazon should take care of that for me. It's doubtful anybody's going to start up their own EC2 instances to assault mine.

Piracy? Heh heh heh - bring it on! This one I've got solved - to the detriment of anyone using a hacked Bakers Game. I'll post more on this one because I think it's an excellent Akido throw to be executed in software.

Time to start coding ...

21 April 2011

Why would pirates steal a free app?

The refresh of Bakers Game Solitaire was released Monday evening.  By the very next day, Chinese hackers tore into the code, hacked it, and posted it on their site.  No - I'm not linking to it.  It's easy enough to find, if you want to pay the hackers $1 for my app.

The pirates' web site is, at least, amusing:

• "You may only download this app for evaluation purposes" - because you certainly wouldn't want to evaluate the free and legal version
• They prominently display my name - free ads for me
• They provide a convenient link to my app on the Chinese iTunes App Store - more free ads!
• And, apparently, it's not only English where they have spelling problems - h4x0rs sux!

My app download numbers are up, too.  Part of this may simply be the refresh and some chatter, but I think I also have to credit the pirates.  I don't read and write Mandarin, so their conversion of my English into Chinese is most welcome.  The pirates are building a buzz around my app that I would ordinarily have to pay decent coin for.  Hey, this app is worth stealing!  Even though it's free with zero distribution costs - it's still worth stealing!  The hackers are even paying for disk and bandwidth!  Whoo-hoo!

Now I'll freely admit I placed no anti-hacking / anti-piracy code in my app.  So cracking Bakers Game is a task easily done by the greenest of code monkeys.  But consider this - the time they wasted on my app is time they didn't spend cracking any other app.  Without any anti-hacking code, there's nothing there for the hackers to learn from.  It was nothing but a giant time suck.

At the end of the day I have more downloads, an amusing blog post, and I've delayed the pirates' hacking of other apps and content.  God I love winning!

Keep coding!

15 April 2011

The Waiting is the Hardest Part

It was 11:00 PM on 8 April that the refreshed Bakers Game went to Apple for review.

It is still awaiting that review.

Fortunately I've managed to keep busy.  I've identified a couple of ideas for new projects and selected one. I've pulled down the data necessary for it.  I've got some code written, and the code has spawned newer ideas.  One mega-project has now suddenly morphed into two mega-projects.

And still I find myself refreshing the "Waiting for Review" page.

It's not like this is my first rodeo.  I had one app take two weeks from submission to publication.  I've witnessed apps from other developers taking months.  One week is nothing.  It's a feeble drop in the bucket, especially when you see hundreds of apps going live every day on the App Store.  You just know your ticket number probably resembles this year's deficit figure.

BRB ... nope, still "Waiting for Review".

I've a ton of work to be done on my advertising campaign for Bakers Game.  I've got copy to write, I've got reviews to solicit, I've got to select my targets, and I've got to finalize my budget.  If Apple suddenly approved my app today I would be woefully unprepared.  It's not a bad thing they've taken this long; I've been very bad about getting my stuff together!

There just aren't enough hours in the day to get everything done.

But there sure would be more if I wasn't "Waiting For Review".

08 April 2011

Monkeying about with Amazon EC2

There are a lot of new boards required for the Bakers Game refresh. And I do mean A LOT. We're jumping from about 5,500 easy boards to 12,000. And we're more than tripling the number of standard boards - and it's the standard boards which take FOREVER to compute.

So I needed processor power - gobs of it.

And thus Amazon steps in. Amazon rents out processors by the hour, and for cheap! For 17 cents an hour I can run two solvers on Amazon's hardware, so although their hardware isn't as fast as mine, they have much more of it. And solving winnable boards is practically Parallel Programming 101 ...

I've been running the solvers now on Amazon's hardware for about 72 hours. And in that time I've managed to generate more than enough easy boards and am nearly complete with the standard boards. And for just a little over $22 - which includes my experimentations, too.

With any luck I'll be able to wrap everything up and post for Apple's review team this weekend! Follow me on Twitter (@lgehrig1) and you'll see exactly when.

Keep coding!

06 April 2011

The Bakers Game Refresh

It is time to update you with a few of the changes you're going to see in the refresh of Bakers Game:

1. Game state will be saved
If you exit the game the current state will be saved. I hadn't quite figured out the NSKeyedArchive bit on the first go, but it turns out that it's really quite simple. You'll be able to keep playing your game even if interrupted by a phone call. By far, this was the #1 most requested change.

2. Vastly improved UI
It was impossible to tell which card you'd hit in version 1.0. This wasn't a major flaw, but all the other card games highlighted or "glowed" the card that had been hit (or the stack that had been hit). I went a different route; having no initial success on the "glowy" graphic front, I threw in some placeholder animation that simply expanded and contracted the card's graphics. And this looked WAY cooler than any glowy-based graphic, especially when an entire stack is selected! You'll be pleasantly surprised at the end result.

I've also animated the card transitions so you can watch them flow from the tableau to foundation, etc. It's much better than the current "freeze-tag" interface.

3. Now a Universal app - play on the iPad in native resolution
I wasn't thrilled with the way the game looked in the iPhone emulation mode so I've rebuilt the app to support both the iPad and iPhone. It will even support orientation changes for the iPad.

4. More guaranteed winnable boards!
The game will still be free, but there will be 2,500 standard boards available, and 8,000 easy boards - all of which can be won.

5. Did I mention more boards?
For a mere tier 1 price (that's 99 cents for North America) you can expand the number of winnable boards to 5,000 standard and 12,000 easy. Plus, with your purchase, comes ...

6. Cheat mode - never lose again!
Only available with the boards package purchase - draw a big "C" on the screen with your finger and a card will be moved from the tableau to the foundation. Unlike most other Solitaire games, I don't track the cheats. It's a computer game - if it's not fun then people won't play. If you back yourself into a corner it's entirely your choice of retracing your steps or moving a wall, right? It's Solitaire! Who's going to care?

7. That other cheat thing - yeah, that's disabled
The move counts will not stray into negative territory. Sorry. THAT was a bug.


The new application should be heading to the Apple reviewers sometime next week; the code is done but I'm still constructing the winnable boards. I will be using the Amazon EC2 services cloud computing resources to blow through the rest of the searches - for less than $20/hr I can purchase resources equal to my home computer running for a day. I'll definitely be blogging my adventures there!

Keep coding!

25 March 2011

Faster than 200 monkeys per hour

"Sprouts - A Game of Maths!" was released very late Wednesday night; it is my third app to be released on the App Store.

Following my marketing monkey mantra, I hit Facebook, Twitter, forums, etc. and finish that night's work a little past midnight.

Thursday morning I login to check my app sales.  Sprouts opened at 16 - for historical comparison Bakers Game had opened at 20.  Bakers Game does it's average - only 3 sales, but it makes those sales consistently and every day.  Since Sprouts has opened exactly to Bakers Game's levels, I make my notes in my spreadsheet and go back to work.

Friday morning I'm working on one of my hopefully more lucrative apps.  It's going to be universal, so much of the day is spent trying to shoehorn my awesome iPad layouts into a 320x480 shoebox.  With some success, some annoyance, and some cursing.  But anyway, I don't check the sales until the night.

Thursday sales, for Sprouts, were 242.

242.

This calls for a check of the App Store!  And there I learn I've broken the Top 200 on Puzzle Games.

242 sales, 196th ranked.

This I had not expected.  It is amazing.  It's a measure that I'm on the right track, that I can trust my instincts, and that I should keep going with this experiment.  It also means I've got to get more apps out there!

So, many many thanks everyone who's downloaded any of my apps!  The future will not disappoint!

23 March 2011

Your Kung-Fu is weak, Young Monkey!

So the ghost of programmers past has paid me a visit.

I am replicating an analysis piece that I had written back in high school.  I have some of the original outputs generated but none of the original code.  And as we'd be talking Pascal on the Commodore 64 vs Objective C on the iOS platforms, I could care less about original code.

There is, however, a trick on the analysis.  I distinctly remember completely glossing over the problem when I was a teenager - it was a complicated problem, it didn't lend itself to a quick answer, it was going to be icky code ... WHINE WHINE WHINE.  I threw something in to approximate the correct answer and moved on.  As the output was really only for myself and an immediate circle of friends I thought this was an acceptable answer.

Unfortunately, when code monkeys take shortcuts, real people end up becoming monkeys.

The whole point to a computer program running calculations is ensuring the end user doesn't have to.  The computer SHOULD BE the monkey - it can run the numbers much faster, and to a greater precision, than any other primate.  Worse, when the calculations might take a human tens of minutes, the human will "guess-timate" and apply emotion in place of logic.

How many computer programs can you think of where it's clear that the programmer decided to get a latte instead of spending some extra time to finish the job properly?

How many times have you done calculation tasks FOR the computer instead of ON the computer?

Want a banana?

So ... it took around 2 to 3 hours to write that tricky piece of code last night.  About half that time was spent staring out the window trying to wrap my head around the next part of the problem.  I think the end result is pretty cool - it appears as effortless and graceful as a samurai's kata and will be about as difficult as one to replicate.

Truly, some excellent kung-fu.  Take that, young-code-monkey-me!

22 March 2011

Marketing Monkey

There sure are a lot of alliterations that can be done with the letter M.

It was high time to begin focusing on the marketing side of the independent coding experience.  My third app has gone into App Store "limbo" and is awaiting review.  I've asked for licensing information for my next hopeful.  And I've passed 600 downloads on "Bakers Game" - which is quite amazing since I've done no marketing yet!  So ... market, monkey, market!

LinkedIn ... Facebook ... and Blogging - oh my!

There are two projects currently sitting in my hopper: an update to Bakers Game and a new project for BattleTech.

Bakers Game really needs a refresh.  I still find myself playing it immensely on my iPod, which is good - if it becomes boring for me it certainly will be boring for everyone else.  Unfortunately, it looks like monkey poo on the iPad.  The user interface needs some cleanup, such as responding to touch & move events and perhaps animating the card moves (now that I've learned how to do it!).  An update should also include more winnable boards.  And I've also decided that the winnable boards should be solvable in realtime on the hardware - this way a button can be given to "hint" the user to the next move.  So I'm thinking a few thousand more winnable boards, and for $0.99 a few MORE thousand winnable boards & a brain.

There's a refresh to the BattleTech rules being published in a few days.  So I've certainly missed the initial boat on releasing an app here.  On the other hand, there's no reason to despair.  While monkeys don't float, they can wait for the next ferry.  I completed a nice proof-of-concept last night and sent away this morning to inquire about licensing.  Nothing to do now but wait.

Keep coding!