@adlrocha - TWIL #2: This Week I Learned
About Go, Wasm, and navigating large code bases.
Ok! This week has been extremely busy! This time it’s not that I’m dry of ideas I want to write about, but that I would have needed 36-hour days to find the time to sit down at least a few straight hours to write. Fortunately, for these cases I came up with the TWIL (This Week I Learned) series. For those of you unaware of the TWIL series, instead of writing a full-fledged article I share a few links to interesting resources I’ve came across throughout the week, and things I’ve been working on. Hope you enjoy it!
Sharing a bit of Go love...
I am back to writing Go code in a daily basis, so it is important to keep in shape:
A Simple State Machine Framework in Go: As an electrical engineer student, designing state machines was my bread and butter, at college. Who would have told my past self that I was going to be tinkering with state machines again. This article is a great introduction to state machines in Go, and this repo is one of the reasons why I am playing with them again (in case you were wondering).
Efficient Go APIs with the mid-stack inliner: Interesting article to understand the mid-stack inline and ways of designing efficient Go APIs.
Pyroscope, find performance issues in your code with this continuous profiling platform.
… and WASM sweetness!
Building for a future on WebAssembly: This post brings up some of the reasons why I think WebAssembly is the future…
“It shouldn't matter if a vendor wrote a library in Rust, C++, Go or Swift. Atmo will make it easy to chain together third party modules with your own to easily interact with third-party APIs.”
Run that CID! … and as Wasm is part of the future, why not merging it with the future of the Internet? This is a video of our hack in the hackathon I mentioned last week.
Learning WebAssembly Series: Finally for the newbies in the world of Wasm, a great learning resource.
Vim as an IDE and working on large code bases
I had a small crisis this week. VSCode support for multiple Golang packages in the same workspace is not great. I am working in a project were implementing a new feature means changing code from several repos at the same time. I was getting frustrated, so I invested some time this week on changing my developing setup. I have actively used vim since I was in college, but never used it as an IDE. This week I finally found the time to fine-tune my vim configuration to use it as a Golang IDE. This is something I may write more about in a follow-up publication, but in the meantime these are some of the resources I used in this endeavor:
Working with large code bases is hard, and choosing the right IDE for the task is as important as knowing how to navigate the code base efficiently. This article shares some tricks on how to navigate monstrous projects:
SourceTrail, a nice tool to get productive on unfamiliar code bases (unfortunately it doesn’t have support for Go, so it didn’t work for me 😞).
Some learning references 👩🎓
The Log-Structured Merge-Tree (LSM Tree), for database design lovers.
Parsing GB of JSON per Second (paper)
A bit more of my work
In the last TWIL#1 I shared a list of other articles I had been writing as part of my daily job. They were mainly related to our “Beyond Bitswap” work. I was waiting for my next TWIL to share the last few we released as part of the project.
Oh! And before I forget, this article has not been strictly written by me, but if you are working on decentralized systems, you may fancy submitting something to this call for contributions:
And if what you are looking for is first-hand experience building the future of the Internet, ResNetLab is looking for a research engineer. If this caught your eye do not hesitate to ping me, or directly apply through this link:
The xkcd of the week!
The scary note
And as we should start being aware of the economic reality we are currently living, an eye-opening article: