MySpace


Seth Eden



Last Updated: 5/5/2008

Send Message
Instant Message
Email to a Friend
Subscribe

Gender: Male
Status: Single
Age: 32
Sign: Taurus

City: Apple Valley
State: MINNESOTA
Country: US
Signup Date: 2/2/2006
Wednesday, June 14, 2006 

Current mood:  sad

Right then,

So I was working on my latest program at my new job. I called it Fab-Lab, a Lab for doing graphics for a company called Fab-Con. It's actually just a play on words, because they have another custom application called Fab-CAD that works with AutoCAD.

Anyways, I've been having this problem the last few days, and it's my own fault, partly because of how I decided to design the software. The program outlines these pre-fabricated wall panels in a building drawing, and builds a roof segment. Well I decided to break the process into classes and class objects to make use of powerful Object Oriented Programming Techniques, like Class Inheritance, and encapsulation, and cool things like that, that you generally only truely learn about if you take a proper college course on the subject.  Or unless of course your a book worm/computer genius. I digress, So I decided to tier everything that was doing work for or on roof segments through a List Box control class that would contain a list of all the roof segments. Well I had to initialize the list class, and link it to my class structure when the program first starts. I couldn't wait for user input to account for that. So I needed to find a way to make it execute when the program loads. Well I tried a number of system level events, but none of them would work. Most of them would end up getting called again after some user input may have triggered those events to happen again in my program. Nothing would allow me to execute it ONLY at the start of the program. A few good possible events to use where On_Enter, VisibilityChanged, or Initialize. But none of them would actually work. Apparently On_Enter was for when the User presses the Enter key which was completely worthless since that could happen at any time during my program. VisibilityChanged was already being used to make the program appear and disappear to allow the user to make selections of objects in AutoCAD, and Initialize was for something completely different...namely the GUI.

So I devised a plan. I built a new function called FabLabInit and passed it the object of the ListBox. Then I called called that function from my Initialize sub routine.

It worked perfectly, except for one thing! If I wanted to make any changes to my GUI, my GUI was broken because the call I inserted in the GUI Initialization. So if I wanted to make any GUI changes, I would have to comment out that line of code.

Well I was getting along just fine, until today, when I decided to make a change to the GUI. I remembered the errant line of code and commented it out. Then I toddled off to adjust my GUI. But here is the kicker, I forgot to un-comment that critical line of code. Rather I meerily went off testing my new GUI, and suddenly discovered that my entire application was broken.

Of course the immedate understanding is that I did something wrong when I made one of my changes. So I began tralling through my code trying to find out what it was.

I found a number of errors and fixed them, and realized that having a problem is always the best thing because you go through and find so many other little things that need fixing.

Finally after about an hour, I remembered the errant line of code and just sat there pounding my desk on the table and pulling the rest of my hair out from frustration....ok so not really.

Anyways, I did manage to find a way around this little debacle today, and switched my VisibilityChanged calls to Minimize and Maximize calls, then put my original function call into the VisibilityChanged sub routine. Then it finally worked without a broken GUI. So I did manage to add about 10 buttons to my GUI today, and programmed them all with about 30 new back-end functions.

Accomplishing so much in the face of such stupid problems was enough to make me feel really special today!

Cheers

Seth

Previous Post: Graduation Gifts Thank You's | Back to Blog List | Next Post: New Site