Scrutinizing different design decisions

A few days ago I shared a bit of source code from twitch, and suggested possible ways to improve it. After publishing my post, I approached one of the most qualified developers at the company I work for, and told him about it. We had a nice constructive conversation, in which he helped me see a mistake in the way I originally approached the problem. He also explained very well what improvement should be done to the source code. Before you continue reading, I implore you to read my previous post and come up with your own conclusions as it’s always better to think for yourself before having the answers – https://everlastingbits.com/2021/10/10/twitch-banned-user-names/

My mistake:
I suggested handling the blacklist on a higher level, and not on SQL, which actually contradicts the beginning of my post. My previous suggested implementation would result in practically saving the blacklist on a file, instead of a DB. Even when I tried defending the idea, he rightfully responded that when someone is already managing a DB they know how to work with, why add in the complexity of managing files?

So I scrapped this idea. However, there’s more to learn!
Gladly, my colleague (and many others on reddit) suggested that the blacklist should be stored in a database, I was right on the money! He even added another reason why – adding new hard-coded names to the list requires the changes to run through the C.I pipeline and may even require a redeployment of the product. Surely not as quick as updating a DB.

Moreover, having the blacklist stored in a database benefits the company with the possibility of having someone other than the developers to update the list, such a back office employee, or a manager.

I hope you enjoyed testing and expanding your knowledge as much as I did!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: