RSSAmplifier

Blog

rauljordan::blog

rauljordan.comRSS feed ↗18 posts

Latest posts

No sleep until we build the ideal pub/sub library in Go

In which we iterate over different approaches to writing a simple, pubsub library Go and realize how difficult it is to build the ideal API in a sea of tradeoffs. type Producer [T any] struct { sync . RWMutex subs map [ subId ] * Subscription [T] nextID subId doneListener chan subId broadcastTimeout time . Duration }

Reminiscing on my early days writing software

The beginner's curse of not knowing when to ask "why"

Rust concepts I wish I learned earlier

This past month, I have been enthralled by the Rust programming language given its unique edge for writing memory-safe, modern programs. Over the years, several languages have emerged as the most preferred by engineers to write resilient, backend software. The tides have shifted from Java/C++ into Go and Rust, which combine decades of programming language theory to build tools that are effective…

How to Set Up an Ethereum Proof-of-Stake Devnet in Minutes

With Ethereum having finally transitioned to proof-of-stake, many people are wondering how to set up a local testing environment given so much has changed.

When Years of Work Finally Materialize

Back in late 2017, I was curious about a particular technology called Ethereum when I understood its incredible potential to change the world. I assembled a team of software engineers I met on the Internet that shared this vision and for 4 years, we have worked tirelessly to upgrade the system to one that is more economically and environmentally sustainable.

Using Interface Composition in Go As Guardrails

Composition over inheritance Someone, somewhere Go, as a programming language, favors simplicity. When writing abstractions in Go, interfaces are some of the most powerful tools available to developers, providing a whole suite of useful functionality for your applications and expressive packages.

When a Solution Is Right In Front of You

We had a crazy week debugging one of the trickiest issues we've seen in our software. This post showcases how we went down a rabbit hole of information only to conclude a resolution was far easier than we thought.

Reuse Expensive Computation With In-Progress Caches in Go

Caching is the go-to solution in applications to avoid repeating expensive computation and instead prefer some value that can be readily fetched in-memory. A simple caching strategy is to use a cache as a thin layer above database read access as follows: package main import "sync" type Database struct { cache map [ string ][] byte lock sync . RWMutex } func ( db * Database ) GetItem ( key [] byte…

Custom Static Analysis in Go, Part I

(Credits to ScyllaDB) Static analysis is the practice of examining source code in an automated way before code is run, typically to find bugs before they can even manifest. As a powerful programming language used in mission critical applications, Go also adds a lot of responsibility to its developers to write safe code. The risk of nil pointer panics, variable shadowing, and otherwise ignoring…

Why Go's Error Handling is Awesome

Go's infamous error handling has caught quite the attention from outsiders to the programming language, often touted as one of the language's most questionable design decisions. If you look into any project on Github written in Go, it's almost a guarantee you'll see the lines more frequently than anything else in the codebase: if err != nil { return err } Although it may seem redundant and…

Why I Speak Cantonese

Many folks that know me personally know how much time I dedicate each day towards becoming proficient at speaking, reading, and writing Cantonese, making it my favorite language and one I have developed a major personal goal of becoming proficient in. Cantonese, known as jyut6 jyuh5 (粵話), is one of the major languages of China and the Chinese diaspora abroad, spoken by around 100 million native…

Immutability Patterns in Go

for field , ref := range s . sharedFieldReferences { ref . AddRef () dst . sharedFieldReferences[field] = ref } One of cons of Go as a modern programming language is the lack of native options for making certain data structures immutable. That is, we often have to make key software design decisions in our application just to ensure certain data is immutable throughout the code's runtime, and it…

Building a Service Registry in Go

func ( s * ServiceRegistry ) RegisterService ( service Service , ) error { kind := reflect . TypeOf (service) if _ , exists := s . services[kind] ; exists { return fmt . Errorf ( "exists: %v " , kind) } s . services[kind] = service s . serviceTypes = append (s . serviceTypes , kind) return nil } Thinking of building an application in Go that has multiple running parts? Say you have some server…

10 Key Takeaways from a Harvard Education

Coming from Honduras, attending college in the U.S. felt an unattainable dream during my high school years. Emblazoned upon one of the entrances to Harvard University one can find the words: "Enter to Grow in Wisdom, Depart to Serve Thy Country and Thy Kind" This adage, although seemingly cliché, had its words weigh heavily on me as the years went on. I promised myself when starting my first year…

Writing an Ethereum serialization library using reflection

type Marshaler interface { func MarshalType ( val reflect . Value , b [] byte , lastWrittenIdx uint64 , ) ( nextIdx uint64 , error ) } type Unmarshaler interface { func UnmarshalType ( target reflect . Value , b [] byte , lastReadIdx uint64 , ) ( nextIdx uint64 , error ) } Techopedia defines serialization as The process of converting the state information of an object instance into a binary or…

Winning a Facebook GraphQL hackathon

links : { type : new GraphQLList (HtmlPage) , resolve : async ( root , args , context ) => { const res = await fetch (root . url) ; const $ = cheerio . load ( await res . text ()) ; const links = $ ( 'a' ) . map ( function () { if ( ! $ ( this ) . attr ( 'href' )) { return ; } if ( $ ( this ) . attr ( 'href' ) !== '#' && $ ( this ) . attr ( 'href' ) . indexOf ( 'http' ) > - 1 ) { return $ ( this )…

My foray into machine learning

I had a blast at a hackathon where all sorts of beginners and experts got together for a 6 hour sprint to solve a Machine Learning problem. Personally, I had no idea what we would be doing...would we be coming up with our own data sets? Participating in a Kaggle competition on the spot?

About me

Hi. My name is Raul and I am an individual passionate about building the decentralized web and contributing to a future where decentralized technology swings the pendulum back to the original promise of the Internet and empowers personal freedom. "why we make the things we make says a lot about us" Anonymous Born and raised in San Pedro Sula, Honduras, I studied Computer Science at Harvard…