Skip to content

Instantly share code, notes, and snippets.

View seth-at-at's full-sized avatar

Seth Moser seth-at-at

  • turing.io
  • Denver, CO
View GitHub Profile
@seth-at-at
seth-at-at / Empathetic programming
Created November 30, 2016 21:22
Empathy in programming
What role does empathy play in your life and how has it helped you?
How does empathy help you build better software?
Why is empathy important for working on a team?
Describe a situation in which your ability to empathize with a colleague or teammate was helpful.
When do you find it most difficult to be empathetic in professional settings? How can you improve your skills when faced with these scenarios?
Empathy has helped me connect with other people and make friends. It can help you make better software because you'll be trying to write it so others will be able to understand it. Empathy is important for working on a team because if you and your peers are unable to understand eachothers thinking it will be impossible to understand eachothers code and why they wrote it the way they did. I've used empathy in school when trying to describe homework in a way that my classmates would understand so there was no confusion. It's most difficult to be empathetic in a professional setting whe nyou and your coworkers vi
require 'pry'
puts "Please enter a 16 digit credit card number for validation."
this = gets.chomp
card_number = this.reverse
#
unless card_number.length. == 16
puts "Requires 16 digits"
load 'credit_check.rb'
end
I find it weird how the article goes on to say that the internet is what really helped Trump win the presidency when there was a lot more if not just as much shitty media coverage on both Trump AND Hillary. They both had fans on the internet spewing "meme"s and false information on the counterparts. As for myself I saw way more negative media surrounding Trump than I did Hillary to the point where I didn't think he even had a chance of winning. I don't think action needs to be made because all of these opinnions on BOTH candidates are shared by the users not the people in charge of the actual platform.
@seth-at-at
seth-at-at / Credit_Check.rb
Created December 2, 2016 05:46
Check if a credit card number is valid or not.
require 'pry'
puts "Please enter a 16 digit credit card number for validation."
this = gets.chomp
card_number = this.reverse
#
unless card_number.length. == 16
puts "Requires 16 digits"
load 'credit_check.rb'
end
#Floats and Integers
What’s the difference between a float and integer?
* Floats are exact values while Integers are rounded to the nearest whole number
What’s are the similarities and differences between BigNum and FixNum?
* Fixnum is () Bignum is ()
What will 4.0 / 2 return?
* 2.0
#Floats and Integers
What’s the difference between a float and integer?
* Floats are exact values while Integers are rounded to the nearest whole number
What’s are the similarities and differences between BigNum and FixNum?
* Fixnum is () Bignum is ()
What will 4.0 / 2 return?
* 2.0
class PizzaOven
def cook_pizza
"mmm 'za"
end
end
class Student
attr_reader :name
def initialize(name = "name")
1. Give one difference between Modules and Classes.
Modules are static, classes you can manipulate.
2. Defining Modules
module Doughy
def self.has_carbs?
true
end
end
class Pizza

HTML/CSS Basics

Warmup

  • The purpose of HTML (hypertext markup language) is standard for describing the structure and presentation of information
  • The purpose of CSS is to be a stylesheet to create how the language will look on the web page
  • div/span/a/input
  • The purpose of a class in CSS and an ID is to be able to select multiple things without having to retype over and over.
  • You can grab all by using ( * { } )

HTML

Sessions, Cookies, and Flashes

  1. If we didn't have cookies and sessions, what would happen?
  • We would not have a convenient way to store data from users
  1. What is a cookie?
  • Cookies are small files which are stored on a user's computer very similar to a hash
  • They are designed to hold data specific to a particular client and website.
  1. What's the difference between a cookie and a session?