Skip to content

Instantly share code, notes, and snippets.

View s-espinosa's full-sized avatar

Sal Espinosa s-espinosa

View GitHub Profile

#Problem Solving

When you don’t know where to start

Write a test!

  • Writing a test will often help drive your decision making. If you later realize that some other piece of the application needs to be implemented first, it’s o.k. to skip the test (put an x in front of the it in RSpec, or write skip in the first line of an it block.
  • If you’re having trouble deciding which test to write, ask yourself if there are any relationships where one thing depends on the existence of another?
    • If so, do the thing that needs to be done first.
  • If not, just pick one! Maintain a bias towards action. Often in the process of working on one aspect of an application you will create a tool that makes some other easier. Alternatively, you will work on one part of an application and realize it’s more dependent on other functionality than you initially realized. This doesn’t mean that your time has been wasted. Even if you need to reassess the code that you’ve written up to this point, it’s lik
@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.

Getting Up to Speed With a React Project

Background

  • Coming to a React app with existing code (documented in other post)

Files and What they Tell You

  • File Structure of Our Project

Commits and the People Who Love Them

Background

  • Working on a React app with existing code
  • Screenshot
  • Description
  • Invitation to mentors and back-end team to comment

Our First Commit

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
@s-espinosa
s-espinosa / sal_exercisms.md
Last active June 24, 2016 21:58
Review and Comparison of JS Exercisms

Leap

My code: here

Alternative solutions seemed to follow one of three approaches:

Approach #1 (here, here, here, and here) - This approach, the most popular based on my small sample, strings the test conditions together into a single line of code that inherently returns true or false when called. It's an elegant solution, but maybe not the easiest to maintain? I understood it quickly having just gone through the problem, but I'm not positive I'd find it as easy to parse if I were to come back to it a year from now. The logic doesn't necessarily seem to map clearly to the problem at hand.

Approach #2 ([here](http://exercism.io/submissions/518629a2b007432b9dc88669

# Warmup (5 mins)
* Clone repo
* index.txt
* One minute - what are the pieces?
* One minute - discuss with neighbor.
* List on board.
# HTML (10 mins)
* index.html (in atom)
* Way to organize/describe content.