Jasmine vs Mocha + Chai...
JSCS vs ESLint...
| require "active_record" | |
| ActiveRecord::Base.establish_connection('postgres:///testing') | |
| ActiveRecord::Migration.verbose = false | |
| ActiveRecord::Migration.class_eval do | |
| create_table :played_quizzes, force: true do |t| | |
| t.integer :player_ids, array: true | |
| t.json :quiz_snapshot | |
| end |
Requirements always change. We need to write code that is able to change in the future. The process of doing so is usually called design. Design principles are often-cited rules that lead to easily-changed code. Design principles have been derived from the initial goal: to have easily-changed code. They are not arbitrary rules. SOLID principles are an often-used set of design principles.
| var EmailCatcher = (function($) { | |
| // Initialiser function | |
| var EmailCactcher = function(element) { | |
| // Cache elements here that you will be accessing later in the class | |
| this.$el = $(element); | |
| this.$form = $('form', element); | |
| this.$span = $('span', element); | |
| // Do all your event binding for the future here too, |
| var EmailCatcher = (function($) { | |
| // Initialiser function | |
| var EmailCactcher = function(element) { | |
| // Cache elements here that you will be accessing later in the class | |
| this.$el = $(element); | |
| this.$form = $('form', element); | |
| this.$span = $('span', element); | |
| // Do all your event binding for the future here too, |
| test |
| foo |