So what do we do? Resign ourselves to maintaining code we can’t understand? Rant on Twitter and The Daily WTF about the awful code we have to work on? What must we do to stop the pain? Write. Badly written Python code is just as unmaintainable as badly written C++, Perl, Java and all the rest of the languages known for their, ahem, readability. Alas, maintainability is not an emergent property of using an expressive language. When Python became popular, many thought that, because of its terseness, it would naturally lead to more maintainable software. Everyone (besides you, of course, dear reader) struggles to write code that’s easy to maintain. Maybe it’s because I’ve spent my professional career writing software at huge companies, but I have yet to inherit code that didn’t eventually cause me to curse the original author at some point. While I’m not usually one for aphorisms, this one strikes a chord with me. Jeff Knupp Visit me at Preface There’s a famous old quote about writing maintainable software: Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. No part of this book may be reproduced in any form or by any electronic or mechanical means without permission in writing from the author. Copyright 2013 by Jeff Knupp All rights reserved.
0 Comments
Leave a Reply. |