Posts
Cataloguing My Garden
We must cultivate our garden.
Volatire (Candide)
This is the closing sentence in Volatire’s Satire Candide. Of course the metaphorical sense is, regardless of what’s happening in the world we should continue to work on ourselves and shouldn’t worry too much in things which are either inconsequential or are out of our controls. This doesn’t mean we become ignorant or indifferent towards those but rather put oneself and one’s concerns first.
read morePosts
About Fast Compilation of Go
Is Go Fast? Go is faster than interpreted languages like python in terms of sheer execution since it’s compiled to native executable format.
Go is slower than other compiled languages like C,Rust in terms of execution. This is primarily because although compiled go runs with a ‘runtime’ which does some housekeeping (scheduling and multiplexing goroutines, managing/freeing memory (GC) etc). This overhead is much smaller than a virtual machine required for languages like java but is an overhead nonetheless.
read morePosts
Did you read the logs?
Logs Logs (in a very degenerative sense) are a series of events/statements that act like the breadcrumb for the things that happened. Degenerative as I am referring mostly as application or software logs. (More pure meaning would be let’s say database logs which are used for replication process or a series of events for active state machine replication). I want to talk about the logs (application logs, system logs).
For interested reader, I highly recommend I heart logs which talks about the power of logs in a distributed systems - how a series of immutable logs help us chronologically capture a series of events and computing/coming to consensus/committing transaction etc on top of it.
read morePosts
Kind of method overriding in Go
Go’s approach to Object Go is a fairly simplistic language and doesn’t come with inbuilt classes and other features that most object oriented programming languages have. It gives you building blocks in the form of structs and it’s upto programmer to design the abstraction around it. There is no inheritence - Go takes a very strong stance on composition over inheritence camp. (even other languages have practitioners who preach composition over inheritence but it’s not strictly enforced).
read morePosts
Thinking about Gall's law - Designing Systems
I encountered this quote while reading Martin Klepmann’s Designing Data-Intensive Application which got me thinking:
A complex system that works is invariably found to have evolved from a simple system that works. The inverse proposition also appears to be true: A complex system designed from scratch > never works and cannot be made to work.
John Gall, Systemantics (1975) This is a famous “law” in software engineering. (although the original context in which the author said this is in regards to general systems (mechanical systems like Titanic ship or human systems like an organization; come to think of it, even software systems are just an extension of such systems).
read morePosts
Notion of time; Distributed Systems
Time is not just an abstraction Of course time as we know in a day to day sense is an abstract thing. It’s a concept we defined to measure something. (like we defined length to measure how long something is or weight to define how heavy something is). But behind that abstraction is a physical reality. Events are a manifestation of that reality which really give us a sense of time.
read morePosts
Geo Routing (Craigslist Example)
Geo-Routing (Case Study on Craigslist) When you open craigslist.org it does a couple of redirection before finally landing on the subdomain closest to your city. Having separate sub-domain and listings for those particular cities is partly how it seems to handle the distribution of the content. (making it more scalable)
Give it a try: https://craigslist.org
Here is the journey of the request:
curl -I craigslist.org HTTP/1.1 301 Found Location: https://www.craigslist.org/ redirected to https://www.
read morePosts
ChatGPT Notebook - A Chrome Extension
Trend of LLM Large Language Models continue to find new use cases. Though they started off as smart chatbots developers are using the open source models (thanks to corporates like Meta who open source models and no thanks to OpenAI) and fine tuning them to be used for specific domains. It’s so obvious that in the future these LLM are going to be our personal copilot, our wingman each tailored to each individual.
read morePosts
Literate Programming
Literate Programming Python notebooks are so ubiquitous in the Machine learning community. All the cloud providers have dedicated services to run these notebooks: Jupyter on AWS, Jupyter on Azure, and Google Collab. These are popular largely because of how we can accommodate both code and instructional text in the same file. With each individual cell as an executable code block or a properly formatted markdown text, this makes it much easier to present information, document the information and make it a better educational material.
read morePosts
Quirks of Query Planner
Query Planning Every SQL database (postgres,mysql) has a query planner built into it whose job is to find the best strategy to come up with the results given the query, its predicates and other expressions. Following examples are from postgres where I explore around how query planner makes its decision based on the data size in the table and the state of the database even in the presence of index.
read more