|
|
In other cultures that's referred to as a Zen copy. You have become one with the object.
Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]
|
|
|
|
|
If this was C++, see my sig.
Software Zen: delete this;
|
|
|
|
|
Code like this is probably one reason why
is not a standard xml comment.
No one would want to own up to that.
|
|
|
|
|
Perhaps the coder's name is Dot Stop Period.
Narf.
|
|
|
|
|
This looks like a laid off employee who would like damage the company without the risk of being sued.
"To alcohol! The cause of, and solution to, all of life's problems" - Homer Simpson
|
|
|
|
|
Fabio Franco wrote: This looks like a laid off employee who would like damage the company without the risk of being sued.
Actually, the code was likely written by someone I have worked with previously at another company...
At least I know what to expect
|
|
|
|
|
I'm testing a function that pastes information from the clipboard into several fields in my application. I'm stepping through it in the debugger, and the string returned by Clipboard.GetText() is:
"Clipboard.GetText()" I'm flabbergasted. How the f*** does Clipboard.GetText() return its own name?
...
(minutes of furious mouse clicking and keyboard pounding)
...
Finally I realize the last thing I had done was copied "Clipboard.GetText() " to the clipboard for pasting in my code.
Software Zen: delete this;
|
|
|
|
|
have you tried re-booting the developer?
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
Reboot in progress; it's 6:38 a.m. here[^], and I'm only on my first cup of coffee.
Believe it or not, but the little red symbol points almost exactly at the location of my cube in the building.
Software Zen: delete this;
|
|
|
|
|
Nagy Vilmos wrote: have you tried re-booting the developer?
FTFY
|
|
|
|
|
That's what you get if you code on an early Monday morning.
"Don't confuse experts with facts" - Eric_V
|
|
|
|
|
Stuff like that can keep me busy for hours!
It's an OO world.
|
|
|
|
|
that's funny. That reminds me of the time my web page kept returning an error when I was trying to view a text file. That is until I realised, the file contained text of a web page error. It must have been a Monday.
|
|
|
|
|
How to generate an ASP.NET menu, if you are an evil genius
First one must define what it is we are to show (apologies for the odd characters, it is badly endoded arabic):
private string memberMenu = @"<table border=0 cellpadding=1 cellspacing=1 width=100% dir=rtl style=font-family:Tahoma;font-size:12px;><tr><td><a href=# onclick=""top.SetLocation(\'\',\'\',\'MembersResearchList.aspx?t=\'+(new Date()).toLocaleTimeString().replace(\':\',\'\'));top.SetTitle(\'ÃÈÍÇË æÏÑÇÓÇÊ\');return false;"" class=""navMenu"">ÃÈÍÇË æÏÑÇÓÇÊ</a></td></tr><tr><td><a href=# onclick=""top.SetLocation(\'\',\'\',\'AddMembersExperience.aspx\');top.SetTitle(\'ÇáÎÈÑÇÊ\');return false;"" class=""navMenu"">ÇáÎÈÑÇÊ</a></td></tr><tr><td><a href=# onclick=""top.SetLocation(\'\',\'\',\'AddMembersAcademicRank.aspx\');top.SetTitle(\'ÇáÑÊÈÉ ÇáÚáãíÉ\');return false;"" class=""navMenu"">ÇáÑÊÈÉ ÇáÚáãíÉ</a></td></tr><tr><td><a href=# onclick=""top.SetLocation(\'\',\'\',\'MemberQualificationList.aspx?t=\'+(new Date()).toLocaleTimeString().replace(\':\',\'\'));top.SetTitle(\'ãÄåá ÇßÇÏíãí\');return false;"" class=""navMenu"">ãÄåá ÇßÇÏíãí</a></td></tr><tr><td><a href=""#"" onclick=""{0}"" class=""navMenu"">ÊÍãíá ÇáÓíÑÉ ÇáÐÇÊíÉ</a></td></tr><tr><td><a href=""#"" onclick=""{1}"" class=""navMenu"" title=""ÌÏæá ÇáãæÇÏ ÇáÊÚáíãíÉ"">ÌÏæá ÇáãæÇÏ ÇáÊÚáíãíÉ</a></td></tr><tr><td><a href=""#"" onclick=""window.open(\'loadEduGate.htm\'); return false;"" class=""navMenu"">ÇáÈæÇÈÉ ÇáÅáßÊÑæäíÉ</a></td></tr><tr><td><a href=# onclick=""top.SetLocation(\'\',\'\',\'MarksMainPage.aspx\');top.SetTitle(\'äÙÇã ÇáÚáÇãÇÊ ÇáÑÓãí áÃÚÖÇÁ ÇáåíÆÇÊ ÇáÊÏÑíÓíÉ ÈÌÇãÚÉ ÇáÈÊÑÇ\');return false;"" class=""navMenu"">äÙÇã ÇÏÎÇá ÇáÚáÇãÇÊ</a></td></tr></table>";
Then one must show it:
lblScript.Text = @"<script type='text/javascript'>document.getElementById('navContent').innerHTML='" + string.Format(memberMenu, @"top.SetLocation(\'\',\'\',\'ListOfMemberCVs.aspx?mid=" + (new FacultyMembers()).GetMemberByUserName(sUserName + "@uop.edu.jo").Rows[0]["membersID"].ToString() + @"&t=\'+(new Date()).toLocaleTimeString().replace(\':\',\'\'));top.SetTitle(\'ÇáÓíÑÉ ÇáÐÇÊíÉ\');return false;", @"top.SetLocation(\'\',\'\',\'../Courseslist/Default.aspx?d=" + ReserveTicketForUser(sUserName, pwd, userType + "," + pwd) + "&mid=" + (new FacultyMembers()).GetMemberByUserName(sUserName + "@uop.edu.jo").Rows[0]["membersID"].ToString() + @"&t=\'+(new Date()).toLocaleTimeString().replace(\':\',\'\'));top.SetTitle(\'My Courses\');return false;") + @"';</script>";
All I wanted to do was to show a link that only the developers could see so we can test a critical system we are migrating to live, this leaves me no opportunity to do so. Some stuff I can put down to bad design decisions, but this I can't explain away.
|
|
|
|
|
In any application I scream a little every time I see a hard coded menu. FFS, it is as easy to parametrise it as it is to hard code and the latter is more extensible. If I caught one of my trained simians doing that it'd be bull-whip time.
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
You'd have a fit with our codebase, nothing (I and mean nothing) is well implemented. I'd call "Job Security" but the bloke who wrote the worst of it left. To add piquancy to the proceedings, I'm struggling to convince the powers that be that doing things properly will be quicker than doing things "quickly" as per the OP. Oh well, I can always resign.
|
|
|
|
|
The approach has to be to give them a route to a better application. "Throw it all away" will not work.
Tell the PHB's that any bug fix will take 5x what would be expected because of the shyte code, but only 4x to reimplement. Stick to this.
All new work, for a given value of 'new', should be done with the new approach and the legacy code updated as and when it needs to change.
If possible, black-box the legacy stuff so that you don't have to go in there too often.
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
Yes, they don't have to know that in the end nothing of the old code will remain and that you gradually threw everything away. Hopefully the old application is not so twisted and dependent that every change triggers a chain reaction of subsequent changes. Then you have little chance to do it step by step.
"Dark the dark side is. Very dark..." - Yoda
--- "Shut up, Yoda, and just make yourself another toast." - Obi Wan Kenobi
|
|
|
|
|
Yes, that would be a good approach, but they've agreed to a re-write (on the grounds our current site really doesn't play well will googlebots) but they want the new system to be as patchy as the first. Naturally, there is some politics going on which is behind all this.
|
|
|
|
|
Same here. I have written applications that have been online for months without any problems and they whine about the time it took to get them to work that well. The old application fell apart every day and was almost unmaintainable, but this time and effort somehow does not count.
"Dark the dark side is. Very dark..." - Yoda
--- "Shut up, Yoda, and just make yourself another toast." - Obi Wan Kenobi
|
|
|
|
|
Ran across this little gem while cleaning some old (but still in active development ) VB6 code today:
If GV_GracefullyExiting Then
End
End
End
End If
* Names and dates removed to protect the ???
Was it really that hard to track down why the application wouldn't die that it needed to be ended three times? I mean, a double-tap is standard zombie killing procedure, but thrice?
|
|
|
|
|
Yeah, and those other two End statements should be commented! Like so:
If GV_GracefullyExiting Then
End
End
End
End
End
End
End
End If
|
|
|
|
|
If GV_GracefullyExiting Then
While True
End
End While
End If It is VB after all - the Language That Would Not Die...
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Manfred R. Bihy: "Looks as if OP is learning resistant."
|
|
|
|
|