Category: Posts
-
Isolate the rightmost (least-significant) bit
Fast & elegant: Tests Output Brute force Output for the new version Practice 231. Power of Two 191. Number of 1 Bits Related concepts Two’s complement
-
Generate files with random bytes
The following command grabs 20 Mb of random bytes from /dev/urandom and saves it to rnd.bin: Generate a bunch of files:
-
AES encryption in Go
Here is a program I wrote to learn how to use the Go libraries for AES encryption. Build & run I hope it helps. References Advanced Encryption Standard Advanced Encryption Standard (Wikipedia)
-
Build C/C++ libraries with debugging support
I’ve been debugging a program which uses certain library on CLion. The IDE is great, but I cannot see most of the code from the library, the debugger shows me assembly code, and that’s not very helpful. The solution was to build and install the library with debugging symbols: The actual commands for my particular…
-
Hello-World AWS Encryption SDK C/C++ program
In one of my projects, I need to encrypt and decrypt data in C, specifically using the AWS Encryption SDK. The SDK supports C, but the documentation is not very clear, in my opinion, so I decided to share my hello-world implementation with my learnings. Setup I’m working on Ubuntu, however, not all distributions are…
-
Interesting programming problems
The following problems were either difficult to solve, provided a valuable learning, or both. I’m putting them here so as not to forget a bout them. Drinks Three Pairwise Maximums FashionabLee Captain Flint and Crew Recruitment
-
Merriam-Webster’s Word of the day & week – July 10
Word of the day aphelion deracinate legerdemain sound emulate bromide histrionic Other words I didn’t know or wasn’t sure about its meaning or pronunciation: perihelion apogee perigee AU uproot befits glistering Phaehon sleight of hand adroitness sleight sly scrapping resonance Thesus milieu bequeath Meiji-era spirit barley rye bromine commonplace tiresome bore hackneyed knack manning inertia…
-
Merriam-Webster’s Word of the day & week – July 3
Word of the day incontrovertible argot parse louche farrago obtain stentorian Other words I didn’t know or wasn’t sure about its meaning or pronunciation: spin-off pronto birdsong ken uptick apprehension twittering arcane golfese quantitative squinting cross-eyed repute dungarees lovestruck gruff brooding mealy spelt fodder medley conquest rink herald byword uncannily churchy gospely zeitgeist Words of…
-
Merriam-Webster’s Word of the day & week – June 26
Word of the day envisage masterful crux fraternize gourmand omnipotent yokel Other words I didn’t know or wasn’t sure about its meaning or pronunciation: barbecue summarily verdict gaslighting whitewashing hijack commonplace communal unwitting PSA heartily satiation gourmet slobbering helpings foodie arrant slickers foppish towsman sturdy bumbling frat alt-rock stripes snobs Words of the week Hombre…
-
Merriam-Webster’s Word of the day & week – June 19
Word of the day whodunit divagate bellwether null harangue conflate stalwart Other words I didn’t know or wasn’t sure about its meaning or pronunciation: pundit dot remake meanders spirited briskly lair deck contempt dues alike loquacious cornerback retort accentuated serviceable twigs sundry beak pliable wedged Words of the week classified Juneteenth Originalist Arbitrary and capricious…