Weekly Digest #39
2 min readAug 23, 2021
Articles
Best practices for dependency management
- Version pinning
- Signature and has verification
- Lockfiles and compiled dependencies
- Mixing private and public dependencies (be care of the dependency confusion attack)
- Removing unused dependencies
- Vulnerability scanning
Surviving guide for a tech startup aka How to properly bootstrap your startup — Part 2
every line of code is a liability: you need to maintain it
- Focus on your core values
- To mobile or not
- To SPA (Single page app) or not
- Backend/API
- Database
- Hosting
“It actually is a circle,” Bezos said. “It’s not a balance.”
Tutorials
Two-row model:
| user1_id | user2_id |
|---------------------|
| 3 | 5 |
| 5 | 3 |
-----------------------
- Deleting friendship: a two-part DELETE command is needed;
- Getting the list of friends: straightforward query;
- Are they friends?: straightforward query;
- Storage requirements: data size is twice as large;
- Potential invariant violations: only one of two rows is present;
Single-row model:
CREATE TABLE mutual_friendship (
user1_id INTEGER NOT NULL,
user2_id INTEGER NOT NULL,
PRIMARY KEY (user1_id, user2_id)
);| user1_id | user2_id |
|---------------------|
| 3 | 5 |
- Deleting friendship: pre-processing is needed before DELETE;
- Getting the list of friends: two-part query is needed;
- Are they friends?: pre-processing (or two-part query) is needed;
- Storage requirements: optimal data size, but an additional index would be needed;
- Potential invariant violations: two symmetric rows; wrong order of IDs.
Tools
Easy and fast file sharing from the command line. This code contains the server with everything you need to create your own instance.
Off-topic
The Awe-Inspiring Pebble Mosaics of Justin Bateman
Why Australia’s Trash Bin–Raiding Cockatoos Are the ‘Punks of the Bird World’