-
- Remember duck typing, as opposed to strong typing. It means you don’t need to specify type; if it looks like a duck and walks like a duck, it’s probably a duck.
- snake_case. camelCase. PascalCase.
- Node.js is javascript without a browser. It’s a runtime environment. While js runs natively in the browser for client-side scripting, node allows js to run server-side as well.
- Java and C++ are faster than javascript (or nodejs), by about a factor of 2. Python and Ruby are slower, by about a factor of 5-10.
- Finished the Openlearn JS course.
- Move all new programming courses to drive (in separate docs, rather than this blog).
- Compiled some level info. This is all for senior software engineer.
Company
|
Salary/yr
|
Stock/yr
|
Bonus
|
Google
|
177299
|
153754
|
35346
|
Facebook
|
179000
|
159579
|
28974
|
Microsoft
|
155059
|
29311
|
24695
|
Amazon
|
154259
|
150648
|
19227
|
Apple
|
178131
|
98820
|
25721
|
Netflix
|
425000
|
7750
|
0
|
- Finished the Openlearn PHP course. Didn’t really take notes or memorize this, just kinda wanted to get a feel for how things were done a while ago. Modern languages have more comprehensive server-side scripting capability (even the Python I’m also an expert at).
- Updated resume with some of the recent frameworks I’ve been studying.
- Php studying! Added doc to programming notes.
- Cookies are small files that the server gives back to the client. They contain information about the transaction, allowing a “session” to continue with that data (until expiration). They could contain a username or something else that you don’t want to have to provide every single time over and over and over with each subsequent request.
- The browser will send cookies (for that domain) with each request (if they exist), then the server usually checks for them (if they exist) and skips some logic if they do.
- They can apply to a whole domain, or subsets.
- Third-party cookies: when your server applies it to another domain as well (like for advertisements). This is often looked down upon, for obvious reasons.
- They can be encrypted or not, apply to https or http only, and more. They are not safe for secure information.
- They literally take up space on the client’s machine (albeit small).
- I’ve never had to use NumPy before, since all my linear algebra was in school with MATLAB, but it’s a tool for that. Linear algebra, matrices, n dimensional arrays, etc.
- REST APIs are stateless, remember. You should also use nouns instead of verbs for all routes, except the last one can be a verb. Go from collections (plural) to singletons, like domain/users/bmahlstedt/files/resume.pdf.
- PUT creates a new resource, if not already existent. PUT is idempotent. POST sends data. Sometimes that might mean creating a resource. Not necessarily idempotent.
-
- Instability is not the ladder you want to climb – in regard to staying at a company where lots of people are leaving. Some say that promotions come more easily as gaps open, but this is bad advice.
-
- levels.fyi is a website with TONS of comp information for all the software companies I’m looking at. Based on my level (somewhere II-senior), my goal for base salary is 200k (anywhere) or 400k (netflix). It’s honestly that big of a difference. Equity around 200k is fine. Signing bonus of ~50k is fine.
- Finished HTML sololearn.
- Finished CSS sololearn.
- Supercontest.
- Got everything in working condition again! Cleaned up the git branches and the nginx configuration. They’re nicely symlinked now.
- Just use `python manage.py runserver` for local testing. No reason to involve nginx and the production webserver, unless you’re explicitly testing the proxy aspect or load-testing. Flask-script really is pretty great.
-
-
- Appraisal. Also spoke with the Redondo PD.
- Sololearn. Refresher on details of Lambda, Map (apply func to iterable), Filter (pass args in iterable to function, return item if func returns true), itertools, etc.
- Remember, the three main MUTABLE datatypes in Python are list, set, dict. The others are immutable (str, int, float, tuple, etc). You can mirror another variable to a string, but it actually just copies the value, it doesn’t point to the same id underneath. Better for efficiency, hashing, etc.
- Generators are obviously more efficient. Lower memory footprint. Use when you want to iteratively return from a function.
- PPA = personal package archive. You can add these as repositories and apt-get from them.
- Certs
- Apt updated on the supercontest server because Google changed its Origin.
- TLS-SNI-01 is reaching end of life (at least for Let’s Encrypt support). I updated the Certbot version on the supercontest server (0.28.0 now) and renewed the certs.
- SSH
- AddKeysToAgent yes in .ssh/config means that every key you use will be added to the agent. Very convenient to avoid -i all the time.
- You can also ssh into a hostname, like ssh southbaysupercontest.com.
- You can also create an alias in .ssh/config. Now you can just do `ssh sc`.
- Ran through a whole tutorial of graphql: https://medium.freecodecamp.org/how-to-set-up-a-graphql-server-using-node-js-express-mongodb-52421b73f474.
- Registered with mLab (db-as-a-service for mongo) and created a db.
- Npm for the javascript package.
- Mongoose to connect to the mongo db I created with mLabGr.
- Express as the web framework (like flask).
- Nodemon to start the app in restart-after-changes-mode (debug=True).
- GraphQL allows you to define queries (reads) and mutations (writes). Then the user can add rows, change cols, fetch data, etc! All from the browser.
- GraphiQL is an interactive IDE that runs in the browser, allowing users to explore the db.
-
- COBRA is basically 439/42/11/7 for Health/Dental/Lyra/Vision. Lyra is mental health stuff.
- Given my current situation, I’d only get Health, so COBRA is $440/month.
- Searching healthcare.gov and discoverymarketplace, there are a few other plans: Kaiser, Blue Shield, other big ones, as well as smaller ones like Oscar and Health net.
- The cheapest private plan is $240/month. The deductible is very high (6k).
- My last day to elect COBRA is 4/2/2019.
- Given all the above, the best option is probably to not elect anything unless something happens, then get retro COBRA. You’ll get a new job before 4/2.
-
- Wrote my statement for the Ducati hit-and-run yesterday. Submitted the insurance claim. An officer will meet me to investigate the footage onsite Monday and file the police report, if need be.
- Got the suspect’s insurance information! Full statement in my Google drive.
- HN/PW/NoSQL/FW/M: