UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

Hacking with Swift site refresh

Smarter! Faster! Darker!

Paul Hudson       @twostraws

Two months ago Hacking with Swift passed 25 million page views, which is a huge accomplishment that I’m really proud of. I wanted to celebrate with something special, so I decided it was time to implement our #1 most requested feature: site search.

Site search was something I listed in my plans for 2019 nine months ago, and it’s been something folks have been requesting as long as I can remember. Of course, when I sat down to actually make site search happen I ended up changing practically everything else at the same time, and the result was the third major site update for Hacking with Swift.

Let me talk you through what’s changed…

Hacking with Swift is sponsored by RevenueCat

SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.

Learn more here

Sponsor Hacking with Swift and reach the world's largest Swift community!

Site search at last

Yes, I set out to make site search work, and obviously it would suck if that got missed out during the big refresh!

So, now you’ll see a permanent search box in the top-right corner of every page (or hidden behind the burger menu if you’re on mobile), along with a large search box on every page. This uses a full-text search of all articles, example code, tutorials, guide, and more, so you can be sure you’re seeing across the whole site.

But I wanted to take search one step further: you can now go straight to hackingwithswift.com/your-search-term to search across the site immediately. Here are some examples to get you started:

And yes, you can include spaces if you want – just enter “hackingwithswift.com/“ followed by anything you want to search for.

Dark mode

Site search was always the most-requested feature, but not far after was support for a dark theme. Well, it’s now active, and it’s automatic depending on the setting of your device – if you use dark mode on macOS or iOS, you’ll get dark mode here.

To help ensure readability I’ve bumped up the weights of almost all the fonts, and – ahem – borrowed the dark mode UI colors from iOS 13 and Xcode 11, so hopefully things should look familiar.

Better navigation

Having solved the first two most common feature requests, I went on to the third: making it easier to find content in the site.

This has long been a problem for me, because – bluntly – I much prefer writing about Swift than futzing with websites. This often meant I didn’t think about navigation around the site, didn’t consider discoverability, and certainly didn’t make it easy to find what was new for regular visitors.

One of the effects of this was that it was hard for newcomers to figure out where to start amongst all my tutorials, which is never a pleasant place to be. Worse, in 2019 I launched the 100 Days of Swift and SwiftUI By Example – two major projects that were impossible to find on the site, so you literally had to know the exact URL or rely on Google.

So, in this refresh I picked all that lovely low-hanging fruit and more:

  • You’ll now find a “Start Here” link as the first item in the Learn menu, which lists all the free resources across the site. (You should stop reading and take a look – I think you’ll be surprised how big the site has grown!)
  • The homepage now lists the three most common reasons folks come to the site: learning Swift, finding answers, and career advice, all with direct links to the relevant parts of the site.
  • The homepage now also shows the three most recent articles plus a selection of the newest example code.
  • The articles homepage now shows many more articles per page, and also has clickable categories to help you focus on specific topics.
  • There’s a dedicated Videos button in the navigation bar, listing some of the hundreds of videos I have published on YouTube this year.
  • There’s a new Test page that lists Be the Compiler, Spot the Error, and Rearrange the Lines, the latter two of which weren’t actually linked anywhere previously. (Sorry!)

Yes, I know: actually linking to my own pages sounds like an obvious thing to do, but like I said it’s much more fun to be writing about Swift than modifying my site.

More speed!

Hacking with Swift now serves about 1.5 million page views every month, and of course that’s a great thing. However, it forced me to re-evaluate the way I serve up pages so that I can make sure everyone gets a great quality of service.

Just before WWDC I massively upgraded the server that hosts the site, going from a single-core 1GB RAM setup to a quad-core 8GB RAM setup. That in itself was never going to do that much for performance, but it also allowed me to upgrade the software that runs the site, and deploy a huge range of optimizations to make sure pages are served faster than ever.

The result is that every page is now delivered 8 to 10 times faster than before – it is screamingly fast now, even when serving thousands of users every hour.

And there’s more!

I fixed and added so many little things that it’s hard to keep track of them all, but here are a few:

  • There’s now an official Hacking with Swift cap in Merchandise.
  • I updated the Core Graphics playground for Swift 5.0.
  • There are now dedicated pages for the newsletter and my refund policy.
  • There’s a link to the Hacking with Swift Slack workspace right on the homepage, making it easier for folks to join.
  • The Swift knowledge base now has a smarter recommendation system for similar articles, based on the new site-wide search engine.

What’s next?

Site search, dark mode, better navigation, and more speed are all nice to have individually, but combined I think will do a lot to take Hacking with Swift forwards for a good few years to come.

For now, though, it’s back to writing for me. Hopefully I won’t need to wait quite so many years to do another site update, but with so many exciting new things in iOS 13 it will be a while before I written everything I want to see.

If you spot any problems with the site, tweet me @twostraws and I’ll get it resolved as fast as I can.

Hacking with Swift is sponsored by RevenueCat

SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.

Learn more here

Sponsor Hacking with Swift and reach the world's largest Swift community!

BUY OUR BOOKS
Buy Pro Swift Buy Pro SwiftUI Buy Swift Design Patterns Buy Testing Swift Buy Hacking with iOS Buy Swift Coding Challenges Buy Swift on Sundays Volume One Buy Server-Side Swift Buy Advanced iOS Volume One Buy Advanced iOS Volume Two Buy Advanced iOS Volume Three Buy Hacking with watchOS Buy Hacking with tvOS Buy Hacking with macOS Buy Dive Into SpriteKit Buy Swift in Sixty Seconds Buy Objective-C for Swift Developers Buy Beyond Code

Was this page useful? Let us know!

Average rating: 4.9/5

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.