Skip to content

Instantly share code, notes, and snippets.

View ryanflach's full-sized avatar

Ryan Flach ryanflach

View GitHub Profile
  • In the context of Node, what is a module?
    • A chunk of code that can be shared (required) between files, much like classes and modules can be shared between files in Ruby. There is no syntax required when creating what may become a module. Instead, use of module.exports at the end of a file determines what code is available when using var access = require('path/to/file') in another file that may need it.
  • The code examples from the second blog post look very different from the first. Why?
    • The first is using the syntax from node to export modules, whereas the second is using a file and module loader called RequireJS.

Leap

My code: here

  • Responder #1 (here) - This individual took a similar approach, though they did not utilize a ternary. Additionally, they used an interesting check with the modulo to ensure that the remainder for the year / 100 was greater than 0, and not equal to 0. I assume this was done in place of ensuring that it was not cleanly divisible by 100, but I found it to be a less readable implementation.
  • Responder #2 (here) - This individual's approach was verbose with regard to usage of return statements for true or false, but, as a result, it was easy to follow their thought process. I was intrigued to see usage of an if statement after an else if. It indicated a level of flexibility within JavaScript syntax that I wouldn't have expected.
  • Responder #3 ([here](http://exercism.io/submissions/
  1. What is ES6?
  • Officially ECMAScript 6, it is the most recent build of syntax for JavaScript (ECMAScript is the 'proper' name for JavaScript).
  1. What is Transpilation and how does it relate to ES6?
  • A source-to-source compiler. With regard to ES6, a tool like Babel would allow you to write in ES6 and have the code compiled to ES5, for environments where ES6 might not yet be supported.
  1. Looking at the ES6 features link below, discuss one update from ES5 and if it seems useful/superfluous.
  • I had seen the new 'arrow' syntax but didn't have an understanding of it. In short, it is shorthand for function and is of particular use when a single-line function is being called. From the examples found here:
var bar = foo.map(function(x) { return x.length; });

becomes:

@ryanflach
ryanflach / git-workflow.markdown
Last active March 13, 2020 21:28 — forked from erinnachen/git-workflow.markdown
My Git Workflow

Project workflow:

  1. Load/Reload waffle.
  • Get most current list of actions for the project.
  1. Choose a card from the backlog in waffle. If we're working separately, it's best to move that card that you've chosen into ready and perhaps assign it to yourself as well.
  • Make sure multiple team members aren't working on the same issue; ensure everyone knows what each other is working on.
  1. git checkout master
  2. git pull origin master
  • Ensure you're starting on the master branch and have the most recent changes pulled down.
  1. run rspec
  • Make sure there are no outstanding issues with code on master.
@ryanflach
ryanflach / week_3.markdown
Last active May 26, 2016 15:48 — forked from worace/week_3.markdown
Module 1 Week 3 Diagnostic

Module 1 Week 3 Diagnostic

This exercise is intended to help you assess your progress with the concepts and techniques we've covered during the week.

For these questions, write a short snippet of code that meets the requirement. In cases where the question mentions a "given" data value, use the variable given to refer to it (instead of re-writing the information).

@ryanflach
ryanflach / prework.md
Last active May 8, 2016 22:33 — forked from mbburch/prework.md
Gist for Ryan Flach's Turing Prework (#1605)

Turing School Prework

Task A- Practice Typing:

  • screenshots of scores will be posted in comments

Task B- Algorithmic Thinking & Logic:

  • screenshots of completed sections will be posted in comments

Task C- Create your Gist: