This curriculum contains goals, resources and code exercises for our trainees. If you haven't joined us yet, it offers you a glimpse of what you will learn!
Push all your work to a GitLab repository, at least once per day. You can create unlimited repositories in personal your namespace, e.g.
When an ex...
Ruby is the programming language we use on the backend.
After finishing this lesson you should be able to read and write simple Ruby programs.
Gain an understanding of the following concepts:
return, implicit return in methods and blocks
There is no single place to look up documentation for our stack.
This card includes some hints where you can find API documentation. You probably want to drag a few of those links to your bookmarks toolbar. This will help in the upcoming exercises.
Basic classes like
Object are part of the Ruby standard library:
Git is our version control system.
git checkout -b,
makandra is responsible for maintaining about 75 Ruby projects. These projects use a large number of different versions for Ruby, Rails and many gems. To be able to switch between projects easily, we must control every dependency our applications has.
Rails is our web framework.
SQL is the language used to talk to a database.
By default Rails uses global fixtures for its tests. This is a giant world of example data that grows with every test.
In our experience the use of fixtures can make a test suite hard to work with. In any non-trivial test suite th...
Read the Rails Guide on ActiveRecord Validations. You should have an overview which kinds of validations are built into Rails.
Also read Testing ActiveRecord validations with RSpec.
Make the following changes to your MovieDB:
You should have a strong understanding of the following language features/concepts:
Coming from Ruby ...
Know how to use the native DOM API to do the following:
The Haml-tutorial doesn't show how to execute ruby-code that isn't rendered to HTML. To do this start a line with a dash ('-') instead of the equals-sign ('=').
Read the following chapters from The Pragmatic Programmer (in our library):
Read the following chapters from Clean Code (in our library):
In this card we will learn to write code that scales with a large number of database records. We will do this by pushing work out of Ruby and into the database.
@variable ||= computationpattern.
When your code does not behave as expected, you can use a debugger statement ("breakpoint") at any point in your code. This statement will open a REPL ("console") that you can use to inspect the current state of the program and move the control flow ahead manually.
Use debugging tools to find the exact line in the code where your expectation does not match the actual behavior. Since we use open source for everything, we can always find that line. When you ask a colleague ...
Get an overview of all the matchers that are built into RSpec.
Play with some of these matchers in your MovieDB tests.
Which of the following two lines is better? Why?
expect(array).to include(5) expect(array.include?(5)).to eq(true)
Write a custom matcher ca...
As developers we are dealing with many tasks every week. We need a system to organize ourselves.
After completing this card you should have:
todo.txton your desktop or any other tool is fine, too.
Learn about our process:
The squares represent the state of the story in Pivotal Tracker.
In particular you should understand:
sudo apt install tldr. You can then get usage examples for every console command, e.g.
tldr sshto get examples for the
Experiment and do something useful with the following commands. You might need to use
tldr or Goog...
will_paginategem to add pagination to MovieDB's list of movies. How long does the movies index render now?
will_paginate. Customize the style so it matches the look of your MovieDB.