Introduction (Part 1)
Writing
an organized, descriptive, maintainable and clean code could be a difficult
task to achieve, especially if there are many developers working on the same
project, thus this task becomes more and more difficult as the team grow
bigger.
We
will go through the best techniques in organizing you code, in addition to code
naming conventions starting from your source (e.g. database) and ending by your
page, containing code behind. This article series is a technical subject, and
it’s mainly targeting developers and solution designers.
Why to organize my code? It’s working, isn't it?!
How
many times you have ran into others code or even sometimes your very own code,
and felt that rewriting the whole thing all over again – which sometimes
happens – is easier than fixing it? How
many times you have spent most of your time or sometimes days, reading the
code, trying to understand how it works and finally thinking how to maintain it,
while you should have been done with your task, which might sometimes takes
only a few minutes? How many times you have ran into a code that use to be
short, descriptive and easy to understand, and throughout the long project life
cycle it have become long, non-descriptive and ugly?
This
is what we usually call Spaghetti code, which is a code that is complex,
tangled and includes unstructured branching, thus non-descriptive and hard to
understand. It is named so because the code flow is conceptually like a bowl of
spaghetti, twisted and tangled.
Sometimes
your program looks very good from the outside, but the code may taste very bad
from the inside…
Writing
an organized and descriptive code isn't about making it work or not, you can
write a functional, bug free and yet a very ideal program without following any
of the coding practices, though writing an organized code is basically for what
comes through and after, which is bug fixing, enhancement and support.
Following
coding practices makes your code descriptive and easily understandable, for you
and for others later, whether they are already working closely with you or not,
once developers are introduced to the coding directions and standards (practices)
your code and theirs would look the same, thus would be descriptive, easily
understandable and maintainable for you all.
Enough with the talk, Tell me how to do it…
There
are many aspects that you can follow in your program in order to imply coding
practices, whereas there are general ones (related to the whole project solution)
and there are detailed ones (related to the very specific details in your code).
In this blog we will start with the general ones first then gradually moving into
the detailed aspects.
Comments
Post a Comment