Seeking books/resources on working with other people's code.
April 21, 2009 6:33 AM Subscribe
I would like to find some books that cover how to work with other people's code.
I'm a student and an intermediate level java programmer. I am working with someone else's code on a major project for the first time ever. I am quite used to developing projects from scratch, but trying to make sense of someone else's code is a nightmare, especially since it is very poorly written.
The program is "done" and my job is to make it better. Fix bugs, clean up the awfully written code, etc.
There are so many books on how to develop software from the beginning. Are there any books on how to take pre-existing software and give it an overhaul?
I'm a student and an intermediate level java programmer. I am working with someone else's code on a major project for the first time ever. I am quite used to developing projects from scratch, but trying to make sense of someone else's code is a nightmare, especially since it is very poorly written.
The program is "done" and my job is to make it better. Fix bugs, clean up the awfully written code, etc.
There are so many books on how to develop software from the beginning. Are there any books on how to take pre-existing software and give it an overhaul?
Best answer: You're looking for Refactoring reference material. Refactoring is the process of restructuring code without changing its external behavior. A high-level overview: you write lots of tests to make sure you understand what the code does and ensure that you're not going to break it, then you modify the code in small chunks and make sure the tests all still pass.
Fowler's Refactoring: Improving the Design of Existing Code is a fairly good introduction to the topic.
posted by flipper at 6:43 AM on April 21, 2009
Fowler's Refactoring: Improving the Design of Existing Code is a fairly good introduction to the topic.
posted by flipper at 6:43 AM on April 21, 2009
Best answer: Robert Martin's Working Effectively with Legacy Code.
posted by emilyw at 6:55 AM on April 21, 2009
posted by emilyw at 6:55 AM on April 21, 2009
i have found refacotring to patterns to be a good compliment to fowler's refactoring book.
you might also want to check out working effectively with legacy code.
posted by phil at 6:56 AM on April 21, 2009
you might also want to check out working effectively with legacy code.
posted by phil at 6:56 AM on April 21, 2009
eh, the Legacy Code book is by Michael Feathers, not Robert Martin.
posted by emilyw at 6:57 AM on April 21, 2009
posted by emilyw at 6:57 AM on April 21, 2009
Definitely read up on refactoring, but I'd urge you to exercise patience before jumping into anything drastic. Make sure the problem IS with the code (and not with you being unfamiliar with the code) before you start making changes.
posted by devbrain at 8:05 AM on April 21, 2009
posted by devbrain at 8:05 AM on April 21, 2009
Other than the books on refactoring, test-driven development, etc, I recomend; patience and observation.
Who originally wrote the code? That is actually more important than one would care to admit in a corporate environment where engineers are promoted into management and then "protect" their former bastard code offerings... It would help to know that before you open your mouth and publically slag the code, recomend that it's stinking fetidness be thrown out and it should have been aborted in the first place...
(No - I am not bitter, just passing on the bitter dregs of personal experience ;-) )
posted by jkaczor at 8:52 AM on April 21, 2009 [1 favorite]
Who originally wrote the code? That is actually more important than one would care to admit in a corporate environment where engineers are promoted into management and then "protect" their former bastard code offerings... It would help to know that before you open your mouth and publically slag the code, recomend that it's stinking fetidness be thrown out and it should have been aborted in the first place...
(No - I am not bitter, just passing on the bitter dregs of personal experience ;-) )
posted by jkaczor at 8:52 AM on April 21, 2009 [1 favorite]
You should try posting this to StackOverflow. Here's a similar question, not exactly waht you're asking, but the top answer points to a book suggestion.
posted by nomad at 11:33 AM on April 21, 2009
posted by nomad at 11:33 AM on April 21, 2009
This thread is closed to new comments.
posted by Skybly at 6:40 AM on April 21, 2009