Jan 15, 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.

Git

Jan 01, 2021

Git Cherry Pick

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

Dec 18, 2020

Git Reset

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

Dec 11, 2020

Git Diff Triple Dot And Double Dot

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

Dec 04, 2020

Git Diff

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

Nov 27, 2020

Git Rebase

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.

Git

Nov 20, 2020

Kafka Log Compaction

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 Docker

Nov 13, 2020

Kafka Offsets And Statistics

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.

Kafka Docker

Nov 06, 2020

Kafka Topic Partition And Consumer Group

In the past posts, we’ve been looking at how Kafka could be setup via Docker and some specific aspect of a setup like Schema registry or Log compaction. We discussed broker, topic and partition without really digging into those elemetns. In this post, we will provide a definition for each important aspect of Kafka.

Kafka Docker

Oct 30, 2020

Kafka Schema Registry With Avro

In previous posts, we have seen how to setup Kafka locally and how to write a producer and consumer in dotnet. The topic on which producer produces messages and consumer consumes messages accepts messages of any type, hence an agreement needs to be made between producer and consumer on a contract so that whatever is being produced can be understood at consumption. In order to enforce that contract, it is common to use a Schema Registry. In this post, we will look at how we can setup and use a schema registry, and we will look at how we can create an Avro schema to enforce produced and consumed data.

Kafka Docker CSharp

Oct 16, 2020

Setup Local Kafka With Docker

When writing Kafka producer or consumer applications, we often have the need to setup a local Kafka cluster for debugging purposes. In this post, we will look how we can setup a local Kafka cluster within Docker, how we can make it accessible from our localhost and how we can use Kafkacat to setup a producer and consumer to test our setup.

Kafka Docker

Oct 09, 2020

Generate Fake Data In Python With Faker

Reducing repetition in codebase is a well understood concept in Software development. When writing features, we try to use existing functionalities so that we don’t duplicate similar logic. Surprisingly, this concept is often skipped when writing tests where we end up with a hundred over test cases with repeated construction of input objects to fit all possible scenarios being tested. In most languages (I haven’t checked all of them), developers have addressed such problem by providing ways to fake inputs. In today’s post, we will look into Python Faker package and how to use it to improve code reuse.

Python