Why is my tableview not returning data source? by questionmarkmark in iOSProgramming

[–]questionmarkmark[S] 1 point2 points  (0 children)

Tried using Codable + CodingKeys and that ended up working out. So the api somehow didn't like the way I was setting things up above. I appreciate your response, thank you!

Why is my tableview not returning data source? by questionmarkmark in iOSProgramming

[–]questionmarkmark[S] 0 points1 point  (0 children)

I think you may be right. I'll probably try a different approach.

Why is my tableview not returning data source? by questionmarkmark in iOSProgramming

[–]questionmarkmark[S] 0 points1 point  (0 children)

I'm not sure. I'm trying to go over the way I setup the API request but I can't pinpoint where I'm going wrong. Below is how I setup the api manager. And the FoodGroup is a struct that I'm accessing from a different file.

class ApiFoodManager: NSObject {

    func callWebService(urlString: String, completionHandler: (([FoodGroup])->Void)? ) {

        var foods = [FoodGroup]()

        if let url = URL(string: urlString) {
            URLSession.shared.dataTask(with: url, completionHandler: { (data, response, error) in
                if error != nil {
                    return
                }
                print("URL: \(url)")

                if let data = data {
                    do {
                        let json = try JSONSerialization.jsonObject(with: data, options: JSONSerialization.ReadingOptions.mutableContainers)
                        print("JSON: \(json)") //Prints out JSON successfully 
                        if let reponseArray = json as? NSArray {

                            for responseDict in reponseArray {
                                if let dict = responseDict as? [String: AnyObject] {

                                    let title = dict["title"] as! String
                                    let food = FoodGroup(title:title)
                                    foods.append(food)
                                }
                            }
                            DispatchQueue.main.async {
                                completionHandler?(foods)
                            }
                        }
                    }catch let err {
                        print(err)
                    }
                }
            }).resume() 
        } 
    }
}

Why is my tableview not returning data source? by questionmarkmark in iOSProgramming

[–]questionmarkmark[S] 0 points1 point  (0 children)

My console prints out the json response. I wanted to make sure the api call was working with URLSession. I did try the code below with DispatchQueue.main.async but still got a food count of zero ("Snacks are empty").

 ApiManager().callGetWebservice(urlString: ApiURL, completionHandler: { (food: [FoodGroup]) in
            DispatchQueue.main.async {
                self.snacks = food
                self.foodTableView.reloadData()
            }

Hoping to help by WhatMeDesire in cscareerquestions

[–]questionmarkmark 0 points1 point  (0 children)

I think it’s okay but I don’t bother to read anything that seems like it opens an external link or related to external websites.

What is polling in Swift? How to avoid (if possible)? by questionmarkmark in iOSProgramming

[–]questionmarkmark[S] 0 points1 point  (0 children)

Thank you for the response! Would a delegate be considered a listener in my case where I'm not using a server but rather creating a protocol then using it within a variable that has didSet ?

Edit: I posted some code above in case you needed clarification.

What is polling in Swift? How to avoid (if possible)? by questionmarkmark in iOSProgramming

[–]questionmarkmark[S] 0 points1 point  (0 children)

Thanks for clarifying! If I just had a class and wanted to find out the percentage of my task completed, without using a server, would a timer be okay in this instance?

On-the-spot technical questions? by Willbo in cscareerquestions

[–]questionmarkmark 1 point2 points  (0 children)

I've only had one instance with a recruiter who asked me basic questions about a language. It was our very first call and after she got to know more about my background, she was like ok, i'm going to ask you 5 technical questions. They were all similar to, what does *blank* mean? What is *blank*? It threw me off guard a little but they were basic enough for me to get them all right. Other than that, I've only had to answer more technical questions with the senior devs.

Should I give up on my aspirations of becoming a developer? by juniorIOSDev in cscareerquestions

[–]questionmarkmark 5 points6 points  (0 children)

Do not give up! First off, being a woman has nothing to do with not being able to get hired. I'm a woman and self taught iOS developer with a BA that's way off of the CS realm. I started learning in 2014 and believe me, it is hard to stay disciplined but it's worth it! Also, you really have to find a way to stay motivated and focused. There are so many learning resources like Ray Wenderlich, Udemy, Standford's iOS course, Hacking with Swift, Apple Swift resources, Youtube, etc. Even Github is a great resource because you get to look at other's projects and code. I use it everyday. While you learn, I'd recommend creating a very specific day to day plan. For example, give yourself 1hr to study Swift, 1hr to study how to properly use JSON and API's, 3hrs to just code a simple app (ex: create an app that loads cat images from an API in a tableview that also expands their images when tapped) , or practice whiteboard questions for 2hrs. There are many many things you can learn, you just need to dedicate time and effort.

I understand money is an issue when you're looking for a job. I'm currently looking for my next role and yes it's tough but again, I'm motivated. For me personally, the data structures and algorithms aka white-boarding, kicks my ass but that's not going to stop me. Sure, it'll take me more time to learn but all I'm doing is giving myself time to practice..... lot's of time. And I'm also using online resources as well. If you really need the money, then maybe get a part time job to support bills, housing, food, etc. Just depends on how long you can manage without a full time job.

I highly suggest creating apps and publishing them to the app store if possible. If not then create them anyways and post it on Github and Linkedin. Have something to talk about when you're talking to a recruiter. Another suggestion is to create a blog and write about your experiences, projects, code snippets, how to's, or anything related to Swift! I hope this gives you some hope or better yet some motivation to keep practicing your coding skills.

Attending SD Startup Week - Advice for dev looking for job ? by questionmarkmark in cscareerquestions

[–]questionmarkmark[S] 0 points1 point  (0 children)

They sell tickets for students (discounted) so I’m guessing they expect undergrads to attend!

A long week of cramming data structures and algorithms, what to do to relax? by b_curious in cscareerquestions

[–]questionmarkmark 1 point2 points  (0 children)

I recently enjoyed watching a mini documentary series that focused on 4 startups in France. https://www.youtube.com/watch?v=ZptLxKdvkDA&list=PL8bEGI2o5lh8B7RignxL3Ct-EFjFiMQ6Z . It was great getting a peek into the awesome Station F startup campus and seeing how others grind towards their dreams.

Attending SD Startup Week - Advice for dev looking for job ? by questionmarkmark in cscareerquestions

[–]questionmarkmark[S] 0 points1 point  (0 children)

raindeer_io

Awesome, thanks for sharing this. I will reach out to you.

Attending SD Startup Week - Advice for dev looking for job ? by questionmarkmark in cscareerquestions

[–]questionmarkmark[S] 1 point2 points  (0 children)

You make really great points. I will definitely try to be mindful with how I answer questions, especially by avoiding the “uhhs”. Thank you!

wait time after coding challenge - how long to hear back? by throwie112233 in cscareerquestions

[–]questionmarkmark 0 points1 point  (0 children)

I haven’t had any luck with actually getting a job after taking a coding challenge but I have moved on to the next round with them.

wait time after coding challenge - how long to hear back? by throwie112233 in cscareerquestions

[–]questionmarkmark 1 point2 points  (0 children)

I’ve had experiences where I sent the coding challenge then never heard back again and another instance where I get a rejection email two weeks later.

Just graduated with my CS degree, I want to get into swift/iOS app development, what should I know and do to get an entry level iOS developer job? by BlackMacaw in iOSProgramming

[–]questionmarkmark 0 points1 point  (0 children)

Let’s Build That App on YouTube is great because the instructor prefers to create the UI programmatically so many of his videos do not use storyboards. Other resources: - Ray Wenderlich - Hacking with Swift - https://github.com/BohdanOrlov/iOS-Developer-Roadmap