If your old code has problems, delete it and rewrite everything

A long-lived code base is like a society.

It’s a living thing. Sometimes well kept, often not. People will come and go. Those who went all had good intentions …until reality caught up!

Sometimes you will come across an area that doesn’t work well. You’ll dive in to find out why. After countless hours of trying to figure out what’s going on, you’ll ask yourself; who the **** would solve this problem this way?

Next, you’ll have a very strong intuition about how to fix this mess:


How to quit the mouse, and code like a pro

Photo by Tim Mossholder on Unsplash
  • Stop looking at your hands.
  • Stop using the mouse and/or trackpad.
  • Embrace key remapping.

I’ve heard a lot of stories about good developers, who were terrible at typing.

I don’t dispute that. But if you think they wouldn’t have been even better if they had put some effort into making THAT better, you’re wrong.

You have to treat your relationship with your keyboard and your IDE just like you treat coding and problem solving in general. If you don’t, it will be like your code was when you first started out. That is, I suspect, inefficient and terribly incoherent.


Do you know how to read? I certainly thought I did. I was a bit shocked to find out I didn’t, but also more than a little bit intrigued.

Photo by Wendy van Zyl from Pexels

It was like an amazing Michelin 3-star meal, that I thought I had eaten, when in fact I had only been enjoying the smell of it. When I left the restaurant, I knew it had been a great meal, but that nice aroma soon left my nostrils.

I could be really into a book, completely immersed in its contents, and have a wonderful sense of fulfillment after having read it. If…

Starring extensions, closures, generics, keypaths and subscripts

Let’s try to improve the way we configure our objects in Swift. We’ll set up some goals and try to hit them from different angles. Eventually we’ll overshoot, and write some really silly code, but we may just find a syntactic sweet spot along the way.

We need to establish some form of baseline to compare against. Let’s use UIKit layout code, in its most vanilla incarnation. This should be familiar:

let label = UILabel()func setupLabel() {
label.text = "text"
label.textColor = .blue

There’s nothing wrong with this, but without proper discipline, this type of configuration code can…

André Gillfrost

…becoming proper ninja!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store