By Developers, For Developers

Historical errata for Your Code as a Crime Scene

PDF PgPaper PgTypeDescriptionFixed onComments
7TYPO

“…and how way coding to music affects your problem-solving abilities” should be “…and how the way coding to music affects your problem-solving abilities” or “…and how coding to music affects your problem-solving abilities”. Probably cleaner as the latter.

2014-12-17
19TYPO

“In addition, all large-scale codebases have code that no one knows well or feel responsible for.” should be “In addition, all large-scale codebases have code that no one knows well or feels responsible for.”

2014-12-17
34TYPO

“The revisions analysis results in two columns: an enity column”. Misspelled “entity”.

2014-12-17
75TYPO

missing space: “On larger projects youcan’t see the”

2014-12-17
96TYPO

“automatate the mundane tasks” : probably “automate”

2014-12-17
115TYPO

“three parsers: svn, hq and git”. Mercurial reference should be “hg”.

2014-12-17
57TYPO

In “consider wether the hotspot code is deteriorating”,
wether should be whether

2014-12-30
41TYPO

“In the above figure, you’re can see both the good and the fragile parts of the codebase.” should be “In the above figure, you can see both the good and the fragile parts of the codebase.” The you’re should be you.

2014-12-30
330TYPO

“patrolling a the entire city.” ‘A’ aricle is not needed. (Kindle version shows only loc, not page number)

2015-01-01
142TYPO

“I replayed version control dta”

dta => data

2015-01-12
0TYPO

Footnote 7 (MetricsTreeMap link) contains a couple of typos so the URL does not link anywhere

2015-01-12
viiiTYPO

“Forward” should probably be “Foreword”

This is also on the next page in Acknowledgements, fourth paragraph from the bottom.

2015-02-04
1DEFER

On the Kindle version of the book, the diagrams are very low quality, making it quite hard in many to read or see what is in the diagrams. This is especially true of the visualisations.

2015-06-05
95TYPO

“Let’s dive in and see what’s hidden secrets we can cover in our architecture”

should read

“Let’s dive in and see what hidden secrets we can uncover in our architecture”

2015-02-25
96TYPO

“We developer now risk breaking each other changes”

should read

“We developers now risk breaking each other’s changes”

2015-02-25
97TYPO

“Once we’ve located that architectural boundaries we need to tell Code Maat about them.”

should read

“Once we’ve located those architectural boundaries we need to tell Code Maat about them.”

2015-02-25
104TYPO

“perform the analysis more frequent”

should read

“perform the analysis more frequently”

2015-02-25
105TYPO

“Let’s look at some trends to se what they tell us.”

should read

“Let’s look at some trends to see what they tell us.”

2015-02-25
106TYPO

“Skilled human testers will find different kinds of bugs compared to automated tests will find.”

should read

“Skilled human testers will find different kinds of bugs compared to automated tests.”

2015-02-25
77TYPO

Edit needed for “could recommended” on p.77, which states:
“Another research team used temporal coupling as a code recommendation guide.
Using the results of such an analysis, they could recommended relevant source
code for specific modification tasks (see
Ying et al. [YMNC04]”.

2015-03-04
30ERROR

The merge_comp_freqs.py script does not correctly merge data in Windows. In Windows the output of cloc uses back slashes ‘\\’ instead of forward slashes ‘/’ as a file separator in the file names. The output from maat uses forward slashes. As a result the only file that is found in common is project.clj because the leading ‘./’ or ‘.\\’ is stripped from the name in the cloc output. All of the other file names are not equal because of the file separator.

Adding a call to replace when retrieving the name will fix this problem. So name = row[0] should be name = row[0].replace(“\\\\”, “/”) inside of parse_freqs and name = row[1][2:] should be name = row[1][2:].replace(“\\\\”, “/”) inside of parse_complexity. This will ensure that all file separators in the name are consistent and will therefore match the key upon look up within the dict.

2015-06-20This is solved by adding the --unix argument to all invocations of cloc in the book.
2626TYPO

When saving the detailed boundaries file the text should read “Open a text editor, enter the following mapping, and save it as maat_src_detailed_test_boundaries.txt…” instead of “maat_src_test_boundaries.txt” from the previous paragraphs.

2015-06-20
125125TYPO

“If we hear the same option repeatedly, we come to think of that opinion as…” should not have “option” but should be “opinion”

2015-06-20
24TYPO

For Windows git version 1.9.5.msysgit.0
the command
git checkout `git rev-list -n 1 —before=“2013-11-01” master`
returns
error: unknown switch `n’
whereas you can submit the embedded command separately.

2015-06-20The git commands on Windows shall be run in the Git Bash Shell as stated in the Introduction; It won't work properly otherwise.
26ERROR

Windows git version 1.9.5.msysgit.0
does not accept:
git log —pretty=format:‘[%h] %an %ad %s’ —date=short —numstat —before=2013-11-01
but returns:
fatal: ambiguous argument ‘%an’: unknown revision or path not in the working tree.
Use ‘—’ to separate paths from revisions, like this:
‘git […] — […]’

As suggested in error, command
git log — —pretty=format:‘[%h] %an %ad %s’ —date=short —numstat —before=2013-11-01
does not produce errors, but does not give any output either.

2015-06-20The git commands on Windows shall be run in the Git Bash Shell as stated in the Introduction; It won't work properly otherwise.
169TYPO

In my printed copy there is twice the same heading used on the pages 169 and 170 (“Link Code Churn to Temporal Coupling”). I guess that either there should be two distinct headings or that you simply remove the second occurence.

80ERROR

The link (http_www.inf.usi.ch/phd/dambros/tools/evoradar.php) for Evolution Radar no longer works.

Perhaps http_reveal.inf.usi.ch/web/dambros/tools/evoradar.php is the updated link?

113ERROR

The code for nopcommerce has moved to https_github.com/nopSolutions/nopCommerce.

Updated git clone command: git clone https_github.com/nopSolutions/nopCommerce.git

(Replace _ with ://)

114ERROR

If I try to run the analysis of nopCommerce as suggested, I got errors because of ^M characters in git log:

  1. clone
    git clone git@github.com:nopSolutions/nopCommerce.git
  1. create log
    maat -c git -l nop_evo_2014.log -g arch_boundaries.txt -a coupling
  1. run analysis
    maat -c git -l nop_evo_2014.log -g arch_boundaries.txt -a coupling
  1. result
    ERROR:
    Invalid argument: java.lang.IllegalArgumentException: input: [4b13537] AndreyMaz 2014-08-21 Source code refactoring. Renamed ProductVariantExtensions
    to ProductExtensions.
    31 0 src/Libraries/Nop.Core/Domain/Catalog/ProductExtensions.cs
    0 31 src/Libraries/Nop.Core/Domain/Catalog/ProductVariantExtensions.cs
    1 1 src/Libraries/Nop.Core/Nop.Core.csproj
    , reason: Parse error at line 2, column 1:
    to ProductExtensions.
    ^
    Expected one of:
    #“\\t”
    [

There are two ^M characters in log - on lines 667 and 1795. These have to be removed before analysis can succeed

89TYPO

On the fifth paragraph on the page is a line that references “Figure , , on page 88”. The figure on the opposite page (88) also has no label. (The P1.0 PDF does not have this issue.)

70TYPO

Second paragraph:
“andsee” -> “and see”

109111TYPO

In the fourth paragraph there is a typo on the word quotation:

(qoutation from Pattern-Oriented Software Architecture Volume 4: A Pattern Language for Distributed Computing [BHS07]).

110ERROR

If followed the steps outlined in chapter »Merge Complexity and Effort« starting on page 109 but merge_comp_freqs.py does only produce a line with a header when invoked on my Mac with OSX 10.13.4 with Python 2.7.10 and CLOC 1.76:
~
MacBook-Pro-II:Projekte ms1$ python ~/Programmierung/Sprachen/Python/CodeAsCrime/merge_comp_freqs.py scgkpimon_freqs.csv scgkpimon_lines.csv

module,revisions,code
~

Both files contain data according to the book from own projects:
~
MacBook-Pro-II:Projekte ms1$ cat scgkpimon_freqs.csv
entity,n-revs
views/index.erb,7
scgkpimon.rb,6
views/getcolqot_html_body.erb,5
[…]

MacBook-Pro-II:Projekte ms1$ cat scgkpimon_lines.csv
language,filename,blank,comment,code,“github.com/AlDanial/cloc v 1.76 T=1.03 s (8.7 files/s, 238.2 lines/s)”
ERB,scgkpimon/views/getcolact_html_body.erb,0,0,105
Ruby,scgkpimon/scgkpimon.rb,12,14,39
ERB,scgkpimon/views/layout.erb,0,0,17
~

Categories: