Now this is embarassing
-
if (_Uptime != null)
{
_Uptime.Remove(TraCommon.Tokens.TraService_Speed);
}
{
_Uptime = new Service.Message();
_Uptime.Code = SysCommon.CommandCode.SysUptimeEvt;
}I just found this in my code. It's been there for years.
Software Zen:
delete this;
-
if (_Uptime != null)
{
_Uptime.Remove(TraCommon.Tokens.TraService_Speed);
}
{
_Uptime = new Service.Message();
_Uptime.Code = SysCommon.CommandCode.SysUptimeEvt;
}I just found this in my code. It's been there for years.
Software Zen:
delete this;
Took me a minute to see that one.
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier
-
if (_Uptime != null)
{
_Uptime.Remove(TraCommon.Tokens.TraService_Speed);
}
{
_Uptime = new Service.Message();
_Uptime.Code = SysCommon.CommandCode.SysUptimeEvt;
}I just found this in my code. It's been there for years.
Software Zen:
delete this;
"else" is missing?
-
if (_Uptime != null)
{
_Uptime.Remove(TraCommon.Tokens.TraService_Speed);
}
{
_Uptime = new Service.Message();
_Uptime.Code = SysCommon.CommandCode.SysUptimeEvt;
}I just found this in my code. It's been there for years.
Software Zen:
delete this;
-
"else" is missing?
:-O
Software Zen:
delete this;
-
After that post in the Lounge earlier, there seems to be something of a trend of screwing up control structures today!
-
if (_Uptime != null)
{
_Uptime.Remove(TraCommon.Tokens.TraService_Speed);
}
{
_Uptime = new Service.Message();
_Uptime.Code = SysCommon.CommandCode.SysUptimeEvt;
}I just found this in my code. It's been there for years.
Software Zen:
delete this;
Yeah... just last week it took me and another engineer brainstorming for an hour before we realized a bit was flipped the wrong way. Our world is fun, wild, and at times all too damned granular. :)
Think of how stupid the average person is, and realize half of them are stupider than that. - George Carlin
-
if (_Uptime != null)
{
_Uptime.Remove(TraCommon.Tokens.TraService_Speed);
}
{
_Uptime = new Service.Message();
_Uptime.Code = SysCommon.CommandCode.SysUptimeEvt;
}I just found this in my code. It's been there for years.
Software Zen:
delete this;
Oops! That had to hurt.
I think computer viruses should count as life. I think it says something about human nature that the only form of life we have created so far is purely destructive. We've created life in our own image. Stephen Hawking
-
Oops! That had to hurt.
I think computer viruses should count as life. I think it says something about human nature that the only form of life we have created so far is purely destructive. We've created life in our own image. Stephen Hawking
Fortunately it's in some logging code that only field service cares about.
Software Zen:
delete this;
-
Fortunately it's in some logging code that only field service cares about.
Software Zen:
delete this;
Phew. If that had been anywhere else, you would have had a major problem there.
I think computer viruses should count as life. I think it says something about human nature that the only form of life we have created so far is purely destructive. We've created life in our own image. Stephen Hawking
-
if (_Uptime != null)
{
_Uptime.Remove(TraCommon.Tokens.TraService_Speed);
}
{
_Uptime = new Service.Message();
_Uptime.Code = SysCommon.CommandCode.SysUptimeEvt;
}I just found this in my code. It's been there for years.
Software Zen:
delete this;
-
missing else? Don't you just love scoping braces.
Software Kinetics - Dependable Software news
Norm .net wrote:
Don't you just love scoping braces
You also dig chicks with braces?
-
Norm .net wrote:
Don't you just love scoping braces
You also dig chicks with braces?
Nothing against them except perchance in, humm, let's say orally challenging situations. ;P
"I had the right to remain silent, but I didn't have the ability!"
Ron White, Comedian
-
Nothing against them except perchance in, humm, let's say orally challenging situations. ;P
"I had the right to remain silent, but I didn't have the ability!"
Ron White, Comedian
-
if (_Uptime != null)
{
_Uptime.Remove(TraCommon.Tokens.TraService_Speed);
}
{
_Uptime = new Service.Message();
_Uptime.Code = SysCommon.CommandCode.SysUptimeEvt;
}I just found this in my code. It's been there for years.
Software Zen:
delete this;
Add this comment before anyone notice your code!
// This embarrassing code is definitely not written by Gary Wheeler!
if (_Uptime != null)
{
_Uptime.Remove(TraCommon.Tokens.TraService_Speed);
}
{
_Uptime = new Service.Message();
_Uptime.Code = SysCommon.CommandCode.SysUptimeEvt;
}:laugh:
-
Add this comment before anyone notice your code!
// This embarrassing code is definitely not written by Gary Wheeler!
if (_Uptime != null)
{
_Uptime.Remove(TraCommon.Tokens.TraService_Speed);
}
{
_Uptime = new Service.Message();
_Uptime.Code = SysCommon.CommandCode.SysUptimeEvt;
}:laugh:
-
if (_Uptime != null)
{
_Uptime.Remove(TraCommon.Tokens.TraService_Speed);
}
{
_Uptime = new Service.Message();
_Uptime.Code = SysCommon.CommandCode.SysUptimeEvt;
}I just found this in my code. It's been there for years.
Software Zen:
delete this;
Don't be too embarassed. It's quite normal[^]
-
if (_Uptime != null)
{
_Uptime.Remove(TraCommon.Tokens.TraService_Speed);
}
{
_Uptime = new Service.Message();
_Uptime.Code = SysCommon.CommandCode.SysUptimeEvt;
}I just found this in my code. It's been there for years.
Software Zen:
delete this;
At the risk of starting a slashdot-style flame war I refuse to code an if without:
if (condition) {
consequence;
} else {
negative consequence;
}Can't help it. Can't change it. 56 years old and too old to recover from it. But also pretty hard to miss an 'else'. Please don't hate me...
-
At the risk of starting a slashdot-style flame war I refuse to code an if without:
if (condition) {
consequence;
} else {
negative consequence;
}Can't help it. Can't change it. 56 years old and too old to recover from it. But also pretty hard to miss an 'else'. Please don't hate me...
Part of my problem is that, due to changes in style guidelines in my group over time, I have a body of older code that uses K&R braces. My newer stuff, including the aforementioned C#, uses the brace-per-line style.
Software Zen:
delete this;
-
if (_Uptime != null)
{
_Uptime.Remove(TraCommon.Tokens.TraService_Speed);
}
{
_Uptime = new Service.Message();
_Uptime.Code = SysCommon.CommandCode.SysUptimeEvt;
}I just found this in my code. It's been there for years.
Software Zen:
delete this;
Gary Wheeler wrote:
It's been there for years.
Then it has been working for years too! Don't fix it!
To alcohol! The cause of, and solution to, all of life's problems - Homer Simpson ---- Our heads are round so our thoughts can change direction - Francis Picabia