|
Kill it! Kill it with fire!
|
|
|
|
|
It could be worse. The developer could have started an instance of one of the Microsoft Office applications to do the job (in a service).
Software Zen: delete this;
|
|
|
|
|
Yep. And for extra credit he could have used ActiveX to start it on the client!
The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)
|
|
|
|
|
Why you had to bring ActiveX into this ?
|
|
|
|
|
Because I am the AntiChrist, and it's my job to introduce Evil to the world?
The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)
|
|
|
|
|
You're creeping me out. That is exactly what he did with the DataSet!
|
|
|
|
|
"Your mission, should you choose to accept it, is to eradicate this evil from the world. As always, the Secretary will disavow any knowledge of your actions. This post will self-destruct in five seconds. Good luck, Gordon."
Software Zen: delete this;
|
|
|
|
|
Naw - then the other developers on the team complain because that's the way they have always done it. The senior developer on the team before you doesn't want to take the time and effort to teach more junior developers better ways of doing things. So in the end - you will rip out all the code you wrote, to replace it with 5X more code/execution paths to be tested
Phil
|
|
|
|
|
I'll assemble my elite team now! Thanks
|
|
|
|
|
I've seen people try that - it normally fails, horribly.
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.
|
|
|
|
|
Ignoring the legal implications (server usage of Microsoft Office apps violates the license), the Office apps fail in odd ways or cause unusual server failures when used in this fashion.
Software Zen: delete this;
|
|
|
|
|
I'm just a trainee and I still have a LOT to learn (and wrote some sh*tty code myself), but even to me this looks... funny
|
|
|
|
|
Look at it hard. Study it. Do the opposite and you'll do well in your career. Best to you.
|
|
|
|
|
Thanks! Learning what not to do is also important, that's why I always take a look around here
|
|
|
|
|
Wow! my boss would kill me and the code together if she sees that in production (it's a 'she' boss..)
|
|
|
|
|
Whoever wrote this; should be hanged, drawn and quartered...
|
|
|
|
|
Doesn't that run the query twice, too? (Once to bind it to the GridView, which I assume is the big laugh here – does that even work in a service? – and once when initialising dv.)
|
|
|
|
|
You're probably right. I was given a task to get it working again. I later learned that it may have *never* worked.
|
|
|
|
|
[Reads first line of code]
Is that Visual Basic?? There's your problem right there!
Let the flame war begin (or fizzle out because nobody noticed/cared).
|
|
|
|
|
Chad3F wrote: or fizzle out because nobody noticed/cared
Now nobody will miss it.
Greetings - Jacek
|
|
|
|
|
I still contend that Object Pascal is the better language!
There, feel better?
|
|
|
|
|
Nope. Befunge is the best. There is no better 2D programming languge. If there is any.
Greetings - Jacek
|
|
|
|
|
|
the only coding atrocity i see here is the choice of language. maybe your gerfuffle means something to 'dozers but to the rest of us this might as well be a paragon of code purity.
|
|
|
|
|
You know that a Windows service can be allowed to interact with the desktop in which case you can use and you need UI controls. I don't know what the intention is from those few line of codes but this is far from a War Crime, so I think you're exaggerating.
Yes, I know that :
Quote: In most cases, it is recommended that you not change the Allow service to interact with desktop setting. If you allow the service to interact with the desktop, any information that the service displays on the desktop will also be displayed on an interactive user's desktop. A malicious user could then take control of the service or attack it from the interactive desktop.
I have seen worse.
giuchici
|
|
|
|