|
And the font, I use 8-point.
|
|
|
|
|
I use browser default. I've never seen a font only scaling that didn't fubar page layouts at least somewhat. Opera's zoom probably comes closest but there're some video plugins it doesn't scale.
Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots.
-- Robert Royall
|
|
|
|
|
This developer might not be as stupid as we think. Just think how impressed a business user ( with no concept of programming) must be when this code is shown to him/her. A business person will think that a developer that can write code that looks like this (extremely complex in the business users eyes) must be a genius and a great asset to the company. What better job security can you get?
If at first you don't succeed, failure may be your style. (Quentin Crisp)
Recession is when a neighbor loses his job. Depression is when you lose yours. (Ronald Reagan)
|
|
|
|
|
And the comments on the terminating braces are useless, too.
Professional Geek,
Amateur Stage-Levelling Gauge
|
|
|
|
|
I like writing such code. It is typical COM-Spaghetti.
Congratulations.
(ROFL)
Greetings from Germany
|
|
|
|
|
16 layers...that guy must be insane
modified on Friday, February 27, 2009 6:54 AM
|
|
|
|
|
This particular gem was found in the code of a recently departed team member who described himself as a C# 'Expert'. Everytime someone in the team looks at his code for more than 5 minutes, they find another howler. Truly shocking.
public bool SelectedByDefault
{
get { return _defaultSelected; }
set
{
if (value != null)
{
_defaultSelected = value;
}
else
{
_defaultSelected = false;
}
}
}
|
|
|
|
|
Just a different take on a common situation.
|
|
|
|
|
lol, arguments in code comments.
|
|
|
|
|
Here, here might need this: ?
cheers,
Chris Maunder
CodeProject.com : C++ MVP
|
|
|
|
|
Even more surprising is that it appeared convinced this was true even though the compiler gives an unreachable code warning and tell you that the check will always return true. But he probably didn't notice it hidden amongst the other 200 warnings. Sigh.
|
|
|
|
|
By the way, C# compiler (with optimization option 'on') generates these IL instructions for set accessor:
ldarg.0
ldarg.1
stfld bool <reference_to_local_field>
ret ;
so, at the C# level it whould be:
this._<reference_to_local_field> = value; ;
So, this construction is obviously needless
modified on Monday, January 19, 2009 1:56 AM
|
|
|
|
|
A colleague says perhaps this guy just plain didn't trust that said field would be checked actually *in* the serialization code...not that anyone would want to risk an exception getting thrown for serializing a bool anyway.
Since when were bool variables ever null ? Besides isn't that equivalent to false , or am I not a "C# Expert?"
-Brian
Sincerely Yours,
Brian Hart
|
|
|
|
|
public bool SelectedByDefault{ get; set; }
why not like above ?
|
|
|
|
|
Clearly, that would be _way_ too easy!
Just because the code works, it doesn't mean that it is good code.
modified on Friday, March 20, 2009 4:41 PM
|
|
|
|
|
Rotted Frog wrote: because serialisation can assign a null to a bool
Isn't the bool variable default initialized to false?
|
|
|
|
|
I think the worst projects to take over are those similar to the one I'm currently stuck with :
It's a relatively small & simple... in theory.
What complicates it is the fact that it's been through serveral developers already , is in a mix of C# and VB, uses various versions of the framework, is reliant on heaps of 3rd party DLL's, uses a 3rd party data access and business logic layer classes that are enormous & difficult to understand, there are no business requirements documents for it, it has no technical spec, the database uses a mix of naming conventions... I could go on.
Oh, and if that wasn't enough, the developer that was working on it is AWOL so no support from there...
|
|
|
|
|
So it's about par for the course?
|
|
|
|
|
Yeah, you have to get into those projects early, before all that happens.
|
|
|
|
|
before all that happens so that you can make it happen
|
|
|
|
|
Shhh... I didn't want to say it so blatanty.
|
|
|
|
|
LOL
I'm thinking of changing my job description to Salvage Consultant
|
|
|
|
|
Been there, done that (Except DB part).
I had a privilege to work on project where people were assigned as some sort of punishment... and they "promoted" me to tech lead on it!
At least it's experience!
|
|
|
|
|
I had a project like this where no lie the Project Manager quit 2 weeks before startup to join the Peace Corp. Never a good sign... Needless to say startup was not in 2 weeks.
|
|
|
|
|
Just go ahead and delete all the source code and start from scratch. While you're at it, tell your boss that you're not a mind-reader.
"What annoys me more than anything is someone hearing what my Ph.D. is and then asking me if I believe in Creationism."
Sincerely Yours,
Brian Hart
|
|
|
|