Developer Diaries — 01

Derek Le
2 min readDec 13, 2021

It’s me.

Starting today, I will begin documenting my coding ventures that I’ve been doing each week. Why?

Because sometimes your commit history doesn’t tell the whole story.

When we see the commit line “Feature: Upgraded entire front end to support a new framework,” we don’t get to hear about the time spend that went on behind the scenes debugging legacy code and learning new technologies.

So let’s dive into it.

This past week, I’ve been going back and upgrading my old projects into something more presentable and representative of my current knowledge, so I may put it onto a portfolio website.

I’m currently focusing my efforts into refactoring my video player app and restaurant cms app to include a Postgres database and react frontend. In addition, I’m also implementing websockets in order to have information update in real-time between my frontend and backend when changes occur.

Thus far, most of my progress has gone towards rebuilding my database to support Postgres. I chose Postgres as it was free and allowed me more freedom in choosing the kinds of data I could populate my database with, such as hashes and arrays. In addition, I will be able to work with data at a level that would be expected of me in a more established setting.

In previous versions of my apps, I had run into issues when working with objects where I wanted their datatypes to be either an array or hash. In my CMS app, I had to serialize an order’s menuitems in order to read them into a list. Now, I hope to take advantage of Postgres’ hstore datatype, where I can store it as a hash that I can read from. This would allow a more natural and practical way to manipulate the information I want, how I want.

For my video player app, I look forward to storing my playlists model into arrays of strings. Previously, I had stored links into a songs table and tried tying a song to a playlist, but this ended up rather clunky and added an extraneous step that I had to go through just to store a list of url strings that would be constantly updating. For example, if I had a song that was added to two separate playlists, and wanted to delete it from one of those playlists, I would have to ultimately change manipulate data from two tables: my playlist table and my song table. By keeping the songs in an array parameter in my playlist, I would only have to manipulate data from one table.

By the end of this week, I hope to have the backend for my apps stable, and then focus my efforts towards creating a proper frontend. By the end of next week, I aim to have two more projects along with my capstone to showcase in a portfolio.

--

--