[ Pobierz całość w formacie PDF ]
.One of the delights of object-oriented programming is that, with a well-designed program, its easy to understand the code by reading it.Usually theres a lot less code as well, because many of your problems will be solved by reusing existing library code.See Multiparadigm Programming in Leda by Timothy Budd (Addison-Wesley 1995).This is actually a bit restrictive, since objects can conceivably exist in different machines and address spaces, and they can also be stored on disk.In these cases, the identity of the object must be determined by something other than memory address.Some people make a distinction, stating that type determines the interface while class is a particular implementation of that interface.Im indebted to my friend Scott Meyers for this term.This is usually enough detail for most diagrams, and you dont need to get specific about whether youre using aggregation or composition.My term.Primitive types, which youll learn about later, are a special case.An excellent example of this is UML Distilled, 2nd edition, by Martin Fowler (Addison-Wesley 2000), which reduces the sometimes-overwhelming UML process to a manageable subset.My rule of thumb for estimating such projects: If theres more than one wild card, dont even try to plan how long its going to take or how much it will cost until youve created a working prototype.There are too many degrees of freedom.Thanks for help from James H Jarrett.More information on use cases can be found in Applying Use Cases by Schneider & Winters (Addison-Wesley 1998) and Use Case Driven Object Modeling with UML by Rosenberg (Addison-Wesley 1999).My personal take on this has changed lately.Doubling and adding 10 percent will give you a reasonably accurate estimate (assuming there are not too many wild-card factors), but you still have to work quite diligently to finish in that time.If you want time to really make it elegant and to enjoy yourself in the process, the correct multiplier is more like three or four times, I believe.For starters, I recommend the aforementioned UML Distilled, 2nd edition.Python (www.Python.org) is often used as executable pseudocode.At least one aspect of evolution is covered in Martin Fowlers book Refactoring: improving the design of existing code (Addison-Wesley 1999), which uses Java examples exclusively.This is something like rapid prototyping, where you were supposed to build a quick-and-dirty version so that you could learn about the system, and then throw away your prototype and build it right.The trouble with rapid prototyping is that people didnt throw away the prototype, but instead built upon it.Combined with the lack of structure in procedural programming, this often leads to messy systems that are expensive to maintain.Although this may be a more American perspective, the stories of Hollywood reach everywhere.Including (especially) the PA system.I once worked in a company that insisted on broadcasting every phone call that arrived for every executive, and it constantly interrupted our productivity (but the managers couldnt begin to conceive of stifling such an important service as the PA).Finally, when no one was looking I started snipping speaker wires.In particular, I recommend looking at Python (http://www.Python.org)
[ Pobierz całość w formacie PDF ]