Design Principles and Design Patterns
03 Apr 2023
The relationship between design patterns and design principles
is complimentary. Design principles provide high-level guidelines and best
practices for designing software. Design patterns provide concrete
implementations to specific design problems while adhering to the design
Why YOU Should Blog Too!
30 Mar 2023
When I first thought about blogging it was daunting. Even thought I liked the idea of blogging, I didn’t know why I should blog. What was I going to add to the world when all I know comes from reading other’s books and blogs? I had no reason to write about topics that are already written about extensively by experts in that area. I didn’t think I knew enough contribute.
28 Dec 2022
Consequence of Tech Debt is quicker to market now, refactoring
effort later. Consequence of bad code is apparent speed now, legacy code and
code rewrite later.
Struggles Of A Newcomer To FP
09 Jun 2022
Using a language that promotes functional style of programming
does not automatically guarantee simple and maintainable code.
Higher Ranked Types
24 Jan 2019
Monomorphism, Polymorphism, and Higher ranked types
GADTs Talk - Bengaluru Haskell Meetup
29 Nov 2018
Talk I gave at Bangalore Haskell Meetup Group on using GADTs to
bring compile time correctness to Haskell programs
The Expression Problem
13 Nov 2018
The expression problem is a well known problem in programming
language theory dealing with the expressiveness of a programming language.
Whether a language can solve the Expression Problem is a salient indicator of
its capacity for expression.
08 Nov 2018
What is expressiveness of a language?
Expressiveness of Haskell
04 Nov 2018
Demonstrate the expressiveness of Haskell using a simple
Binary Tree and in-order traversal in Haskell, Python and Java
Dependent Types To Eliminate Runtime Checks
26 Oct 2018
One of the main advantages of static typing is to catch errors before we deploy
code to production. Dependent Types allow us to eliminate some checks that are
usually done at run time. I take a simple example to show how dependent types
can be used in that regard in day-to-day programming.
Distributed Systems and Scalable Databases
08 Oct 2018
Introduction to distributed systems. How distributed databases work and their scaling model.
Quick Guide to Test-Driven Development (TDD)
11 May 2018
Test-Driven Development (TDD) is a software development approach that emphasises on tests driving the development. It means that tests play a central role in guiding the entire development process. With each new test driving the development of a small piece of functionality, the tests act as both a specification and a guide, providing clear expectations for the code’s behaviour and helping developers stay focused on delivering the required features.
The Essence TDD can be summarised by two key principles:
Basic Lambda Calculus
25 Feb 2018
Introduction to Lambda-Calculus
Outward Counterclockwise Spiral Matrix Traversal - Haskell
12 Feb 2018
An efficient, lazy implementation of spiral traversal on a matrix in Haskell.
Notes on Sets, Relations, and Functions
04 Nov 2017
Basic maths - Sets, Relations, and Functions
02 Oct 2017
TensorFlow is Google's open source library for numerical computation. All computations are represented as Data Flow Graphs. The Nodes in the graph represent operations and Edges represent the data-communication between nodes.
Thinking in Imperative, Object Oriented and Functional way
15 Sep 2017
programming paradigms stem from different concepts about how the
world works. They represent different opinions about how to best model the world
while we are writing programs.
23 Oct 2016
An (incomplete) list of principles of OO software development
GADTs To Eliminate Runtime Checks
15 Oct 2016
GADTs generalizes ordinary algebraic data types by permitting value constructors
to return specific types. GADTs are used for ensuring program correctness and in
generic programming. This article is specific to Haskell programming language.
In Haskell GADTs are implemented as a language extension. The article describes
these use cases with small programs.
A Detour Called Monads
15 Aug 2016
When learning Haskell, all of us are faced with this monad monster. I too have spent many days and night fighting it - hoping that it will grant me all the wisdom if I survive long enough. I have come to believe that the community as whole has created this monstor. And many of us have taken this detour to master the art of monstor slaying instead of going on ahead - just to realise later that the detour was unnesessory.
15 Aug 2016
We all make decisions. We should make decisions to be happy
Duplication Vs Abstraction
05 Jul 2016
When you see code duplication and can’t think of an abstraction to put that piece of code in, it is wise to keep the code separate. At least until you figure out the right abstraction.
Pair Programming - What? Why? And How?
31 Jan 2015
What? Simply put, pair programming is two programmers with a single computer working together to solve a problem!
Why? To produce better code To learn more from your peers To learn and practice objectively evaluating possible solutions To collaborate with better programmers How? The Driver is responsible to coding (owns the keyboard) The Navigator is responsible for reviewing the driver’s work 30 min Rule: Role changes every 20-30min (at a logical break point) Take control of the worl.
10 Vim Plugins That Made My Vim Easy
04 Jan 2015
Few days back I posted the below pic online and some of my friends wanted to know how I got there. I am no vim expert and there are myriad of other (possibly better) ways of doing things. So I will just list the plugins I have used in my setup.
Note that the side panes (NERDTree on the left and Tagbar on the right) auto-collapse. They magically appear when you summon them and hide themselves when the task is done.
Unscramble - A Word Puzzle
22 Nov 2014
Part 1 of how a newspaper puzzle became coding challenge
Performance Analysis In Python
02 Nov 2014
My recent escapade with Python taught me many things. One of which is to “start doing something that interests you. And each such daring act will teach you many more things.”
This time I set out to finding ways of analysing the performance of an application - specifically Python applications. And as always I wasn’t disappointed with the results. Why Python? I just happened to be playing around with Python at the time (what I really mean is I was learning Python!
01 Jan 0001
Data Normalisation What is Data Wrong Data It is not the Truth logically impossible Fails Data Integrity – Disagrees with itself No data Integrity ==> Bad Database Design Solution – Data Normalisation !! Normalisation Structuring data in certain way to avoid data integrity problems insertion anomalies deletion anomalies update anomalies Data cannot lie Easy to understand Easy to extend Normal Forms Level of protection from data integrity problems Depending on the kind of data your application/db has, you can choose your level 1NF Order of records (data) in a table should not matter Conveying information using row order is a violation (of 1NF) Be explicit in conveying information, use another column to convey the same information Data in a column should be strictly of one data type Each record/row should be uniquely identifiable - primary key Not having a primary key is a violation
01 Jan 0001
Chapter 10: Microservices and Domain-Driven Design (DDD) 10.1 Introduction to Domain-Driven Design (DDD) In the world of software development, Domain-Driven Design (DDD) has gained significant recognition as an approach that brings a deeper understanding of the problem domain and improves the design of software systems. When combined with microservices architecture, DDD can provide a powerful framework for developing scalable and maintainable applications.
DDD emphasizes the importance of aligning software design with the domain it serves.
01 Jan 0001
What are microservices? Benefits of microservices architecture Comparison with monolithic architecture Design Principles
Single Responsibility Principle (SRP) Loose Coupling Autonomous Services Scalability and Resilience Architectural Components Service Discovery
API Gateway Message Brokers Service Orchestration vs. Choreography Containerization and Orchestration (Docker, Kubernetes) Communication and Protocols
RESTful APIs Message-based Communication (e.g., RabbitMQ, Apache Kafka) Event-Driven Architecture (EDA) Service-to-Service Communication Patterns Data Management