How to name things - the hardest problem in programming

A session at ACCU 2015

Friday 24th April, 2015

2:00pm to 3:30pm (GMT)

Developers can get better at their craft by learning from the great writers who mastered theirs. Writing software isn't the same as writing a novel, but there are parallels. Besides, advice from writers is better because writers have been struggling with their craft for many centuries, not just a few decades. It's better-written as well. This talk shares great writers' best advice for coders: Stephen King on refactoring, Anne Rice on development hardware, Hemingway on modelling with personas, and Neil Gaiman on everything.

This session first explores the similarities between writing and coding, and uses writers' advice to identify different kinds of avoidable bad naming in code. Some class, method, and variable names are so bad that they're funny, but you've still seen them in production code. The second part of the session explores practical techniques for working on better naming, including renaming things. Renaming is even harder because it includes naming things plus other hard things. The final section goes back to writing. The next step after finding better names in code is to write better comments in code, which is almost as hard as naming is.

The surprising thing about naming things well in code is not that it's hard, but how easy it is to accept bad names. This is a hard problem that's worth working on, because although you can't make the naming problem go away, you can learn to write much better code regardless of which technologies you use.

About the speaker

This person is speaking at this event.
Peter Hilton

Software developer, writer, speaker and musician - co-author of ‘Play for Scala’ - Product Developer at Signavio

Coverage of this session

Sign in to add slides, notes or videos to this session

ACCU 2015

England England, Bristol

21st25th April 2015

Tell your friends!


Time 2:00pm3:30pm GMT

Date Fri 24th April 2015

Short URL


View the schedule


See something wrong?

Report an issue with this session