Working Effectively with Legacy Code
If you’re going to take this to management, I would not bad-mouth the original developer. This. If there are deficiencies in the code base, focus on those, their effects, and the gains from fixing them. Blaming people is rarely a good idea, for many reasons. If the original dev worked on the code base for a long time, they're probably already aware of them. God knows I'm all too aware of the deficiencies in code I wrote years ago, but that's frequently how things look after years of updates and feature creep. Everyone on our team has code like that, and when new guys come in and point them…
Go buy a copy of "Working Effectively with Legacy Code" by Michael Feathers. Start there. That book changed my career. Just look at the chapter names here: https://amzn.to/2wnPHfi Chapter 6: I dont have much time and I have to make a change Chapter 7: It takes forever to make a change Chapter 13: I need to make a change but don't know what tests to write Chapter 16: I dont understand the code well enough to change it Chapter 17: My application has no structure Chapter 22: I need to change a monster method and I can't write tests for it Chapter 23: How do I know that I'm not breaking…
I think TDD is great in the ideal, but in reality I have only worked on legacy systems where TDD was not practiced from the start. Such systems are hard to fit TDD style tests into because modifying existing code often requires large refactoring to properly inject dependencies and create seams for testing. The catch-22 is that refactoring itself is prone to breaking things without sufficient testing. As a result, I often try to fit my tests into these existing systems rather than starting with the test and refactor the code under test to fit that shape. The only resource I've seen for…
Giving tips very much depends on the language you're using and the capabilities of your debugger, having worked on large legacy VC++ projects knowing the "bad smells" and common mistakes to spot is helpful, but you'll struggle to debug projects you don't have a solid knowledge of. To improve, try learning cracking; https://microcorruption.com/ is a CTF game based around gaining access to embedded devices, it's rather fun too. I think what the most common mistake I find is two programmers having different assumptions on how some subsystem should work, so try improving your working memory as…
Working Effectively With Legacy Code by Michael Feathers http://www.amazon.com/Working-Effectively-Legacy-Michael-Fea... Debugging with GDB: The GNU Source-Level Debugger by Stallman, Pesch, and Shebs http://www.amazon.com/Debugging-GDB-GNU-Source-Level-Debugge... The Art of Debugging with GDB, DDD, and Eclipse by Matloff & Salzman http://www.amazon.com/gp/product/1593271743
I use my iPad Mini 3 for reading PDFs such as data sheets, schematics of circuits, photography books, and so forth. I can understand your interest in larger screens such as the iPad Air 2, but there are so few book I even have access to (much less, use) that are that kind of format. The largest books I regularly use are O'Reilly publications. My notes are usually taken in A5 spiralbound notebooks, or Field Guides pocket books. A4 is a gigantic format for me. As for ownership of books, I buy DRM where possible, and strip the DRM from the books which aren't available any other way. So I have…
The main thing I do is try to implement very thorough unit tests. I find that the act of writing the tests helps me think through the interface to the code, which in turn helps me isolate the caller from implementation details. It also helps make sure an individual module doesn't try to do too much or too little-- the unit test will start to feel "baggy" in the first case, and will look pretty thin in the other. If you haven't read "Working Effectively with Legacy Code" by Michael Feathers, I would strongly recommend it. The book officially is about how you get existing code under test,…
My recommendation: you should probably start from _Working Effectively with Legacy Code_ by Michael Feathers. The best "let's do something not trivial" TDD book is probably still _Growing Object Oriented Software, Guided by Tests_ by Steve Freeman and Nat Pryce. Most of the "more than the basics" topics are the same kinds of practices that were considered "good design" whether you were using TDD or not. For example, Parnas 1971, Berard 1993, John Carmack 1998 ("Time is an input...."), and so on. If you are interested in more than the basics on TDD, the right starting point is _Test Driven…
You may get something out of Michael Feathers' book working effectively with legacy code [1]. There's a more recent interview with the author that might be interesting [2]. Feathers' book is well suited to provide guidance in situations where there is a large amount of complicated mission-critical code without any automated tests, which must be changed to fix defects or add necessary functionality, but no one has confidence in changing the code, as the risk of introducing new defects is perceived to be too high. The book is roughly an introduction to test driven development and…
Modern IDEs can deliver many of the recommendations of the book. Our productivity has increased a great deal. Back then there was no intellisense, code navigation through clicking on method names/classes etc. highlighted syntax errors, built-in unit test frameworks etc. It was written for a different type of developer and a different type of development environment and a specific language, C++. You haven't looked at C++ lately if you think it's the same as it was in 2004. The ISO has released new versions of the language in 2011, 2014 and ratified a new standard here in 2017. If you're…