How do programmers find the correct files and lines of code to edit in an open source project when they want to add or improve functionality.

2.16K views

How do programmers find the correct files and lines of code to edit in an open source project when they want to add or improve functionality.

In: 58

34 Answers

Anonymous 0 Comments

A good code base will be organized. If you want to change something regarding the database the folder marked “Database” (or aliases thereof) is probably a good place to start looking.

If you’re lucky the project will have proper documentation which you can simply read and that will point you to the right direction.

If that doesn’t work but you know where the functionality is being used you can find those spots, see what functions are being called, and find where they are defined.

And if the worst comes to worst just do a text search for keywords you think will be relevant is always an option. There are only so many places that “database” or “db” or “select” can appear. Pick the right keyword to narrow things down, and manually check each match manually to see if it is what you need.

“Finding the correct lines” is then just a matter of reading the code and understanding what it does. Code isn’t just random symbols with no rhyme or reason: a programmer simply reads it and figures out what it’s doing, and from there decides on what needs to be altered or added.

You are viewing 1 out of 34 answers, click here to view all answers.