|
Public Sub initalizeTTick(ByVal stationID As String)
stationID("stnName").ToString().ToUpper()
What the hell is that suppose to do?
|
|
|
|
|
Well, in this case, it throws a runtime error... which is caught by the exception.
Yes, not only is the code written so that if there are errors it recurses forever, it is written in such a way that this is GUARANTEED to happen.
|
|
|
|
|
|
You might want to create a trouble ticket for that error.... but i suggest you use a different program to log it just in case theres a problem when you initialize it
|
|
|
|
|
The stuff posted on here "just ain't so"...
Un-f-ing believable...
You guys have to start naming the companies and the projects for these things.
And, please state where these things are developed...location of the developer...
David
|
|
|
|
|
etkins wrote: "just ain't so"
Well a lot of this stuff would be too hard to make up, so it must be real.
etkins wrote: start naming the companies
Riiiiight.
etkins wrote: location of the developer
Most of them seem to be "the coder from hell."
BDF
|
|
|
|
|
etkins wrote: Un-f-ing believable...
You aren't programming for a long time, are you?
etkins wrote: You guys have to start naming the companies and the projects for these things.
Definitely not. This may get you in trouble - in most (all?) companies all code belongs to company. If you show it here, you are basicaly stealing. And it usually doesn't matter that you don't work for them anymore - it's well covered in the contract.
[ My Blog] "Visual studio desperately needs some performance improvements. It is sometimes almost as slow as eclipse." - Rüdiger Klaehn "Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
No dude, the people I work with aren't novices and don't write crap software.
The snippets you post are something you would see in a high school or college 101 class that's all.
David
|
|
|
|
|
Doing maintenance on a horror inherited from somebody else, or cleaning up after the trouble person, hired for the sole purpose of increasing head count on your team, is the way we run into this sorta code. Any more questions?
Roswell
"Angelinos -- excuse me. There will be civility today." Antonio VillaRaigosa City Mayor, Los Angeles, CA
|
|
|
|
|
Cleaning up c**p code generated by dodgy foreign outsourcing operations becasue your company has decided to cut costs and "do it on the cheap"
|
|
|
|
|
jc.net.com wrote: becasue your company has decided to cut costs and "do it on the cheap"
My company?
I'm on my own actually. I do some contract work, but mostly freelance. So there's no one in MY company but me;)
But i've seen a fair share of these horrors myself, so yes, you are right in the sense that outsourcing is often unreliable, but so is hiring of local programmers of equal "quality". The solution IMHO is to have a decent interview procedure and not rely so much on credentials, as on actual knowledge.
Roswell
"Angelinos -- excuse me. There will be civility today." Antonio VillaRaigosa City Mayor, Los Angeles, CA
|
|
|
|
|
lol, do you have any idea of how much code there is in the world?
Charlie Gilley
Will program for food...
Whoever said children were cheaper by the dozen... lied.
Overheard in a cubicle: "A project is just a bug under development."
Seeking to rise above the intelligence of a one eared rabbit...
Caught in a vortex of weirdness...
|
|
|
|
|
I was debugging code I have written two years ago.
There was a problem with canceling a command execution.
Following is what I have found:
CommandCancelEventArgs e = new CommandCancelEventArgs(this);
if(e.Cancel)
{
return;
}
Obviously the line
OnCommandExecuting(e)
was missing
Thanks,
Georgi
|
|
|
|
|
Georgi Atanasov wrote: Obviously the line
OnCommandExecuting(e)
was missing
Uh, yeah.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
The actual code is a bit different, but the essence was that the developer who wrote it screwed up big time. Converting string to string is a bit useless in my humble opinion
void SaveUserText(string userText) {
string text = userText.ToString();
}
WM.
What about weapons of mass-construction?
"What? Its an Apple MacBook Pro. They are sexy!" - Paul Watson
My blog
|
|
|
|
|
I suprised that there isn't an assert there as well.
void SaveUserText(string userText)
{
string text = userText.ToString();
assert ( text == userText );
}
Chris Meech
I am Canadian. [heard in a local bar]
|
|
|
|
|
Surely that would be
void SaveUserText(string userText)
{
string text = userText.ToString();
assert ( (string)text.ToString() == (string)userText.ToString() );
}
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Oh, but of course!
|
|
|
|
|
I tryed it ....it crashes....why?;P
Russell
|
|
|
|
|
There was some SQL I had to maintain a few years back where the original programmer had done something like ToChar(ToChar(datevalue)) (I forget the exact syntax, it was RDB) several times.
The guy who'd been maintaining said things like: "It's always been like that.", "It ain't broke.", and "He said it wouldn't work otherwise."
I darn well fixed it anyway. With that and some other changes the program ran in ten minutes instead of forty.
|
|
|
|
|
He said "It ain't broke" not "It aint slow"
|
|
|
|
|
Hahaha, FxCop thought otherwise.
WM.
What about weapons of mass-construction?
"What? Its an Apple MacBook Pro. They are sexy!" - Paul Watson
My blog
|
|
|
|
|
In my recent quests to solve an issue with legacy code, I found several places where code blocks are wrapped in
#if NOT_USED
...
#endif
This is confusing to me since if NOT_USED is defined, then the code will be compiled into the project.
Phil
|
|
|
|
|
Indeed, should be #if 0 or #if false or something.
|
|
|
|
|
Sounds like someone's not using version control on the source, or if they are, they are afraid of using the delete key to actually remove the code. I find this to be the least confusing way of ensuring that code is not compiled into a project.
Chris Meech
I am Canadian. [heard in a local bar]
|
|
|
|