# Job Search Advice

## YOUR RESUME <a href="#your-resume" id="your-resume"></a>

Your resume is your personal summary sheet. Your resume is the thing that gets your foot in the door. So, there's a few things you should do (and not do) to make it as awesome as you are.

#### Make your name **BIG.** <a href="#make-your-name-big" id="make-your-name-big"></a>

Your name has to stand out from everything else, because you want it to be remembered. Making it the biggest thing on the page is the easiest thing you can do to make that possible. I've seen soooo many resumes where the name is at the top, but it's just bolded and centered and they expect that to be enough. It's not.

#### Remove the objective. <a href="#remove-the-objective" id="remove-the-objective"></a>

Nobody looks at the objective. Nobody. I personally spoke to a bunch of recruiters from various companies and they all said that they never look at them. Use that space to talk about projects you've done, activities you've done, etc.

#### Keep it to a single page. <a href="#keep-it-to-a-single-page" id="keep-it-to-a-single-page"></a>

Recruiters are looking for a short summary of you. They're reading several resumes a day, and if they see something longer than they typically read, they could pass over yours for something more concise! If you'd like to say more, put a link to a personal website or portfolio for someone to find it. A resume is a summary, not a tome.

#### Remove irrelevant information. <a href="#remove-irrelevant-information" id="remove-irrelevant-information"></a>

I know that lifeguarding in high school was a good gig that helped you gain people skills and attention to detail. But you're in tech. That doesn't matter as much to tech companies. Sorry, buddy. I still think you're great with people.\
When you're a first semester freshman, it's okay to have old high school stuff on there, just because it's less likely that you have other things to put on your resume. But as soon as you have a college GPA to work with, a club or two, and some volunteer experiences to replace that, do it.

#### Don't make it a scavenger hunt. <a href="#dont-make-it-a-scavenger-hunt" id="dont-make-it-a-scavenger-hunt"></a>

When an application reviewer (engineer, recruiter, or otherwise) is looking over your resume, don't make it difficult for them to understand who you are and what you know.

For example, if you have online profiles like GitHub, LinkedIn, Twitter, or even your own personal website, put it on your resume. Don't make them have to search long and hard for you online if they want to know more!

If you decide to put relevant coursework on your resume, **please**, don't just put course numbers. Nobody knows what that means. And nobody is going to go to your university's website to find out exactly what CS229 is. Put down the course titles instead!

And finally, put down your graduation date. So many students I've seen don't put it on there because they are hiding the fact that they're a freshman, or they're "technically a junior if you count the credits." That doesn't matter. Trust me. Just put down your graduation date so that the company knows how much experience you have, and how soon they can potentially pull you in for full-time.

#### Include only certain personal information. <a href="#include-only-certain-personal-information" id="include-only-certain-personal-information"></a>

Companies aren't allowed to ask about your religion, marital status, or race/ethnicity, so you shouldn't include that.

In terms of contact information: you don't need your mailing address. That is a thing of the past. Just like my youth. Tech companies email, and **maybe** call. That's all you need!\
Some great things that you might also want to put on there are your personal website (if you have one, which you should), your GitHub profile (if you have one, which you should), and your LinkedIn (if you have one, which you should).

## CV SAMPLE <a href="#cv-sample" id="cv-sample"></a>

Your cover letter is your written sales pitch. You've got a resume that summarizes everything. Now you have to write out a more complete, professional description of you and what you can offer a given company. Here's a sample cover letter to get you started:

> Dear \_\_\_\_\_\_\_\_\_,
>
> I hope your day is going well! My name is \_\_\_\_\_\_\_\_\_, and I'm a \_\_\_\_\_\_\_\_\_ at \_\_\_\_\_\_\_\_\_. I am very interested in working for \_\_\_\_\_\_\_\_\_ next \_\_\_\_\_\_\_\_\_. Your commitment to \_\_\_\_\_\_\_\_\_ and \_\_\_\_\_\_\_\_\_ that I saw on the website inspired me! The products you build and the values you stand for make \_\_\_\_\_\_\_\_\_ seem like an ideal workplace for me. A little about me, I \[insert relevant work experience, extracurriculars, and projects here]. I think these experiences would make me a great candidate for you.\
> Please let me know if there's anything else you need from me. I look forward to hearing from you! I can be reached at \_\_\_\_\_\_\_\_\_ and \_\_\_\_\_\_\_\_\_\
> Best regards,
>
> ***

Now, remember, this is just a sample. You can write a cover letter in any format you'd like. But, you should be sure to include the following:

* **Who** - Who you are. Easy enough.
* **Where** - Where you're coming from.
* **Why** - Why you're interested in this company, and show that you researched them.
* **What** - What you can bring to the table.
* **When** - When you're available to start, and when they can contact you.
* **How** - How they can reach you.

## YOUR ATTITUDE <a href="#your-attitude" id="your-attitude"></a>

When you're internship/job hunting, it's very easy to feel down if you don't hear back from companies, an interview goes poorly, or you start comparing yourself to people. It's a tough field we're going into.

I want to emphasize something: **You're brilliant.** You're in this field for a reason. When your grades aren't awesome or someone gets something that you wanted, don't feel down on yourself. So many opportunities will come your way if you just keep working hard and refining your skills.

Mark Twain once said, "Comparison is the death of joy." When you start to compare your skills to others, it's hard to not feel as good about your own, or to get a little too competitive about your work. Work hard and don't let others get you down. It's remarkable how significantly that can improve both your work and your interviewing experience!

When you're talking to companies and recruiters at career fairs and hackathons and over the phone, be confident, not arrogant. Be grateful for the opportunity they're giving you, and smile! A great attitude will take you VERY far.

## YOUR SKILLS <a href="#your-skills" id="your-skills"></a>

Obviously, your skills are what a company is buying from you when they hire you. So, honing in those skills and presenting them in an effective way is *probably* the most important thing in getting a gig.

### Building Them <a href="#building-them" id="building-them"></a>

Chances are, if you've had a data structures and/or algorithms class, you're already going to do pretty well in the technical interviews. That is, if you can recall the information you learned.

Here's a checklist of things that you should probably be prepared to know in a technical interview:

* Data types
* Basic Bitwise Operations
* String Operations
* Arrays
* Linked Lists
  * Singly Linked
  * Doubly Linked
  * Circular Linked
* Queues
* Stacks
* Heaps
* Trees
  * Binary Trees
  * Binary Search Trees
  * Tries
  * Self Balancing Trees
* Traversing Trees
  * Breadth First Search - BFS
  * Depth First Search - DFS
  * Preorder, Inorder, Postorder
* Graphs
  * Dijkstra's Algorithm / A\* Search
* Hash Maps
  * Handling Collisions
* Sorting algorithms
  * Insertion
  * Selection
  * Merge
  * Quick
* Time Complexities

This guide isn't for teaching you these skills. But there are several guides, problem sets, and practice systems out there that can help.

**General Guides**

* [Sorting Algorithms](http://www.sorting-algorithms.com)

{% embed url="<https://codesandbox.io/s/different-sorting-ecogc>" %}

* [Big-O Cheat Sheet](http://bigocheatsheet.com)
* [Data Structures and Algorithms Overview](http://www.dsalgo.com/2013/02/index.php.html?m=1)
* [Algorithm Implementations](http://algorithm.zone)
* [Top 10 Algorithms for coding interviews](http://www.programcreek.com/2012/11/top-10-algorithms-for-coding-interview/)

**Problem Sets**

* [Data Structures Questions](http://www.geeksforgeeks.org/data-structures/)
* [FitCoding](http://www.fitcoding.com)
* [Google CodeJam Practice Questions](https://code.google.com/codejam/contests.html)

**Online Judging Systems**

* [LeetCode Online Judge](https://oj.leetcode.com/problemset/algorithms/)
* [HackerRank Online Judge](https://www.hackerrank.com)
* [Project Euler](https://projecteuler.net)

**Mock Interviews**

* [Pramp](https://www.pramp.com) - free
* [Careercup](http://www.careercup.com/interview) - paid
* [Gainlo](http://www.gainlo.co) - paid
* [Impact Interview](http://www.impactinterview.com/software-engineering-interview-coaching/) - paid

Here's some books that might also be useful.

* [Algorithms, 4th edition, by Robert Sedgewick and Kevin Wayne](http://www.amazon.com/Algorithms-4th-Edition-Robert-Sedgewick/dp/032157351X)
* [Introduction to Algorithms, 3rd Edition, by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein (also referred as CLRS)](http://www.amazon.com/Introduction-Algorithms-Edition-Thomas-Cormen/dp/0262033844)
* [Think Complexity, by Allen B. Downey](http://greenteapress.com/complexity/thinkcomplexity.pdf)
* [Problems on Algorithms, 2nd edition, by Ian Parberry and William Gasarch](http://larc.unt.edu/ian/books/free/poa.pdf)
* [Data Structures and Algorithms in Java](http://rineshpk.weebly.com/uploads/1/8/2/0/1820991/data_structures_and_algorithms_in_javatqw_darksiderg.pdf)
* [Cracking the Coding Interview, 6th edition, by Gayle Laakmann McDowell](http://www.amazon.com/Cracking-Coding-Interview-6th-Programming/dp/0984782850/ref=sr_1_1?ie=UTF8\&qid=1443719471\&sr=8-1\&keywords=coding+interview)

Typically, for an internship or your first job, questions won't get much more specific unless you're applying for a specific role. For example, if I wanted to be a mobile intern, I might be asked iOS/Android/Windows Phone specific questions, or if I wanted to be a web intern, I might be asked HTML/CSS/JavaScript questions, or if I wanted to be a backend intern, I might be asked about Django or Node or Ruby on Rails. That definitely depends on the company, and what you're both looking for.

Make sure you're able to implement and use the above data structures without the assistance of an IDE. Typically, onsite technical interviews involve coding on paper or a whiteboard, and phone/video interviews usually involve some kind of collaborative text editor. Yes, that means you won't have access to auto-complete, auto-compiling, or the internet to check for errors. So be ready for that!

### Selling Them <a href="#selling-them" id="selling-them"></a>

When you're actively emailing and speaking with recruiters, they're going to ask you a lot of questions that are just checkboxes for what they're looking for in terms of skills.

If you've written anything in a language before, **put it on your resume**. A lot of companies have parsers that look for specific things that, again, will put a tick on those checkboxes before putting you through to the next round of review. Now, if you've only ever done "Hello, world!" in Python, don't say that you're a Python ninja or whatever. You don't want to be thrown into an interview that will only hurt your self-confidence. Speaking from experience. Trust me.

When a recruiter or engineer is asking you about a certain project you've done, or how you've used a particular language, be as specific as possible. Tell them **exactly** what you did on that particular project (or internship or what have you). Tell them how much you contributed, what languages you used, how long was the duration of development for that project, what was the outcome of the project, etc. etc.

For example, don't say, "I'm the webmaster for a club website. Next question." Okay, Dwight Schrute. Go back to your beet farm. Instead, say something more like this: "I developed and currently maintain the website for my university's computer science club. I built it from the ground up with HTML, CSS, JavaScript, and jQuery on the front-end. It's a static site, so a backend wasn't needed. The website's main function is to promote the club and give members crucial updates about meetings and events, and I update it regularly via a Python script I wrote." Oh my, you enchanting software engineer, you. Let me hire you.

When you're talking to companies about specific things you've done, make sure they know:

* **What?** - What? - What did you make? What does it do? What impact has it made? What was the hardest part? What could you have done better?
* **Why?** - Why did you make it? Was it for a hackathon, a school project, an open source contribution, or something else?
* **How?** - With which technologies did you make this? Did you use a specific API? What parts of it did you work on?
* **When?** - Did you do this recently or are you still living off of when you peaked in 10th grade?
* **Who?** - Did you work on this with anyone? Who did what? Who is this for?

***

## *MY INTERESTS / RESOURCES*: <a href="#my-interests-resources" id="my-interests-resources"></a>

* [Ansible](file:///C:/Users/bryan/AppData/Local/Temp/mume2021326-7948-1m32dnj.jgo6l.html#ansible)
* [Awesome Lists](file:///C:/Users/bryan/AppData/Local/Temp/mume2021326-7948-1m32dnj.jgo6l.html#awesome-lists)
* [CI/CD](file:///C:/Users/bryan/AppData/Local/Temp/mume2021326-7948-1m32dnj.jgo6l.html#continious-integration)
* [Data Science](file:///C:/Users/bryan/AppData/Local/Temp/mume2021326-7948-1m32dnj.jgo6l.html#data-science)
* [Docker](file:///C:/Users/bryan/AppData/Local/Temp/mume2021326-7948-1m32dnj.jgo6l.html#docker)
* [DynamoDB](file:///C:/Users/bryan/AppData/Local/Temp/mume2021326-7948-1m32dnj.jgo6l.html#dynamodb)
* [Elasticsearch](file:///C:/Users/bryan/AppData/Local/Temp/mume2021326-7948-1m32dnj.jgo6l.html#elasticsearch)
* [Environment Setups](file:///C:/Users/bryan/AppData/Local/Temp/mume2021326-7948-1m32dnj.jgo6l.html#environment-setups)
* [Epic Github Repos](file:///C:/Users/bryan/AppData/Local/Temp/mume2021326-7948-1m32dnj.jgo6l.html#epic-github-repos)
* [Golang](file:///C:/Users/bryan/AppData/Local/Temp/mume2021326-7948-1m32dnj.jgo6l.html#golang)
* [Grafana](file:///C:/Users/bryan/AppData/Local/Temp/mume2021326-7948-1m32dnj.jgo6l.html#grafana)
* [Great Blogs](file:///C:/Users/bryan/AppData/Local/Temp/mume2021326-7948-1m32dnj.jgo6l.html#great-blogs)
* [Knowledge Base](file:///C:/Users/bryan/AppData/Local/Temp/mume2021326-7948-1m32dnj.jgo6l.html#knowledge-base)
* [Kubernetes](file:///C:/Users/bryan/AppData/Local/Temp/mume2021326-7948-1m32dnj.jgo6l.html#kubernetes)
  * [Kubernetes Storage](file:///C:/Users/bryan/AppData/Local/Temp/mume2021326-7948-1m32dnj.jgo6l.html#kubernetes-storage)
* [Machine Learning](file:///C:/Users/bryan/AppData/Local/Temp/mume2021326-7948-1m32dnj.jgo6l.html#machine-learning)
* [Monitoring](file:///C:/Users/bryan/AppData/Local/Temp/mume2021326-7948-1m32dnj.jgo6l.html#monitoring)
* [MongoDB](file:///C:/Users/bryan/AppData/Local/Temp/mume2021326-7948-1m32dnj.jgo6l.html#mongodb)
* [Programming](file:///C:/Users/bryan/AppData/Local/Temp/mume2021326-7948-1m32dnj.jgo6l.html#programming)
* [Queues](file:///C:/Users/bryan/AppData/Local/Temp/mume2021326-7948-1m32dnj.jgo6l.html#queues)
* [Self Hosting](file:///C:/Users/bryan/AppData/Local/Temp/mume2021326-7948-1m32dnj.jgo6l.html#self-hosting)
  * [Email Server Setups](file:///C:/Users/bryan/AppData/Local/Temp/mume2021326-7948-1m32dnj.jgo6l.html#email-server-setups)
  * [Mailscanner Server Setups](file:///C:/Users/bryan/AppData/Local/Temp/mume2021326-7948-1m32dnj.jgo6l.html#mailscanner-server-setups)
* [Serverless](file:///C:/Users/bryan/AppData/Local/Temp/mume2021326-7948-1m32dnj.jgo6l.html#serverless)
* [Sysadmin References](file:///C:/Users/bryan/AppData/Local/Temp/mume2021326-7948-1m32dnj.jgo6l.html#sysadmin-references)
* [VPN](file:///C:/Users/bryan/AppData/Local/Temp/mume2021326-7948-1m32dnj.jgo6l.html#vpn)
* [Web Frameworks](file:///C:/Users/bryan/AppData/Local/Temp/mume2021326-7948-1m32dnj.jgo6l.html#web-frameworks)

### Ansible <a href="#ansible_356" id="ansible_356"></a>

* [Kubernetes on LXC with Ansible](https://github.com/zimmertr/Bootstrap-Kubernetes-with-LXC)

### Awesome Lists <a href="#awesome_lists_359" id="awesome_lists_359"></a>

* [Awesome ChatOps](https://github.com/exAspArk/awesome-chatops)
* [Awesome Scalability](https://github.com/binhnguyennus/awesome-scalability)
* [Awesome Drone](https://github.com/drone/awesome-drone)

### Epic Github Repos <a href="#epic_github_repos_364" id="epic_github_repos_364"></a>

* [mlabouardy](https://github.com/mlabouardy?tab=repositories)

### Authentication <a href="#authentication_367" id="authentication_367"></a>

* [Nginx ES and Kibana Proxy with LDAP](https://mapr.com/blog/how-secure-elasticsearch-and-kibana/)

### Data Science <a href="#data_science_370" id="data_science_370"></a>

* [bulutyazilim - datascience awesome list](https://github.com/bulutyazilim/awesome-datascience)

### Grafana <a href="#grafana_373" id="grafana_373"></a>

* [Grafana Dashboards @mlabouardy](https://github.com/mlabouardy/grafana-dashboards)

### Docker <a href="#docker_376" id="docker_376"></a>

\*\*Deploy Stacks to your Swarm: :whale: \*\*:heart:

Logging:

* [shazChaudhry Swarm GELF Stack](https://github.com/shazChaudhry/docker-elastic)

Metrics:

* [StefanProdan - Prometheus, Grafana, cAdvisor, Node Exporter and Alert Manager](https://github.com/stefanprodan/swarmprom)
* [Mlabouardy - Telegraf, InfluxDB, Chronograf, Kapacitor & Slack](https://github.com/mlabouardy/swarm-tick)

**Awesome Docker Repos**

* [Jess's Dockerfiles](https://github.com/jessfraz/dockerfiles)
* [Firecat53's Dockerfiles](https://github.com/firecat53/dockerfiles)

**RaspberryPi ARM Images:**

* [arm32v6/alpine:edge](https://hub.docker.com/r/arm32v6/alpine/)
* [arm32v6/golang:alpine](https://hub.docker.com/r/arm32v6/golang/)
* [arm32v6/haproxy:alpine](https://hub.docker.com/r/arm32v6/haproxy/)
* [arm32v6/node:alpine](https://hub.docker.com/r/arm32v6/node/)
* [arm32v6/openjdk:alpine](https://hub.docker.com/r/arm32v6/openjdk/)
* [arm32v6/postgres:alpine](https://hub.docker.com/r/arm32v6/postgres/)
* [arm32v6/python:2.7-alpine3.6](https://hub.docker.com/r/arm32v6/python/)
* [arm32v6/python:3.6-alpine3.6](https://hub.docker.com/r/arm32v6/python/)
* [arm32v6/rabbitmq:alpine](https://hub.docker.com/r/arm32v6/rabbitmq/)
* [arm32v6/redis:alpine](https://hub.docker.com/r/arm32v6/redis/)
* [arm32v6/ruby:alpine3.6](https://hub.docker.com/r/arm32v6/ruby/)
* [arm32v6/tomcat:alpine](https://hub.docker.com/r/arm32v6/tomcat/)
* [arm32v6/traefik:latest](https://hub.docker.com/r/arm32v6/traefik/)
* [arm32v7/debian:lates](https://hub.docker.com/r/arm32v7/debian/)
* [hypriot/rpi-redis](https://hub.docker.com/r/hypriot/rpi-redis/)
* [jixer/rpi-mongo](https://github.com/jixer/rpi-mongo)
* [alexellis/armhf](https://github.com/alexellis/docker-arm/tree/master/images/armhf)
* [zeiot: rpi-prometheus stack](https://github.com/zeiot)
* [larmog](https://hub.docker.com/u/larmog/)
* [Rpi MongoDB](https://github.com/andresvidal/rpi3-mongodb3)
* [ARM Swarm](https://github.com/armswarm)

**Docker Image Repositories**

* [Docker Hub: arm32v6](https://hub.docker.com/u/arm32v6/)
* [Docker Hub: armv7](https://hub.docker.com/u/armv7/)
* [Github: Luvres Armhf](https://github.com/luvres/armhf)
* [Apache/PHP7 on Alpine](https://github.com/ulsmith/alpine-apache-php7)
* [Tomcat on Alpine](https://github.com/docker-library/tomcat/blob/master/8.0/jre8-alpine/Dockerfile)
* [Nginx (jwilder)](https://github.com/jwilder/nginx-proxy)
* [Alpine Images (smebberson)](https://github.com/smebberson/docker-alpine)
* [SameerSbn](https://hub.docker.com/u/sameersbn/)
* [Linuxserver.io](https://hub.docker.com/u/linuxserver/)
* [Apache-PHP5](https://hub.docker.com/r/nimmis/alpine-apache-php5/)
* [Apache-PHP-Email](https://github.com/harobed/docker-php-ssmtp)

**Docker-Awesome-Lists**

* [Java Docker Services](https://github.com/AdamBien/docklands)
* [shouse Docker Awesome List](https://gist.github.com/shouse/a14c44e97a2cd2a1f030)

**Docker Blogs:**

* [Whoami used in Traefik Docs](https://hub.docker.com/r/emilevauge/whoami/)
* [Sqlite with Docker](https://github.com/spartakode/my-docker-repos/blob/master/sqlite3/Dockerfile)
* [Rails with Postgres and Redis](https://github.com/mookjp/rails-docker-example)
* [Async Tasks with Flask and Redis](https://testdriven.io/asynchronous-tasks-with-flask-and-redis-queue)
* [Flask and Postgres](https://github.com/davidmukiibi/docker-flask)
* [Elastic Beats on RaspberryPi](http://ict.renevdmark.nl/2016/07/05/elastic-beats-on-raspberry-pi/)

**Docker Storage**

* [Rancher Convoy](https://github.com/rancher/convoy)
* [Flocker](https://flocker.readthedocs.io/en/latest/flocker-features/storage-backends.html#supported-backends)
* [EMC ScaleIO](http://node.mu/2017/06/30/scaleio-on-ubuntu-xenial/)
* [RexRay Ceph with Ansible](https://github.com/lucj/swarm-rexray-ceph)
* [ContainX](http://containx.io)

**OpenFaas:**

* [FaaS Releases](https://github.com/openfaas/faas/releases)
* [FaaS Workshop](https://github.com/openfaas/workshop)

**Prometheus / Grafana on Swarm:**

* [StefanProdan - SwarmProm](https://github.com/stefanprodan/swarmprom)
* [Monitoring with Prometheus](https://medium.com/@soumyadipde/monitoring-in-docker-stacks-its-that-easy-with-prometheus-5d71c1042443)
* [UschtWill - Prometheus Grafana Elastalert](https://github.com/uschtwill/docker_monitoring_logging_alerting)
* [Chmod-Org Promethus with Blackbox](https://github.com/chmod666org/docker-swarm-prometheus)
* [Finestructure: Prometheus Tutorial](https://finestructure.co/blog/2016/5/16/monitoring-with-prometheus-grafana-docker-part-1)

### Logging / Kibana / Beats <a href="#logging__kibana__beats_460" id="logging__kibana__beats_460"></a>

#### Libraries <a href="#libraries_462" id="libraries_462"></a>

* [Loguru](https://github.com/Delgan/loguru) | [Flask Example with Loguru](https://gist.github.com/M0r13n/0b8c62c603fdbc98361062bd9ebe8153)

#### Frameworks <a href="#frameworks_465" id="frameworks_465"></a>

* [shazChaudhry Swarm GELF Stack](https://github.com/shazChaudhry/docker-elastic)

### Continious Integration: <a href="#continious_integration_469" id="continious_integration_469"></a>

**Circle-CI**

* [PHP with Circle-CI](https://circleci.com/docs/1.0/language-php/)

**Concourse**

* [Setup Concourse Environment with Docker](https://concourse.ci/docker-repository.html)
* [Getting Started with Concourse and Docker](https://blog.anynines.com/getting-started-with-concourse-ci-and-docker/)
* [Concourse Gated Pipelines](https://github.com/pivotalservices/concourse-pipeline-samples/tree/master/concourse-pipeline-patterns/gated-pipelines)
* [Concourse Boilerplate](https://github.com/EugenMayer/concourseci-server-boilerplate)

**Jenkins**

* [Modess - PHP with Jenkins](https://modess.io/jenkins-php/)
* [CI/CD Nodejs Tutorial with Jenkins](https://code.tutsplus.com/tutorials/setting-up-continuous-integration-continuous-deployment-with-jenkins--cms-21511)
* [CI/CD Nodejs Tutorial with Jenkins @medium](https://medium.com/@mosheezderman/how-to-set-up-ci-cd-pipeline-for-a-node-js-app-with-jenkins-c51581cc783c)
* [Epic CICD workflow with Jenkins, Gitlab, Sonar, Nexus](https://github.com/shazChaudhry/docker-swarm-mode)

**SwarmCi**

* [SwarmCI](https://github.com/ghostsquad/swarmci)

**Travis-CI**

* [Getting Started with Travis-CI (Original Docs)](https://docs.travis-ci.com/user/getting-started/)
* [Getting Started with Travis-CI (dwyl - nodejs)](https://github.com/dwyl/learn-travis)
* [Blog Site with Travis-CI (Python)](https://matthewmoisen.com/blog/how-to-set-up-travis-ci-with-github-for-a-python-project/)
* [Build Tests with Python on Travis-CI](https://github.com/softwaresaved/build_and_test_examples/blob/master/travis/HelloWorld.md)
* [Moving app with Travis-CI](https://www.raywenderlich.com/109418/travis-ci-tutorial)

**LambCI**

* [LambCI](https://github.com/lambci/lambci)

### DynamoDB <a href="#dynamodb_499" id="dynamodb_499"></a>

**DynamoDB Docs**

* [AWS DynamoDB: SQL to NoSQL](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/SQLtoNoSQL.ReadData.Query.html)

**DynamoDB Best Practices**

* [Choosing the Right Partition Key](https://aws.amazon.com/blogs/database/choosing-the-right-dynamodb-partition-key/)
* [10 Things you should know](https://cloudacademy.com/blog/amazon-dynamodb-ten-things/)

**DynamoDB General Info**

* [Understanding DynamoDB](https://medium.com/@yaofei/understand-dynamodb-b278f718ddb8)

### Elasticsearch <a href="#elasticsearch_514" id="elasticsearch_514"></a>

**Elasticsearch Documentation**

* [General Recommendation](https://www.elastic.co/guide/en/elasticsearch/reference/current/general-recommendations.html)
* [How Many Shards in my Cluster](https://www.elastic.co/blog/how-many-shards-should-i-have-in-my-elasticsearch-cluster)
* [Managing Time-Based Indices Efficiently](https://www.elastic.co/blog/managing-time-based-indices-efficiently)
* [Elasticsearch Best Practices (Bonsai.io)](https://bonsai.io/2016/01/11/ideal-elasticsearch-cluster)
* [AWS ES - Scaling up my Domain](https://aws.amazon.com/premiumsupport/knowledge-center/elasticsearch-scale-up/)

**Elasticsearch Cheetsheets:**

* [My ES Cheatsheet](https://gist.github.com/ruanbekker/e8a09604b14f37e8d2f743a87b930f93)

**Elasticsearch Blogs**

* [Maximize Elasticsearch Indexing Performance](https://qbox.io/blog/maximize-guide-elasticsearch-indexing-performance-part-1)
* [Autoritative Guide to ES Performance Tuning](https://qbox.io/blog/authoritative-guide-elasticsearch-performance-tuning-part-1)
* [Full text Search Queries](https://opendistro.github.io/for-elasticsearch-docs/docs/elasticsearch/full-text/)
* [Query Elasticsearch](https://okfnlabs.org/blog/2013/07/01/elasticsearch-query-tutorial.html)

**Elasticsearch Tools**

* [Export Data from ES to ES](https://github.com/mallocator/Elasticsearch-Exporter)

### Environment Setups: <a href="#environment_setups_535" id="environment_setups_535"></a>

* [Golang](https://medium.com/aishik/install-golang-the-right-way-4743fee9255f)

### Knowledge Base <a href="#knowledge_base_538" id="knowledge_base_538"></a>

### KB HTTPS <a href="#kb_https_540" id="kb_https_540"></a>

* [How does HTTPS work (Miguel Grinberg)](https://blog.miguelgrinberg.com/post/running-your-flask-application-over-https)

### Kubernetes <a href="#kubernetes_543" id="kubernetes_543"></a>

* [Awesome Kubernetes](https://github.com/ramitsurana/awesome-kubernetes/blob/master/README.md)
* [Kubernetes Cheatsheet](https://cheatsheet.dennyzhang.com/cheatsheet-kubernetes-a4)
* [Getting Started: Python application on Kubernetes](https://kubernetes.io/blog/2019/07/23/get-started-with-kubernetes-using-python/)
* [Kubernetes Deployments: The Ultimate Guide](https://semaphoreci.com/blog/kubernetes-deployment)
* [Prometheus Monitoring Stack with Kubernetes on DO](https://www.digitalocean.com/community/tutorials/how-to-set-up-a-prometheus-grafana-and-alertmanager-monitoring-stack-on-digitalocean-kubernetes)
* [Traefik as an Ingress Controller on Minikube](https://tech.evaneos.com/traefik-as-an-ingress-controller-on-minikube-with-kustomize-helm-a3b2f44a5c2a)
* [Traefik Ingress with Kubernetes](https://itnext.io/traefik-cluster-as-ingress-controller-for-kubernetes-99fa6c34402)
* [Manual Connect your Kubernetes from Outside](https://medium.com/faun/manually-connect-to-your-kubernetes-cluster-from-the-outside-d852346a7f0a)
* [HTTPS Letsencrypt on k3s](https://pascalw.me/blog/2019/07/02/k3s-https-letsencrypt.html)
* [Kubernetes: Nodeport vs Loadbalancer](https://medium.com/google-cloud/kubernetes-nodeport-vs-loadbalancer-vs-ingress-when-should-i-use-what-922f010849e0)
* [Prometheus Monitoring Pipeline on Kubernetes](https://medium.com/kubernetes-tutorials/simple-management-of-prometheus-monitoring-pipeline-with-the-prometheus-operator-b445da0e0d1a)
* [Building a Kubernetes CI/CD Pipeline with Rancher](https://rancher.com/blog/2018/2018-08-07-cicd-pipeline-k8s-autodevops-rancher-and-gitlab/)
* [Building a Kubernetes CI/CD Pipeline with AWS](https://medium.com/swlh/universal-cicd-pipeline-on-aws-and-k8s-7b4129fac5d4)
* [Gitea and Drone CI/CD on k3s](https://itnext.io/explore-gitea-drone-ci-cd-on-k3s-4a9e99f8b938)
* [Serverless with Kubernetes using OpenFaaS and Linkerd2](https://github.com/openfaas-incubator/openfaas-linkerd2/blob/master/README.md)
* [Managing Kubernetes with kubectl](https://rancher.com/blog/2019/how-to-manage-kubernetes-with-kubectl/)
* [OpenFaas Workshop on k3s](https://gist.github.com/alexellis/a6ee5f094f86987a0dc508442220c52a)
* [Kubernetes Hands-On Lab with collabnix](http://collabnix.com/kubernetes-hands-on-lab-4-deploy-application-stack-using-helm-on-play-with-kubernetes-platform/)
* [Create ReadWrite Persistent Volumes on Kubernetes](https://medium.com/asl19-developers/create-readwritemany-persistentvolumeclaims-on-your-kubernetes-cluster-3a8db51f98e3)
* [Kubernetes Clusters with k3s and multipass](https://medium.com/@mattiaperi/kubernetes-cluster-with-k3s-and-multipass-7532361affa3)

#### Kubernetes Storage <a href="#kubernetes_storage_566" id="kubernetes_storage_566"></a>

* [Kadalu](https://kadalu.io/docs/quick-start)
* [Rancher: Longhorn Storage](https://rancher.com/docs/k3s/latest/en/storage/)

### Golang <a href="#golang_571" id="golang_571"></a>

* [Generate Fake Random Data with Golang](https://github.com/brianvoe/gofakeit)
* [Ultimate Golang Study Guide](https://github.com/hoanhan101/ultimate-go)

### Great Blogs <a href="#great_blogs_576" id="great_blogs_576"></a>

* [Exratione.com](https://www.exratione.com/blog/)
* [Joelabrahamsson.com](http://joelabrahamsson.com/elasticsearch-101/)
* [Benjamin Cane](http://bencane.com)
* [Michael Herman](http://mherman.org)
* [Charles Leifer](http://charlesleifer.com)
* [Labouardy](https://www.blog.labouardy.com)
* [Mark's Tech Blog](https://tech.marksblogg.com)

### Linuxkit: <a href="#linuxkit_586" id="linuxkit_586"></a>

* [Getting Started with Linuxkit](https://medium.com/aishik/getting-started-with-linuxkit-and-moby-project-ff7121c4e321)

### Logging Stacks <a href="#logging_stacks_589" id="logging_stacks_589"></a>

* [shazChaudhry Swarm GELF Stack](https://github.com/shazChaudhry/docker-elastic)

### Machine Learning: <a href="#machine_learning_592" id="machine_learning_592"></a>

* [PracticalAI](https://github.com/GokuMohandas/practicalAI/blob/master/README.md)

### Metrics: <a href="#metrics_595" id="metrics_595"></a>

* [AppMetrics with Flask](https://github.com/avalente/appmetrics)
* [Scales: Metrics for Python](https://github.com/Cue/scales)
* [Graphite: Python Flask Metrics](https://pypi.org/project/graphite-pymetrics/)

### MongoDB: <a href="#mongodb_600" id="mongodb_600"></a>

* [Setup MongoDB Cluster](https://linode.com/docs/databases/mongodb/build-database-clusters-with-mongodb/)
* [MongoDB Scripts](https://github.com/AD7six/mongo-scripts)
* [MongoDB Monitoring Tools](https://docs.mongodb.com/v2.4/administration/monitoring/#self-hosted-monitoring-tools)
* [Roles with MongoDB](https://studio3t.com/knowledge-base/articles/mongodb-users-roles-explained-part-1/)
* [Queries: Guru99](https://www.guru99.com/mongodb-tutorials.html)
* [Queries: Exploratory](https://blog.exploratory.io/an-introduction-to-mongodb-query-for-beginners-bd463319aa4c)
* [Queries: Tutorialspoint](https://www.tutorialspoint.com/mongodb/mongodb_create_database.htm)
* [Queries: MongoDB Cheatsheet](https://gist.github.com/rbekker87/5b4cd9ef36b6ae092a6260ab9e621a43)

### Monitoring <a href="#monitoring_610" id="monitoring_610"></a>

* [Docker Swarm Monitoring Stack: Telegraf, InfluxDB, Chronograf, Kapacitor](https://hackernoon.com/monitor-swarm-cluster-with-tick-stack-slack-3aaa6483d44a) [github source](https://github.com/mlabouardy/swarm-tick)
* [Docker Swarm Monitoring Stack: Prometheus, Grafana, cAdvisor, Node Exporter](https://stefanprodan.com/2017/docker-swarm-instrumentation-with-prometheus/) [github source](https://github.com/stefanprodan/swarmprom)
* [Prometheus Grafana Docker](https://finestructure.co/blog/2016/5/16/monitoring-with-prometheus-grafana-docker-part-1)
* [Prometheus Blog Seros](https://pierrevincent.github.io/2017/12/prometheus-blog-series-part-1-metrics-and-labels/)
* [Memcached Monitoring](https://blog.serverdensity.com/monitor-memcached/)
* [Nagios with Nagios Graph](https://raymii.org/s/tutorials/Nagios_Core_4_Installation_on_Ubuntu_12.04.html)
* [Slack Alerts with Prometheus](https://medium.com/quiq-blog/better-slack-alerts-from-prometheus-49125c8c672b)
* [Local Prometheus Stack](https://github.com/deanwilson/docker-compose-prometheus)
* [Docker Swarm Promethus Setup #1](https://github.com/chmod666org/docker-swarm-prometheus)
  * [Docker Swarm Prometheus Setup #1: Blog](https://chmod666.org/2017/08/monitoring-a-docker-swarm-cluster-with-prometheus)
* [Docker Swarm Promethus Setup #2](https://homelab.business/docker-swarm-monitoring-part-01/)
* [Docker Swarm Promethus Setup #3 (Blackbox)](https://medium.com/the-telegraph-engineering/how-prometheus-and-the-blackbox-exporter-makes-monitoring-microservice-endpoints-easy-and-free-of-a986078912ee)
* [Uptime (fzaninotto)](https://github.com/fzaninotto/uptime)

### Monitoring and Alerting <a href="#monitoring_and_alerting_625" id="monitoring_and_alerting_625"></a>

* [Cabot (Lightweight Pagerduty)](https://github.com/arachnys/cabot)
* [Nagios](https://www.nagios.org)

### Monitoring as Statuspages <a href="#monitoring_as_statuspages_629" id="monitoring_as_statuspages_629"></a>

* [Statuspage (darkpixel](https://github.com/darkpixel/statuspage)
* [Cachet](https://github.com/cachethq/Cachet)

### Programming <a href="#programming_633" id="programming_633"></a>

**Golang:**

* [Golang Tutorials](http://golangtutorials.blogspot.co.za/2011/05/table-of-contents.html)
* [Golang Wiki](https://github.com/golang/go/wiki)

**Java:**

* [Java Spring Boot Examples](https://wiki.ruanbekker.com/index.php/Java_Spring_Boot_App_Examples)

**Python**

**Ruby:**

* [Learn Ruby: Learn Ruby the Hard Way](https://learnrubythehardway.org/book)
* [Learn Ruby: Ruby for Beginners](http://ruby-for-beginners.rubymonstas.org/index.html)
* [Learn Ruby: Launch School](https://launchschool.com/books/ruby/read/loops_iterators#forloops)
* [Learn Ruby: Arrays](https://gistpages.com/posts/ruby_arrays_insert_append_length_index_remove)
* [Install Ruby Environment on Mac](https://gorails.com/setup/osx/10.12-sierra)

**Ruby on Rails:**

* [Tutorial: Ruby On Rails](https://www.railstutorial.org/book/beginning)
* [Tutorial: ROR on Docker](http://codingnudge.com/2017/03/17/tutorial-how-to-run-ruby-on-rails-on-docker-part-1/)

### Queues <a href="#queues_655" id="queues_655"></a>

* [Alpine SQS](https://github.com/roribio/alpine-sqs)
* [Kombu: Messaging library for Python](https://github.com/celery/kombu)
* [Python Job Queues with Redis](https://python-rq.org)

### Sysadmin References: <a href="#sysadmin_references_661" id="sysadmin_references_661"></a>

* [Sysadmin Command References](https://gist.github.com/ruanbekker/3118ed23c25451132becacd3b974db08)
* [Linux Performance Observability Tools](https://medium.com/@chrishantha/linux-performance-observability-tools-19ae2328f87f)
* [Troubleshooting High IO Wait](http://bencane.com/2012/08/06/troubleshooting-high-io-wait-in-linux/)
* [IO Monitoring in Linux](https://blog.pythian.com/basic-io-monitoring-on-linux/)
* [IOStat and VMStat for Performance Monitoring](http://xiayubin.com/blog/2014/01/29/how-i-use-iostat-and-vmstat-for-performance-analysis/)
* [Debugging Heavy Load](https://www.tummy.com/articles/isolating-heavy-load/)

### Self Hosting <a href="#self_hosting_669" id="self_hosting_669"></a>

**Email Server Setups**

* [Extratione: Postfix Dovecot MySQL Virtual Users Postfixadmin](https://www.exratione.com/2016/05/a-mailserver-on-ubuntu-16-04-postfix-dovecot-mysql/)
* [Extratione: Postfix Dovecot MySQL Virtual Users Postfixadmin (Ubuntu 18)](https://www.exratione.com/2019/02/a-mailserver-on-ubuntu-18-04-postfix-dovecot-mysql/)
* [Linuxsize: Postfix Dovecot MySQL Virtual Users Postfixadmin](https://linuxize.com/post/set-up-an-email-server-with-postfixadmin/)
* [Howtoforge: Postfix, MySQL, Dovecto, Dspam](https://www.howtoforge.com/postfix_mysql_dovecot_dspam_clamav_postgrey_rbl_debian_etch)
* [Linuxsize: VirtualUsers, MySQL, Postfix, Dovecot](https://linuxize.com/post/set-up-an-email-server-with-postfixadmin/)

**Mailscanner Server Setups**

* [Spamassassin with Debian 8](https://syslint.com/blog/tutorial/how-to-install-and-configure-spamassassin-with-postfix-in-debian-8/)

**Financial**

* [SelfHosted Firefly](https://github.com/firefly-iii/firefly-iii)

**Self Hosting Frameworks:**

* [Sandstorm](https://sandstorm.io)

### Serverless <a href="#serverless_689" id="serverless_689"></a>

* [Serverless Zappa](https://github.com/Miserlou/Zappa)
* [Serverless Contact Form](https://github.com/faizanbashir/python-ses-dynamodb-contactform)
* [Serverless Authentication on AWS (danilop)](https://github.com/danilop/LambdAuth)

### VPN: <a href="#vpn_695" id="vpn_695"></a>

**VPN-Howto:**

* [Ubuntu OpenVPN Script](https://www.cyberciti.biz/faq/howto-setup-openvpn-server-on-ubuntu-linux-14-04-or-16-04-lts/)
* [Ubuntu IPSec Script](https://github.com/hwdsl2/setup-ipsec-vpn)
* [DO - Setup OpenVPN on Ubuntu](https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-ubuntu-16-04)
* [Elasticshosts - IPSec VPN](https://www.elastichosts.com/blog/linux-l2tpipsec-vpn-client/)
* [PPTP/IPSec/OpenVPN Auto Install](https://github.com/bedefaced/vpn-install)

### Website Templates <a href="#website_templates_703" id="website_templates_703"></a>

**Resume Templates**

* [johnmarcampbell resume-site](https://github.com/johnmarcampbell/resume-site)

### Web Frameworks <a href="#web_frameworks_708" id="web_frameworks_708"></a>

**Python Flask:**

* [Python Flask Upload Example](https://gist.github.com/dAnjou/2874714)
* [Awesome Flask - humiaozuzu](https://github.com/humiaozuzu/awesome-flask#awesome-flask)
* [Awesome Flask Apps - Greyli](https://github.com/greyli?tab=repositories)
* [Flask over HTTPS (MG)](https://blog.miguelgrinberg.com/post/running-your-flask-application-over-https)
* [Flask Advanced Patterns](https://speakerdeck.com/mitsuhiko/advanced-flask-patterns-1)
* [Flask MVC Boilerplate](https://github.com/tojrobinson/flask-mvc)

### Programming Language Resources <a href="#programming-language-resources" id="programming-language-resources"></a>

* C
  * [ANSI C Cheat Sheet](https://github.com/jwasham/coding-interview-university/blob/master/extras/cheat%20sheets/C%20Reference%20Card%20\(ANSI\)%202.2.pdf)
  * K\&R C book (ANSI C)
  * [Make, Clang (video)](https://www.youtube.com/watch?v=U3zCxnj2w8M)
  * GDB:
    * [Harvard CS50 - GDB (video)](https://www.youtube.com/watch?v=USPvePv1uzE)
    * [Harvard CS50 - GDB (video)](https://www.youtube.com/watch?v=y5JmQItfFck)
    * [Valgrind (video)](https://www.youtube.com/watch?v=fvTsFjDuag8)
  * [Let us C](https://books.google.co.in/books/about/Let_Us_C.html?id=7HrjAAAACAAJ)
* C++
  * [C++ Cheat Sheet](https://github.com/jwasham/coding-interview-university/blob/master/extras/cheat%20sheets/Cpp_reference.pdf)
  * [STL Cheat Sheet](https://github.com/jwasham/coding-interview-university/blob/master/extras/cheat%20sheets/STL%20Quick%20Reference%201.29.pdf)
  * [basics](https://www.tutorialspoint.com/cplusplus/cpp_basic_syntax.htm)
  * [pointers](https://www.cprogramming.com/tutorial/lesson6.html)
  * [class and object](https://www.cprogramming.com/tutorial/lesson12.html)
  * [functions](https://www.cprogramming.com/tutorial/lesson4.html)
  * [references](https://www.geeksforgeeks.org/references-in-c/)
  * [templates](https://www.cprogramming.com/tutorial/templates.html)
  * [compilation](https://www.youtube.com/watch?v=ZTu0kf-7h08)
  * [scope & linkage](https://www.learncpp.com/cpp-tutorial/scope-duration-and-linkage-summary/)
  * [namespaces](https://www.tutorialspoint.com/cplusplus/cpp_namespaces.htm)
  * [OOP](https://www.geeksforgeeks.org/object-oriented-programming-in-cpp/)
  * [STL](https://www.hackerearth.com/practice/notes/standard-template-library/)
  * [functors](http://www.cprogramming.com/tutorial/functors-function-objects-in-c++.html)
  * [C++ at Google (video)](https://www.youtube.com/watch?v=NOCElcMcFik)
  * [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html)
    * Google uses clang-format (there is a command line "style" argument: -style=google)
  * [Efficiency with Algorithms, Performance with Data Structures (video)](https://youtu.be/fHNmRkzxHWs)
  * [Review of C++ concepts (video)](https://www.youtube.com/watch?v=Rub-JsjMhWY)
  * [Let us C++](https://books.google.co.in/books/about/Let_Us_C++.html?id=6HrjAAAACAAJ)
  * [C++ Primer](https://books.google.co.in/books/about/C++_Primer.html?id=J1HMLyxqJfgC\&redir_esc=y)
* Python
  * [Python Cheat Sheet](https://github.com/jwasham/coding-interview-university/blob/master/extras/cheat%20sheets/python-cheat-sheet-v1.pdf)
  * [Python in One Video](https://www.youtube.com/watch?v=N4mEzFDjqtA)
  * [Series on 3.4 (video)](https://www.youtube.com/playlist?list=PL6gx4Cwl9DGAcbMi1sH6oAMk4JHw91mC_)
  * [Statistics for Hackers (video)](https://www.youtube.com/watch?v=Iq9DzN6mvYA)
  * [Faster Python (video)](https://www.youtube.com/watch?v=JDSGVvMwNM8)
  * [CPython Walk (video)](https://www.youtube.com/watch?v=LhadeL7_EIU\&list=PLzV58Zm8FuBL6OAv1Yu6AwXZrnsFbbR0S\&index=6)
  * [10 Tips for Pythonic Code (video)](https://www.youtube.com/watch?v=_O23jIXsshs)
  * [Beyond PEP 8 -- Best practices for beautiful intelligible code (video)](https://www.youtube.com/watch?v=wf-BqAjZb8M)
  * [Automate the Boring Stuff with Python](https://automatetheboringstuff.com)
  * [Coding Interview Essentials](https://github.com/ajinkyal121/coding-interview-university/blob/master/extras/cheat%20sheets/Coding%20Interview%20Python%20Language%20Essentials.pdf)
  * [Data Structures And Algorithms in Python](https://www.youtube.com/watch?v=kQDxmjfkIKY)
* Java
  * [Stanford CS106A - Programming Methodology (video)](https://see.stanford.edu/Course/CS106A)
  * [Software Construction In Java (video)](https://www.edx.org/course/software-construction-java-mitx-6-005-1x)
  * [Introduction To Programming In Java](http://introcs.cs.princeton.edu/java/home/)
  * [Algorithms 4th Ed - Algorithm Book In Java](http://algs4.cs.princeton.edu/home/)
  * [Effective Java 3rd Edition](https://www.amazon.com/Effective-Java-Joshua-Bloch-ebook/dp/B078H61SCH)
  * [Data Structures Easy to Advanced Course - Full Tutorial from a Google Engineer](https://www.youtube.com/watch?v=RBSGKlAvoiM\&t=1744s)
* Go
  * [The Go programming Language](https://golang.org)
  * [The Go programming Language (book)](http://www.gopl.io)
  * [A Tour of Go](https://tour.golang.org)
  * [Effective Go](https://golang.org/doc/effective_go.html)
  * [Go Wiki](https://golang.org/wiki)
  * [Go at Google: Language Design in the Service of Software Engineering](https://talks.golang.org/2012/splash.article)
  * [Go Proverbs](http://go-proverbs.github.io)
  * [Go Proverbs - Rob Pike (video)](https://www.youtube.com/watch?v=PAAkCSZUG1c)
* HTML
  * [Quick HTML Tutorial for Beginners](https://www.youtube.com/playlist?list=PLr6-GrHUlVf_ZNmuQSXdS197Oyr1L9sPB)
  * [HTML Crash Course for Beginners (1 hr)](https://www.youtube.com/watch?v=UB1O30fR-EE)
  * [Basic HTML and HTML5](https://www.freecodecamp.org/learn/responsive-web-design/basic-html-and-html5/)
* CSS
  * [Quick CSS Tutorial for Beginners](https://www.youtube.com/playlist?list=PLr6-GrHUlVf8JIgLcu3sHigvQjTw_aC9C)
  * [CSS Crash Course for absolute Beginners](https://www.youtube.com/watch?v=yfoY53QXEnI)
  * [Basic CSS](https://www.freecodecamp.org/learn/responsive-web-design/basic-css/)
* Javascript
  * [Learn Javascript in 12 minutes](https://www.youtube.com/watch?v=Ukg_U3CnJWI)
  * [Javascript Beginner Tutorials](https://www.youtube.com/playlist?list=PL41lfR-6DnOrwYi5d824q9-Y6z3JdSgQa)
  * [Javascript Algorithms and Data Structures](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/)
  * [Javascript Algorithms With Explanations](https://github.com/trekhleb/javascript-algorithms)
* Other Language 1
* Other Language 2
* etc

#### [Leetcode/find-work.md](file:///C:/Users/bryan/Downloads/Job-Search/INTERVIEW-PREP-COMPLETE/Leetcode/find-work.md) <a href="#leetcodefind-workmdleetcodefind-workmd" id="leetcodefind-workmdleetcodefind-workmd"></a>

## FIND WORK PROGRAMMING [![Lists](https://bgoonz.github.io/INTERVIEW-PREP-COMPLETE/README_files/-more%20lists-0a0a0a.svg)](https://bgoonz.github.io/INTERVIEW-PREP-COMPLETE/README_files/curated-lists) <a href="#find-work-programming-listshttpsimgshieldsiobadge-more20lists-0a0a0asvgstyleflatcolora0a0a0ahttpsgit" id="find-work-programming-listshttpsimgshieldsiobadge-more20lists-0a0a0asvgstyleflatcolora0a0a0ahttpsgit"></a>

> Curated list of websites and resources to find work programming

*Please read* [*contribution guidelines*](file:///C:/Users/bryan/Downloads/Job-Search/INTERVIEW-PREP-COMPLETE/contributing.md) *before contributing.*

* [Prepare](file:///C:/Users/bryan/AppData/Local/Temp/mume2021326-7948-1m32dnj.jgo6l.html#prepare)
* [Make CV](file:///C:/Users/bryan/AppData/Local/Temp/mume2021326-7948-1m32dnj.jgo6l.html#make-cv)
* [Find work](file:///C:/Users/bryan/AppData/Local/Temp/mume2021326-7948-1m32dnj.jgo6l.html#find-work)
* [Find work by technology](file:///C:/Users/bryan/AppData/Local/Temp/mume2021326-7948-1m32dnj.jgo6l.html#find-work-by-technology)
  * [iOS](file:///C:/Users/bryan/AppData/Local/Temp/mume2021326-7948-1m32dnj.jgo6l.html#ios)
  * [Go](file:///C:/Users/bryan/AppData/Local/Temp/mume2021326-7948-1m32dnj.jgo6l.html#go)
  * [React](file:///C:/Users/bryan/AppData/Local/Temp/mume2021326-7948-1m32dnj.jgo6l.html#react)
  * [Python](file:///C:/Users/bryan/AppData/Local/Temp/mume2021326-7948-1m32dnj.jgo6l.html#python)
  * [Rust](file:///C:/Users/bryan/AppData/Local/Temp/mume2021326-7948-1m32dnj.jgo6l.html#rust)
  * [Haskell](file:///C:/Users/bryan/AppData/Local/Temp/mume2021326-7948-1m32dnj.jgo6l.html#haskell)
* [Find work by country](file:///C:/Users/bryan/AppData/Local/Temp/mume2021326-7948-1m32dnj.jgo6l.html#find-work-by-country)
  * [Netherlands](file:///C:/Users/bryan/AppData/Local/Temp/mume2021326-7948-1m32dnj.jgo6l.html#netherlands)
  * [Germany](file:///C:/Users/bryan/AppData/Local/Temp/mume2021326-7948-1m32dnj.jgo6l.html#germany)
  * [Japan](file:///C:/Users/bryan/AppData/Local/Temp/mume2021326-7948-1m32dnj.jgo6l.html#japan)
* [Freelancing](file:///C:/Users/bryan/AppData/Local/Temp/mume2021326-7948-1m32dnj.jgo6l.html#freelancing)
* [Related](file:///C:/Users/bryan/AppData/Local/Temp/mume2021326-7948-1m32dnj.jgo6l.html#related)

### Prepare <a href="#prepare" id="prepare"></a>

* [Coding Interview University](https://github.com/jwasham/coding-interview-university) - Complete computer science study plan to become a software engineer.
* [Free self taught CS education](https://github.com/ossu/computer-science) - Path to a free self-taught education in Computer Science.
* [Everything you need to get the job](https://github.com/kdn251/interviews)
* [LeetCode problems](https://leetcode.com) - Many problems geared for solving actual programming interview questions.
* [Learn Anything](https://learn-anything.xyz) - Best paths for learning any topic including CS, programming and algorithms.
* [Algorithms](https://github.com/marcosfede/algorithms) - Solved algorithms and data structures problems in many languages.
* [30 Seconds of Interviews](https://github.com/fejes713/30-seconds-of-interviews)

### Make CV <a href="#make-cv" id="make-cv"></a>

* [Awesome CV](https://github.com/posquit0/Awesome-CV) - Great LaTeX template.
* [Deedy Resume](https://github.com/deedy/Deedy-Resume)

### Find work <a href="#find-work" id="find-work"></a>

* [HN: Who is Hiring](https://kennytilton.github.io/whoishiring/) - Search & filter through monthly `HN: Who is hiring?` postings.
* [Otta](https://otta.co) - Discover the most relevant roles for you at all of London's best startups.
* [findwork.dev](https://findwork.dev) - Jobs aggregator which collects data from Hacker News, Github, Stackoverflow.
* [Who is Hiring](https://whoishiring.io)
* [Angel List](https://angel.co/jobs)
* [LinkedIn Jobs](https://www.linkedin.com/jobs/)
* [Stack Overflow Jobs](https://stackoverflow.com/jobs)
* [Glassdoor](https://www.glassdoor.com)
* [Hired](https://hired.com)
* [Unicorn Hunt](https://unicornhunt.io)
* [Relocate me](https://relocate.me)
* [Landing Jobs](https://landing.jobs)
* [Remote OK](https://remoteok.io)
* [Indeed](https://www.indeed.com)
* [Loom](http://www.loom.co) - Connecting companies and top freelancers.
* [Product Hunt Jobs](https://www.producthunt.com/jobs)
* [Remote](https://remote.com) - Remote jobs for anyone, anywhere.
* [Go Remote](https://goremote.io)
* [We Work Remotely](https://weworkremotely.com)
* [Hiring Without Whiteboards](https://github.com/poteto/hiring-without-whiteboards)
* [Key Values](https://www.keyvalues.com) - Find engineering teams that share your values.
* [Future Jobs](https://www.futurejobs.io) - The best machine learning, AI, and data science jobs, in one place.
* [CalmJobs](http://calmjobs.io) - Work with companies who values work-life balance.
* [Xpo Jobs](https://jobs.xpo.network)
* [FOSS Jobs](https://www.fossjobs.net) - Free & Open Source Jobs.
* [co-hire](https://www.co-hire.com) - Simple way for technical people to speak directly with technology companies.
* [EntryLvl](https://entrylevel.io) - Browse through entry level job opportunities and find your match. ([HN](https://news.ycombinator.com/item?id=22691295))
* [Y Combinator's list of most active hiring companies on Work at a Startup](https://www.workatastartup.com/job_list)
* [NoiceJobs: Senior Remote Jobs](https://t.me/NoiceJobs) ([HN](https://news.ycombinator.com/item?id=23500588))
* [Remoteleaf](https://remoteleaf.com) - Receive hand-picked remote jobs delivered straight to your inbox.

### Find work by technology <a href="#find-work-by-technology" id="find-work-by-technology"></a>

#### iOS <a href="#ios" id="ios"></a>

* [Swift Jobs](https://www.natashatherobot.com/swift-jobs/)
* [Xcode Jobs](https://twitter.com/xcodejobs)
* [iOS Jobs](https://iosjobs.io)
* [iOS Indeed Jobs](https://www.indeed.com/q-iOS-developer-jobs.html)
* [SO iOS Jobs](https://stackoverflow.com/jobs?q=ios)
* [LinkedIn iOS Jobs](https://www.linkedin.com/jobs/ios-developer-jobs/)
* [iOS Dev Jobs](https://iosdevjobs.com) - Has newsletter too.

#### Go <a href="#go" id="go"></a>

* [Go Jobs & Developers](https://www.golangprojects.com)
* [Stack overflow: Jobs using Go](https://stackoverflow.com/jobs/developer-jobs-using-go?med=site-ui\&ref=tag-page_go)

#### React <a href="#react" id="react"></a>

* [Reactiflux Jobs](http://jobs.reactiflux.com)
* [Key Values: React Developer Jobs](https://www.keyvalues.com/react-developer-jobs)

#### Python <a href="#python" id="python"></a>

* [Py Jobs](http://www.pyjobs.xyz) - Search and post Python jobs all over the globe.
* [Free Python Job Board](http://pythonjobs.github.io)

#### Rust <a href="#rust" id="rust"></a>

* [Companies using Rust](https://www.rust-lang.org/en-US/friends.html)
* [This week in Rust](https://this-week-in-rust.org) - Weekly Rust newsletter that has Jobs section.

#### Haskell <a href="#haskell" id="haskell"></a>

* [Haskell companies](https://github.com/erkmos/haskell-companies) - Curated list of companies using Haskell in industry.

### Freelancing <a href="#freelancing" id="freelancing"></a>

* [The Remote Freelancer](https://github.com/engineerapart/TheRemoteFreelancer) - List of community-curated resources to find topical remote freelance & contract work.

### Related <a href="#related" id="related"></a>

* [CS career questions EU wiki](https://www.reddit.com/r/cscareerquestionsEU/wiki/index)
* [Few notes about web developer's interviews](http://blog.sapegin.me/all/coding-interview)
* [Finding work wiki](https://wiki.nikitavoloboev.xyz/work/finding-work)
* [Remote work wiki](https://wiki.nikitavoloboev.xyz/work/remote-work)
* [Search the last 'Who is hiring?' thread](https://hnjobs.emilburzo.com)

[![CC4](https://bgoonz.github.io/INTERVIEW-PREP-COMPLETE/README_files/license-CC4-0a0a0a.svg)](https://creativecommons.org/licenses/by/4.0/)\
[![Lists](https://bgoonz.github.io/INTERVIEW-PREP-COMPLETE/README_files/-more%20lists-0a0a0a.svg)](https://bgoonz.github.io/INTERVIEW-PREP-COMPLETE/README_files/curated-lists)\
[![Contribute](https://bgoonz.github.io/INTERVIEW-PREP-COMPLETE/README_files/-contribute-0a0a0a.svg)](file:///C:/Users/bryan/Downloads/Job-Search/INTERVIEW-PREP-COMPLETE/contributing.md)\
[![Twitter](https://bgoonz.github.io/INTERVIEW-PREP-COMPLETE/README_files/nikitatweet)](https://twitter.com/nikitavoloboev)

#### [Leetcode/README.md](file:///C:/Users/bryan/Downloads/Job-Search/INTERVIEW-PREP-COMPLETE/Leetcode/README.md) <a href="#leetcodereadmemdleetcodereadmemd" id="leetcodereadmemdleetcodereadmemd"></a>

## TECH INTERVIEW <a href="#tech-interview" id="tech-interview"></a>

## ASYMPTOTIC NOTATION <a href="#asymptotic-notation" id="asymptotic-notation"></a>

#### Definition: <a href="#span-stylecolorred-definition" id="span-stylecolorred-definition"></a>

Asymptotic Notation is the hardware independent notation used to tell the time and space complexity of an algorithm. Meaning it's a standardized way of measuring how much memory an algorithm uses or how long it runs for given an input.

#### Complexities <a href="#span-stylecolorred-complexities" id="span-stylecolorred-complexities"></a>

The following are the Asymptotic rates of growth from best to worst:

* constant growth - `O(1)` Runtime is constant and does not grow with `n`
* logarithmic growth – `O(log n)` Runtime grows logarithmically in proportion to `n`
* linear growth – `O(n)` Runtime grows directly in proportion to `n`
* superlinear growth – `O(n log n)` Runtime grows in proportion *and* logarithmically to `n`
* polynomial growth – `O(n^c)` Runtime grows quicker than previous all based on `n`
* exponential growth – `O(c^n)` Runtime grows even faster than polynomial growth based on `n`
* factorial growth – `O(n!)` Runtime grows the fastest and becomes quickly unusable for even

small values of `n`

[(source: Soumyadeep Debnath, *Analysis of Algorithms | Big-O analysis*)](https://www.geeksforgeeks.org/analysis-algorithms-big-o-analysis/)\
Visualized below; the x-axis representing input size and the y-axis representing complexity:

![#](https://bgoonz.github.io/INTERVIEW-PREP-COMPLETE/README_files/400px-Comparison_computational_complexity.svg.png)

[(source: Wikipedia, *Computational Complexity of Mathematical Operations*)](https://en.wikipedia.org/wiki/Computational_complexity_of_mathematical_operations)

#### Big-O notation <a href="#span-stylecolorred-big-o-notation" id="span-stylecolorred-big-o-notation"></a>

Big-O refers to the upper bound of time or space complexity of an algorithm, meaning it worst case runtime scenario. An easy way to think of it is that runtime could be better than Big-O but it will never be worse.

#### Big-Ω (Big-Omega) notation <a href="#span-stylecolorred-big-cf-89-big-omega-notation" id="span-stylecolorred-big-cf-89-big-omega-notation"></a>

Big-Omega refers to the lower bound of time or space complexity of an algorithm, meaning it is the best runtime scenario. Or runtime could worse than Big-Omega, but it will never be better.

#### Big-θ (Big-Theta) notation <a href="#span-stylecolorred-big-ce-b8-big-theta-notation" id="span-stylecolorred-big-ce-b8-big-theta-notation"></a>

Big-Theta refers to the tight bound of time or space complexity of an algorithm. Another way to think of it is the intersection of Big-O and Big-Omega, or more simply runtime is guaranteed to be a given complexity, such as `n log n` .

#### What you need to know <a href="#span-stylecolorred-what-you-need-to-know" id="span-stylecolorred-what-you-need-to-know"></a>

* Big-O and Big-Theta are the most common and helpful notations
* Big-O does *not* mean Worst Case Scenario, Big-Theta does *not* mean average case, and Big-Omega does *not* mean Best Case Scenario. They only connote the algorithm's performance for a particular scenario, and all three can be used for any scenario.
* Worst Case means given an unideal input, Average Case means given a typical input, Best case means a ideal input. Ex. Worst case means given an input the algorithm performs particularly bad, or best case an already sorted array for a sorting algorithm.
* Best Case and Big Omega are generally not helpful since Best Cases are rare in the real world and lower bound might be very different than an upper bound.
* Big-O isn't everything. On paper merge sort is faster than quick sort, but in practice quick sort is superior.

## DATA STRUCTURES <a href="#data-structures" id="data-structures"></a>

#### Array <a href="#span-stylecolorred-a-idarraya-array" id="span-stylecolorred-a-idarraya-array"></a>

#### Definition <a href="#span-stylecolorred-definition-1" id="span-stylecolorred-definition-1"></a>

* Stores data elements based on an sequential, most commonly 0 based, index.
* Based on [tuples](http://en.wikipedia.org/wiki/Tuple) from set theory.
* They are one of the oldest, most commonly used data structures.

#### What you need to know <a href="#span-stylecolorred-what-you-need-to-know-1" id="span-stylecolorred-what-you-need-to-know-1"></a>

* Optimal for indexing; bad at searching, inserting, and deleting (except at the end).
* **Linear arrays**, or one dimensional arrays, are the most basic.
  * Are static in size, meaning that they are declared with a fixed size.
* **Dynamic arrays** are like one dimensional arrays, but have reserved space for additional elements.
  * If a dynamic array is full, it copies its contents to a larger array.
* **Multi dimensional arrays** nested arrays that allow for multiple dimensions such as an array of arrays providing a 2 dimensional spacial representation via x, y coordinates.

#### Time Complexity <a href="#span-stylecolorred-time-complexity" id="span-stylecolorred-time-complexity"></a>

* Indexing: Linear array: `O(1)`, Dynamic array: `O(1)`
* Search: Linear array: `O(n)`, Dynamic array: `O(n)`
* Optimized Search: Linear array: `O(log n)`, Dynamic array: `O(log n)`
* Insertion: Linear array: n/a, Dynamic array: `O(n)`

#### Linked List <a href="#span-stylecolorred-a-idlinked-lista-linked-list" id="span-stylecolorred-a-idlinked-lista-linked-list"></a>

#### Definition <a href="#span-stylecolorred-definition-2" id="span-stylecolorred-definition-2"></a>

* Stores data with **nodes** that point to other nodes.
  * Nodes, at its most basic it has one datum and one reference (another node).
  * A linked list *chains* nodes together by pointing one node's reference towards another node.

#### What you need to know <a href="#span-stylecolorred-what-you-need-to-know-2" id="span-stylecolorred-what-you-need-to-know-2"></a>

* Designed to optimize insertion and deletion, slow at indexing and searching.
* **Doubly linked list** has nodes that also reference the previous node.
* **Circularly linked list** is simple linked list whose **tail**, the last node, references the **head**, the first node.
* **Stack**, commonly implemented with linked lists but can be made from arrays too.
  * Stacks are **last in, first out** (LIFO) data structures.
  * Made with a linked list by having the head be the only place for insertion and removal.
* **Queues**, too can be implemented with a linked list or an array.
  * Queues are a **first in, first out** (FIFO) data structure.
  * Made with a doubly linked list that only removes from head and adds to tail.

#### Time Complexity <a href="#span-stylecolorred-time-complexity-1" id="span-stylecolorred-time-complexity-1"></a>

* Indexing: Linked Lists: `O(n)`
* Search: Linked Lists: `O(n)`
* Optimized Search: Linked Lists: `O(n)`
* Append: Linked Lists: `O(1)`
* Prepend: Linked Lists: `O(1)`
* Insertion: Linked Lists: `O(n)`

#### Hash Table or Hash Map <a href="#span-stylecolorred-a-idhasha-hash-table-or-hash-map" id="span-stylecolorred-a-idhasha-hash-table-or-hash-map"></a>

#### Definition <a href="#span-stylecolorred-definition-3" id="span-stylecolorred-definition-3"></a>

* Stores data with key value pairs.
* **Hash functions** accept a key and return an output unique only to that specific key.
  * This is known as **hashing**, which is the concept that an input and an output have a one-to-one correspondence to map information.
  * Hash functions return a unique address in memory for that data.

#### What you need to know <a href="#span-stylecolorred-what-you-need-to-know-3" id="span-stylecolorred-what-you-need-to-know-3"></a>

* Designed to optimize searching, insertion, and deletion.
* **Hash collisions** are when a hash function returns the same output for two distinct inputs.
  * All hash functions have this problem.
  * This is often accommodated for by having the hash tables be very large.
* Hashes are important for associative arrays and database indexing.

#### Time Complexity <a href="#span-stylecolorred-time-complexity-2" id="span-stylecolorred-time-complexity-2"></a>

* Indexing: Hash Tables: `O(1)`
* Search: Hash Tables: `O(1)`
* Insertion: Hash Tables: `O(1)`

#### Binary Tree <a href="#span-stylecolorred-a-idbinary-treea-binary-tree" id="span-stylecolorred-a-idbinary-treea-binary-tree"></a>

#### Definition <a href="#span-stylecolorred-definition-4" id="span-stylecolorred-definition-4"></a>

* Is a tree like data structure where every node has at most two children.
  * There is one left and right child node.

#### What you need to know <a href="#span-stylecolorred-what-you-need-to-know-4" id="span-stylecolorred-what-you-need-to-know-4"></a>

* Designed to optimize searching and sorting.
* A **degenerate tree** is an unbalanced tree, which if entirely one-sided, is essentially a linked list.
* They are comparably simple to implement than other data structures.
* Used to make **binary search trees**.
  * A binary tree that uses comparable keys to assign which direction a child is.
  * Left child has a key smaller than its parent node.
  * Right child has a key greater than its parent node.
  * There can be no duplicate node.
  * Because of the above it is more likely to be used as a data structure than a binary tree.

#### Time Complexity <a href="#span-stylecolorred-time-complexity-3" id="span-stylecolorred-time-complexity-3"></a>

* Indexing: Binary Search Tree: `O(log n)`
* Search: Binary Search Tree: `O(log n)`
* Insertion: Binary Search Tree: `O(log n)`

## ALGORITHMS <a href="#algorithms" id="algorithms"></a>

### Algorithm Basics <a href="#algorithm-basics" id="algorithm-basics"></a>

#### Recursive Algorithms <a href="#span-stylecolorred-recursive-algorithms" id="span-stylecolorred-recursive-algorithms"></a>

#### Definition <a href="#span-stylecolorred-definition-5" id="span-stylecolorred-definition-5"></a>

* An algorithm that calls itself in its definition.
  * **Recursive case** a conditional statement that is used to trigger the recursion.
  * **Base case** a conditional statement that is used to break the recursion.

#### What you need to know <a href="#span-stylecolorred-what-you-need-to-know-5" id="span-stylecolorred-what-you-need-to-know-5"></a>

* **Stack level too deep** and **stack overflow**.
  * If you've seen either of these from a recursive algorithm, you messed up.
  * It means that your base case was never triggered because it was faulty or the problem was so massive you ran out of alloted memory.
  * Knowing whether or not you will reach a base case is integral to correctly using recursion.
  * Often used in Depth First Search

#### Iterative Algorithms <a href="#span-stylecolorred-iterative-algorithms" id="span-stylecolorred-iterative-algorithms"></a>

#### Definition <a href="#span-stylecolorred-definition-6" id="span-stylecolorred-definition-6"></a>

* An algorithm that is called repeatedly but for a finite number of times, each time being a single iteration.
  * Often used to move incrementally through a data set.

#### What you need to know <a href="#span-stylecolorred-what-you-need-to-know-6" id="span-stylecolorred-what-you-need-to-know-6"></a>

* Generally you will see iteration as loops, for, while, and until statements.
* Think of iteration as moving one at a time through a set.
* Often used to move through an array.

#### Recursion Vs. Iteration <a href="#span-stylecolorred-recursion-vs-iteration" id="span-stylecolorred-recursion-vs-iteration"></a>

* The differences between recursion and iteration can be confusing to distinguish since both can be used to implement the other. But know that,
  * Recursion is, usually, more expressive and easier to implement.
  * Iteration uses less memory.
* **Functional languages** tend to use recursion. (i.e. Haskell)
* **Imperative languages** tend to use iteration. (i.e. Ruby)
* Check out this [Stack Overflow post](http://stackoverflow.com/questions/19794739/what-is-the-difference-between-iteration-and-recursion) for more info.

#### Pseudo Code of Moving Through an Array <a href="#span-stylecolorred-pseudo-code-of-moving-through-an-array" id="span-stylecolorred-pseudo-code-of-moving-through-an-array"></a>

```
| Recursion                    | Iteration                     |
| ---------------------------- | ----------------------------- |
| recursive method (array, n)  | iterative method (array)      |
| if array[n] is not nil       | for n from 0 to size of array |
| print array[n]               | print(array[n])               |
| recursive method(array, n+1) |
| else                         |
| exit loop                    |
```

#### Greedy Algorithms <a href="#span-stylecolorred-greedy-algorithms" id="span-stylecolorred-greedy-algorithms"></a>

#### Definition <a href="#span-stylecolorred-definition-7" id="span-stylecolorred-definition-7"></a>

* An algorithm that, while executing, selects only the information that meets a certain criteria.
* The general five components, taken from [Wikipedia](http://en.wikipedia.org/wiki/Greedy_algorithm#Specifics):
  * A candidate set, from which a solution is created.
  * A selection function, which chooses the best candidate to be added to the solution.
  * A feasibility function, that is used to determine if a candidate can be used to contribute to a solution.
  * An objective function, which assigns a value to a solution, or a partial solution.
  * A solution function, which will indicate when we have discovered a complete solution.

#### What you need to know <a href="#span-stylecolorred-what-you-need-to-know-7" id="span-stylecolorred-what-you-need-to-know-7"></a>

* Used to find the expedient, though non-optimal, solution for a given problem.
* Generally used on sets of data where only a small proportion of the information evaluated meets the desired result.
* Often a greedy algorithm can help reduce the Big O of an algorithm.

#### Pseudo Code of a Greedy Algorithm to Find Largest Difference of any Two Numbers in an Array. <a href="#span-stylecolorred-pseudo-code-of-a-greedy-algorithm-to-find-largest-difference-of-any-two-numbers-i" id="span-stylecolorred-pseudo-code-of-a-greedy-algorithm-to-find-largest-difference-of-any-two-numbers-i"></a>

```
greedy algorithm (array)
  let largest difference = 0
  let new difference = find next difference (array[n], array[n+1])
  largest difference = new difference if new difference is > largest difference
  repeat above two steps until all differences have been found
  return largest difference
```

This algorithm never needed to compare all the differences to one another, saving it an entire iteration.

### Search Algorithms <a href="#search-algorithms" id="search-algorithms"></a>

#### Breadth First Search <a href="#span-stylecolorred-a-idbreadth-first-searchabreadth-first-search" id="span-stylecolorred-a-idbreadth-first-searchabreadth-first-search"></a>

#### Definition <a href="#span-stylecolorred-definition-8" id="span-stylecolorred-definition-8"></a>

* An algorithm that searches a tree (or graph) by searching levels of the tree first, starting at the root.
  * It finds every node on the same level, most often moving left to right.
  * While doing this it tracks the children nodes of the nodes on the current level.
  * When finished examining a level it moves to the left most node on the next level.
  * The bottom-right most node is evaluated last (the node that is deepest and is farthest right of it's level).

#### What you need to know <a href="#span-stylecolorred-what-you-need-to-know-8" id="span-stylecolorred-what-you-need-to-know-8"></a>

* Optimal for searching a tree that is wider than it is deep.
* Uses a queue to store information about the tree while it traverses a tree.
  * Because it uses a queue it is more memory intensive than **depth first search**.
  * The queue uses more memory because it needs to stores pointers

#### Time Complexity <a href="#span-stylecolorred-time-complexity-4" id="span-stylecolorred-time-complexity-4"></a>

* Search: Breadth First Search: O(V + E)
* E is number of edges
* V is number of vertices

#### Depth First Search <a href="#span-stylecolorred-a-iddepth-first-searchadepth-first-search" id="span-stylecolorred-a-iddepth-first-searchadepth-first-search"></a>

#### Definition <a href="#span-stylecolorred-definition-9" id="span-stylecolorred-definition-9"></a>

* An algorithm that searches a tree (or graph) by searching depth of the tree first, starting at the root.
  * It traverses left down a tree until it cannot go further.
  * Once it reaches the end of a branch it traverses back up trying the right child of nodes on that branch, and if possible left from the right children.
  * When finished examining a branch it moves to the node right of the root then tries to go left on all it's children until it reaches the bottom.
  * The right most node is evaluated last (the node that is right of all it's ancestors).

#### What you need to know <a href="#span-stylecolorred-what-you-need-to-know-9" id="span-stylecolorred-what-you-need-to-know-9"></a>

* Optimal for searching a tree that is deeper than it is wide.
* Uses a stack to push nodes onto.
  * Because a stack is LIFO it does not need to keep track of the nodes pointers and is therefore less memory intensive than breadth first search.
  * Once it cannot go further left it begins evaluating the stack.

#### Time Complexity <a href="#span-stylecolorred-time-complexity-5" id="span-stylecolorred-time-complexity-5"></a>

* Search: Depth First Search: O(|E| + |V|)
* E is number of edges
* V is number of vertices

#### Breadth First Search Vs. Depth First Search <a href="#span-stylecolorred-breadth-first-search-vs-depth-first-search" id="span-stylecolorred-breadth-first-search-vs-depth-first-search"></a>

* The simple answer to this question is that it depends on the size and shape of the tree.
  * For wide, shallow trees use Breadth First Search
  * For deep, narrow trees use Depth First Search

#### Nuances <a href="#span-stylecolorred-nuances" id="span-stylecolorred-nuances"></a>

* Because BFS uses queues to store information about the nodes and its children, it could use more memory than is available on your computer. (But you probably won't have to worry about this.)
* If using a DFS on a tree that is very deep you might go unnecessarily deep in the search. See [xkcd](http://xkcd.com/761/) for more information.
* Breadth First Search tends to be a looping algorithm.
* Depth First Search tends to be a recursive algorithm.

### Sorting Algorithms <a href="#sorting-algorithms" id="sorting-algorithms"></a>

#### Selection Sort <a href="#span-stylecolorred-a-idselection-sortaselection-sort" id="span-stylecolorred-a-idselection-sortaselection-sort"></a>

#### Definition <a href="#span-stylecolorred-definition-10" id="span-stylecolorred-definition-10"></a>

* A comparison based sorting algorithm.
  * Starts with the cursor on the left, iterating left to right
  * Compares the left side to the right, looking for the smallest known item
    * If the left is smaller than the item to the right it continues iterating
    * If the left is bigger than the item to the right, the item on the right becomes the known smallest number
    * Once it has checked all items, it moves the known smallest to the cursor and advances the cursor to the right and starts over
  * As the algorithm processes the data set, it builds a fully sorted left side of the data until the entire data set is sorted
* Changes the array in place.

#### What you need to know <a href="#span-stylecolorred-what-you-need-to-know-10" id="span-stylecolorred-what-you-need-to-know-10"></a>

* Inefficient for large data sets.
* Very simple to implement.

#### Time Complexity <a href="#span-stylecolorred-time-complexity-6" id="span-stylecolorred-time-complexity-6"></a>

* Best Case Sort: Merge Sort: `O(n^2)`
* Average Case Sort: Merge Sort: `O(n^2)`
* Worst Case Sort: Merge Sort: `O(n^2)`

#### Space Complexity <a href="#span-stylecolorred-space-complexity" id="span-stylecolorred-space-complexity"></a>

* Worst Case: `O(1)`

#### Visualization <a href="#span-stylecolorred-visualization" id="span-stylecolorred-visualization"></a>

![#](https://bgoonz.github.io/INTERVIEW-PREP-COMPLETE/README_files/Selection-Sort-Animation.gif)

[(source: Wikipedia, *Insertion Sort*)](https://en.wikipedia.org/wiki/Selection_sort)

#### Insertion Sort <a href="#span-stylecolorred-a-idinsertion-sortainsertion-sort" id="span-stylecolorred-a-idinsertion-sortainsertion-sort"></a>

#### Definition <a href="#span-stylecolorred-definition-11" id="span-stylecolorred-definition-11"></a>

* A comparison based sorting algorithm.
  * Iterates left to right comparing the current cursor to the previous item.
  * If the cursor is smaller than the item on the left it swaps positions and the cursor compares itself again to the left hand side until it is put in its sorted position.
  * As the algorithm processes the data set, the left side becomes increasingly sorted until it is fully sorted.
* Changes the array in place.

#### What you need to know <a href="#span-stylecolorred-what-you-need-to-know-11" id="span-stylecolorred-what-you-need-to-know-11"></a>

* Inefficient for large data sets, but can be faster for than other algorithms for small ones.
* Although it has an `O(n^2)`, in practice it slightly less since its comparison scheme only requires checking place if its smaller than its neighbor.

#### Time Complexity <a href="#span-stylecolorred-time-complexity-7" id="span-stylecolorred-time-complexity-7"></a>

* Best Case: `O(n)`
* Average Case: `O(n^2)`
* Worst Case: `O(n^2)`

#### Space Complexity <a href="#span-stylecolorred-space-complexity-1" id="span-stylecolorred-space-complexity-1"></a>

* Worst Case: `O(n)`

#### Visualization <a href="#span-stylecolorred-visualization-1" id="span-stylecolorred-visualization-1"></a>

![#](https://bgoonz.github.io/INTERVIEW-PREP-COMPLETE/README_files/Insertion-sort-example-300px.gif)

[(source: Wikipedia, *Insertion Sort*)](https://en.wikipedia.org/wiki/Insertion_sort)

#### Merge Sort <a href="#span-stylecolorred-a-idmerge-sortamerge-sort" id="span-stylecolorred-a-idmerge-sortamerge-sort"></a>

#### Definition <a href="#span-stylecolorred-definition-12" id="span-stylecolorred-definition-12"></a>

* A divide and conquer algorithm.
  * Recursively divides entire array by half into subsets until the subset is one, the base case.
  * Once the base case is reached results are returned and sorted ascending left to right.
  * Recursive calls are returned and the sorts double in size until the entire array is sorted.

#### What you need to know <a href="#span-stylecolorred-what-you-need-to-know-12" id="span-stylecolorred-what-you-need-to-know-12"></a>

* This is one of the fundamental sorting algorithms.
* Know that it divides all the data into as small possible sets then compares them.

#### Time Complexity <a href="#span-stylecolorred-time-complexity-8" id="span-stylecolorred-time-complexity-8"></a>

* Worst Case: `O(n log n)`
* Average Case: `O(n log n)`
* Best Case: `O(n)`

#### Space Complexity <a href="#span-stylecolorred-space-complexity-2" id="span-stylecolorred-space-complexity-2"></a>

* Worst Case: `O(1)`

#### Visualization <a href="#span-stylecolorred-visualization-2" id="span-stylecolorred-visualization-2"></a>

![#](https://bgoonz.github.io/INTERVIEW-PREP-COMPLETE/README_files/400px-Merge_sort_algorithm_diagram.svg.png)

[(source: Wikipedia, *Merge Sort*)](https://en.wikipedia.org/wiki/Merge_sort)

#### Quicksort <a href="#span-stylecolorred-a-idquick-sortaquicksort" id="span-stylecolorred-a-idquick-sortaquicksort"></a>

#### Definition <a href="#span-stylecolorred-definition-13" id="span-stylecolorred-definition-13"></a>

* A divide and conquer algorithm
  * Partitions entire data set in half by selecting a random pivot element and putting all smaller elements to the left of the element and larger ones to the right.
  * It repeats this process on the left side until it is comparing only two elements at which point the left side is sorted.
  * When the left side is finished sorting it performs the same operation on the right side.
* Computer architecture favors the quicksort process.
* Changes the array in place.

#### What you need to know <a href="#span-stylecolorred-what-you-need-to-know-13" id="span-stylecolorred-what-you-need-to-know-13"></a>

* While it has the same Big O as (or worse in some cases) many other sorting algorithms it is often faster in practice than many other sorting algorithms, such as merge sort.

#### Time Complexity <a href="#span-stylecolorred-time-complexity-9" id="span-stylecolorred-time-complexity-9"></a>

* Worst Case: `O(n^2)`
* Average Case: `O(n log n)`
* Best Case: `O(n log n)`

#### Space Complexity <a href="#span-stylecolorred-space-complexity-3" id="span-stylecolorred-space-complexity-3"></a>

* Worst Case: `O(log n)`

#### Visualization <a href="#span-stylecolorred-visualization-3" id="span-stylecolorred-visualization-3"></a>

![#](https://bgoonz.github.io/INTERVIEW-PREP-COMPLETE/README_files/Sorting_quicksort_anim.gif)

[(source: Wikipedia, *Quicksort*)](https://en.wikipedia.org/wiki/Quicksort)

#### Merge Sort Vs. Quicksort <a href="#span-stylecolorred-merge-sort-vs-quicksort" id="span-stylecolorred-merge-sort-vs-quicksort"></a>

* Quicksort is likely faster in practice, but merge sort is faster on paper.
* Merge Sort divides the set into the smallest possible groups immediately then reconstructs the incrementally as it sorts the groupings.
* Quicksort continually partitions the data set by a pivot, until the set is recursively sorted.

### Additional Resources <a href="#additional-resources" id="additional-resources"></a>

[Khan Academy's Algorithm Course](https://www.khanacademy.org/computing/computer-science/algorithms)

#### What is ARIA and when should you use it? <a href="#span-stylecolorred-what-is-aria-and-when-should-you-use-it" id="span-stylecolorred-what-is-aria-and-when-should-you-use-it"></a>

#### Answer <a href="#span-stylecolorred-answer" id="span-stylecolorred-answer"></a>

ARIA stands for "Accessible Rich Internet Applications", and is a technical specification created by the World Wide Web Consortium (W3C). Better known as WAI-ARIA, it provides additional HTML attributes in the development of web applications to offer people who use assistive technologies (AT) a more robust and interoperable experience with dynamic components. By providing the component's role, name, and state, AT users can better understand how to interact with the component. WAI-ARIA should only be used when an HTML element equivalent is not available or lacks full browser or AT support. WAI-ARIA's semantic markup coupled with JavaScript works to provide an understandable and interactive experience for people who use AT.\
An example using ARIA:

```
<div 
  role="combobox"
  aria-expanded="false"
  aria-owns="ex1-grid"
  aria-haspopup="grid"
  id="ex1-combobox">
  ...
</div>
```

Credit: W3C's [ARIA 1.1 Combobox with Grid Popup Example](https://w3c.github.io/aria-practices/examples/combobox/aria1.1pattern/grid-combo.html)

#### Don't forget: <a href="#span-stylecolorred-dont-forget" id="span-stylecolorred-dont-forget"></a>

* Accessible Rich Internet Applications
* Benefits people who use assistive technologies (AT)
* Provides role, name, and state
* Semantic HTML coupled with JavaScript

#### Additional links <a href="#span-stylecolorred-additional-links" id="span-stylecolorred-additional-links"></a>

* [WAI-ARIA Overview](https://www.w3.org/WAI/standards-guidelines/aria/)
* [WAI-ARIA Spec](https://www.w3.org/TR/wai-aria/)
* [ARIA Serious? Eric Eggert presentation](https://youtu.be/4bH57rWPnYo)

#### What is the minimum recommended ratio of contrast between foreground text and background to comply with WCAG? Why does this matter? <a href="#span-stylecolorred-what-is-the-minimum-recommended-ratio-of-contrast-between-foreground-text-and-bac" id="span-stylecolorred-what-is-the-minimum-recommended-ratio-of-contrast-between-foreground-text-and-bac"></a>

#### Answer <a href="#span-stylecolorred-answer-1" id="span-stylecolorred-answer-1"></a>

4.5:1 is the calculated contrast ratio between foreground text and background that is recommended by the Web Content Accessibiity Guidelines (WCAG) success criteria (SC) 1.4.3: Contrast (Minimum). This SC was written by the World Wide Web Consortium (W3C) to ensure that people with low vision or color deficiencies are able to read (perceive) important content on a web page. It goes beyond color choices to ensure text stands out on the background it's placed on.

#### Don't forget: <a href="#span-stylecolorred-dont-forget-1" id="span-stylecolorred-dont-forget-1"></a>

* At least 4.5:1 contrast ratio between foreground text and background
* Benefits people with low vision or color deficiencies

#### Additional links <a href="#span-stylecolorred-additional-links-1" id="span-stylecolorred-additional-links-1"></a>

* [Understanding SC 1.4.3](https://www.alaskawebdev.com/contact)
* [WebAIM Contrast Checker](https://webaim.org/resources/contrastchecker/)
* [Contrast Ratio checker](https://contrast-ratio.com/#)

#### What are some of the tools available to test the accessibility of a website or web application? <a href="#span-stylecolorred-what-are-some-of-the-tools-available-to-test-the-accessibility-of-a-website-or-we" id="span-stylecolorred-what-are-some-of-the-tools-available-to-test-the-accessibility-of-a-website-or-we"></a>

#### Answer <a href="#span-stylecolorred-answer-2" id="span-stylecolorred-answer-2"></a>

There are multiple tools that can help you to find for accessibility issues in your website or application.\
Check for issues in your website:

* Lighthouse from Google, it provides an option for accessibility testing, it will check for the compliance of different accessibility standards and give you an score with details on the different issues
* Axe Coconut from DequeLabs, it is a Chrome extension that adds a tab in the Developer tools, it will check for accessibility issues and it will classify them by severity and suggest possible solutions

Check for issues in your code: \* Jest Axe, you can add unit tests for accessibility \* React Axe, test your React application with the axe-core accessibility testing library. Results will show in the Chrome DevTools console. \* eslint-plugin-jsx-a11y, pairing this plugin with an editor lint plugin, you can bake accessibility standards into your application in real-time.\
Check for individual issues: \* Color Contrast checkers \* Use a screen reader \* Use only keyboard to navigate your site

#### Don't forget: <a href="#span-stylecolorred-dont-forget-2" id="span-stylecolorred-dont-forget-2"></a>

* None of the tools will replace manual testing
* Mention of different ways to test accessibility

#### Additional links <a href="#span-stylecolorred-additional-links-2" id="span-stylecolorred-additional-links-2"></a>

* [Jest Axe](https://github.com/nickcolley/jest-axe)
* [eslint-plugin-jsx-a11y](https://www.w3.org/TR/wai-aria/)
* [React axe](https://github.com/dequelabs/react-axe)
* [Accessibility Checklist](http://romeo.elsevier.com/accessibility_checklist/)

#### What is the Accessibility Tree? <a href="#span-stylecolorred-what-is-the-accessibility-tree" id="span-stylecolorred-what-is-the-accessibility-tree"></a>

#### Answer <a href="#span-stylecolorred-answer-3" id="span-stylecolorred-answer-3"></a>

The Accessibility Tree is a structure produced by the browser's Accessibility APIs which provides accessibility information to assistive technologies such as screen readers. It runs parallel to the DOM and is similar to the DOM API, but with much fewer nodes, because a lot of that information is only useful for visual presentation. By writing semantic HTML we can take advantage of this process in creating an accessible experience for our users.

#### Don't forget: <a href="#span-stylecolorred-dont-forget-3" id="span-stylecolorred-dont-forget-3"></a>

* Tree structure exposing information to assistive technologies
* Runs parallel to the DOM
* Semantic HTML is essential in creating accessible experiences

#### Additional links <a href="#span-stylecolorred-additional-links-3" id="span-stylecolorred-additional-links-3"></a>

* [Accessibility APIs](https://www.smashingmagazine.com/2015/03/web-accessibility-with-accessibility-api/)

#### What is the purpose of the `alt` attribute on images? <a href="#span-stylecolorred-what-is-the-purpose-of-the-alt-attribute-on-images" id="span-stylecolorred-what-is-the-purpose-of-the-alt-attribute-on-images"></a>

#### Answer <a href="#span-stylecolorred-answer-4" id="span-stylecolorred-answer-4"></a>

The `alt` attribute provides alternative information for an image if a user cannot view it. The `alt` attribute should be used to describe any images except those which only serve a decorative purpose, in which case it should be left empty.

#### Don't forget: <a href="#span-stylecolorred-dont-forget-4" id="span-stylecolorred-dont-forget-4"></a>

* Decorative images should have an empty `alt` attribute.
* Web crawlers use `alt` tags to understand image content, so they are considered important for Search Engine Optimization (SEO).
* Put the `.` at the end of `alt` tag to improve accessibility.

#### Additional links <a href="#span-stylecolorred-additional-links-4" id="span-stylecolorred-additional-links-4"></a>

* [A good basis for accessibility](https://developer.mozilla.org/en-US/docs/Learn/Accessibility/HTML)

#### What are `defer` and `async` attributes on a `<script>` tag? <a href="#span-stylecolorred-what-are-defer-and-async-attributes-on-a-script-tag" id="span-stylecolorred-what-are-defer-and-async-attributes-on-a-script-tag"></a>

#### Answer <a href="#span-stylecolorred-answer-5" id="span-stylecolorred-answer-5"></a>

If neither attribute is present, the script is downloaded and executed synchronously, and will halt parsing of the document until it has finished executing (default behavior). Scripts are downloaded and executed in the order they are encountered.\
The `defer` attribute downloads the script while the document is still parsing but waits until the document has finished parsing before executing it, equivalent to executing inside a `DOMContentLoaded` event listener. `defer` scripts will execute in order.\
The `async` attribute downloads the script during parsing the document but will pause the parser to execute the script before it has fully finished parsing. `async` scripts will not necessarily execute in order.\
Note: both attributes must only be used if the script has a `src` attribute (i.e. not an inline script).

```
<script src="myscript.js"></script>
<script src="myscript.js" defer></script>
<script src="myscript.js" async></script>
```

#### Don't forget: <a href="#span-stylecolorred-dont-forget-5" id="span-stylecolorred-dont-forget-5"></a>

* Placing a `defer` script in the `<head>` allows the browser to download the script while the page is still parsing, and is therefore a better option than placing the script before the end of the body.
* If the scripts rely on each other, use `defer`.
* If the script is independent, use `async`.
* Use `defer` if the DOM must be ready and the contents are not placed within a `DOMContentLoaded` listener.

#### Additional links <a href="#span-stylecolorred-additional-links-5" id="span-stylecolorred-additional-links-5"></a>

* [async vs defer attributes](http://www.growingwiththeweb.com/2014/02/async-vs-defer-attributes.html)

#### What is an `async` function? <a href="#span-stylecolorred-what-is-an-async-function" id="span-stylecolorred-what-is-an-async-function"></a>

```
async function foo() {
  ...
}
```

#### Answer <a href="#span-stylecolorred-answer-6" id="span-stylecolorred-answer-6"></a>

An `async` function is a function that allows you to pause the function's execution while it waits for ( `await` s) a promise to resolve. It's an abstraction on top of the Promise API that makes asynchronous operations *look* like they're synchronous.\
`async` functions automatically return a Promise object. Whatever you `return` from the `async` function will be the promise's *resolution*. If instead you `throw` from the body of an `async` function, that will be how your async function *rejects* the promise it returns.\
Most importantly, `async` functions are able to use the `await` keyword in their function body, which **pauses the function** until the operation after the `await` completes, and allows it to return that operation's result to a variable synchronously.

```
// Normal promises in regular function:
function foo() {
    promiseCall()
        .then(result => {
            // do something with the result
        })
}
// async functions
async function foo() {
    const result = await promiseCall()
    // do something with the result
}
```

#### Don't forget: <a href="#span-stylecolorred-dont-forget-6" id="span-stylecolorred-dont-forget-6"></a>

* `async` functions are just syntactic sugar on top of Promises.
* They make asynchronous operations look like synchronous operations in your function.
* They implicitly return a promise which resolves to whatever your `async` function returns, and reject to whatever your `async` function `throw`s.

#### Additional links <a href="#span-stylecolorred-additional-links-6" id="span-stylecolorred-additional-links-6"></a>

* [MDN Docs - async function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function)
* [MDN Docs - await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await)

#### Create a function `batches` that returns the maximum number of whole batches that can be cooked from a recipe. <a href="#span-stylecolorred-create-a-function-batches-that-returns-the-maximum-number-of-whole-batches-that-c" id="span-stylecolorred-create-a-function-batches-that-returns-the-maximum-number-of-whole-batches-that-c"></a>

```
/**
It accepts two objects as arguments: the first object is the recipe
for the food, while the second object is the available ingredients.
Each ingredient's value is a number representing how many units there are.
`batches(recipe, available)`
*/
// 0 batches can be made
batches({
    milk: 100,
    butter: 50,
    flour: 5
}, {
    milk: 132,
    butter: 48,
    flour: 51
})
batches({
    milk: 100,
    flour: 4,
    sugar: 10,
    butter: 5
}, {
    milk: 1288,
    flour: 9,
    sugar: 95
})
// 1 batch can be made
batches({
    milk: 100,
    butter: 50,
    cheese: 10
}, {
    milk: 198,
    butter: 52,
    cheese: 10
})
// 2 batches can be made
batches({
    milk: 2,
    sugar: 40,
    butter: 20
}, {
    milk: 5,
    sugar: 120,
    butter: 500
})
```

#### Answer <a href="#span-stylecolorred-answer-7" id="span-stylecolorred-answer-7"></a>

We must have all ingredients of the recipe available, and in quantities that are more than or equal to the number of units required. If just one of the ingredients is not available or lower than needed, we cannot make a single batch.\
Use `Object.keys()` to return the ingredients of the recipe as an array, then use `Array.prototype.map()` to map each ingredient to the ratio of available units to the amount required by the recipe. If one of the ingredients required by the recipe is not available at all, the ratio will evaluate to `NaN` , so the logical OR operator can be used to fallback to `0` in this case.\
Use the spread `...` operator to feed the array of all the ingredient ratios into `Math.min()` to determine the lowest ratio. Passing this entire result into `Math.floor()` rounds down to return the maximum number of whole batches.

```
const batches = (recipe, available) =>
    Math.floor(
        Math.min(...Object.keys(recipe).map(k => available[k] / recipe[k] || 0))
    )
```

#### Don't forget: <a href="#span-stylecolorred-dont-forget-7" id="span-stylecolorred-dont-forget-7"></a>

#### Additional links <a href="#span-stylecolorred-additional-links-7" id="span-stylecolorred-additional-links-7"></a>

#### What is CSS BEM? <a href="#span-stylecolorred-what-is-css-bem" id="span-stylecolorred-what-is-css-bem"></a>

#### Answer <a href="#span-stylecolorred-answer-8" id="span-stylecolorred-answer-8"></a>

The BEM methodology is a naming convention for CSS classes in order to keep CSS more maintainable by defining namespaces to solve scoping issues. BEM stands for Block Element Modifier which is an explanation for its structure. A Block is a standalone component that is reusable across projects and acts as a "namespace" for sub components (Elements). Modifiers are used as flags when a Block or Element is in a certain state or is different in structure or style.

```
/* block component */
.block {
}
/* element */
.block__element {
}
/* modifier */
.block__element--modifier {
}
```

Here is an example with the class names on markup:

```
<nav class="navbar">
  <a href="/" class="navbar__link navbar__link--active"></a>
  <a href="/" class="navbar__link"></a>
  <a href="/" class="navbar__link"></a>
</nav>
```

In this case, `navbar` is the Block, `navbar__link` is an Element that makes no sense outside of the `navbar` component, and `navbar__link--active` is a Modifier that indicates a different state for the `navbar__link` Element.\
Since Modifiers are verbose, many opt to use `is-*` flags instead as modifiers.

```
<a href="/" class="navbar__link is-active"></a>
```

These must be chained to the Element and never alone however, or there will be scope issues.

```
.navbar__link.is-active {
}
```

#### Don't forget: <a href="#span-stylecolorred-dont-forget-8" id="span-stylecolorred-dont-forget-8"></a>

* Alternative solutions to scope issues like CSS-in-JS

#### Additional links <a href="#span-stylecolorred-additional-links-8" id="span-stylecolorred-additional-links-8"></a>

* [Writing clean and maintainable CSS](https://hackernoon.com/writing-clean-and-maintainable-css-using-bem-methodology-1dcbf810a664)

#### What is Big O Notation? <a href="#span-stylecolorred-what-is-big-o-notation" id="span-stylecolorred-what-is-big-o-notation"></a>

#### Answer <a href="#span-stylecolorred-answer-9" id="span-stylecolorred-answer-9"></a>

Big O notation is used in Computer Science to describe the time complexity of an algorithm. The best algorithms will execute the fastest and have the simplest complexity.\
Algorithms don't always perform the same and may vary based on the data they are supplied. While in some cases they will execute quickly, in other cases they will execute slowly, even with the same number of elements to deal with.\
In these examples, the base time is 1 element = `1ms` .

#### O(1) <a href="#span-stylecolorred-o1" id="span-stylecolorred-o1"></a>

```
arr[arr.length - 1]
```

* 1000 elements = `1ms`

Constant time complexity. No matter how many elements the array has, it will theoretically take (excluding real-world variation) the same amount of time to execute.

#### O(N) <a href="#span-stylecolorred-on" id="span-stylecolorred-on"></a>

```
arr.filter(fn)
```

* 1000 elements = `1000ms`

Linear time complexity. The execution time will increase linearly with the number of elements the array has. If the array has 1000 elements and the function takes 1ms to execute, 7000 elements will take 7ms to execute. This is because the function must iterate through all elements of the array before returning a result.

#### O(\[1, N]) <a href="#span-stylecolorred-o1-n" id="span-stylecolorred-o1-n"></a>

```
arr.some(fn)
```

* 1000 elements = `1ms <= x <= 1000ms`

The execution time varies depending on the data supplied to the function, it may return very early or very late. The best case here is O(1) and the worst case is O(N).

#### O(NlogN) <a href="#span-stylecolorred-onlogn" id="span-stylecolorred-onlogn"></a>

```
arr.sort(fn)
```

* 1000 elements \~= `10000ms`

Browsers usually implement the quicksort algorithm for the `sort()` method and the average time complexity of quicksort is O(NlgN). This is very efficient for large collections.

#### O(N^2) <a href="#span-stylecolorred-on2" id="span-stylecolorred-on2"></a>

```
for (let i = 0; i < arr.length; i++) {
    for (let j = 0; j < arr.length; j++) {
        // ...
    }
}
```

* 1000 elements = `1000000ms`

The execution time rises quadratically with the number of elements. Usually the result of nesting loops.

#### O(N!) <a href="#span-stylecolorred-on-1" id="span-stylecolorred-on-1"></a>

```
const permutations = arr => {
    if (arr.length <= 2) return arr.length === 2 ? [arr, [arr[1], arr[0]]] : arr
    return arr.reduce(
        (acc, item, i) =>
        acc.concat(
            permutations([...arr.slice(0, i), ...arr.slice(i + 1)]).map(val => [
                item,
                ...val
            ])
        ),
        []
    )
}
```

* 1000 elements = `Infinity` (practically) ms

The execution time rises extremely fast with even just 1 addition to the array.

#### Don't forget: <a href="#span-stylecolorred-dont-forget-9" id="span-stylecolorred-dont-forget-9"></a>

* Be wary of nesting loops as execution time increases exponentially.

#### Additional links <a href="#span-stylecolorred-additional-links-9" id="span-stylecolorred-additional-links-9"></a>

* [Big O Notation in JavaScript](https://medium.com/cesars-tech-insights/big-o-notation-javascript-25c79f50b19b)

#### Create a standalone function `bind` that is functionally equivalent to the method `Function.prototype.bind` . <a href="#span-stylecolorred-create-a-standalone-function-bind-that-is-functionally-equivalent-to-the-method-f" id="span-stylecolorred-create-a-standalone-function-bind-that-is-functionally-equivalent-to-the-method-f"></a>

```
function example() {
    console.log(this)
}
const boundExample = bind(example, {
    a: true
})
boundExample.call({
    b: true
}) // logs { a: true }
```

#### Answer <a href="#span-stylecolorred-answer-10" id="span-stylecolorred-answer-10"></a>

Return a function that accepts an arbitrary number of arguments by gathering them with the rest `...` operator. From that function, return the result of calling the `fn` with `Function.prototype.apply` to apply the context and the array of arguments to the function.

```
const bind = (fn, context) => (...args) => fn.apply(context, args)
```

#### Don't forget: <a href="#span-stylecolorred-dont-forget-10" id="span-stylecolorred-dont-forget-10"></a>

#### Additional links <a href="#span-stylecolorred-additional-links-10" id="span-stylecolorred-additional-links-10"></a>

#### What is the purpose of cache busting and how can you achieve it? <a href="#span-stylecolorred-what-is-the-purpose-of-cache-busting-and-how-can-you-achieve-it" id="span-stylecolorred-what-is-the-purpose-of-cache-busting-and-how-can-you-achieve-it"></a>

#### Answer <a href="#span-stylecolorred-answer-11" id="span-stylecolorred-answer-11"></a>

Browsers have a cache to temporarily store files on websites so they don't need to be re-downloaded again when switching between pages or reloading the same page. The server is set up to send headers that tell the browser to store the file for a given amount of time. This greatly increases website speed and preserves bandwidth.\
However, it can cause problems when the website has been changed by developers because the user's cache still references old files. This can either leave them with old functionality or break a website if the cached CSS and JavaScript files are referencing elements that no longer exist, have moved or have been renamed.\
Cache busting is the process of forcing the browser to download the new files. This is done by naming the file something different to the old file.\
A common technique to force the browser to re-download the file is to append a query string to the end of the file.

* `src="js/script.js"` => `src="js/script.js?v=2"`

The browser considers it a different file but prevents the need to change the file name.

#### Don't forget: <a href="#span-stylecolorred-dont-forget-11" id="span-stylecolorred-dont-forget-11"></a>

#### Additional links <a href="#span-stylecolorred-additional-links-11" id="span-stylecolorred-additional-links-11"></a>

* [Strategies for cache-busting CSS](https://css-tricks.com/strategies-for-cache-busting-css/)

#### How can you avoid callback hells? <a href="#span-stylecolorred-how-can-you-avoid-callback-hells" id="span-stylecolorred-how-can-you-avoid-callback-hells"></a>

```
getData(function(a) {
    getMoreData(a, function(b) {
        getMoreData(b, function(c) {
            getMoreData(c, function(d) {
                getMoreData(d, function(e) {
                    // ...
                })
            })
        })
    })
})
```

#### Answer <a href="#span-stylecolorred-answer-12" id="span-stylecolorred-answer-12"></a>

Refactoring the functions to return promises and using `async/await` is usually the best option. Instead of supplying the functions with callbacks that cause deep nesting, they return a promise that can be `await` ed and will be resolved once the data has arrived, allowing the next line of code to be evaluated in a sync-like fashion.\
The above code can be restructured like so:

```
async function asyncAwaitVersion() {
    const a = await getData()
    const b = await getMoreData(a)
    const c = await getMoreData(b)
    const d = await getMoreData(c)
    const e = await getMoreData(d)
    // ...
}
```

There are lots of ways to solve the issue of callback hells:

* Modularization: break callbacks into independent functions
* Use a control flow library, like async
* Use generators with Promises
* Use async/await (from v7 on)

#### Don't forget: <a href="#span-stylecolorred-dont-forget-12" id="span-stylecolorred-dont-forget-12"></a>

* As an efficient JavaScript developer, you have to avoid the constantly growing indentation level, produce clean and readable code and be able to handle complex flows.

#### Additional links <a href="#span-stylecolorred-additional-links-12" id="span-stylecolorred-additional-links-12"></a>

* [Avoiding Callback Hell in Node.js](http://stackabuse.com/avoiding-callback-hell-in-node-js/)
* [Asynchronous JavaScript: From Callback Hell to Async and Await](https://blog.hellojs.org/asynchronous-javascript-from-callback-hell-to-async-and-await-9b9ceb63c8e8)

#### What is the purpose of callback function as an argument of `setState` ? <a href="#span-stylecolorred-what-is-the-purpose-of-callback-function-as-an-argument-of-setstate" id="span-stylecolorred-what-is-the-purpose-of-callback-function-as-an-argument-of-setstate"></a>

#### Answer <a href="#span-stylecolorred-answer-13" id="span-stylecolorred-answer-13"></a>

The callback function is invoked when `setState` has finished and the component gets rendered. Since `setState` is asynchronous, the callback function is used for any post action.

```
setState({
    name: "sudheer"
}, () => {
    console.log("The name has updated and component re-rendered")
})
```

#### Don't forget: <a href="#span-stylecolorred-dont-forget-13" id="span-stylecolorred-dont-forget-13"></a>

* The callback function is invoked after `setState` finishes and is used for any post action.
* It is recommended to use lifecycle method rather this callback function.

#### Additional links <a href="#span-stylecolorred-additional-links-13" id="span-stylecolorred-additional-links-13"></a>

* [React docs on `setState`](https://reactjs.org/docs/react-component.html#setstate)

#### Which is the preferred option between callback refs and findDOMNode()? <a href="#span-stylecolorred-which-is-the-preferred-option-between-callback-refs-and-finddomnode" id="span-stylecolorred-which-is-the-preferred-option-between-callback-refs-and-finddomnode"></a>

#### Answer <a href="#span-stylecolorred-answer-14" id="span-stylecolorred-answer-14"></a>

Callback refs are preferred over the `findDOMNode()` API, due to the fact that `findDOMNode()` prevents certain improvements in React in the future.

```
// Legacy approach using findDOMNode()
class MyComponent extends Component {
    componentDidMount() {
        findDOMNode(this).scrollIntoView()
    }
    render() {
        return <div / >
    }
}
// Recommended approach using callback refs
class MyComponent extends Component {
    componentDidMount() {
        this.node.scrollIntoView()
    }
    render() {
        return <div ref = {
            node => (this.node = node)
        }
        />
    }
}
```

#### Don't forget: <a href="#span-stylecolorred-dont-forget-14" id="span-stylecolorred-dont-forget-14"></a>

* Callback refs are preferred over `findDOMNode()`.

#### Additional links <a href="#span-stylecolorred-additional-links-14" id="span-stylecolorred-additional-links-14"></a>

* [React docs on Refs and the DOM](https://reactjs.org/docs/refs-and-the-dom.html#exposing-dom-refs-to-parent-components)

#### What is a callback? Can you show an example using one? <a href="#span-stylecolorred-what-is-a-callback-can-you-show-an-example-using-one" id="span-stylecolorred-what-is-a-callback-can-you-show-an-example-using-one"></a>

#### Answer <a href="#span-stylecolorred-answer-15" id="span-stylecolorred-answer-15"></a>

Callbacks are functions passed as an argument to another function to be executed once an event has occurred or a certain task is complete, often used in asynchronous code. Callback functions are invoked later by a piece of code but can be declared on initialization without being invoked.\
As an example, event listeners are asynchronous callbacks that are only executed when a specific event occurs.

```
function onClick() {
    console.log("The user clicked on the page.")
}
document.addEventListener("click",
    onClick)
```

However, callbacks can also be synchronous. The following `map` function takes a callback function that is invoked synchronously for each iteration of the loop (array element).

```
const map = (arr, callback) => {
    const result = []
    for (let i = 0; i < arr.length; i++) {
        result.push(callback(arr[i], i))
    }
    return result
}
map([1, 2, 3, 4, 5], n => n * 2) // [2, 4, 6, 8, 10]
```

#### Don't forget: <a href="#span-stylecolorred-dont-forget-15" id="span-stylecolorred-dont-forget-15"></a>

* Functions are first-class objects in JavaScript
* Callbacks vs Promises

#### Additional links <a href="#span-stylecolorred-additional-links-15" id="span-stylecolorred-additional-links-15"></a>

* [MDN docs for callbacks](https://developer.mozilla.org/en-US/docs/Glossary/Callback_function)

#### What is the `children` prop? <a href="#span-stylecolorred-what-is-the-children-prop" id="span-stylecolorred-what-is-the-children-prop"></a>

#### Answer <a href="#span-stylecolorred-answer-16" id="span-stylecolorred-answer-16"></a>

`children` is part of the props object passed to components that allows components to be passed as data to other components, providing the ability to compose components cleanly. There are a number of methods available in the React API to work with this prop, such as `React. Children.map` , `React. Children.forEach` , `React. Children.count` , `React.Children.only` and `React. Children.toArray` . A simple usage example of the children prop is as follows:

```
function GenericBox({
    children
}) {
    return <div className = "container" > {
        children
    } < /div>
}

function App() {
    return ( <
        GenericBox >
        <
        span > Hello < /span> <span>World</span >
        <
        /GenericBox>
    )
}
```

#### Don't forget: <a href="#span-stylecolorred-dont-forget-16" id="span-stylecolorred-dont-forget-16"></a>

* Children is a prop that allows components to be passed as data to other components.
* The React API provides methods to work with this prop.

#### Additional links <a href="#span-stylecolorred-additional-links-16" id="span-stylecolorred-additional-links-16"></a>

* [React docs on Children](https://reactjs.org/docs/jsx-in-depth.html#children-in-jsx)

#### Why does React use `className` instead of `class` like in HTML? <a href="#span-stylecolorred-why-does-react-use-classname-instead-of-class-like-in-html" id="span-stylecolorred-why-does-react-use-classname-instead-of-class-like-in-html"></a>

#### Answer <a href="#span-stylecolorred-answer-17" id="span-stylecolorred-answer-17"></a>

React's philosophy in the beginning was to align with the browser DOM API rather than HTML, since that more closely represents how elements are created. Setting a `class` on an element meant using the `className` API:

```
const element = document.createElement("div")
element.className = "hello"
```

Additionally, before ES5, reserved words could not be used in objects:

```
const element = {
    attributes: {
        class: "hello"
    }
}
```

In IE8, this will throw an error.\
In modern environments, destructuring will throw an error if trying to assign to a variable:

```
const {
    class
} = this.props // Error
const {
    className
} = this.props // All good
const {
    class: className
} =
this.props // All good, but
cumbersome!
```

However, `class` *can* be used as a prop without problems, as seen in other libraries like Preact. React currently allows you to use `class` , but will throw a warning and convert it to `className` under the hood. There is currently an open thread (as of January 2019) discussing changing `className` to `class` to reduce confusion.

#### Don't forget: <a href="#span-stylecolorred-dont-forget-17" id="span-stylecolorred-dont-forget-17"></a>

#### Additional links <a href="#span-stylecolorred-additional-links-17" id="span-stylecolorred-additional-links-17"></a>

#### How do you clone an object in JavaScript? <a href="#span-stylecolorred-how-do-you-clone-an-object-in-javascript" id="span-stylecolorred-how-do-you-clone-an-object-in-javascript"></a>

#### Answer <a href="#span-stylecolorred-answer-18" id="span-stylecolorred-answer-18"></a>

Using the object spread operator `...` , the object's own enumerable properties can be copied into the new object. This creates a shallow clone of the object.

```
const obj = {
    a: 1,
    b: 2
}
const shallowClone = {
    ...obj
}
```

With this technique, prototypes are ignored. In addition, nested objects are not cloned, but rather their references get copied, so nested objects still refer to the same objects as the original. Deep-cloning is much more complex in order to effectively clone any type of object (Date, RegExp, Function, Set, etc) that may be nested within the object.\
Other alternatives include:

* `JSON.parse(JSON.stringify(obj))` can be used to deep-clone a simple object, but it is CPU-intensive and only accepts valid JSON (therefore it strips functions and does not allow circular references).
* `Object.assign({}, obj)` is another alternative.
* `Object.keys(obj).reduce((acc, key) => (acc[key] = obj[key], acc), {})` is another more verbose alternative that shows the concept in greater depth.

#### Don't forget: <a href="#span-stylecolorred-dont-forget-18" id="span-stylecolorred-dont-forget-18"></a>

* JavaScript passes objects by reference, meaning that nested objects get their references copied, instead of their values.
* The same method can be used to merge two objects.

#### Additional links <a href="#span-stylecolorred-additional-links-18" id="span-stylecolorred-additional-links-18"></a>

* [MDN docs for Object.assign()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)
* [Clone an object in vanilla JS](http://voidcanvas.com/clone-an-object-in-vanilla-js-in-depth/)

#### What is a closure? Can you give a useful example of one? <a href="#span-stylecolorred-what-is-a-closure-can-you-give-a-useful-example-of-one" id="span-stylecolorred-what-is-a-closure-can-you-give-a-useful-example-of-one"></a>

#### Answer <a href="#span-stylecolorred-answer-19" id="span-stylecolorred-answer-19"></a>

A closure is a function defined inside another function and has access to its lexical scope even when it is executing outside its lexical scope. The closure has access to variables in three scopes:

* Variables declared in its own scope
* Variables declared in the scope of the parent function
* Variables declared in the global scope

In JavaScript, all functions are closures because they have access to the outer scope, but most functions don't utilise the usefulness of closures: the persistence of state. Closures are also sometimes called stateful functions because of this.\
In addition, closures are the only way to store private data that can't be accessed from the outside in JavaScript. They are the key to the UMD (Universal Module Definition) pattern, which is frequently used in libraries that only expose a public API but keep the implementation details private, preventing name collisions with other libraries or the user's own code.

#### Don't forget: <a href="#span-stylecolorred-dont-forget-19" id="span-stylecolorred-dont-forget-19"></a>

* Closures are useful because they let you associate data with a function that operates on that data.
* A closure can substitute an object with only a single method.
* Closures can be used to emulate private properties and methods.

#### Additional links <a href="#span-stylecolorred-additional-links-19" id="span-stylecolorred-additional-links-19"></a>

* [MDN docs for closures](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures)
* [What is a closure](https://medium.com/javascript-scene/master-the-javascript-interview-what-is-a-closure-b2f0d2152b36)
* [I never understood JavaScript closures](https://medium.com/dailyjs/i-never-understood-javascript-closures-9663703368e8)

#### How do you compare two objects in JavaScript? <a href="#span-stylecolorred-how-do-you-compare-two-objects-in-javascript" id="span-stylecolorred-how-do-you-compare-two-objects-in-javascript"></a>

#### Answer <a href="#span-stylecolorred-answer-20" id="span-stylecolorred-answer-20"></a>

Even though two different objects can have the same properties with equal values, they are not considered equal when compared using `==` or `===` . This is because they are being compared by their reference (location in memory), unlike primitive values which are compared by value.\
In order to test if two objects are equal in structure, a helper function is required. It will iterate through the own properties of each object to test if they have the same values, including nested objects. Optionally, the prototypes of the objects may also be tested for equivalence by passing `true` as the 3rd argument.\
Note: this technique does not attempt to test equivalence of data structures other than plain objects, arrays, functions, dates and primitive values.

```
function isDeepEqual(obj1, obj2, testPrototypes = false) {
    if (obj1 === obj2) {
        return true
    }
    if (typeof obj1 === "function" && typeof obj2 === "function") {
        return obj1.toString() === obj2.toString()
    }
    if (obj1 instanceof Date && obj2 instanceof Date) {
        return obj1.getTime() === obj2.getTime()
    }
    if (
        Object.prototype.toString.call(obj1) !==
        Object.prototype.toString.call(obj2) ||
        typeof obj1 !== "object"
    ) {
        return false
    }
    const prototypesAreEqual = testPrototypes ?
        isDeepEqual(
            Object.getPrototypeOf(obj1),
            Object.getPrototypeOf(obj2),
            true
        ) :
        true
    const obj1Props = Object.getOwnPropertyNames(obj1)
    const obj2Props = Object.getOwnPropertyNames(obj2)
    return (
        obj1Props.length === obj2Props.length &&
        prototypesAreEqual &&
        obj1Props.every(prop => isDeepEqual(obj1[prop], obj2[prop]))
    )
}
```

#### Don't forget: <a href="#span-stylecolorred-dont-forget-20" id="span-stylecolorred-dont-forget-20"></a>

* Primitives like strings and numbers are compared by their value
* Objects on the other hand are compared by their reference (location in memory)

#### Additional links <a href="#span-stylecolorred-additional-links-20" id="span-stylecolorred-additional-links-20"></a>

* [Object Equality in JavaScript](http://adripofjavascript.com/blog/drips/object-equality-in-javascript.html)
* [Deep comparison between two values](https://30secondsofcode.org/object#equals)

#### What is context? <a href="#span-stylecolorred-what-is-context" id="span-stylecolorred-what-is-context"></a>

#### Answer <a href="#span-stylecolorred-answer-21" id="span-stylecolorred-answer-21"></a>

Context provides a way to pass data through the component tree without having to pass props down manually at every level. For example, authenticated user, locale preference, UI theme need to be accessed in the application by many components.

```
const {
    Provider,
    Consumer
} = React.createContext(defaultValue)
```

#### Don't forget: <a href="#span-stylecolorred-dont-forget-21" id="span-stylecolorred-dont-forget-21"></a>

* Context provides a way to pass data through a tree of React components, without having to manually pass props.
* Context is designed to share data that is considered *global* for a tree of React components.

#### Additional links <a href="#span-stylecolorred-additional-links-21" id="span-stylecolorred-additional-links-21"></a>

* [React docs on Context](https://reactjs.org/docs/context.html)

#### What is CORS? <a href="#span-stylecolorred-what-is-cors" id="span-stylecolorred-what-is-cors"></a>

#### Answer <a href="#span-stylecolorred-answer-22" id="span-stylecolorred-answer-22"></a>

Cross-Origin Resource Sharing or CORS is a mechanism that uses additional HTTP headers to grant a browser permission to access resources from a server at an origin different from the website origin.\
An example of a cross-origin request is a web application served from `http://mydomain.com` that uses AJAX to make a request for `http://yourdomain.com` .\
For security reasons, browsers restrict cross-origin HTTP requests initiated by JavaScript. `XMLHttpRequest` and `fetch` follow the same-origin policy, meaning a web application using those APIs can only request HTTP resources from the same origin the application was accessed, unless the response from the other origin includes the correct CORS headers.

#### Don't forget: <a href="#span-stylecolorred-dont-forget-22" id="span-stylecolorred-dont-forget-22"></a>

* CORS behavior is not an error,  it's a security mechanism to protect users.
* CORS is designed to prevent a malicious website that a user may unintentionally visit from making a request to a legitimate website to read their personal data or perform actions against their will.

#### Additional links <a href="#span-stylecolorred-additional-links-22" id="span-stylecolorred-additional-links-22"></a>

* [MDN docs for CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS)

#### Describe the layout of the CSS Box Model and briefly describe each component. <a href="#span-stylecolorred-describe-the-layout-of-the-css-box-model-and-briefly-describe-each-component" id="span-stylecolorred-describe-the-layout-of-the-css-box-model-and-briefly-describe-each-component"></a>

#### Answer <a href="#span-stylecolorred-answer-23" id="span-stylecolorred-answer-23"></a>

`Content` : The inner-most part of the box filled with content, such as text, an image, or video player. It has the dimensions `content-box width` and `content-box height` .\
`Padding` : The transparent area surrounding the content. It has dimensions `padding-box width` and `padding-box height` .\
`Border` : The area surrounding the padding (if any) and content. It has dimensions `border-box width` and `border-box height` .\
\&#xNAN;*Margin*: The transparent outer-most layer that surrounds the border. It separates the element from other elements in the DOM. It has dimensions `margin-box width` and `margin-box height` .

![alt text](https://bgoonz.github.io/INTERVIEW-PREP-COMPLETE/README_files/boxmodel.gif)

alt text

#### Don't forget: <a href="#span-stylecolorred-dont-forget-23" id="span-stylecolorred-dont-forget-23"></a>

* This is a very common question asked during front-end interviews and while it may seem easy, it is critical you know it well!
* Shows a solid understanding of spacing and the DOM

#### Additional links <a href="#span-stylecolorred-additional-links-23" id="span-stylecolorred-additional-links-23"></a>

* [W3School's CSS Box Model Page](https://www.w3schools.com/Css/css_boxmodel.asp)
* [Mozilla's Intro to the CSS Box Model](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Model/Introduction_to_the_CSS_box_model)

#### What are the advantages of using CSS preprocessors? <a href="#span-stylecolorred-what-are-the-advantages-of-using-css-preprocessors" id="span-stylecolorred-what-are-the-advantages-of-using-css-preprocessors"></a>

#### Answer <a href="#span-stylecolorred-answer-24" id="span-stylecolorred-answer-24"></a>

CSS preprocessors add useful functionality that native CSS does not have, and generally make CSS neater and more maintainable by enabling DRY (Don't Repeat Yourself) principles. Their terse syntax for nested selectors cuts down on repeated code. They provide variables for consistent theming (however, CSS variables have largely replaced this functionality) and additional tools like color functions ( `lighten` , `darken` , `transparentize` , etc), mixins, and loops that make CSS more like a real programming language and gives the developer more power to generate complex CSS.

#### Don't forget: <a href="#span-stylecolorred-dont-forget-24" id="span-stylecolorred-dont-forget-24"></a>

* They allow us to write more maintainable and scalable CSS
* Some disadvantages of using CSS preprocessors (setup, re-compilation time can be slow etc.)

#### Additional links <a href="#span-stylecolorred-additional-links-24" id="span-stylecolorred-additional-links-24"></a>

* [CSS Preprocessors](https://medium.com/@garyfagan/css-preprocessors-6f226fa16f27)

#### What is the difference between '+' and '\~' sibling selectors?. <a href="#span-stylecolorred-what-is-the-difference-between-and-sibling-selectors" id="span-stylecolorred-what-is-the-difference-between-and-sibling-selectors"></a>

#### Answer <a href="#span-stylecolorred-answer-25" id="span-stylecolorred-answer-25"></a>

The General Sibling Selector `~` selects all elements that are siblings of a specified element.\
The following example selects all `<p>` elements that are siblings of `<div>` elements:

```
div ~ p {
  background-color: blue; 
}
```

The Adjacent Sibling Selector `+` selects all elements that are the adjacent siblings of a specified element.\
The following example will select all `<p>` elements that are placed immediately after `<div>` elements:

```
div + p {
  background-color: red;
}
```

#### Don't forget: <a href="#span-stylecolorred-dont-forget-25" id="span-stylecolorred-dont-forget-25"></a>

#### Additional links <a href="#span-stylecolorred-additional-links-25" id="span-stylecolorred-additional-links-25"></a>

* [W3School's CSS Combinators Page](https://www.w3schools.com/css/css_combinators.asp)
* [Mozilla's Combinators and groups of selectors page](https://developer.mozilla.org/en-US/docs/Learn/CSS/Introduction_to_CSS/Combinators_and_multiple_selectors)

#### Can you describe how CSS specificity works? <a href="#span-stylecolorred-can-you-describe-how-css-specificity-works" id="span-stylecolorred-can-you-describe-how-css-specificity-works"></a>

#### Answer <a href="#span-stylecolorred-answer-26" id="span-stylecolorred-answer-26"></a>

Assuming the browser has already determined the set of rules for an element, each rule is assigned a matrix of values, which correspond to the following from highest to lowest specificity:

* Inline rules (binary - 1 or 0)
* Number of id selectors
* Number of class, pseudo-class and attribute selectors
* Number of tags and pseudo-element selectors

When two selectors are compared, the comparison is made on a per-column basis (e.g. an id selector will always be higher than any amount of class selectors, as ids have higher specificity than classes). In cases of equal specificity between multiple rules, the rules that comes last in the page's style sheet is deemed more specific and therefore applied to the element.

#### Don't forget: <a href="#span-stylecolorred-dont-forget-26" id="span-stylecolorred-dont-forget-26"></a>

* Specificity matrix: \[inline, id, class/pseudo-class/attribute, tag/pseudo-element]
* In cases of equal specificity, last rule is applied

#### Additional links <a href="#span-stylecolorred-additional-links-26" id="span-stylecolorred-additional-links-26"></a>

* [CSS Specificity](https://www.smashingmagazine.com/2007/07/css-specificity-things-you-should-know/)

#### What is debouncing? <a href="#span-stylecolorred-what-is-debouncing" id="span-stylecolorred-what-is-debouncing"></a>

#### Answer <a href="#span-stylecolorred-answer-27" id="span-stylecolorred-answer-27"></a>

Debouncing is a process to add some delay before executing a function. It is commonly used with DOM event listeners to improve the performance of page. It is a technique which allow us to "group" multiple sequential calls in a single one. A raw DOM event listeners can easily trigger 20+ events per second. A debounced function will only be called once the delay has passed.

```
const debounce = (func, delay) => {
    let debounceTimer;
    return function() {
        const context = this;
        const args = arguments;
        clearTimeout(debounceTimer);
        debounceTimer = setTimeout(() => func.apply(context, args), delay);
    }
}
window.addEventListere('scroll', debounce(function() {
    // Do stuff, this function will be called after a delay of 1 second
}, 1000));
```

#### Don't forget: <a href="#span-stylecolorred-dont-forget-27" id="span-stylecolorred-dont-forget-27"></a>

* Common use case is to make API call only when user is finished typing while searching.

#### Additional links <a href="#span-stylecolorred-additional-links-27" id="span-stylecolorred-additional-links-27"></a>

* [Debouncing explained](https://css-tricks.com/debouncing-throttling-explained-examples/)

#### What is the DOM? <a href="#span-stylecolorred-what-is-the-dom" id="span-stylecolorred-what-is-the-dom"></a>

#### Answer <a href="#span-stylecolorred-answer-28" id="span-stylecolorred-answer-28"></a>

The DOM (Document Object Model) is a cross-platform API that treats HTML and XML documents as a tree structure consisting of nodes. These nodes (such as elements and text nodes) are objects that can be programmatically manipulated and any visible changes made to them are reflected live in the document. In a browser, this API is available to JavaScript where DOM nodes can be manipulated to change their styles, contents, placement in the document, or interacted with through event listeners.

#### Don't forget: <a href="#span-stylecolorred-dont-forget-28" id="span-stylecolorred-dont-forget-28"></a>

* The DOM was designed to be independent of any particular programming language, making the structural representation of the document available from a single, consistent API.
* The DOM is constructed progressively in the browser as a page loads, which is why scripts are often placed at the bottom of a page, in the `<head>` with a `defer` attribute, or inside a `DOMContentLoaded` event listener. Scripts that manipulate DOM nodes should be run after the DOM has been constructed to avoid errors.
* `document.getElementById()` and `document.querySelector()` are common functions for selecting DOM nodes.
* Setting the `innerHTML` property to a new value runs the string through the HTML parser, offering an easy way to append dynamic HTML content to a node.

#### Additional links <a href="#span-stylecolorred-additional-links-28" id="span-stylecolorred-additional-links-28"></a>

* [MDN docs for DOM](https://developer.mozilla.org/en-US/docs/DOM)

#### What is the difference between the equality operators `==` and `===` ? <a href="#span-stylecolorred-what-is-the-difference-between-the-equality-operators-and" id="span-stylecolorred-what-is-the-difference-between-the-equality-operators-and"></a>

#### Answer <a href="#span-stylecolorred-answer-29" id="span-stylecolorred-answer-29"></a>

Triple equals ( `===` ) checks for strict equality, which means both the type and value must be the same. Double equals ( `==` ) on the other hand first performs type coercion so that both operands are of the same type and then applies strict comparison.

#### Don't forget: <a href="#span-stylecolorred-dont-forget-29" id="span-stylecolorred-dont-forget-29"></a>

* Whenever possible, use triple equals to test equality because loose equality `==` can have unintuitive results.
* Type coercion means the values are converted into the same type.
* Mention of falsy values and their comparison.

#### Additional links <a href="#span-stylecolorred-additional-links-29" id="span-stylecolorred-additional-links-29"></a>

* [MDN docs for comparison operators](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators)

#### What is the difference between an element and a component in React? <a href="#span-stylecolorred-what-is-the-difference-between-an-element-and-a-component-in-react" id="span-stylecolorred-what-is-the-difference-between-an-element-and-a-component-in-react"></a>

#### Answer <a href="#span-stylecolorred-answer-30" id="span-stylecolorred-answer-30"></a>

An element is a plain JavaScript object that represents a DOM node or component. Elements are pure and never mutated, and are cheap to create.\
A component is a function or class. Components can have state and take props as input and return an element tree as output (although they can represent generic containers or wrappers and don't necessarily have to emit DOM). Components can initiate side effects in lifecycle methods (e.g. AJAX requests, DOM mutations, interfacing with 3rd party libraries) and may be expensive to create.

```
const Component = () => "Hello"
const componentElement = < Component / >
    const domNodeElement = < div / >
    
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bryan-guner.gitbook.io/my-docs/job-search/resources/job-search-advice.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
