The Wrong Way

I got a call for help from one of my teammates today. He was supposed to deliver a data correction script. Unfortunately, the thing was not compiling. He wrote up this huge script. Then he tried to compile it. Of course it did not work.

I found a slew of problems. There were syntax errors. Wrong keywords were used. Semicolons missing. The poor guy is not strong in PL/SQL. So he could not decipher the error messages. I helped him for a while, getting past tons of bugs quickly.

This all could have been avoided. Don't just blindly code and hope to eventually compile the thing. Compile it after you write your first routine. That way the code delta is small and you can hone in on the problems.

I write PL/SQL pretty well. However I still start checking for errors as soon as I start coding. I even stick in a NULL in place of the code and make sure the function and procedure declarations are correct before I implement the first line of business logic. Take it from a pro buddy. Test first.