Skip to content

Instantly share code, notes, and snippets.

View laurenhavertz's full-sized avatar

laurenhavertz

View GitHub Profile
@laurenhavertz
laurenhavertz / Day 1.md
Last active December 18, 2015 14:49
WDI Action Adventure

ls: list directories pushd: push last file pwd: print working directories irb: interactive Ruby mkdir: make directory #keep it DRY

    literal: what you see is what you get
    ex. integer, boolean value, string, 
@laurenhavertz
laurenhavertz / Day 1.md
Last active December 18, 2015 15:09
WDI Learning & Friendship

Today we learned a lot about BLOGGING and how it is important for us to keep a technical blog!

With that said, we spent a lot of time in the Terminal learning about some of the most frequently used commands.

Here is an easy table to read with the name of function, the shortcut function, and the definition of what it is!

Enjoy :)

Function Shortcut Definition
@laurenhavertz
laurenhavertz / Day 2.md
Last active December 18, 2015 15:49
WDI Action Adventure
  • If you're getting an error message then the installation of the program wasn't successful. If not, close and and reopen Terminal

  • When looking to change the environment an easy trick is to go to system preferances and use finder => this will spotlight where the system preferance is located.

  • Setting a default text editor :

    • Find a written code document
    • right click to get info
    • choose your editor of preference in open with
    • then choose change all

Booleans:

@laurenhavertz
laurenhavertz / Day3.md
Last active December 18, 2015 16:59
WDI Action Adventure
  • Make sure your program is user friendly. FILLED WITH TEXT.

  • Keep it DRY- Always look for repeated code and try to refactor it to a more simple and precise way

  • to wrap text in the command line '/n'

  • $end normally, end of line OR end of file. in an error message if you open an "if" block or loop and don't close it

  • to add a file from a link curl + " " + hyperlink + > instructors.csv (file name)

  • p and print can both take 2 arguments

@laurenhavertz
laurenhavertz / Day4.md
Last active December 18, 2015 18:19
WDI Action Adventure

WARMUP EXERCISE:

a = [] array

b = {} hash

c[:name] hash

d[person] object

@laurenhavertz
laurenhavertz / Day3-JSONlab.md
Created June 20, 2013 17:27
WDI Learning & Friendship

This lab today was one of the first times where I scratched my head and went, "HUH???" I think it was originally when we opend up the JSON file. It was ugly. In fact, Anil told us that it was one of the worst one's he had ever seen. Thanks, friend. Luckily, my group was amazing and we worked through the lab together. The most important take away from this lab?

Keep it DRY. Keep it simple. There is always an easier way to code something. Here is is, Voila! :)

#!/usr/bin/env ruby require 'open-uri' require 'json'

#original gist: https://gist.github.com/bridgpal/e032c851cebf6de1a968
@laurenhavertz
laurenhavertz / Day5.md
Last active December 18, 2015 19:19
WDI Action Adventure

array what we learn variable what we write it down with

  • variable name has to start with a variable NOT number object anything in Ruby (data & behavior) iterate going through each part of a container (array, hash, etc.)
number type class
123 number FixNum
1.5 number Float
@laurenhavertz
laurenhavertz / Day6.md
Last active December 18, 2015 21:59
WDI Action Adventure

Best Practices

  • When we create a class: put it in its own file

  • entry point: the first line exexuted in the code

  • If you don't need to change data in your file: attr_reader only. Can always go back and change to access

*JSON: program agnostic(allows you to use in most languages), data stores in hashes and strings, human-readable,

@laurenhavertz
laurenhavertz / Day7.md
Last active December 18, 2015 23:19
WDI Action Adventure

entity : model or model relationship

Networking

"the cloud" connection of computer that connects point a to point b

ap access point router: a small firewall port: has a small IP address (standardized and not) IP: what dials you into a computer (specific)

@laurenhavertz
laurenhavertz / Day8.md
Last active December 19, 2015 00:29
WDI Action Adventure

HW Review

route a / in the url that is handled by the application

web browser deals totally in binary. receives a binary file and executes. HTML and CSS used only as text files.

public folder is only static files. (images, css)

views all of the hardwiring and program