remy porter remy escaped the enterprise world and now works as a consultant. editor-in-chief for tdwtf. 




<u+201c>you<u+2019>re going to learn quite a bit from burt,<u+201d> burt said. <u+201c>he<u+2019>s one of the best.<u+201d> 




davide blinked. he wondered if his new boss spoke about himself in the third person as a matter of course. cautiously, he said, <u+201c>well<u+2026> i hope so?<u+201d> 




<u+201c>burt<u+2019>s been with us since the beginning,<u+201d> burt continued. <u+201c>nobody but nobody knows our systems and our environment better than he does. he<u+2019>s one of those<u+2026> whatchacallits <u+2026><u+201d> burt glanced around his desk, and found what he was looking for- a glossy trade-mag with a cover story about the most productive developers. <u+201c>a ten-x developer. we<u+2019>re really lucky to have him, and you<u+2019>re really lucky to work with him.<u+201d> 




burt was not speaking in the third person. burt, the cto of the company, was a huge fan of burt, the lead developer at the company. when davide was hired on, cto-burt spent a lot of time praising the genius of dev-burt. once david started working, he didn<u+2019>t see cto-burt very much, but dev-burt also was eager to talk about what a genius he was. 




<u+201c>not just anybody can manage a system with 100kloc, mostly by themselves,<u+201d> dev-burt said. <u+201c>but stick with me, and maybe you<u+2019>ll learn.<u+201d> 




dev-burt<u+2019>s genius was questionable. five minutes skimming the code-base made it clear that dev-burt had the coding conventions of a drunken lemur. the only thing that made the code even slightly readable was that most of it was in python, and thus had to be indented logically. that was the only logical thing about it. some variables were named in camelcase , others in snake_case . half of them were just alwayslowercase . function names were generally more consistent, only because there were fewer of them: dev-burt was the kind of developer that just loved to write 5,000 line functions. there were plenty of global variables, plenty of spaghettified code, and plenty <u+201c>god<u+201d> objects that mashed together thirty unrelated behaviors into one mess that behaved differently depending on which specific flags you set. 




dev-burt was too busy being a 10x developer to give davide any guidance about what he was supposed to do. the only coding conventions appeared to be <u+201c>dev-burt does whatever dev-burt wants.<u+201d> from time to time, davide would pick up tickets as they came through, tracking down and patching bugs, but mostly he tried to find opportunities to refactor the code and add some unit tests. 




this radical behavior lead to a tense meeting with the burts. 




<u+201c>burt tells me you<u+2019>re causing problems,<u+201d> cto-burt said. 




<u+201c>he<u+2019>s making a mess out of my code,<u+201d> dev-burt complained. <u+201c>he<u+2019>s making it more complicated!<u+201d> 




<u+201c>i was just refactoring it so-<u+201d> 




<u+201c>there he goes,<u+201d> dev-burt said, throwing a hand in the air, <u+201c>using his made up buzzwords. look, we<u+2019>ve got product to ship, and your refractioning isn<u+2019>t getting us anywhere. i wouldn<u+2019>t mind so much, but it<u+2019>s eating into my own time, and making it harder for me to get work done!<u+201d> 




<u+201c>that<u+2019>s bad,<u+201d> cto-burt timed in. <u+201c>because burt<u+2019>s a ten-x developer. his time<u+2019>s ten more times as valuable as yours.<u+201d> 




at least, after the meeting, davide had clear rules to follow: dev-burt does whatever he wants, davide does whatever dev-burt tells him to, and davide was not to touch any code unless it was to deal with a ticket assigned to him by cto-burt. 




this gave davide a lot of downtime, during which he could watch the codebase grow. it was true, dev-burt was a 10x developer, in the sense that he could write ten times as much code as necessary and he<u+2019>d often write the same code ten times, in different places in the application. 




one day, while wondering if this made dev-burt the first 100x developer, davide received a new ticket. one of the automated jobs had failed, dumping a stack trace to the log, and it kept failing every hour. it didn<u+2019>t seem to be having any other effects, but cto-burt wanted it fixed. 




davide assumed there was an un-handled error, and dug through the stack trace to find the offending code. he was half right. once he cut away the bulk of the logic, the basic structure of the method was this: def manage_expectations(*args,**kwargs): try: #about 1,200 lines of code except exception, e: raise e 




so, dev-burt had handled the exception<u+2026> by re-throwing it. a few hours picking apart the function, and it was clear that the underlying problem was a filenotfounderror when scanning a logfile for messages- there was no guarantee that the logfile would exist. it was easy enough to make the code fail gracefully when it encountered the exception, but that might be considered <u+201c>refractioning<u+201d>, and so davide needed to ask dev-burt for permission first. 




<u+201c>hey, burt,<u+201d> davide asked, <u+201c>can you pull up some code for me?<u+201d> he pointed to the raise e and said, <u+201c>why are you doing that? why is that there?<u+201d> 




dev-burt nodded, stroking his chin thoughtfully. <u+201c>that<u+2019>s an exception handler,<u+201d> he said. 




<u+201c>yes, i know that . why is that raise there?<u+201d> 




<u+201c>hmm<u+2026> i guess i<u+2019>m not sure. what does the raise command do?<u+201d> 




davide went back to his desk, fixed the exception handler, and then started sending out resumes. he<u+2019>d learned everything he needed to from dev-burt, and was now ready to fail gracefully out of this job. [advertisement] application release automation for devops <u+2013> integrating with best of breed development tools. free for teams with up to 5 users. download and learn more today!
the 10x developer
remy porter