# 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: - Read from https://git-scm.com/docs - *everything on the left column* - Guides - And from GitHub: - https://guides.github.com/introduction/flow/ - https://guides.github.com/features/mastering-markdown/ ### Your environment, editor and plugins #### Shell We like https://ohmyz.sh/ and its Git Plugin aliases. #### Tmux / Screen - https://danielmiessler.com/study/tmux/ #### 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: - celery - jinja - whitenoise - https://3.python-requests.org/ - http://flask.pocoo.org/ - https://click.palletsprojects.com/en/7.x/ - https://docs.pipenv.org/en/latest/ 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: - https://docs.docker.com/get-started/ - https://docs.docker.com/compose/gettingstarted/ Read: - https://docs.docker.com/engine/reference/builder/ - https://docs.docker.com/engine/reference/commandline/cli/ - https://docs.docker.com/engine/reference/commandline/run/ - https://docs.docker.com/engine/reference/commandline/build/ - https://docs.docker.com/engine/reference/commandline/exec/ - https://docs.docker.com/engine/reference/commandline/kill/ - https://docs.docker.com/engine/reference/commandline/push/ - https://docs.docker.com/compose/environment-variables/ - https://docs.docker.com/compose/startup-order/ - https://docs.docker.com/compose/networking/ - https://docs.docker.com/docker-hub/repos/ 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](https://hub.docker.com/_/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](https://docs.travis-ci.com/user/travis-ci-for-private/) 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: - https://docs.djangoproject.com/en/3.0/ref/django-admin/ - https://docs.djangoproject.com/en/3.0/ref/databases/ -- we only use PostgreSQL - https://docs.djangoproject.com/en/3.0/topics/db/models/ - https://docs.djangoproject.com/en/3.0/ref/migration-operations/ - https://docs.djangoproject.com/en/3.0/ref/settings/ - https://docs.djangoproject.com/en/3.0/ref/signals/ - https://docs.djangoproject.com/en/3.0/ref/contrib/auth/ - https://docs.djangoproject.com/en/3.0/ref/contrib/admin/ 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: - Main Concepts: all pages starting from https://reactjs.org/docs/hello-world.html - https://reactjs.org/docs/web-components.html - https://reactjs.org/docs/jsx-in-depth.html - https://reactjs.org/docs/strict-mode.html - https://reactjs.org/docs/refs-and-the-dom.html - https://reactjs.org/docs/integrating-with-other-libraries.html - https://reactjs.org/docs/forwarding-refs.html Also take a look at all these different projects and see what they do: - the ones listed in [this guide](https://brainhub.eu/blog/react-libraries/) - https://redux.js.org/ - https://react-redux.js.org/ - https://nextjs.org/ - https://reactrouter.com/ - https://babeljs.io/docs/en/ - https://webpack.js.org/ - https://sass-lang.com/ - http://lesscss.org/ - https://stylus-lang.com/ Notice the overlap and differing scope for these tools: one compiler (Babel), bundlers (Webpack or [any of these](https://dev.to/talentlessguy/2020-javascript-bundlers-review-3ce)), CSS-on-steroids type projects (less, sass, stylus, [how React does it](https://reactjs.org/docs/faq-styling.html)), 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: - https://www.vagrantup.com/docs/vagrantfile - https://www.vagrantup.com/docs/vagrantfile/tips - https://www.vagrantup.com/docs/boxes - https://www.vagrantup.com/docs/cli/up - https://www.vagrantup.com/docs/cli/destroy.html - shared folders: rsync, nfs - Task: - make tutorial repo **public** on GitHub - make an account with DigitalOcean - send them $5 or profit from student credit - install [this plugin](https://github.com/devopsgroup-io/vagrant-digitalocean) 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](https://github.com/gosuri/vagrant-env) - 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: - https://www.consul.io/docs/glossary - https://www.consul.io/docs/commands - https://www.consul.io/docs/agent - https://www.consul.io/docs/agent/dns - https://www.consul.io/docs/agent/options - https://www.consul.io/docs/agent/kv - https://www.consul.io/docs/faq #### 5.3 Vault Follow "Getting Started": https://learn.hashicorp.com/vault/ Read: - https://www.vaultproject.io/docs/what-is-vault - https://www.vaultproject.io/docs/use-cases - https://www.vaultproject.io/docs/concepts/seal - https://www.vaultproject.io/docs/secrets/consul - https://www.vaultproject.io/docs/configuration ### 5.4 Nomad (1 day) Follow "Getting Started": https://learn.hashicorp.com/nomad/ Read: - https://www.nomadproject.io/docs/internals/scheduling - https://www.nomadproject.io/docs/configuration - https://www.nomadproject.io/docs/job-specification - https://www.nomadproject.io/docs/job-specification/job - https://www.nomadproject.io/docs/job-specification/group - https://www.nomadproject.io/docs/job-specification/task - https://www.nomadproject.io/docs/job-specification/service - https://www.nomadproject.io/docs/job-specification/env - https://www.nomadproject.io/docs/job-specification/template - https://www.nomadproject.io/docs/schedulers - https://www.nomadproject.io/docs/drivers/docker - https://www.nomadproject.io/docs/drivers/qemu - https://www.nomadproject.io/docs/runtime/environment - https://www.nomadproject.io/api-docs -- Jobs, Nodes, Deployments, Allocations, Status, System 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: - https://www.packer.io/docs/templates/user-variables - https://www.packer.io/docs/terminology - https://www.packer.io/docs/commands/build - https://www.packer.io/docs/builders/vagrant - https://www.packer.io/docs/builders/qemu - https://www.packer.io/docs/communicators/ssh 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: - architecture https://github.com/liquidinvestigations/docs/wiki/Architecture - contributing https://github.com/liquidinvestigations/docs/wiki/Contributing - installation https://github.com/liquidinvestigations/docs/wiki/Installation - maintenance https://github.com/liquidinvestigations/docs/wiki/Maintenance With a working environment you can start solving "Good First Issues": https://github.com/search?q=org%3Aliquidinvestigations+label%3A%22good+first+issue%22+state%3Aopen&type=Issues