- refactored carpet-diem some more
- started writing tests
- added a textfield which will show the score
- mulled our heads over pixel perfect collision detection
As the code got too long, we split it up into different .rb files, one for each class. When doing so we touched the topics of passing functionality to a class either through delegation or inheritance. For delegation there are three options:
def_delegators :@lamp, :height, :width
Steffi who did the coaching (thanks so much!) , also informed us that there are many wise sayings out there, as for example "Composition over inheritance". Can't wait to make a calendar ;)
Erik is one of Perun's part time uncle. So we got to play with him again <3 Have a great weekend everyone!
Some more carpet action today!
Modules are a bit like classes but can't have subclasses and can't create instances of themselves.
However you can include a module in one ore even several classes if you want to use the module's methods on the classes' instances.
If you use extend instead of include it adds the module's method to the class itself.
Don't own a flying carpet, only a regular one? Hate vacuum cleaning it? Freddie knows exactly how you feel...
The day started with learning about Rails helpers. Helpers are there to help keeping the views clean. You don’t want a lot of Ruby code in there but sometimes you wanna do rather complicated stuff there. So that's why you link to helpers. Helpers are modules, automatically connected to their controllers. The helper passes stuff to the view, after getting data from the controller (which talks to the model which talks to the DB). Things you want to use across lots of different views should go into the applications_helper.rb.
The rest of the day we spent hating Java.
Honestly... it's ridiculously hard to downgrade to an older version of Java, which we wished to do in order to work on another project. We spent the whole day researching and still have no clue how to do it. So any hints are welcome!
Today we could check off some more things from our checklist we'd wanted to learn about:
Another thing we accomplished today was writing a blog post for the official RGSoC blog. It's a small summary of our Summer of Code so far. We're sure you'll like it :)
This video can be appreciated by those who are familiar with German as well as GitHub. Klaus found it, Loriot made it, thx!
Seems like we learned lots of different stuff today!
With learning the latter three keywords, we're yet again closer to our aim of knowing all the Ruby keywords at the end of our Summer of Code.
Bits of Berlin's podcast with our interview is online! Check it out!