| « Prev | Page 1 | Page 2 | Page 3 | Next » |
|
Must... Not... Be.... Hypnotized..... By.... Backupscript...
*thud* |
|
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.
|
|
And I thought I wanted to go to sleep *before* I read this...
|
|
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 ! ! ! |
|
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.
|
|
A 2-dimensional line, what a script! :S
|
|
This script reminds me of this simple piece of code.
|
|
I think that's the most beautiful script I ever saw on here.
I really like the pattern it makes when it scrolls by.... *_* |
It reminds me of everybody's first BASIC program: Used to spend ages watching the patterns those things made as the screen scrolled, tweaking the string length to get the best temporal aliasing effects... |
Re: The Backup Snippet
2008-12-17 08:23
•
by
SoonerMatt
(unregistered)
|
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. |
|
Actually, Thom's script is more efficient.
|
Re: The Backup Snippet
2008-12-17 08:39
•
by
Chrisos
(unregistered)
|
I thought when you went to Heaven, that rules of the afterlife say you can no longer communicate with all of us left behind... |
|
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. |
|
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.
|
|
WHAT WAS THE PROBLEM that Andrew fixed??! I like hearing about problems slightly more than beeing reminded that not all people think in loops.
|
Re: The Backup Snippet
2008-12-17 08:50
•
by
Anonymous
(unregistered)
|
Damn, that ASCII chick is HOT! |
|
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 :(
|
|
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. |
Cool! More money for me six months from now when the whole mess needs to be cleaned up! I think I'll buy a boat next summer.... |
For all other cases, recursion must be used! |
I can cite a couple of ex-girlfriends who put the lie to that. Both were very pleasant to the eye, and both would rather climb a greased flagpole and get to lie than stand on the ground and have to tell the truth. |
|
Replacing one line of code with four lines? You call that efficient??
|
Re: The Backup Snippet
2008-12-17 09:25
•
by
Dirk Diggler
(unregistered)
|
Send pics or it never happened. |
Of the greased flagpole? |
Why resist? It's Inevitable! See? Told you so. Now what will you do? |
Re: The Backup Snippet
2008-12-17 09:59
•
by
Anonymous
(unregistered)
|
Good idea, you'll need somewhere to live when your wife kicks you out because you can't find any work. |
|
look...at...all...the...pret...ty...pat...terns....must...re...sist...in...san...i...ty...fail...ing....leave...ing...now....
|
|
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? |
Re: The Backup Snippet
2008-12-17 10:11
•
by
No, really
(unregistered)
|
In my experience, only about 50% of dbas are capable of doing their own job well, which is about identical to the percent of developers who could do the job just as well. 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. |
Truth is booty? |
Ohh...a sailboat! |
I don't even see the code. All I see is blonde, brunette, red-head. |
Re: The Backup Snippet
2008-12-17 10:47
•
by
Baha
(unregistered)
|
The problem was right by, but not right at, the end. 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. |
Please answer the following question: Lying about my work environment makes me feel: (1) Sorry. (2) Not sorry. |
|
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 |
Re: The Backup Snippet
2008-12-17 10:55
•
by
T604
(unregistered)
|
|
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.
|
I noticed that as well. I gave the submitter/poster/editor the benefit of the doubt and assumed that the script was executing in a UNIX-like environment with [*ugh*] case-insensitive environment variables... :-X Either that, or the poster/editor is a Windows-y user and doesn't realize case is important. ;D Either way, you get the point. And the Windows-y users never will. ;D |
|
Just curious... Isn't "file=$WORKSPACE/ewprd*_$DATECODE.dmp" somewhat likely to work? :-"
|
|
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.
|
Re: The Backup Snippet
2008-12-17 11:13
•
by
Patsie
(unregistered)
|
Depends entirely on where and how this 'file' variable is used. If it's used in a tool with file globbing, then yes, most likely that would work. (i.e. unix tools like ls and rm) But if it's a non-file globbing tool, then unforetunately not. |
Well $WORKSPACE/ewprd*_$DATECODE.dmp would likely result in a space delimited list of existing files matching that pattern. If the files do not yet exist then it wouldn't likely work. Also, the space delimiters might need to be replaced with commas if subsequent code relies on that (though it would be pretty easy to do). I'm thinking there is probably a much better solution all together. However, if the DBA team didn't like that revision it's probably because they aren't very familiar with shell scripting (or whatever language this is) and wanted to keep the script as simple (even if that means redundant) as possible. |
Isn't globbing typically handled by the shell in UNIX[es]? The only caveat is that the tools would need to be able to handle many files passed in many arguments, would need to be able to parse a single space delimited argument (and the environment variable would need to be quoted), or the environment variable would need spaces replaced with commas. :-/ I think. |
Re: The Backup Snippet
2008-12-17 11:26
•
by
A DBA
(unregistered)
|
|
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... |
Re: The Backup Snippet
2008-12-17 11:32
•
by
No, really
(unregistered)
|
|
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. |
Idiot! You increased the code size by a factor of four! |
|
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. |
I'm not sure what you're getting at. Are you confusing Windows with Visual Basic, maybe? Regardless, the fact is that case is only important when it is. If it doesn't matter, then it doesn't matter. |
|
Everyone knows you unroll loops to make it faster!
|
Re: The Backup Snippet
2008-12-17 12:03
•
by
C. F. Martin
(unregistered)
|
I remember my 1st bag-o-weed... Captcha= modo (an anagram of DOOM) |
rEm Respond to Windows user.Case is important. Languages that ignore it are generally lazy languages used by lazy programmers. And environments that ignore it are weakened by it. I'm technically a Windows and Linux user, though I much prefer Linux for 99% of everything. I'd sure like to rid myself of Windows entirely, but unfortunately game developers don't yet give Linux the attention it deserves. :( |
| « Prev | Page 1 | Page 2 | Page 3 | Next » |