Part 1. The basics of investigating a codebase

 

As a software developer, working on real-world apps often involves investigating how your code works. You have to understand the app’s behavior when fixing problems as well as when implementing new features. You use several techniques for this purpose, such as debugging, logging, profiling, and so on, which we will analyze deeply in this book.

In part 1, we start with the first techniques a developer is exposed to: debugging and logging. When working on an app, a developer must often engage in debugging. For example, say you have a small piece of code, and you need to understand how it works. You use the debugger to pause the application’s execution and dive deep into how the app processes the data. Then, when your app runs in an environment, you can rely a lot on logs, which give you needed clues about where something could go wrong.

In chapter 1, we’ll discuss the need for knowing investigation techniques and obtain a big-picture view of them, which we’ll detail throughout the rest of the book. We’ll then take these techniques in the order a developer is exposed to them. In chapters 2 through 4, we discuss debugging. In chapter 5, we go through essential details about implementing and using logs in investigations.