Skip to content

Instantly share code, notes, and snippets.

@gregoryjflaherty
Forked from ericweissman/session1_hw_mod0.md
Last active October 16, 2021 22:52
Show Gist options
  • Select an option

  • Save gregoryjflaherty/abd01a6f796db3f4c2afd62fb6559b58 to your computer and use it in GitHub Desktop.

Select an option

Save gregoryjflaherty/abd01a6f796db3f4c2afd62fb6559b58 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):
  • One major takeaway I got from this article is to not be afraid to use Google and that it is completely normal to use it frequently. There is no sense in suffering out of arrogance or the idea that you might be a poor programmer if you use Google. Recognizing that using Google is common among the industry gives me a sense of peace that there are resources out there to help and that memorizing everything is not a standard I should try to achieve.
  • One thing I want to implement in my future work is to utilize concise and clear Google searches. I will primarily focus on searching what I want to accomplish, what the problem is, and in what language I am trying to do it in. I will also remind myself that the more I utilize Google as support, the more confident and competent I will be in using the tool.
  • 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: Example: ("Syntax Error: unexpected end-of-input" Ruby). This tip helps Google find solutions to issues or problems when you have an particular message or phrase you are trying to deal with. An error is a perfect of example of when to use quotes as you want to find results for that exact error. If Google searches without quotations, your error message will not be searched for in it's entirety, as google will search for the words in any order. I can imagine quotes might be helpful for other searches as well, other then just errors. I can imagine a search such as "How to work from the command line" could uses quotations to prevent any mix up of the phrase.
  • Tip 3: Example (Python tools -reptile). This isn't the best example since Python is such a popular language. Any google search with the keyword "python" almost always brings back searches for the Python language, unless paired with a keyword that specifies otherwise. I used this example to highlight how you can use this tip though. This tip can be utilized for searches or keywords that might have dual meaning in the real world. Using the hyphen can eliminate any searches that are irrelevant to what you are looking for. Another way to use hyphen is to eliminate any resources or websites you are finding unhelpful. For example, if I want to use the search from Tip 2 and eliminate any answers from stackoverflow, I can simply search the following: ("Syntax Error: unexpected end-of-input" Ruby -stackoverflow). This eliminates any searches from stackoverflow which originally is the first option Google provided when searching for this error.
  • Tip 4: Example (ArgumentError site:ruby-lang.org). This tip is essentially the opposite of Tip 3. This tip allows you to search for something on a specific website. The example provided shows I want to look for the result via the Ruby documentation which can be found on ruby-lang.org. This search did not provide the best results but it is an example of looking for a keyword or phrase via a specific website.
  • Tip 9: Example ("what is an md file" OR "markdown language dialects explained"). This tip enables you essentially Google two phrases or keywords at once. It is recommended to use quotations with phrases so the words due to not get mixed up between the phrases. I used the following example because the first phrase could provide me more of a broad basic search where the second one could provide me more specific/in depth resources.
  • Tip 13: Example (Software development courses vs "I want to be a software engineer"). This tip discusses using keywords that will be found in actual websites versus uses laymens term that might alter your search query. This enables your search to provide more concise results and can help you get to what you are looking for in less time.
  • Tip 14: Example ("Atom package download" VS "what download packages does atom have"). This tip essentially suggests to eliminate any "fluff" words that are not completely necessary to find what you are looking for. When we stop talking to our computer like they are humans, we eliminate unnecessary words such as "what", "is", "are", etc that might dilute the Google search with unnecessary results.
  • Tip 17: Example("in browser ruby interpreter" Vs "Code Ruby without downloading"). This tip essentially says to alter specific words if you are having trouble finding what you are looking for. When you alter specific words, try to become more descriptive as you can. Words can have multiple meanings and various people search different terminology all the time which can alter the meaning of words as time goes on.

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 below

Screen Shot 2021-10-12 at 3 49 53 PM

Screen Shot 2021-10-12 at 3 50 09 PM

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:

COMMANDS: 123 pwd 124 ls 125 mkdir cool_project 126 ls 127 cd cool_project 128 touch README.md 129 ls 130 touch styles.css 131 ls 132 mkdir dank_codes 133 ls 134 cd dank_codes 135 touch data.rb 136 ls 137 touch app.js 138 ls 139 mkdir resources 140 ls 141 cd resources 142 touch deployment.md 143 ls 144 mkdir utils 145 ls 146 cd utils 147 touch utilities.md 148 ls 149 history

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 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 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!

  • I read carefully read ALL directions
  • I completed all parts of the exercises (not including Extensions) to the best of my ability
  • I used correct syntax, spacing and naming conventions
  • I followed ALL formatting instructions
  • I pushed myself out of my comfort zone and experimented/broke things to try to learn
  • I spent no longer than 20-30 mins Googling a specific problem before asking for help
  • 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:
    • I can explain what I am trying to do or accomplish
    • I can what I have tried so far and/or what resources I've tried online
    • I can describe specifically what I am stuck on
    • I provided screenshots and/or code examples to give context
      • If I provided short code examples, I used inline code formatting for single lines of code/error messages
      • If I provided larger blocks of code, I used a code 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
@mnhollandplum
Copy link
Copy Markdown

Hey Greg, great work on this assignment! Your responses to the exercises and your calendar both look good, no notes from me. Let me know if you have any questions!

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