Website Update
Wow, it is nearly February already, this year is already flying by! Let's jump in.
What's changed?
When I initially developed the previous version of this website, it was my first foray into two things:
- the (at the time, newly stable) app router, and
- linking up a CMS to a Next.js project from scratch.
As a result, I was experimenting a lot and perhaps did not take as much care in creating clean code; there were hacks everywhere, I did not type things properly, and the CMS content types were a bit of a mess. For instance, here is what my folder structure looked like before:
The inconsitencies may seem like a small nitpick, but it made it a bit cumbersome to go through when I wanted to add anything new. In fact it put me off maintaining the project and I lost motivation to work in it altogether.
So over the Christmas period, when I had a bit more time, I finally decided to refactor this project from scratch so I was actually happy with it (and not embarrassed!). My goals for this refactor were:
- Upgrade to Next.js 14
- Properly type everything by ensuring that
ts.config
s strict mode was set totrue
- Create cleaner code
- Create straight forward content structures in the CMS
Back to the folder structure example from before, here's what it now looks like:
Ah, that's much better! This may seem like a small thing but for me it's important for me to be proud of my own work. You can check out the github repository for this project here.
What have I learnt?
Since I initially created this back in July 2023, I have come a long way in my web developer journey. I have learned so much since then which you can read about in the skills section. Now that I feel like a much more confident developer, I am more driven for cleaner foundations as it can feel demotivating to come back to an old project where I perhaps wasn't as careful with how I developed it.
I’ve always been proud of my work ethic while being a web developer, I get a lot of joy out of building projects, flexing my creativity and solving problems too. However, I think a huge issue that I have had is that I have not been spending my time efficiently. I am not saying that I want to squeeze every second of every day to the max and ensure that I never have a break, or even that I need to work on my time management. What I am resolved to do from here on out is to figure out what I’m doing in that time is as effective as possible.
I can recall quite a few occasions where I would spend a couple hours making minute tweaks to the styling of some projects, tiny changes that only I would probably notice. Was this a good use of my time? If this was for a client project then of course, sticking to the designs are crucial when working with clients. But this wasn't a client project. I was getting to practise my CSS skills, but realistically this was not a efficient use of my time. I could have been using that time to plan other projects, or learn how to use a new framework or library that I'm unfamiliar with. Going forward, I am going to take a lot more care in how I choose to work.
Thanks for reading this rant, and I hope you have a productive 2024 :)