Skip to content

Instantly share code, notes, and snippets.

View jkarnowski's full-sized avatar

Jaclyn Karnowski jkarnowski

  • Karnowski Tech SpA
  • Villarrica, Chile
View GitHub Profile
# Get input from the user: the cheer
def call_out_cheer
puts "Give me a shout!"
cheer = gets.chomp
end
# Determine the mascot's response based on the argument
# passed to the method
def mascot_sign_for(input)
# store the cheers in a hash because they seem like key-value pairs
module BreatheFire
def breathe_fire
"WOOOOOVM *sizzle* WOOOOOVM *sizzle*"
end
end
module ShootsLasersFromEyes
def shoot_lasers_from_eyes
"Pew pew pew!"
end
# SELF
class Rat
def initialize
@age = 0
end
def self.run_away
p "pitter pitter patter"
end
var createTree = function(){
return new Tree()
}
var Tree = function Tree(){
this.age = 0;
this.height = 0;
this.orangeCount = 0;
this.isAlive = true;
this.oranges = [];
$(document).ready(function() {
bindListeners();
});
var bindListeners = function(){
getHorseFormListener();
postNewHorseFormListener();
}
function getHorseFormListener(){
def convert_to_pig_latin(word)
@word_array = word.downcase.split("")
@vowels = ['a', 'e', 'i', 'o', 'u']
if @vowels.include?(@word_array[0])
word = @word_array.join('')
else
move_letters
add_ay
end
// my module is SweetSelector
// What is public and available from outside the module?? What will be private and not available from outside?
// What's the context of <blah> relative to the Window?
// this is one approach to setting up a module and returning an object with the data that you want
var SweetSelector = (function(){
this.select = function(htmlElement){
console.log(htmlElement)
// so I can call cheerListener() on doc ready
// only takes care of listening for the data
function cheerListener(){
$('#cheer_caller').on('submit', function(event){
event.preventDefault();
var formData = $(this).serialize();
submitForm(formData)
})
}

Repeating has its cons

  • more time means more money (if you're paying rent just to be here) and more opportunity cost, time away from family. there's really no way around this so it's important to keep in mind why you made this investment in the first place. you didn't come here to check boxes, you came here to learn and more time means more learning

  • could be boring if you don't lean into it, since you're seeing the same challenges and we expect you to complete them, consider that there is a ton of material in there for you to uncover. talk to phases above to to ask which challenges they wish they spent more time on. ask mentors and teachers the same. work on the stretch challenges or read more books while you're at it

  • the stigma of repeating can be hard to shake off. we spend years of our life being training to think learning works like a factory assembly line where everyone is the same age, learns at the same rate, and once you've passed a test you're basically inoculated against that subject for l

@jkarnowski
jkarnowski / README
Created July 19, 2016 00:59
Sessions-Users-Example-CRUD
Add helpers here as *.rb files, e.g.,
app/helpers/formatting.rb
helpers do
def em(text)
"<em>#{text}</em>"
end
end