|
Hi. I am Eric. I have dabbled in front end and mobile development for many years. I was once a GIS analyst who did some light weight scripting and was comfortable pulling data from a range of remote sources, but by no means have I ever considered myself a programmer. Most of my career has been in project management, focused on stakeholder management and acting as a client's primary point of contact on a variety of different types of endeavors. I am here to change that. I want to get my hands dirty with code again, and puruse work as an iOS Developer. As suggested by @Obelix, I will use this thread to share my progress through this course. I'm starting with Lesson/Day 8 and its wonderful Checkpoint 4. I feel that Lessons seven and eight really took things up a notch. Day 8 Regarding Check Point 4. As I always do, I started by breaking the challenge down into managable parts. Some thoughts:
and later in the code:
|
|
Day 9 - Closures and Cleaner Code An observation, or maybe a frustration, or how about point of discussion??? Swift does an excellent job of letting developers shorten code--make it cleaner. As a less experienced programmer, this often frustrates me. Longer version are easier to make sense of and digest, at least for me that is true. I am getting hit with this in the discussion of closures.
The fact that we don't see what I will call an arguement name (or outside name?) makes for cleaner code, but it leaves out a nice indicator of what is required to make the closure or function work. For me, more syntax can often be helpful. |
|
Checkpoint 5 -- Lucky Numbers From the hip, here is version 1.0 of my solution to this checkpoint. I will keep after it, as I know there is room for improvement--but I'm out of time right now.
Output [7, 15, 21, 31, 33, 49] 7 is a lucky number 15 is a lucky number 21 is a lucky number 31 is a lucky number 33 is a lucky number 49 is a lucky number 7 15 21 31 33 49 |
|
Eric makes a case for parameter names within Closures.
Honestly, I don't have an answer or a rebuttal. At the time I define the signature for this function, I dont know if it's someone's first name, peer title, bovine species, or favorite spice.
|
|
Eric likes Swifty code.
Which code is easier to read?
|
|
Eric sings a familiar song!
Nice! That logic looks very familiar to me! |
SPONSORED Ready to dive into the world of Swift? try! Swift Tokyo is the premier iOS developer conference will be happened in April 9th-11th, where you can learn from industry experts, connect with fellow developers, and explore the latest in Swift and iOS development. Don’t miss out on this opportunity to level up your skills and be part of the Swift community!
Sponsor Hacking with Swift and reach the world's largest Swift community!
This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.