|
heh.
I put in couple of years in a trouble-shootery kind of post, where I had to look into network failures in the global network of a major multi-national (which Shell remain nameless) with several million terminals, including office PCs, POS units, and just about every kind of access point and shared gubbins you can think of, and find ways to make it never happen again.
One of the most fun failures took out the entire VPN in China (That's a LOT of people sitting at terminals that can't access data) for several hours.
It turned out that, in one of the network areas that we didn't have direct control of, someone had plugged both ends of a fibre into the same switch, causing a broadcast storm (on the bit we controlled, the broadcast storm couldn't have happened).
The 3rd-level support team was reduced to calling mobile phones all over China, almost at random, to try to find out what was happening. Huge amounts of money were being lost, and everyone took resolving the problem very seriously, but we still had a lot of laughs, dealing with it. A party atmosphere, almost.
When I sent out my report, I closed the accompanying intro with "I now keep an ethernet cable in my middle desk drawer, in case I want an afternoon off".
The response was mixed,
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Mark Wallace wrote: The response was mixed
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
ha ha ha, sounds like a similar sense of humour their
i find a happy engineer is a more productive engineer, and after losing so much time and money you might as well try and lighten up the report readers day!
|
|
|
|
|
Mark Wallace wrote: When I sent out my report, I closed the accompanying intro with "I now keep an ethernet cable in my middle desk drawer, in case I want an afternoon off".
That's bad.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
I have this problem... And i dont what to do...
|
|
|
|
|
rotflmao!!!! triple epic fail 
|
|
|
|
|
We are dealing with application left by our former developer.
I could mention here a lot of things like putting all of the code in one file (15k lines, 680kB), putting all controls on one form and using BringToFront , naming all controls like textBox85 , hardcoding the same connection string in three different places, and so on.
But criteria if one of the buttons should be shown beats all of it:
if ((textBox39.BackColor == Color.White) && (textBox40.BackColor == Color.PapayaWhip))
button37.Visible=true;
else
button37.Visible=false;
|
|
|
|
|
Think of it this way... If it was WPF, it would be data-bound through two object models and a multi-converter to be absolutely certain that if those backgrounds (backcolors) EVER changed for any reason, the button would immediately disappear.......
.....With a psychadelic *poof* animation...
.....and background music...
.....in full DirectX-rendered 3D.
|
|
|
|
|
<Homer>
Mmmm... papaya whip...
</Homer>
|
|
|
|
|
Ar we talking whips made of papaya or papaya whipped up with cream?
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
Nagy Vilmos wrote: papaya whipped?
actually squashed PeachPuff
PS to Homer: even more Mmmm
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Brilliant!
Well, I'm a great The Simpsons fan. I truly heard Homer saying it.
|
|
|
|
|
What an idiot. Clearly he should have done.
button37.Visible = textBox39.BackColor == Color.White && textBox40.BackColor == Color.PapayaWhip;
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
|
You know what is worst in this situation? That, this was my first thought.
Idea of putting background color into the condition fits so perfect in his methodology, that I missed it first.
|
|
|
|
|
jkruza wrote: Idea of putting background color into the condition fits so perfect in his methodology, that I missed it first.
Doesn't everyone use background colors for their control logic?
This code probably even works, but see my tag line…
Just because the code works, it doesn't mean that it is good code.
|
|
|
|
|
jkruza wrote: naming all controls like textBox85
Yikes! I cannot stand it when people do that. My course I teach, I penalize points from students who name controls in this manner, and people still do it (then they wonder why they receive a lower grade than the grade they think they were going to earn)
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
naming all controls like textBox85
I wish Microsoft had made it easy (if not default) to have VS ask the name of new objects being created, especially since the text field will get initialized to the default name (so even if the name and text field should be the same, both will have to be keyed in).
BTW, any recommendations for the best plug-in for 2005 and 2008 to fix that?
|
|
|
|
|
Looking at the type of code and namings I would hazard a guess that this might have been taken from code that was decompile using reflector etc. That would be borne out by the use of three hard coded connection strings too. It may have originally been a single constant. Not that this is an excuse or mitigates the situation. Anyone who has to rip code to that extent needs to get a new career! 
|
|
|
|
|
Even if it was decompiled, that would still mean that all the show / hide conditions are tied to various color settings. Anyone who has to rip code to that extent needs a freaking lobotomy.
-------------------------------
Carrier Bags - 21st Century Tumbleweed.
|
|
|
|
|
Even if it was decompiled, that would still mean that all the show / hide conditions are tied to various color settings. Anyone who has to rip code to that extent needs a freaking lobotomy.
I've seen code like that on systems from any era that supported color (it would be rather hard to use such code on a system that didn't). Many types of controls support a 'tag' property which could be pointed to a sensible object including all necessary ancillary information, but some controls don't. If there's no need to serialize the controls, color might not be totally horrible if one used constants named based upon [i]meaning[/i] and explicitly stated in the comments that all values must be unique (I think the use of a Select Case construct somewhere could enforce that requirement). I would consider the following horrible: If ThisThing.Color = Colors.Red Then ThisThing.Delete but I would consider If ThisThing.Color = FlagColors.Deletable Then ThisThing.Delete to be rather less horrible. I would guess that both pieces of source would yield identical compiled code, however, so a disassembler would guess at the former meaning.
|
|
|
|
|
This retina scarring horror jumped out the screen and tried to garrote me with a cheese wire.
-------------------------------
Carrier Bags - 21st Century Tumbleweed.
|
|
|
|
|
Just came across a class which has tens of such properties. These properties are called by other classes and by other properties / methods of this class!!! Oh! and also look how the property name says total, but is actually returning an average
public double CrappyTotal
{
double CrappyTotal = 0;
try
{
CrappyTotal = this.SomeItem.Details[0].Value;
CrappyTotal += this.SomeItem.Details[1].Value;
CrappyTotal += this.SomeItem.Details[2].Value;
CrappyTotal += this.SomeItem.Details[3].Value;
CrappyTotal = CrappyTotal / 4;
}
catch
{
CrappyTotal = -1;
}
return CrappyTotal;
}
modified on Wednesday, July 8, 2009 11:35 PM
|
|
|
|
|
|
would the path ever get into the catch block anyway? wow lol i think my eyes just burned out.
|
|
|
|
|
this.SomeItem.Details = new double[3];
MessageBox.Show(this.CrappyTotal);
The European Way of War: Blow your own continent up.
The American Way of War: Go over and help them.
|
|
|
|