Tuesday, March 23, 2010

Mensuration Of Circles Problems

cost utilization patterns Bending Java project

During today's presentation on the Software craftsmanship and design patterns that moved in the Lublin JUG died a number of questions regarding:
- the cost of using the code patterns
- time pressures
- complications

is a general and often repetitive set of questions, because I think it is worth to dispel some doubts and misunderstandings.

Some developers see the use of the standard as unnecessary complication, which introduces additional overhead to produce the code.

Generally when it comes to the level of complexity of the patterns should reduce the accidental complexity and increase the readability of the complexity of proper . If we have the opposite situation is a pattern was used improperly or unnecessarily.

As a temporary surcharge to watch the strange belief that the interface and adding a few lines of code needed to share the code to more boxes (classes) was somehow a very long time;) Sam thought process and should not be significantly longer. Or know what pattern to use or do not know. It's not like that thought about this for hours.

It is worth noting that the catalog of design patterns General Purpose is quite rich.

Yes, some of them are quite sophisticated in terms of conceptual design or in terms of code. For example, the Visitor, Component, Tree, Bridge, Proxy, Builder, Flyweight, Memento shall carry a surcharge, but these are tools who choose to special missions. Are you sure you do not belong to the daily range of techniques. However

Strategy, Status, decorator, Template Method, Command, a slight "mental shortcuts" resulting directly in the Object Oriented paradigm . There is really nothing extraordinary about them.

Personally, I treat them as part of the "atomic building blocks", which should build the solution. They are almost beings of the same weight class as Ify, loops or method. Skilled mastery of light patterns that makes them expand our set of basic "building blocks of thought." We build them first mental models, and later naturally appear in the code.

manipulating light patterns on the level of basic blocks do not have time during the development of production overhead. However, complexity is greatly reduced, but only for those readers of code that have the same resource as the creator of association - that is, they operate the same vocabulary of the industry.

//=====================================

posiłkowania need to patterns of "light" caliber due to the poor power of expression languages \u200b\u200bderived from C + +, such as eg Java. For example, the lack domknięć can compensate for the strategies. Really is not anything terrible and laborious development of the interface with one method and several of its implementation. Number code "business" is not increased (ew reduction), while there are only additional "packaging" for him as a graceful and elegant classes.

If someone so much is not chump willing to write code that can should be a troubadour;)

heavy caliber patterns may also sometimes be useful to emulate missing elements of syntax, such as:
- double dispatch pattern emulated by Visitor
- lazy evaluation model emulated by Proxy.

0 comments:

Post a Comment