- First, you'll need a local repo with some committed code.
- Next, you'll have to create a repo on GitHub.com, which can be done by clicking on the plus sign next to your name and following the ensuing prompts.
- When the GitHub repo is created, it's still just an empty vessel. It knows nothing about your local code, and, similarly, your local code knows nothing about GitHub. To let the two talk to one another, we need to copy the ssh clone url (which is used to verify that you are who you say you are) found on the right side of the repo page before proceeding to step 5.
- Now add a remote repo with the following command:
git remote add <repo_name> <branch_name> <ssh_clone_url>where<branch_name>is typically master and<repo_name>is whatever you choose, though it's common to call it origin. - You can check to see if the remote repo was added correctly by using
git remote -v - If the remote was added, use `git push <remot
| cd ~/Desktop | |
| mkdir marp | |
| cd marp | |
| git init | |
| touch darp.rb | |
| echo "I like turtles" >> darp.rb | |
| git add . | |
| git commit -m "example commit" | |
| hub create | |
| cd .. |
You're all adults with 20+ years of experience as learners, and you know your learning patterns best. Your first homework assignment is to examine the entirety of your learning history to identify your perceived strengths and weaknesses as a student, so you can make the most of your experience in WDI.
- gain self-awareness as a student
- get comfortable working in the command line
- get practical experience using git for version control
- gain muscle memory for making frequent, descriptive, present-tense commit messages as you progress
- get your first taste of diving into unfamiliar documentation for new languages and tools (in this case, Markdown and Mou)
One of the most helpful tools when first learning to code is articulating in plain English what a puzzling piece of code does for you. This is because the act of researching and expressing the code's purpose in your own words helps ingrain that purpose in your mind. That said, your homework tonight is to identify the commands you used today and in your prework and mindfully break them down.
- develop a strategy for breaking down and documenting unfamiliar code
- gain experience using Markdown, the open-source formatting language
- gain practical experience using Git for version control
- gain muscle memory for making frequent, sensible commits
| Shortcut | Command |
|---|---|
command + shift + p |
open command pallette |
command + left arrow |
move cursor to the beginning of current line |
command + right arrow |
move cursor to the end of current line |
command + up arrow |
move cursor to the top line of the file |
command + down arrow |
move cursor to the last line of the file |
command + multiple mouseclicks |
create multiple cursors within file |
option + mousedrag |
create multiple cursors along mousepath |
Git Workflow Ripest Tomatoes.
- Grab the SSH url at the ripest tomatoes github repo
- Enter
git clone <the_ssh_url>in yourdevdirectory cdinto the rails project and create a new branch branch withgit branch <yourname>- Switch to your newly created branch
git checkout <yourname> - Do work.
- When teammates tell you they've pushed working changes to master,
git checkout masterand pull from origin. git checkout <yourname>git rebase master
##WDI Project 1
The students' first projects are their opportunity to apply everything that they've learned in their first month of WDI. What they've covered:
- Version control with Git
- Programming Fundamentals with Ruby
- TDD/BDD with RSpec
- HTML/CSS
- Rails
The students work invididually on a project of their own design. We stress development process and code quality, and we have implementation guidelines for the students to follow, all of which you can find below.
| Explain what BDD/TDD is and its benefits. Compare it to "cowboy coding. | |
| Explain what 'yield' does when called in a method | |
| Draw an ERD for the following app using proper notation. A user can have zero or many blog posts, and each blog post can have zero or many comments. | |
| Explain what a database is and why you would use one as opposed to other persistent storage mechanisms | |
| Explain what a foreign key is and why you would use one | |
| Give examples of use cases for Ruby's `.each`, `.select`, and `.map` methods. | |
| Explain what a database 'constraint' is | |
| What is a document outline? | |
| Compare and contrast arrays and hashes and when you would use each | |
| Explain what "auto-incrementing primary key" means for a database table |
| require 'pg' | |
| db_conn = PG.connect(dbname: 'shopping_db') | |
| result = db_conn.exec(string_of_sql) | |
| entry_as_hash = result[0] # yield a hash of the first row. | |