A powerful Go web service for template-based PDF generation with multi-page support, PDF merging, form filling, and HTML to PDF/Image conversion
#golang
https://t.co/ch0SB4pw3C
Elon Musk explains how Starship will be plucked out of the air by SpaceX's custom-built tower.
“This is a custom-built tower with arms that are designed to catch the largest and heaviest flying object ever made and pluck it out of the air. That's the theory, anyway.
[Engineer:] Elon just said, delete the legs. Delete. We'll just use the arms. And then, he said it again. Wow, he's serious. Okay, we better get on this. And now it seems normal.
[Elon:] It'll weigh about 250 tons. We'll make that lighter over time. So, you got a couple of hundred tons plummeting more than half the speed of sound. So, this thing is still coming in really fast. Pretty much down in a downward direction.
So then, they light the engines so it's got to slow itself down very fast and correct any error.
Whatever the X-Y error is when the engines land, it's got to take out that X-Y error and then drop the velocity to basically zero, come in between the arms.
The arms will be wide, and as it's coming in, the arms will close, go flush against the side of the vehicle, and the vehicle will be descending through the arms.
And those tiny little, you can barely see them, the little knobs, those kind of lifting lugs will touch the top of the arms and then it will hopefully not shear off and crumple.
Success is one of the possible outcomes. The probability is uncertain, but it is above zero.”
The Everyday Astronaut, 2022
𝗚𝗶𝘁 𝗠𝗲𝗿𝗴𝗲 𝘃𝘀 𝗥𝗲𝗯𝗮𝘀𝗲
One of the most powerful Git features is branching. Yet, while working with it, we must integrate changes from one branch into another, and the way to do this can be different.
We have two ways to do it:
𝟭. 𝗠𝗲𝗿𝗴𝗲
When you merge Branch A into Branch B (with 𝚐𝚒𝚝 𝚖𝚎𝚛𝚐𝚎), Git creates a new merge commit. This commit has two parents, one from each branch, symbolizing the confluence of histories. It's a non-destructive operation that preserves the exact history of your project. Merges are particularly useful in collaborative environments where maintaining the integrity and chronological order of changes is essential. Yet, merge commits can clutter the history, making it harder to follow specific lines of development.
𝟮. 𝗥𝗲𝗯𝗮𝘀𝗲
When you rebase Branch A onto Branch B (with 𝚐𝚒𝚝 𝚛𝚎𝚋𝚊𝚜𝚎), you're essentially saying, "Let's pretend these changes from Branch A were made on top of the latest changes in Branch B." Rebase rewrites the project history by creating new commits for each commit in the original branch. This results in a much cleaner, straight-line history. Yet, it could be problematic if multiple people work on the same branch, as rebasing rewrites history, which can be challenging if others have pulled or pushed the original branch.
So, when to use them:
🔹 𝗨𝘀𝗲 𝗺𝗲𝗿𝗴𝗶𝗻𝗴 𝘁𝗼 𝗽𝗿𝗲𝘀𝗲𝗿𝘃𝗲 𝘁𝗵𝗲 𝗰𝗼𝗺𝗽𝗹𝗲𝘁𝗲 𝗵𝗶𝘀𝘁𝗼𝗿𝘆, especially on shared branches or for collaborative work. It's ideal for feature branches to merge into a main or develop branch.
🔸 𝗨𝘀𝗲 𝗿𝗲𝗯𝗮𝘀𝗶𝗻𝗴 𝗳𝗼𝗿 𝗽𝗲𝗿𝘀𝗼𝗻𝗮𝗹 𝗯𝗿𝗮𝗻𝗰𝗵𝗲𝘀 or when you want a clean, linear history for easier tracking of changes. Remember to rebase locally and avoid pushing rebased branches to shared repositories. Also, be aware 𝗻𝗼𝘁 𝘁𝗼 𝗿𝗲𝗯𝗮𝘀𝗲 𝗽𝘂𝗯𝗹𝗶𝗰 𝗵𝗶𝘀𝘁𝗼𝗿𝘆. If your branch is shared with others, rebasing can rewrite history in a way that is disruptive and confusing to your collaborators.
👉 I 𝗽𝗿𝗲𝗳𝗲𝗿 𝘁𝗵𝗲 𝗿𝗲𝗯𝗮𝘀𝗲 𝗮𝗽𝗽𝗿𝗼𝗮𝗰𝗵, as we get a cleaner Git history, but to use it requires a higher level of Git understanding to manage safely.
#programming #coding
𝗦𝗵𝗼𝘂𝗹𝗱 𝘆𝗼𝘂 𝘀𝘁𝗼𝗽 𝘂𝘀𝗶𝗻𝗴 𝗨𝗨𝗜𝗗𝘀?
UUIDs (Guid in C#) are widely used as unique identifiers in databases. UUIDs are random, which makes them popular in distributed systems.
However, UUIDs have some drawbacks:
1. UUIDs slow down database inserts. Each insert must update the clustered index, a B+ tree. Because UUIDs are random, this is an expensive operation as it requires rebalancing the tree
2. Higher storage costs. A UUID is 128 bits long, and it's even longer if you store it in human-readable format as a string.
So, let me introduce you to ULIDs.
ULID attempts to solve the drawbacks of UUID. It's also 128-bit, so it's compatible with a UUID. However, unlike a UUID, ULIDs are sortable. The first 40 bits of a ULID represent a timestamp, making ULIDs monotonically increasing.
There's a .NET package that implements the ULID spec, so you can start using it immediately. However, you'll need to write some code if you want ULID to work with popular ORMs.
What do you think about ULIDs?
---
Subscribe to my weekly newsletter to accelerate your .NET skills: https://t.co/tLCs0ytX2R