Lucas Viana’s developer blog

Welcome to my blog. If you like something I’ve written, it would make my day to hear about it. If you dislike it, hit the dislike button below.

Parsing command line arguments in Bash

If you don’t have a CLI option parser in your scripts, you’re probably being inneficient. As a software developer, you are the product of the systems you’ve built to assist you in your thinking: We should minize the time spent getting in position to think. Instead of wasting time, we should be building systems. Those systems must get better and better as time goes by. Without option parsing, our scripts will crumble as soon is it reaches a small amount of complexity....

February 20, 2023 · 12 min · Lucas Viana

Learn `sed` and be happy

When you’re done reading this article, you’ll be ready to become a sed expert. Yes, you read it right – So let’s hit the ground running. What is sed? Ever wanted to edit a file without having to open it in a text editor? Or maybe you want to modify several files and don’t want to do it manually? With sed, you just issue a short command in the terminal and bam!...

July 5, 2022 · 7 min · Lucas Viana

Encodings part 1: Unicode, ASCII, UTF-8 and... Latin-1?

What is Unicode, why is it used everywhere, and what are the options? We, software developers, use string data types daily and yet, there is a lot under the surface that nowadays we don’t even think about anymore. This makes character encodings a basic thing, but is it simple? This is part 1 of a series of posts on Unicode and encodings: Encodings Part 1: Unicode, ASCII, UTF-8 and… Latin-1? Encodings Part 2: The down and dirty of UTF-8 Encodings Part 3: The down and dirty of UTF-16 Encoding, you say?...

November 3, 2021 · 8 min · Lucas Viana

Encodings part 2: The down and dirty of UTF-8

What the double UTF is UTF-8? Let’s decode this, bit-by-bit. This is part 2 of a series of posts on Unicode and encodings: Encodings Part 1: Unicode, ASCII, UTF-8 and… Latin-1? Encodings Part 2: The down and dirty of UTF-8 Encodings Part 3: The down and dirty of UTF-16 Unicode and UTF-8 In part 1, we dug a little deeper into the reasons to be for Unicode and found out that Unicode is an immense character table containing all the characters in the world....

November 3, 2021 · 4 min · Lucas Viana

Encodings part 3: The down and dirty of UTF-16

This is part 3 of a series of posts on Unicode and encodings: Encodings Part 1: Unicode, ASCII, UTF-8 and… Latin-1? Encodings Part 2: The down and dirty of UTF-8 Encodings Part 3: The down and dirty of UTF-16 A very short background At the end of the ’80s, there were two competing forces for standardizing character sets: ISO 10646 and Unicode. ISO was idealistic and Unicode was pragmatic. ISO created a character set containing more than 2 billion code points (of course, most were not allocated)....

November 3, 2021 · 5 min · Lucas Viana