Intern learning objectives: Backend Lite

Backend Lite learning objectives:

1️⃣ Learn technical qualifications:

  1. ✅ Learn and write reports about these technologies.
  2. ✅ Be able to understand high level backend system design, DB design and create API with tests?
  3. ✅ Know how to create an API to satisfy feature requirements.
  4. ✅ Create a high quality Pull Request for a task.
  5. ✅ Know what to expect in a coding interview, and how to successfully pass a coding interview, Silicon Valley grade.

2️⃣ Learn to work with team members effectively, read and apply all of these in everyday work:

  1. What are high quality code standards and why are they important?
  2. How to create a good PR?
  3. How to meaningfully review your team member's PR?
  4. How to collaborate effectively with team members?
  5. What is your is your input & output?

3️⃣ Combine 1️⃣ + 2️⃣ to ramp up work output volume to match a Backend Software Engineer's (senior team member will share useful tips):

  1. 🏋️ Translate any hi-fi design (Zeplin/Figma) to backend API, well tested!
  2. 🏋️ Optimize for speed: optimize code complexity and DB queries for maximum performant. Ideally, any backend API should return response within 100ms or less.

4️⃣ Pass a formal AMO's Backend interview process, (Silicon Valley grade).

5️⃣ If you make it here, you're now a hotshot. You've become a Backend Software Engineer, AMO (rigorous) standards. You can work as a Backend Software Engineer, and in the meantime, continue with Frontend learning to become a Fullstack Software Engineer.

6️⃣ Keep AMO's vision in mind!


Execution plan

For each ✅: learn + mini task + and write a brief report, describing in your word: what did you learn, what's the connection between the task with the knowledge you learn. How does your knowledge help you do the task better?

For each 🏋️: execute tasks and measure the time. Repeat as much as needed to a desired output velocity.

Pace yourself. Don't rush and burn. Don't lag behind. It's a marathon, not a sprint.

Be honest, proactive, humble, open minded, curious, responsible, respectful.


Progress checkup

Use this simple progression timeline to see where you are with your development:

1️⃣ Simple bug fix -> 2️⃣ Can create a complete API -> 3️⃣ 100 API PR creation with average comments less than 3 -> 4️⃣ Suggest backend system improvement for more productivity and security -> 5️⃣ own a simple backend service -> 6️⃣ can transform any design into simple, performant backend design and implementation.


Technologies, table of learnings:

  1. Git version control and coding standards
  2. Javascript
  3. HTTP/HTTPS protocol
  4. Internet Browser (Chrome for example)
  5. Data structures and algorithms.
  6. Analytical problem solving skills.
  7. HTTP/HTTPS server Nginx.
  8. Node.js lite.
  9. Express.js HTTP server.
  10. Validation with Joi.
  11. Unit test with Jest.
  12. MongoDB lite.
  13. Normalized DB design simple rules.
  14. Mongoose: apply normalized DB design simple rules.
  15. How to understand an existing, "complicated" DB.
  16. Pub/Sub Advanced Message Queuing Protocol (AMPQ) with NATS.
  17. Docker & Compose lite.
  18. Cloud services.
  19. Memory leak.
  20. DNS.
  21. Computer Process.

Git version control and coding standards

  1. Follow this short tutorial to learn git: create branch, push changes, create PR
  2. Code along tutorial with git
  3. Understand more about feature branches
  4. Learn by heart: high quality code standards, PR creation guidelines and PR review guidelines. We will have periodic reviews of these items in standups. Team member who does not remember these items is 3 times is out of the team, no exception.
  5. Task: apply all above to create an example PR on github and have it reviewed + approved by a team member.

Javascript

  1. What is Javascript?
  2. Do you know (almost) everything about Javascript?
  3. How does Javascript help to display/interact with contents on a browser?
  4. If you know Javascript, you're in the pilot seat to control your browser. You can command the browser to do whatever you want it to do. Give a few examples with code.

HTTP/HTTPS protocol

  1. What is client/server architecture? On your daily use, name 5 different services which are using this architecture.
  2. What is peer-to-peer architecture? Name 5 different services you know which are using this architecture.
  3. What are the different use cases/pros/cons of these 2 architectures?
  4. What is HTTP?
  5. What is HTTPS?
  6. At what layer within the OSI model does HTTP/HTTPS live?
  7. In your words, describe how this protocol works.
  8. Name popular HTTP/HTTPS: headers, methods, status codes.

Internet Browser (Chrome for example)

  1. List 5 things that a browser can do.
  2. When you enter youtube.com to your browser, what does your browser do to display the content you see? (read: how browser render a webpage)
  3. What are browser APIs? List 10 popular API categories that browsers can do.
  4. Putting all above together (only use above technologies), write the follow programs:

    • Web app webcam: use browser api to take input from your computer camera and display it on the web application. Create a toggle button where the user clicks to turn the camera on/off (on by default).
    • SESV latest: use browser Fetch api to get the latest tutorials list and display it on your web application. Create a Manual fetch button so users can click and fetch the latest content if they want to.
    • User friendly: for all user interactions above, add confirmation message to confirm that user wants to do that action, and web app's success/failure message accordingly. Change the color/shade of the button when the user hover on it to inform the user that the button is clickable.
    • Simple calculator: design and implement a simple calculator like the one on your phone.

HTTP/HTTPS server Nginx

  1. What is an HTTP/HTTPS server?
  2. An HTTP/HTTPS server basically can response to any kinds of request from client. Watch this short Nginx Server introduction and reference Nginx official docs, as well as the internet if needed to:

    • install nginx to your local machine
    • serve html content with your nginx
    • serve images with your nginx
    • serve videos with your nginx
    • serve 404 with your nginx
    • serve 301 with your nginx
  3. Nginx is known for its well performance. What is the one most important feature in Nginx design that makes it gains such reputation?
  4. What is a proxy server? Why do we need it? And why Nginx is usually used as a proxy server?

Node.js lite

  1. Explain the origin of Node.js from V8.
  2. ECMA is specs and V8 is implementation of that specs. In 4-5 sentences, explains this as easy to understand as talking to a 10 years old child.
  3. One key thing in design that makes Node.js popular is Node.js is an event driven and non-blocking I/O. In 4-5 sentences, explains this concept.
  4. Install Node.js to your local machine.
  5. Node.js can do quite many things. Read the official docs and the internet to:

    • Create an http server with built-in http module and serve html, images, videos.
    • Create an http client with built-in http module and visit google.com then print out the content you recieve.
    • Use Node.js's File System API to create a text with random content. Write this text to your local machine as random.txt. Write code to perform CRUD operation on this file.
    • Use Crypto API to encrypt and decrypt text.

Express.js HTTP server

  1. What does it mean when Express calling itself as "Fast, unopinionated, minimalist web framework for Node.js"?
  2. Create an HTTP server with Express
  3. Express middeware is a clever way to create separated logics to handle an http request. Write 3 separate middlewares to:

    • 1st authentication: check if request payload has secret key A. If yes, carry on to the next middelware. If no, reject the request with 403.
    • 2nd role check: check if request payload has role X to access this API. If yes, carry on to the next middelware. If no, reject the request with 403.
    • 3rd response: wait for 2 seconds then return json { reward: here's your cookies } to caller.

Validation with Joi

  1. What can Joi do?
  2. The most important things for validation is to avoid thrashy data and malicious input. How can Joi help?
  3. Use Joi to validate number, string, email, phone numbers.

Unit test with Jest

  1. Test is to put our function in different scenarios (mimicking real life use) to make sure the function behave correctly, ideally in any situation in real life.
  2. Tests help us to think ahead of time and predict what can happen with function inputs before shipping code. Hence, tests improve reliability and help to ship code with more confidence.
  3. use Jest to setup test environment and test functions.
  4. Use mock and jest object mock out external function calls to create more real life, sophisticated test cases.
  5. What are the similarities and differences between mock and jest object functions?

MongoDB lite

  1. Database is a crucial component of backend. Learn about NoSQL MongoDB for beginners here.
  2. SQL databases like PostgreSQL are still very popular and a must know.
  3. Install PostgreSQL in your local machine and learn SQL syntax to CRUD people table, email table and perform JOIN operation on these table.

Normalized DB design simple rules

  1. Normalized DB design is a extremely popular DB design pattern that almost all companies are using.
  2. In short, Normalized DB helps to maintain DB with no duplicated data. So when you perform andy CRUD operation on your data, you only have to do it one time.
  3. Read and then practice more about it here

Mongoose: apply normalized DB design simple rules

  1. How to model one-to-one relationship with MongoDB?
  2. How to model one-to-many relationship with MongoDB?
  3. How to model many-to-many relationship with MongoDB?
  4. What is a transaction? How to use transaction with Mongoose?
  5. Code your own grocery store DB modeling contains all above relationships and perform CRUD, populations on them.

How to understand an existing, "complicated" DB

  1. A well designed DB, no matter SQL or NoSQL follows the simple normalized DB design rules. So it's very predictable.
  2. Your purpose is not to know all the relationships of tables or collections in the db. Your purpose is to perform CRUD on data. So don't try to "understand" the existing vast, enormous amount of db tables and collections.
  3. To perform a CRUD on a table or collection with relationship with others. Simply identify which of these three relationships one-to-one, one-to-many, many-to-many and then apply the pattern you have learn to operate.
  4. Question: imagine you just joined a company and tasked to work on an existing software product. How do you perform a CRUD on user's email addresses?

Pub/Sub Advanced Message Queuing Protocol (AMPQ) with NATS

  1. Publish/Subscribe message protocol is very popular is large scale backend infrastructure. This component is the key thing for system automatic horizonal scaling.
  2. Read more about Pub/Sub popular Advanced Message Queuing Protocol
  3. There's many implementations for AMPQ such as: Open Source Messaging: NATS, RabbitMQ, Apache Kafka, hmbdc, Synapse, NSQ and Pulsar, ...
  4. Focus on NATS and know how to use it.
  5. Install NATS and create pub/sub processes with it: one-one, one-many, many-many, ...

Docker & Compose lite

  1. Docker in 12 minutes
  2. Docker Compose in 12 minutes
  3. Can use and understand yellow highlighted Docker & Compose comands in this file.
  4. Putting them all together: create a Compose file to pull Node, MongoDB and NATS images. Create 2 processes talks to each other via NATS and return data to other process requests from MongoDB

Cloud services

  • AWS: use free tier (no cc required, no charge) to understand what popular services are and how to use them with Node.js: EC2, S3, Route53, SNS, EFS, EBS, LEX, SES.
  • GCP: use free tier to discover equivalent to AWS services from Google.
  • Azure: use free tier to discover equivalent to AWS services from Microsoft.

Memory leak

  1. What is memory leak in JS (show example with code, Chrome devtool can track this, show graph in Chrome devtool that indicates memory leak)
  2. What are the effects of memory leak to our application and why should we avoid them?
  3. Create a systematic way to read code and detect memory leaks manually.
  4. What are the best practices to avoid memory leak when writing code?
  5. Chrome devtool can connect to NodeJS and track objects with memory sizes. Write a simple script to automatically detect objects leaking memory and prompt to users the object/variable names. It would be great to have a UI to show abnormally object/variable memory usage behaviors.

DNS

  1. Domain Name System (DNS) was born to serve what purpose? Why do we need it? How does it work?
  2. Who are the popular DNS providers nowadays? Can we change providers for our domain?
  3. How do we register a domain?
  4. Name top 8 popular DNS records and describe how they can help to serve the purpose in (1).
  5. Most home routers are DNS servers. If that’s the case, try to discover computers within your home network using your computers’ hostname.
  6. What is domain reputation?
  7. Who has the authority to decide the reputation of a domain?
  8. How good/bad domain reputation affects our system/business?
  9. How do we improve/protect our domain reputation?

Computer Process

  1. What is the process? What is a program?
  2. Process's states?
  3. How to interact with processes on the computer?
  4. How do 2 processes communicate? Demo
  5. There are several ways to initiate a new process in Nodejs, what are they and differences between them?