Interfaces are the Light Version of Software Architecture

In this post, we cover why interfaces are used and how they help to build maintainable software. Abstraction of the Actual Implementation In its most basic form, an interface hides a concrete implementation from the caller and thereby creates an abstraction. This abstraction meets certain conditions (or requirements) that are guaranteed by its (implicit) contract. In the Java programming language, the classical example is the List interface, which is an ordered sequence of elements allowing for random access1....

September 4, 2023 路 6 min 路 1251 words

Combining Symmetric and Asymmetric Encryption

Recently, I came across a technical use-case, where a system required a combination of symmetric and asymmetric encryption for communication. To be more precise, the payload was encrypted using a generated symmetric key and that key was encrypted using the public key (asymmetric encryption) of the target system. High-level Fundamentals Recalling cs fundamentals, symmetric encryption uses the same key for encryption and decryption. On the other hand, asymmetric encryption uses two different keys1....

July 5, 2023 路 3 min 路 491 words

Building your own simple programming language

Have you wondered what it takes to create your own programming language? Have you wondered what it takes to write an interpreter? I certainly have and recently got inspired by this blog post series. As it turns out, it is not that complicated. Only three steps are involved: Lexing - split text into words and symbols (tokens) Parsing - create a program structure (AST) Interpreting - traverse and execute the structure The full code is available on Github at https://github....

September 28, 2019 路 4 min 路 825 words