Working off of someone else's code

mlm

Senior member
Feb 19, 2006
933
0
0
I may have bitten off more than I can chew, but I recently accepted a job where I'm supposed to continue working on a large application that is already functional and in production. The original developer left a while ago, and I'll be the only coder there.

How do I approach this? Is it better to try to understand the whole program first, or is it better to just concentrate on what's being affected by the additions I have to make? Any advice?
 

mundane

Diamond Member
Jun 7, 2002
5,603
8
81
Speaking as someone who has repeatedly tried approach #2 because it is 'faster', if you have the time, try to at least get a feel for the entire application. Usually they'll want me to go in and make a quick mod to this or that, but sometimes seemingly trivial changes can affect many other modules. It is especially helpful when they don't have _any_ documentation whatsoever.
 

tfinch2

Lifer
Feb 3, 2004
22,114
1
0
I would say both. You have responsibilities to deliver the modifications that need to be done right away, but you also need to learn the nuts and bolts for the future. You have to find a balance between the two. Reading code for a large app seems difficult at first, but once you wrestle with it for a few days/weeks, you'll get it.
 

nakedfrog

No Lifer
Apr 3, 2001
62,813
19,011
136
Yes, both. If you just try to understand the whole program first, it will be much more abstract. Working backwards from the changes you need to make should give you a fuller understanding.
 

Red Squirrel

No Lifer
May 24, 2003
70,592
13,807
126
www.anyf.ca
If you can try to get a sandbox copy of it so you can mess around without breaking the production one, do that. Dood way to learn the code and what does what etc without worrying about breaking it. I run a game server based on a large C# application and thats basically how I went about adding to it. I knew nothing about C# either when I first started. Now I know the whole program fairly well and have learned C# to a certain extent. Also hope that the original dev commented his code a lot. Sometimes I run into bits of code and go "WTF were they thinking?" and condense 500 lines into 50 to do the exact same thing and more efficiently.