Skip to content

Instantly share code, notes, and snippets.

View GregoryArmstrong's full-sized avatar

Gregory Armstrong GregoryArmstrong

View GitHub Profile
@GregoryArmstrong
GregoryArmstrong / cfu_crud_in_sinatra.markdown
Last active December 2, 2015 15:51 — forked from rwarbelow/cfu_crud_in_sinatra.markdown
CRUD in Sinatra -- Check for Understanding
  1. Define CRUD.

    • Create, Read, Update, Delete. Describes the type of actions one should be able to do to the database.
  2. 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.

      1. See all: '/tasks' + GET
      1. See one: '/tasks/:id' + GET
      1. Form to create (part 1): '/tasks/new' + GET
      1. Create from form (part 2): '/tasks' + POST
@GregoryArmstrong
GregoryArmstrong / AgileManifestoQuestions
Last active December 7, 2015 17:24
Agile Manifestion Questions
1. How does the Agile model compare to the Waterfall model?
- Waterfall is rigid and resistant to change, whereas Agile is designed at its core to deal with and embrace changing circumstances.
- Agile produces smaller bits more quickly, with the aim of a better product by the end of development.
2. Why do you think Agile is so popular in software development?
- Software is incredibly maleable and will inevitably change, so a process of design that keeps these facts in mind will result in a better product.
3. Do you think Agile is applicable in all industries?
- Most likely yes, it's applicable in all. Whether or not it is the best fit for all industries is another question. I would imagine that with increasing simplicity of the project, the more waterfall would fit the process. As complexity increases, I would imagine Agile to become increasingly useful.
@GregoryArmstrong
GregoryArmstrong / migrations_databases_models_relationships_in_rails.md
Created December 15, 2015 19:43
Migrations, Databases, Models, and Relationships in Rails

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

  • Primary Key = Usually an autoincrementing number for each row in the database, specific to the row.
  • Foreign Key = Key in a database which comes from another table, doesnt have to be that other table's primary key but often is. Where would we find a primary key?
  • Primary key is usually the first column in a table, autoincrementing # called ID What would it be called by default?
  • ID Where would we find a foreign key?
  • Secondary table, coming from another (usually primary) table What is the naming convention for a foreign key?
@GregoryArmstrong
GregoryArmstrong / programming_spinal_cord_injury.markdown
Created December 15, 2015 20:46
Can programming solve spinal-cord injury?

Can programming solve spinal-cord injury?

Spinal-Cord Anatomy Basics

  • Rough overview of spinal cord circuitry and anatomy for the uninitiated, possibly mention UF
  • [Spinal Cord Image]

What Spinal-Cord Injury Is

  • Discuss possible sources of spinal-cord injury
  • Describe what happens to the circuity and structures when injured, both short and long-term effects
  • [Spinal Cord Injury Image]
@GregoryArmstrong
GregoryArmstrong / proper_commit_messages.md
Created January 7, 2016 16:52
Proper Commit Messages

Teams should agree on commit message conventions:

  • Style: How does the team want to handle markup syntax, wrapping margins, grammar, capitalization and punctuation. This aids in consistency.
  • Content: What should your commit message contain or not contain?
  • Metadata: Do you want to have Tracking IDs, pull requests numbers, perhaps milestone references or waffle.io issue references?

http://chris.beams.io/posts/git-commit/ 's 7 rules of a great commit message:

  1. Separate subject from body with a blank line
  2. Limit the subject line to 50 or less characters
  3. Capitalize the subject line

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?

  • Coffeescript and Sass files are precompiled into their base language so that translation is not needed on the client side.

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

Intro - 10 Minutes

  • Installing p5
  • What is p5?
  • p5 sound library

How to p5.sound in a rockin' fashion - 10 Minutes

  • File & Song Setup
  • Visualizer Example/Starter File

[SummonerStats]

Pitch

Leage of Legends statistics aggregator, w/ features to compare your account's characters played against top player accounts and be provided character suggestions

Problem

League of Legends game stats are viewable on a limited basis through the game maker's website, however their API provides

@GregoryArmstrong
GregoryArmstrong / SandiMetzRulesForDevelopers.md
Created March 17, 2016 17:02
Sandi Metz' Rules For Developers
  1. Classes can be no longer than one hundred lines of code.
  2. Methods can be no longer than five lines of code.
  3. Pass no more than four parameters into a method. Hash options are parameters.
  4. Controllers can instantiate only one object. Therefore, views can only know about one instance variable and views should only send messages to that object.

For me the most difficult to follow would be rule #4. In my last few modules Ive tried to adhere to SRP for methods and classes and that seems to bring down the line length for such things on its own. I am usually only using 1 or 2 arguments for a method anyways, so 3 isnt too difficult either. But #4 is problematic as Ive begun to use POROs more frequently, and so ive gotten used to using 2 or 3 in a controller. It will definitely force me to adhere even more to SRP, but sometimes I feel it's useful to have a couple of instantiated objects. I'll try it on my next project as a challenge to myself.