I saw SoftballStats on freshmeat last week and decided to try using it. My teammate Scott kept the stats in an Excel spreadsheet last season and we wanted to see if we could do something better this year. There is a lot about SoftballStats to like and there is also a lot that could be done better. I didn’t touch the database structure at all, but all of the code is procedural and each page is a different file with a good deal of code repetition. At some point when I have nothing else to do I might go through and refactor everything (create a template, functions, objects, etc.); as it is I just hacked up what I found making things worse in several places and doing minor cleanup here and there.
I made a number of changes/additions:
- Added On Base Percentage
- Added OPS (On Base Plus Slugging)
- Moved the player stats and game list to the home page
- Added a box score for each game
- Added a game log for each player
- Fixed several computation bugs in the totals and other misc. bugs
You can see it running here.
Although the back end isn’t as clean as it should be, I’ve hidden all the duct tape fairly well. SoftballStats is released under GPL and David Carlo (the author) responded that he’s pretty busy right now when I offered him the code for my changes so at some point I might release the version I’m using (with my changes).