|
I'm Too Legit to Quit, I Don't Stop until I'm Gaining Momentum. So Feel My Power it's Hammertime.
|
|
|
|
|
MacAskill and (definitely) MacNamara look like they are real Macs.
This kind of code just implies your input and/or requirements are crap, though. People should be trusted to type their own name as they want it.
|
|
|
|
|
This goes back to a more elegant age where people couldn't use puters.
|
|
|
|
|
I have a Scottish friend called Macaskill who definitely does not capitalise internally, and the others were ascertained by looking through the telephone directories of several major British cities, though I think Macnamara[^] is a special special case - some capitalise and some don't
=========================================================
I'm an optoholic - my glass is always half full of vodka.
=========================================================
|
|
|
|
|
Glad to see it takes care of MacHine
|
|
|
|
|
Well, you have to run that code at the speed of MacH 2.
|
|
|
|
|
You thought that code was bad??
How about this[^] little gem, written in C#??
I hate hearing crap about VB being the sole domain of horrible code.
|
|
|
|
|
|
|
I'm surprised that CP didn't give an "Out of memory exception" when the OP posted that code. Whew!
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
As I always say, it ain't the tool that is used that's the problem, but the tool that uses it.
=========================================================
I'm an optoholic - my glass is always half full of vodka.
=========================================================
|
|
|
|
|
What do you get when you cross a joke with a rhetorical question?
|
|
|
|
|
Not the sole domain, but a particularly frequent one due to some bad language design decisions.
JavaScript is similarly plagued, and of course one can always create bad code in any language, just some make it the default way of working for many.
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.
|
|
|
|
|
Holy crap.
Here's what you do.
Install Strawberry Perl on that machine, and have that function shell out to a perl one-liner. It'll still be more efficient and less dain bramaged.
|
|
|
|
|
mikepwilson wrote: Install Strawberry Perl
No, I don't think so...
mikepwilson wrote: less dain bramaged
you were saying?
|
|
|
|
|
I dunno man, consider it.
Perl is the language for programmers who have actual work to get done.
|
|
|
|
|
Die! Die! Die!
I won't bother with the code, it's all the same.
|
|
|
|
|
Sorry, I have to disagree; some code is much worse that others.
Just because the code works, it doesn't mean that it is good code.
|
|
|
|
|
NV: Die! Die! Why won't you die?... Why won't you die?
VB6: Beneath this mask there is more than flesh. Beneath this mask there is an idea, Mr. Nagy, and ideas are bulletproof.
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
Wow, that was a bit strong. Nagy isn't alone in his opinion of VB6, luckily it won't be much longer before it gets to its final resting place.
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.
|
|
|
|
|
I've had very bad experience with VB6 and don't mind to dance on it's grave - sooner is better...
But I do not blame VB or VB6 or VB.NET per se - in my experience it always related to human error (bad choice in most case)...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
Re-using variables can be dangerous. The following code had me baffled for hours. This code queries a dozen different XML files on the server, builds a response, and serves it to different dashboards.
fileName = "FinSummaryByMonth";
xmlFile = Server.MapPath("Data/" + DistrictNumber + "/" + sYearFolder + "/" + fileName + ".xml");
srcDoc = XDocument.Load(xmlFile);
fileName = "MealSummaryByMonth";
srcDoc = XDocument.Load(xmlFile);
Being a newbie to linq, I had assumed the mistake was in the query. 2 hours later, looking at the output, I realize that the rows in the problem section were identical to the rows in the previous section nevermind that the results should have been ints.
"Go forth into the source" - Neal Morse
|
|
|
|
|
"Omit needless local variables." -- Strunk... had he taught programming
Or, better, write a method and eliminate the repetitive code.
You'll never get very far if all you do is follow instructions.
|
|
|
|
|
PIEBALDconsult wrote: Or, better, write a method and eliminate the repetitive code.
This.
|
|
|
|
|
Good advice! I suppose I could stick the file names into a list with any parameters distinct to each query and return a loaded XDocument or Array. Maybe in the next version! Thanks!
"Go forth into the source" - Neal Morse
|
|
|
|