Learn Courses My Dashboard

Scott iOS journal

I have gone thru the Module 3 matching card game. Have gone thru the module several time to understand it.

Copied and pasted Chris code since my code is not working properly. Could not get the autofilling fields listed in the video tutorials. I think the Xcode version I have and what is on the video are slightly different so the options for the auto fill-in fields are different.

Using breakpoints to understand the flow of the program from startup to end. Also using print statements to find out what the array has stored.

Trying to modify the alert button and the timer at the end of module 3. Game logic for winning works but timer still runs in the background. I would like the timer to stop after the user wins the matching game. Alert button I would like to modify so the user can try the game again.

Changed the amount of time that I have to finish the game. Changed the simulator to iPad. Larger screen less scrolling when I am testing.

Running iMac mini and Xcode version 11.6 under Catalina. Considering upgrading to Sur and Xcode but worried it will make the tutorials difficult to follow using a different version of software.

  • Jan 12 2021

Scott,

       I have issues with autocoding only with the terminal. All kinds of unpredictable issues.

Fixed the timer. It was not stopping at the end of the game. Put the timer?.invalidate in the wrong branch of the if statement.

Ran it again and tested fine.

Going to have to watch how I spell variables and where the curly brackets are placed. Spent two hours trying to track down a bug only to figure out that I capitalized the variable when I declared it.

Also going to watch if the color changes and the auto populate(?) when coding. I should realize by now if the color does not change I have made a syntax or variable declaration incorrectly. Going to have to start writing it down on paper to keep track.

Thinking out loud here.

I think the variable scope is within the file you declare it. If I declare it in the ViewController.swift the variable is only available in the same swift file. If I use the variable inside the same swift file it is still available for me to use.

Still working on understanding optional chaining. I have a rough idea but not enough to stray from the original code to test it.

Still working on understanding functions and how they return values. I understand the theory but cannot seem to apply it properly.

In the module Chris adds code to filter out the duplicate pairs. I have yet to see a duplicate. Used my own code typed from the videos. Ran the app simulator about 15 times without any duplication.

Going to run thru the module 3 again trying for the most part to do it from memory. Consulting with the videos when I get stuck.

In the checkForGameEnd method, write the following in the if statement where hasWon is true.

timer?.invalidate()

showAlert(title: “Congratulations!”, message: “You have won the game!”)

Thanks for the reply. That is exactly what I did. I have the timer invalidate on the wrong side of the if statement. A silly error. A learning experience. Fixed it a two minutes after looking at the code line by line.

Thanks again for the help. It is appreciated. :slight_smile: :grinning:

Are you a moderator here or a member?

1 Like

I am actually not a moderator but I am a member tho haha!

Glad you figured it out! Happy to help!

It is nice to meet you. Its good to know there are smart helpful people like you in the community. :smiley:

1 Like

Thank you for the kind words! It is very encouraging to hear and it is very appreciated! :slight_smile:

And thank you for making my day, My day up until the point has been pretty rough. So thank you so much for the kind words. Means a lot!

And if you don’t mind telling me, just out of curiosity, where do you live?

I live in Canada. Where do you live?

Migrated to the new platform. It went very smoothly. All the original content I purchased I still have access to. Going thru the lessons to reflect my current progress.

I live in the United States. Bay Area, California. Pacific Standard Time. I am thinking about moving to a different state like Texas or Florida.

Updated the courses to reflect my current state of learning in the new system. Look is different but just as fast. Videos are the same as I am use to.

Not sure why you would want to move. Bay Area seems pleasant, nice weather, nice people, and tech friendly. Texas and Florida seems little bit less so. Texas seems extremely hot and dry, mostly centred around oil field industry. Florida is full of older people, hot, muggy, full of crocodiles and prone to hurricanes every season.
Do you get a lot of earthquakes and fires around your area?

1 Like

The main reason why we are moving is for education and schools. I do get earthquakes and fires around the area I live. like 5-6 months, there was a huge wildfire around here which lasted for a month straight. I feel like it is finally time to branch out and experience what life is like in a different place. After you spend some time in California, you’ll feel like it is NOT the golden state. It is a very toxic place to be. A lot of tech companies are moving from California to Texas.

Anyhoo, how is Canada?
Which city in Canada do you live in?

I would prefer not to say which city I am in. I like my privacy.

Wow. Toxic place…I guess it not like the brochures. The only place in California I thought had a problem was Los Angeles with smog and gangs. My perception was the rest of the state was full of socialist democrats, hippies, movie stars, music stars, tech companies and smokers of weed.

Canada is cold. Today -30 C.

Nice friendly people. Muticultural and multilingual. Great place to grow up.

1 Like

Moved on to the fire base modules. Stuck with the card game. Working on other parts of the course. I’ll try it again next week. There is some small bit of information my brain can’t seem to wrap around.

It seems to be centered around optional chaining. How to determine if the variable needs to be unwrapped. I can’t seem to determine when it needs to be unwrapped. There is some idea or thought I am missing.

Firebase seems fairly straight forward. The tricky part is to remember the document id and importing the google file into the iOS project. Currently stuck on how to search the collections for nes from the console variable.

your perception is partially correct. I would like to ask you a question. Do you know how many people have left California in the past 1-2 years? 653,000. that’s a lot of people.
The main reason is because of housing and the cost of living. California is not the golden state. It is a pretty boring state like there is not anything that special about it. That is only if you happen to have a lot of money. Some people like my friends have moved out of California and left for Texas. The reason being state income tax.

I bet Canada is a really nice place to be.