Tuesday, October 18, 2011

Sandra Lee Measures Shots like I do



2 shots of vodka!

Tuesday, October 11, 2011

Beers with BitBucket

Thursday night I'll be having a beer with the BitBucket team in San Francisco.  If you weren't aware, bitbucket is a great tool for storing your source code online.  You can use Mercurial or just recently Git as well.

Anyhow, tonight I'm finally killing off that handle of Vodka and moving on to Rum, which is preferable to me anyway.

Stage 1: planning

Before I write any bad code, I plan to at least jot down some thoughts on the flow of the program, and the algorithm for how the game is played.

Assumptions:

There could be 1 or 2 players.

One or both may be a human, and the other may be a computer.

There could be a single player mode played against a clock or just for kicks.

The number of cards might be 24, or 52, or 32, or some multiple of 2.

We'll account for a max of 52 cards.

KISS:

1 player, forever alone.  24 cards.

The flow:

Player is presented with all the cards, face down.  Player can then turn over and see 2 cards.  If they match, they stay face up, otherwise they go back to face down.  The player is supposed to remember their position and what was on them, hence the title of the game.

The game is over when the player has turned all the cards face up.

The algorithm:

Create the deck.
We assumed 24 cards, so 12 different cards, in pairs.
Randomly spread these cards around the board.
Start the clock on the first click from the user.
Follow the flow outlined above.


Now that we've gotten the super duper hard stuff out of the way.  Let's mess up some code.  I'll be programming this in python, because I'm drunk.  Much like some of my Hispanic friends who revert to spanish when heavily intoxicated, I revert to python, or perhaps C, but no one wants to read C code.

Monday, October 10, 2011

Note to self: Obtain breathalyzer

While I haven't quite hit the Ballmer Peak I continue to drink.  Lest I turn out another Windows ME in a bout of blackout drunkenness, I am sticking to vodka, and avoiding whiskey.  One thing I've learned in my life is that it's ok to keep it simple.  Wikipedia says I learned it here, but I was never in the Air Force, so obviously the Keep It Simple Stupid mantra has legs beyond the armed forces.

For my first project I plan to write from scratch a program that will test the user's ability in a field that smarter scientists than I have claimed can be negatively affected by alcohol.  If you've ever woken up from a night of heavy drinking and thought to yourself, "What did I do last night?" Well, you've probably experienced some form of memory loss.  My game will test and perhaps even improve that skill: Memory.

If you can remember your childhood, perhaps you can recall a simple card game of flipping cards over to find the matching card.  This will be that game, but now instead of having to drunkenly remember where you put the cards, it'll always be available right on your computer, in some folder, somewhere.