Hey Brian We all make mistakes, what matters is how we react when we know about our mistakes. Your efforts to address the mistake and even publish a video with correction is inspiring. You are an InsPiratIon!!. Your statement, "Programming is like a muscle, the more you train, the more stronger it gets." in your video, 'I feel like I am just copying code' is a inspiring quote for me.
I saw the two Retain Cycle videos a couple of days ago and lo and behold I am facing a retain cycle myself in a quite complicated manner in my project right now. 😥 The explanation is helpful so far and I think I am getting close.
Thank you for taking the time and correction the mistake! I really do appreciate it. Maybe you can do a video on the UIPanGestureRecognizer some time, with interactive view controllers. So that you can drag it up for example and then just let it finish its animation? Have a good day! :)
Awesome and humble at the same time. Keep up the good work!!! Ps here is an idea for a video, grab a string of numbers with the camera using visual api, passing it through a validation algorithm and capturing that string of numbers. (Posible use to capture bank account details from an invoice)
your mistake make me learn more onto Strong reference holding to object without Retain cycle :). But I got to know about it only when I read the comments in the wrong one and also when I read video description (probably should make a habit of reading description too from now on.). thanks again for correction video and the wrong one.
Thanks for the correction video! Glad to see you were quick to correct a mistake. It might be valuable to demonstrate a retain cycle example with Closures
Episode one was a demonstration of Retail half-cycle! Episode two just completed the cycle! @brian: the only one who doesnt do mistakes is the one who does nothing.
Assigning objects in Swift implicitly increments their retain count. In your original example you did what is best described as not balancing retain count and thus made a memory leak scenario.
Thanks Brian for all the videos! You have really taught me a lot!! B4 I started watching ur videos I never thought I would make apps and now I'm on my way to making my 3rd app! THANKS! The only problem I've been facing is custom transition form UIviews. All the videos I find use storyboards and it's hard for me to follow. Could you make a video on how to make custom segue/transition not using the storyboard? Plz and thanks
Hey Brian, how do you go about paginating when you reach the top of a collection view? I've built a chat and I thought about somehow detecting when I reach the top of the collection view and then make an API call with a limit or date to bring the previous 10 or so elements. Do you have any tutorials on this by any chance ?
How did you arrived at setting the weak reference on tenant property of Apartment instead of apartment property of class Person? What's the difference?
Do you ever have issues with Xcode autocomplete and syntax coloring? Seems like every few changes I make, the editor crashes and I'm stuck looking up method names manually.
Nice!!! I like this, I was asked in a google interview and it is a very common question for interviewing a software engineer in tech giant and I would like to learn more about it can you give us more about demo of computer science concept in swift? e.g. - swift var thread-safe or not? (why we don't need to declare attribute "nonatomic" in swift) - how a swift singleton dealing with concurrency?
Hey Buddy! I need some of your help! I'm wanting to go into the tech world, and go to college to get a bachelors degree, but I'm not sure which one is right for me: Computer Science or IT? My goal is to work for Apple and help with their OS. I want to learn coding languages too! Can you help me
I'd like do you know which college or university to go to for either getting a computer science degree or an IT degree. Like I said I really want to work for Apple, so that's my main goal. Math is kind of hard for me, but I can still do pretty good
Yeah Brian I failed my interview! Just kidding glad you explained the issue. Atleast you are helping us noobies. Hey would you also know how to do memory leak tests?
Just a question How do you write code so fast... I mean it takes you only a few seconds to see the code and change it, add , solve problems, fix bugs and so no.....For example, i finished your twitter app, i understand the code, and followed the serie without a problem... But no way on earth i could be able to write so many code lines, and so easy as you do .... is it just experience, or is it something that a person is born with?.. Couse i see you ability to code, and i compare to me that i am noob.....and it is like 2 different planets :( :( ......will i ever be able to code that smoth , as much code as you do ? is it only practice?..Sometimes i doubt that is only practice, and experience.....i think that you must be born with :( :(
Nice Video!! I wanted to ask of you could make a Video how to use a payment service in an App that means how to set it up and how it will work with prices so the payment Will Go to one bank account ...
Hey Brian
We all make mistakes, what matters is how we react when we know about our mistakes. Your efforts to address the mistake and even publish a video with correction is inspiring. You are an InsPiratIon!!.
Your statement, "Programming is like a muscle, the more you train, the more stronger it gets." in your video, 'I feel like I am just copying code' is a inspiring quote for me.
Wow, this apartment/tenat example gives a good idea of how Floyd's cycle detection algorithm could be implemented in reality! Thanks a lot!
It's great you've made that mistake. I have a better understanding of retain cycle now.
but the bad part is the old video is still up and comes as a top result :/
This tutorial made me clear about referencing count mechanism and retain cycle. Great....
I saw the two Retain Cycle videos a couple of days ago and lo and behold I am facing a retain cycle myself in a quite complicated manner in my project right now. 😥 The explanation is helpful so far and I think I am getting close.
Thank you for taking the time and correction the mistake! I really do appreciate it. Maybe you can do a video on the UIPanGestureRecognizer some time, with interactive view controllers. So that you can drag it up for example and then just let it finish its animation?
Have a good day! :)
Will do, Thanks to you! :)
Thanks Brian. This one is correct as per Apple documentation. Thanks again for taking time for the same.
Awesome and humble at the same time. Keep up the good work!!! Ps here is an idea for a video, grab a string of numbers with the camera using visual api, passing it through a validation algorithm and capturing that string of numbers. (Posible use to capture bank account details from an invoice)
Amazing work, because of your mistake I understand better!
I really appreciate your effort Brian 💝
Now it make more sense and see how the weak variable function in the retain cycle! Thanks
+Stanley Ng yes much easier to understand after this correction
Superb Brian, loved that you came back with the correction :)
Mistakes happen man! Really love and support your channel. Keep it going, please! :)
Thanks Julio.
Thanks for the fix. Bugs happen and this is a tricky one...indeed the two objects need to point to eachother to get the retain cycle...
Thanks, it was really bugging me over the weekend.
your mistake make me learn more onto Strong reference holding to object without Retain cycle :). But I got to know about it only when I read the comments in the wrong one and also when I read video description (probably should make a habit of reading description too from now on.). thanks again for correction video and the wrong one.
Great video!, would be great if you could talk about protocol oriented programming in Swift
Thanks for the correction video! Glad to see you were quick to correct a mistake. It might be valuable to demonstrate a retain cycle example with Closures
You're welcome. Closure cycle will be this Friday's video.
Episode one was a demonstration of Retail half-cycle! Episode two just completed the cycle! @brian: the only one who doesnt do mistakes is the one who does nothing.
Assigning objects in Swift implicitly increments their retain count. In your original example you did what is best described as not balancing retain count and thus made a memory leak scenario.
Thanks Brian for all the videos! You have really taught me a lot!! B4 I started watching ur videos I never thought I would make apps and now I'm on my way to making my 3rd app! THANKS!
The only problem I've been facing is custom transition form UIviews. All the videos I find use storyboards and it's hard for me to follow. Could you make a video on how to make custom segue/transition not using the storyboard? Plz and thanks
Excellent - this is a lot clearer. Thanks
Great, glad to have cleared up the confusion.
Hey Brian, how do you go about paginating when you reach the top of a collection view? I've built a chat and I thought about somehow detecting when I reach the top of the collection view and then make an API call with a limit or date to bring the previous 10 or so elements. Do you have any tutorials on this by any chance ?
Awesome explanation!!
How did you arrived at setting the weak reference on tenant property of Apartment instead of apartment property of class Person? What's the difference?
You can read the retain cycle guide at the swift/apple documentation site for more details.
Thank you so much for video.
One question, why all var and let are not weak by default ??
Think it through, if you create a variable that is weak, in that instance there is only that weak reference to it, so it is immediately deallocated.
We are all human, thank you !
Thanks Yoel.
Do you ever have issues with Xcode autocomplete and syntax coloring? Seems like every few changes I make, the editor crashes and I'm stuck looking up method names manually.
+Jonah Witcig Xcode is well known for being buggy
Nice!!! I like this, I was asked in a google interview and it is a very common question for interviewing a software engineer in tech giant and I would like to learn more about it
can you give us more about demo of computer science concept in swift?
e.g.
- swift var thread-safe or not? (why we don't need to declare attribute "nonatomic" in swift)
- how a swift singleton dealing with concurrency?
How does this work in real programs,, I don't think we will ever be explicitly deallocating things
Whenever you dismiss a controller or remove objects from an array, you implicitly deallocate them.
Hey Buddy! I need some of your help! I'm wanting to go into the tech world, and go to college to get a bachelors degree, but I'm not sure which one is right for me: Computer Science or IT? My goal is to work for Apple and help with their OS. I want to learn coding languages too! Can you help me
Sure thing, I'll provide you with all the help you need? What would you like first??
I'd like do you know which college or university to go to for either getting a computer science degree or an IT degree. Like I said I really want to work for Apple, so that's my main goal. Math is kind of hard for me, but I can still do pretty good
Thanks for the valuable info, keep it up
Yeah Brian I failed my interview! Just kidding glad you explained the issue. Atleast you are helping us noobies. Hey would you also know how to do memory leak tests?
Haha thanks Mark.
Sounds good that Brian also make mistakes, i thought i was the only one in this world
Thanks for the support San.
Yeah man. Watching the teachers make mistakes is actually incredibly helpful, honestly
Thanks Brian :)
Just a question
How do you write code so fast... I mean it takes you only a few seconds to see the code and change it, add , solve problems, fix bugs and so no.....For example, i finished your twitter app, i understand the code, and followed the serie without a problem... But no way on earth i could be able to write so many code lines, and so easy as you do ....
is it just experience, or is it something that a person is born with?.. Couse i see you ability to code, and i compare to me that i am noob.....and it is like 2 different planets
:( :( ......will i ever be able to code that smoth , as much code as you do ? is it only practice?..Sometimes i doubt that is only practice, and experience.....i think that you must be born with :( :(
+Massimo Valtino I've been doing this for ten years and prepare the material before each video. It's something you get better at over time.
I really hope so :)
Nice Video!! I wanted to ask of you could make a Video how to use a payment service in an App that means how to set it up and how it will work with prices so the payment Will Go to one bank account ...
ah I was not crazy this was a mistake phew :)