CyberSym Technologies

 
  Home     Services     Products     Info     Contact  
Technical corner
Previous Tech Corner Topics
Linux on an HP ze4100
About Cybersym
Privacy Policy

The CyberSym Technical Corner!

SMOLDERING TOPICS

Still smoldering previous topics from the CyberSym Technologies' Technical Corner:

Back to the Blazing Topic

Why Program with Objects?

That's a question many programmers ask. It turns out Dynamic Gin has attracted quite a bit of attention from users because its drag and drop card interface allows them to readily move cards around in their "hand". Evidently this is something users have wanted for some time. This capability is possible principally through the use of objects.

Objects offer lots of advantages to programmers. Three significant benefits are:

  • Sophisticated behavior. Face it, today's software is a lot more complicated than it was even a few years ago. Careful use of objects makes it possible to provide ever greater sophistication and functionality without turning the overall organization of a program into a nightmare. The key element here is bookkeeping. A good object does most or all its own bookkeeping. This makes it practical to provide functionality you wouldn't dream of trying to manage if you had to use procedural or modular programming.
  • Speed. Yeah, you heard me right. I said SPEED! I know many of you think object-oriented code executes slower than traditional procedural code. Well, that's sort of true. Objects do have some extra overhead that makes object function calls (methods) slightly slower than analogous function calls in procedural code. But that's only part of the picture. A well-crafted object nearly always has several state variables which ensure that the object only performs its allowed actions when truly necessary and appropriate. This can provide huge savings in overall execution time--savings that usually dwarf the small overhead associated with object function calls. In many cases, therefore, proper use of objects actually speeds up overall program execution rather than slowing it down.
  • Error Checking/Handling. It's truly natural to build relevant error checking and handling into objects themselves. This is a variation on the theme of sophisticated behavior, but it's important enough to deserve special mention. Properly designed objects correct their own behavior. You should never have to tell such an object to "straighten up and fly right". Think about THAT the next time you're trying to program a better flight simulator!
In Dynamic Gin, the deck, the hands, and all the cards are objects. This makes it straightforward to enforce Gin Rummy rules, while still allowing users to drag and drop cards.

Objects also figure heavily in the CyberSym Technologies artificial intelligence library. We use objects to get faster numerical performance, to produce neural nets that are easier to configure, and to provide "generic" genetic algorithms and other simulation techniques that are easily applicable to arbitrary problems.

Send comments or questions to: smartsym@cybersym.com

Back to the Index of Smoldering Topics


Top

CyberSym Technologies
smartsym@cybersym.com, P.O. Box 127, Providence, UT 84332, USA, 435-753-8384

Copyright © 2008 by CyberSym Technologies