Skip to content

Instantly share code, notes, and snippets.

@dovakeen118
dovakeen118 / sinatra-activerecord-migration-workflow.md
Last active April 6, 2022 11:18
Sinatra ActiveRecord Migrations Workflow
  1. Create the database

    • bundle exec rake db:create
    • The name of the database is determined in database.yml
    • bundle exec is recommended to use before a command, this will execute the command using the versions specified in the Gemfile of this project (which may be different than what is installed on your machine)
  2. Create a migration file to add a table to the database

    • bundle exec rake db:create_migration NAME=the_name_of_your_migration
    • Typical name convention: “create_articles” where articles is the name of the table
    • Table names are plural (they hold multiple records, ex. “Articles”)
  • Model names are singular and lowercase (represents one record in the database table, ex. “article.rb”)

Rails Roadmapping Guidelines

This is a mulit-day assignment separated into core and non-core user stories. You should focus on completeing all core user stories before proceding to non-core stories. Suggested daily goals:

  • Day 1: Viewing All Questions, View a Question's Details
  • Day 2: Post a Question (requires reading Rails Forms), Answering a Question (requires reading Rails Nested Routes)
  • Day 3: Viewing a Question's Answers (requires reading Rails Nested Routes), non-core user stories

Before beginning the assignment, make sure you cover the following bullets below with your roadmapping group, answering each of the questions succinctly. The aim here is not to create the app as a team line by line, but to create an outline or "roadmap" to guide you as you code!

  1. Take a moment to read over the core user stories of the assignment, and then discuss the ER Diagram. What resources will you need? What will the relationships look like between resources?
@dovakeen118
dovakeen118 / Student-Guided-Marathon.md
Last active April 15, 2020 21:54
Student-Guided Marathon

Student-Guided Rails Marathon

Setup

  • Your roadmapping groups for this week will be your Marathon group
  • Designate one person to create a Zoom meeting and to host the app with VSCode
    • If you have a slower machine, we recommend deferring to another student for hosting, as VSCode, Slack and Zoom all take a lot of processing power
  • Share the link to your meeting for your group in #zoom-meetings, mentioning which students are in your group
    • Note: you may have to create an additional meeting, as zoom puts a meeting time limit on meetings with numerous attendees
  • The meeting host should share their screen so that everyone can see the browser and codebase
  • Have the host share the VSCode liveshare link

Sharing Single Files

The easiest way to share a single file or small number of files is to send them over Slack. We recommend you do so using Slacks snippets. You can create a new snippet by typing /snippet in the chat text box. This will open a new window where you can paste the contents of your file to share.

Copy and Pasting text from Slack not in a snippet might behave unexpectedly in VSCode. Copying general text from Slack, particularly quotations, will likely not be interpretted correctly by VSCode. Slack uses "special" quotations that appear italicized, whereas the quotations used by VSCode are vertical. See the block below for an example:

“banana” // from Slack
"banana" // from VSCode
@dovakeen118
dovakeen118 / BT-standup-standdown.md
Last active February 8, 2021 14:44
BT Stand-ups and Stand-downs

Pitch Practice Stand-up

  • Only be 1 minute at most
  • Keep it non-technical
  • Share what you plan to work on today and what your goals are
  • After standup, you may optionally post your standup notes in your #pitch-pod channel

End of Day Stand-down

  • At 5:00pm please share your standdown notes in your #pitch-pod channel:
    • What you accomplished today
  • Any major issues or stumbling blocks that you overcame or are still blocked by

How to Clone a GitHub Repo:

  1. From the GitHub repo page, make sure the left dropdown menu is on the main branch in order to get a fresh copy that you can start from scratch, without the completed code (see below how to change branches)
  2. Then, click the green Code button and copy the HTTPS path
  3. In your terminal, navigate to the folder where you want to keep the repo (could be challenges or a different folder)
  4. In your terminal, type git clone <-paste copied git path->. This will add the repo as a new directory within the folder you chose (this is just like et get)
  5. You can then cd into that new directory, based on the name of the repo
  6. By default, it will most likely give you the GitHub branch for the starter code (branch is either named master or main). You can then open this with VSCode (code .) to code through the starter code yourself, or if you would like to see the finished code in your editor… >>>
  7. If there is a branch for completed code (usually named something like `
@dovakeen118
dovakeen118 / one-to-many-associations-express-and-pg.md
Last active April 15, 2021 21:55
One-to-Many Associations with Express and Postgres

One-to-Many Associations with Express and Postgres


A Look Ahead

  • ER Diagrams are an essential tool
  • Establishing the right relationships will be one of the most important things
@dovakeen118
dovakeen118 / Cypress-Testing-Library.js
Created April 28, 2021 14:38
Experimenting with Cypress-Testing-Library
/// <reference types="cypress" />
import starterTravelAttractions from "../../fixtures/starterTravelAttractions.json";
context("Travel Attractions Index", () => {
beforeEach(() => {
cy.visit("http://localhost:3000/travel-attractions");
});
it("has a header", () => {
@dovakeen118
dovakeen118 / VirtualPairing.md
Last active December 13, 2022 15:26
Virtual Pairing

Getting Setup

Make sure to communicate extra clearly about start times and links for virtual pairing.

Pairing Etiquette

Before Pairing

  • Establish start and end times for your pairing
  • Establish when and if you will be breaking during your pairing session
  • Share with your partner ways in which you want to improve your pairing ability
@dovakeen118
dovakeen118 / VSCode-extensions.md
Last active September 22, 2022 14:14
Favorite VSCode Extensions