|
Last year I translated a whole lot of VB6 code into VB.NET 10. After the project was over he complained that most of my code was unintelligible and "I had used LINQ!"
|
|
|
|
|
Bob G Beechey wrote: I am getting tired of silly comments about vb. Presumably by someone who has not checked out vb since vb6.
I've used VB2 through VB6 and VB.Net (2002) through VB.Net 2005.
VB's mother wears army boots!
--
Harvey
|
|
|
|
|
Okay ... what are you getting at?
|
|
|
|
|
Jeroen De Dauw wrote: My reaction is pretty much "the f*** is this". Do you think this is good code or not?
Well the try-blocks in the catch-statements are... Well, I don't know.
It's not the best code, but I've seen much worse. I think with some arguments this programmer would be able to code readable, efficient code. So there is more than a shimmer of hope.
------------------------------
Author of Primary ROleplaying SysTem
How do I take my coffee? Black as midnight on a moonless night.
War doesn't determine who's right. War determines who's left.
|
|
|
|
|
Mhm... lot of if s and elseif s... and try-catch es.
Could be more compact...
(yes|no|maybe)*
modified 30-Jan-13 16:11pm.
|
|
|
|
|
Ok, I found a spelling mistake in the code (an extra 'x')
Jeroen De Dauw wrote: $exx
|
|
|
|
|
Your reaction is the same as mine. Obvious digs at PHP aside, what does this class even do?
|
|
|
|
|
Too much
$exx Or not enough...
It was broke, so I fixed it.
|
|
|
|
|
I think this just converts an array to a string. Can be used in those beginner/advanced/pro/guru code examples
modified 20-Oct-19 21:02pm.
|
|
|
|
|
the f***. developer needs more Argh comments. (am I supposed to include an emoticon?)
|
|
|
|
|
After taking a good look see, this class
takes an array, converts it to strings and
tests to see if the string is a callable
object with a method inside.
In PHP, you can assign a function or object
name to a string and call it as though you
you had hard coded the name in the code.
This code, despite all the complaints is
actually what you would have to do in order
to avoid the exceptions that occur when
you call a function or object that does
not exist.
The author is utilizing a class perhaps to
keep all the related code in one place, but
a simple function would have sufficed.
|
|
|
|
|
I just noticed a variable I had created at some point was later refactored by somebody else from "entity" to "entty". When spoken, they both sound about the same... perhaps somebody was trying to shorten variable names?
|
|
|
|
|
Nay, it just doesn't include a naughty word. Clbuttic.
|
|
|
|
|
He could could have further shorten it by using anti. Fairly similar sounds unless you pronounce it like ant-i.
"Bastards encourage idiots to use Oracle Forms, Web Forms, Access and a number of other dinky web publishing tolls.", Mycroft Holmes[ ^]
|
|
|
|
|
"ntty" would have been even shorter and still sound about the same .
Soren Madsen
"When you don't know what you're doing it's best to do it quickly" - Jase #DuckDynasty
|
|
|
|
|
"ntt" would be even shorter.
|
|
|
|
|
There you go. Now we are getting somewhere.
Soren Madsen
"When you don't know what you're doing it's best to do it quickly" - Jase #DuckDynasty
|
|
|
|
|
|
Why not just ntt? If you spell it out (which is what I assume you should do if there are no vowels ) its en-tee-tee... Sounds about right to me
|
|
|
|
|
Yes, Freak30 also pointed that out above. I am ashamed to admit, I just did not see it .
Soren Madsen
"When you don't know what you're doing it's best to do it quickly" - Jase #DuckDynasty
|
|
|
|
|
keep an eye on him he might try shorten the number of lines to code used in the project to shorten the application!!
Jibesh V P
|
|
|
|
|
But that'll speed it up, won't it?
You use smaller fonts to make the application EXE smaller...
If you get an email telling you that you can catch Swine Flu from tinned pork then just delete it. It's Spam.
|
|
|
|
|
The fastest code to execute is code that doesn't exist.
|
|
|
|
|
A sample of the code I'm working on now:
TimeZone = If(item.Descendants("DisplayableDateTime").Attributes("TimeZone").ElementAt(0).Value <> "", item.Descendants("DisplayableDateTime").Attributes("TimeZone").ElementAt(0).Value, "")
In short, set the result to the value when the value is not an empty string; otherwise, set the result to an empty string.
|
|
|
|
|