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 / pd-flower-job-hunt-imposter.md
Last active October 5, 2016 21:29
Professional development session: Overcoming Job-Hunting Imposter's Syndrome

What are you looking for in your first job?

  • In my first position I'd like to work with individuals and a company whose mission I identify with and find meaning in. I would prefer a product that individuals can benefit from. In work environment, I would prefer an organization that provides mentorship and growth opportunities for junior developers, allowing me to continue my learning while also providing me opportunities and challenges to be an active, contributing team member.

What are your top 3 priorities in your first job?

  1. Supportive environment for junior developers
  2. Work/life balance
  3. Location

What are some barriers you identified, as well as what you could do to mitigate these barriers?

@ryanflach
ryanflach / rails_setup.md
Last active November 13, 2023 19:49
Common setup for a new Rails project
  1. rails new <project_name> -d postgresql --skip-turbolinks --skip-spring -T
  • -d postgresql sets up the project to use PostgreSQL
  • --skip-turbolinks & --skip-spring creates a project that does not use turbolinks or spring
  • -T skips the creation of the test directory and use of Test::Unit
  1. In the Gemfile:
  • Available to all environments:
    • gem 'figaro' - store environment variables securely across your app (docs)
    • Uncomment gem 'bcrypt', '~> 3.1.7' if you will be hosting your own user accounts with passwords (docs)
  • Inside of group :test:
    • gem 'rspec-rails' - user rspec in place of minitest (docs)
@ryanflach
ryanflach / ryan_flach_m2_lightning_talk_outline.md
Created July 12, 2016 18:42
Outline for Turing Mod2 week3 lightning talk

Discover Weekly: Machine Learning in Music Curation

What is Discover Weekly

  • Weekly curated playlist of 30 songs
  • Automatically generated and delivered to all Spotify users
  • Free and incredibly popular

What is Machine Learning

  • "Machine learning is the idea that there are generic algorithms that can tell you something interesting about a set of data without you having to write any custom code specific to the problem. Instead of writing code, you feed data to the generic algorithm and it builds its own logic based on the data." - Machine Learning is Fun
@ryanflach
ryanflach / Models, Databases, and Relationships.md
Last active July 12, 2016 16:40
Checks for understanding of Turing Mod2 week 3 lesson.
  1. What is a primary key?
  • The unique identifier for each row in a table.
  1. What is a foreign key?
  • A reference in one table to the primary key in another table that it shares a relationship with.
  1. Why would one row of data have both primary and foreign keys?
  • When a relationship exists between the tables that requires one table to track a row in another.
  1. What is Rails' convention for the column name of the primary key?
  • id
  1. What is Rails' convention for the column name of a foreign key?
  • tablename_id
@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.

How does the Agile model compare to the Waterfall model?

  • Agile is based around regular adjustments, constant feedback, and planning of short-term deliverables, while the Waterfall model plans out the entire project from start to finish at the beginning.

Why do you think Agile is so popular in software development?

  • Because it allows for consistent feedback from the client and reduces the amount of wasted time and effort put into areas of the product that may not be desired by the client.

Do you think Agile is applicable to all industries?

  • Yes and no. Melinda Gates has stated that many non-profits could take cues from Coca-Cola, due to their use of constant feedback to adjust their approach and strategies in developing markets. However, as we discussed in class, construction work typically utilizes a Waterfall approach, and in similar instances where modifications to previously completed elements is very difficult or impossible, Agile may not be appropriate.