top band

Saturday 10:50 a.m.–11:20 a.m.

How to Write Reusable Code

Greg Ward

Audience level:
Best Practices & Patterns


Learning to write high-quality, reusable code takes years of dedicated work. Or you can take a shortcut: attend this talk and learn some of the tricks I've figured out over a couple of decades of programming.


Twenty-odd years ago, industry windbags proclaimed that the golden age of reusable software components was around the corner, thanks to the miracle cure of object-oriented programming languages. This kind of magical thinking led, in a long roundabout way, to atrocities like AbstractSingletonProxyBeanFactory (don't ask: it's a Java thing). But reusable code is not an impossible objective, just a difficult one. After a couple of decades of trying, often successfully, to write good reusable code, I've learned a few useful tricks. If you've ever wondered whether you should write a class or a function, or when side effects are appropriate, or how much testing is enough, this is the talk for you.
bottom band background