Try   HackMD

Summer Internship Reading List (15 days or less)

  • Google every term you don't understand
  • English Wikipedia is OK for concepts
  • Avoid forums / stackoverflow for facts (unless post is made by developer) and always refer to official documentation
  • If you land on some "Overview" documentation section then you should read the whole chapter
  • Timebox yourself
    • Take two 5-minute breaks every hour
    • Decide what you're going to read in every 25-min interval at the start of the day
    • Reserve 1-2h of every day for the task
      • If you've been stuck on something more than 45mins, ask on slack
    • Don't take more time than listed here per subject
      • You'll have the whole summer to dig into the specifics
  • Use a browser extension like Pocket to save and manage your reading list
  • Save directories with bookmarks for all frequently visited pages (GitHub projects, docs)

0. Life with a Black Screen (1 day)

You will spend a lot of time in the terminal, possibly in vim through tmux through a complicated three-jump SSH tunnel.

Git and GitHub:

Your environment, editor and plugins

Shell

We like https://ohmyz.sh/ and its Git Plugin aliases.

Tmux / Screen

Editor

Pick one editor and learn it well.

VIM / Emacs
  • vimtutor / emacstutor / read advanced documentation & tutorials for your editor
  • Plugins: https://vimawesome.com/
    • I use Pathogen
    • NERDtree
    • ctrlp or fzf, or both
    • youcompleteme or the vim default (ctrl-P in insert mode)
    • vim-flake8

Explore using a Vim/Emacs plugin for your browser so you never have to use your mouse ever again.

Example: VIMIUM

VS Code

Get some plugins:

  • Remote-SSH
  • optional: vim keyboard bindings

Linux Commands

For searching through code (which may or may not be yours):

  • man grep / silver-searcher (man ag) / ripgrep (man rg)

Basic linux commands for management and debugging:

  • man find, man ssh, man scp, man rsync
  • man dmesg
  • man systemctl, man journalctl
  • man sysctl

Agile

Just sharing a couple of videos, to get an idea:
https://www.youtube.com/watch?v=Tj-lavaMkxU
https://www.youtube.com/watch?v=k_ndH7B-IS4


1. Python (4 days)

Use the python help() function in an interactive terminal and look at the in-code documentation
for every module / class / method that looks interesting to you.

1.1 stdlib (2 days)

First, follow https://docs.python.org/3/tutorial/index.html and make sure everything there is clear.

Then, read https://docs.python.org/3/library/index.html, chapters:

  • pdb
  • string
  • re
  • datetime
  • collections
  • copy
  • pprint
  • itertools
  • functools
  • pathlib
  • tempfile
  • configparser
  • os
  • logging
  • subprocess
  • json
  • contextlib
  • importlib
  • pdb

Also read on the ALL of these built-in types: https://docs.python.org/3/library/stdtypes.html#built-in-types

Task:

  • Follow https://automatetheboringstuff.com/2e/chapter17/
  • Implement the "Scheduled Web Comic Downloader" suggested at the end
  • Download only the new comics from https://xkcd.com/ every hour
  • Make sure to rate limit the downloads to 1 comic / second, or the site will eventually ban you
  • Post as xkcd.py to GitHub as a private repo
  • present code for review and answer comments

1.2 Other important python libs (2 days)

Install, follow tutorials and read documentation for these:

Task:

  • on xkcd.py: push new branch server starting from master and open pull request
  • use click to implement 2 subcommands: serve and scrape
  • scrape takes --from ID and --to ID optional arguments and filters comics to scrape to that interval (as implemented for the previous task)
  • serve starts a Flask HTTP server with:
    • the home page is a list of links to downloaded comics
    • every comic page shows the title (comic number as <h1>) and the image (<img>with the source also served from your server)
  • code review

2. Docker and Compose (1 day)

Install and follow through:

Read:

Task:

  • Make xkcd.py repo public
  • Push new branch docker starting from server and open a pull request pointing back to server
  • Add a Dockerfile that installs everything and by default runs the server on port 12345
  • Push it to Docker Hub
  • Set up Docker Hub to build and push the image, tracking the master branch
  • Make a push to the repo and check a new image is being built automagically
  • code review

3. Back-end: Django (4 days)

First, read this: https://12factor.net/

3.1 Django Tutorial (2 days)

https://www.djangoproject.com/start/

Follow this tutorial by only running Python code on Docker. Use the latest Python and install everything you need in the image by using requirements.txt or a Pipfile. Use Docker Compose to run a Postgres 12 database and use it in the tutorial.

Hint - on your machine mount the source code as a volume in the container, so you don't have to rebuild it every time.

Task:

  • create a private GitHub repo for the tutorial, called django-tutorial
  • set up Travis CI with Docker Compose and on each commit:
    • check your coding style with flake8
    • run the django-created unit test suite
    • set up the site using docker-compose up and use wget to check that the front page is up in 60 seconds
    • use the Travis trial period on your repo. If that's not possible, use a fresh GitHub account. If that still doesn't work, send them $5.
  • set up a GitHub Action to build and push the Docker image for your tutorial after all Travis tests are successful
  • code review

3.2 Django Docs (2 days)

Reset your home page to https://docs.djangoproject.com/en/3.0/

Also read these articles:

Task: inject a back door in your tutorial

  • if an anonymous user visits /hax then they become logged in as an Admin called hax
  • the hax admin has full user rights
  • the hax admin should be created if it does not exist
  • if the user is authenticated when visiting /hax then they are redirected to the home page (/) with no change
  • do all of the above on a branch hax that started from master. Same as before, open a pull request for a permanent URL to the latest diff.
  • code review

At last, read this again: https://12factor.net/. Everything should make more sense now.


4. Front-end: ReactJS (3 days)

Follow: https://reactjs.org/tutorial/tutorial.html

Read:

Also take a look at all these different projects and see what they do:

Notice the overlap and differing scope for these tools: one compiler (Babel), bundlers (Webpack or any of these), CSS-on-steroids type projects (less, sass, stylus, how React does it), state management (Redux, MobX),

Task:

  • Push new branch react started from hax, open a pull request pointing back to it.
  • Switch the Django Tutorial UI to ReactJS
  • Create Django Views for all data that was directly rendered in the old UI templates
  • Make sure the users are authenticated when accessing these Views
  • Hit those Views with GET requests from ReactJS to get the data on every page load
  • code review

5. HashiCorp products (3 days)

For each one of these do the track "Getting Started" and read all the linked documentation.

5.1 Vagrant (<1 day)

Follow "Getting Started": https://learn.hashicorp.com/vagrant/

Read:

Task:

  • make tutorial repo public on GitHub
  • make an account with DigitalOcean
  • send them $5 or profit from student credit
  • install this plugin to use Vagrant to provision DigitalOcean VMs
  • make it so vagrant up boots up your Django tutorial on Docker Compose on that DigitalOcean VM
  • add code in the tutorial repo
    • Don't publish your passwords or account keys! Use environment variables, maybe this plugin
    • use branch vagrant started from hax, open pull request pointing back to hax
  • code review

Consul, Vault (<1 day)

5.2 Consul

Follow "Getting Started": https://learn.hashicorp.com/consul/?track=getting-started#getting-started

Read:

5.3 Vault

Follow "Getting Started": https://learn.hashicorp.com/vault/

Read:

5.4 Nomad (1 day)

Follow "Getting Started": https://learn.hashicorp.com/nomad/

Read:

Task:

  • move your django tutorial from Docker Compose to Consul + Nomad
  • add Nomad templates and configuration to your Django Tutorial repository
  • download and run Nomad, Consul and the tutorial on the Travis CI. Same as before, test if the home page is up by using wget
  • use branch nomad started from hax, open pull request pointing back to hax
  • code review

5.5 Packer (<1 day)

Follow "Getting Started": https://learn.hashicorp.com/packer/

Read:

Task:

  • create a QEMU or VirtualBox image of Debian Stable with Docker, Docker Compose and your Django tutorial installed and ready to go when the VM boots
  • add process to the Django Tutorial repository, branch packer started from hax, pull request
  • code review

6. Liquid Investigations

Project Docs Home Page: https://github.com/liquidinvestigations/docs/wiki

Reading list:

With a working environment you can start solving "Good First Issues": https://github.com/search?q=org%3Aliquidinvestigations+label%3A"good+first+issue"+state%3Aopen&type=Issues