Software Engineering Journey

Intro

I'm officially back on this journey and along the way I want to help others on their journey too. I've been giving people mock interviews on Discord and gained a new perspective. I'm sharing my notes on what I think is most important. It's personalized and based on my studies and feedback. I'm still debating whether or not I should include a Mathematics portion but if you think so, let me know.

There are a few key things I want to emphasize and put down for posterity:

  • Solve real world problems, it'll benefit us all and is one of the most valuable skill to have
  • ... You don't have to reinvent the wheels. You really don't. ...
  • Focus on big-O and big-θ first
  • In regards to the discussion on quantum computers and optimization in supercomputers: A good algorithm is always better than a supercomputer. Unless it's a qc or it's your supercomputer.

Tech Questions

  1. ...

Behavioral Questions

  1. "What's your tech stack?"

Study

This is not a complete list but these are the award winners (aka what I found to pop up often enough off the top of my head):

Lists

  • Arrays
    • Stores data sequentially
    • There are linear arrays, dynamic arrays (vectors in C++), multi-dimensional arrays
  • Linked Lists
    • Stores data in a node, connected to other nodes
    • There are doubly linked lists, circular linked lists
  • Hash Tables or Hash Maps
    • Uses hash function to store data and it is not typically in order
    • A hash table is typically called by a key and returns a unique value
    • One challenge of designing a hash table is avoiding collision; one way to avoid collision is to have an array for the said possible collision
  • Stack
    • LIFO (Last In First Out)
    • Think of it as a stack of dishes
    • An example of a stack data structure is the space that the hardware RAM (random access memory) uses
  • Queue
    • FIFO (First In First Out)
    • Think of it as waiting in line in an Apple store
    • There are priority queues
  • Trees
    • Typically a nonlinear data structure that contains a root and subtrees which are children with parent nodes
    • There are all kinds of trees, binary trees

Numbers

  • Karatsuba
  • Division
  • Strassen
  • Fast Multiplication

Search

  • Linear
  • Selection
  • Binary

Graph

  • DFS
  • BFS
  • Dijkstra's
  • Prim's
  • Bellman-Ford
  • DAG SP
  • Floyd-Warshall

Sorting

  • Bubble
  • Linear
  • Insertion
  • Merge

Misc

  • Fibonacci
  • FFT
  • RSA

Concepts

  • Memoization
  • Topological Sort
  • Recursion vs Iteration
  • Divide and Conquer
  • Linear Programming
  • Dynamic Programming
  • Brute Force
  • Greedy Algorithms
  • Loop Invariant
  • Correctness
  • "Can we do better?"
  • Existence
  • Uniqueness
  • Group Theory
  • Conjecture
  • Lemma
  • Philosophy
  • Theorem

From here on, it's just personal (or class) notes.

C++

  1. Poked around. Turns out regex is poorly implemented in a lot of C++ compilers. Heads up if you submit your code to competition judges.

Python

  • Dictionaries
  • File I/O
  • Python Functions
  • Lists & Tuples
  • Modules & Imports
  • Regex
  • Classes
  • Control Flow
  • Exception Handling
  • List Comprehensions
  • Strings
  • Threads
  1. Easter egg: Type "import antigravity" in the Python interpreter.
  2. Call module.__doc__, rather `help(module)` for docstring.
  3. Kivy is no fun. :(

I wrote this a long time ago: "Do this for all new Mac install: `sudo easy_install pip`"

Don't do this. Instead, for new installs, `brew install python` and `brew install python3.` Speaking of which, use virtual environment!!

Also, to fix your current installation, you need to find out if your pip installed packages were with --user or sudo:

            import site
            site.getsitepackages()
            site.getusersitepackages()
          

Run this in py2 and py3 to get their respective pip installation locations. So from now on, either use --user or virtual environment. Never use sudo! Shame on pip developers for not making --user the default! As a matter of fact:

            cd ~/myProject/
            python3 -m venv env
            ls env
            env/bin/pip3 install [desired module]
          

Or an alternative for the last line:

. env/bin/activate

To test that you are using the "right" python:

which python

The first time you do this, you should see it in /usr/bin/python or something like that. Now:

            source env/bin/activate
            which python
          

Now this should show up in myProject.

Use diff to compare current and future Python setup:

            pip freeze > ~/Desktop/installed.txt
            pip -r ~/Desktop/installed.txt
          

Tuple packing and unpacking is magical.

Swift / Objective-C

When doing `pod install` and you get "Abort trap 6," do this:

            sudo gem uninstall cocoapods
            sudo gem install cocoapods
            pod install
          

Editor

For Atom, in case this [site](http://www.marinamele.com/install-and-configure-atom-editor-for-python) goes down, run the following:

              apm install linter
              pip install flake8 --user
              pip install flake8-docstrings --user
              apm install linter-flake8
          

I don't use it anymore since it keeps getting in my way.