December 27, 2022

Around 5 years ago, I started a business with a friend of mine.

We would call up carpenters, landscapers, and other tradesmen and see if they’d like us to build them a website.

Perhaps unsurprisingly, our cold calling sales approach didn’t yield many customers. The calls were unexpected and we didn’t really have any sales pitch other than -

“If you want a website, we’ll build it”.

To which the response was usually,

“Ugh.. I’m not interested mate.”

However, I did make one website sale to a friend in a ‘right place, right time’ type way.

I was a very inexperienced developer at the time and had been trying to learn as much as I could through tutorials. I’d made some small demo apps, but I was keen to make something real.

We agreed to make a website for my friend’s business and got stuck into the code.

And of course, we over-engineered the site a bunch.

- Ruby on rails back-end
- Devise authentication with admin dashboard
- Ability to upload images to AWS
- Contact form connected to mailing service
- Postgres database
- Hosted on Heroku

If that doesn’t mean anything to you, just know that it was a bit complex.

My friend and I wrote the code over the space of 3 or so weeks, and it was ready to ship.

Job done.

The site kept ticking along without issue, until this year, when the “contact us” form we made started getting spammed by bots.

Online casino. Win big, free bets!

I could’ve snuck into the old code, added a little reCAPTCHA check to the form and got out. But the code for the site was a mess.

The more I looked at it, the more I realised we’d probably gone a bit overboard 5 years ago.

I wanted to just delete all of the old code and start again.

Usually this is a bad idea. Software companies that do big re-writes of their code usually go over budget and over time.

My fun re-write could easily become a multi week nightmare.

Instead of just accepting that and diving in like I normally would do, I thought about how I could simplify it. How could I do less work and get a better or similar result?

The owner of the site never actually used the admin dashboard we made for him. He didn’t need to add new photos.

That could all be removed entirely.

The contact us page could be linked to instead of my own custom mailing service. That would also remove the need for a database as well.

The ancient ruby code could then be replaced with more easily understood GatsbyJS.

In the end, I took our beast of a application and made it a small static site.

- Static Gatsby site
- Contact form (
- Hosted on Gatsby cloud

All in all, it took a couple of nights to complete, but it got done in a fraction of the time of the original and now costs $0 to run.

And to top it off, the SEO and page speed scores went up dramatically with all the Gatsby magic working in the background.

It’s got me thinking about what else in my life is overly complex and needs a re-write. Maybe I’ll write a post on that soon.

Ogres Zilie kalni

Merry Christmas! Photo is from the top of the observation tower in Ogres Zilie kalni, Latvia.

I haven’t been as good about writing new posts as I would’ve liked this last month but I’m starting to get back into it now.

PS: If you do want some landscaping work done in Canberra, check out the site.