Philomath's Dream Job Journey Journal

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

Hey welcome back @Philomath! Way to publish another post and get through another lesson. Hope you do some more coding this week as I am :wink:

Just decide to do something, and stick with it! Doesn’t matter what you choose, but choose/ take action now. Don’t let more time slip away. If the 90-day challenge inspires you, then get to it!! Love it :slight_smile: otherwise, they have some pretty cool tutorials still out there.

Honestly, I found the database course kinda tough/ dry, so some of the other courses like the Chat App really excite me. I’m glad they’ve published enough content on that to make it worth your time. Pretty cool, they’re adding end-to-end encryption in the latest lesson.

Cheers,
Andrew

Hey Andrew!

I didn’t post in my journal, but this week I spent most of my coding time watching WWDC videos. It’s really exciting when I actually understand what they’re saying. Sometimes I run into concepts that I’m completely unfamiliar with and I realize how far I have to go still.

Philomath

1 Like

Oh awesome! Hope you’re getting some good inspiration and ideas for everything up and coming :blush:

Man, it’s been so long since I posted in my journal. But the good news is that I haven’t been neglecting coding in the meantime. :blush: I actually have been studying really hard and took both of Apple’s Swift Certification tests! As of today, it’s official! I’m a certified iOS Developer!

I’ve also been building a bunch of small apps to practice what I’ve learned through Code with Chris. Things like a BMI calculator, a xyloPhone app, and a tip calculator. Every app has things I’d like to improve or fix, but they’re working apps!

I’ve also been taking a crash course Git and GitHub course and now I’m building out my GitHub page and portfolio! I’ll share some of my work here once I finish cleaning up my GitHub. :blush: I’m pretty proud of my progress!

I’ve also finalized my resume! (it looks pretty freaking awesome I think - I spent a lot of time designing it to look like an iOS app! Even built it using SwiftUI!) I’ll start applying to developer jobs now. This dream job feels closer than ever. I can’t believe I’ve gotten this far.

2 Likes

Congrats @Philomath!! I’ve been following your Journal since its beginning so I’m reaaally happy for you :smiley: You’re gonna go far, keep it up!!!

1 Like

Thank you!

I’m a little behind you, but I feel I’m on the same path.

Although I’ve not put together a “bunch of small apps”, I am working on an app that incorporates much that I’ve learned this year and that I hope will be a good way to “prove” what I’m capable of. I’m interested in those certifications you’ve achieved.

Just this week I took a few days out to work on my resume - it won’t be as design-centric as yours, I’m sure, but I suddenly realised that there’s a lot of “stuff” I can do but have never had to confidence to try and “sell” myself. Figuring out how to put together a resume was a challenge in itself.

I’ve been working on creating a LinkedIn profile, and have been reorganising my GitHub so that I can make some files “public” to, again, prove what I’ve learned.

I still feel I’m a couple of months away from being in the right place to start actually applying for developer jobs, but I feel that I’m solidly on the path and heading in the right direction.

It’s amazing to be putting together things that I’ve learned in the past with what I’ve learned this year and finding it all just “works” without too much head-scratching. It feels a long way away from staring at “Hello World” in Xcode and wondering just how this “SwiftUI” thing is supposed to work.

Despite how far I’ve come, I’m energised with the thought of how much more there is to still learn. I don’t think I ever want to reach a point where “learning” is phrased in past-tense, because I always want to be learning “new stuff”. It’s a great road to be on.

Car Challenge

I’ve been continuing my iOS development journey with some other courses, but when I saw the community challenge I wanted to give it a try. So I’m back! I know the challenge is almost over, but I’ll keep working on it. :blush: Better late than never. I’m just starting today.

**REPO: ** https://github.com/PhilomathMac/CarListing

Today, I finished the Level 1 Requirements. Wow! It was so fun to have a goal to work toward. I found these CWC tutorials helpful for jogging my memory of card UI and parsing JSON data.

1 Like

Car Challenge Day 2

Alright, well today I got halfway through the level two requirements so far. Here’s what I’ve got.

Here’s my GitHub Repo:

Things I’m Stuck On Currently:

1. Only allow one card to be expanded at a time & first card starts expanded

Right now, the isExpanded property is owned by the CarCard. The problem is that means each card can be expanded or collapsed irregardless of the others.

Originally, I wanted my CarModel to maintain a Published property called “selectedCar” that stored the id of the car to be selected. I was going to set that property as the first car in the initializer. I got kinda far on that and then found that it just wasn’t working. When the user clicked the button on the card, it was changing the property in my model as expected, but the view wasn’t reloading. Perhaps I needed to involve a state property somewhere . . . Or maybe I need to make my model an environmentObject instead. Gosh I need to brush up on that.

Currently abandoned that train of though in my ExpandedCards branch and moved to an ExpandedCards-2 branch to start over. Sigh.

2. Size of card calculated dynamically since size of detailView can change

Right now, my card height is calculated dynamically. BUT it’s only switching between two set heights for expanded or not-expanded. It’s not causing any problems right now, but I know it doesn’t meet the specifications and would cause problems with other data. Honestly, I have no ideas where to go with this right now.

Any help is welcome!
@joash @inaki @RedFox1 @CalStark

1 Like

Hey Philomath,

I’m honoured you thought about me for help!

1. Only allow one card to be expanded at a time

Your idea of a selectedCard variable is the way. If you couldn’t make it work with your view model, a state variable would be sure to work.

In CarListView, you can have a selectedCard String variable that keeps track of your selected card.
It’s passed down to CarCard as a binding.
The expanded property is a Bool computing whether a card’s id is equal to that of selectedCard.

However, I’m curious as to why your viewmodel solution didn’t work. It should. I’d love to see your code!! (EDIT: → see next post)

2. Size of card calculated dynamiccally

Right now the frame of your CarCard can only take two values:

   .frame(height: isExpanded ? 400 : 250)

But I believe this should put you in the right direction:

  .frame(maxHeight: isExpanded ? .infinity : 250) 

You might need to set a minHeight as well.

Also for this use case I don’t know if you can use a ZStack (I admit I haven’t tried this challenge haha) but if you can’t make the dynamic height thing work with your rectangle, try using a background instead.

Good luck! :slight_smile:

I found your view model solution in the “expandableCards” branch. This code is the issue:

struct CarCard: View {
    let car: Car
    let model: CarModel
...

The model should be declared as an @EnvironmentObject var. It tells the CarCard struct to listen for changes in the published properties of the Observable CarModel.

But you can also use a state variable passed as a binding at the view level like I mentioned in my previous post.

Both solutions will work. Since it’s pure UI-logic I would personally use the solution I mentioned earlier with the @State variable at the View level so as to keep the ViewModel clean but it’s up to you.

Thank you @CalStark for the tips! It’s so good to hear someone else confirm that my initial thought of a selectedCard variable is the way to go. Sounds like I just wasn’t passing my data around correctly with environmentVariables or bindings. I’ll play with it again and see if I can get that working using your tips! I’ll play around with both environment variables and bindings to see which one I like better.

I’ll also play with using maxHeight instead of just height again. I initially ran into some difficulty getting my card layout to resize nicely when using maxHeight. Suddenly had the image overlapping with my text or making the card huge, but we’ll see if I can get it working now. :slight_smile: This is a good nudge in the right direction.

Thank you!

1 Like

Yeah you just weren’t passing data around correctly but you’re almost there!

The rectangle takes as much space as you give it, and by default the ZStack takes as much space as its children, so if you set an infinite max height… anyway, I recommend giving backgrounds a try :smiley:

This project is for sure a great challenge. Glad I was able to help, keep it up!

Car Challenge Day 3 Update

Almost done with level 2! The only thing I’m stuck on now is getting the size of the card to calculate dynamically. Thank you to @CalStark for helping me figure out the environment variable! Now, I’ve got the first card starting as expanded and only one card is expanded at a time. The animation seems a little jittery sometimes so I wonder if that’s just the simulator or if my implementation isn’t the best.

Here’s what I have right now.

And here’s the link to my GitHub Repo.

I’m playing with backgrounds right now (per @CalStark 's suggestion) because trying to dynamically calculate the card’s height using maxHeight instead of height results in this:

Wonder if this is because I’m using a GeometryReader to calculate the image height. I’ve always had a little trouble with UI bugs when using those.

var body: some View {
        ZStack {
            Rectangle()
                .foregroundColor(.white)
            GeometryReader { geo in
                HStack {
                    
                    Image(car.make)
                        .resizable()
                        .aspectRatio(contentMode: .fill)
                        .frame(width: geo.size.width / 2, height: geo.size.height)
                        .clipped()
                        .padding(.trailing, 10)
                    
                    VStack(alignment: .leading) {
                        // Car Name
                        Text("\(car.make) \(car.model)")
                            .font(.title2)
                            .bold()
                            .padding(.top, 10)
                            .padding(.bottom, 1)
                        
                        // Car Price
                        Text(car.formattedMarketPrice)
                            .font(.caption)
                            .italic()
                            .padding(.bottom, 20)
                        
                        // Rating
                        RatingView(rating: car.rating)
                            .padding(.bottom, 10)
                        
                        // Details
                        if car.id == model.selectedCar {
                            CarDetailView(car: car)
                        }
                        Spacer()
                        
                        // Details Button
                        Button {
                            DispatchQueue.main.async {
                                withAnimation {
                                    
                                    if car.id == model.selectedCar {
                                        model.selectedCar = nil
                                    } else {
                                        model.selectedCar = car.id
                                    }
                                    
                                }
                            }
                        } label: {
                            Text(car.id == model.selectedCar ? "Hide Details" : "Show Details" )
                                .bold()
                                .padding(.bottom, 10)
                        }

                       
                    }
                }
            }
        }
        .cornerRadius(20)
        .shadow(radius: 10)
        .padding()
        .frame(height: car.id == model.selectedCar ? 450 : 250)
    }

I realized I forgot to update my journal with my progress. I’m pretty much done with all levels now. :blush: The only thing I got stuck on was the dynamically created card sizes. I’d love to see a solution video. I have a feeling I got stuck because of the way I built out the cardUI. I’d also love to see a solution on how to pass the data because I get the feeling I overused the environment variable.

Here’s my repo:

Here’s the video of my finished app:

App Update!

I realized I haven’t been updating on here about an app I’ve been building. I may have a slightly ridiculous amount of tea at my house. And I wanted an app to store a list of all the teas I have. So I’ve been building that app in SwiftUI. I’ve got a working app now! I’m sure there are things to improve, but I’m pretty proud of how far I’ve gotten so far.


I’d LOVE it if anyone wanted to clone my repo and give me feedback on things to improve: Repo Link


What It Does

Currently, my app stores a list of teas (in CoreData!) and allows you to add, edit, search, filter, and delete those teas. Gosh, you’d think it would do more for how much I’ve worked on this. Thank you to the CarList challenge that helped me figure out how to do searching and filtering! I just had to translate those skills over to FetchRequests and CoreData. I also was able to use what I’ve learned about UserDefaults to load teas from JSON if they haven’t been loaded into CoreData before.


Next Steps

  • Add tabs with a feature view and a settings view
  • Feature view that recommends a tea or two for the day (Thinking of doing something similar to the recipe app featured view)
  • Make sure I have everything set up for CloudKit (but I’m having a hard time finding tutorials for that)
  • Authentication and Onboarding Flow (authentication flow needed with CloudKit?)
  • Make a watch App
  • Add ability to start a timer
  • Add ability to track how many times you’ve had that tea
  • Make search bar only visible when swiping up like in Apple apps (so much frustration so far)
2 Likes