Just another BloggingAbout.NET site

Menu

bool theDarkSideRules = true;

Blogging about the YouBastardException reminded of another funny thing that was added to that Intranet application. After a code review I had a discussion with one of the developers on his "dark side coding practices". To annoy me, after this discussion he put in the following line of code:

bool theDarkSideRules = true;

Notice how it conforms nicely to the MSDN capitalization guidelines. But, this was the only line in which this local variable was used. So it gave a nice The variable 'theDarkSideRules' is assigned but its value is never used compiler warning every time the assembly was compiled.

This line is still present in the code to this day 😉

Please post a comment or a trackback if you have any nice examples of inside coding jokes.

Post navigation

One thought on “bool theDarkSideRules = true;”

Not so much an error message, but in line with the age old opposition between IT and Marketing (PC vs Macs), I have just had to implement some prettyc omplex shipping calculation rules for an e-commerce site. I have to calculate bands, regions, units, weight, values and add a few business rules. Following the 30-line function that brings in no less than 10 business objects to get to the value we want, we then have to follow whatever marketing deal is current for shipping. (10 of this type porduct = 50% off shipping, etc).

So as with any code code, I comment my code, the last one is:

// and now offer the opportunity to throw all this away on some bizarre marketing deal