Friday, October 05, 2007

How To Write Software In The Finance Industry

Here are some tips to help you write cutting edge software in the Finance Industry:
  1. Store some of your configuration in properties files, some in XML files, some in the database, and some as static variables in your code.
  2. Use reflection and dynamic proxies wherever possible. Where not possible, use byte code manipulation.
  3. Never ever use assertions. Catch all exceptions and errors, and keep running. Don't ever send an error back to the user. Unless it's a NPE.
  4. Log either nothing or everything. When logging everything, include verbose output from all your third party libraries.
  5. Always wrap your exceptions. Log the stacktrace from your wrapped exceptions only.
  6. Loosely couple all your classes using XML configuration. When you realize that you need to somehow call those classes, provide instance accessors using public static variables.
  7. Re-invent the wheel as often as possible. Write your own ORM. Your own remoting. Your own cacheing. Your own GUI framework. Your own testing framework. Your own widget toolkit. Your own scripting language. Make up excuses and benchmarks to show why you needed to re-invent the wheel.
  8. Make your code base as huge as possible. Include classes that were never used or tested. Use an abandoned experimental product to compile your classes. Make it impossible to compile in an IDE, and painful to compile from the command line.
  9. Create many sophisticated disparate systems. Integrate by FTP. Using flat files with pipe delimited data.
  10. User experience is not important. Create a slow, ugly GUI that uses a massive 2 gigs of RAM. Make 4 GB desktops mandatory for users.
Please feel free to add tips from your own experience.

Monday, October 01, 2007

Ten Steps To Becoming A J2ME Game Developer

In line with JavaLobby's Java Gaming celebration month, I present Ten Steps To Becoming A J2ME Game Developer:
  1. Buy and read J2ME Game Programming by Martin J. Wells. If you're short of time, read chapters 7 through 16. This book will help you wrap your head around the different concepts in game programming.
  2. Download and install the JDK, the WTK, your favourite IDE (Eclipse or Netbeans) and the J2ME plugins for your IDE (EclipseME or Netbeans Mobility Pack).
  3. Download and install Ant and Antenna (J2ME tasks for Ant). The only way to deal with device fragmentation is to create a flexible build script that allows you to use device configuration files and a preprocessor to create device specific jar files.
  4. Download and install Proguard. You will need to obfuscate your code to fit into the operator limited jar size.
  5. Download and install the latest SDKs and Emulators from Nokia, Motorola and Sony Ericsson. You will need to test on these emulators as well as on some actual devices.
  6. Download and install GIMP for graphics, Audacity for sound effects, and AnvilStudio or RoseGarden for MIDI music.
  7. Download and install Mappy to create your 2D tilemaps. You don't even have to write your own level editor these days.
  8. Create your 2D tile based game. Besides the book mentioned above, the forums at J2MEForums has all you need to know to write your first game.
  9. Submit your game demo to the GetJar's beta testing program. This will allow you to identify any remaining device compatibility issues.
  10. Publish your game with mobile game portals like ClickGamer, and advertisement wrapping portals like GameJump and Hovr.
  11. Profit ?!?!
For a hobbyist, J2ME is the best platform to begin writing games: free and excellent tools, easy to program, easy to deploy, and a friendly community too. Anyone and their dog can write a game in 3 months that's as good if not better than some of the games being churned out by the big game studios. So follow my Ten-Step program and start writing J2ME games today!