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

Day 38 - iExpense and suddenly i feel like i'm not understanding anything

Forums > 100 Days of SwiftUI

Hi everyone,

I've been following along the 100 Days of SwiftUI and doing just fine with completing the projects and challenges without needing hints too often, but on Day 38 i kind of lost it. Suddenly, we got to work with many .swift files inside our projects, using data from one place in the other and extending protocols and many other things. My head just crashed, and I solved only the first two challenges (my solutions were pretty garbage after looking at Paul's solutions). After I watched Paul's video on the challenges (especially the third challenge) I feel like I'm not getting anything anymore.

What should I do to catch up? Just keep going with the next lesson or maybe do some HWS+ content to familiarize myself with the concepts used in Day 38? I am lost here. :o

2      

Paul said it

So, if you’re keen to rush ahead to tomorrow’s new project, please follow Vettel’s advice: press pause and let everything sink in.

Maybe redo Project 7 again. Now you know the pitfalls you might be unable to understand them again. The great thing about the course you can redo them (I have done them at least twice).

Enjoy and keep coding

3      

Don't beat yourself up that 3rd challenge was difficult!

It's easy to get disheartend when you can't find a solution to a challenge, but do you remember how good you felt when you solved a challenge? the feeling is amazing and we all love that feeling, but sometimes we can be stuck on a problem for hours or even days and in that moment programming feels like it isn't for you, but if you stick at it and don't give up you will figure it out, remember it's okay to ask for help understanding a problem.

Programming is just following a series of steps and if you stop to think about the problem you're trying to solve and understand what the problem is you can write a series of comments with each step needed to reach that goal.

3      

Thanks for the kind words, guys! I think I will recreate the whole project 7 as @NigelGee mentioned and comment every step, explaining to myself what's being done as @Bytesizelearning suggested. The jump from one ContentView to like 7 .swift files interconnected with each other was quite a step for me.

2      

As someone with ADHD, I can tell you what that feeling of losing it is: you're running out of (human brain) working memory. In your case, that's because you're still learning this, and so you're holding the complexity of not completely understanding it in your working memory while trying to pile other things in there, and you hit your capacity for complexity.

The approach I take when I hit that wall is to look for something, anything, that I can do that will make one part seem simpler. Then, when you get a couple of those things nailed down, your brain will have more room to work and everything will start to seem simpler as you proceed.

Writing down a list of things you want to accomplish can sometimes be enough for this phase if you're not too stuck.

Another thing that can really help when you're looking at multiple data sources: diagrams, showing where every source of data is and how it flows through your app. Called a Data Flow Diagram. The best book I've found for how to do them is an oldie, but still worth it, and used copies are cheap (from $3!) on Amazon last I looked: Tom Demarco's Structured Analysis and System Specification.

I still do my diagrams on paper, because I think the act of handwriting helps my brain out, but it may not work that way for yours.

The good news is that these steps can make large and complex apps possible, you just have to know when you're hitting the wall and how to fix that.

(For those who don't know, many of the symptoms of ADHD are caused by less working memory.)

2      

@Aparikk sings a tune familiar to a lot of us....

on Day 38 i kind of lost it. ... [snip]... My head just crashed,

To help me remember SwiftUI lessons, I started answering questions in the forum. At first my answers were terse and often not helpful.

But as the concepts became clearer to me, I started having fun with creative answers. Search for my handle in the forums to see.

When I found a tough question, I used the Rubber Duck technique. What's that you ask?

See -> Teach the Rubber Duck

2      

Thanks, @Obelix and @deirdresm!

About the ADHD part… well, take a guess about me, haha. The Rubber-Duck-Technique sounds brilliant! I'll be lecturing my Dachshund from now when working on difficult topics. I also decided to take a few steps back for some days and found the Stanford CS193p Course, which is completely free and great. So, my plan for now is to catch up to day 38 by going through the Stanford Course and then continue with HWS from there. This should solidify my knowledge of the very basics, so I can approach the new complex stuff on Day 38 and move from there.

In case anyone is interested in the CS193p, here is the link: https://cs193p.sites.stanford.edu

But beware: the reading assignment after the first lecture is… see for yourself ^_^

2      

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!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.