OS_ACTIVITY_MODE & Error Handling
I wrote some code I'm very proud of today:
Your reaction to the above image will be dictated by how familiar you are with coding and Swift. To the novice (e.g., me a few months ago) this may seem impressive since all blocks of code appear impressive. The more advanced Swifters out there, though, may be scratching their heads. This is a straightforward static function that parses some JSON data from a simple API (a dictionary of dictionaries that contains an array of dictionaries). It's done without a library, granted, meaning its parsed one step at a time by hand, but it's still pretty simple.
Still and all: I'm proud of it. Even though this simple code took me most of the day to write along with it's accompanying code (the model and the data call in ViewDidLoad). My teammates on the Unit 5 final project (we have three days to produce an app that uses Core Data or NSUserDefaults, MapView/WebView, accesses an API, uses a CocoaPod, and has a nice UX & UI—today is the end of day 2) are doing almost all of the heavy lifting/impressive coding with CoreData and the laying out of the UI programmatically with the SnapKit CocoaPod. I'm lucky to have them and have learned a lot from them already.
But I'm trying to be proud of my contribution and particularly this little function. JSON parsing is hard for me as shown by my notes in green and the long variable names, even when working with well-designed APIs. And in the middle of this group project I'm learning my strengths and weaknesses.
I believe my strengths are my ideas (my idea was the one we ultimately used for the app we're working on!) as well as my ability to take responsibility for my work, communicate with others, and balance multiple demands. For example, before lunch I Slack'd our Industry Readiness person and checked in with a proposal for a cross-cohort get-together that some of my classmates had expressed an interest in. I heard that it had been approved and then checked in with the C4Q designer about headshots we had taken before the holiday break and needed to be distributed so for possible use on LinkedIn and social media. I then distributed them via Dropbox links on Slack. During lunch I chatted with classmates, learning a lot about where they want to go, where they've come from, and why they have the goals they do. After lunch was a review of Recursion, and then I finally got to really tackle the JSON parsing head-on. It was a full day, but I don't regret how I used my time and I was still able to accomplish what I set out to do at the beginning of the day.
My weaknesses are, no surprise, my iOS knowledge including Core Data, iOS Human User Interface Guidelines, error handling (though I am getting better at it by waiting longer to ask questions and not being so anxious about errors in general), and just general speed of coding (by my own perception). These are all things I can improve with studying and working on side projects and I hope to have different weaknesses two months from now, however, I may never be the quickest coder in the room (unless that room has a lot of interns).
I hope though that my strengths balance out my weaknesses. If I can continue to learn and grow while being self-motivated I think I'll be able to show off my strengths and be honest about my weaknesses and still be a desirable candidate for a handful of junior iOS Engineer positions out there in the upcoming weeks(!).
This little function represents quite a bit of frustration on my part about not being able to parse a simple API, but it also stands for my ability to keep my cool and chip away at a problem. An "I know you can do it; you've got this" from a TA at a critical moment really helped, too. And I did get it, eventually. Right after that success I had what I thought was another huge error when I called the data from the API but it was really just my not having OS_ACITIVITY_MODE disabled in my Xcode file. As Louis said, "I love it when it's a simple solution."
It feels good to be over a hump that allows me to see that I've made some progress. I can make a slightly technical blog post now (ta-da!). I've also gotten better at dealing with my errors and sitting with problems I haven't solved yet. Those are medium-sized yet significant goals for me in a few months! Knowing I can be taught gives me a much-needed confidence boost seeing as technical interviews and whiteboard-ing and a job hunt are on the horizon.
I know I can do it.
I've got this.