|
We have code-writing conventions for all programming languages which we use.
It is exact rule, used since company was founded. It gives many benefits, main of them:
 |
reducing probability to make a mistake in the code |
 |
makes it easy to understand, fix & update code written by somebody else |
Code-writing conventions includes:
 |
naming conventions, cases, offsets, formatting |
 |
project, file/unit structure |
 |
typical templates |
Our coding experience described in the following rules:
 |
avoid code duplication |
 |
proper understanding & selection which data structures should be used |
 |
proper code position by level: local, class, unit, project, common library |
 |
correct use of try / except / finally |
 |
never hide exceptions - each exception should be either raised to higher level or logged for later review |
 |
check parameters ASAP, use Exit, Assert, raise Exception |
 |
max use of compiler to capture errors during compilation - use of enumerated types, typed params, avoid object typecasts |
 |
run-time validation in initialization part |
 |
self code documentation, readability - named constants, procedure size <= 1 page, use of local vars with proper names |
Quality Assurance on the code level is based on the following principles.
 |
Code standardization
We had developed and using special tools which check the code according to our
experience, code conventions accordance and for typical errors - Code & HTML Checkers, SQL optimizer, and even INI files checker
|
 |
Common library
Development is always faced with situations to have similar functions
or classes in different projects. In order to consolidate such requests
we are using approach to keep common library. Work on each project
contributes to it.
So now after about 10 years of development we have very solid, optimized
and well tested common library which covers all aspects for programming
on Windows platform.
When we start development of new project(s) 80% is already done and resides
in our common library. This increase development speed, decrease chance
of mistakes, perfomance issues, avoids code duplication.
|
 |
Code review
Some bugs can be found only through manual code review. That is especially
true with errors related to algorithm or interaction between different
application modules. The whole code written by a developer is later
reviewed by more experienced supervisor.
This also much improve professional level of developers.
|
|