REACTing to the Final Boss

Celine Nicolas
3 min readJul 23, 2021

For my final project in Flatiron, I wanted to keep it nice and simple. Albeit my other projects were also simple, there were still complex functionalities tied along with them. I wanted to end my portfolio off with a calm, simple bang. I always liked journaling, especially after learning about the health benefits of it in therapy. I decided to create a journal application in which the user will enter the date, their journal entry, along with choosing a feeling that can closely relate to how they are feeling at the time of writing.

I surprisingly did not have a lot of issues with the project this time, but my biggest challenge was how I wanted the entries to be placed. Just like a regular journal, I wanted the entries to be placed in chronological order. However, since the date is an added attribute (unlike the :created_at), I would have to alter how the journals are displayed based on the date.

In my backend file, I refactored how the journal entries are displayed by using the .order function, arranging them by the date attribute in descending order. This means that entries will start from the most recent, then going down depending on the year, then the month, then day.

The next issue was the way the date was displayed. When creating the date attribute, I used the datetime data type so it can show the date in proper form. However, when using the datetime attribute, it also comes with default timestamp, involving both time and the timezone. By only entering the date, there is an empty following line of 0’s where the time is supposedly placed. Since I did not want the time to be included I had to figure out how to make the date display, without showing the unnecessary zeroes.

I googled different types of methods when it came to displaying time, and I found the method .toLocaleDateString(). This method simplifies the datetime attribute by shortening it to just the date and refactoring it to with the back slashes (i.e. 7/22/21).

It has been one of the longest, as well as the fastest five months of my life. I definitely am very surprised I was able to make it this far, and I am very happy with myself that I completed a whole program on a concept I was not very fond of. Thinking back to my first blog post, I remember detailing how much I despised coding and my previous two attempts solidified my uncertainty of going forward with the program. Fast forward to the present? Well, I am not in love with coding, but I definitely tolerate it and I can see the liking of the challenges it brings.

As for my next challenge? It’s onto the job market!

--

--