Saturday, April 21, 2012

The following is an analogy I wrote for class regarding hidden implementations used in programming.  These are "methods" (some call them "modules") that can be called by a program to perform various tasks.  Methods are generally portable, meaning they can be reapplied to different programs.  I thought this may be helpful to others that are just getting started.  

The main advantage I was able to find regarding the use of hidden implementations is to not have to address the complexity that exists within. As long as the function of the hidden implementation is understood then it can even be reapplied to other scenarios in a similar manner. An analogy would be operating a vehicle. When the key is turned, the driver doesn’t need to understand what is happening with each individual part of the engine. In fact, you could even take the same engine, as a whole, and place it into another vehicle (providing the configuration is similar) and will work to operate the other vehicle, there is a seamless transition as far as the driver is concerned – they still just turn the key, what’s happening beyond that isn’t important. How this analogy applies to a situation where it would be an advantage is if the methods are being created for a client to plug in. The details and complexity aren’t necessary for the client to know, but only the behavior of the method and enough knowledge of when to apply it. (The thought occurred to me that this could also be proprietary code that an author may not want to make available to the client; but I was unable to find anything online to support this idea.)
A disadvantage to both the analogy and the methods in programming is that if the scope of usage is unclear or a problem occurs internally then the program (or in the vehicle analogy, the automobile) become inoperable.
Sources:

Monday, April 9, 2012

Switching gears

I'm making a change to my plan to start learning Java prior to the fall semester.  I will be transferring schools then and have the opportunity to skip the C+/Intro class if I can demonstrate some basic knowledge by then.  This move will allow me to take Java a semester earlier, which is one of the classes I must have completed to move into a programmer trainee role at work.  

I plan on exploring online resources for learning C+ in the next week.  I will post what I find.

The Intro to Programming class I'm currently taking is covering batch and interactive file processing. The following link gives a good introduction for the novice and then covers the topic in more detail.