Pages

Some things to consider while developing a code project

Intruduction
Hello world. Have you ever worked on a code project yet. If not I bet you are planning to develop a project probably a software application, web development etc. And I can say that you are a good developer who always wants to find out new ways to work better.

Description
My first project was not a very great one and I have no knowledge of designing or best practices what so ever. I studied and coaded and studied and coaded and I did it. I was happy about making it work the first time. But as my second year in BE came, that amount of knowledge was not enough. The size and requirement of project got highly increased, and the syntax level of knowledge was totally not sufficient even for starting the second project in C++. Here are a few Requirements I felt...

  • A version Control System
  • Modular Design practices/Concepts
  • Some short of design Patterns
  • Need of Work Division and some sort of iterative process/steps formation
  • ...

I did not have even heard of neither version control system, nor of Design patterns but I was thinking that there must be something because I am feeling it difficult to manage, Others should also feel the same. I messed up my codes four or five times where I could not undo it and I have to start a new project from the beginning. That was totally time consuming and tedious. While going on coding, the project grows too big and deep that I start forgetting the main logic behind the high level project design, and I even forget Why I am working on this particular module/What it had to do with the project.
Here are some of the things I do while developing a code project.

  • Always divide your work into smaller modules
  • Start and complete one module before you go to the next
  • Properly test it
  • Once a module/(a program) is working correctly, don't modify it. Instead extend it and make changes
  • Make a hierarchy of features as much as  you can
  • Properly Abstract your code, Use interfaces.

 Always abstract, classes and make a hierarchy, and properly distribute the attributes, properties and methods/interfaces. If you need a group of similar objects like for example, (dog, cat, fox, etc) then all have four legs, and two ears etc. These kind of properties should be combined together and put in one abstract class say General Animal class. And all the animals have some basic methods, like move, walk, run, eat, cry, etc. So, all these functions should be combined in a general interface and all the objects should be implemented the interface so that all the objects of that package or that group's general methods could be seed at a glance in one place. This defines the general view of the group, and their general characteristics. Then the object specific methods should be written associated with the objects only.

No comments:

Post a Comment

If you like to say anything (good/bad), Please do not hesitate...