K
K
keltkelt2019-05-13 15:11:26
Algorithms
keltkelt, 2019-05-13 15:11:26

What to read to understand someone else's code?

Now I had to pick up someone else's code, despite the fact that I'm working with C# for the first time. Thrown straight into battle.
Here the man unfolded such a structure that until I reach the thread, I already forget why it is needed. Any receivers, receivers of types, loaders. Then exit the folder and go to another folder and look for the class there.
He himself merged, and they gave me the code, because he had already done a lot.
So. What to read about all sorts of abstract classes, patterns and all that?) I mean, their application. I don't know, for general development or something.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
#
#, 2019-05-13
@mindtester

one -

What to read to understand someone else's code?
someone else's code
2 - master the debugger.
first time working with c#
if this is Windows, then everything is pretty good - you are absolutely legal and free, VS2019 Community is available (if there are very good arguments, you can also have an older version) study the code under a debugger
3 - advise you on literature, in this case it is useless - you need to know the coder's thinking , which merged . back to pp2 - better than a debugger, no one will help you
4 - correction - F1 and right click on the classes in the studio)). if the class is from MS - F1 will help. if the class/variable/type is from "merged" - examine the "right click" menu items:
- go to definition
- go to implementation
- find all references
5 - updto read, you need to code.. to make it easier to read, you need to code a lot. these processes strongly feed each other. if there are no tasks "from scratch" .. it's worth exercising somewhere (like a rocking chair, a gym) .. here for example https://www.codewars.com/
.. but doing at least small, but useful tasks for someone, is even tougher. well, it’s really cool - to combine everything ... if you want to become a master)))

X
xozzslip, 2019-05-13
@xozzslip

find his contact, ask him to explain what is happening in his code. if you're not too arrogant, you can enlist a very useful source of information in the form of the author of the code.

I
Ivan Yakushenko, 2019-05-13
@kshnkvn

What to read to understand someone else's code?

Books on programming > someone else's code.

V
Victor Bomberow, 2019-06-14
@majstar_Zubr

Yes, don’t care, everything is done simply: you take the debugger in one hand, the copy-paste machine in the other, cut out class after class, build a simplified model of someone else’s creativity. Once you figured out a piece, you wrap it in #region with your comments.
How is it going?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question