How could you understand codes? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

How could you understand codes?

lot of persons have this doubt

20th Nov 2017, 4:19 PM
Ramalingham Krishnamoorthy
Ramalingham Krishnamoorthy - avatar
2 Answers
+ 4
I comment my code and document it very well. When I'm in the "groove" and everything is flowing smooth it's fine, but what happens when I come back a few months or a year later? Sometimes I question if I even wrote it because the flow doesn't make sense to me, so I have to spend some time reading through it to put myself in the exact same mindset as when I was originally thinking about it. This is why it's great to have a habit of commenting/documenting, even if you're the only person working on the project, and most especially if there are others that will be working on it. As for other people's code, I just read through it and see how their code flows. I map out what leads to where, and how it's going about its functionality. It takes a little bit of time to read someone's code, but for the most part, it usually makes sense. If there is stuff that I don't know or understand, then I research it further and end up becoming better at something than I was prior, so that's a benefit. Hopefully they documented/commented their code nicely, but many people don't. Overall, after learning various languages, it's not hard to read someone else's code unless they didn't properly format it.
20th Nov 2017, 4:58 PM
AgentSmith
+ 4
If I code now and check my code after 1 hour, it takes 30 minutes more to understand. I know, "It's is harder to read code than to write".....😂😂😂
20th Nov 2017, 4:28 PM
Md. Nafis Ul Haque Shifat
Md. Nafis Ul Haque Shifat - avatar