Skip to content

Instantly share code, notes, and snippets.

View hhoopes's full-sized avatar

Heidi Hoopes hhoopes

  • Denver, CO
View GitHub Profile
@hhoopes
hhoopes / superfizzbuzz.rb
Created December 1, 2015 16:43
SuperFizzBuzz homework
## SuperFizzBuzz Clear
# Heidi Hoopes
# Missed the 3 & 5 case, so need to add that in
range = 0..1000
range.each do |n|
a,b,c = ''
num = n
@hhoopes
hhoopes / cfu_crud_in_sinatra.markdown
Last active February 2, 2016 23:07 — forked from rwarbelow/cfu_crud_in_sinatra.markdown
CRUD in Sinatra -- Check for Understanding
  1. Define CRUD. The 4 functions you need to be able to implement in a web app for a user to interact with data: CREATE READ UPDATE DELETE
  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. GET /collection : get the full set of data being stored GET /collection/1 : get an individual object that's being stored GET /collection/add : Gives the user the ability to add new information to the collection
Rules of thumb for good commit messages:
* Concise and consistent in length and form
* Explain the WHY of the change, not just WHAT changed
* Use your text editor to craft the message. It will simulate an email, a single concise subject line on the first line, a blank line, then a body with more explanatory detail
* "Imperative" subject lines use a verb as the first word, and can be interpreted as a command, e.g., "Fix mis-indentation in _git_stash()", "Factor out a helper to prepare a child process to run the pager"
How to create a convention with your team, perhaps in a DTR:
1. Discuss style, including markup syntax, wrap margins, grammar, capitalization, punctuation.
1. SELECT sum(revenue) FROM items;
2. SELECT avg(revenue) FROM items;
3. SELECT min(revenue) FROM items;
4. SELECT max(revenue) FROM items;
5. SELECT count(name) FROM items;
SELECT count(*) FROM items;
1. SELECT * FROM items WHERE course='main'; (active record: items.where(course: "main"))
2. SELECT name FROM items WHERE course='main';
**Step One**: Watch [Sorting Algorithms in JavaScript](https://www.youtube.com/watch?v=uRyqlhjXYQI)
**Step Two**: Fork this gist.
**Step Three**: Respond to this question in your fork: "What are some of the balances and trade offs between different sorting algoritms?"
This is a good question to think about, because I'm helping the mod 1 students with their sorting suites!
There are three considerations for a sorting algo: stability (maintaining the fidelity of a collection with the criteria given), runtime, actual implementation.
@hhoopes
hhoopes / require-1511.markdown
Last active May 23, 2016 05:05 — forked from rrgayhart/require-1511.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?