- TDD Test Driven Development. Write examples before implementation.
- BDD Behaviour-Driven Development is about implementing an application by describing its behavior from the perspective of its stakeholders. (The Rspec Book)
- RSpec (mention alternatives, write a simple hand sewn test)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
ENV["RAILS_ENV"] ||= "development" | |
require File.expand_path(File.dirname(__FILE__) + "/../config/environment") | |
require 's3_file_methods' | |
require "fileutils" | |
def run(command) | |
result = system(command) | |
raise("error, process exited with status #{$?.exitstatus}") unless result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ "keys": ["shift+tab"], "command": "auto_complete" }, | |
{ "keys": ["super+alt+]"], "command": "align_assignments" }, | |
{ "keys": ["ctrl+shift+j]"], "command": "join_lines" }, | |
{ "keys": ["super+alt+w"], "command": "toggle_setting", "args": {"setting": "word_wrap"} }, | |
{ "keys": ["ctrl+super+r"], "command": "reveal_in_side_bar" }, | |
{ "keys": ["ctrl+shift+v"], "command": "paste_and_indent" }, | |
{ "keys": ["super+shift+t"], "command": "goto_recent" }, | |
{ "keys": ["super+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} }, | |
{ "keys": ["super+ctrl+w"], "command": "close_all" }, |
A typical module looks like this:
module M
def self.included(base)
base.extend ClassMethods
scope :disabled, where(:disabled => true)
end
module ClassMethods
...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all programs / programming languages / software 3 kinds of artifacts and 1 quality | |
- data | |
x = 123 | |
y = "hello" | |
z = true | |
my_name = gets.chomp | |
- decisions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mockAjax = function() { | |
beforeEach(function() { | |
jasmine.Ajax.install(); | |
}) | |
afterEach(function() { | |
jasmine.Ajax.uninstall(); | |
}) | |
} | |
var lastRequest = function() { | |
return jasmine.Ajax.requests.mostRecent(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desc "Renaming Rails App" | |
task :rename, [:message] => :environment do |t, args| | |
file_names = %w{config/application.rb | |
config/environment.rb | |
config.ru | |
Rakefile | |
config/routes.rb | |
config/environments/development.rb | |
config/environments/production.rb | |
config/environments/test.rb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- report: sales_by_traffic_referrer | |
questions: | |
- Which referrer source created the most sales in 2024? | |
- What was the Sales generated by referrer source email in 2023? | |
- report: average_order_value | |
questions: | |
- Which month and day had the highest order value? | |
- Which month and day had the lowest order value? | |
- How did the average order value change over 2023? | |
- What is the growth of average order value between 2023 and 2024? |