Errata

Real-World Software Development

Errata for Real-World Software Development

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
IDK
Chapter 2

There should be a better way to pass this errata information:

In the below sentence; BankTransactionParser should be changed to BankStatementParser I believe. For your consideration.

"So far so good, but how do you decouple the BankStatementAnalyzer from the specific implementation of a BankStatementCSVParser? You need to use the interface! By introducing a new method called analyze(), which takes BankTransactionParser as an argument, you are no longer coupled to a specific implementation (see Example 2-12).
Example 2-12. Decoupling the Bank Statements Analyzer from the parser
..
public void analyze(final String fileName, final BankStatementParser bankStatementParser)
..
"

Murat Gungor  Dec 18, 2019 
ePub Page ?
Example 2-5

BankTransactions in example 2-5 should be bankTransactions: "System.out.println ( "Transactions in January " + selectInMonth (BankTransactions, Month.JANUARY ));"

Anonymous  Jan 19, 2020 

Example 2-5. Using the bank statement CSV parser.

System.out.println("Transactions in January " + selectInMonth(BankTransactions, Month.JANUARY));

BankTransactions should begin with a small B instead of capital !

Anonymous  Jan 28, 2020 

Example 2-8. Processing lists of bank transactions using the BankStatementProcessor class.

final List<BankTransaction> bankTransactions = bankStatementParser.parseLinesFrom(lines);

parseLinesFrom(lines) should be changed to parseLinesFromCSV(lines).

PS - How are such basic mistakes present in the code ?

Anonymous  Jan 28, 2020 

Chapter 3 -

Anonymous  Jan 28, 2020 

Chapter 3.

Functional -
The approach you took ... The methods parseFrom() and parseLinesFrom() are solving a defined task....blah.

Fix - parseFrom() and parseLinesFrom() should be replaced with parseFromCSV() and parseLinesFromCSV(). The latter are the function names used in the code.

Anonymous  Jan 28, 2020 

Example 3-6. Declaring a class that implements the BankTransactionFilter.

return bankTransaction.getDate().getMonth() == Month.FEBRUARY && bankTransaction.getAmount() >= 1_000);

This code won't compile. The fix is :

return (bankTransaction.getDate().getMonth() == Month.FEBRUARY) && bankTransaction.getAmount() >= 1_000;

Anonymous  Jan 29, 2020 

Chapter 3.

The refactoring you went through raises questions about what should happen to the other methods declared inside the BankTransactionProcessor class.

Fix - It should be BankStatementProcessor instead of BankTransactionProcessor.

Anonymous  Jan 29, 2020 

Example 3-17. Throwing a syntax exception.

final String[] columns = line.split(",");
if (columns.length < EXPECTED_ATTRIBUTES_LENGTH) {
throw new CSVSyntaxException();
}

What is EXPECTED_ATTRIBUTES_LENGTH ? It is not there in previous sections, nor in the final code in github. So, its hard to build the code step by step and eventually match what you have in github.

Anonymous  Jan 29, 2020 
Example 5-5
Example 5-5. Mocking and verifying interaction with an Action object

To match with the github code and "Example 5-2. The Action interface" code

verify(mockAction).perform();
should changed to
verify(mockAction).execute();

john  Jul 03, 2020 
2
Example 2-9

public BankTransaction update(final long id) {
// ...
throw new UnsupportedOperationException();
}

public void delete(final BankTransaction BankTransaction) {
// ...
throw new UnsupportedOperationException();
}

As for me signatures are mixed:

update should have object as parameter
and
delete should do work by id

Ivan Drozda  Apr 03, 2020 
PDF Page 13
Example 2-5

The line is "final BankStatementCSVParser bankStatementParser = new BankTransactionCSVParser();" but so far I haven't made the class "BankTransactionCSVParser". When I copy paste the code it doesn't compile until I change the line to:

"final BankStatementCSVParser bankStatementParser = new BankStatementCSVParser();"

Anonymous  Apr 12, 2020 
PDF Page 13
Example 2-5

The line is "System.out.println("Transactions in January " + selectInMonth(BankTransactions, Month.JANUARY));". When I copy paste the code, it doesn't work (even if I include the code from the subsequent examples which is needed to get all the code. This is because "BankTransactions" should be "bankTransactions". When I fix it by changing to camel case to match the variable declared, it compiles.

Anonymous  Apr 12, 2020 
PDF Page 16
Example 2-8

The line "final List<BankTransaction> bankTransactions = bankStatementParser.parseLi
nesFrom(lines);" has a compile error. The method name being called is wrong, according to the class we created in the pages before. The method is actually called "parseLinesFromCVS".

It compiles when I change the line to:

"final List<BankTransaction> bankTransactions = bankStatementParser.parseLi
nesFromCVS(lines);"

Anonymous  Apr 12, 2020 
Printed Page 82
penultimate paragraph

"[...] we might not want to rely on the order of documents beeing beeing returned ..." The word "beeing" is written twice.

Björn Hansen  Aug 22, 2021 
Printed Page 87
First paragraph below the headlne "Constants"

[...] conventionally developers create static field fields ...

I believe that it should just be called "static fields" here.

Björn Hansen  Aug 22, 2021 
Printed Page 91
Example 5-2.

There is a method execute(), which is called perform() on all the following pages. There should be consistent naming.

Björn Hansen  Aug 22, 2021 
Printed Page 107
last paragraph

We can define a interface Rule ...
It should be "an interface".

Björn Hansen  Aug 22, 2021 
Printed Page 127
last paragraph

In this case our UI will be sending us a event ...
It should be "an event".

Björn Hansen  Aug 22, 2021 
Printed Page 130
second last paragraph

But the question is how do write a test ...

It should be "how to write a test" with a "t".

Björn Hansen  Aug 22, 2021 
Printed Page 135
last paragraph

The next the requirement that we need ...
The second "the" is to be removed.

Björn Hansen  Aug 22, 2021 
Printed Page 150
second paragraph after code example

... want to remove money from one back account and add it ...
It shoudl be "bank account", not "back account".

Björn Hansen  Aug 22, 2021 
Printed Page 152
first paragraph

Let's start by taking a interface used to represent ...
It should be "an interface".

Björn Hansen  Aug 22, 2021 
Printed Page 172
second paragraph

They trick is to not worry ...
It should be "The trick is ..."

Björn Hansen  Aug 22, 2021 
Printed Page 172
second paragraph after headline "Deliberate Practice"

... practice and work are the real the key to success.
The second "the" is to be removed.

Björn Hansen  Aug 22, 2021 
ePub Page 418
Example 2-5

Multiple (4) instances of = BankTransactionCSVParser should be replaced with BankStatementCSVParser

Anonymous  Jan 19, 2020