Skip to content

Instantly share code, notes, and snippets.

View jeneve's full-sized avatar

Jeneve Parrish jeneve

View GitHub Profile

##The Principles of Design Applied to Code.

“Design is a human ritual of understanding.” ― Maggie Macnab, Design by Nature: Using Universal Forms and Principles in Design

###Part 1: Lecture- The Principles of Design Defined. (~25 min)

  • Please take note any time you hear about a Principle that you think applies to the back-end as well as the front.

###Part 2: Discussion- Do the Principles apply to the back-end as well as the front? How? (~10-20 min)

RNA Transcription

My code: here

Responder #1 (here) - This responder used a long case statement for flow control instead of the key object that I used. In ruby, I think my solution is cleaner, but I don't know enough about javascript style to say what's better here. I often find myself thinking of the ruby solution first and then trying to write it in javascript.

Responder #2 (here) - Jon also used if/else if/else for flow control but used a syntax I'm not familiar with- didn't use curly brackets around the code to run when conditions returned true.

Student: Jeneve

Notes:

  • 6 Passing Tests
  • Should test for individual parameter content (specific name, description etc)
  • Good work testing count and response code for delete/create
  • Tests should be more robust with items/information on the page (per user story)
  • First user story is complete except for limiting results to 15 displayed on the page
  • Nice job separating show parameters into variable but should also pull connection into private method to reduce repetition

Evaluation Process

For the evaluation we'll work through the expectations above and look at the following criteria:

1. Feature Completeness

  • 4: All features are correctly implemented along with two extensions

2. Views

hat does it mean to concatenate files? Find an image of an example concatenated file. Why would we want to concatenate files?

Reducing the number of requests is effective in optimizing a site because no matter how small the file is, every single request the browser makes takes at least 20 ms, and could take upwards of 100 ms or more. source What does it mean to precompile files? What does this have to do with coffeescript and sass files?

Precompile means to compile high level languages into base code that can be run. coffeescript compiles into javascript and sass complies into css. The asset pipline takes care of this but I'm not sure when.

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

#commit messages

source: this post

there are more ways to make a commit message than with -m, which typically is used for one liners. you can even have it read from a separate file.

well-crafted git commit message is the best way to communicate context about a change to fellow developers (and indeed to their future selves). A diff will tell you what changed, but only the commit message can properly tell you why.

In order to create a useful revision history, teams should first agree on a commit message convention that defines at least the following three things:

## Models, Databases, Relationships in Rails
#### What is the difference between a primary key and a foreign key? Where would we find a primary key? What would it be called by default? Where would we find a foreign key? What is the naming convention for a foreign key?
#### Write down one example of:
* a `one-to-one `relationship.
* a `one-to-many relationship`.
* a `many-to-many relationship`.
@jeneve
jeneve / cfu_crud_in_sinatra.markdown
Last active March 23, 2016 04:16 — forked from rwarbelow/cfu_crud_in_sinatra.markdown
CRUD in Sinatra -- Check for Understanding
  1. Define CRUD. create, read, update, delete. everything a web app should do.
  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. see all the assets (READ-GET-RENDER) see one of the assets (READ-GET-RENDER) see a form to create a new asset (CREATE-GET-RENDER) submit the filled form, save the new asset (CREATE-POST-REDIRECT) see a form to edit an exsisting asset (UPDATE-GET-RENDER) submit the filled form, save the edited asset (UPDATE-POST-REDIRECT) delete an asset (DELETE-DELETE-REDIRECT)
@jeneve
jeneve / jeneve_writing_lightning_talk.md
Last active March 22, 2016 21:02
Improve your writing lightning talk

##Writing for Humans

The skill of writing is to create a context in which other people can think. –Edwin Schlossberg

  • Writing is essential to the development of a career in the tech, and as an added benefit, you will gain a deeper understanding of your own vision and practice by articulating what you are doing and why you are doing it.
  • My tips are meant to help with all kinds of expository writing; blog posts, documentation, as well as auto-biographical or persuasive writing, like cover letters or proposals.

###THIS IS SO HARD

What are you writing about? generating content is the hard part. Here are some strategies and things to keep in mind;

Introduction to Sinatra

1. What is the purpose of the server file (routing)?

to get requests from the client/user and send responses/ content. The gateway between the client/user and the content of the app.

2. How do you pass variables into the views?

You can pass instance variables that are defined in the get block above the erb :route method. You can send local variables using symbols(the name you gave the variable) and hashes(wherin the key is the symbol and the value is the value).