Blog Posts

Stack And Register Machines

Feb 19th, 2021

Last week we looked at CPython and mentioned that the interpretor was a stack based virtual machine. In today’s post we will go into more details why we mentioned that the VM was stack based by looking at the dissassembled Bytecode and compare it with a assembly code runnable on a register machine.

Python Compiler And Interpreter

Feb 12th, 2021

Last week we looked at how compilers worked in general. We saw that they were mostly composed of two parts, the front end and back end. The front end being the compiler from programming source code to intermediate representation and the back end being the runtime. In today’s post we will look specifically into how Python gets compiled and interpreted with the default implementation, CPython.

How Do Compilers Work

Feb 5th, 2021

With the recent introduction of Apple M1 chip, we have seen the start of the adoption of the ARM processor architecture for Apple Macbook line. ARM being a different family of instruction set architecture than x86 (most common as of today), this means that any application built for x86 (for Mac with Intel or AMD chips) needs to be recompiled to run on ARM (M1 chip). The process of compilation is a multistep process starting taking code written in programming languages and transforming it into machine code understood by the processor. In today’s post we will look at the different part involved in the compilation process.

Rebasing Merges With Git

Jan 29th, 2021

Few weeks ago we talked about Git Rebase. We saw how we could use it to manipulate the history of branches. By default, rebasing would flatten all merge commits making the history linear. In today’s post we will see how we can rebase while keeping merge commits.

Git Stash

Jan 22nd, 2021

The stash is the place where we can save work in progress from working tree and index while reverting to the HEAD commit, a command useful to pull latest on the checkout branch or simply inspect other branches. In this post we will look at how to use git stash.

Git Log

Jan 15th, 2021
git-log

Git log is a command used to look at the commit logs. It’s a useful command to look at the history of a repository, the different commits, the different merges or even the repository graph. In today’s post we will look at few example where git log can be used.

Difference Between Working Tree And Index In Git

Jan 8th, 2021

In few of our previous posts, we referred to the HEAD, working tree and index when dealing with Git. In today’s post we will look at what those mean with example.

Git Cherry Pick

Jan 1st, 2021

Git cherry-pick is a command used to apply changes from an existing commit. In this post we’ll look at some example where cherry picking can be useful.

Git Difftool And Mergetool With Visual Studio Code

Dec 25th, 2020
Notebook

Visual Code ships with powerful Git support. In this post we will look at how we can use Visual Code as default diff and merge tool for Git.

Git Reset

Dec 18th, 2020

Git reset is a command used to reset the current HEAD to a specified state. Common scenarios of using git reset are for clearing unstaged changes, reverting a staged commit or simply reverting a commit made by mistake back to the working tree. In this post we’ll look at Git reset with examples.

Git Diff Triple Dot And Double Dot

Dec 11th, 2020

When using a branching mechanism like GitFlow or Mainline, we usually create pull request from short lived branches to long lived branches (e.g. develop, master). The pull request diff page gives a view of the changes that were brought by the branch. By default all repositories managers like GitHub, GitLab or Bitbucket uses “triple dot” diff to show diff. In this post we’ll look at the difference between “triple dot” and “double dot” diff.

Git Diff

Dec 4th, 2020

Git Diff is a command used to look at changes between two revisions. The revision can be directly looked by branch tip, tag or commit hash. In this post we will look at the different usages of git diff and how to read the output.

Git Rebase

Nov 27th, 2020

Git Rebase is a command used to reapply commits on top of another base tip. The base tip could be either another branch or the current branch. Rebase is useful in scenarios where we need to keep branches up to date with long lived branches or scenarios where we want to rework the history of a feature branch. In this week blog post we will look at different scenarios where Git Rebase is useful and understand the usage of the command with its parameters.

Kafka Log Compaction

Nov 20th, 2020

Kakfa supports multiple log cleanup policy, delete or compact. When set to delete, log segments will be deleted when the size or time limit is reached. When compact is set, Kafka will ensure to keep at least the latest value of messages per message key. With log compaction setup on a Kafka topic, the topic becomes a database where messages are rows in database term, mutation of rows are done via messages where the last message received represents the latest state. In this post we will see how we can setup compaction and the different settings that affect its behaviour.

Kafka Offsets And Statistics

Nov 13th, 2020

Offsets are a big part of Kafka. They indicate the position of a log in the partition of a topic, allowing consumers to know what to read, and from where to start. In today’s post we will look into how consumers manage the offset, store and commit them, and how brokers maintain them to allow failure to happen on a consumer group.

Designed, built and maintained by Kimserey Lam.