Should We Change the Way We Teach Swift to New Developers?

There is a better way to teach that ensures newcomers understand the concept of code quality right from the start.

Paul Pela
Level Up Coding
Published in
4 min readOct 14, 2020

--

Photo by Scott Graham on Unsplash

I would like to propose an important change to the way we teach Swift. The approach that is the most common currently has a flaw that may be locking the upcoming generation of Swift developers in the tutorial purgatory. They may not be able to level up as easily as they should.

And we, technical writers, may be at fault.

When we are writing tutorials, guides and how-tos, we may be forming bad habits and not forming good habits instead. We are teaching developers how to do things, but we aren’t teaching them how those things should actually be done in production-ready code. By necessity, tutorials take shortcuts. Tutorials take snippets of code out of context and present them as something separate from the entire infrastructure of an application.

There is definitely a place for tutorials and how-tos. I’m not saying they are bad per se. People interested in learning a new programming language need to have a clearly defined place to start their journey and grasp the most basic concepts first.

But if we keep only producing more and more tutorials, we’ll teach new developers to only rely on them. We will teach them that if they don’t know how to achieve something, they only need to search for a tutorial. What if there’s no tutorial? They won’t have any idea where to look for answers. They won’t be prepared.

It’s even worse when we think about googling for StackOverflow answers. It can sometimes be used as “give me a solution I can just copy-paste” method of coding. And it’s became a de facto standard of how we do things sometimes. We laugh at how we copy-paste from SO. We laugh that we sometimes have no idea what the code does. And we also laugh at the fact that our application still somehow works with those copy-pasted snippets of code. And we’re normalising that approach, we’re saying that this is an acceptable way to “write” code in some circumstances. Don’t we know any better already?

Again, there’s nothing inherently bad in searching for an answer on StackOverflow. In some cases the…

--

--

Future dad, 9to5: tech support agent. I write about the User Experience of learning programming.