Please select random order or first card below to begin studying 🤓
Congratulations! You have finished studying this set of cards
  What to do if you don't know how to solve a problem right now?
  Learn more, get knowledge
  What does John Ousterhout say is the most fundamental problem in CS (he disagrees with Donald Knuth)?
  Problem decomposition
  What kind of memory can flashcards only help you with to an extent because it needs literal practice?
  Procedural memory
  What did John Ousterhout say about what Donald Knuth believes is the most fundamental problem in CS?
  Layers of abstraction
  What idea did many people think was an unfortunate course of Donald Knuth's career but had some good ideas popular today that are used in tools that extract API documentation from code?
  Literate programming
  What tool often used with Ruby allows writing tests that specify the behavior of the application from the outside using statements that begin with Given, When, and Then that are translated into code according to step definitions?
  Cucumber
  What might be the implementation of a step definition that visits the root path of the web application using the Capybara API?
  visit "/"
  What language is essentially English if you start every sentence with one of these words: given, when, then, and?
  Gherkin
  What gem/domain-specific language can be used to automate a web browser with the same API whether the underlying driver is :rack_test or the Selenium WebDriver API?
  Capybara
  What MIT press book is called the "Wizard Book?"
  SICP (Structure and Interpretation of Computer Programs)
  What driver can Capybara use out of the box but cannot execute JavaScript (written as a Ruby symbol)?
  :rack_test
  What define how tests written in Cucumber/Gherkin are translated into Ruby code? 
  Step definitions
  What is the driver supported by Capybara out of the box that cannot execute JavaScript?
  :rack_test
  What gem do you need to install (in addition to capybara) if you want to use Capybara with Selenium?
  selenium-webdriver
  What is the method in Capybara which takes a single string parameter and navigates to that path by making a GET request?
  visit
  What method in the Capybara API documentation can take a snapshot of the page as it currently is and then open it so you can take a look at it?
  save_and_open_page
  If you have required capybara/rails, what will Capybara.save_path default to?
  tmp/capybara
  Does Capybara locate non-visible elements, by default?
  No
  What tag is written over a Cucumber scenario (or feature) to switch to the Capybara.javascript_driver (:selenium by default)?
  @javascript
  What is the Capybara gem (the name of the gem to add to the Gemfile)?
  capybara
  In addition to creativity, the only ability a person needs to program computers is what according to John Ousterhout in APOSD?
  Ability to organize thoughts
  What is the optional argument given to the RSpec it method to switch to the Capybara.javascript_driver (:selenium by default)?
  js: true
  Does the Capybara DSL vary with the specific browser and headless driver being used?
  No
  What is the fast, but limited driver that is the default used by Capybara and does not support JavaScript?
  :rack_test
  What is the line of code to make Capybara use :selenium as the default driver instead of :rack_test?
  Capybara.default_driver = :selenium
  What word is a common synonym for a fault?
  Bug
  Good programming leads to more time spent doing what than what?
  More time spent testing than debugging
  Why is testing early a good idea?
  To catch bugs before they affect people and when they are easy to fix
  According to Code Craft, studies show that there are how many errors per 1000 SLOC in carefully tested software?
  0.5 to 3
  What advocates that test code is written before the code being tested?
  Test-driven development
  According to Code Craft, what is the golden rule of testing?
  Automate
  According to Code Craft, how often should tests be run?
  More often than humanly possible (continuous integration)
  What will happen in macro level testing if micro level testing is not thorough?
  It will be hindered by mistakes
  What is the comment to put at the top of a Ruby source code file to enforce frozen string literals? 
  # frozen_string_literal: true
  What gem installs the Selenium bindings for Ruby?
  selenium-webdriver
  Why are the browser drivers generally not included in the standard Selenium distribution?
  They are provided by the browser vendors
  What refers to both the language bindings and the implementations of the individual browser controlling code in Selenium?
  WebDriver
  What is a specific WebDriver implementation that each web browser is backed with?
  A driver
  What in Docker can be thought of as just an empty vessel for executing software in?
  A container
  What is an object-oriented programming metaphor for containers and images in Docker?
(Images = ?, containers = ?)
  Images = classes, containers = objects
  What is the default user inside of a Docker container?
  root
  What command is essentially the Docker CLI?
  docker
  On what operating systems must the Docker daemon be run inside a lightweight Linux virtual machine?
  Mac and Windows
  What is the guiding star of software design?
  Reducing complexity
  f
  f
  The ABC metric was introduced as a possibly better alternative for what other software metric?
  Source lines of code (SLOC)
  Of cyclomatic complexity and ABC metric, which focuses more on program size?
  ABC metric
  What software metric measures the number of linearly independent paths through a program?
  Cyclomatic complexity
  What is the magnitude of an ABC metric <3,0,4>?
  5
  What do A, B, and C stand for in the ABC metric?
  Assignments, branches, and conditionals
  What is the ABC metric of this line of Ruby code?
(x > 2) ? (y = 3) : (z = 5)
  <2, 0, 2>
  What is the smallest cyclomatic complexity that RuboCop will give a warning for by default?
  7
  What version of the name is System.Console?
  A fully qualified name
  What is the other name for the Law of Demeter?
  The principle of least knowledge
  Of cyclomatic complexity and ABC metric, which focuses more on program complexity?
  Cyclomatic complexity (the answer is given away by the name)
  Why does an else branch not add one to the cyclomatic complexity in the algorithm used by RuboCop?
  It does not add a decision point
  Where was the Law of Demeter introduced?
  Northeastern University
  The Law of Demeter is a specific case of:
  Loose coupling
  What is a common statement explaining how to follow the Law of Demeter?
  Use only one dot
  What does a brain use to solve problems if you ask Wozniak?
  Its concept network
  What Ruby version manager does Anki Books recommend?
  rbenv
  What file in Anki Books tells rbenv the Ruby version?
  .ruby-version
  What database does Anki Books use that is the best open-source relational database management system since Oracle took over MySQL?
  PostgreSQL
  What is it called when you checkout a lone commit instead of a branch, and not in a branch?
  A detached head
  What could be simply defined as a running program?
  A process
  What is the CLI for manual pages in a Bash shell?
  man
  What letter is to exit a man page on Linux?
  q
  What package manager on Ubuntu could you use to install git?
  apt
  What command can you use to generate ssh keys on a Ubuntu machine for example?
  ssh-keygen
  What directory in your home directory is where the ssh-keygen command puts your id_rsa.pub and private key?
  .ssh
  What file in the Anki Books source is infrastructure as code (1 file) that specifies a Docker container that can run Anki Books?
  Dockerfile
  What is the other main Ruby version manager (not rbenv)?
  RVM