Posts

Showing posts from September, 2018

Angela Yu Course Part 15 (lessons 145 to 153)

Image
So yes we're back! It makes sense at this point to crack on with Angela's course. I think one of the reasons why I wanted to do the challenges from other courses was to protect myself from failing to understand new content. I need to get past that, which is why I'm going back to Angela's course! Last time with her course, I did some stuff which I can't really remember...so I'm going to crack on but may well need to go back over some stuff. Here we go! Start Time - 11:38 Location Manager So it's the workspace file I need - the one which has had 'pods' added to it.       let WEATHER_URL = "http://api.openweathermap.org/data/2.5/weather"     let APP_ID = "e72ca729af228beabd5d20e3b7749713" Here are the two websites which I am using. The App_ID is our own App ID that is required. So the guys at open weather map need to be able to track who is using their API... API - Application Programming Interface So...

EDU Course Challenge 2

So, as mentioned before, rather than cracking on with Angela's more complex course, I'm spending some more time on consolidation and application. A couple of things with this EDU course - it's quite outdated so not ALL is relevant; it has made me learn a few new things; it's an excellent way to tackle practical challenges. This time I'm not heading straight in, but - like the last few Rick Walter bits - going over some of the content. Skipping through if necessary.  Start time - 9:18 Functions There's a mention here of default and variadic parameters. The variadic part I'm not so sure about so am going to check up on this.  So default values - you can set this within the parameters. So if it's there, you may e.g. have two possible ones with one of the values set.  Suppressing external names - using the _.  A variadic parameter is one which can have multiple values in it.  It's the use of the ... in the parameters.  func s...

EDU Course Challenges 1

So I don't feel quite ready to resume Angela's course! No, I've had a look through the other Udemy courses I've purchased and have decided to test out the challenges from the EDU one. I just enjoyed the last few so much that I want to get stuck in and apply what I know before I go back to Angela's. OK here we go! Start time - 20:39 Challenges for types etc. 1. Type this code in a playground: var num = 5 num.advancedBy(3) What is the result? We talked about advancedBy in connection with String indices. What does this result tell you about these indices? Do the .successor() and .predecessor() methods also work with Ints? Does the .predecessor() work when num is 0? I've never actually come across advancedBy before. It will be interesting to see if the latest Xcode even recognises it! So I assume the answer will be 8! num . advanced (by: 3 ) Indeed, the syntax has chosen since this EDU course. No bother, I fixed it easily and the answer...