Wednesday, June 24, 2015

Time for a little Celebration!

Hello All!

I feel a bit of relief now, as I have finally figured out a solution to the 'silver' challenge from Chapter Six of 'iOS Programming'!  It's taken me all day, but I did it!  Essentially, I had a View Controller and a UIView created programmatically.  The challenge was to create a UISegmentedControl to change the colors of the circles in the View.  The variable that controlled the circle color was private, so I toyed around with making this public instead, then managed to create a new UIView object when the Segmented Control was selected.  This worked OK, but I always lost the Segmented Control (due to not re-running loadView, which contained the code for the segmented view).  Finally, I figured out that I had to create a variable for the color in my view controller, then rerun the loadView.  The original loadView would automatically assign a lightGrayColor to the circles, but with the public variable in the View and a variable in the Controller, I was able to modify this to look to the variable first, then assign lightGrayColor if it was nil.  This finally did the trick!

While I'm certain this isn't the most elegant solution to the problem, and is likely to be far too verbose (even by Objective-C standards!) to be useful, I'm proud that I stuck with it and found something that worked.  I'll try to post this in GitHub, just in case anyone stumbles across this and needs help or would like to critique my work.  

Onward and upward.  Let's get going to Chapter Seven!

Monday, June 22, 2015

Going Against the Grain

Hello all!

I'm finally getting back on my feet after a rough weekend with a cold.  I think I've been pushing a little too hard to achieve this goal of mine, so I may dial it back a bit.  Frankly, I'm beginning to doubt the wisdom of trying to cram in three hours of coding every day.  It seems as if, given my responsibilities to my employer, my wife, my kids, and my health, that trying to stay up late, consume large amounts of caffeine, and drag through a work day just aren't making a life for me.  I'm becoming too short-tempered at home, unreliable at work, and failing to retain much of the knowledge I'm picking up in my training.  So, with that in mind, I've decided to adjust my schedules and sights a little bit, aiming for 2 hours of coding a day, give or take, and making sure that I get adequate rest at night - approximately seven hours or more.  I feel that this would be optimal for my life, as it is today, and if I get an occasion where I feel rested and prepared to go further, I'll bend the rules from time to time.  While so many of my contemporaries feel that huge sacrifices are needed to catch up and learn, I'll take a little more time and try to save my health and sanity for the long-term.

Also, I've been doing a lot of thinking about Swift development, and where I should be focusing my efforts in learning.  I announced very early in this blog (devoted to the Swift language) that I would be dropping it to learn Objective-C.  Initially, I was just looking to get a better foundation in iOS development, but as I've read different articles, spoken with other developers, and did some thinking of my own, here are some of the reasons I've decided to continue on with Objective-C:

  • An overwhelming amount of existing code for iOS and OS X is all written in Objective-C, and this will not be changing overnight.
  • Swift is still a new language, and depends on a lot of the code that is in Objective-C.
  • Few, if any, employers are hiring for Swift right now.  This will change, but how soon?
  • Objective-C is considered to be the 'hard' language, so most people - including myself - have abandoned it.  If I take the time to learn this and learn Swift, this could make me more marketable.
All of these things make me feel like the right decision is to have a demonstrable knowledge of Objective-C, especially considering that my goal is to earn a job in iOS development, not just make a cool app.  My immediate goal is to make an application (or two, or possibly more!) in Objective-C, then turn my focus on to Swift.

I'm still very excited about this new language, and I think that learning it early will open a lot of interesting doors down the road, it's just not the path for me right now.  Besides, to paraphrase mark Twain, if you find yourself on the same side as the majority, it's time to think about your stance.  For me, I'll go against the grain for a while and learn Objective-C.

Friday, June 19, 2015

Quick Update

Sorry for the sporadic posts of late.  I promise to get better!

Today, I'm down sick, but I'm still trying to get some coding in between naps!  I am thrilled to report that I was able to complete the "Objective-C Programming, The Big Nerd Ranch Guide" again.  I must say that going through the text twice, and dedicating myself to completing the challenges really paid off; I feel like I have a much better understanding of the language now.  I hope that this will carry over and potentially give 2X or 3X returns when I work my way back through the "iOS Programming" book from Big Nerd Ranch.

I've been doing some thinking/wondering/planning/scheming of late, and I will tell you all about it later this weekend.  I think I've got some really good ideas for the future.  But, for now, I need to try to bank in some study time before the meds kick in.

Monday, June 15, 2015

Slow moving, but progress nonetheless

Hello all,

It's been a tough few days trying to squeeze in time for programming, but I have made some strides.  I just finished Chapter 28 in "Objective-C Programming, The Big Nerd Ranch Guide", and I feel like it's taking hold in my brain now.  However, blocks have me a bit stumped.  While I get the concept, I don't really feel like this is an effective way of handling much of anything.  I'm sure I can (and may just be) proven wrong, but I'm willing to take the chance.  I finished the first exercise, but could never quite get the second one to click.  Onward and upward; if it's important, I'll learn it somewhere else down the road.

I'm getting really excited to learn Swift, as I read more about it.  It's going to be great, and I love being able to build in this way.  Much more satisfying than web development was, for me.

I had to travel out of town this past weekend to clear up some issues, so I lost a lot of studying time, but hopefully most of that's behind me.  Thanksgiving is fast approaching, and I want my new job!