BBE:WS

Overland

When Hobbies Take Over

Last updated on: 8/5/2011 4:04 PM 
Created on: 3/21/2014 2:18 PM 

Jeep in the wild

There are two things I have taken away from my hobby in pinball machine refurbishment. With any hobby though, in which you are dealing with collector items, I suspect you are bound to have similar experiences. The oldest game I have, which was my first refurbishment, is now approaching 18 years old. When built, the factory hoped for a maximum life of 5 years. That time period was determined to be the duration required to have the owner/operator obtain a profit on their initial purchase, then retire the game to replace it with a new machine.

My SUV is a vehicle I purchased new. I know enough about cars to not be taken by a mechanic or repair shop, but I still don't consider myself to be an expert. What is the life span of an SUV? The answer seems to lie between 3 years and 250,000 miles. The pinball machines, including those significantly older than mine, are still in operation because they were maintained. If kept clean and free of corrosion and improper repairs, there isn't much to cause a machine to cease operation nor require anything other than the occasional replacement of a failed part. For 135,000 miles, I have been lucky enough that my primary vehicle has been operating under the same philosophy.

What provoked this analogy? The other day when I replaced to worn parts. There is always that feeling of victory when after a repair the performance returns to that of 'like new'. Perhaps that originates from taking my finished pinball machines to shows and getting the 'plays like new' feed back from show goers. In any case, lesson number one here is that there is nothing that can not be repaired or kept running properly. That is of course as long as you are starting with a good base to work with.

Now it doesn't matter if I am talking cars or pinball machines, having properly maintained parts is the key to a long life span. If you have to replace part, they is great relief when that part is a standard part that has multiple uses. The part has greater availability and lower cost of purchase. Replacing the part is another story. While under a car you have tie rods and differentials, under the pinball machines you have coils and their corresponding assemblies. Working with these assemblies is probably the best example of achieving optimal code reuse that any computer scientist cite.

Pinball assemblies

Most assemblies can be found in multiple places performing either the same, or nearly identical functions. In a world of object orientated development, the best class design and implementation is one that accomplishes the same effect. Part of the two major development projects I am working on this year are going to be made or bust on the implementation and the ability to reuse these objects. One so called "assembly" exists in the Security Console product. SC's dialogs share basic functionality such as trapping the help key to display context help and controlling the enabled state of controls based on their availability. Since all framework and application dialogs funnel through this core, adding additional features for Windows 7 such as the blurry glass effect have a centralized spot that can be added and handled.

One area that was not handled properly in the previous code base was the progress meters displayed for time consuming processes. The previous model allowed applets to display their own progress dialogs and use their own progress callback handlers. This is now being moved into the framework. Applets will have to obtain a handle to their own progress meter for a task and, in their callbacks, update the status of the progress meter in the provided handle. The obvious accomplishment from this change is that all progress meters will have the same appearance. The subtle change is now the person in charge of the framework can make one improved "part" and new features are available everywhere. These improvements come from having a central spot to create an updated, cleaner progress meter but in special cases, like Windows 7 allow me to add in those special OS features such as displaying the progress meter's status in the task bar.

If the object was originally done this way, I would have simply had the new Windows 7 features added already. It would have been as easy as taking off an old assembly and installing the new and improved assembly followed by instant gratification from taking advantage of those improvements. Instead, I'm not able to enjoy the new visual enhancements until I first am able to enjoy the functional enhancements. The best way to handle code reuse is to treat each module as one of those pinball machine assemblies. The goal to good code design is not to see programming as line after line of instructions, but assemblies that are part of the large machine. It's a lesson that would have made life easier if I would have learned this sooner, a lesson that has since taken my approach to design directly over the edge.

 

Wolffy's Over The Edge

Power of Progress Back to School Randomness What In the World Happened To You? 8th Grader Game Coder When Hobbies Take Over Blackout: The Great Disconnect Different Is Awesome