|
Guys,
If you look careful, you will discover that the problem is not actually the HTML table, but the wrong usage of parenteses which make the code very dificult to understand.
In each line, the guy put a open parenteses to separate the function call, and not close it in time. So, at the end of code block, you have a lot of parenteses.
In time, the parenteses aren't need it this case and don't change the return of expression.
|
|
|
|
|
Personally I'm glad the parentheses are there because now I can clearly see the precedence of the & operators. Without the parentheses I would be totally lost and wouldn't be able to follow the code. I think this is an excellent example of self-documenting code.
|
|
|
|
|
The other users got this right of course...bad and incorrect use of parens but jeez dont you just hate this style of ASP coding! I havent done ASP is years now but isnt this so much easier to look at that than trash:
<table width="1000" cellspacing="0" cellpadding="0" class="style1">
<tr>
<td width="40"><% = rsSearch("WKCTR") %></td>
<td width="40"><% = rsSearch("START") %></td>
<td width="40"><% = rsSearch("FINISH") %></td>
<td width="40"><% = rsSearch("JOBNO") %></td>
</tr>
</table>
|
|
|
|
|
if (DeleteSomething1(peopleToKeep))
{
Assert.IsTrue(true, "DeleteSomething1");
if (DeleteSomething2(peopleToKeep))
{
Assert.IsTrue(true, "DeleteSomething2");
if (DeleteSomething3(peopleToKeep))
{
Assert.IsTrue(true, "DeleteSomething3");
if (DeleteProfile(peopleToKeep))
{
Assert.IsTrue(true, "DeleteProfile");
if (DeleteCompany(peopleToKeep))
{
Assert.IsTrue(true, "DeleteCompany");
if (DeletePerson(peopleToKeep))
{
Assert.IsTrue(true, "DeletePerson");
}
}
}
}
}
}
|
|
|
|
|
Person is afraid, that someone will steal the "truth" of his true values. He is just watching his TRUE values and virtues, what's wrong with that?
|
|
|
|
|
I think he was actually trying to monitor progress via the VS Unit test UI...
|
|
|
|
|
|
In all of computer programdom, I've never encounterd this arrangement of i & iCount in a for loop:
i = getcountofsomething()
For iCount = 0 To i
If something(iCount)) Then
bOk = True
Exit For
End If
Next iCount
modified on Thursday, February 11, 2010 6:33 PM
|
|
|
|
|
It's not that bad - I assume getcountofsomething() takes a while, so the coder has just manually optimised it out of the loop. If Barbie is so popular, why do you have to buy her friends?
Eagles may soar, but weasels don't get sucked into jet engines.
If at first you don't succeed, destroy all evidence that you tried.
|
|
|
|
|
nah, it's bad. who names their variables like this in a for loop? were it written "for i = 0 to iCount", I'd be giving this guy a high 5 already.
|
|
|
|
|
A high 5 around the earhole? cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
|
It's straight from the guide on How To Write Unmaintainable Code[^]:
Never use i for the innermost loop variable. Use anything but. Use i liberally for any other purpose especially for non-int variables. Similarly use n as a loop index.
|
|
|
|
|
lol! I think they were using that as the coding standards document!
|
|
|
|
|
You just don't understand. If the variable was named count you would have a point. Here, the programmer was helping the poor computer with its communications skill. Hence naming the variable that the computer uses to count from its own perspective - "I Count" Please do not read this signature.
|
|
|
|
|
mlNumOfSomething = SomeClass.GetSomething(anIDArray())
For lli = 1 To mlNumOfSomething
SomeClass.GetSomeInfo anIDArray(lli), Description:=aDescription
ReDim Preserve msAllAgencies(1 To mlNumOfSomething)
msSomeArray(lli) = aDescription
Next lli
|
|
|
|
|
I guess they won't need to use an obfuscater...
|
|
|
|
|
That is truely awful. Much better would be:
mlNumOfSomething = SomeClass.GetSomething(anIDArray())
lItemToAdd = 0
For lli = 1 To mlNumOfSomething
SomeClass.GetSomeInfo anIDArray(lli), Description:=aDescription
lItemToAdd = lItemToAdd + 1
ReDim Preserve msAllAgencies(1 To lItemToAdd)
msSomeArray(lItemToAdd) = aDescription
Next lli
That way you can add in logic to exclude items.
Panic, Chaos, Destruction.
My work here is done.
or "Drink. Get drunk. Fall over." - P O'H
|
|
|
|
|
|
Aren't you just so glad we are no longer stuck with 80 character coding sheets... If Barbie is so popular, why do you have to buy her friends?
Eagles may soar, but weasels don't get sucked into jet engines.
If at first you don't succeed, destroy all evidence that you tried.
|
|
|
|
|
Never realized that SQL allows you to place case statements within a join statement, though I guess nothing would syntatically prevent such.
I would highly recommend placing those conversions/etc. into the secondary query being joined (or wrapped in a second query) just to remove the eyebleeding IsNull that trails into the mile long case statements.
|
|
|
|
|
Jeremy Hutchinson wrote: I'm not sure if it's a good or bad thing that I can just forwarded the problem to the original developer.
I think you should hire the original developer if he is not part of your company. Anyone who can handle that monster join is definetly a good asset for the company. I have no smart signature yet...
|
|
|
|
|
That developer does still work here. What I need is someone who is not only smart enough to handle that monster join, but also smart enough not to write it.
At the very least don't write it as one continuous line with no spaces. Throw a little formatting in there.
|
|
|
|
|
Jeremy Hutchinson wrote: Throw a little formatting in there.
I looked, it's still about as appealing as having a limb turned around.
Panic, Chaos, Destruction.
My work here is done.
or "Drink. Get drunk. Fall over." - P O'H
|
|
|
|
|
Jeremy Hutchinson wrote: to handle that monster
Is the monster a manager now? Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep!
|
|
|
|