THE COPY – PASTE CUSTOM
I am into programming for the past three years and over the
years have learnt some use full techniques to develop quickly. This came out of
my necessity to remain in the job. Yes, I do accept that copy-paste is a bad
technique of writing code but the other side of the story is that with the
growing demands for projects and pressure at work forces us to adopt this
methodology .For no reason but only for not loosing a job.
Let me go ahead with explaining some
of the basics.
Often when we code a program we must keep in mind that the
database for which we write code at the front end is compatible. This means the
code is in synch with the database in terms of all database objects (Tables,
Views and stored procedures) used in the code. This is a scenario where in
Copy-Paste of code does not exists. We have nothing to copy .We write the code
from scratch. We know the database objects mentioned in the code is in synch
with the database at the back end.
Now let us take a scenario where in you have to copy and
past an entire code from an existing application and paste it on to your
application. Another practical and always programmers face in their job when
project leaders instruct them to implement a similar functionality that is
existing in a different module into the current module and that too within a
small period of time. No one will write the code from scratch. The company pays
for your results and not your methodology of work.
No matter in whichever language you code the principle of
compatibility between the code and the database is the same.
When I copy paste a code my first object is to check that
the variables and objects used in the pasted code is declared. This is where
the ‘Option Explicit’ comes handy.
·
Provide
the ‘Option explicit’ statement at the declaration part of the form.
·
More abstracts about the The Copy - Paste Custom