Home

Advertisement

So called Agile Programming ....blah...

  • Sep. 20th, 2008 at 12:10 AM
Beautiful Life
It's another fryday don't know what to fry. I had left over masala of maggi and rice. My food store is going to run out soon. Cooked rice and mixed maggi masal to it, cooked very well. Result, I have some eatable which works. It's time dream how my mother cooks. Everything is well planned. Hmmm...the way i have cooked is known as Agile programming and my mother's is a CMMi level 5 certified cooking.
The rule of the Game is every developer owns a module, A game which has no rules. This tuesday all the modules were getting glued together and obviously it is nightmare. There we realized a need for another module. This is how it works. Design happens on the fly. There are no special documents. Every developed module is thoroughly tested only by the developer. Again the code starts leading to more and more problems.

Every programmer thinks his program can never ever go wrong. There builds a conspiracy. Any problem is turned to another module. Similar to women in Indian streets sweep the dust into neighbor :). Here begins a learning where i am the key conspirator. The framework of new module was in place. I plugged the code into repository. The framework was tested, but once plugged with another module,ZZZZ crash. A horrible crash.  "*** glibc detected ***. This is one of the most dangerous crash. Every memory allocation fails thereafter. It is very hard to figure out. I knew this was the problem in my module. One can expect in a code of about 2K developed in 3 days. To keep the conspiracy on and to buy time as the new module was still under development, I disowned the problem. Instead i gave the temporary solution to set MALLOC_CHECK_, so that the memory checks are skipped. It was good enough for me to buy time for development. With hundreds of memory allocation it is hard to point. These problem got to do with dynamic memory allocation. I had to go through every memory allocation. But things looked good at the first parse of my eyes. All of a sudden the bug flashed. I don;t know what to call this. It is the memory allocation something like this. mem = ipc_alloc(ipc_handle, sizeof(MAX_BUF)); Ah!! what the hell, i thought of given sizeof(message_structure) which is around 20 and finally gave sizeof(MAX_BUF) which is 4. This is not a problem if the next buffer operation is restricted by size. My next operation is ipc_receive which simple overshoots writing the buffer, which is corruption. At the end some learning. "Screw up and fix it", that's all the programming is :).
How bad a good practice can be. Definitely things work quicker with agile programming. As I Initially said something which is prepared to work. Development of prototypes fit to this type of development. Anyway no more crashes, a happy weekend.


Profile

Beautiful Life
[info]talksoflife
talksoflife

Latest Month

November 2009
S M T W T F S
1234567
891011121314
15161718192021
22232425262728
2930     

Listenings!!!



site stats



Locations of visitors to this page


Tags

Powered by LiveJournal.com
Designed by [info]phuck