Saturday, September 29, 2007

Hybrid Apps

Facebook integrates with NetVibes, and Windows Live Messenger has been ported to MacOS... cool first step. I like the fact that Messenger notifies me when I'm receiving a message, or a contact has joined the party online, but it's really the only program on my system that I allow to deliver popups. I would like to receive popups from Facebook and GMail as well—that might encourage me to do a better job of policing my inboxes and notifications. A unified API that supports all three applications might be too much to ask for.

Friday, September 28, 2007

Web Content Dev Kit

So the word on the street is that Aptana IDE for Eclipse is THE new hot environment for web developers who want to write code. I'm going to teach NVU instead, because it's better for businesses. OK? Ok..

Saturday, September 15, 2007

XML Developer Toolkits

C# has a framework called MSXML and Java has the SAX Parser. Web browsers are trained to parse XML already, and Adobe has Spry to enable page authors to parse XML documents from external sources. Spry therefore seems like an ideal toolkit to prototype and describe functionality of our XML toolkits in online documentation! Testing functionality therefore becomes a trained-monkey style task like lever pulling, of comparing program output to the documented specifications, which is slightly less complicated than blackjack though it can also be profitable.

The application that I have in mind is a tool for foreign language students to enable homework collaboration. This is basically a dictionary which will live on http://thursday.nerdland.org/dict. The interface should allow a web user to click on a word on either side of the line (eg. arabic/english) and edit the word; a third comments field will also facilitate collaboration over confusing translations. Adding a new entry should be as simple as clicking an empty field and entering some data. I'm not interested in an overcomplicated accordion-style user interface at this point!

C# application users will have the choice of a Cocoa-Sharp or Windows.Forms interface depending on their platform, and these applications will edit the data locally, as it is checked out of subversion into a sandbox, or remotely onto thursday, where anonymous updates are periodically noted and logged into the subversion repository. Therefore it is necessary for users to register and receive write access to the repository in order to receive credit via svn blame. I wonder if this problem is solved by monotone, mercurial, or any of the new scm tools on the market?

After The Hardware

So we've got all the hardware we need to start our own pirate internet here at home, and the neighbors aren't having a fit about it yet. What we need to do now is to start broadcasting our signals into their homes, and allowing their wireless devices to hop on and authenticate themselves. How do I support wireless handshaking like RIT Claws without requiring a paper exchange to securely transmit passwords? IMHO conventional wisdom dictates a paper exchange is necessary to have a contract or to securely and reliably transmit a password. Telecom companies don't always operate that way.

Thursday, September 13, 2007

Developers Toolkit

A proof of Card Counting for the game of BlackJack is quite simple: a text-based application could simulate a dealer playing standard Las Vegas rules with a table full of players using Card Counting strategies to fix their bets, and any sort of strategy to determine their playing style.

The simulation that I have in mind would run for 10,000 hands with a table of four players. A successful proof would show that after 10,000 hands, each of the players has increased their personal stash of cash by a substantial margin. In a casino, the pit boss would surely suspect some inequity if four players played 10,000 hands at once, all draining cash out of the bank.

To win at blackjack, my experience has been that it is possible to read a table rather than sitting for 10,000 hands, and to simply pick a winning table before sitting down. How exactly do you read a table? If I make my millions in a casino, then I will write a book and tell exactly that. My training is as a programmer, so today we will play Hack the Planet instead.

It would be nice to produce a playable game with a graphical interface as well; an efficient simulation could probably play 10,000 hands in a matter of seconds, but we wouldn't get to play or watch the dealing happen; how unrealistic! One of the goals of this project will be to produce a graphical player interface to show at least the cards on the table.

For a good simulation, our program should allow an individual player to carry a card or two around with him, and optionally depending on the various data protection that is in place, to pick up and put down cards. In a casino, the dealer is the only one dealing, and there is one dealer per table, so our simulation will make some accounting for the possibility to cheat.

Tools for the developer:

  • Subversion—Some simple revision control software that enables neat tricks like distributed development teams. This one is free, compare to PlasticSCM for a commercial alternative built exclusively using C# and Mono.
  • Vim—A text editor is necessary to write code or documents in any language. Vim is a modal text editor. Explicit instructions from Axel, please don't write your code in Word! Compare to Acrobat Professional for a commercial alternative with a print focus.
  • WebSVN—I use this to put an interface on top of the code. Does anyone want to take a look at the changes over time to your Subversion code base? It's easy to do, you can even subscribe to the updates with an RSS reader.
  • Interface Builder—Lay out your interface using Cocoa .nib files, and load them from inside of your application to get a player interface set up. This is the only part that should not translate to Windows and .NET proper as it is defined by Microsoft.
  • C# Code—This is another attempt at a BlackJack simulation. This code failed to compile in the latest Visual C# from Microsoft, and I suspect that it is pretty old. Still helpful to establish the game logic including some graphics that can go in the Cocoa UI.
Finally the various cards and card piles should be represented as XML data so that this development effort has a chance to satisfy Axel's requirements and earn some course credit for my degree. Still anticipated is a chip counter, as well as simulations of Poker and Hokm.

Monday, September 3, 2007

Moving Right Along

After that colossal failure at making something of myself in the web development industry (well it's not so easy to hit the ground running after a long break, don't you know it) I'm going to try my hand at some application development once again. The Molly Project was not my thing, really the problem is mostly that I googled and I couldn't find any tutorials whatsoever.

In fact all I found were some non-functional demos and I got the impression that I would have to install the code and learn all of the development tools, then make contributions by myself to the existing code-base before I would even generate a single useful application. Hey man, that's a raw deal.

Compare to the work flow of the printing industry: business people don't buy posters so they can hang them on their office walls and have them look pretty, they finance marketing campaigns so that their products will sell harder better faster longer. If Molly Project is a product, lets just say that from the marketing campaign I am thus far not impressed.

Consider: There are sharks and there are bankers.

Bankers keep an inventory of resources and hand out their resources based on complex algorithms that are studied and modeled by Computer Scientists. Sharks don't need to know math. Sharks love bankers, because sharks know exactly what they need to have in order to get on with their job as a shark: eat more animals, and go on living until some time near their own death.

Sharks go around asking bankers for food, and bankers give it away so long as they are not strictly married to the idea of population control. Sharks and bankers both live here in the world with pirates, and a pirate is another idea altogether. They're really only ever important if you concern yourself with entertainment. This may come soon.

Also: a pirate tends to require a ship to protect him from the harsh seas and from the elements. Coincidentally, both bankers and pirates are animals that sometimes ride inside of ships, so the ship should be built strong to help protect against sharks as well. Pirate ships usually have a crew. The job of the crew is to see that the ship remains in working order, and not full of water, lest the sharks take over.

What was I on about? So much for applications; anyway I'll model a game of Blackjack and some players, to see how the various strategies perform, and to get myself accustomed to the C# language. Blackjack is a good game for a computer scientist. The players play against the dealer, not against each other, so the players are all in the same boat, so to speak.

The dealer is essentially a robot who behaves according to rules, and handles the bank's money to pay winners and collect from losers. Dealers have no free will; they must hit up to 16, and if the dealer is busted, all of the remaining players who are left in the game are winners. Players always have the choice to place a bet, and to hit or stay.

If you never hit then you can never bust; this is fundamental. Card counting strategies attempt to predict the odds of a dealer bust before the draw, based on the number of cards of each type (high or low) that have been drawn already, and the number remaining in the deck. Is it possible to do this with statistical reliability?

It sounds like a strategy to me, but does it actually improve your odds against the house? That is a perfect job for a computer simulation! Maybe we can get on mythbusters. Start with both BlackJack using C# and Visual C# 2005 Express Edition, that should be enough to get you simulating a heist on the house. For detailed reporting capabilities so we are able to inform the world about the reality of casino rules and the existence of Santa Claus, we will want to include Visual Web Developer 2005 Express Edition and the Reporting Add-In as well.

I have yet to use most of these tools, and I'm looking for a qualified instructor. If you want to learn together, please contact me.