|
Ever heard of self-referential irony?
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
I think it was just a mistake.
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC Link[ ^]
Trolls[ ^]
|
|
|
|
|
Spoiler!
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
He just spoiled the spoiling
|
|
|
|
|
This is the loop that generates our main menu , all on one line:
<% int i = 1; foreach (Fatthallah.Web.HttpHandler.PetraMainMenu mainMenuItem in mainMenuCollection) { Response.Write("<li style=\"float:" + (lang == "en" ? "left" : "right") + "\"><a id =\"a" + i + "\" name=\"a" + i + "\" href=\"" + (mainMenuItem.MainMenuLink.Trim().Length > 0 ? ResolveUrl("~/" + mainMenuItem.MainMenuLink.Split('?')[0] + "lang=" + lang + "&" + mainMenuItem.MainMenuLink.Split('?')[1]) : "javascript:void(0)") + "\" onclick=\"fetchData('menuHandler.axd','hml','menu=true&id=" + mainMenuItem.MainMenuId + "&lang=" + lang + "',this);return false;\" onmouseout=\"hidebox(this);\" >" + (mainMenuItem.MainMenuTitleEnglish.Trim().Length > 0 && lang == "en" ? mainMenuItem.MainMenuTitleEnglish : mainMenuItem.MainMenuTitleArabic) + "</a></li>"); i++; } Response.Write("<script language='javascript' type='text/javascript'>mainMenuCounter =" + mainMenuCollection.ToArray().Length + "; var rtl=" + (lang == "en" ? "false" : "true") + ";</script>"); %>
My eyes are bleeding, and that's before I start the rant about how we keep our site bilingual and why we use JavaScript to replace what could be achieved with hyperlinks.
[Edit]
After a simple tidying exercise:
<%
int i = 1;
foreach (Fatthallah.Web.HttpHandler.PetraMainMenu mainMenuItem in mainMenuCollection)
{
Response.Write("<li style=\"float:"
+ (lang == "en" ? "left" : "right")
+ "\"><a id =\"a" + i
+ "\" name=\"a" + i
+ "\" href=\"" + (mainMenuItem.MainMenuLink.Trim().Length > 0 ? ResolveUrl("~/" + mainMenuItem.MainMenuLink.Split('?')[0]
+ "lang=" + lang
+ "&" + mainMenuItem.MainMenuLink.Split('?')[1]) : "javascript:void(0)") + "\" onclick=\"fetchData('menuHandler.axd','hml','menu=true&id=" + mainMenuItem.MainMenuId
+ "&lang=" + lang + "',this);return false;\" onmouseout=\"hidebox(this);\" >"
+ (mainMenuItem.MainMenuTitleEnglish.Trim().Length > 0 && lang == "en" ? mainMenuItem.MainMenuTitleEnglish : mainMenuItem.MainMenuTitleArabic)
+ "</a></li>");
i++;
}
Response.Write("<script language='javascript' type='text/javascript'>mainMenuCounter =" + mainMenuCollection.ToArray().Length + "; var rtl=" + (lang == "en" ? "false" : "true") + ";</script>");
%>
I think it was put on one line "keep our pages small" by removing unecessary whitespace, but this is code to generate html so it doesn't count. In any case it is still 100 times more complicated and convoluted than it needs to be for our purposes.
|
|
|
|
|
Art, man, it's a... no... forget it... my eyes are bleeding too could we get a smiley... sadey with red tears?
(yes|no|maybe)*
|
|
|
|
|
Really...
Who said boys don't cry...
|
|
|
|
|
Another sample from our code base...
If UCase(optionText) = "True" Or optionText="1" Then
' Some code here
End If
Further down in the function, there's a test for Windows 3.1, so I guess this has been in place a while. Still no excuse though.
|
|
|
|
|
your not wRONG
"You get that on the big jobs."
|
|
|
|
|
Trick question! Neither. Just found this:
</br>
And, no, there was not an opening BR. Just a long list of anchor tags separated by this new form of BR tag.
Driven to the ARMs by x86.
|
|
|
|
|
you </br> idge the gap...
(yes|no|maybe)*
|
|
|
|
|
Oh, it still works when omitting the opening tag? Cool, then I can omit that one in my code and have faster page loading!
|
|
|
|
|
Burning </br>idges, obviously.
Seriously, what is the world coming to?????
(P.S. and shouldn't he have been using <p> or <li> or...)
-- Modified Sunday, July 17, 2011 3:28 AM
|
|
|
|
|
another one that I have seen is <br />
it depends on whether it is html or Microsoft html as to whether you take the < p > and use styles to make it work like <br>
< p > is because I couldn't get the tag to show until I put spaces in it, even though I put it in code tags
|
|
|
|
|
<br /> is correct and is required for XHTML. For other HTML versions, there is no closing marker. In other words, there is never a </br> tag, since the BR element cannot contain anything.
And if you are using something called "Microsoft HTML", then get off my Internet!
Narf.
|
|
|
|
|
// ♫ 99 little bugs in the code,
// 99 bugs in the code
// We fix a bug, compile it again
// 101 little bugs in the code ♫
|
|
|
|
|
|
There is a semantic difference between <p> (or other similar elements like <pre> and <dd>) and <br> (and I don't just mean that one is a container tag and one is a separator). It's not just a matter of (ab)using styles to make one look like the other. A paragraph is one group of related text, which may have explicit line breaks (<br> or, if being XHTML compliant, <br/>) within it. <br> shouldn't be used to split paragraphs, any more than <p> should be used to cause an in-paragraph line break, even if you can mess with the styles so that is the appearance.
(An exception would be code listings where it's usual to run the whole thing inside one <pre>, even though one could logically argue that it should be one per method.)
|
|
|
|
|
I have no idea why so many people are touting the new MVC3 model and Razor view engine. My point here is when classic ASP was the thing we mixed code and HTML on the same page and by god does it look like hell when you do. So when Microsoft allowed you to inline code into your application it really did nothing to stop lousy code practices. And placing all the logic into the code behind was a much cleaner separation of concerns then ASP ever was. But now we have come full circle with Razor which promotes mixed mode files again. Granted it looks better then classic ASP it doesn't look as clean as ASP.NET using code behind. There still needs to be a better way for auto generated code to be passed around without resorting to concatenation of mixed forms of code. Its just sloppy.
nothing
|
|
|
|
|
... Did you look where you were posting?
Don't forget to rate my post if it helped!
"He has no enemies, but is intensely disliked by his friends."
"His mother should have thrown him away, and kept the stork."
"There's nothing wrong with you that reincarnation won't cure."
"He loves nature, in spite of what it did to him."
|
|
|
|
|
"One can write Fortran in any language"
Time you enjoy wasting is not wasted time - Bertrand Russel
|
|
|
|
|
This isn't a coding horror, yet. But I'm betting anything the poster of this little gem produces will be.
Fresh from the depths of Q&A a difficult error message, and a serious question that really belongs in a programming hall of shame:
i need to add a database to my application, and if i do this i it show me this error
"connections to the sql server database files (.mdf) require sql server 2005 express or sql server 2005 express to be installed and running on the local computer.the current version of sql server express can be downlaoded in the following URL:
http://www.go.microsoft.com/fwlink/?linkid=125883"
What can i do?
I just tried an experiment. I read this question to my wife - who is not particularly computer literate, she still thinks notepad is a brilliant word processor - to see if she could answer it. "Follow the link and install the software" was her response.
I look forward to running any app this guy creates...
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."
|
|
|
|
|
I'm not the only one who had a good chuckle with that one, was I.
I know completely technologically ignorant management types who would be able to figure this one out without having to call in "The IT guy"
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
Not everybody is a master of the obvious...
"Dark the dark side is. Very dark..." - Yoda
--- "Shut up, Yoda, and just make yourself another toast." - Obi Wan Kenobi
|
|
|
|
|
Agreed! I have the problem myself. Well, maybe not that obvious but I always seem to miss stuff right in front of me
|
|
|
|
|
Ha! The company I am currently at has employed some consultants to re-implement a process we developed so it could conform to their pre-existing reporting system.
Every e-mail we received from them announced that they were putting their "Top (fill in the blank) person" on the task.
They claim to be Oracle experts and we use SQL Server. I've worked in both worlds so I know there are differences, but after we sent them all our scripts for creating the database, stored procedures and processing, we got an angry e-mail back from them that our scripts did not work. They had run the scripts and had gotten this error message.
Database not found
Their "Top Database person" wanted us to explain what it meant.
Psychosis at 10
Film at 11
|
|
|
|