Engineering Basics and Foundation

Requirements

  1. Command line proficiency
  2. Git Proficiency
  3. 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.

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.

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.