Skip to content

Instantly share code, notes, and snippets.

View s-espinosa's full-sized avatar

Sal Espinosa s-espinosa

View GitHub Profile

Mills Provosty

Make a copy of this gist to your GitHub account. In your gist, please answer the questions in the first three sections, then complete the techincal work. Please provide any relevant links inside your gist!

Organization Systems (if your answer to any of these is none - let's change that! If you need help finding something, let the group know and we can brainstorm):

  • What tool/system to you use to track your to-do list? Trello!
  • What tool/system do you use to calendar your time and ensure you remember appointments, deadlines, etc? I use google calendar and set alamrs.
  • What do you use for a timer for worktime/pom breaks?
@s-espinosa
s-espinosa / 1602-mock-assessment-submission.markdown
Last active August 3, 2016 17:26 — forked from rrgayhart/1602-mock-assessment-submission.markdown
1602-mock-assessment-submission.markdown

Submission


Deadline

  • Deadline for the last commit on Master is 5:15 (README commits are fine after deadline).
    • If you have job/family related interruptions, note when and for how long in your submission gist and tag that time on to your deadline time as an extension, if needed.
    • You may continue to work on another branch after the deadline but it will not be considered in the eval

WebSockets Workshop (30 points)

Websockets Workshop

Link to Repo

Completed base functionality with the code along and was able to implement feature to show users the current vote tally. Would like to come back to the remaining 'your turn' questions, but wanted to submit current status before the deadline.

Your Turn

Your mission now is to spend time in your projects doing some refactoring or researching and adding more code smells examples to this tutorial.

Fork this gist and include a link to your PR

Sal Espinosa PR on Matt Pindell's IdeaBox

Next Steps
@s-espinosa
s-espinosa / require-1602.markdown
Last active July 8, 2016 07:11 — forked from rrgayhart/require-1602.markdown
The Concept of Require

When you start working with WebPack for GameTime, you'll notice that you can't just define a variable in one file and find it in another as easily as you can in Rails.

Read Node.js, Require and Exports and Organize Your Code with RequireJS

Fork this gist and answer the following questions:

  • In the context of Node, what is a module? In node a module is any file that includes a 'module.exports' statement allowing that code to be required in other files.
  • The code examples from the second blog post look very different from the first. Why? The second blog post is using RequireJS to achieve basically the same effect with different syntax. It seems as though RequireJS only allows access to the imported functions when wrapped in a require function.

Testing Homework - Rails/JS

  • Choose one of the following tracks:
  • Skim/Read through the associated links
  • Attempt to hook up and implement unit or feature js tests in your IdeaBox or this sample idea-bin project
  • Fork this gist
  • Respond with:
  • Your experience implementing

Models, Databases, Relationships in Rails

What is the difference between a primary key and a foreign key?

Primary key is an identifier that is used to identify an item/object/thing/row in that table. A foreign key is the primary key of another table.

A primary key is unique in its table. A foreign key does not need to be unique.

@s-espinosa
s-espinosa / cfu_crud_in_sinatra.markdown
Last active March 23, 2016 04:19 — forked from rwarbelow/cfu_crud_in_sinatra.markdown
CRUD in Sinatra -- Check for Understanding
  • Define CRUD.

Create Read Update Delete.

  • There are seven verb + path combinations that are necessary in a basic Sinatra app in order to provide full CRUD functionality. List each of the seven combinations, and explain what each is for.

/some_object GET - to provide an :index view that includes all the objects /some_object/:id GET - to provide a :show view that includes a single object /some_object/new GET - to provide a :new view that includes a form to create a new object /some_object POST - to actually create the new object and redirect to another route

Introduction to Sinatra

1. What is the purpose of the server file (routing)?

Take input from a client and figure out what to do with it (e.g. what to return, what to change on a server, what to delete, etc.)

2. How do you pass variables into the views?

ERB can reference an instance variable from the server file. Can also send variables as locals. In the code below the :number symbol in the :locals hash is what will be used in the erb template to reference the variable, number (not a symbol) references the number variable in the server file.