View Posts for Software Engineering
-
C5Store for Rust
C5Store for Rust
C5Store is a Rust library providing a unified store for configuration and secrets. It aims to be a single point of access for your application's configuration needs, consolidating values from various sources (like YAML files), handling secrets securely via built-in decryption, and allowing dynamic loading through providers.
The core idea is to simplify configuration management in complex applications by offering a hierarchical, type-aware, and extensible configuration layer.
Key Features
... -
I Created A Database that uses CASPaxos as the Consensus Layer but exposes Redis
Uh yeah, so it took <1 day to do it. The second day, I added recovery. A node can go offline, as long as there is a quorum the cluster will chug along, when it comes back online then it can recover from its peers.
A lot of what I did was above my level of coding, clearly I used alchemy to do this. It's not a joke. I implemented all of Redis' data structures and can send commands to do exactly what Redis does to this database. The recovery mechanism is just one of those things that made sense.
I have more feat...
-
Project Star-Spangled Phoenix #3: Development Video
Roast of The Republic is the official name of this marvelous creation.
Information
Roast of the Republic: Power Play is a casual online multiplayer card game focusing on strategic American political dominance. Players deploy cards on a shared board establishing territorial control, tactical upgrades and disruptive actions all in a bid to obtain the most influence.
Key features
- Wacky caricatures of historical political figures from US history
- Uniquely Patriotic American Music
- Capture the board with Contribut... -
Leet Code Solution 4 - Median of Two Sorted Arrays
4. Median of Two Sorted Arrays, Hard
Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays.
The overall run time complexity should be O(log (m+n)).
Solution, Typescript
function findMedianSortedArrays(nums1: number[], nums2: number[]): number {let medianIdx = [];let totalCount = nums1.length + nums2.length;let firstMedianIdx = Math.floor(totalCount / 2);if(totalCount % 2 == 0) {medianIdx.push(firstMedianIdx-1);medianIdx.... -
Leet Code Solution 987 - Vertical Order Traversal of a Binary Tree
987. Vertical Order Traversal of a Binary Tree, Hard
Given the root of a binary tree, calculate the vertical order traversal of the binary tree.
For each node at position (row, col), its left and right children will be at positions (row + 1, col - 1) and (row + 1, col + 1) respectively. The root of the tree is at (0, 0).
The vertical order traversal of a binary tree is a list of top-to-bottom orderings for each column index starting from the leftmost column and ending on the rightmost column. There may be mult...
-
Leet Code Solution 9 - Palindrome Number
Palindrome Number
Given an integer x, return true if x is a palindrome, and false otherwise.
Solution, Typescript
function isPalindrome(x: number): boolean {if(x < 0) {return false;}let remainder = x;let placeValue = 1;let val = 0;while(remainder > 0) {let digit = remainder % 10;val = val * 10 + digit;if(val > x) {return false;}remainder = Math.trunc(remainder / 10);}return val === x;};I totally one shot submitted this ...
-
Leet Code Solution 8 - String to Integer (atoi)
String to Integer (atoi), Medium
Implement the myAtoi(string s) function, which converts a string to a 32-bit signed integer.
The algorithm for myAtoi(string s) is as follows:
Whitespace: Ignore any leading whitespace (" ").
Signedness: Determine the sign by checking if the next character is '-' or '+', assuming positivity if neither present.
Conversion: Read the integer by skipping leading zeros until a non-digit character is encountered or the end of the string is reached. If no digits were read, then the resu...
-
WASM Will Take Over Containers
I've been looking into WebAssembly lately and I say it is the future of containerization. I mean, I've always been a fan of Docker and Podman, but WASM? It's a whole new ballgame. Imagine compiling your favorite language (Rust, Go, C/C++—you name it) into a tiny binary that boots up in milliseconds, all without the baggage of a full-blown OS. That’s what WASM brings to you. No more BS.
WASM is the New Kid on the Block
Here's the deal: WASM was originally created to supercharge web apps, but it’s now breakin...
-
Unexpected Rise of WebAssembly: Redefining Containerization Beyond Docker
The Rise of WebAssembly: Redefining Containerization Beyond Docker
The way software is developed, deployed, and managed has been significantly transformed by containerization. Technologies like Docker and Podman have become foundational to modern cloud-native practices, enabling application isolation, portability, and scalability. However, the world of computing is always evolving and a new contender emerges with the potential to redefine containerization as we know it: WebAssembly (WASM).
Let's explore the...
-
Natural Ordering Doesn't Work With ULID, so I Combined Two Existing Sorts
I made an assumption on how natural ordering works and that was for the first time I've seen screwing up the ordering of records in a RocksDB database.
It's funny I used Gemini 2.0 to evaluate how natural ordering of two ULIDs. ULID is lexicographic sort friendly DUH. it was confident that the correct ordering is what natural sort should resolve to. Wrangled my head until finally starting getting code out to analyze the sort step by step and that's where it dawned on me. 4442 is going to be greater than 7CYS...