Refactoring a la P G Wodehouse
March 24th 2008 07:40
I have a son who programs and he’s done it since he was about eight or nine. Just took to it like a duck to water.
Now he does it for a living, and not only creates code, but also has to tidy the code up every so often. I’ve just found out from another source that this is called refactoring.
Refactoring is needed when a code has become full of guff and stuff and lots of alterations and improvements and rewritings and…well, you get the message.
One solution to a large amount of code that’s no longer looking its tidiest is to scrub the lot and start from scratch. Surprisingly that’s the wrong way to go about it. Though to me as an author, that shouldn’t be surprising. If I’ve written a long work in draft form and it’s still not right, the way to fix it isn’t to scrub the lot and start from scratch. Apart from anything you’ll lose many gems and good things.
What refactoring does is look at the code as it stands and see where improvements can be made, where shorthanding can be done so that the thing isn’t so cluttered.
Why I mention this is that I came across a post on the intriguingly-named site, Basildon Coder, which mentions that P G Wodehouse, the great writer of comedies, used to take the typewritten pages of his draft novels and pin them up on the walls around his office. Where the pages were deemed reasonably satisfactory, he would pin them high, indicating that they needed little further attention. Where the pages were needing more work, he’d pin them lower and gradually deal with them. I’ve never heard this story before, and as far as I recall it doesn’t appear in his biography, Performing Flea, in which he does talk about his methods of working quite a bit.
However, it’s a great idea. Many teach-yourself-to-write books have a similar approach to dealing with overall structure of a novel. Each scene and its details are jotted down on a 5 x 3 card and these can then be laid out or shuffled around until things begin to fit together.
I remember Anne Lamott writing about how she and one of her editors did the same sort of thing. One of her novels just wasn’t working, so it was all laid out on the floor, section by section, and worked over and over until things fitted where they belonged. Sounds tedious, but it’s actually very productive.
And far more effective than doing it on the computer.
Now he does it for a living, and not only creates code, but also has to tidy the code up every so often. I’ve just found out from another source that this is called refactoring.
Refactoring is needed when a code has become full of guff and stuff and lots of alterations and improvements and rewritings and…well, you get the message.
One solution to a large amount of code that’s no longer looking its tidiest is to scrub the lot and start from scratch. Surprisingly that’s the wrong way to go about it. Though to me as an author, that shouldn’t be surprising. If I’ve written a long work in draft form and it’s still not right, the way to fix it isn’t to scrub the lot and start from scratch. Apart from anything you’ll lose many gems and good things.
What refactoring does is look at the code as it stands and see where improvements can be made, where shorthanding can be done so that the thing isn’t so cluttered.
Why I mention this is that I came across a post on the intriguingly-named site, Basildon Coder, which mentions that P G Wodehouse, the great writer of comedies, used to take the typewritten pages of his draft novels and pin them up on the walls around his office. Where the pages were deemed reasonably satisfactory, he would pin them high, indicating that they needed little further attention. Where the pages were needing more work, he’d pin them lower and gradually deal with them. I’ve never heard this story before, and as far as I recall it doesn’t appear in his biography, Performing Flea, in which he does talk about his methods of working quite a bit.
However, it’s a great idea. Many teach-yourself-to-write books have a similar approach to dealing with overall structure of a novel. Each scene and its details are jotted down on a 5 x 3 card and these can then be laid out or shuffled around until things begin to fit together.
I remember Anne Lamott writing about how she and one of her editors did the same sort of thing. One of her novels just wasn’t working, so it was all laid out on the floor, section by section, and worked over and over until things fitted where they belonged. Sounds tedious, but it’s actually very productive.
And far more effective than doing it on the computer.
| 62 |
| Vote |
Subscribe to this blog


















Comment by Jill Browne
Skip On Over
London Travel
England Travel
Canada Travel
Calgary Travel
Even using a different colour of pen, a different texture of paper, or another computer in another location can help shake things up when the slogging gets tough.
I like the visual method for organizing - the cards or pages you describe are great. A number of writers I know regularly use them for plotting novels and to keep character details straight - so that by chapter seven your blonde heroine with the ample bosom hasn't turned into a leggy brunette!
Comment by Mike Crowl
Webitz
Work Report
Comment by Jeanne Dininni
Writer's Notes
Fascinating ideas and a uniquely interesting analogy! While I tend to edit as I go and then go back in later to make small (and sometimes big) changes here and there (and do this over and over until I get it right), this technique sounds like one that could prove quite helpful--particularly with longer works, such as novels, where a writer needs to keep track of so many things and must make absolutely sure that each one fits well into the whole.
Enjoyed this post!
Jeanne
Comment by Mike Crowl
Webitz
Work Report