Monday, May 4, 2009

Stuck in the Middle

Have you ever started a computer programming project with high hopes only to become lost and disillusioned? Usually this happens after you've written a few thousand lines of code and have put a fair amount of effort into the project. Somewhere you realize that things aren't working how they should and the code becomes all tangled in your mind. Currently I'm "stuck in the middle" while working on MTG Forge 2.0.

This is my third attempt at MTG Forge 2.0 and I have a fair amount of things working, like the user interface, but the devil is always in the details. All of the millions of details have to be worked out and somewhere in the middle things tend to get worse before they get better. (You have to observe which parts need to be fixed, which is why things seem to get temporarily worse.)

The key to programming (and life) is to only worry about the major details and handle the small details one at a time as needed. When I program I don't plan much. I like the idea of UML and other diagrams, but to me the code is what is really important. Each object solves one big problem while each method solves a smaller sub-problem.

Sometimes the problem with "2.0 software" is that it tries to add too many features. Initially this was my problem but even when you cut features, the overall problem is still hard. Magic is a tough, but interesting, nut to crack and this explains why many Magic projects are started but never finished. MTG Forge is usable because so many features were cut, like phase stops. I knew I couldn't do everything right the first time, so I didn't try. Hopefully MTG Forge 2.0 will solve many of the deficiencies of 1.0 but it certainly won't be perfect. (Perfect software doesn't exist.)

p.s.
I've only had a sinking feeling after I've written a 5,000 or so lines of code. I feel sorry for programmers who spend any portion of their life on code that is never used or thrown away. (I would love to get my hands on the Magic Online 2.0 code which isn't being used any more. It would be interesting just to see the documentation.)

6 comments:

solfuries said...

trying to play the new version 4-24 on a mac and I cannot get it to run. I can still run the older 3-20 just fine by double clicking on run-forge.jar. However in on the newest version, it doesn't want to run. When run in terminal it gives the following error: Could not execute binary file

Love the program, want to try the new one. Thanks in advance for any help.

Chris H. said...

@ solfuries

Forge will run on my Mac, but I had to reset the java preferences.

Look in:



/Applications/Utilities/Java/



and launch the Java Preferences application. Under Java application versions on my computer I see:



Java SE 6 {64-bit}

J2SE 5.0 {32-bit}

J2SE 5.0 {64-bit}

J2SE 1.4.2 {32-bit}



You may need to drag these to change the preferred version and when you do try to restart Forge. Good luck.

solfuries said...

well that was easy.. silly me. thanks for the help!

Anonymous said...

I would like to thank you for your efforts of improving the forge software.The newer versions sure provides a lot (updated interface,card list,more card mechanics etc.) i am longing of trying the forge 2.0 and iam willing to wait as far as it takes! Please keep up the good work!

Fran├žois said...

Don't stop your work :) You're almost there! I also get the blues every once in a while :( but then I continue step by step, very slowly, and it's easier.

Forge said...

I'm glad that Chris can help out on the Mac side. I don't know anything about the Mac. I should add this to the faq.

Progress on version 2.0 is slow. Partially because it is just a big project and because I keep playing the current version (I love the quest mode).