• Remember, node allows server side use of js. You can write your app in js instead of python. This allows you to build content BEFORE responding to requests, rather than waiting until the browser builds the dom and then manipulating it clientside. Express is then the framework, just like flask. Adonis is another popular one. Npm is node’s package manager, just like pip.
    • Mongo tutorial. Mongoose is the node library to interface with it.
    • Node tutorial. It’s single-threaded, non-blocking, and asynchronous. Package.json, node_modules, package-lock.json (if either is modified). `node filename.js`. There are core modules, like the python standard lib (http, fs, os, path, etc). There are also events and timers, just like javascript.
    • Streams are an important concept. Say I had a large 1GB text file. If a user requests it, you don’t want to load the whole file in memory then serve it. You can send the response through a stream, which only gives a chunk at a time. This will load your server less. You can also do this with writable streams. You can also do this will stuff that isn’t a file, like a connection (socket).
    • TCP does ordering and checksum verification behavior. UDP does not.
    • DIfference between socket and websocket? A socket is much more general, just a send/receive connection over TCP/IP. A websocket is a type of socket – usually one that uses HTTP and lasts permanently. You can think of a socket as a lowlevel TCP network layer, then websocket is an application layer above it (just like HTTP).
    • Postman is a cool tool for API development (so you don’t have to curl your server over and over).
    • JWT = JSON web tokens. If I login in to a website, its authentication server can return a JWT. Then if I make subsequent API calls to the application, I pass the JWT instead of my creds again. It’s just an auth token. It’s signed and encoded, but it’s not encrypted (it’s not hiding anything, it’s not my password).
    • HN
    • Cat training.
      • 2nd attempt at the orange tray with the hole today. Failure: he pooed on the bathroom floor. Full story below.
        • Gbro has been using litter his entire life, literally for years. He’s been using the litterbox on top of the toilet for over a month, with no issues. Same litter, same location. Now let’s introduce a little change. The litterbox tray is swapped out for one with a small hole in it, beginning the process of training while the hole gradually opens over a long period of time. Every waking hour for about a day I’ve been placing him on the toilet in the correct position. Giving him exact instructions for literally where to place all four feet, as well as his butt. After not going to the bathroom for a while, he begins meowing. I place him on the toilet again, for maybe the twentieth time, his butt 1 inch away from the same litter he’s known his entire life. He jumps off. A minute passes and he meows again with urgency. I place him back on the toilet. He sits. He meows. All he has to do is simply let go. He jumps off. I go to the kitchen to get some coffee. I come back and he dumped all over the bathroom floor. Oh I’m sorry, was the small hole new? Was it unfamiliar? SO IS THE FLOOR, WHICH YOU’VE NEVER USED IN YOUR ENTIRE LIFE.
      • There is a set of in-between trays with better hole sizes to transition. It’s a set of two, one for between red and orange, and another for between orange and green. It’s FORTY FIVE DOLLARS for two pieces of plastic. Nope.
      • Instead, I applied duct tape underneath the hole. It’s full right now, but I’ll slowly open up a gap. I had to tape long strings to reach the vertical portions of the plastic, otherwise it couldn’t bear the cat’s load.
    • Volunteering. Looked up a few opportunities in the south bay. I have the time right now, and I think it would be a wonderful way to give back, as well as grow myself.
      • Walk With Sally. Kids who have been impacted by cancer (lost a parent, etc). Tried to sign up, but the form was broken.
      • PCAP (Prostate Cancer Awareness Project). Tried to sign up, but the form was broken.
      • SPCA (Animals!). You have to commit for 6 months. The first step is an infosession, with the next one scheduled for March 6th.
      • Cancer Support Community of Redondo Beach. Emailed info@cancersupportredondobeach.org to ask about opportunities!
    • Organized my training schedule for the next couple weeks, breaking down all the technical tutorials I’d like to complete before applications.
    • Mosaic was probably the first browser monopoly. Then Netscape. Then Internet Explorer. Then enter the modern age.
    • Browsed the Eloquent Javascript book: https://eloquentjavascript.net. Good stuff.
    • Mocha and Jasmine are probably the two most popular testing frameworks for javascript.
    • Fantastic tutorial on the nitty gritty of building an emulator: http://www.emulator101.com/. I skimmed it, but I’m not going to go through the entire thing right now.
    • /opt is for third-party packages, not part of the OS distribution. /var is for logs. /usr is for applications installed by the administrator (first-party packages).
    • No Starch Press is a service that provides nerdy books: https://nostarch.com/about. I’d subscribe to a weekly digest, but it’s not digital.
    • Sass is an awesome CSS extension. It allows you to specify variables, nest selectors, import other files, functions (mixins), define blocks of style (like classes) and have other blocks compose (add) them, and arithmetic operators!