, Guest!
Already a Member? Login or Register.



Main Menu



Login

Username:


Password:




Stay logged in
across browser sessions



Home > Articles > Coding > Think only data by Yash K.S

Think only data by Yash K.S


Posted: March 20th, 2007 @ 7:15am


Data is most important in computer life, Whole arrangement we have done in computer only to manage these data. Two sins programmers commit are as follow:

  • Defining data loosely

  • Global variables

These sins, programmer commit due to less understanding of what they are building or management pressure and unrealistic deadlines from some non-technical person. Result of these sins, company will pay heavily in later stage more then an individual programmer. Company will pay with having a Buggy code base and the result of this buggy code will end the story in following way:

  • Makes more difficulty in adding the features for next releases and waste lots of company money.

  • Closing specific project. If customers rejects it.

  • Closing company. If there is repetition of the same mistakes in multiple projects in the same company, if they don't have bandwidth of $ power.

Initially, we start project without defining data properly and in later stage new programmers, new features, new market pressures will make you to use multiple technologies. During this process you will forget to take care of Data part. If you sit and think carefully, you will be facing most problems due to wrong handling of Data. Give some privacy for data.

Today you will start with few global variables, in later stage programmers obviously tempted to add some more global variables due to pressure or laziness and get the result expected. Today we can see multiple products in a stage that, any programmer can declare any variable in any file and access it. After touching code from multiple programmers, project will be dirty and messy if there is no proper way defined to access data or there is some proper process exists in company to alter the code base.

To reduce problems which project faces each time, you could try following:

  • Management should have interests in defining data usage rules for all the projects. This is most important since, they can make or break any project easily.

  • Whole product needs to separate physical project or multiple physical projects, where it has only Data and each data will have C functions of Create, Destroy, Read, and Write. In this method programmers will tend to do fewer mistakes, even after many releases and even after changing programmers.

  • Even if there is only few global variables, combine all related global variables into structure and write C functions.

  • Strictly no-no in using global variables in rest of the modules, it should be banned :-)

  • Even if you have multiple modules which is developed using C, VB, etc... Find a way to call only, defined C functions from all these modules and make sure you do not have separate modules for data handling like separate for VB, separate for C, etc...This will create more messy. It will be nice to create separate in VB, separate in C for writing code faster first time. But, later you will regret it more with messy Data and pay heavy price in maintaining the code.




Copyright © 2005-2008 Yashks.com. All Rights Reserved

Processing Time: 0.02817 seconds.
 
Management Login

Powered By FlexCMS
Powered By FlexCMS