, Guest!
Already a Member? Login or Register.



Main Menu



Login

Username:


Password:




Stay logged in
across browser sessions



Home > Articles > Coding > Think-Code-Think again by Yash K.S

Think-Code-Think again by Yash K.S


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


In a project or a product, each developer gets some module to code. This module might have planned or unplanned, we are going to divide modules. Sometimes we are going to divide the problem, document and distribute to each person or someone will just randomly divide the problem based on his current knowledge gives and gives to each developer and then developer starts coding. This dividing the problem properly is largely depends on the company process which they follow. Some follows, some don't follow when they want just output.

As a developer, to solve some piece of problem he is going to follow one of following method:

  • Get some knowledge for someone who has done this

  • Surf the Internet or read a relevant book

  • What ever method we follow, we are going to do more mistakes. We might just get output but we don't know when it is going to bomb in later stage either in integration stage or in some other situations like in different computer inside the company or in client place.

The reasons for most of the errors in a module:

  • We do not know what code we have written, we just got expected output after compilation

  • We do not think how we are going to write a code before we start writing code.

  • We do not think about the code after writing it, checking whether it is exact stuffs which u wanted to write or not

Best option could be, Load the problem/module which you got, inside your memory (mind) and you need to think, to get idea how are you going to develop that module. You also need to identify roughly important connection points or sub modules how you are going to split the module into again further.

Once you feel that you got some data, you just need to put into paper, so you can think further by taking up each of the sub modules which you got earlier. By taking each of the sub modules again, you need to think how you are going to write this specific sub module, what are the important factors which you need to consider during development of that sub module.

As you identify important factors you should note down into paper or else you will not get further ideas to think. Once you got rough ideas to develop, then you need to start writing code, if you get any of the doubts, again you need to go back to thinking. During thinking all these problems, you need to go away from computer.

Make sure, as you write code check whether it is giving expected output or not by testing the code and have better understanding of code which you are writing it.

Now, you got output. But, you don't know whether your code written is proper or not. Just getting output will not end, we need to check whether it is working the way it should or not. For Ex : If you do not have proper understanding of multi-thread, If you have created multiple thread to get some output, how do u know each thread is running properly to give output or only few threads are giving all the output? To know this you need to remember all your code which you have done and go back to thinking again to check the validity of code or visualize multi-threading way.

When you coded too many things in module and if you suspect again some problem is happening, you need to identify related sub modules, then you just need to go thru once to remember about that code or module and then you need to go back to thinking to check whether it is valid or not and it is as per you thought earlier or not. During this kind of re-thinking again after writing code will help you in identifying many logical errors for sure.

Doesn't matter how much your project or product is planned, it all depends on how much time you are going to spend time in thinking before starting to type code and after typing the code to validate it. You need to write program within in mind and then translate into computer program, check again along with your program which you have in mind. If you suspect problem in which you thought earlier, you need to repeat the task again like above said.

  • Load the problem into your mind, Think

  • Type Code (Don’t think A...Z during this stage itself, it will allow you to do more mistakes)

  • Think again to validate it




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

Processing Time: 0.02245 seconds.
 
Management Login

Powered By FlexCMS
Powered By FlexCMS