We'll now try to make up for being lazy, just taking pictures and not writing down all the new stuff we learned!
So here we go...
The final two weeks of our Summer of Code are running and we have a compatible curriculum for them. Still 10 Ruby keywords left, 10 terms on our "want to know about this"-list and 8 issues in our carpet diem game! Thanks to Barcelona we're ready to go for this final spurt! Hopefully we'll be so busy, we won't have time to be sad about the nearing end.
So here we go...
- because the term "documentation" is all over the place, we desperately wanted to know what it is. We understood it's basically a description of how the code works and always depends on who wants to know about it. If it's for another developer, the documentation is most likely in the readme.md file, describing how to set up the program, start it, test it and so on. To check if your readme file is still up to date with your code, you might wanna use the gem ataru, which was created by our fellow Rails Girls, the CodePadawans. Sometimes people use source code documentation to describe what their public methods are doing - WHICH IS BAD! - use it only for code that gets used by other programmers (e.g. if you created an API) and NEVER use it to make the code more understandable ... refactoring should do this for you.
- REST(ful) is another concept which seems to be quite trendy. You're doing a good job at being RESTful if you're using the HTTP verbs in your application, that is, the right verbs for the right actions. Don't use POST all the time, that could be very dangerous!
- super is nice. When used in a method, it goes up the hierarchy of ancestors of its class and kind of replaces super with whatever is defined in that superclass method.
- we briefly touched the highly important topic of rails environments. There are three by default (test, development and production) but you can also define your own environments, like e.g. staging. In the Gemfile you'd do something like
group :test do
gem ‘rspec’
end
- Spaceship method! Looks like this: x <=> y
It will return -1 if x is less than y, 0 if they’re equal, an 1 if x is more than y. In order to make use of it you need to include the module Comparable and define the spaceship operator. It's useful when you'd like to order objects in your class. - quickly talked about the gems better error and airbrake. Better error is a gem for rack apps which shows more information about an error, prettily displayed in your web browser. It's used in development. Airbrake on the other hand shows a nice error page to the end user and informs the developer about the incident. It's used in production.
The final two weeks of our Summer of Code are running and we have a compatible curriculum for them. Still 10 Ruby keywords left, 10 terms on our "want to know about this"-list and 8 issues in our carpet diem game! Thanks to Barcelona we're ready to go for this final spurt! Hopefully we'll be so busy, we won't have time to be sad about the nearing end.