You’re an entrepreneur. You’re building your Minimum Viable Product (MVP). You’re probably bootstrapping it or doing it on the cheap so you can show the MVP to some investors to obtain some much needed financial solvency to prove out your concept. This means you’re probably going to hire multiple developers over the lifetime of your product, and at some point, one of your new hires will look at your existing product and tell you that it was “written poorly” or “needs to be rewritten from scratch. If you’re a first-time tech-entrpreneur, this will be a rude awakening for you. If you’re seasoned, you probably know the drill.
What if I told you there exists a solution out there that will guarantee that your code, at least the way it’s formatted and structured, is following best practices? Now, what if I told you that it’s free? You might think that I’m a snake-oil salesman, but I assure you that I’m not. What I’m referring to is known as Code Linting, and what a Code Linter does is check to make sure the codebase is following community-established best practices, defined by a style-guide, for writing and formatting your code.
In the iOS community, specifically the Swift Programing Language community, the best practices are defined in two specific style-guides:
These style guides are used to create the rules that power the linter. In the Swift community, we use SwiftLint, which is a free, open-source tool that is maintained by the very best that the Swift community has to offer.
The earlier you have your developers set a linter up in your project, the more readable your codebase will be, and the sooner your app will be following best practices, and potentially less prone to bugs. However, this doesn’t mean your app will be bug-free, or your future engineering hires wont want to rewrite your app, but it may lessen the probability of either happening early on in your venture.