Kevlin Henney is an independent consultant and trainer. The focus of his work is in programming languages, OO, CBD, UML, patterns and software architecture. He is a regular columnist for Application Development Advisor, JavaSpektrum and C/C++ Users Journal online, and wrote columns in Java Report and C++ Report. He is also a member of Hillside Europe, the EuroPLoP and VikingPLoP programme committees, the OT conference programme committee, and is a regular speaker at conferences in the US and Europe.
Tuesday 13:00 - 13:45 (Java Room)
Talk 1: Minimalism: A Practical Guide to Writing Less Code
There is such a thing as too much code. The belief that less is more seems to
be recognised more in its breach than in its observance. It seems a common enoug
h piece of advice from which we can learn and shape our software, from large-sca
le components down to individual program statements.
This talk sets out to explore principles and, importantly, details of how a more
minimal approach affects the practice of writing software and
the quality of written software in a development culture obsessed with quantity and productivity
by numbers. The scope of practice ranges from refactoring to generic
programming. Examples are presented in a variety of curly
bracket languages, along with the
bursting of couple of mythic bubbles, such as the use of reuse.
Talk 2: Value-Based Programming in Java
Wednesday 14:15 - 15:00 (Conference Hall)
Objects do not live in a free society: they exist for a purpose; they are not created with equal rights; they should not aspire to equality. What this means in practice is that objects live in a class ridden society where each class serves a different role in the program as a whole. Many programming guidelines try to ignore the differences between object types by mandating "one true way" of overriding methods, using inheritance or throwing exceptions.
One stereotypical group of objects in need of attention and liberation is those that represent values, as opposed to entities, tasks or services. Values are fine-grained, informational, identity-transparent objects. The use of expressive value objects saves us from writing Fortran-like code, where data inside more significant objects is represented directly in the nearest primitive type to hand, such as integer or string types. Java does not directly support a distinction between value objects and other kinds, but a number of practices exist to express value concepts.
This talk looks at the motivation for value-based programming, the issues presented in Java, and a number of connected patterns for defining value classes. The catalogued idioms include coverage of popular pitfalls, such as when and how to define clone or when and how to define equals, shining a new light on them, as well as reinforcing some techniques that are often overlooked, such as avoiding inheritance from concrete classes.
- Value-Based Programming in Java