Day 5 of making a UART š“‡² why I made a UART!

Itā€™s about time we finish the series. As evidenced by the release dates of each UART article, this took far longer than five days. But I find that it looks cleaner this way, so Iā€™m keeping the title! The reason it took so long is actually threefold: First, I didnā€™t dedicate enough time to studying the subject matter before diving into the implementation, which left me confused and frustrated every time I tried coding. Second, I procrastinated quite a bit. And lastly, Iā€™ve been busy with other things, like job searching and being a hippie in Southeast Asia.

This wonā€™t be a super technical article since most of the implementation details have already been covered. If youā€™re looking for that, check out the repo.

Happy New Year

Now that weā€™re wrapping up the UART seriesā€”Happy New Year! I wanted to make this post to set the tone for 2025. Things are looking a bit better since the SEA article. Iā€™ve got an internship starting later this month, which is cool, though I might be gaslighting myself into thinking itā€™s more exciting than it actually is.

We arenā€™t quite done with UART yet though, because I still need to explain why I started this journey in the first place. If youā€™ve read my other posts, youā€™re probably aware that I think George Hotz is a goat. He made a course outline called From the Transistor to the Web Browser, which I forked and have been following loosely for a while (progress has been slow, obviously).

Thatā€™s my main motivation, but the benefits of learning UART are far broader. Itā€™s taught me foundational concepts in computer communication like, data framing, and error handlingā€”all at the register level. These are concepts that will stay with me forever and form a reliable base for everything I build. For instance, this newfound understanding of data framing has helped me implement a primitive DNS. These foundational ideas are crucial to understanding computer systems, and all tech mfs should learn them.

All computer communications rely on predefined data structures that enable seamless packet interpretation. Here are a few examples from protocols weā€™re all familiar with:

HTTP:

[Method][Request-URI][HTTP Version]
[Header Field: Value]
[Header Field: Value]
[Blank Line]
[Body Data]

DNS:

[Transaction ID][Flags][Questions Count][Answer RRs Count]
[Authority RRs Count][Additional RRs Count]
[Question Name][Question Type][Question Class]
[Answer Name][Answer Type][Answer Class]
[Time to Live][Data Length]
[Resource Data]

IP:

[Version][Header Length][Type of Service][Total Length]
[Identification][Flags][Fragment Offset]
[Time to Live][Protocol][Header Checksum]
[Source Address][Destination Address]
[Options (if any)][Payload Data]

To some, this may seem obviousā€”you might even be thinking ā€œduh, how else would it work?ā€ But for me, internalizing these ideas has been a series of breakthrough moments. Thereā€™s a big difference between knowing something and truly internalizing, visualizing, feeling it. Too many people work with data without ever understanding it. They simply accept the rules as they are, without questioning or challenging their own understanding. That makes them slaves to their environment, something I strive to avoid.

The Cyberpunk Hacker Arc

Hereā€™s a quote from William Blake that encapsulates this mindset:

I must create a system, or be enslaved by another manā€™s. I will not reason and compare: my business is to create.
ā€” William Blake

This idea deeply resonates with me. Hereā€™s my favorite artwork of his as well, Nebuchadnezzar (totally random mention & rant but who cares. btw if you ever have to offer me a gift it should definitely be this):

nebuchadnezzar
Figure 1: Nebuchadnezzar (A king in hubris)

The story behind this artwork teaches a profound lesson. Nebuchadnezzar, a once-proud king, was punished by God for his arrogance. He was transformed into a beast, forced to roam the wilderness and reflect on his place in the world. Itā€™s a stark reminder of our human limitations and the importance of humility.

Some say we were made in Godā€™s image, which means we were meant to create. Yet, so many fail to embrace that role, contenting themselves as passive consumers in every area of life. Donā€™t get me wrongā€”Iā€™m not bashing those people. I like to be lazy too. But itā€™s unfortunate if thatā€™s all your life amounts to. Passive consumption, with nothing of your own to leave behind.

So that pretty much sums up the vibes for 2025: the Cyberpunk Hacker Arc. Itā€™s actually the first time in my life that Iā€™ll embody the role of a nerd, which Iā€™ve always been but always tried to avoid. However, Iā€™ve grown into adulthood with much more confidence in my identity and have much more aura than anyone who could call me a nerd + if youā€™re a relatively normal person and you understand social dynamics, you should be able to make being a nerd look cool. If you canā€™t do it, thatā€™s just a skill issue. Please increase your aura and make us look good.

I should stop talking like thisā€”Gen Z Twitter yap makes everything sound so unserious broā€”but you get the point. Letā€™s lock in this year.