23 May The re-design of this site, or, how I re-learned my lesson on backing up data
If you're here often, you may have noticed that I redesigned this website recently! The previous design was created [*six years ago* in 2014](https://www.michaelcheng.us/stuff/9). Here's a slight refresher on how that looked. ![Homepage of the previous design of this website](/_static/stuff/2020-05-23-localhost_54321_minimal_home.png) And here's a screenshot of how my profile page looked. ![Profile page of the previous design of this website](/_static/stuff/2020-05-23-localhost_54321_minimal_me.png) It was not flashy at all. It was minimal, and I would say it just barely served its purpose. In the 6 years since then, I created my [first app](https://www.iqwerty.net/freepee) and started working as an actual software engineer. I occasionally posted some blog entries, but I didn't have much time to improve the infrastructure or design of the website. That is, until recently... --- It was the beginning of May. Out of the blue, my webhost declared bankruptcy. Cue the emergency bells. Apparently they weren't doing so well financially, and it actually had been a while since *they themselves* paid the bill for their datacenters. Obviously I had all my code stored on my personal workstation, but I had never backed up the databases on the server! The webhost said they would not be able to restore anyone's data, but they could help customers transfer domains to another provider. --- After a few days of grief over 15 years of data loss (yes, I had been their customer for 15 years!), I decided I would just start over. After all, I *was* in quarantine, and I *had* learned a lot from my years of professional software engineering. I decided not to even look at my old code, because it would be a nightmare refactoring into something worthwhile. I toyed with the idea of just having a static site using something like [Jekyll](https://jekyllrb.com/). I didn't want to lose data anymore, so hosting static content on GitHub was worth considering. I also wondered if I should just host everything on my Raspberry Pi. A coworker briefly mentioned that I should look into Firebase. I decided to spend a few days to just think about all my options. And in the meantime, I began designing my new logo. ![Logo change](/_static/stuff/2020-05-23-logo_diff.png) The old logo was supposed to represent my hobby as an engineer via the computer mouse in blue. This time around, I decided to drop that. *"Less is more"*, right? I went with a dark gray background instead of black for a more matte appearance. Instead of completely flat iconography, I added a slight shadow to add some layering. I chose purple because I'm really loving purple recently! As I finished up my new logo and was about to turn my attention back to what tech stack I should use, the webhost announced that *their* provider was willing to turn on the datacenters for 48 hours in order for us to recover our data. That pretty much solidified the decision for me to remain with [`LAMP`](https://wikipedia.org/wiki/LAMP_(software_bundle)). Also, I was elated that I would be able to download my lost data! In a few days, I came up with a new design and re-created my website using what I hope are reasonable best practices in a modern world. I **finally** started using SASS, and I wrote my own build pipeline called `Ceres`, which I will release to the world (i.e. GitHub) when it is ready for prime time. I also fixed lots of long-standing issues related to time in my old website. You may have noticed that sometimes a date would be incorrectly formatted as "yesterday", even though it should have said "today". That's because [time zones are hard](https://www.youtube.com/watch?v=-5wpm-gesOY). I also finally started supporting [Markdown](https://www.markdownguide.org/) in my blog, though I am still hesitant to enable it for comments because XSS is scary. As of a few days ago, I am feature complete on the re-design of this website! Some have asked for the ability to reply per-comment in the commenting system, but I do have questions like how many nested layers should a comment be allowed to have? Please comment with your thoughts! 😉 Even though I came out of this ordeal with a shiny new website, there is still an important lesson to be learned. And that is: **backup everything**. Spend some time to automate it so you don't have to think about it. Check every so often that it's working the way you intended. If you go for a [cloud backup solution](https://www.backblaze.com/blog/the-3-2-1-backup-strategy/), do spend some time thinking about encryption and recovery paths. Make sure you encrypt your files yourself before they hit the wire, even if a service says it provides end-to-end encryption and encryption at rest. All in all this was a very fun albeit slightly stressful experience. It highlighted just how endless the possibilities are in something seemingly as simple as web development. The vast amount of time and dedication one must have to complete a side project are not easy to come by. For more on this topic, definitely take a look at this article by my buddy Nish about why [it's ok to never finish your side projects](https://nishtahir.com/why-its-okay-to-never-finish-your-side-projects/). Happy coding!