Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
I’m assuming files, classes, variables etc have sensible names? Search for keywords that could point you to relevant sections of code and start looking for places where the bug might originate from. Slap in a few breakpoints and go from there. You’ll find the bug in no time.
-
There is a book written for such cases - "working effectively with legacy code" by Michael Feathers. I do recommend this one for legacy and large codebases. In essence, it shows many practices with covering legacy projects with tests and then refactoring it properly.
-
Xoka12784y@puradawid the problem is that, the project is way worse to be called "LEGACY". Legacy codes do have certain standards, this project code doesn't have that.
on top of that, Pretty sure 3 or 4 devs worked on it, and everyone worked on their own style.
and there's public static variables everywhere. its like, "everything is connected to everything" :/ -
Don't worry about missing deadlines, it's normal when working on legacy products. If there is any documentation, read on it.
-
Organize some calls with the old devs, this should get you a better understanding of what's going on behind the hood and buy you some time too, which isn't gonna hurt.
-
heartade1344yThat sucks pretty much. If you know at least when the specific bugs arise (in the manner of, [how / which component] should the user interact with to induce the bug), you should probably start with the methods tied to that specific component in the app.
-
If bug can be seen from UI, you can start with layout inspector to quickly find related views, and go from there.
-
atheist99824yRun the app, reproduce the problem.
Skim the app file list, pick something that looks relevant, read and understand.
Repeat until you find something that is hard to read. That's probably where the problem is... -
atheist99824yIf everything is hard to read, the devs are the problem.
But start small. One class or function small. -
Xoka12784yThanks everyone for your kindest words and great advises. I really appreciate.
I actually started cleaning up the code class by class since yesterday. Clean code feels awesome ^_^
Related Rants
#AskingForSuggestions
Suppose, you were given a project source code of an Android app, a pretty BIG sized app. You don't know anything about the code unless you read line by line. Now you were given a deadline to fix some bugs, but you don't know where to start or where to put breakpoints to debug. In that case, how would you do it? How would you debug the code?
Thanks
question
debug
suggestion
android
easily