bloat, c++, oz [day 23]
The day started late, I got in to RC around lunchtime. Today I worked mostly on the 7L7W book, where I started with Java. The book is, we have suspected this since Chapter 2, not really good. It constantly makes a comparison to Ruby and Java, without really showing the concepts in Scala. And then there are pages filled with uninteresting examples, for example this code:
scala> 5 < 6
res27: Boolean = true
scala> 5 <= 6
res28: Boolean = true
scala> 5 <= 2
res29: Boolean = false
scala> 5 >= 2
res30: Boolean = true
scala> 5 != 2
res31: Boolean = true
This is so boring. A conceptual table or a short list would be enough to show which boolean comparison operators do exist. And this example fills a quarter of a page. I sometimes feel the author is trying to come up with ideas to make to text longer, which reminds me of my scientific writing, which makes me sad.
Anyway, the good side of the book is that it holds me accountable to pick up some Scala this week. And the exercise “Write a Tic Tac Toe” was kind of nice. I think I would’ve never written a Tic Tac Toe out of my own curiosity, but as it is an exercise, why not? The interesting part here is the “design” part – I wanted to do this in an Object Oriented style, as the first day was showing exactly this side of Scala. And it was not too easy, I had to search the internet a lot to find out how to do certain things in Scala. Also I’m not yet finished, I still have to write the game logic, which should check who won the game. Here’s my code so far, more to come.
In between I paired with someone on a C++ bug. I was offering my help, because I often like to search for bugs, it’s something that I can spend hours with. We unfortunately did not find the bug yet, because we didn’t want to spend hours for now :-P. Also we rather introduced a new bug in our print debugging coded which left us even more confused at some point in between, haha.
I think writing C++ is very difficult, I cannot really do it. This pairing experience let me think about code quality a bit, and how to deal with the balance between unclean code and perfectionsism. I struggle with that a lot, I am spending a ridiculous amount of time to find out how to make code look nicer, and I’m not even sure if I’m good at that. At RC there was an initiative of establishing more critical feedback and code review, I’m keeping my eyes open for opportunities there.
In the evening the reading group for CTM took place. We mostly discussed about the difference list concept, because most of us were just finished with that section. We are often discussing about the book on a meta level, like “why did the authors do this and that?”. For example why do they explain BFS/DFS, but assume knowledge in the area of formal foundations of Computer Science, say the Chomsky Hierarchy? Anyway, as I had hoped, we are not really going faster, so my reading speed is okay. Still I will try to do more with Oz rather than only going through their thoughts.