Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Sep 22nd, 2007, 2:17 AM   #1
avinashmalipatil
Newbie
 
Join Date: Sep 2007
Posts: 14
Rep Power: 0 avinashmalipatil is an unknown quantity at this point
Procedure to analyse source code

Hi,
I am new to programming world. i have been assigned to analyse some C-source code and provided with Source insite software. The problem is that i don't have any experiance with code analysis and its consuming lot of time in analysing even a small function. Can u please let me know if there is any good procedure to analyse programs... I will be eagerly waiting for the solution..
avinashmalipatil is offline   Reply With Quote
Old Sep 22nd, 2007, 6:22 AM   #2
mrynit
Hobbyist Programmer
 
mrynit's Avatar
 
Join Date: Mar 2006
Location: WA, USA
Posts: 332
Rep Power: 3 mrynit is on a distinguished road
Send a message via AIM to mrynit Send a message via MSN to mrynit Send a message via Yahoo to mrynit Send a message via Skype™ to mrynit
PM-ing people with a dummy subject then asking them the same question in your post is not going to get you any help
__________________
i dont know much about programming but i try to help
mrynit is offline   Reply With Quote
Old Sep 22nd, 2007, 6:30 AM   #3
Eoin
Hobbyist Programmer
 
Eoin's Avatar
 
Join Date: Jun 2006
Location: Ireland
Posts: 152
Rep Power: 3 Eoin is on a distinguished road
You've been very vague here. To what end are you analysing the code exactly?
__________________
Visit my website BinaryNotions.
Eoin is offline   Reply With Quote
Old Sep 22nd, 2007, 7:06 AM   #4
avinashmalipatil
Newbie
 
Join Date: Sep 2007
Posts: 14
Rep Power: 0 avinashmalipatil is an unknown quantity at this point
I am analysing at abstract level.. give a general idea for analysing the code..
avinashmalipatil is offline   Reply With Quote
Old Sep 22nd, 2007, 12:10 PM   #5
Eoin
Hobbyist Programmer
 
Eoin's Avatar
 
Join Date: Jun 2006
Location: Ireland
Posts: 152
Rep Power: 3 Eoin is on a distinguished road
Ok that's a start, but you'll still need to say why you are analysing the code. What do you hope to learn?
__________________
Visit my website BinaryNotions.
Eoin is offline   Reply With Quote
Old Sep 22nd, 2007, 3:00 PM   #6
Wizard1988
Professional Programmer
 
Wizard1988's Avatar
 
Join Date: Oct 2005
Location: Chitown
Posts: 417
Rep Power: 4 Wizard1988 is on a distinguished road
Send a message via AIM to Wizard1988
Something like this??
http://java-source.net/open-source/c...alyzers/qj-pro
__________________
JG-Webdesign
Wizard1988 is offline   Reply With Quote
Old Sep 24th, 2007, 12:04 AM   #7
avinashmalipatil
Newbie
 
Join Date: Sep 2007
Posts: 14
Rep Power: 0 avinashmalipatil is an unknown quantity at this point
I am analysing the code to upgrade the features of current code. I have to go through each data structure and function. once i am done with this i have make changes in the existing code. since this is my first time i am going very slow. i want some clean and efficient process to follow. I tryed to go through all data structures but i couldn't understand why many of variables r used. I also tryed to go through functions but was not able findout when the perticular variable has to be changed and when should not be changed.

Last edited by avinashmalipatil; Sep 24th, 2007 at 12:22 AM.
avinashmalipatil is offline   Reply With Quote
Old Sep 24th, 2007, 8:36 AM   #8
Eoin
Hobbyist Programmer
 
Eoin's Avatar
 
Join Date: Jun 2006
Location: Ireland
Posts: 152
Rep Power: 3 Eoin is on a distinguished road
It sounds like you are working with some badly commented code, I don't envy you.

I am afraid I don't know of any formal analysis procedure, perhaps other here might know of some. But if I were assigned that task I would think your first two steps would be to a) get very familiar with the overall purpose of the code and how it works before getting into the small details like when are individual variables changed.

And b) you will need a comprehensive test environment which can verify the existing code works for the different input scenarios. This would mean that when you start to make changes you can check quickly (and ideally automatically) that you haven't broken anything that used to work.

I must admit that I am a little wary because of your first statement, "I am new to programming world." Reading and understanding someone else's code is generally considered harder than writing it yourself, this MS blog post sums it up nicely. So you are going to need that good testing environment where you can experiment with the existing code.

Perhaps you can tell us more which might be helpful?
__________________
Visit my website BinaryNotions.
Eoin is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Update IdTCPSDerver in a DLL sggaunt Delphi 0 Mar 13th, 2007 11:56 AM
GCC sprintf Source Code JawaKing00 C 2 Nov 30th, 2006 3:53 AM
Conversion Delphi to vb Silent_striker Delphi 0 Oct 28th, 2006 10:21 AM
Image processing:Stentiford and Holt Thinning Source code in C or C++ ladyscarlet99 C 0 Sep 9th, 2005 1:20 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 5:07 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC