Are you struggling a lot to organize your code? You aren’t sure if 200+ lines of
viewDidLoad() or 20 lines of
viewDidLoad() with 10+ functions is better?
You may also be stuck in creating few but large classes with lots of methods. At the beginning, your class started out perfect, but everyone on the team keeps adding more methods to it. Eventually, you give up and do the same thing.
You know you need to do something about it. It’s time to refactor. But you don’t know what to do and how to do it. Even if you have a few ideas.
You don’t know how hard it’ll be, how long it’ll take, what it’ll look like when done, or worse, if it’ll be done ever. It may end up being worse than before, so you undo everything. The pain continues.
It’s a cycle that repeats itself. The next time you feel like refactoring, you’re afraid to justify to your clients or managers on another refactoring phase. After all, you just had a refactoring phase last month. And it didn’t turn out too well.
So you keep adding more methods to the class. Add a few lines here and there. Watch your app grow into a completely unmanageable mess.
You know deep down in your heart that the technical debt will never be paid off. You only wish you won’t be the one who has to deal with it when the hammer drops.
It kills you. It saps all the energy from the morning coffee. Every day. Every week. Every month. Every year. Every project. Every new client. Every new job.
Is this how a programming career supposed to feel like?
You hope, one day, when you become more senior, you’ll have figured all these stuff out.
But there’s just one problem. That day will never come.
Think about it. When all the tutorials and sample codes just show you the massive view controller pattern, you’ll end up wasting a lot of time pouring over blog posts trying to sort things out alone. But where can you learn the right skills from?
I was wondering 6 months ago what to use for a big and complicated project, because I was sick of the standard MVC’s and MVP’s, and then I stumbled on this blog. I took a big risk of using it, because it was something new which I have never used, but I must tell you, it is worth it! I am at the final stage of finishing the app, and my biggest ViewController file contains 700 lines of code, something impossible to achieve with standard architectures(and more than half of the view controller file size is in favor of table view and collection view delegates and data sources, that can be moved to a separate file).
What if you have a mentor to guide you through and level you up?
A good mentor can serve as your right hand man.
|When you have:
|Your mentor can:
|Doubts about whether to dive deep into a programming concept.
|Break it down and list the trade offs. You don’t need to waste time only to find out it’s just a dead end.
|Deadlines to meet, and no time to do a ton of research.
|Quickly give you an answer, so you can keep developing.
|A complex feature that requires you to think deep about the problem you are trying to solve before writing any code.
|Help you objectively organize your thoughts about what the code should be doing.
|A quick question about architecture and testing.
|Evaluate your situation and suggest the most likely successful solution. You don’t need to spend the next two weeks trying different things.
Yes, it’s good to have mentors. That’s what you’re missing now. Just need a senior architect to really bounce ideas off. To give you the right advice. To save you time. To stop you when you’re about to step on a landmine.
When you have a mentor, you no longer need to waste a lot of time pouring over blog posts trying to sort things out alone.
By reading this site, you’ve already shown an interest to learn how to architect and test your app. Wouldn’t it be great to have a mentor to guide you through, to make sure you’re applying the right techniques in the right way?
I wanted to thank you for this great series that changed my way of developing. I’m currently applying it into the project I’m working on at the moment.
But not everyone is lucky to have a good mentor
When you work with a client or project manager, many times you’re thrusted into the thick of things. It’s scary to admit ineptness to your clients or boss. Especially when they’re paying you and expect you to already know your craft.
It’s not easy to tell them:
I haven’t done this before, so I’m going to need the next week to try a few things. Oh, by the way, there’s no guarantee that I’ll figure this out. It may or may not work.
I’m going to need to refactor this class before I can implement this new feature. It should take about 2 days. Hmm… okay. It may take up to 5 days. Hmm… it may also affect other things. If that happens, it’ll take even longer.
At the same time, you need your clients or company to continue to pay you. That’s a tough ask.
You wish there would be someone to bounce ideas off. You know it’ll increase the likelihood of success. But you don’t know any expert in your network. Even if you do, they would be too busy or expensive.
With a Clean Swift mentor, you’ll be able to do things the right way, the very first time. With Clean Architecture and the VIP cycle, you don’t refactor because you need to clean up a previous mess. You refactor because you want to improve your code. You can improve your code with confidence because your unit tests are an assurance, not a liability.
Well thought response for every case which helped me to see the fault of the design, which is that indexes which are related to database can’t be used on View level (obviously) if there is a possibility that invalid data arrives. Recounting indexes on view level allows me to simply (as you also suggest) disregard the data received in worker. This example also proves that layer separation is of utmost importance.
Imagine you have, not just one, but many Clean Swift experts at your fingertip when you need it
What if there is a community of experts who know Clean Swift inside out? They are right there when you need it. You can learn, share, and grow together.
You can start every day with a win. Imagine a day like this:
You go to work in the morning with a fresh mind. Because you learn how to keep a todo list for developers, not for managers, you can take a quick glance and immediately know where you left off from yesterday. This minimizes context switching and get you into the zone right away.
You read the notes to quickly get the context for a bug you were working on the day before. Then, you open the interactor in Xcode, find the
// TODO: and get to work.
You hit a blocker. You don’t know how to mock this class in order to isolate this bug for testing. So you ask your Clean Swift mentors. Within 10 minutes, someone who’s been there, seen that, and done that gives you a light bulb moment. Ah ha! This is how others have done it with great success. So that’s how you can do it too.
You then write a couple test cases for the bug. Run your tests to make sure your fix not only works, but also not introduce any regression. All green. Commit and push.
Onto the next thing in your notes. It’s a new feature. So you open up the scene’s VIP cycle. View controller in the main editor. Interactor and presenter in the assistant editors. Model and router in a new tab. Ready to go through the VIP cycle and TDD this thing.
Another blocker. You aren’t sure how to properly encapsulate the network calls to this API. So you ask your Clean Swift mentors who guide you through the VIP cycle to create some shared workers that you can reuse for other parts of your app.
Now you can finish off the implementation and get it fully tested. All green. Commit and push.
When you pile up many small wins like these throughout the day, that’s what a productive day should feel like. A Clean Swift mentor can show you the right path so you don’t have to waste time walking down the wrong path and avoid making the same mistakes.
Having a good mentor pays off by itself
A Clean Swift mentor can speed up your learning. You’ll be able to:
- Use proven software design principles such as the Single Responsibility Principle and the Dependency Inversion Principle to break up your classes and methods
- Write unit tests for your code such that it provides verification but are not fragile
- Use Test Driven Development the right way to provide full coverage of your business use cases
- Organize your code base using Xcode groups and file system folders effectively
- Make your app flexible to accommodate changing requirements and prevent scope creep from taking down your architecture and test suites
You’re not alone shooting in the dark anymore. You can now join a community of Clean Swift experts to get help and learn from one another. You no longer have to waste time reading through 15 blog posts and StackOverflow answers, trying to sort things out yourself.
By cultivating the right mindset and leveling up your development skills, you’ll gain the experience to always do the right thing the first time. You won’t be running in crisis mode anymore. You’ll be confident to tell your clients or managers what the risks are, and how long it will take. You’ll have no hesitation to raise your rate, because you know you’re worth more.
I’ve surfed the Internet trying to solve problems of my MVC-based (massive-view-controller) project and found Clean Swift. It really pushed me to digging and looking into how to improve my skills and heal up my projects … Clean Swift was like a revelation to me, and a great push to a better world of coding. So, thank you again for your great work!
Introducing the Clean Swift Mentorship Program
When you join the mentorship program, you’ll get daily access to a community of Clean Swift experts who can help you out when you’re stuck. Learn together in group discussions. Share your ideas and get feedback. Make new friends and build working relationships. And possible future referrals for work.
To give you a sneak peek of what the mentorship program looks like, here are a couple screenshots showing a previous workshop I ran for the Clean Swift early adopters.
Insider-only screencasts to illustrate important concepts, plus custom videos tailor-made for you to answer your specific questions:
Practice opportunity to get hands-on experience, and to get your code reviewed by your peers:
By joining the mentorship program, you’ll be able to:
- Participate in our private Slack team to get help when you’re stuck
- Get instant access to screencast tutorials in our private Wistia group There are currently two screencast series on the following topics on: How to convert your existing project to Clean Swift (over 3.5 hours) and How to add unit tests to your existing project (over 1.5 hours and expanding)
- Learn how to use Core Data,
NSFetchedResultsController, and A/B testing techniques with advanced workers from sample apps I do for members
- Structure your apps using container view controllers
- Persist data by building an encapsulated layer using Core Data and convert between managed objects and entity models
- Extract your networking code to dedicated workers and establish a CRUD API so that changes in JSON structures do not break your app or tests
- Evolve your unit testing skills to apply effectively to your apps
- Access to time saving expert advice and answers to your questions
- Share your successes and struggles to gain new perspectives
- Learn real world software engineering skills to level up your career
- Get project specific help using screen sharing and pair programming
- Monthly roundups to summarize important takeaways so you don’t miss a beat
- Code review to post your own code to receive constructive feedback
- Post your projects and availability in the marketplace channel
Thanks for the insight. I’ve known for a decade the benefits of Unit Tests and have tried on a number of occasions to implement them, but the practice never really “clicked”. Too much effort vs limited return, fragile tests, decided WHAT to test, etc, especially with iOS development. With your Clean Swift architecture, everything has just “clicked”. The unit tests have flowed out of the keyboard and I’m excited about an architecture in a way that I haven’t in a long time.
This mentorship program costs $149 per month. Less than $5 a day. It’s like buying someone a coffee to pick their brains. This mentorship program easily pays for itself if you’re able to get that one piece of sage wisdom to avoid missteps and save one hour in a month.
If you’re working for yourself, that’s fantastic. You know your numbers, and can easily see if this is a good investment for your business. Even if you’re employed, joining this mentorship program can help you leapfrog in your career. By taking an initiative to level up and showing your boss that you take your job seriously, it can be the reason why you deserve the next promotion or big raise. It’ll earn you the respect among your peers when it comes to leading your development team.
Are you ready to level up?
If you’re thinking about joining, but want to talk to me first to make sure it’ll really benefit you. Or, if you have questions you want answers to but can’t find them above, get in touch with me.
Here’s a ready-to-use copy-and-paste email template to help you get the support of your boss or HR to pay for this mentorship program.