Your Code as a Crime Scene: Use Forensic Techniques to Arrest Defects, Bottlenecks, and Bad Design in Your Programs (The Pragmatic Programmers)
Format: PDF / Kindle (mobi) / ePub
Jack the Ripper and legacy codebases have more in common than you'd think. Inspired by forensic psychology methods, you'll learn strategies to predict the future of your codebase, assess refactoring direction, and understand how your team influences the design. With its unique blend of forensic psychology and code analysis, this book arms you with the strategies you need, no matter what programming language you use.
Software is a living entity that's constantly changing. To understand software systems, we need to know where they came from and how they evolved. By mining commit data and analyzing the history of your code, you can start fixes ahead of time to eliminate broken designs, maintenance issues, and team productivity bottlenecks.
In this book, you'll learn forensic psychology techniques to successfully maintain your software. You'll create a geographic profile from your commit data to find hotspots, and apply temporal coupling concepts to uncover hidden relationships between unrelated areas in your code. You'll also measure the effectiveness of your code improvements. You'll learn how to apply these techniques on projects both large and small. For small projects, you'll get new insights into your design and how well the code fits your ideas. For large projects, you'll identify the good and the fragile parts.
Large-scale development is also a social activity, and the team's dynamics influence code quality. That's why this book shows you how to uncover social biases when analyzing the evolution of your system. You'll use commit messages as eyewitness accounts to what is really happening in your code. Finally, you'll put it all together by tracking organizational problems in the code and finding out how to fix them. Come join the hunt for better code!
What You Need:
You need Java 6 and Python 2.7 to run the accompanying analysis tools. You also need Git to follow along with the examples.
Self-Paced Training Kit (Exam 70-640): Configuring Windows Server 2008 Active Directory (Self-Paced Training Kits)
Build Your Own Website: A Comic Guide to HTML, CSS, and WordPress
Mastering phpMyAdmin 2.8 for Effective MySQL Management
Beginning ASP.NET 4 in C# 2010
iPad All-In-One for Dummies (7th Edition)
Heavy development, hundreds of commits are made each day. Manually inspecting that data is error-prone and, more importantly, takes time away from all the fun programming. Let’s automate this. Calculating change frequencies is straightforward: parse the log file and summarize the number of times each module occurs. You could also add more complex processing to keep track of renamed or moved files. You already know about Code Maat. Now we’re going to use it to analyze change frequencies. The.
Investigation started when the therapists told the police about Quick’s confessions. Convinced by the therapists’ authority that repressed memories were a valid scientific theory, the lead investigators started to interrogate Quick. These interrogations were, well, peculiar. When Quick gave the wrong answers, he got help from the chief detective. After all, Quick was fighting with repressed memories and needed all the support he could get. Eventually, Quick got enough clues to the case that he.
Research.) Now you know what to avoid and watch out for. Before we move on, take a look at some more tools you can use to reduce bias. Discover Your Team’s Modus Operandi Remember the geographical offender-profiling techniques you learned back in Learn Geographical Profiling of Crimes, on page 16? One of the challenges with profiling is linking a series of crimes to the same offender. Sometimes there’s DNA evidence or witnesses. When there’s not, the police have to rely on the offender’s modus.
Changes for a reason. Perhaps we have a feature area that’s poorly understood. Or maybe we just have a module with a low-quality implementation. report erratum • discuss Chapter 14. Dive Deeper with Code Churn • 172 Given these reasons, it’s hardly surprising that code churn is a good predictor of defects. Let’s see how we can use that in our hotspot analyses. Analyze Churn on an Architectural Level In Chapter 10, Use Beauty as a Guiding Principle, on page 105, we used temporal coupling to.
For stability, 42–44 iterations monitoring tests, 99 problem solving, 98, 116 trend analysis of temporal coupling, 89 J Jack the Ripper, 16, 19 The Jargon File, 139 Java programmers and emotions, 131 JSON, D3.js enclosure diagrams, 45, 158 K Karr, A.F., 22 Kerr, N.L., 126 Kintsch, W., 98 knowledge developer patterns, 149– 152 distribution, 147–161 map, 152–161, 176, 180 need to aggregate collective, 14 sharing with patterns, 116 visualizing loss, 158–161 knowledge map, 152–161, 176, 180.