There are only two types of theories [programms]:
- Theories that are known to be wrong, as they were tested and adequately rejected.
- Theories that have not yet been known to be wrong, not falsified yet, but are exposed to be wrong.
– K. Popper
Why is the theory [program] never right?
- Konfiguracja środowiska do pracy z projektami w Ruby:
- Instalacja Ruby – Ruby enVironment (Version) Manager
- Bundler – provides a consistent environment
for Ruby projects by tracking and installing the exact gems and
versions that are needed.
- instalacja gemów – Miejsce na dysku Sigma + Laboratoria
- Podstawowe gemy: rspec, rubocop.
- Instalacja edytora Atom i rozszerzeń (pakietów):
- linter i linter-rubocop; konfiguracja, enabled style cops
- script, ruby-test-switcher
- rspec i language-rspec
- Przykłady pokazujące jak to działa: factorial.rb, fox.rb, hello_world, hello_bundler.
- Wprowadzenie do języka Ruby:
- Try Ruby
- Learn X in Y minutes, where X = Ruby
- Learn X in Ruby, where X = Hash, Array, Enumerable
- How to Solve Coding Anti-Patterns for Ruby Rookies
- Szablon projektu Ruby + RSpec.
- Ogólnie o testowaniu:
- Learn X in Y minutes, where X = Rspec, Capybara, Factory Girl.
- Wprowadzenie do RSpec.
- Testy jednostkowe:
- Ruby – przykłady w TestUnit
- Mostly Static Pages – testowanie kontrolerów i widoków:
- Refaktoryzacja kodu.
- Pokrycie kodu testami:
- Doubles, mocks i stubs.
- Praca z Legacy Code (zastanym kodem, kodem niepokrytym testami).
- David Chelimsky, Dave Astels, Zach Dennis, Aslak Hellesøy, Bryan Helmkamp, Dan North. The RSpec Book: Behaviour-Driven Development with RSpec, Cucumber, and Friends.
- Robert C. Martin. Czysty kod.
- Dokumentacja RSpec:
- Better Specs – how to describe your methods, use context
- Octokit – many examples of excellent descriptions
- The RSpec Style Guide
Ruby:
- Ruby Koans – Learn Ruby with the Neo Ruby Koans.
- Jay Fields, Shane Harvie, Martin Fowler with Kent Beck. Refactoring – Ruby edition.
- Ruby Style Guide – a community-driven Ruby coding style guide
- Get the Lowdown on Ruby Modules
Git:
- Scott Chacon, Ben Straub. Pro Git
- Git Tips – most commonly used git tips and tricks
- github-cheat-sheet
Atom (command palette -> cmd+shift+p):
Polskie literki (ą, Ś) oraz nowe i nadpisanie keybinding w systemie Darwin. Dopisujemy w pliku ~/.atom/keymap.cson:
'.platform-darwin atom-text-editor':
'alt-a': 'native!'
'alt-shift-s': 'unset!'
'ctrl-shift-i': 'auto-indent:apply'
'cmd-shift-m': 'markdown-preview:toggle'
Większe literki w oknie script i linter oraz w UI. Dopisujemy w pliku ~/.atom/styles.less:
@ui-font-size: 16px;
.script-view {
.panel-body pre {
background: @tool-panel-background-color;
color: @text-color;
font-size: 1.6rem;
}
.output {
font-size: 1.6rem;
}
.stderr {
color: @text-color-error;
font-size: 1.6rem;
}
}
linter-message {
font-size: @ui-font-size;
}
.rspec-console.rspec {
background-color: white;
color: black;
overflow: scroll;
}
.rspec-console.rspec {
pre,
pre div atom-text-editor,
code,
tt {
font-size: @ui-font-size;
font-family: PT Mono, monospace;
}
.rspec-output {
background: #fff;
color: #000;
}
}
Continuous Integration and Deployment:
Fajne:
- Codility – we test coders