[Tutor] New programmer, need some help getting started on my first project

Chris Delgado prowlerslim at yahoo.com
Wed May 17 22:38:45 CEST 2006


Kent, 

Thanks for the reply.


"I would pick one input format and work on a program that reads it and 
generates some kind of events for everything significant that happens. 
At first the events could be just print statements, later they can 
reformat the data to the required output format.

 From your description it sounds like there is no need to create an 
internal data format that holds all the data for a hand. A simple loop 
to read an event, parse the event and output it in the new format might 
be enough. It would help a lot to see some sample data.

For a project of this (small) scale I don't do much design ahead of 
time, I let the design emerge from the code as I solve the problem. I 
would start by writing the simplest program that could possibly work to 
convert a single format. When that is working then look at what is 
needed to add a format. This will probably involve some refactoring, 
introducing functions or classes that are specific to your problems. 
When you have two or three formats working you should have a tool set 
that will make subsequent formats easier.

If the data format is complex a parsing library like pyparsing might be 
helpful. But without seeing some data and trying to parse it there is 
no 
way to know."

Here is a sample hand history. 

Failure To Launch 8161071-72989 Holdem No Limit $0.50/$1
[May 17 03:26:33] : Hand Start.
[May 17 03:26:33] : Seat 1 : bnb3 has $92.50
[May 17 03:26:33] : Seat 2 : pineaa has $15.25
[May 17 03:26:33] : Seat 3 : prowlerslim has $107.50
[May 17 03:26:33] : Seat 4 : Marcelluz has $174.74
[May 17 03:26:33] : Seat 5 : texredfsh has $35.25
[May 17 03:26:33] : Seat 6 : aloo has $98.37
[May 17 03:26:33] : aloo is the dealer.
[May 17 03:26:34] : bnb3 posted small blind.
[May 17 03:26:34] : pineaa posted big blind.
[May 17 03:26:34] : Game [72989] started with 6 players.
[May 17 03:26:34] : Dealing Hole Cards.
[May 17 03:26:34] : Seat 3 : prowlerslim has Ah Kc
[May 17 03:26:38] : prowlerslim called $1 and raised $4
[May 17 03:26:41] : Marcelluz folded.
[May 17 03:26:44] : texredfsh called $5
[May 17 03:26:46] : aloo called $5
[May 17 03:26:49] : bnb3 folded.
[May 17 03:26:52] : pineaa folded.
[May 17 03:26:53] : Dealing flop.
[May 17 03:26:53] : Board cards [Kd Td 5d]
[May 17 03:27:01] : prowlerslim bet $10
[May 17 03:27:04] : texredfsh called $10
[May 17 03:27:06] : aloo folded.
[May 17 03:27:07] : Dealing turn.
[May 17 03:27:07] : Board cards [Kd Td 5d 3c]
[May 17 03:27:14] : prowlerslim bet $21
[May 17 03:27:19] : texredfsh folded.
[May 17 03:27:20] : prowlerslim wins $34.75 as the last player standing
[May 17 03:27:22] : Hand is over.


Im trying to work this out as we speak but not getting too far at the moment. I'll keep plugging along


		
---------------------------------
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20060517/74fa1a9c/attachment.htm 


More information about the Tutor mailing list