Click here to Skip to main content
15,666,373 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all, today I am working junior java dev at bank sector and When I started working at the position I am seriosly be carefully learning new future which most useful tools in this area. But I have a seriosly problem, which I couldn't be reading someone's code. I'm pretty close, but I'm looking for a better way.

1)In most articles, rumors say that we can run the program in debug mode so that we can understand other people's code. But my point is, the moment we look at all projects in object oriented software, it's pretty much mostly variables here are control structures a few looping operations on them and so on. makes.

What do you say about this subject, how and in what ways do you understand someone else's code?

What I have tried:

I tried to many spend time reading someone's code but still I have stuck in the problem.
Updated 15-Nov-21 9:08am

1 solution

Read the design documents and the code comments. If both are rarely available, start to look for a new job. :)

Object-oriented code can be hard to follow because it can be unclear which function will be invoked when polymorphism and inheritance come into play. Using a debugger to step through the code helps you to see what is going on.
Share this answer
[no name] 16-Nov-21 0:27am    
I've heard a few times to review codes in debug mode, but now I have a new tactic. Regardless of its size or smallness, when we look at the codes, variables and objects are always created within the methods.

We are familiar with two situations here. One of them is we take our data from the client and store it in the variables or properties of the objects we created. Then we move it to the tables we created in the database through our entity classes.

The second way is this. We store the values we pull from the database in our variables or objects and show them to the client in the controllers section.

And we do different-different logic operations on these values.

I mean, software consists of only these. But sometimes there is no comment about any code or the documentation of the project is lost. Then what can we do to understand better? Is there any easier way?
Greg Utas 16-Nov-21 6:32am    
You are talking about a specific type of system design. I was answering generally, because there are many other types of system designs. But even assuming that code uses the same design as your system, I can't think of an easier way to understand it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900