Swift By Sundell – Model Controllers

This is a great post about Model controllers. Upon reading it I realize that I’ve done this for many years, to try and keep things encapsulated. 

https://www.swiftbysundell.com/posts/model-controllers-in-swift

I’ve been slowly rewriting my Birthdays app in Swift, for no real reason except to see how little code I could write now to reproduce when I wrote 9 years ago in Objective C.

I had been putting a lot of logic in the “Person” class I made. Looking at my old code I had a Person class, and a PeopleController. Not sure why I made that distinction. 🙂

 

Birthdays: View on App Store

Apple Acquires Shazam

I still remember being at a WWDC Stump The Experts session where one of the first questions was what were the names of the songs playing before things kicked off, and a developer from Shazam stood up, and rattled all of them off.

There was a roar from the crowd, and he said he was from Shazam. And presumably all of us went and downloaded the app then and there.

https://www.macrumors.com/2017/12/11/apple-acquires-shazam/

Apple’s December 2 Springboard Crash Bug

It’s been interesting to watch this pop up tonight. It looks like a pretty serious bug in iOS 11:

https://www.macrumors.com/2017/12/02/ios-11-1-2-date-bug-crash-loop/

I can imagine what’s happen at Apple right now for the past few hours, engineers in there working and finding and solving the problem. Other folks discussing how to push it out to customers.

I wonder if they are also discussing tonight about pushing the button and releasing 11.2 tonight. I don’t think that’s in the cards if only for the size of that download, vs a super small patch for this one.

Today at work I spent most of the day doing a small firefight around how Touch ID / Face ID works in an app. I’ve come to the conclusion that’s a combination of a subtle bug, and customers expectations regarding how the feature is supposed to work. It felt like a small firefight to me – it was exciting and a little hairy at the same time.

But nothing on the scale of what’s happening at Apple tonight. Good luck Apple folk!

Intuit vs eBay Settlement

Today I received a $150 check from the settlement of this class action lawsuit: http://www.agtechemploymentsettlement.com/frequently-asked-questions.aspx.

As much as I am not a fan of class action lawsuits, two companies that colluded to not poach each others employees seems wrong, it doesn’t allow for people to move freely between companies based upon their skills and future challenges. 

This FAQ link is interesting: http://www.agtechemploymentsettlement.com/frequently-asked-questions.aspx#a6. – talking about the different settlements amounts, and the numbers of people in them. 

Halt And Catch Fire

I’ve really enjoyed Halt And Catch Fire over the past three years. Being part of the tech industry now for over 20 years, I’ve found myself really empathizing with these characters, and growing to love them.

The final season was great and heart wrenching at the same time. But the writers and actors did a fantastic job in my opinion. I shed more than one tear over the last 4 episodes.

If you haven’t seen the show, I highly recommend it. It’s a bit techie, but the show is really about relationships and people.

XOXO to Halt and Catch Fire.

Test Drove a Chevy Bolt EV today

A few days ago I got an email from Chevy regarding a new program they started in the past few weeks where one can sign up for a Chevy Bolt EV test drive. (It’s currently offered in San Francisco/San Jose, San Diego and Los Angeles)

But unlike a normal test drive, they drive the Bolt EV to the location you choose and you drive from there for about 30 minutes.

So I signed up for April 1 at 11am. I got an email confirmation, and when the driver was on his way I got a text with a link to a page that had a map showing the Bolt’s current location.

 

Sam arrived with the blue Bolt, and we hopped in, he showed me around a bit, and then I ended up driving to work and driving to my local grocery store, on the roads that I travel every day.

Sam wasn’t from a particular dealership in the area, but works for Chevrolet doing this only, what he calls a product specialist. So no hard sells, just a nice test drive on roads I drive every day.

Thoughts on the car

I was very impressed. The Bolt has some really good pickup, that great linear acceleration that people have talked about with electric cars. The technology was impressive too, two nice large screens, one for your speedo, etc, and one in the radio/nav area of the car.

Will I get one? I don’t know. I’m a little sad that it doesn’t have adaptive cruise control (my current Mazda has it). And it’s a good $14,000 more than my current car. But I would probably end up leasing it, as I have to think in 3 years the cost/technology in electric cars will have advanced quite a bit.

A few last pictures

 

 

 

Test Driven Development in iOS with Swift

At Intuit we work in 2 week sprints. Last sprint I decided to take a story about a crash happening in an image downloader class. After looking at it for a bit, I decided it would be a great candidate to rewrite using dispatch groups, and also in Swift. (It’s an internal goal to rewrite when we can in Swift).

At first it was rough going and slow. The write a test, run it, and fail felt far slower than just writing the class from scratch, and then debugging it inside the app.

But – I really wanted to give it a try, so I changed my layout in Xcode. Instead of having the source in my left source panel in Xcode, I decided to put the unit test file there. And then on the right side I split that into two panels: the new Swift downloader source, and the old Objective C source.

That changed my focus from writing the source, to writing the tests, and then making the tests pass. I know it sounds like a small thing, but for me it really worked.

I also decided to embrace the “slowness” of TDD. It gave me more time to think about what I was writing and how to make sure it covered all the cases.

In short, something I feel I could have finished in a few days (with no tests) took me 5 days (along with meetings, production support, etc). But I got into it and really enjoyed it. I’d recommend you give it a try!

Swift With Objective C Tip 1

If you’ve started down the road of incorporating Swift into an Objective C project, and run into an error when adding calling a method in your Swift class that Xcode says isn’t there, or doesn’t autocomplete, try the following:

  • Add your #import “module-Swift.h” to your Objective C .m file. (In my case it’s #import “AppName-Swift.h”.
  • If that doesn’t work, recompile. You’ve probably just added a method in your Swift file, and Xcode needs a chance to compile it and add it to that auto-generated module-Swift.h file

Hopefully I’ll have more tips as I use Swift more and more at work. Stay tuned.