Wanted: Simple 2D Game Framework

ab_dI want to write a simple kid’s game. It would show something like “A B _ D”, then speak “What letter is missing?”. If you hit the “c” key, it would say “Congratulations!”. If you hit any other key, “Try again!”.

Anyone have pointers on game-creation frameworks? I’m looking for something cross-platform and very high-level. I want to be able to write and play the game in a few hours max.

These look hopeful: ScratchLÖVE, RacketAlice, Pygame.

I want this crawl version to be as simple as possible. Eventually I might want to add score tracking and animations.

I could also create a web-based game that would work, say, in a web browser on an iPad, but this smells a bit more complex than I’m hoping for right now.

Here are a couple other related links I came across while poking around:

Hire This Guy!

I’m looking for work. Here’s my resume.

I’m passionate about doing things that matter, and doing them well. I’m a leader with experience. I lead by serving my business, bosses, and coworkers. I solve problems efficiently and I always add value.

I’m a pro at pretty much any back-end, devops, sysadmin work. I have a strong preference for using Free/Libre/Open Source Software (and contributing back upstream often). Most of my career has been websites: PHP, Python, Java, Perl and the like. I’m experienced with SQL and NoSQL databases. I can do front-end work except graphic design. Most recently I’ve been coding a lot with PHP (specifically, Symfony2), AWS APIs and MongoDB.

I would love to do work right now which involved cloud automation, specifically, Amazon Web Services infrastructure provisioning. I could easily automate the setup for a very robust, high-traffic web/mobile service. I’ve had years of experience with AWS and want to work with it more. But that’s just one idea—I’m pretty flexible.

I love learning new tools and tech. I do so quickly, and I’m generally at my best (performance and happiness) while I’m learning. So if I’m not already versed in whatever tech your business needs to succeed, don’t worry, I will be soon.

Tweet of same

Update 2012-12-14: I’m now seeking full-time work in Seattle

Effectively manage sets of scratch/debug/dev-only changes with git

There are always some changes that you make temporarily but must never make it upstream, such as development-specific debugging instrumentation. The trick is to keep track of these but never send them upstream (to a repository you share with others, for instance).

Unsuprisingly, git’s got a way to handle this. Thank you, Karl Bielefeldt!

Assuming master is the upstream integration branch…

# just once: create branch for dev-only changes
git checkout -b common-dev-changes
 
# get latest upstream changes
git fetch
 
# rewind/replay common-dev-changes on top of master
git rebase origin/master
 
# switch to topic branch for a new feature/bugfix
git checkout -b topic-branch common-dev-changes
 
# ...edit files, debug, commit, etc...
 
# prepare to push - remove dev-only changes
git rebase --onto master common-dev-changes topic-branch
 
# switch back to master
git checkout master
 
# merge feature/bugfix code into master
git merge --ff-only topic-branch
 
# ...do integration testing...
 
# share your work!
git push

I’ve been jumping through all sorts of hoops like always having locally-modified files, git stash, even keeping patch files around. These techniques quickly become unwieldy with larger sets of changes because you forget why you authored a change or you accidentally push it upstream. rebase --onto was hiding in git-rebase(1) all this time, but I just discovered it today thanks to Google and stackoverflow.

If you don’t want the technique I outlined above another answer on that same stackoverflow post outlines using the git index (git add -p and friends) for managing your dev-only changes. That might be a handy stepping stone, and will provide tools you’ll still need later even when you are savvy with branching and rebase.

Tweet of same.

Amazon Prime: Marked Up?

I used to think I was so shrewd and sneaky by shopping at Home Depot with my smartphone in hand, scanning barcodes and finding lower prices on Amazon.com. But during the past few trips I’ve noticed Home Depot has the lowest prices!

Sure, free shipping for Prime, but is Prime stuff marked up?

UPDATE: “prime” was misplaced, above. Really I was just wondering if Amazon prices are marked up to cover shipping costs. Prime needn’t enter into this.

List largest MongoDB collections

I wanted to know the top five largest collections in my MongoDB database in terms of document count. This JavaScript gets the job done.

// config
var dbname = 'dev_bv';
var measure = 'count'; // or 'size'
var numTopCollections = 5;
 
function updateTopCollections(collection, stats, topCollections) {
    var thisCollectionObj = {
        'name' : collection,
        'count' : stats.count,
        'size' : stats.size
    };
    for(var i = 0; i < topCollections.length; i++){
        if (stats[measure] > topCollections[i][measure]) {
            topCollections.splice(i, 0, thisCollectionObj);
            break;
        }
    }
    if (topCollections.length < numTopCollections) {
        topCollections.push(thisCollectionObj);
    }
    if (topCollections.length > numTopCollections) {
        topCollections.pop();
    }
}
 
db = db.getSiblingDB(dbname);
var collections = db.getCollectionNames();
var topCollections = [];
 
for(var i = 0; i < collections.length; i++){
    if (collections[i].match(/^system/)) {
        continue;
    }
    var stats = eval('db.' + collections[i] + '.stats()');
    updateTopCollections(collections[i], stats, topCollections);
}
 
printjson (topCollections);

Save it to a file, edit variables in the config section, and execute like so:

mongo --quiet topCollections.js

Here’s a gist of same: https://gist.github.com/4150940

Go ahead, put it on top of the car

You’re getting in the car, and you’re in a hurry. You’ve got your hands full of important objects, yet, there’s a handy, flat, perilous surface right in front of you: the top of the car. Perilous because of the off chance you forget to remove said important objects from the top of the car before you race off to your destination.

But fear no more. Go ahead and use this handy surface. Just set your keys down, too!

Yeah yeah, you’ve got a spare key in your pocket, one of those start buttons that works when the key is nearby, or something like that. If that’s you, you’re on your own.

But if you’re me, you’re stoked.

BreadVault iPhone app in 2½ minutes

BreadVault is a tool to help you teach a child and yourself fiscal responsibility. It’s also my job! Here’s how to add a goal using our iPhone app.

  1. Install BreadVault using the App Store.
  2. Touch “Log in with Facebook”.
  3. Add a family member. If you don’t have kids, add yourself. Set allocation sliders to 100% Save (you can change this later).
  4. Log in as the family member you just added and scan a barcode (see photos, below). Don’t worry if the price isn’t right, you can change this later, too.

Initiate barcode scan from family member dashboardScan a barcode

The next time you’re in line at the store, add a goal instead of making a discretionary purchase!

Other Tips

  • For some more why and what about BreadVault, see How my 3-year-old bought herself The Lorax.
  • iPhone+Facebook is probably the easiest and most convenient (but definitely not the only) way to use BreadVault. BreadVault HD is the iPad-optimized version. And of course there’s our full-featured website. We’ve got plans to support Android and Windows 8, too, so keep your eyes peeled for those.
  • You added this goal when logged in as a family member. To make progress towards the goal, add funds using the Family Dashboard. Touch the upper leftmost corner of the app, and touch “Family Dashboard”. Try adding, say, $2 per week to the family member. To check goal progress, log out, then in as the family member. Touch the piggy bank to view Save goals.
  • Once the goal is met, a blue Buy button will appear next to the goal progress bar. Use that to purchased the earned item.
  • Saving for discretionary purchases is one facet of fiscal responsibility. Charity and investments are others, so next time check out the Give and Invest channels!

Science Fiction

I like Science Fiction because it scares me. It opens my mind to new ideas.

And sometimes the fiction becomes reality.

Just the other day I finished Robopocalypse (a great read!). Today I thumb through my news feed and hear that California just joined a couple other states in legalizing self-driving cars and Toyota continues to make progress with domestic helper robots.

I don’t see the singularity coming any time soon, but it’s easy to see our tools evolving rapidly. Our responsibility towards each other must grow commensurate with the evolution of our tools.

Amped is great so far, too. I just happened to watch The Hunted lately, which also explores the theme of technology-enhanced individuals being rejected by mainstream society. Like Dr. Steve Mann’s beating in France. Discrimination is certainly old news; I believe we love the familiar, and it follows the unfamiliar generally is harder to accept. But this challenge is exactly what makes the unfamiliar awesome.

Wanted: fair curated tweet list

I think I like Twitter. I’m getting to like it, anyway. One problem I have with it is what appears to be an overwhelming emphasis on timely and copious posting.

I often miss tweets from my VIPs (friends, family), especially those who post infrequently. I want something that shows me the last few tweets for a list of people I specify.

Twitter’s “lists” feature comes close to this goal, but (like every other Twitter client I’ve seen) it shows every tweet and the most recent first, so infrequent tweeters are still penalized.

What would really unlock this problem for me is if there existed a REST API to pull a few tweets from several users at once. Anyone know if such a thing exists?

I’m also interested to know if there’s an extant client that does what I’m describing. I wouldn’t mind not coding this.

UPDATE (30 minutes later):

I cobbled something together that basically does what I want. I only slightly modified Kevin Liew’s dead-simple jQuery-based example to make my app. I just factored out the user parameter to JQTWEET.loadTweets() and now call it multiple times, once per VIP. Even with a list of 50 VIPs I can run this less than once per hour and still avoid rate limits.

UPDATE (2012-09-27):

Another idea, no coding required: subscribe to the RSS feeds for each VIP in your favorite feed reader.