Learning How to Read Someone Else’s Code


There is a turning point in every young developer’s career when they realize that being a developer is about more than just writing code. Much more of your time is taken up by doing research, writing documentation, or (worst of all) trying to figure out what the heck another developer’s code does! Reading someone else’s code is almost never an enjoyable experience; however, with some practice there are ways to mitigate the growing pains on an inherited code base.

If you are lucky enough to have the original author of the code around (usually as a colleague), then always ask questions! Being a newer developer can be overwhelming, and no one wants to embarrass themselves by pestering more senior developers. However, the truth is that younger developers should be asking questions regularly. No one should be more qualified to answer those questions than the original author themselves.

It’s also important to take the code base one step at a time. When writing code for a complex project, are you going to write the entire project all at once? Of course not, and you shouldn’t approach reading code that way either. Similar to writing code, break the segments of code into smaller digestible pieces, and understand what each line does one step at a time.

Learning new things can be a challenge, especially if the author didn’t have you in mind when writing their code. But as with anything else, it’s a skill that’s built up over time! Remember to ask questions, take it slow and steady, and you’ll be a pro in no time.

Print Friendly, PDF & Email

Leave a Reply

Your email address will not be published. Required fields are marked *