There are two things that I think people should get out of this set of code:
First, I tend to just copy an existing file and then delete a bunch of stuff out of it to create new modules. I sometimes use the module builder but generally just start out by copying an entire module directory, renaming the files, renaming the functions, and calling it done.
Second, especially at the beginning I do a lot of
//TODO something kinds of things. Basically the process is that as I'm working on some bit of code and I'm in a particular line of thought, an idea will come to me of some other thing I need to do. Rather than derailing my current thought process, I will write a quick //TODO comment to remind me of it and then get back to what I was working on. The hook_nodeapi is kind of full of //TODO at this point:
// TODO for trades:
// TODO if it's a contract buy/sell set the price to 1 and give them a dsm
// TODO Validate the order prior to submit to make sure they can currently enter it
// buy orders need to have enough money
// sell orders need to have the shares
// TODO state the upside/downside of the position prior to submission
// TODO for contract groups:
// TODO some ability to open/close trading on a group
// TODO for contracts:
// TODO On load pull up last price
And that's just the beginning!
I tend to use TODOXXX to mean stuff I really need to do MAYBEDO for things that aren't so important.
That's about it - leave comments here if you have any questions or ideas. And please don't download this and expect it to do anything legitimate just yet!
Edit: I changed the title to be more explicit that this is about a Drupal prediction market module and not just "the first prediction market checkin to cvs ever." It's not like it's all that groundbreaking so a little more qualification seemed appropriate