Skip to content

Instantly share code, notes, and snippets.

View stevepentler's full-sized avatar

Steve Pentler stevepentler

View GitHub Profile
@stevepentler
stevepentler / readmelove.md
Last active April 21, 2016 15:19 — forked from rrgayhart/readmelove.md
README Love

##PROTIP: README Love

READMEs are AWESOME. They are one of the best things you can add to a repo, (other than quality code), to make it look professional.

####Things that make a README great:

Web Sockets Lesson Plan

  • Fork this gist
  • Include a link to your application's repo
  • https://github.com/stevepentler/Websockets_Workshop
  • Your repo should have a link to your production app in the README
  • Include questions/comments for anything you'd like us to specifically give you feedback on
  • I completed all the "Your Turn" but I don't thing it's emitting properly. Lets imagine there are 5 users. If user 5 opens a web socket, the poll will be live with the responses from users 1-4. However, the updated poll is not send back to user one when websocket 5 submits the poll. I was fiddling with io.sockets.emit.. but couldn't get it firing.
  • The websockets homework is graded on 'completion' or 'semi-completion' - but we'll try to leave you feedback on anything we see that requires feedback in the gist.
@stevepentler
stevepentler / express.markdown
Last active April 18, 2016 14:42 — forked from rrgayhart/express.markdown
Building Express Applications
@stevepentler
stevepentler / testable-js.markdown
Last active April 6, 2016 04:57 — forked from rrgayhart/testable-js.markdown
Writing Testable JavaScript

Step One: Watch Writing Testable JavaScript - Rebecca Murphey from Full Frontal 2012 (award for worst conference name ever?)

Step Two: Fork this gist.

Step Three: Consider the four responsibilities that Rebecca lists for client side code (hint: they're color coded).

  • Did any of the responsibilities that she lists surprise you?
    • Presentation & interaction
    • Data/server communication
  • application state

Step One: Watch Mary Rose Cook Live Codes Space Invaders from Front-Trends. (The second worst conference name ever?)

Step Two: Fork this gist.

Step Three: Respond to this question in your fork: What is one approach you can take from this Mary's code and implement in your project?

  • I watched the video a few days ago, but it was crucial to undestanding collision detection.

Step Four: Totally Optional: take a look at some of the other forks and comment if the spirit moves you.

JavaScript Functions

I can explain the difference between function declarations and function expressions.

  • Declarations are hoisted to top priority, whereas function expressions are declared but not defined until that line is run.

I can explain what the value of this is in a normal function.

  • global object

What does it mean to concatenate files? Find an image of an example concatenated file. Why would we want to concatenate files?

  • To put them together so theyre treated as one. We might want to concatenate to send fewer files for the same amount of data.

What does it mean to precompile files? What does this have to do with coffeescript and sass files?

  • To grab database info all at once for faster successive calls. Coffeescript and Sass files are precompiled so that all of their libraries can be accessed.

What does it mean to minify files? Find an image of an example minified file. Why would we want to minify files?

Setting Group Expectations

Group Member Names:

  1. When are group members available to work together? What hours can each group member work individually? Are there any personal time commitments that need to be discussed?
  • JP lightning talk Friday
  • Aaron prep computability theory
  1. How will group members communicate? How often will communication happen, and how will open lines of communication be maintained?
  • Slack group (private)
  1. What is the purpose of the router in a Rails project?

    • A router redirects the incoming HTTP request to the appropriate controller. It determines what type of information will be displayed and in what context we want to view the information (ex: to view / edit).
  2. What routes would be provided to you with the line resources :items?

    • Resources establishes the seven RESTful routes for the controller.
      • get "/items" => "items#index" INDEX
      • get "/items/:id" => "items#show" SHOW
      • get "/items/new" => "items#new" NEW
      • post "/items" => "items#create" CREATE # usually a submitted form
  • get "/items/:id/edit" => "items#edit" EDIT