Hello there đź‘‹

Welcome to my blog: Ramblings From Yet Another Software Developer ™

Prefer Parsing Over Validating: Let The Compiler Help You Remove Edge Cases

In this blog post, I’ll discuss a technique that I’ve used to create expressive APIs that are more robust with the help of the compiler. I’m going to demonstrate a simple example of this technique in Java but anything you are about to read can be applied to any other statically typed language. Let’s start by quickly defining “parsing” and “validating”. In my mind, validation is about analyzing input and reporting if it adheres to a certain set of validation rules:...

<span title='2021-04-01 18:06:30 -0400 -0400'>April 1, 2021</span>&nbsp;·&nbsp;11 min&nbsp;·&nbsp;2198 words&nbsp;·&nbsp;Tamer Aly

Database Design: Avoid Derivative State

This is the beginning of a potential series on effective database design. Before we get into the nitty-gritty, let’s address the elephant in the room: what is derivative state? I haven’t heard this term being used elsewhere so I’m going to officially define it here as: Derivative state is state that can be derived from another piece of state (the parent state). By definition, this means the derived state cannot carry more information than its parent....

<span title='2020-10-30 12:42:27 -0400 -0400'>October 30, 2020</span>&nbsp;·&nbsp;6 min&nbsp;·&nbsp;1272 words&nbsp;·&nbsp;Tamer Aly

The Search for Home

I was raised in what I thought was a middle class family: one working father, a stay at home mother, and one younger sibling all living under the same roof of a 1 bedroom apartment in NYC. It was, relative to the global standard of living at least, a good life. We always had food on the table, clothes on our back, and a roof over our head. My parents came from a country where roughly 30% of the people cannot make the same claims as I just did....

<span title='2020-04-18 23:56:52 -0400 -0400'>April 18, 2020</span>&nbsp;·&nbsp;7 min&nbsp;·&nbsp;1400 words&nbsp;·&nbsp;Tamer Aly

The Case Against Std Pair

I’ve been professionally developing software with C++ for a few years now and I’ve been seeing a pattern in the C++ world that’s bothered me for quite some time now. That pattern is the use of std::pair from the <utility> header in C++’s STL in non-generic code. TL;DR Use of C++’s std::pair unnecessarily obfuscates what’s being represented in the pair when used outside of generic code. We can use simple structs instead to allow our code to become more self-documenting....

<span title='2019-01-27 13:03:15 -0500 -0500'>January 27, 2019</span>&nbsp;·&nbsp;5 min&nbsp;·&nbsp;913 words&nbsp;·&nbsp;Tamer Aly

Linux - Creating a Static Library Using GCC and the Command Line

This tutorial will cover creating a static library using the command line with the GNU C/C++ compiler. We will use C++ as the primary language although a slight modification in the outlined steps can be used with the C language. Unlike most tutorials which use trivial and relatively useless functions to demonstrate building libraries, we will implement a fairly useful std::string function that is bizarrely missing from the STL - the string split (or tokenize) function and build a static library from that....

<span title='2019-01-20 15:59:03 -0500 -0500'>January 20, 2019</span>&nbsp;·&nbsp;6 min&nbsp;·&nbsp;1235 words&nbsp;·&nbsp;Tamer Aly