Skip to content

Instantly share code, notes, and snippets.

View jkarnowski's full-sized avatar

Jaclyn Karnowski jkarnowski

  • Jaclyn Rocks!
  • Miami, Florida
View GitHub Profile
# U2.W6: Create a Bingo Scorer (SOLO CHALLENGE)
# I spent 3 hours on this challenge.
# Pseudocode
#initialize the class with a Bingo Board
#method to check for winner, print "BINGO" if the board meets the conditions of one type of winning board
#horizontal board method
#
#if one subarray of the board has 'x' in each slot, BINGO
@jkarnowski
jkarnowski / The Technical Interview Cheat Sheet.md
Last active September 13, 2015 21:47 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
// Place all the behaviors and hooks related to the matching controller here.
// All this logic will automatically be available in application.js.
$(document).ready(function(){
var handler = StripeCheckout.configure({
key: 'pk_test_UlUbDYdUkO0qkJ2r1Iw3DYtZ',
locale: 'auto',
token: function(token) {
// Use the token to create the charge with a server-side script.
// You can access the token ID with `token.id`
require 'rails_helper'
RSpec.describe ClearanceBatchesController, type: :controller do
subject(:clearancing_service) { ClearancingService.new }
def expect_response_to_render_index
expect(response).to render_template :index
end
helpers do
def login(user)
session[:id] = user.id
end
def logged_in?
session[:id] != nil
end
# SESSIONS
# where did you enable sessions?
# WHAT REQUEST ALLOWS A USER TO LOGIN?
get '/sessions/new' do
erb :'users/login'
end
# WHAT REQUEST SENDS THE USER DATA TO SET THE SESSION?
# WHAT REQUEST ALLOWS FOR USER REGISTRATION?
get '/users/new' do
erb :'users/new'
end
# WHAT REQUEST SENDS THE USER DATA TO THE DATABASE?
# this is one approach to accepting params. Can accept params a few different ways.
post '/users' do
user = User.new(params)
require_relative 'grocery_list'
describe GroceryList do
# creates an object to use | consider: what's the scope of sunday_groceries?
let(:sunday_groceries) { GroceryList.new }
it 'creates a grocery list object' do
expect(sunday_groceries).to be_instance_of GroceryList
end

#Questions for Standup

##Technical

  • How did it go with new technology X today?
  • High points/low points?
  • Line of code you are proud of today?
  • If you had to describe X technology to a non-techie friend, how would you describe it?
  • How did pairing facilitate your learning today?
  • Favorite new shortcut?
  • Toughest technical moment from today?
// a start to refactoring code from phase-2 assessment
function Student(firstName, scores) {
this.firstName = firstName;
this.scores = scores;
}
Student.prototype.averageScore = function(scores) {
var sum = 0
for(var i = 0; i < this.scores.length; i++) {