Philomath's Dream Job Journey Journal

Update 2/8/22:

Feeling really disheartened right now. I know. I know that I should probably just step away and come back when I’m ready to try this again. I’ve been on a roll lately with understanding swift and Xcode, but I just dipped my toes in the iOS Databases course today and WOW. I am just so lost, confused, and disheartened.

The instructions just don’t work. I can’t even get started.

I’m worried I’ve messed things up on my computer by trying to follow terminal commands that don’t even work. I don’t know what I’m doing in terminal.

I paid a bunch of money up front to CWC because I was really impressed with the iOS Foundation courses. I felt like I was really learning how to do this and that CWC was doing a great job teaching me. But with so many setbacks immediately on entering the database course, I’m worried that my purchases went toward courses I can’t learn from. After scanning the forum, it seems like lots of people have had issues with this course for quite a while.

The worst part is that I really didn’t want to use Google for my apps. Even if I get these random programs installed (Cocoapods, Firebase, Homebrew???), I don’t know if I’ll really need them. I don’t like Google’s business model and I don’t like their privacy policies.

I am such a newbie so who knows if this is even possible: But I wanted to design apps that had people login with their Apple ID and store their data in iCloud. But in order to do that, I have to understand the basics of databases in the first place.

I’m just feeling so frustrated right now with how hard it is to understand the basics.

Forgive the rant, please. I’ll just give up for now. I’m sure this disconnect is by virtue of how fast technology updates. That’s why it’s so hard to teach people technology heavy concepts, I’m sure. But I wish priority (within technology education) was given to making sure introductory explanations work. Because it’s people like me, who know enough to follow instructions - but not enough to know what we’re doing - that cause problems.

See my reply to your other message regarding installing HomBrew.

Also note that you can achieve the same functionality in terms of installing Firebase libraries by using Swift Package Manager within Xcode.

From the Xcode menu select File > Add Packages

In the next window presented paste in the url for the Firebase SDK into the search box at the top right.

That url is specified in the Firebase Documentation on this page. Step 4

https://firebase.google.com/docs/ios/setup

Next, click on Add Package and then wait for it to resolve the Github URL. You will see the progress like this.

When that completes you will be presented with a list of frameworks to select from which are much like what you would specify in a Podfile if you were installing the same packages via cocoapods.

Select each one you require and then click on Add Package.

Those dependencies will be installed and Xcode will then show a message up the top “Indexing | Processing files” so just let it finish that process

That’s it. Done.

1 Like

Hey!! I went through the same thing: you can make it past it! It was so painful for me as well for three or four days. Seemed like such a waste of time, trying to get things working. Still, keep at it!!

Hey one of the biggest benefits of this platform is their community, and more than that, their awesome teaching assistants. Look, @Chris_Parker has already reached out with detailed help/ instructions :slight_smile: he kept working with me and got me through my Cocoapods fiasco on an M1 Mac as well. Super helpful!! So people are here to help you. You got this!

@Chris_Parker Thank you for responding so quickly. I took a two day break and came back with a clear head. I’ll reply to your other post, but knowing that I wasn’t causing huge errors with my computer really helped me calm down and push through. Using the Package Manager has so far worked great. From spending so long on the forum, I know that I might hit issues in a later module since I used the package manager, but I’ll deal with that when I get there. Thank you again for so quickly finding my posts and giving me such clear directions.

Thank you, Andrew. You have no idea how much that helped me. I was feeling so stupid. I knew I was only doing basic terminal operations, but I was terrified that I was ruining my computer because I just had no idea what was going on. To know that you struggled with it too made me feel so much better.

You were totally right. I feel like my critique of the course still stands, but it really needs to be tempered with the following facts:

1- The out-of-date instructions really seem to only apply to the very beginning of the course when you’re learning how to install Firebase. (I was so worried the whole course was going to be like that. But as far as I can tell, that’s not the case.) Micah is doing a great job explaining Firebase so far.

2 - Unlike every other platform I’ve ever tried to learn coding with, the CWC team responds quickly and helpfully every time I contact them. Thank you CWC team for prioritizing that. Andrew is absolutely right. You guys are doing amazing with that and it is an invaluable resource.

I’ll give this feedback elsewhere too, but if there is one thing the CWC team could do to help the confusion when Xcode or other tech updates is to pin a post with the most up-to-date fix. It’s really frustrating to go through multiple fixes that don’t work while you try to find the most up-to-date one. Especially for problems that are constantly being asked. I know I’ve seen Chris often answering the same question (in one format or the other) over and over again for a few common issues.

1 Like

Update 3/15/22

It has been so long since I posted in my journal. And I should probably be better about that in order to improve my accountability.

  1. I never was able to get past my block in the database course. There were so many out-dated instructions and I still couldn’t get cocoapods to work with my new Mac.

  2. For a while, I just gave up on the course entirely and just tried watching more up-to-date YouTube videos to learn. I did learn some stuff. But I’m just getting ahead of myself in some areas and super confused in others.

  3. Now I’m back to trying to watch the database course but since I can’t follow along all the time, I’m trying to apply each step I learn to a new app I designed.

Coding is so frustrating some times. I love when I know how to do something and I get to create this thing from scratch. I love when I get something working!


My current project is so tangled with problems. And because the project builds, I can’t even figure out where to start. I think I’ll have to approach it with a new mind tomorrow. As of now, my UIKit project has these identifiable problems:

  1. The keyboard covers the textFields.
  2. Clicking the sign-in button is presenting a blank view as a pop-over.

I can’t even test if all my work for creating a tableView works, because of this blank view.


Questions:

1. Why is it presenting as a popover and not just a new view.
Need to review different segues

2. Is the view it’s presenting even the HomeView?

  • If so, then why is it blank?
  • Is the tableView broken somehow?
  • Is the data not loading from the database?

3. Is the view blank because it’s presenting the Food Detail view?

  • If so, why does it think a row is selected?

Right now, I can’t even think of ways to test these different questions. Coding an app is really hard y’all.

1 Like

Hey you and me both brother! It’s great to see the posts and progress go right along with it. For now, I’m not going to open up Xcode again until I ensure I journaled about the previous work

Hey don’t give up! Post about it. I ran into the same problem, and almost gave up on it too! However, I posted the issue, despite the duplicates, and someone awesome like @Chris_Parker came to help.
Here I deleted all of the Pods in my current project, because I might’ve corrupted them with everything I tried:
rm -rf Pods
Then I re-installed homebrew. Lastly, I followed the instructions on this post to get things working:

Hey, RedFox! Good to talk to you again. It’s so motivating to know there are other people coding and getting stuck and pushing through too.

I only gave up after Chris Parker and several other people couldn’t figure out why it still wasn’t working. I have been able to use Firestore using the native Package Manager. So I’m still able to make apps with databases. I just can’t do all of the modules since not all of Firebase’s pods are available through package manager.

I haven’t seen those bottom instructions before, so I’ll give those ones a try. It’s slightly different from all the other things I’ve tried.

Wednesday 3/16/22 Update

Guys, coding is less like riding a bike and more like playing an instrument. After taking a week off of coding, I’m finding it takes a few hours to get my mind up and running in the coding sphere again.

Lesson: Don’t be discouraged if it takes a little while to remember how to do things.

Today I:

  • Reset the rules for my Firebase projects so I can keep working on them.
  • Rewatched SwiftUI Databases M3 to help catch up my brain on syntax

I’ve had an enforced three-day break due to my Mac mini going on a go-slow (even slower than usual!) but, fortunately, it chose to do this in the middle of a fairly straightforward set of lessons on the CitySightsApp module so I’ve been able to get back into it quite quickly.

I definitely wouldn’t want to take a week off, especially during a tricky bit.

I do find that if my head is too bogged down with code, and I’m struggling to see the wood for the trees, taking a couple of hours out and going on a run (especially if it’s sunny) works a treat to get me back on track.

That is an excellent idea, Rudderham. I also feel like my mind is clearer after spending some time outside. Foggy brain is a real thing.

Monday 3/21/22:

Today I completed M4L3 of the iOS Database Course (SwiftUI). I also discovered the SwiftUI View Library “course”! Love that addition! I’m going to start watching one view a day to help reinforce the tools I already have in my toolbox and learn new tips on how to use them.


I Learned / Reviewed:

  • How to determine if I my app should show the authentication workflow or the normal capabilities
  • TabView Syntax
  • Enums
  • Picker Syntax
  • Computed Properties
  • Way to make textFields look better
.textFieldStyle(.roundedBorder)
  • Why VStacks never seemed to do the right thing with alignment

DID YOU KNOW???

VStack alignment is RELATIVE to everything IN THE VSTACK! When you set the alignment property of a VStack, it’s not saying how you want that VStack to appear on the screen. It’s saying, “How do you want all the things in here to align relative to each other?” The Vstack itself is only as big as its largest element and by default everything (including container views) are centered on the screen.

SO . . . . how do I get that VStack to align to the left or right?

Put a flexible frame property on the VStack and add an alignment parameter to the frame!

VStack {}
    .frame(maxWidth: .infinity, alignment: .leading)

OR

Put the first item in the VStack inside an HStack with a Spacer() to make the VStack take up all the available space.

VStack (alignment: .leading) {
   
   HStack {
          Text("It's a me, Mario")
          Spacer()
   }

   Text("Wahoo!")
}
1 Like

Tuesday 3/22/22:

Today I completed M4L4 of the iOS Database Course (SwiftUI) and the LazyVStack lesson. I’ve slowed down a bit to doing only one lesson a day because I’m in the FINAL stretch of my programming degree! 5 weeks to graduation! :partying_face: But it also means final projects are due and it’s eating a lot of my time. Still, I’ve found an appreciation for slowing down. Now, I watch the videos once and program along. Then I watch the video a second time and take notes. Handwriting code notes takes time, but I’m absorbing more.


I Learned / Reviewed:

  • Syntax for logging in / logging out / creating user in Firebase
  • How to switch to the logged in view once logged in using a flag managed by the ViewModel
  • Getting the user.uid to use as a document ID in my user collection
  • How to create a singleton and a UserService class
  • Loading user data from the database into a user model when user signs up / logs in / opens app when logged in
  • Calling methods to match data ON THE VIEWS that will show that data
  • LazyVStacks are views that push-out horizontally (so alignment property acts like I expect it to)
  • LazyVStacks can have sections. And those sections can have headers and footers (usually displaying a subView) that can be pinned)

DID YOU KNOW???

1- The singleton pattern allows you to design a class that can only have ONE global instance. (That’s why Chris uses it for the user object for the app. You only want ONE single user at a time.)

2 - When you use the singleton pattern, you have to make the initializer private so the rest of your code can call it and make a new object. Have a section of code within the singleton’s definition that calls the private constructor and saves it in a static field.

class UserService {
    var user = User()
    static var shared = UserService()
    private init() {}
}

More awesome info about this design pattern:

Refactoring Guru: Singleton Pattern


Question: Why don’t we just use the singleton pattern on the user class directly? Why create a UserService class?

Wednesday 3/23/22:

Today I completed M4L5 of the iOS Database Course (SwiftUI) and the HStack lesson. I also got a new idea for an app and got distracted by working on it! Please . . . don’t do this, brain! I already have three other apps half finished. I wrote the idea down, but I was so excited I just jumped into building it.


I Learned / Reviewed:

  • How to save a user’s progress as they move through my app both locally and into my database
  • Important times to save user data
  • How to run code whenever my app goes into the background (leaves active state)
  • How HStack’s alignment works
  • How to customize the look of an HStack

DID YOU KNOW???

You can have text in an HStack align to the baseline of the letters! This fixes that frustrating thing where text is supposedly aligned, but it doesn’t LOOK aligned.

HStack (alignment: .firstTextBaseline) { }
2 Likes

Thursday 3/24/22:

It was a foggy brain day . . . Today I completed M4L6 of the iOS Database Course (SwiftUI) and the LazyHStack lesson. However, I got REALLY confused in M4L6 around when we started applying the navigation. I followed along, but I honestly could not explain the logic behind what it’s doing. And my brain is so foggy that I’m not going to keep staring at it. Instead, I’ll rewatch the video tomorrow and see if I can understand the logic then.


I Learned / Reviewed:

  • How to customize the look of a LazyHStack

I really can’t list anything else because I can’t say I learned much in today’s module video. Hopefully I get it tomorrow.


DID YOU KNOW???

If you put a shadow on a container view, it adds a shadow to EVERYTHING in the container. So you’ll want to add the shadow specifically to a .background modifier instead. However! Keep in mind that in a LazyHStack, the frame on the scrollview or the frame on the HStack can cut off the shadow. So make sure you add enough padding to make the shadow visible.

ScrollView {
    LazyHStack { }
}
.background(Rectangle().shadow(radius: 10))
.padding()

Friday 3/25/22:

So glad I came back to the video on a second day. I understood so much more with a clear brain. And I found the exact parts of the video that I was confused on. Today I rewatched M4L6 and took notes. I also watched the ZStack, Spacer, Geometry Reader, Lazy HGrid, and ScrollViewReader videos.


I Learned / Reviewed:

  • ZStack is a pull-in view
  • Why Spacers don’t seem to work when I use Rectangles too!
  • How GeometryReaders work - I understood it SO much better from this tutorial - is still probably a difficult concept due to the math needed to calculate where to put it - but at least I understand how it works now
  • Formatting a LazyHGrid
  • What a ScrollViewReader is! Never heard of that view before
  • How to use computed properties and conditional statements to change what view to display based on data stored in User instance

DID YOU KNOW???

Rectangle() take priority over a Spacer()! That’s why when you have Spacers and Rectangles in the same view, the Spacers suddenly seem to stop working! To fix it, you need to give the Spacer a minLength parameter or give the Rectangle a frame.


Questions:
I’ll post them in a different post too to get answers, but documenting them here.

  1. Why do we use a Group {} to return a view to a computed property?

  2. What exactly are a navigation link’s tag and selection parameters?

  3. Why is my TabView bar transparent in my learning app? :face_with_raised_eyebrow: Did I mis-follow some instruction? :thinking: Is there a bug? :face_with_monocle: WHY YOU LOOK WRONG TAB BAR???

I tried watching some other videos to find the answer, but couldn’t figure it out.

Still coding @Philomath, or find your dream job???

Hey Andrew! Thanks for checking in on me. You got me back on here. I had to take a break because my final capstone class project was eating my whole life. I did it though! Graduated summa cum laude with a degree in Information Technology and a minor in Advanced Software Development. :slight_smile:

Then I got sick. I’m on my way to health, but for a while there programming wasn’t really a thing I could do. Now I’m trying to get back into it, but I’m frustrated. I have all these awesome apps I was so excited to build. And I was making good progress. But despite my comments and documentation, it’s really hard to pick up where I left off. So, I’m glad you messaged me. Maybe this will be the push I need to muddle through the frustration and pick up where I left off.

2 Likes

First, congrats on your degree :partying_face: that’s awesome!! Although, I’m sorry to hear you got sick :pensive:

DO IT :facepunch:t2: you got this! Just a little at a time. Even starting to code once a week again is better than nothing. Glad your health returned to the point, where you can do this!!

Saturday, June 4

Today I did M5L3 of the SwiftUI Databases course. I learned how to create, retrieve, update, and delete data using CoreData. The most important thing is getting a reference to the managed object context. Then you can just create objects using a context initializer, retrieve objects with FetchRequests, and delete objects using the viewContext’s delete method. The most important thing is to remember to also call the save method (which throws).

I’m toying with the idea of doing the 90 day challenge as kind of warming myself back up to doing coding again. 🤷

2 Likes