Unit Testing Your Code
So, once again I've managed to leave a huge gap between these blogs! The good news is that the Summer Holidays are approaching and there will DEFINITELY be time to code then! So, between now and then, I need regular entries so I can learn what is left in 'Learn to Code in Swift 4', then make a new plan for how to take my knowledge forward. Anyway, the next chapter is all about 'Unit Testing', which sounds interesting!
The three facets of a successful app are: well designed, stable and easily adaptable to change. Apparently, many app developers do not test their code properly; the most effective approach is to test one line at a time, after writing. That makes sense!
So 'Unit Testing' is a method to test individual 'units' - usually methods. Having read over the next few pages, a lot of this seems unnecessary at present; I'm still getting used to writing codes let alone testing and debugging! This is something that I can revisit when I have had more experience of writing code!
The summary of the chapter is as follows: you need to test one bit of a code - each method - at a time, using the 'test' keyword and there are various aspects to this, including 'break points' and 'debugging', which I will come back to another time!
Looking ahead at the next few chapters, I have the same sinking feeling in my stomach that this all a bit too advanced for me. It's partly because I'm out of practice and have not been consistent enough with coding to really make sense of it all.
What it really points to is that it would be very passive and pointless to continue to plough through this book, just because at some point I decided to do so. It would be far more effective to go back to an online course - like Treehouse - where I felt I was making more progress.
So, an unexpected but hopefully positive turn of events! I will have a look now at options for continuing my coding experience, hopefully leading to me feeling more positive about it. I'm certainly not giving up! It does mean that next time I do a blog, it will be a plan of how I'm going to move forward with this. It's been over three years now and the whole purpose was to lead me to a potential alternative career in coding.
I will write again soon, today or tomorrow as I need a reboot and re-motivation to get this journey back on course again!
The three facets of a successful app are: well designed, stable and easily adaptable to change. Apparently, many app developers do not test their code properly; the most effective approach is to test one line at a time, after writing. That makes sense!
So 'Unit Testing' is a method to test individual 'units' - usually methods. Having read over the next few pages, a lot of this seems unnecessary at present; I'm still getting used to writing codes let alone testing and debugging! This is something that I can revisit when I have had more experience of writing code!
The summary of the chapter is as follows: you need to test one bit of a code - each method - at a time, using the 'test' keyword and there are various aspects to this, including 'break points' and 'debugging', which I will come back to another time!
Looking ahead at the next few chapters, I have the same sinking feeling in my stomach that this all a bit too advanced for me. It's partly because I'm out of practice and have not been consistent enough with coding to really make sense of it all.
What it really points to is that it would be very passive and pointless to continue to plough through this book, just because at some point I decided to do so. It would be far more effective to go back to an online course - like Treehouse - where I felt I was making more progress.
So, an unexpected but hopefully positive turn of events! I will have a look now at options for continuing my coding experience, hopefully leading to me feeling more positive about it. I'm certainly not giving up! It does mean that next time I do a blog, it will be a plan of how I'm going to move forward with this. It's been over three years now and the whole purpose was to lead me to a potential alternative career in coding.
I will write again soon, today or tomorrow as I need a reboot and re-motivation to get this journey back on course again!
Comments
Post a Comment