Irtiza Hafiz
Image for post
Image for post
Photo by Vista Wei on Unsplash

At the beginning of 2020, I set myself a goal to use my phone more mindfully. The goal was the result of analyzing my screen time and how that is divided between all the apps that I had installed.

Turned out I was suffering from the “infinite scroll syndrome” like most people in today’s world. I was logging two to three hours on apps like Facebook, Instagram and Google News even though I cannot recall much value that I got out of them.

It seemed like instead of using my phone as a tool to get things done, I was


Image for post
Image for post
Photo by Bernard Hermant on Unsplash

As software engineers, the first thing we ever learn when learning a new programming language is how to print out “Hello World” in the console.

Fast forward a few months from that day, and now that we are so familiar with the language and we know all of its intricacies and different conventions, one thing that we still do is “print” things to the console when we are debugging.

It’s just too easy to just throw a print statement when we are unsure about anything. It’s too convenient! …


Image for post
Image for post
Photo by Luke Chesser on Unsplash

Python gives you some very handy functions that you can use to sort efficiently. You can even chain sorts so that for the same data, you have a primary sort and then a secondary sort within that.

So, without further ado, let’s get started.

Sorting Fundamentals

The two primary ways you can sort in Python are:

  • sort method that comes with lists
  • sorted function which takes in any iterable

Both will sort your data in ascending order by default. But there is a crucial difference between these two approaches:

  • sort performs the sorting operation in-place. …


Image for post
Image for post
Photo by Emile Perron on Unsplash

Python is one of the most versatile programming languages that are out there. From declarative programming to object-oriented programming to functional programming, Python incorporates approaches from multiple programming languages. In this article, I will focus on writing functional code using Python.

When people think about functional programming using Python, they mostly think about three functions: map filter reduce. However, there are many more functions that go under the radar that you can use for various use cases. Not only these functions make your code more functional, they also let you utilize and manipulate data structures in the most efficient ways.


Image for post
Image for post
Photo by Sidorova Alice on Unsplash

Designing data models in Cassandra can be tricky if you are coming from a Relational Databases background. Even though Cassandra tries it best to draw parallels to relational databases when it comes to terminologies, I feel like it becomes more misleading. Of course CQL (Cassandra Query Language) being so similar to SQL doesn’t help either.

Fundamentally, Cassandra (a NoSQL database) and other relational databases (MySQL, PostgreSQL) are very different from each other. Cassandra is not a drop-in replacement of relational databases. You have to design your schema with an entirely different way of thinking.

To get you started with designing…


Image for post
Image for post
Photo by Sidorova Alice on Unsplash

There are multiple types of keys in Cassandra. Namely:

  1. Primary Key
  2. Partitioning Key
  3. Clustering Key

Let’s go over each of these to understand them better.

Primary Key

Each table requires a primary key. A primary key can be either one field or multiple fields combined. The primary key has to be unique for each record. Otherwise, Cassandra will do an upsert if you try to add records with a primary key that already exists.

Let’s look at an example of a real-life Cassandra table:

CREATE TABLE player ( name text, club text, league text, nationality text, kit_number text, position text, goals int…


Image for post
Image for post
Photo by Clément H on Unsplash

I started developing React applications about two years ago. It all started with a classic todo application and soon followed by another classic, a web-based weather application. Soon I realized why React was gaining in popularity co much and I started loving its simplicity.

Since then I have developed more than a dozen of web applications using React JS. From pet projects to explore different aspects of the framework to more sophisticated applications with almost a million daily users, I used React to develop projects of all sizes.

Independent of the size of the project, there were always a set…


Image for post
Image for post
Photo by Luca Bravo on Unsplash

Building a production grade web application from scratch is no easy feat. Not only do you have to make sure that the programming language, framework and database you chose fits your type of application, you also have to worry about deploying and maintaing the application.

In my short software engineering career so far, I have built and deployed multiple small projects. Some were just client side rendered React applications that I could host in S3 for free, some were small backend APIs that I just hosted locally. However, I never really had to think about a proper full stack application…


Image for post
Image for post
Photo by Justus Menke on Unsplash

Docker has always been a mystery to me. I always knew about the buzz around containerization and Docker but looking at the configuration files and reading articles about how it worked always freaked me out.

Most importantly, I knew that I was being able to do everything I wanted to without Dockerizing my applications. Yes, at times things got a bit hairy when moving projects around different computers and environment, but somehow I always managed to make it work. So why bother? That is until now.

Recently, I have taken a Docker course online and dockerized a couple of my…


Image for post
Image for post

When I moved to San Francisco from Atlanta in the summer of 2019, I was super excited to start my life post college graduation. I knew that now that I was finally out of a grueling college program, I will have plenty of free time to do all the things I always wanted to do. Between projects, tests and quizzes my four years in college always moved at a breath-neck pace giving me little time to do the things that I loved outside academics. It also stopped me from enjoying the little things in life. …

Irtiza Hafiz

Software Engineer @ Yelp writing about all things programming and productivity

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store