You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was working through the material myself to prepare for teaching it, and I found a lot of little mistakes.
I got until chapter 9, here's everything I found.
2.4.0.4
The question is full of exception output which confuses the question
The solution starts with scala mdoc 1 + 2 which doesn't belong there
I am a bit surprised by String.indexOf being introduced here without any explanation of what indexOf does. It will be used as an example later in the book so it might help to clarify this.
3.1
The example code Image.circle(10) is shown twice.
3.2
The example code (Image.circle(10).beside(rectangle(10, 20))).draw() does not compile. It should be (Image.circle(10).beside(Image.rectangle(10, 20))).draw()
It says Doodle contains several layout methods for combining images, described in tbl. ¿tbl:pictures:layout?. That table reference is broken and so is the table shown under it doesn't render correctly. (This looks slightly different in the pdf view vs the html view but there's a problem in both)
All examples in the (broken) table fail to compile, because of the same reason noted above: below(circle(20)) won't work, it should be below(Image.circle(20)), unless you import Image._ first but it doesn't say anywhere to do so.
3.3
Another broken table, this time ¿tbl:pictures:color?
3.4
The title of the section is part of the example code.
3.5
Around this time I started running into an annoyance with trying out the example code in the console: when you paste multiline code into the REPL console (not with :paste but with the OS paste function) in some cases it seems to attempt to evaluate each line as its own expression. I am not entirely sure what causes this or what to do about this though.
3.5.3
I don't know if something changed in Doodle but I keep getting different pictures if I run the examples than shown in Creative Scala. The difference appears to be that the example code uses Image.circle() as if the param is the radius, while actually it is the diameter. Note that I did clone the template from github listed in the installation instructions. See attached images.
This happens throughout the entire book.
3.6.1
Figure 15 does not show "Archery target with a stand" as both the description and the following exercises implies. It shows a coloured in target instead. So the picture is wrong.
4.1
The example with :paste is a bit strange for using Example.scala since if you put pastable code in Example.scala then on (accidental) reload of sbt you'll get a compiler error on starting the console (as explained in 4.2). Using a file that won't get compiled (e.g. something with a filename without the .scala extension) would be much clearer here.
4.2
At some point it might be good to mention an sbt reload is needed every time Example.scala is changed if you want to use it from the console.
5
The chapter intro has the wrong styling, making it so words are cut off at weird places.
5.2
It feels like the "Madness to our methods" exercise doesn't really explain what it expects the student to do, the solution link kinda comes out of nowhere.
6.2
The exercise 'halve' has a visible scala mdoc in the solution.
7.1
The exercise 'stacked boxes' does not show stacked boxes in the image (fig 22). Instead it shows a line of boxes. Also, while the solution says to change beside to above, the code example still says beside.
7.6
We could also make the fill color a function n should probably be a function OF n.
The concentric circles exercisse makes the problem I wrote about in 3.5.3 really obvious. To fix this case, not only the circle size should be doubled but also the amount by which the circle gets increased each recursive call.
8.2
Literally says "insert picture here" but you probably already knew that. :)
Another broken table view.
8.6
The exercise "Function literals" has another scala mdoc in the solution.
8.8.3
The link to Flowers.scala is broken.
9.1.1
Broken figure link in the text: ¿fig:pictures:open-closed-paths?.
Broken table link ¿tbl:sequences:path-element?. and also broken table.
9.3.2
Annoyingly, the Scala REPL doesn't show the contents of a range (anymore), 1 until 3 is not shown as (1, 2) but as Range 1 until 3. You have to convert it to see it as a list.
9.3.3
"If we try to create a Range over Double we get an error." No, not really. Not in the Scala version in your template project at least.
scala> 0.0 to 10.0 by 1.0
warning: there was one deprecation warning (since 2.12.6); for details, enable `:setting -deprecation' or `:replay -deprecation'
res2: scala.collection.immutable.NumericRange[Double] = NumericRange 0.0 to 10.0
Also, you introduce the 'to' method here without explaining it, it was 'until' until now. 'to' is finally introduced later on in 9.3.4.
9.4
The solution at the bottom has a broken image reference.
The text was updated successfully, but these errors were encountered:
I worked through the rest of the book and found some more sturr:
10.2.1
¿tbl:turtles:instructions? A broken table
10.3
Something weird here. The chapter title says it's about noop, but there doesn't seem to be an actual chapter about this.
10.4
In the exercise "Rewriting the rules", in the solution, I'd suggest calling the instruction within the branch (in the pattern match) something other than i, because that i shadowing the value name of the flatMap's instruction might be a bit confusing to read.
At the bottom of the section there's an incorrect image reference: ¿fig:turtles-koch-curve?
The book does not have a solution for the Fig 53 and 54 puzzle.
11
In the HTML version, the blue box that shows the import statements does not end, meaning the rest of the book is in the blue box.
11.2
Broken table ¿tbl:generative:random?
11.2.1
Not sure if this was intended or not but the exercises section doesn't put solutions behind solution links.
The Random Colors exercise says the method should have Normalized params in the signature, but then the solution uses Doubles.
11.3.1
Two lines that say 'Inage' instead of 'Image'.
11.6.2
Broken image reference in the bottom solution [#fig:generative:volcano]
12.1.1
You probably already knew this but there's still a todo here, saying to describe the sealed keyword etc.
It's clear this chapter is not complete yet. It suddenly introduces all sorts of new concepts such as case classes.
There are also several instance of a visible scala mdoc tag here.
Hi,
I was working through the material myself to prepare for teaching it, and I found a lot of little mistakes.
I got until chapter 9, here's everything I found.
2.4.0.4
scala mdoc 1 + 2
which doesn't belong there3.1
Image.circle(10)
is shown twice.3.2
(Image.circle(10).beside(rectangle(10, 20))).draw()
does not compile. It should be(Image.circle(10).beside(Image.rectangle(10, 20))).draw()
Doodle contains several layout methods for combining images, described in tbl. ¿tbl:pictures:layout?.
That table reference is broken and so is the table shown under it doesn't render correctly. (This looks slightly different in the pdf view vs the html view but there's a problem in both)below(circle(20))
won't work, it should bebelow(Image.circle(20))
, unless you import Image._ first but it doesn't say anywhere to do so.3.3
3.4
3.5
3.5.3
This happens throughout the entire book.
3.6.1
4.1
4.2
5
5.2
6.2
scala mdoc
in the solution.7.1
beside
toabove
, the code example still saysbeside
.7.6
We could also make the fill color a function n
should probably bea function OF n
.8.2
8.6
scala mdoc
in the solution.8.8.3
9.1.1
9.3.2
(1, 2)
but asRange 1 until 3
. You have to convert it to see it as a list.9.3.3
9.4
The text was updated successfully, but these errors were encountered: