New Site Launch

This time a week ago I switched the DNS over from the old IP to the new. There are ways to launch with a bang, and this – thankfully – was not one of them.

Green, like mah test suite, amirite?

Instead, a gently increasing trickle of visitors began hitting the new site.

Even though I’ve run through the Behat tests enough times to trust them, and I’ve PHPSpec’d my way to a suitable level of coverage, I still get nervous when real people start running my code 😀

I knew there would be teething problems. It’s nigh on impossible to predict every hurdle you will encounter when live, and fear of this stopped me pressing “go” for about 2 weeks.

There was also the big known hurdle:

Migrating the database

The new code uses modifications of the original entities. There were no removals of data, but some properties got moved to different objects.

All of this had to be managed by a rather fun migration script I cobbled together.

A poor visual metaphor of bad boy code

It is your typical thing of beauty / monstrosity all-in-one.

It gets the job done, but you’re glad you’re not maintaining that bad boy in the long run.

This had to be done just before the DNS change over.

This process involved dumping the live db, restoring it into a local replica db, then connecting to both the old and the new databases, and looping over each item to migrate it appropriately.

Fun times.

Last Friday morning, when I was confident with everything, I ran through this process for the last time, and the new database was up to date.

Well, close enough 🙂

Post Go-Live Fun

I expected a couple of issues.

I didn’t know what they would be, but the change was sufficiently complex enough to guess that the process wouldn’t be seamless.

As it turned out, there were two problems, and then some little tweaks.

Yeah, it ain’t workin’ on iPhone, bruv

I tested the change on every device I have.

I tested on an Apple device.

I tested in a bunch of browsers.

I didn’t test on iPhone.

Of course, I had a problem on iPhone. Not on iPad. No, no. It worked fine on the iPad. Just the world’s most recognisable phone.

I’d used URLSearchParams to get around a problem created as a result of having to use redirects for navigation, instead of being able to use React Router.

URLSearchParams needs a polyfill to work on Safari on iPhone, it seems.

What this meant was that the site would load, but not the header / footer, or any JavaScript.

My wife told me about this, but I thought it was some weird DNS issue she was having.

I asked my brother to check on his, and sure enough, he saw same. Worse, it was happening in Edge, and Internet Explorer, too.

Not having a clue how to get to a browser console on iPhone, I booted up the iOS simulator via XCode, and saw the error about being unable to use URLSearchParams which thankfully led me to the polyfill, and the next push fixed it.

I believe this is also fixed on Edge, but now not on Internet Explorer – if you use IE then oh my! No, seriously, if you use IE (or have access to it), I’d be grateful if you could let me know how the site looks in there.

So that was that.

Video Migration Woes

Between me properly starting the revamp, and launching, took me 12 weeks, give or take.

During that time I had put up 40+ new videos.

Each existing video needed to be migrated, and also the new ones imported.

I had all of this scripted up.

What I’d not factored in was that the order I expected, and the order I received would be inverted.

I was asking Vimeo – my video host – for the latest 100 videos.

I was then cross referencing the video they had, with the video I had.

If they matched, super duper.

If they didn’t, that meant a new video, so import it.

I only ran this script twice, as best I remember, as Vimeo have some rate limits which, when hit, were taking the old site offline… yikes.

Anyway, long story short, I managed to run the import and flip the last 40ish videos so the most recent had the oldest video, and so on. This was noticed in production, by a site member.

That made last Saturday morning a little more lively than I expected.

Few Other Issues

I noticed and fixed a bunch of other issues in this time.

I 404’d a bunch of blog pages.

I 500’d two video write ups.

I got the CORS header wrong which broke the shiny new Profile area (www, and non-www users)

I found and fixed some CSS problems.

There still remain some CSS issues from migrating from Bootstrap 3 to Bootstrap 4. I have these on my todo list.

If you spot anything on your travels, do please shout up.

Video Update

I recorded 5 new videos this week.

I published: 0.

There’s a couple of reasons for this, one being that to release the new videos without the next few videos, they would make no sense (it’s setup for deploy, without showing any deploy…), and also I’ve been working on the re-launch.

Being one guy doing quite a lot, I have to respect my limits. Because burn out sucks.

Thanks for all your support with the new site, I’ve had some great feedback, thank you!

If you haven’t already done so:

Check out the new site

And please, let me know what you think.

Well, that’s about it from me this week. Until next week, have a great weekend, and happy coding.

Chris

Published by

Code Review

CodeReviewVideos is a video training site helping software developers learn Symfony faster and easier.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.