Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sherman Au #460

Open
wants to merge 74 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
97a95d2
Create section1 formatting
ericweissman Jan 4, 2021
d70b077
Remove deliverables section
ericweissman Jan 4, 2021
8459c7c
Adjust index naming
ericweissman Jan 4, 2021
a88a6c8
Add Section 2
ericweissman Jan 4, 2021
eb04226
Adjust command for running exercises
ericweissman Jan 4, 2021
6148e49
Adjust commands for section 2
ericweissman Jan 4, 2021
d832112
Create section3 formatting
ericweissman Jan 4, 2021
9a1a673
Remove language around JD book
ericweissman Jan 4, 2021
91ba56d
Add section 4 formatting
ericweissman Jan 4, 2021
15d7698
Add final project formatting
ericweissman Jan 4, 2021
96346d4
Added previous day structure to archived directory
ericweissman Jan 4, 2021
5a444e9
Adjust README to follow Section formatting
ericweissman Jan 4, 2021
e9ba099
Add instructions on expectations
ericweissman Jan 4, 2021
a34ba34
Move all Day 1 - 7 to archived
ericweissman Jan 4, 2021
4969ec4
Adjust to main branch rather than master
ericweissman Jan 4, 2021
9078c46
Adjust deliverables in index
ericweissman Jan 4, 2021
07825e7
Adjust Section 1 readme
ericweissman Jan 11, 2021
a88f311
Adjust deliverables
ericweissman Jan 11, 2021
bdeb640
Remove outdated language from instructions
ericweissman Jan 11, 2021
409f339
Add extensions
ericweissman Jan 11, 2021
752212d
Remove deliverales language
ericweissman Jan 11, 2021
2a22f36
Adjust section 1 exercises
ericweissman Jan 18, 2021
564d8f4
Adjust section 2 exercises
ericweissman Jan 18, 2021
c006e0c
Adjust section 3 exercises
ericweissman Jan 18, 2021
5fe3424
Clarify format
ericweissman Jan 18, 2021
3463ffc
Adjust final prep
ericweissman Jan 21, 2021
bca2f74
Adjust link to correct prework in README
ericweissman Jan 21, 2021
223a510
Update README.md
ericweissman Feb 15, 2021
b4097ee
Remove environment setup
ericweissman Feb 15, 2021
e10bd2d
Adjust super learners link
ericweissman Feb 15, 2021
618703f
Adjust setup instructions
ericweissman Feb 16, 2021
c3578c9
Add disclaimer for rbenv setup
ericweissman Feb 16, 2021
97de725
Adjust rbenv install to 2.7.2
ericweissman Feb 17, 2021
2e1a489
Remove outdated rbenv install video
ericweissman Feb 24, 2021
bb872b2
Add booleans to BE instructions
ericweissman Feb 24, 2021
1298a52
Adjust readme language for reflections
ericweissman Feb 25, 2021
bee9881
Add deliverables to final prep
ericweissman Feb 26, 2021
6ef6dbf
Add calendar link
ericweissman Feb 26, 2021
e32b54b
Adjust section 3 instructions
ericweissman Mar 29, 2021
088baa5
Add extensions
ericweissman Apr 13, 2021
696a7ad
Adjust screenshots for forking and cloning
ericweissman Apr 20, 2021
7c9d8d5
Remove outdated video
ericweissman Apr 20, 2021
c26f5ac
Comment out rbenv setup
ericweissman Apr 20, 2021
a1669e5
Adjust final prep link
ericweissman Apr 21, 2021
8e68b79
Add GH warning
ericweissman Apr 28, 2021
7b694a4
Add updated PR photos
ericweissman Aug 3, 2021
e9aa924
Adjust error in README
ericweissman Oct 26, 2021
492321c
add back the rbenv setup instructions in the readme
scottalexandra Nov 18, 2021
1324ec8
Fix Typo
scottalexandra Nov 18, 2021
bc4ce70
Change JS reference to Ruby
ameseee Nov 18, 2021
a0686ba
Remove unnecessary return statement
ameseee Nov 18, 2021
604d93e
Replace "function" with "method"
ameseee Nov 19, 2021
f94172e
Update README.md
ameseee Dec 5, 2021
fd89840
Finish reflection
ShermanA-13 Dec 16, 2021
25dd077
Finish section 1 exercises
ShermanA-13 Dec 16, 2021
e4b9616
Finish section 2
ShermanA-13 Dec 16, 2021
bb36657
Finish arrays.rb exercise
ShermanA-13 Dec 16, 2021
583b363
Finish hashes.rb exercise
ShermanA-13 Dec 16, 2021
2eb1971
Finish section 3 reflections.
ShermanA-13 Dec 16, 2021
f58558d
Test
ShermanA-13 Dec 18, 2021
e4b3421
Test
ShermanA-13 Dec 18, 2021
7c6249d
Test
ShermanA-13 Dec 18, 2021
7302ecb
Finish burrito.rb exercise
ShermanA-13 Dec 18, 2021
aa14553
Finish dog.rb exercise
ShermanA-13 Dec 18, 2021
c1e8b10
Finih person.rb exercise
ShermanA-13 Dec 18, 2021
ce36c19
Finish section4 reflection
ShermanA-13 Dec 18, 2021
1c96097
End Timer
ShermanA-13 Dec 18, 2021
22015a1
Finish annotations.rb
ShermanA-13 Dec 18, 2021
182edf5
Add calendar imgs
ShermanA-13 Dec 19, 2021
bd2653f
Update README.md
ShermanA-13 Dec 19, 2021
293e766
Update README.md
ShermanA-13 Dec 19, 2021
90b1d27
Update README.md
ShermanA-13 Dec 19, 2021
f019f50
Update README.md
ShermanA-13 Dec 19, 2021
6cc940e
Update README.md
ShermanA-13 Dec 19, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 60 additions & 55 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,53 +2,67 @@

This repository will walk you through the Mod 1 Pre-work for the Backend program at Turing.

Each day has a folder containing a `README.md` file with instructions for the day, exercises, and questions. Please complete all the exercises and questions, as well as lessons listed in the day's readme.
Each day has a folder containing a `README.md` file with instructions for the section, exercises, and questions. Please complete all the exercises and questions, as well as lessons listed in the section's README.

### Pre-work Index

* [Day 0 - More Terminal Practice](day_0)
* [Day 1 - Strings and Numbers](day_1)
* [Day 2 - Arrays and Iteration](day_2)
* [Day 3 - If Statements and Loops](day_3)
* [Day 4 - Methods and Return Values](day_4)
* [Day 5 - Hashes](day_5)
* [Day 6 - Classes](day_6)
* [Day 7 - Build A Thing](day_7)
* [Section 1 - SUPER LEARNERS, Terminal and Ruby Foundations](section1)
* [Section 2 - ASKING QUESTIONS, Conditionals and Methods](section2)
* [Section 3 - GROWTH MINDSET, Hashes](section3)
* [Section 4 - HOW YOU USE YOUR TIME, Objects and Classes](section4)
* [Final Prep - Final Deliverables and Submission](final_prep)

# Environment
## What to Expect

Through completing this pre-work, you can expect to get practice re-enforcing what you learned/are learning in Mod 0, learn more technical content, and deeply reflect on your mindsets and habits and start thinking about which of those mindsets and habits will help you learn to code, and which of those you may need to change.

We will remind you of the best practices that follow from time-to-time, but to ground yourself in the work ahead, read them carefully.

## Best Practices: Learning to Write Code

**If you are stuck for longer than 30 minutes, know that it is always ok to ask for help!** The process of becoming a software developer is difficult, and learning to code is hard. At some point, everyone struggles. Struggle is a normal, healthy part of the learning process - don't give up if you hit a hard spot. If you consistently practice every day and don't take shortcuts, you will be on the path to learning how to code. When you reach out for help, challenge yourself to ask clear questions and use technical vocabulary. Speaking accurately about code is a great way to help lock in technical understanding. Use [this guide](https://gist.github.com/ericweissman/fb0241e226227867b6bc70a4d49227f5) to learn the optimal way to ask for help when you get stuck!

Before we can experiment with coding out the concepts we will learn in Mod0, we need to do a bit more setup to prepare a Ruby-specific development environment.
**Process over Product.** When asking for help, do your best to seek understanding rather than `the answer` or `the solution`. Even if your helper gets you a solution that works, make sure to spend time on *why* it works, rather than just accepting the solution and moving on.

Follow this guide step-by-step to make sure you have everything you need, then you will be ready to start your first day of work!
**Type every line of code.** One of the best things you can do to set yourself for success is to make sure you type out all the code examples you see in the readings and exercises in this pre-work, *do not* copy and paste. The more hands-on-keyboard practice you can give yourself, the better. Copying and pasting won't help you solidify these concepts, manually typing all the code in will. This also applies to auto complete features in popular text editors. They are helpful, no doubt, but doing things the hard way at the beginning is a great way to hone your workflow later on.

**Details matter.** Pay close attention to small details in syntax, spacing, and language. The most detailed oriented you are as you're working, the more reliable and well-crafted your code will be. In programming, being detail oriented helps cut down on buggy code and difficult to use systems. It can also help you notice differences in your code, enabling you to identify typos and mistakes more quickly.

# Environment

Follow this guide step-by-step to make sure you have everything you need.

***Before proceeding***, if you have not already, complete the [mod-0 environment setup instructions](http://mod0.turing.io/setup-instructions) to install Atom, xcode-select, Homebrew, git, and Chrome.

We will now cover these three topics:
Next We will cover the following:

* [Installing Rbenv - a Ruby Version Manager](#set-up-ruby-environment-manager-rbenv)
* [Installing Ruby Versions using Rbenv](#use-rbenv-to-install-a-certain-version-of-ruby)
* [Forking and Cloning the Prework Repository](#forking-the-module-1-prework-repository)
<!-- * [Terminal](#terminal) -->
<!-- * [Forking and Cloning the Prework Repository](#forking-the-module-1-prework-repository) -->


First, let's get a Ruby version management tool on our machines.

## Set up Ruby Environment Manager: [rbenv](https://github.com/rbenv/rbenv#homebrew-on-mac-os-x)
## Set up Ruby Environment Manager: [rbenv](https://github.com/rbenv/rbenv#homebrew-on-mac-os-x)

Over the years, Ruby has evolved through various version releases over time that contain new features and upgrades. Version 0.95, the very first, was released in 1995, and at the beginning of year 2020, we're at version 2.7.
<!-- Over the years, Ruby has evolved through various version releases over time that contain new features and upgrades. Version 0.95, the very first, was released in 1995, and at the beginning of year 2021, we're at version 2.7.

Generally, programs written in one version of Ruby will run just fine on another version, but sometimes incompatibilities can be encountered, meaning that particular program needs to be run with a specific version of Ruby.

Additionally, very useful tools called "gems" are out there that were created specifically to help developers code (specifically, the `pry` gem is very handy) and we cannot utilize these without first installing and configuring `rbenv`.

To solve potential compatability issues, we'd like to be able to install and manage multiple versions of Ruby on our system. We would also like to be able to use gems across different versions of Ruby. These are the kinds of things `rbenv` handles.
To solve potential compatibility issues, we'd like to be able to install and manage multiple versions of Ruby on our system. We would also like to be able to use gems across different versions of Ruby. These are the kinds of things `rbenv` handles. -->

### Installation

#### Installation
#### NOTE: If you have any issues with the `rbenv` setup, please reach out in slack in your cohort channel and we will address your issues at a later date! Your system version of ruby will work fine for your Prework exercises!

Here is a video walk-through that may be helpful for the following steps. Check it out!
<!-- Here is a video walk-through that may be helpful for the following steps. Check it out!

Keep in mind that the steps in the video are correct, but we want you to install **ruby version 2.5.3**, per the written instructions below.
Keep in mind that the steps in the video are correct, but we want you to install **ruby version 2.7.2**, per the written instructions below. --> -->

[![Walkthrough RBENV and Ruby](images/rbenv-ruby-thumbnail.jpg)](https://youtu.be/3DtqMlK8In0 "Video Walkthrough for RBENV and Ruby Installation")
<!-- [![Walkthrough RBENV and Ruby](images/rbenv-ruby-thumbnail.jpg)](https://youtu.be/3DtqMlK8In0 "Video Walkthrough for RBENV and Ruby Installation") -->

Similar to Homebrew, rbenv provides a script to get everything installed. Open a terminal with Spotlight search (`Command + Space`) and enter these commands:

Expand Down Expand Up @@ -91,7 +105,7 @@ This command will open up your `ZSH Runtime Configuration` file in Atom so you c

Check to see if you did this step correctly by switching back to your terminal and typing `cat ~/.zshrc`. You should see `eval "$(rbenv init -)"` at the bottom of the output.

After, *close your terminal and reopen it.* This is a very important step since the bash profile is loaded each time a new terminal window is opened.
After, **close your terminal and reopen it.** This is a very important step since the bash profile is loaded each time a new terminal window is opened.

Now, check to make sure rbenv was installed properly. In your terminal, type:

Expand All @@ -105,14 +119,14 @@ More information about rbenv can be found [here](https://github.com/rbenv/rbenv#

### Use rbenv to install a certain version of Ruby

Now that we have rbenv installed, we're going to use it to install a specific version of Ruby: Ruby 2.5.3. This is the version we will use in the Backend Program.
Now that we have rbenv installed, we're going to use it to install a specific version of Ruby: Ruby 2.7.2. This is the version we will use in the Backend Program.

If you need another version it'll be the same procedure, just replace `2.5.3` in the instructions with whichever version you want.
If you need another version it'll be the same procedure, just replace `2.7.2` in the instructions with whichever version you want.

Install it with:

```
$ rbenv install 2.5.3
$ rbenv install 2.7.2
```

It will take a while to finish installing, and print a _lot_ of text to your terminal.
Expand All @@ -123,14 +137,14 @@ When it's all finished, type:
$ rbenv versions
```

and you should now see `2.5.3` listed.
and you should now see `2.7.2` listed.

Be careful, there are two different rbenv commands, `version` and `versions`. The first shows you _your current ruby version_. The second shows _all installed versions_.

Switch to your newly installed version with

```
$ rbenv local 2.5.3
$ rbenv local 2.7.2
```

Now enter:
Expand All @@ -142,17 +156,17 @@ $ ruby -v
This shows us what version of Ruby we are running. You should see something like:

```
ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin17]
ruby 2.7.2p105 (2018-10-18 revision 65156) [x86_64-darwin17]
```

You can ignore everything after the `p` in `2.5.3p105`- the first bit shows us we are running Ruby 2.5.3, which is what we want to verify. If you got something different than `2.5.3`, such as `2.4.1`, go back through the Rbenv installation, make sure you have you successfully edited your `bash_profile`, restart your terminal, and try again.
You can ignore everything after the `p` in `2.7.2p105`- the first bit shows us we are running Ruby 2.7.2, which is what we want to verify. If you got something different than `2.7.2`, such as `2.4.1`, go back through the Rbenv installation, make sure you have you successfully edited your `bash_profile`, restart your terminal, and try again.

#### Setting the Default Version

You can tell rbenv which Ruby version you want to use by default. Let's do that with terminal command:

```
$ rbenv global 2.5.3
$ rbenv global 2.7.2
```

Now, let's make your terminal aware of this update with command:
Expand All @@ -161,11 +175,11 @@ Now, let's make your terminal aware of this update with command:
$ rbenv rehash
```

## Terminal
<!-- ## Terminal

We will be referencing many terminal commands throughout the prework. It is recommended that you practice using terminal commands before getting started with day_1.

[Check out day_0 to practice!](day_0)
We will be referencing many terminal commands throughout the prework. It is recommended that you practice using terminal commands before getting started with section1. -->
<!--
[Check out section 1 to practice!](section1)

### Forking the Module 1 Prework Repository

Expand All @@ -177,13 +191,15 @@ In order to fork the repository, follow these steps:

#### 1. Make sure you are logged in to GitHub (if you are not logged in, log in and come back to this page)

#### 2. You'll want to find this repository's Fork button. Scroll to the top of *this* webpage... yes, [this one](https://github.com/turingschool-examples/backend_mod_1_prework) that you're reading right now!
#### 2. You'll want to find this repository's Fork button. Scroll to the top of *this* webpage... yes, [this one](https://github.com/turingschool/backend_mod_1_prework) that you're reading right now!

#### 3. Click on `Fork` in the upper right corner of the screen, just under the top banner.

![click fork button](/images/be_step1.png)

#### 4. On the new page, confirm that it is a "forked" copy of the repository, with your username included in the URL and repository name.

![confirm new repository belongs to _your_ github account](/images/fork_02.jpg)
![confirm fork](/images/be_step2.png)

Check [github help](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) out for more info about forks.

Expand All @@ -195,7 +211,7 @@ Cloning is when you copy a remote Github repository to your local computer.

#### 1. In YOUR `backend_mod_1_prework` repository that your just forked, click on `Clone or Download`

![clone down your copy](/images/fork_03.jpg)
![clone your copy](/images/be_step3.png)

#### 2. If you see `Clone with HTTPS` click on `Use SSH`

Expand All @@ -220,32 +236,21 @@ Resolving deltas: 100% (332/332), done.
$ cd backend_mod_1_prework
$ git status .
// If everything worked correctly, you should see:
On branch master
On branch main
nothing to commit, working tree clean
```

From here on out, all the work you do will be in your personal copy of this repository. Throughout Mod 0, we may call this your "prework repository" or "backend prework"... this refers to your forked copy of this `backend_mod_1_prework` repository that you have just now cloned to your device.

Here's _another_ video walk-through you may find helpful:
### IMPORTANT NOTE - PLEASE READ CAREFULLY
Do **NOT** work directly in the Github interface or use the `Edit` button to work directly from the Github version of your prework repository!

Instead, add your work in your text editor (Atom) on your local machine (laptop) - your prework involves using `git` to track changes and push your work up to Github. We will cover how to do this in Mod 0 AND we give explicit instructions on how to do this in each section of the prework!

[![Walkthrough Day 1 and Git stuff](/images/backend-prework-day-one-thumb.jpg)](https://youtu.be/HYAzk6L63ek "Video Walkthrough for Day 1 & Git Stuff")
## Get Started

Each day's `README` will walk you through the necessary steps to save your work.

To begin, open your terminal and `cd` into the `day_0` directory. Follow the instructions contained in the `README.md` file, and have fun experimenting!
To begin, open your terminal and `cd` into the `section1` directory. Follow the instructions contained in the `README.md` file, and have fun experimenting!

----------------------------------

# Extensions (optional, after pre-work completed)

You've finished your Mod 1 pre-work assignment!

But there's always more to learn!

If you're interested in challenging yourself _even more_ and getting a step ahead in your coding abilities before your first day, we recommend working on either:

- [Turing's ruby exercises repo](https://github.com/turingschool/ruby-exercises)
- [A back-end grad's advice and useful study resources](https://josh.works/turing-backend-prep-01-intro)
- [Credit Check](https://github.com/turingschool-examples/credit_check).

If you do Credit Check, follow the [same steps](#forking-the-module-1-prework-repository) as you did previously to fork and clone this repo on to your local computer.
71 changes: 0 additions & 71 deletions day_0/README.md

This file was deleted.

Loading