Sunday, 24 March 2013

A real life project: Early choices that need to be made

At this stage I need to make some important decisions for the project. These choices will become more difficult to change once I start so I want to make sure they are kept to the minimum but necessary.

The thing I'm trying to do is to tell the big story for the system in terms of software development rather than just the business. At the end of this posting you should have a good idea about what I'm going to build and how I'm going to build it.

The language

I can't do anything without first deciding on a language to use. For that purpose I've decided to go with Python. I've got tons more experience in C#, but Python does have some pros:
  • This is a learning exercise and it's a great opporunity to get my Python skills up to a decent level
  • I plan on using free code from other sources when available. Lookng around the web I came across a lot more useful Python than C#
  • Python is a dynamic language, so I'm guessing that this will make development easier (sounds like famous last words)
  • It isn't C#
This decision doesn't come without risks, and it's best to identify them now at least:
  • I'm inexperienced, having done little more than kata's in Python
  • Refactoring; I've heard that refactoring tools in dynamic languages aren't as good as the refactoring tools for dynamic languages
  • Tooling in general. I'm used to the juggernaught that is Visual Studio .Net and here I'm reducing myself to the free and opensource world 

Communication in the game

I need some way for the dealer and palyers to communicate, so after a little investigating I've decided to follow the guys in the GOOS book and use XMPP.
Advantages here are:
  • It's what they used in the book
  • It's a standard
  • Python has a few nice libraries available for the purpose. I'm going to use SleekXmpp 
  • Again, lack of experience. But I lack experience in the whole area so I can't avoid this risk

The Architecture

Everything you've read so far would fall under the heading architecture, that is, if you have read it. There is a chance that you've just skipped through the above text and jumped to the picture, so here it is. All of the choices I've mentioned above should be in this picture.

The Development Environment

So, whats the requirement in a development environment? Well, I want to be able to work as quickly as possible, have as much integration as possible and achieve lots while doing very little. To be more precise I need:
  • A nifty editor. Someone recommended Sublime Text to me a while back and I'm pretty happy with it so far. It's got some cool plugins so I reckon it should meet all or most of my needs.
  • Source control, I'm choosing git. Again this will be a learning experience because I haven't done that much with git. It integrates nicely with Sublime Text though.
  • Continuous Automated testing. NCrunch got me addicted to this and I was gutted when they started charging a lot of cash for it. I'm going to use some python scripts combined with Growl to achieve this.
  • Refactoring. It's a must. I don't know how I ever developed without it (waaay slower at least). It's really suited to a static language like C#, but how will it fair in a dynamic language like Python? I'll be using the Rope extension for Sublime Text.
  • Testing. I've got PyUnit for writing the tests, but I still need a way to do end to end tests. Seeing as the main UI will be the console, I've written a script to intercept any writing to the console. Hopefully this will do the job. 
This is all I can think of for setup now, anything I've missed will have to be added along the way.

One of the things I love about developing today is that more than likely someone else has done something before and blogged about it. Most of the development environment decisions came from this posting.

Next step is to do some analysis on the basic behaviour I expect out of the system.

No comments:

Post a Comment