- We had a further look at scopes.
- When doing that, CONSTANTS came up.
- Also $global variables. These can solve problems because they are valid throughout a whole program BUT they are dangerous: They can be overwritten from anywhere. Isolating bugs can become more difficult as well.
- Success! Yeah, we managed to write a test which gives a 100% mutation coverage for our puppy program:
0 Comments
Sorry about missing out on Friday's blogpost. But there is a good excuse for this ... it was the day of SoundCloud's big Summer Party! We remember burgers, ice cream cookies, loud music, lots of happy people, dancing, booze ... But today we're back to serious business, as you can see.
We totally forgot to tell you yesterday: we got tickets for eurucamp!!! By courtesy of ThoughtWorks! We are tremendously happy! Also we put our wishes into the RGSoC raffle - let's see if we can attend Baruco (Barcelona), Polyconf (Poznan) or Arrrcamp (Ghent). Keep fingers crossed! Made the Fibonacci problem work but it' still weird code. So Erik introduced a fancy thing called recursion! Recursion is a function that calls itself that calls itself that calls itself .... until you make it stop through a conditional statement. Today, Erik's preferred way of explaining was hopping - might sound weird but it actually made us understand how multiple assignment in a loop looks like. Our homework now is to make the code work with just one line of recursion code. Also Brian Egan, web engineer at SoundCloud, gave a workshop on UX - just for us four Rails Girls! He guided us through the working process when designing a website and we actually did some hands-on work on an example. This workshop came just at the right time and will be super helpful in the future. Thanks again, Brian! We thought about which of the 36 Ruby keywords we already know and it seems like it's more than one third! The difference between puts and returns needed some clarification though.
We then tried to solve the second Euler problem: creating a Fibonacci sequence and building the sum of it's even numbers. But because we did not get very far with it, it's now our homework! Oh, and we taught Erik the names of the colors in German ... using balloons. Klaus and Erik introduced us to some of the most important concepts in computer science.
After today, when it comes to iterators, we are now gobsmackingly confident with the usage of:
These methods take collections and return different thingies (see Klaus's drawing). It's fantastic because you can compress your code a lot - just like us. Removing 11 lines and it still works... pretty nice refactoring, huh? :) Quote of the day: Klaus: “What does the method .select do ?" Brigitte: “Circles, circles… and then less circles at the end." This day was all about testing! Steffi was in da house to tell us more about TDD (test driven development).
We realized that TDD is pretty awesome because it ...
Additionally, Steffi explained to us what rake actually is / does. So now we know it's executing tasks you define for it, making it faster and easier to run through certain steps outside the actual application.
Vocabulary for Erik:
Quotes of the day: "Software development is all about trade-offs!" (Erik) "Igitt, Git!" (Kathi) Animals united: Woof - Wau wau Meow - Miau Oink - Grunz Quack - Quack Cock-a-doodle-doo - Kikeriki (Really? a-doodle-doo? Even in the UK?)
*Kathi doesn't like the crocodile... |