Engineering Basics and Foundation
Requirements
- Command line proficiency
- Git Proficiency
- General Engineering Onboarding
Command Line
It is important to learn the basics of the command line as it will improve your workflow and is necessary for many of your projects.
Learn the Command Line is a course offered by Codecademy that will teach you to use the command line to manipulate data and automate tasks. The estimated course time is 3 hours.
Reference for Shell Commands: Use this as a reference by searching a command-line to see the help text that matches each argument.
Standard Command Line Options: Small appendix describing command line option flags
GitHub Basics
GitHub is where developers can store their projects and work together with other developers on shared code. Read this GitHub for Beginners article to understand the importance of this collaborative programming tool.
GitHub Guides - Hello World: this guide will help you get started on your first git project.
Code School - Mastering GitHub: Code School offers a free video series on mastering GitHub with challenges included.
GitHub Guides - Mastering Markdown: Almost all of your projects should include a README.md which provides important information for others who might need to contribute to your project or use your code in their own project if it is open source. This article will teach you how to make beautiful and easy to read README's using markdown.
Below are some git commands that you can use in your terminal to get started with working in a Git repository.
git branch -D branch-name (deletes branch)
git branch -m new-name (change local branch name if not already pushed to remote)
git status (check status of changed files)
git diff (checks diff between branch and master)
git commit (add a commit message using your editor of choice)
git commit -m "your message" (add a commit message using terminal in one line)
git commit -m "
>
> Summary line
>
>- detailed line
>- other detailed line" (multiline bulleted commit message)
git checkout branch-name (changes to branch-name)
git checkout -b new-branch-name (creates a new branch)
git add . (adds all changed files)
git add /path/to/file/name (adds a specific file at a time)
git push origin branch-name (push up your commits to remote branch)
git config --global core.editor "atom -w" (sets your core editor for github messages and editing to atom)
It is often help to have aliases of these commands to streamline your workflow. For instance, you can add these to your .bashaliases file in your home directory.
# Git
alias ga="git add"
alias gch="git checkout"
alias gau="git add -u"
alias gs="git status"
alias gl="git log"
alias gc="git commit --verbose"
alias gca="git commit --verbose -a"
alias gd="git diff"
alias gdw="git diff -w"
alias gid="git icdiff"
alias gpom="git push origin master"
alias gbv="git branch -v"
alias gbm="git branch --merged"
alias gh="git stash"
alias ghp="git stash pop"
alias gu="git reset HEAD"
alias g5s="git sync"
alias gi="git update-index --assume-unchanged"
alias gpsu="git push --set-upstream origin"
Start Editing Code
It is important to actually write code when just starting out so you can quickly see the results of your work and begin to let your creativity shine.
Below are some online resources that provide built in code editors as well as output windows so you can write your code into one window and immediately see the output in an adjacent window. There are many of these tools out there and for the most part they are very similar. Here are a few to get you started.
The above resources work well when you are working on small snippets of code or testing out a new concept for a project, but if you want to work on a larger project with many files and dependencies, you'll need a better editor. Choosing a text editor or IDE can be a matter of preference, but you might try out these popular ones to get started until you find your favorite.
Atom: A hackable text editor for the 21st century! Atom can be easily customized to suit your needs and there are tons of open source packages that you can install easily with the built in package manager. In addition to customizing the functionality, the look and feel can be fully customized with HTML, CSS, and JavaScript. This is a good editor if you are just getting started.
Sublime Text 2/3: Sublime Text is similar to Atom though a little more sophisticated. Still easy to customize, you can find all the packages you might need in Package Control.
IntelliJ IDEA - the Java IDE: A full fledged IDE used by many of GoGuardian's data engineers.
Vim: Vim is a lightweight but can be extensively customized. It is a tool that should be in every engineers arsenal in addition or replacement to other text editors. Read through the tutorial (see link) to understand why it is so powerful. Also, if you want to customize the look and feel of Vim, check out this site Vim Awesome.