Skip to content

Instantly share code, notes, and snippets.

@mcharrod
Last active November 28, 2021 01:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mcharrod/3913e379a38c4eea815b5a6457b9bbee to your computer and use it in GitHub Desktop.
Save mcharrod/3913e379a38c4eea815b5a6457b9bbee to your computer and use it in GitHub Desktop.
This is Katy Harrod's intermission work for Mod 2 at Turing School of Software and Design.

B2 Intermission Work

Answer these Check for Understanding questions as you work through the assignments.

HTML

  1. What is HTML?

HTML stands for Hypertext Mark(up) Language. You can use HTML to let the computer know how it should display data and the different kinds of ways you can interact with it. For instance, you can label a portion of the data in such a way where you would be able to jump to that part of the page if you clicked on a link. You can also set images, and create forms for the user to input data. The most interesting part of HTML I have learned so far is that the descriptions of each piece of data for a user who is using a screen reader is actually labelled very closely inside that piece of data. It is all small portions of things segmented together into one page.

  1. What is an HTML element?

An HTML element is the contents between two tags. For instance, you can have a title element between two h1 and /h1 tags. Elements can be nested inside of eachother like layers. The largest element I know of is the html element, where you put all of the other elements between their corresponding tags inside of, and then close out that html element with another html tag.

  1. What is an HTML attribute?

An HTML attribute is something that goes inside of a tag. The idea of the attribute is it tells the computer what kind of data is going in there, and from there you would put the attribute value, which is the specific piece of data you are trying to display. For example, inside of an img tag you would put the attribute src which is the category, and then that specific path to the image which would be the attribute value. You would also want to add an alt attribute with a value of the image description so that if the image does not display it would show what it is supposed to display, aswell as perhaps being able to use a screen reader for that information.

  1. What is the difference between a class and an id? When would you use one vs. the other?

An ID is something which is unique to only one portion of the data, whereas a class is something which you can use across many parts of the data. The simplest example I know of for this is that you would want an ID that would link to one specific desired location, such as a link on a blog to jump to the recipe. Somewhere you might want to use a class is where you would like to have the same kind of format across many pieces of data, such as different subheadings underneath the same subject.

  1. What HTML would you write to create a form for a new dog with a "name" and an "age"?

<!DOCTYPE html
<html>
<body>

<h1>Dog Info Form</h1>

<form action = "(page you want to send thing to)">
<label for="dogName">Dog's name:</label><br>
<input type="text" id="dogName" name="dogName"></label><br>
<label for="dogAge>Dog's Age:"</label><br>
<input type="text" id="dogAge" age="dogAge"></label><br><br>
<input type="submit" value="Submit">
</form>
</body>
</html>

  1. What are semantic tags? When would you use them over a div?
  2. Explain what each of the following HTML tags do and when you would use them:
  • <h1>, <h2>, etc.
  • <p>
  • <body>
  • <a> and the href attribute
  • <img> and the src attribute
  • <div>
  • <section>
  • <ul>, <ol>, and <li>
  • <form>
  • <input>

CSS

  1. What is CSS?
  2. What is a CSS selector? How do you use the ID selector? The class selector?
  3. What are the three ways to include CSS in your HTML documents? What are the pros and cons of each?
  4. What is the Box Model? Describe each component of the Box Model.

SQL

Jumpstart Lab Tutorial

  1. What is a database?

A database, as far as I understand, is a collection of related data in SQL which you can manipulate. It may instead be which specific type of SQL you are using-- I am not too confident in my knowledge of this currently.

  1. What is SQL?

SQL is a way of retrieving desired relevant information from a large pool of data, and adding or removing portions of it as well.

  1. What is SQLite3?

SQLite3 is one particular kind of SQL. It is not as common and is not recommended for large companies to work off of.

  1. What is a Table?

A table is a way of displaying information with rows and columns of labels and corresponding information. In SQL, you need to specify how you want certain things to be labelled in a human-friendly way.

  1. What is a primary key?

A primary key is the labels on a SQL table

  1. What is a foreign key?

A foreign key is a combination of aspects from different tables patched together into one new table.

  1. Explain what each of the following SQL commands do:
  • insert Insert will add new data inside an existing table

  • select Select will gather the specified data, or all of it with an asterisk.

  • where Where is a conditional that will do specified actions when met.

  • order by Order by is a way of sorting the data.

  • inner join Inner join will put together information from different tables where the specified labels match.

PG Exercises

  1. How can you limit which columns you select from a table?
  2. How can you limit which rows you select from a table?
  3. How can you give a selected column a different name in your output?
  4. How can you sort your output from a SQL statement?
  5. What is joining? When do you need to join?
  6. What is an aggregate function?
  7. List three aggregate functions and what they do.
  8. What does the group statement do?
  9. How does the group statement relate to aggregates?

Rails Tutorial: Task Manager

Copy and Paste the link to your Task Manager repo here: Copy and Paste the link to your Static Challenge here:

  1. Define CRUD.

CRUD is a way of interacting with a website. Where you makes posts, you would want to be able to edit them, delete them, and create them, and read them.

  1. Define MVC.

MVC is a way of interacting with a website so that it displays what you expect when you select certain options.

  1. What three files would you need to create/modify for a Rails application to respond to a GET request to /tasks, assuming you have a Task model.

  2. What are params? Where do they come from?

I believe params are bits of information created when a user fills out a form

  1. Check out your routes. Why do we need two routes each for creating a new Task and editing an existing Task?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment