They are missing the creatieve use of your version control system. First, make sure none of your commits actually build out of the box; forget a file for a few revisions, accidentally check in a corrupted XML file, etc. Create a "trunkV2" directory, and keep committing to both trunk and trunkV2. Add a third trunk inside the "branches" tree (/branches/featureX/newTrunk; I have seen this n practice, with random custome…
How to Write Unmaintainable Code (1999)
41–50 of 72 posts
Re: How to Write Unmaintainable Code (1999)
#42> You earn extra Brownie points whenever the beginning and end of a block appear on separate pages in a printed listing. I'm aware that this is from 1997-1999, but I'm curious: Do people still print out source code for better reading?
Re: How to Write Unmaintainable Code (1999)
#43They are missing the creatieve use of your version control system. First, make sure none of your commits actually build out of the box; forget a file for a few revisions, accidentally check in a corrupted XML file, etc. Create a "trunkV2" directory, and keep committing to both trunk and trunkV2. Add a third trunk inside the "branches" tree (/branches/featureX/newTrunk; I have seen this n practice, with random custome…
Copy folder X, paste it and name it 'X-branch-'
Make sure that is not in the same format as any previously used, if you run out of formats, change the ordering or add your name, e.g.:
'140215-kraftman-MAIN-BRANCH2'
Re: How to Write Unmaintainable Code (1999)
#44They are missing the creatieve use of your version control system. First, make sure none of your commits actually build out of the box; forget a file for a few revisions, accidentally check in a corrupted XML file, etc. Create a "trunkV2" directory, and keep committing to both trunk and trunkV2. Add a third trunk inside the "branches" tree (/branches/featureX/newTrunk; I have seen this n practice, with random custome…
Re: How to Write Unmaintainable Code (1999)
#45There's only one rule: 1. Don't write fast running behavioural tests that verify the software is working as required. With fast running tests I can maintain any old crap. Well, technically speaking I can rewrite it, but no-one will mind.
Write tests that ensure each subroutine is called with specific parameters, so that functionally identical modifications cause the test to fail. Any change to the code now requires a change to several tests.
Re: How to Write Unmaintainable Code (1999)
#46Re: How to Write Unmaintainable Code (1999)
#47Re: How to Write Unmaintainable Code (1999)
#48Earlier quoted context omitted.
> I'm aware that this is from 1997-1999, but I'm curious: Do people still print out source code for better reading? I know a bunch of embedded C programmers who have been doing it for a long time who do this regularly. They know their stuff. They don't print out the whole codebase, just a few pages of whatever they're working on, then they annotate it with a pen while thinking about whatever problems they are solving…
I can imagine this being more helpful if you lacked access to a debugger, and lacked the time (or desire) to build debugging tools by other means... Which I imagine is plausible in that context.
Re: How to Write Unmaintainable Code (1999)
#49Am wondering when our industry will see this forest for the trees...
Re: How to Write Unmaintainable Code (1999)
#50> You earn extra Brownie points whenever the beginning and end of a block appear on separate pages in a printed listing. I'm aware that this is from 1997-1999, but I'm curious: Do people still print out source code for better reading?