dbms_output is TURNED OFF by default. Your premise is wrong. to make they PHYSICALLY REMOVE IT IS WRONG.
There is overhead -- overhead something you can and should avoid.
Then there is mandatory stuff -- stuff that must be in there forever. This falls into this category. You want to see some? Just change the NO to YES in the URL above. I would Never in a billion years remove my debug/timing code. I need it CONSTANTLY.
You said (i quote)
I recently recommended that developers should comment out the
dbms_output.put_line from the code which goes into production.
you made them REMOVE IT -- it is commented out. It is not there. They cannot get it again without physically changing code and putting it back in and recompiling. You let them do that in prod when there is an issue???
I'm not judging you -- I'm saying "you are wrong to do this". Period.
sigh -- why is everyone missing this point of the database on the desktop. You use it to test ideas, to learn, to try things out. You want to find out which approach takes more latches (latches being locks, locks being serialization devices, serialization devices being the thing that kills scalability)? You need a single user instance running in isolation. It is a playground, a scratch database. It is not your development box, it is a playground, It gets wiped out -- big deal, nothing lost, just use dbca and recreate it. See also:
</code>
http://asktom.oracle.com/pls/asktom/f?p=100:11:::::P11_QUESTION_ID:6349391411093 <code>
where we discussed this playground database.
I agree a well controlled development, test, production setup is
mandatory, I think I've said that more then once here as well. However, if the developer wants to prove that bind variables are better then not using bind variables -- well, they need to flush the shared pool for example. Will you let them do that? Oh yeah, they need to kick everyone else off during the test to make the numbers meaningful. Will you let them do that? No, of course not. So, what can they do then? Well, if they have that little playground instance....
And if the developer cannot migrate his code from his machine to DEV -- how pray tell will it go from DEV to TEST magically? Also, I never said "develop on their desktop" -- that is what DEV is all about. Nuff said on that topic.
Your example with the COM stuff -- that'll happen between DEV and TEST and TEST and PROD. Thing is -- if what you are testing is database stuff -- it won't happen between Oracle and Oracle -- I develop on linux to deploy to solaris or even windows all of the time. We have the same bugs on all platforms so it ports pretty easy.
UAT was not delayed. UAT did what UAT was designed to do. Catch these issues.
And with the developers not being able to have their own schema to test with -- that's a particularly bad example. First -- the pain inflicted here was 100% self induced -- the programmer was the entire cause. What if they had just written the code and not moved it into source code control or something. Having their own schema is not the cause here -- a person making a mistake -- yes. Tell me -- when this same programmer who can no longer test in their own schema AND cannot have a local database wants to compile new functionality into a package that everyone uses -- what then? How many hours will be wasted by:
o the programmer waiting for everyone to stop using it
o the other developers waiting for this programmer to work the kinks out -- you know, debug this piece of code that lots of people use
All of the issues you describe happened without desktop databases -- it is all a project management issue -- all of it policy and procedures. I'm not saying to develop on the desktop -- but boy, if you want to test an idea, having it there is a nice thing.
However, we got so far off topic here -- we were talking debug code which you are making them physically remove. That is a bad policy period. The Oracle data is heavily instrumented and we can turn it on at will (hey, you know that, Support had you do that to track down an issue!!!)
You seem to say "i want homogenous code" but you make them comment out code -- it is no longer homogenous. Perhaps there was a side effect from calling dbms_output that made the code work in test and dev. Removing the call to dbms_output introduces a bug that was not detected. So following your methods we must not only remove the dbms_output from prod but also from test and therefore DEV.
True story: Some C code. Littered with fprintfs to a debug file (had
if debug fprintf( .... )
all over). Someone says "hey, code will run faster if we don't have those if's, comment them out. don't need to test or anything, same code right..."
Well, C being C -- the physical removal of code changed some pointer locations and exposed a nasty application related bug that wasn't exposed when the fprint's were in the source. Bummer, works in test -- debug shows it works -- doesn't crash, all is well in the world. But production -- doesn't work at all. Why? it isn't the code we developed. It isn't the code we tested. It is code sans debug code. So, not only were we handicapped in trying to figure out what was wrong -- we had no debug we could run -- we couldn't reproduce the issue (cause there we did have debug on).
What if the dbms_output somewhere has:
dbms_output.put_line( 'and the answer = ' || f(x) );
well, commenting that out blindly -- just making them remove it -- could easily materially affect the code. What does F do? Is it important? Maybe they really wanted f as a procedure, didn't care about the return value and this was a cheap way to call it (in their mind). Blindly removing the dbms_outputs -- well, that could change the outcome.
You haven't caused any offense, I'm still trying to convince you that
leaving that debug code in there is justified and the right thing to do. Making them physically remove it is a very bad idea. If you want to outlaw a scratch database on the desktop -- so be it. I only see positives, no negatives. Every negative you came up with was pretty much policy based. Take the COM+ dll example. Do you think there would have been ZERO hours of fixing if they had the "bad dlls" from the beginning? No -- they would have fought the DLL he%#@ for N hours on the real machine as well (been there, done that, never will I program windows again personally). Not a chance -- they would have spent 4 hours on the dev machine saying "why isn't this working as it should".Anyway.