-
- Called a few motorcycle service centers in the bay to make sure they’d be prepared for a quick visit this weekend. Peninsula Motorsports was the closest one that is open on Saturdays (Monday is a holiday so I’d have to do service Tues and leave Wednesday otherwise). I called and ordered front and rear new Michelin Pilot Road tires. Better for commute and wet roads. Should be a little under $350 for both.
- Took the Ninja off my auto insurance policy and added the BMW in its place. Premium went up by about $30. Would have been $450 to just add it, about the same as the Ninja. Insuring the salvage vehicle is less of a return.
- SC
- Moved the flask-user templates into my app dir so that I could customize the email text. Played around with the insertion of a brady image into the body of the html email, but image embed has a lot of caveats. You can base64 encode the source image into a string and include that, which seems to be the safest. In any case, I left everything as the default for now.
- PyCharm professional has a built-in DB browser. Maybe I’ll get it later. For now, I’ll use external tools to fill the holes. Ended up finding a free plugin (database-navigator). Allows basically the same functionality as db browser. Love it.
- Awesome report about who requested user data and if Reddit complied: https://www.redditinc.com/policies/transparency-report-2018.
- Remember, MongoDB can just be thought of as an efficient, persistent dictionary. There’s flask_pymongo to integrate mongo easily with flask apps, and there’s flask_mongoalchemy as an ORM.
- Read founder’s weekly.
-
- Internal Revenue Code (IRC) Section 83(i) is the one that states that taxes on ISO and RSU exercise can be deferred for 5 years, avoiding the AMT trap.
- i18n = internationalization, l10n = localization, g11n = globalization. It’s the first and last letter, then the number of letters in between. These are the standards for software to basically translate between languages. It means you can have one website and use flask-babel to serve it in english and chinese, rather than having two templates for everything.
- SC
- To override basic templates (and just check what sort of stuff flask-user gives you under the hood), go to site-packages/flask_user. The views under the hood are expected infrastructural ones: login, logout, forgot_password, change_password, register, confirm_email, that sort of stuff. The templates under the hood basically have the same names and roles.
- Proper flask secret key again with urandom.
- Integrated the supercontest with the flask-user example I had been sandboxing. Email registration and user management now fully works with the sbsc. Styling is gross, but that will come later – it works!
- Played with the username capability of flask-user. It’s not as seamless. I’m just gonna keep email for now.
- Joe Rogan tweeted about Tesla after close at $312.84. Curious what tomorrow opens at.
- Elon’s first son, Nevada, was 10 weeks old and died of SIDS. They then had twins: Griffin and Xavier. Then they had triplets: Kai, Saxon, and Damian.
-
- Updated resume and sent it to a woman I met at CrossFit on Saturday, Eunice Quezon. She’s from the bay but currently works as a technical PM at Warner Bros in LA.
- Researched beef cuts and grades. Already knew prime -> choice -> select, but was curious which part of the cow the cuts were from:
- The chuck is the front shoulders, around the neck The round and shank are the rear legs / butt area. Neither of these produce the incredible cuts. They’re better for burgers, pot roasts, rump roasts.
- The brisket is the pec. Below the head, above the legs.
- Everything else is in the region between the legs. 3 primary sections, from head to tail: rib, short loin, sirloin.
- Rib: ribs, ribeyes.
- Short loin: t-bone, porterhouse, filet mignon (tenderloin).
- Sirloin: tri-top, sirloin.
- The last section is the belly underneath those three, called the plate and flank. That’s where we get skirt steak and flank steak.
- SC
- Created a ticket for the production deployment container: https://github.com/brianmahlstedt/supercontest/issues/27.
- Downloaded sqlite db browser (same one I had on my SpaceX MBA). Just makes it easier to graphically observe a db, rather than prodding it from the command line.
- Had to go into the southbaysupercontest gmail account and enable access for less secure apps again. I thought I had already, but in any case it’s working now.
- Went through Ling Thio’s starter app, comparing and merging with my supercontest app to template some of the basics. Looks good.
- Pruned a lot of the flask-simple-app for my purposes. Refreshed on many flask extensions, like -login, -wtf, etc.
- There is a lot of stuff that these extensions provide under the hood. I like that, but I also hate it. You get a ton of methods, decorators, and properties like current_user, login_user(), roles_required, blah blah. It also gives you entire routes and views, like the /user/ subdomain.
- A nice all-in-one flask template app which serves a site with forums; https://github.com/akprasad/flask-forum.
- reCAPTCHA is an open source project from Google that allows easy captcha integration.
- A rainbow table is the table used in a dictionary attack, the one I mentioned above. It’s a list of common passwords and their algorithm-hashed results, to compare to other databases for matches.
-
- Gunicorn has a reload option for workers, just like flask’s debug=True. If any files change, the service restarts.
- Read https://blog.hasura.io/how-to-write-dockerfiles-for-python-web-apps-6d173842ae1d/, although I knew most about Dockerfiles already.
- Redux comes in for state management.
- Read https://medium.freecodecamp.org/a-study-plan-to-cure-javascript-fatigue-8ad3a54f2eb1, although I already feel pretty comfortable in the web ecosystem already! Shows how far I’ve come since I first wrote it down on the to-do list.
- Reread the summary roadmaps for frontend, backend, and devops: https://github.com/kamranahmedse/developer-roadmap. Such a good infographic. Starred it.
- Huge digital textbook on algorithms: http://jeffe.cs.illinois.edu/teaching/algorithms/book/Algorithms-JeffE.pdf. I won’t read it, but it’s a good reference.
- Netflix suggestions?
- Deal for in-theatre movies to be available for the app, on a pay-per-view sense.
- Ratings. Badges for rotten tomatoes, imdb, and metacritic.
- Video podcasts.
- Filter by director, actor, award, etc.
- Put year on mini preview.
- When casting starts, automute computer (well, the videos on the netflix site).
- Include a coming soon row, to grow excitement.
- Sports content.
-
- 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!
-
- JQuery and Angular tutorials.
- Smoked a brisket. Looked up Traeger and Yoder grills. There are some awesome smokes (and pellets) out there. Would like to upgrade at some point in the future.
- Survey of Python devs in 2018: https://www.jetbrains.com/research/python-developers-survey-2018/.
- Webdev, machine learning, data analysis, all expected.
- 84% on py3, only 16% on 2. Surprised by this.
- Flask beat out Django! 47% to 45%.
- Pytest beat unittest.
- PostgreSQL beat MySQL and SQLite.
- Ansible beat Puppet.
- Jenkins beat Gitlab, Travis, and Bamboo (which was only 3%).
- A piece of sx-setuptools that Spencer outsourced! https://github.com/sputt/qer.
- Remember, AJAX isn’t a language. It’s primarily just the use of an XMLHttpRequest object to retrieve new data asynchronously, allowing you to refresh a portion of a page without reloading the whole site. It usually is registered as an onclick function, fetches data, then updates elements in the current dom as needed.
-
- Bitwise operation tutorial on sololearn. Basically just convert to binary, then compare the two bytes (or however many). Each will be a row of 8 numbers and perform the Boolean operator on each digit (columns). And, or, xor, not, masking, shifting.
- Cryptography tutorial on sololearn. Symmetric encryption is when the same key encrypts and decrypts. This is like a cypher. Asymmetric encryption is when two keys are used (like public/private in RSA). == at the end means a key is base64.
- Databases do not store your password. They use a one-way hash to encrypt it, then next time run it through the same encryption and see if the result matches, not your password.
- If someone ever got a hold of the algorithm, they could just run a TON of common passwords through it, then compare to the database to find matches. This is a dictionary attack. The was around this is by salting, where a secret key (random string, usually) will be added to the password before hashing it.
- Created a journal for all my BBQ sessions! Backfilled the previous.
- Bootstrap tutorial, sololearn.
- Called Del Amo to check on the crash estimate. Their Ducati tech is pretty backed up but he should have the estimate soon.
- Added my BMW information to all my docs. Looked at AAA insurance for it. I’ll do the swap (taking ninja off) next week before I head up north.
- jQuery, React, Angular, and Vue are frontend framework leaders.
- Kotlin is a modern alternative to Java. You can write the server backend with this. It can be used to write an app where PHP or Python would otherwise, but its primary use right now is for Android apps. Swift is still primarily used for iOS apps.
- React Native allows you to build both the frontend and the backend with the same language (so you don’t need Swift or Kotlin or Java). It’s pure javascript (with React as well, obviously). This means the same application source is used for all platforms.
- CDN = content delivery network. Usually a URL you can point to in an HTML file to include another library, like jquery.