+1 for stepping through the code in a debugger.
As it takes time, just do it for the bits you're actively interested in. Step in from those high level pieces of functionality to the lower level stuff when it seems likely to lead to something interesting, or when you see a lot of stuff happened in there after you stepped over it.
There's no better way of building a mental model of what the code is doing than, quite simply, watching what the code is actually doing from the inside
- Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
- Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!
Collapse
You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:
- You are not logged in. If you are already registered, fill in the form below to log in, or follow the "Sign Up" link to register a new account.
- You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
- If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.
Logging in...
Previously on "Understanding other peoples code, functionality, applications"
Collapse
-
+1 for enterprise architect
Back in the day, when I was doing tech due diligence on acquisitions, I found it really helpful for understanding some systems.
Leave a comment:
-
If it’s in RPG put into debug mode a walk through the live code
Sent from my iPhone using Contractor UK Forum
Leave a comment:
-
Shirley the app already has plenty of comprehensive up to date documentation from the original development project. I know, only joking.
Presuming the IDE is of Visual Studio calibre, if so I've reverse documented apps into a technical specification (when a company bought out another and wanted to know how poorly documented software worked so it could be modified or replaced) by starting with the UI elements such as menu, buttons, and other user actions that trigger events.
Put breakpoints on the app start up and all relevent events and see where the code goes when using the UI. Visual Studio makes this simple by stepping through or over code so can get a good idea of how it hangs together at runtime using the debugger. Obviously need to do this with the version of code in production but using a test environment so don't have to worry as much about it changing any data.
If there are seperation layers such as APIs or services, search the entire codebase for the public function/endpoint names to see if they're actually used anywhere. I once cleaned up a webservice by doing this to identify which public functions out of about 400 were still referenced anywhere. A suprising number weren't so that helped by identifying the obsolete ones so didn't have to spend any more time tracing those or worrying what they did. I commented out the codepaths no longer used so easy to identify active code, then checked it still compiled as I went through it so could find active references easily.
Certainly find that type of approach more productive than trying to just look at the code, many parts of which may be obsolete or orphaned and no longer used.
This is a bit old skool as I've not had to do such a task for some years, so there may be better tools to generate docs from code, or profile code for active paths and reference trees and other useful stuff that should be easy to automate so likely someone has done that work already.
Leave a comment:
-
Originally posted by jamsandwich View PostI've had several software developer jobs working on business applications with Microsoft tech stack, although I guess this is a fairly generic question about working as a programmer doing bug fixes, maintenance and enhancement (as opposed to greenfield development on a totally new application).
Up until recently, I've managed to gain enough understanding of a legacy app to be able to work on it by reading through the relevant area of code in the IDE and playing around with the front-end app in a dev/test environment.
However, I started a new job recently (still as a software developer) working on maintenance and enhancement of an existing application which is quite large and complex with many separate components. In this job I've found that I've struggled when trying to apply my usual method of understanding an application that is new to me.
I thought it might help if I modelled some areas of functionality by drawing some UML diagrams (class diagrams, sequence diagrams, etc) so I began doing this. I found it quite time consuming and had difficulty in knowing how much detail to add (e.g. some classes had a lot of properties & methods). I tried to leave out all except those that were most relevant to what I was working on. I'm not sure how much this really helped me. Then again, I've not done much with diagramming notation, whether UML or other type. I wonder if I should practice drawing UML diagrams more in order to gain greater understanding of the concepts and notation, and that maybe doing that might help me model existing code better and gain understanding of it quicker.
Has anyone had much experience of diagramming/modelling like this, or are there other ways of gaining understanding of legacy code that might help me?
Thanks.
A couple of hours on YouTube and reading the excellent user guides will get you started.
Leave a comment:
-
Understanding other peoples code, functionality, applications
I've had several software developer jobs working on business applications with Microsoft tech stack, although I guess this is a fairly generic question about working as a programmer doing bug fixes, maintenance and enhancement (as opposed to greenfield development on a totally new application).
Up until recently, I've managed to gain enough understanding of a legacy app to be able to work on it by reading through the relevant area of code in the IDE and playing around with the front-end app in a dev/test environment.
However, I started a new job recently (still as a software developer) working on maintenance and enhancement of an existing application which is quite large and complex with many separate components. In this job I've found that I've struggled when trying to apply my usual method of understanding an application that is new to me.
I thought it might help if I modelled some areas of functionality by drawing some UML diagrams (class diagrams, sequence diagrams, etc) so I began doing this. I found it quite time consuming and had difficulty in knowing how much detail to add (e.g. some classes had a lot of properties & methods). I tried to leave out all except those that were most relevant to what I was working on. I'm not sure how much this really helped me. Then again, I've not done much with diagramming notation, whether UML or other type. I wonder if I should practice drawing UML diagrams more in order to gain greater understanding of the concepts and notation, and that maybe doing that might help me model existing code better and gain understanding of it quicker.
Has anyone had much experience of diagramming/modelling like this, or are there other ways of gaining understanding of legacy code that might help me?
Thanks.Tags: None
- Home
- News & Features
- First Timers
- IR35 / S660 / BN66
- Employee Benefit Trusts
- Agency Workers Regulations
- MSC Legislation
- Limited Companies
- Dividends
- Umbrella Company
- VAT / Flat Rate VAT
- Job News & Guides
- Money News & Guides
- Guide to Contracts
- Successful Contracting
- Contracting Overseas
- Contractor Calculators
- MVL
- Contractor Expenses
Advertisers
Contractor Services
CUK News
- Streamline Your Retirement with iSIPP: A Solution for Contractor Pensions Sep 1 09:13
- Making the most of pension lump sums: overview for contractors Sep 1 08:36
- Umbrella company tribunal cases are opening up; are your wages subject to unlawful deductions, too? Aug 31 08:38
- Contractors, relabelling 'labour' as 'services' to appear 'fully contracted out' won't dupe IR35 inspectors Aug 31 08:30
- How often does HMRC check tax returns? Aug 30 08:27
- Work-life balance as an IT contractor: 5 top tips from a tech recruiter Aug 30 08:20
- Autumn Statement 2023 tipped to prioritise mental health, in a boost for UK workplaces Aug 29 08:33
- Final reminder for contractors to respond to the umbrella consultation (closing today) Aug 29 08:09
- Top 5 most in demand cyber security contract roles Aug 25 08:38
- Changes to the right to request flexible working are incoming, but how will contractors be affected? Aug 24 08:25
Leave a comment: