Stephen DeStefano Swift 5 Course - Part 10 (Lectures 55 to 58 - STOPPED!)
So I've managed to leave it nearly a week! Couldn't be helped as the weekend was so busy and just didn't get the chance Tuesday or yesterday. Anyway, I've got onto the good stuff...the projects! I hope these live up to the hype I've created in my head for them. Once I've got the first couple of these done, I am going to seriously look at the best way forward, coding-wise. It could be Treehouse! Right, let's get started..
Start Time - 10:21
Brain Training! This sounds like fun! Sprite Kit is going to be used - I've had very little experience with that so that could be useful.
Here's how it looks -

ML - not sure what this stands for yet! Right, it's Machine Learning.
My Xcode is still updating - so I can't follow along just yet.
So we are 'training a model'. It could be something like distinguishing between cats and dogs. In this case it is distinguishing between numbers! So the handwritten element to this sounds cool.
Project files downloaded and saved, just waiting for final Xcode updates.....
*Paused for 5 minutes
So we are going to be importing around 70,000 images....this is to make it better in terms of distinguishing between the numbers. I've got the zip file of pictures.
OK I've learned something new! Machine Learning means you have a bunch of pictures in order to get the model to recognise something. In our case it's numbers! So a lot are needed as writing a number is SO susceptible to human error!
SO the 'training process' is going to take around an hour...
*Pausing for 2 mins - get charger! Back!
OK so I can't copy the training folder into the assistant editor as it is still uploading to iCloud. Will see what the next bit details anyway! And, apparently, when it is copied over, it will take around 35 minutes to then copy in!
I'm doing it but not the same stuff is coming up. Here's what SHOULD happen -

I put in the author and description etc.
Designing our Interface
*Had to pause here as family have come over earlier than planned....
*Paused at 10:55
*BACK! At 18:43
So a big, big gap in between obviously. Good news is that I have done all of the necessary uploading of pictures etc. So am ready to continue!
So the first thing to do is embed the navigation controller. OK, not sure why yet!
OK - constraints. All very confusing! I don't get the way that Stephen explained it and it just didn't seem to play ball properly.
Right - had to type ALL of this out!
Fiddly! But it's done. It basically shows all of the different aspects of touch on the screen. From the colour to the style, size, position... it is a function for all that.
OK, I am done with this project. It is really poorly thought out. SO much code needing to be typed out is an utter waste of time. From the constraints being weird, to this, I'm getting very little out of this.
So that's it for Stephen - all this build up to the practical and it is a sheer waste of time!
*Paused at 19:16. Will have dinner then use next bit of time to look for an alternative course/plan!
Restart at 19:33
So yes, no regrets! It again shows what a waste of time it is just plugging away with certain courses. True, I've gleaned a few bits and pieces but I was really hoping that there would be more to the practical projects. But there wasn't!
So the rest of this entry is a search to see what else there is and where I should now go...
OK, while looking, something to make myself feel better!
Start Time - 10:21
Brain Training! This sounds like fun! Sprite Kit is going to be used - I've had very little experience with that so that could be useful.
Here's how it looks -

ML - not sure what this stands for yet! Right, it's Machine Learning.
My Xcode is still updating - so I can't follow along just yet.
So we are 'training a model'. It could be something like distinguishing between cats and dogs. In this case it is distinguishing between numbers! So the handwritten element to this sounds cool.
Project files downloaded and saved, just waiting for final Xcode updates.....
*Paused for 5 minutes
So we are going to be importing around 70,000 images....this is to make it better in terms of distinguishing between the numbers. I've got the zip file of pictures.
OK I've learned something new! Machine Learning means you have a bunch of pictures in order to get the model to recognise something. In our case it's numbers! So a lot are needed as writing a number is SO susceptible to human error!
SO the 'training process' is going to take around an hour...
*Pausing for 2 mins - get charger! Back!
OK so I can't copy the training folder into the assistant editor as it is still uploading to iCloud. Will see what the next bit details anyway! And, apparently, when it is copied over, it will take around 35 minutes to then copy in!
I'm doing it but not the same stuff is coming up. Here's what SHOULD happen -

I put in the author and description etc.
Designing our Interface
*Had to pause here as family have come over earlier than planned....
*Paused at 10:55
*BACK! At 18:43
So a big, big gap in between obviously. Good news is that I have done all of the necessary uploading of pictures etc. So am ready to continue!
So the first thing to do is embed the navigation controller. OK, not sure why yet!
OK - constraints. All very confusing! I don't get the way that Stephen explained it and it just didn't seem to play ball properly.
Right - had to type ALL of this out!
func draw(from start: CGPoint, to end: CGPoint) {
let renderer = UIGraphicsImageRenderer(size: bounds.size)
image = renderer.image { ctx in
image?.draw(in: bounds)
UIColor.black.setStroke()
ctx.cgContext.setLineCap(.round)
ctx.cgContext.setLineWidth(15)
ctx.cgContext.move(to: start)
ctx.cgContext.addLine(to: end)
ctx.cgContext.strokePath()
}
}
Fiddly! But it's done. It basically shows all of the different aspects of touch on the screen. From the colour to the style, size, position... it is a function for all that.
OK, I am done with this project. It is really poorly thought out. SO much code needing to be typed out is an utter waste of time. From the constraints being weird, to this, I'm getting very little out of this.
So that's it for Stephen - all this build up to the practical and it is a sheer waste of time!
*Paused at 19:16. Will have dinner then use next bit of time to look for an alternative course/plan!
Restart at 19:33
So yes, no regrets! It again shows what a waste of time it is just plugging away with certain courses. True, I've gleaned a few bits and pieces but I was really hoping that there would be more to the practical projects. But there wasn't!
So the rest of this entry is a search to see what else there is and where I should now go...
OK, while looking, something to make myself feel better!
// CodeWithChris Learn Swift for Beginners
// http://codewithchris.com/learn-swift
//
// Challenge #1: The Lost Animal Challenge
//
// Instructions:
// Given the two arrays below, write a function that takes a String as an input parameter and returns a Boolean value. The function should return true if the String input is in either array and it should return false if the String input is in neither array.
//
// Examples:
// Call your function and pass in the String "cat" as the input. Your function should return true
// Call your function and pass in the String "cow" as the input. Your function should return false
let array1 = ["dog", "cat", "bird", "pig"]
let array2 = ["turtle", "snake", "lizard", "shark"]
// Write your function below:
func animalFinder(animal: String) -> Bool {
let superArray = array1 + array2
var answer = true
for n in superArray {
if n == animal {
answer = true
} else {
answer = false
}
}
return answer
}
animalFinder(animal: "cat")
And it worked! Did it all without a single ounce of help.
*Bit of a cheat here - I did this some months ago! But so long ago that it wasn't like I actually remembered any of it!
So, what to do.... I've decided to go back to Treehouse! Predictable in a way, but it was between that and Angela. Angela is awesome, amazing etc. but the point I was at her course was getting harder and harder to follow. I'll either come back to that when there's a new version or - if I really feel ready for it - continue her most recent course.
Finish Time - 20:01 (n/a for working out total!)
And I've done it! Back on Treehouse. I remember coming away from this AGES ago as it was too technical and seemed pointless. Like all good things in life, it's come back around! I'm about to re-enrol...
25 dollars gone! But that's honestly no issue. I like the regular challenges, the tracking of it all. Basically, it's the right time!
*Will do one more entry this eve to do a big catch up on all of the 'STICKY' entries bit.
Comments
Post a Comment