- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Must... Not... Be.... Hypnotized..... By.... Backupscript... thud
Admin
Based on my experience, where most DBAs automatically dismiss anything suggested by a developer, I was not surprised to hear that they passed on the revised code.
Admin
And I thought I wanted to go to sleep before I read this...
Admin
T h i s
i s
a
v e r y
n i c e
s c r i p t
i n d e e d ! ! !
Admin
Looping is not a proven technology, and Thom is right not to trust it. Looping takes work away from the programmer and is therefore a threat to job security. Loops are for the lazy. The only legitimate use of looping is the for-case paradigm.
Admin
A 2-dimensional line, what a script! :S
Admin
This script reminds me of this simple piece of code.
Admin
I think that's the most beautiful script I ever saw on here. I really like the pattern it makes when it scrolls by.... _
Admin
Admin
I must be very fortunate to work in my environment. Our db team does a very similar "quantity" of coding as our web team. There are always several ways to accomplish a task and we generally agree on whether something should be written in PL/SQL or on our end.
Our dba's are generally consulted in problem solving and ideas freely flow back and forth. It has to be admitted that as I gain more experience and knowledge I am able to offer more ideas.
Admin
Actually, Thom's script is more efficient.
Admin
I thought when you went to Heaven, that rules of the afterlife say you can no longer communicate with all of us left behind...
Admin
All our DBAs have been laid off due to the global economic downturn. The reasoning behind this was that most of our developers can work with a DB but none of our DBAs can write code. So the DBAs are out and the developers now have to administer the DBs themselves.
Things are running better than ever and productivity is at an all time high.
Admin
You've got the wrapping set incorrectly. When it's properly set and you sit arms length away from the monitor and stare past the screen, an image of a naked lady appears in 3D.
Admin
WHAT WAS THE PROBLEM that Andrew fixed??! I like hearing about problems slightly more than beeing reminded that not all people think in loops.
Admin
Admin
Also, when someone does scripting as beautifully as this, why only give us a tiny line? Give us everything! I want to see nakedness as well, but my screen resolution is too high :(
Admin
Truth is beauty. Beauty is truth. The first script is much prettier to look at, and thus it is the more elegant of the two.
Admin
Admin
Admin
Admin
Replacing one line of code with four lines? You call that efficient??
Admin
Admin
Admin
Admin
Admin
look...at...all...the...pret...ty...pat...terns....must...re...sist...in...san...i...ty...fail...ing....leave...ing...now....
Admin
What pains me most is not the script itself, but the mindset of the person who wrote it. "I must not miss any integer in the next 119"
Oh wait, maybe he wrote a script with a loop to generate this command line?
Admin
The reason is that a good developer knows what's going on behind the scenes in a db at least as well as a dba.
Admin
Admin
Ohh...a sailboat!
Admin
Admin
Specifically, "$WORKSAPCE/ewprd117". They transposed the 'A' and the 'P', which, most likely, meant that it pointed to a variable that did not exist, rather than $WORKSPACE which was used 117 other times or so.
And before you ask, I found it via removing all newlines, then did find/replace for the common text that was repeated so many times. Did it just because I wanted to know the reason why this WTF came to light myself.
Admin
Lying about my work environment makes me feel:
(1) Sorry. (2) Not sorry.
Admin
Okay, is it me, or is nobody seeing that the script doesn't do what it advertises... It starts off with a file= and in the loop continues with FILE= At least the DBA's script worked
Admin
Wow, every job I've ever had the dbas would say "We don't write stored procedures" you write it and give it to us to maintain. I've always wondered what it is they do? Write create/alter sql and then sit around waiting for indexes to corrupt? I can never understand how their pay is on the same scale (or better) than a developers.
Admin
Admin
Just curious... Isn't "file=$WORKSPACE/ewprd*_$DATECODE.dmp" somewhat likely to work? :-"
Admin
Of course they passed on the script! That wouldn't pick $WORKSAPCE/ewprd117_$DATECODE.dmp up correctly. You always have to make sure the corner cases are covered, so sometimes a generic script just isn't sufficient.
Admin
Admin
Admin
Admin
Well, not sure about your guy's place, but we sure do write a lot of code... Most of our DBAs though actually came from our development department, so maybe we're odd...
As far as making more, I've found that to be the case only for the lower level developers and DBAs. It tends to balance out once a person knows what they're doing. Unfortunately, that seems to be pretty rare for developers AND DBAs.
See "No, really"'s comment, though I think 50% is too generous...
Admin
Yeah, you're right, 50% is definitely too generous... barely 50% of any profession can do their own job well, and I've found that goes moreso for tech jobs :)
Of the developers who actually ARE good at their job, however, I would say most of them could switch to a dba position and do very well at it with minimal training.
Admin
Admin
The script is probably generated and the file variable is filled from a select from some system table. Make sure that the script is regenerated each time before it is run, and it will still work correctly if an ewprd119 thingie is added to the database. Or even when at some time ewprd45 no longer exists.
Not a WTF.
Admin
Regardless, the fact is that case is only important when it is. If it doesn't matter, then it doesn't matter.
Admin
Everyone knows you unroll loops to make it faster!
Admin
I remember my 1st bag-o-weed...
Captcha= modo (an anagram of DOOM)
Admin