Home Blog Contact

Translating Eloquent Fields with MySQL's Native JSON Type

March 28, 2016

Since version 5.7.8, MySQL has supported a native JSON data type. Since I’m a bit of a weirdo who finds structured data formats interesting, I wanted to experiment with its different uses in the context of a web application. One potential use-case I thought of was using it for internationalisation – storing different text translations for a field. Let’s take a look at how internationalisation is typically done in a web application and how it could be done through the use of MySQL’s native JSON type. Since I’m uncreative, I’ll be using Laravel and an age-old blog posts example....

Releasing an Open Source Package: Lessons Learned

February 7, 2016

I’ve spent the last few weeks working on an open source package to help with managing files on Backblaze’s B2 storage service. The development of b2-sdk-php, which it’s not-so-originally called, has taught me a few valuable lessons for anybody looking to dive into releasing an open source package. The biggest problems that I face with side projects is losing motivation over time. There are many projects sitting in my development directory that haven’t been worked on in months, simply because I lost focus of the original goal and the motivation behind it. Keep your initial goal...

Deploying a Static Site to S3 and CloudFront

January 10, 2016

Note: this article is old and no longer reflects how this website is served to the internet, but I'm leaving it in place in case it's useful to somebody. 🙂 How long did it take for TTFB? If it's anything more than 100ms, let me know, as I have some complaining to do. Thanks to a combination of S3 object storage, the CloudFront CDN and Let's Encrypt, this site is served from nearly 40 edge locations from all around the world over HTTPS. Hopefully one of those is pretty close to you, allowing extremely low latency and lightning quick page loads (about ~30ms on my end). Here's how to set all...