Wednesday, November 14, 2007

Data Extractor Utility

After some hours of hell with my junk-code, I decided to rewrite all of it. There are many reasons for that.
  • Totally mess-style code.
  • No suitable database access class at all.
  • No logging class for best practices.
  • Not full structure of objects.
  • Some things in fallout-investigations changed.
Let's take deeper into this.

1. Code is awful. No standarts, no style, no specialized classes. It looks like a great mount of stones, that you first have to climb up to, and then take all the stones one by one to the mountainfoot to build a great castle. There are no reasons I should be doing that.

2. No database class means a mess in the main program, you have to write same dosens of lines of code over and over again. You can't easily change database. You're unable to use some database access standart in other solution-related projects. In one word you're creating headache with your own hands.

3. There's no need to say, that logging is pretty important in all aspects of development. No matter, you're developing a simple database application with few controls of programming a huge industrial database-driven mega ERP. You need to log errors, warnings, traces, exceptions and a large variety of other data you may need to review if something happens. It's always useful if you make your logging class able to write logs to simple files, SQL server, System events log, send logs by e-mail and other special handlers.

4. In some strange way I was sure I had a description for all types and subtypes of Fallout objects. That turned out to be partially true. I have a single proto-object, which holds data that is same for all objects in a game. Then I have classes, inherited from proto-class for each object type (like "item", "scenery", "walls", "tiles" etc.). And finally I have some inherited from them minor classes to manage data for the object-types, that have subtypes. That is all I have. Not too bad for the start. But...

5. I looked through some of the latest releases of fallout objects structure documentations and found some inconsistencies with the object structure I have built four years ago. So I have to spend some more time getting familiar with the latest fallout-rippers documentations.

That's all for now.

No comments: