Skip to content

Instantly share code, notes, and snippets.

@tonydhsu
Forked from ericweissman/session1_hw_mod0.md
Last active May 30, 2021 01:12
Show Gist options
  • Save tonydhsu/05f015b117a69b9e1a10e002563caa7d to your computer and use it in GitHub Desktop.
Save tonydhsu/05f015b117a69b9e1a10e002563caa7d to your computer and use it in GitHub Desktop.

Session 1 HW

CAREFULLY READ ALL THE INSTRUCTIONS BEFORE STARTING THESE EXERCISES!

To start this assignment:

  1. Click the button in the upper right-hand corner that says Fork. This is now your copy of the document.
  2. Click the Edit button when you're ready to start adding your answers.
  3. To save your work, click the green button in the bottom right-hand corner. You can always come back and re-edit your gist.

Readings + Responses

  • Your key take-aways OR how you're going to implement specific points (minimum 2):
  • No matter what level programmer google is used a lot from begginners to professionals
  • Don't feel bad for googling a lot. you can't memorize everything
  • Briefly describe (in your own words) each of the tips below AND provide an example of a search that captures the sentiment of the tip
  • Tip 2: Use quotes to get better results. "shiba sweaters" instead of shiba sweaters
  • Tip 3: Use hyphen to exclude words. Fruit -watermelon will return all fruit except watermelon
  • Tip 4: Use colon to search specific site. Iphone :apple.com will search only in apple.com
  • Tip 9: use multiple words to get better search results. "Dog breeds" or "shiba inu"
  • Tip 13: Use words that sound professional. Instead of I'm lost use current location
  • Tip 14: Don't use too many filler words. Instead of I'm looking for the closest gas station use nearest gas station
  • Tip 17: Use descriptive words. instead of jeeps use red jeep wrangler

Turing Prep

1. Creating a Mod 0 Calendar (20 mins)

Before you create your Mod 0 calendar, we recommend going back to the Session 1 Lesson to review some tips from our most successful students re: calendaring and time management.

Create a calendar using a tool of your choice (Google Calendar, iCal, etc.) for the remainder of Mod 0 until your due date for the Mod 1 Prework. Your calendar should include the following:

  • Each class session
  • Relevant due dates: HW, Assessment submission, Mod 1 Prework, Cohort Orientation
  • When do you plan to work on HW?
  • When do you plan to work on the Mod 1 Prework (about 40 hours total)?
  • When do you plan to review material covered in class?
  • When do you plan to study for the assessment?
  • When do you plan to make time for self-care?
  • What other commitments do you have throughout the course of Mod 0?

As outlined in class, using different colors in your calendar for parts of your life (Turing, wellness, commitments, etc.) can make it easier to parse through your competing priorities. Here is a suggestion you could use for your Mod 0 Calendar...

  • Mod 0 classes
  • Outside prep (HW, Prework, studying, practice, assessment)
  • Work/prior commitments
  • Wellness

Take some time to build out your calendar for Mod 0 and add a few photos/screenshots below. You can take a screenshot on your Mac using CMD + SHIFT + 4 and drag around the area of your screen you want to capture!

The first answer in this StackOverflow post gives a great shortcut for easily adding images to your gists!

Add screenshots of your calendar belowcalendar

If you are struggling to find time in your calendar to complete all of the M1 Prework please reach out to Eric Weissman (@ericweissman) on Slack to setup some time to discuss an alternate gameplan for completion!

Exercises

1. Creating Files and Directories (10 min)

Need help? You can go back to the files/directories portion of the lesson here.

Use commands in your terminal to create the directories and files structured exactly how they appear in the image below.

directories

When you're done, type history to see your commands. Copy and paste the commands that were used to create the directory and files:

paste your commands here
``` 102  mkdir cool_project
  103  cd cool_project
  104  touch README.MD styles.css
  105  ls
  106  mkdir dank_codes
  107  cd dank_codes
  108  touch data.rb app.js
  109  mkdir resources
  110  ls
  111  cd resources
  112  touch deployment.md
  113  mkdir utils
  114  cd utils
  115  touch utilities.md
tony@TONYs-MacBook-Pro utils % 


### 2. Modify your Zsh Prompt (10 min)
- Make sure that your shell is set to zsh by running the following command: `$ chsh -s /bin/zsh`. Remember to omit the `$`! Note that macOS Catalina and later operating systems already use zsh as the default shell. 
- [] Watch [this video](https://drive.google.com/file/d/1a4YAPJcrtecUQWxwGM5uRfn3Ue6-kHAW/view?usp=sharing) and follow each step to modify your own ```zshrc``` configuration file. As mentioned in the video, you will need this snippet below:

Load version control information

autoload -Uz vcs_info precmd() { vcs_info }

Format the vcs_info_msg_0_ variable

zstyle ':vcs_info:git:*' formats '%b'

Determine if current working directory is a git repository

git_branch_color() { if current_git_status=$(git status 2> /dev/null); then parse_git_dirty else echo "" fi }

Change branch color if working tree is clean

parse_git_dirty() { if current_git_status=$(git status | grep 'Changes to be committed:|Untracked files:|modified:|deleted:' 2> /dev/null); then echo "%F{red}" else echo "%F{green}" fi }

Set up the prompt (with git branch name)

setopt PROMPT_SUBST PROMPT='%F{white}%d $(git_branch_color)${vcs_info_msg_0_} %f$'

After you have saved this file, be sure to quit and restart your terminal.

We will be working more with `git` in the next session and will be able to see some of these changes take effect!

### 4. Practice Keyboard Shortcuts (10 mins)
#### Mac Environment
Use these shortcuts to quickly move around within your environment.
- `command + spacebar` - Open a program or search for a file
- `command + tab + tab ...` - Cycle through open programs
- `command + ~` - Switch between separate open windows of the same program
- `command + q` - Quit an open program

#### Rectangle
Start by making sure Rectangle is running with `command + spacebar` then type `rectangle` and then `return`. You should see a window icon at the top right of your menu bar. 
Click the icon to see a dropdown of your shortcuts. 
Click preferences to customize them.
- `command + option + enter` - Full Screen Current Window
- `command + option + left arrow` - Left Half Current Window
- `command + option + right arrow` - Right Half Current Window
- `command + option + up arrow` - Top Half Current Window
- `command + option + bottom arrow` - Bottom Half Current Window

#### Chrome Browser
Start by opening Chrome with the shortcut (`command + space`) you already learned.
- `command + d` - Bookmark current page
- `command + t` - Open new tab
- `command + n` - Open new window
- `command + shift + n` - Open new window in Incognito mode
- `command + l` - Highlight current URL
- `control + tab` - Cycle through tabs to the right
- `control + shift + tab` - Cycle through tabs to the left
- `command + shift + r` - Reload page
- `command + w` - Close tab

This [video](https://www.youtube.com/watch?v=I3PBZBX-Fig&list=PL1Y67f0xPzdMFq2S1bK7E7veT_BbK-zjt&index=2) from Technical Programs Instructor Amy Holt gives some great screen management tips.

# Self Assess

Using the rubric below, assess how you did with these exercises. These are the same metrics your instructors will use to determine if you are prepared for Mod 1!

- [x ] I read carefully read ALL directions
- [x ] I completed all parts of the exercises (not including Extensions) to the best of my ability
- [x ] I used correct syntax, spacing and naming conventions
- [x ] I followed ALL formatting instructions
- [x ] I pushed myself out of my comfort zone and experimented/broke things to try to learn
- [x ] I spent no longer than 20-30 mins Googling a specific problem before asking for help
- [x ] I went back to the lesson to search for clarification before asking for help

### Stuck? Having Issues?
Are you stuck on something? Here is the **BEST** way to ask for help:

- Start or reply in the thread with the problem you are facing. Be sure to follow the guidelines for asking questions below:
  - [x ] I can explain what I am trying to do or accomplish
  - [ x] I can what I have tried so far and/or what resources I've tried online
  - [x ] I can describe specifically what I am stuck on
  - [x ] I provided screenshots and/or code examples to give context
    - [x ] If I provided short code examples, I used `inline code formatting` for single lines of code/error messages
    - [x ] If I provided larger blocks of code, I used a [code snippet](https://slack.com/help/articles/204145658-Create-a-snippet) in the correct format (such as `.js` or `.rb`)
 - Usually, your classmates will be able to answer your question or point you in the right direction very quickly! If not, an instructor will reply within 24-48 hours
@mschae16
Copy link

@TonyDH505 - Nice work on this assignment, Tony. Keep up the great work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment