I love to browse through Github and see the sorts of frameworks people build. Pretty frequently I come across repositories that make a good effort to provide a cross-platform experience by offering iOS, watchOS, and tvOS versions. Sometimes there’ll even be the odd macOS version too!
In the previous post, we saw how the
SWIFT_ACTIVE_COMPILATION_CONDITIONSbuild setting can inject values in to our .swift files that we can use to conditionalize code depending on our active SDK and/or architecture.
When developing an app or a library, it’s pretty common that at least once in the course of development, you’ll need to conditionalize compilation of your code. Maybe you’ll be accounting for a bug in the operating system where things that don’t work quite the same on your device as they do on the simulator. Or perhaps you’ll want to simply exclude code from your simulator builds because the simulator simply doesn’t have that functionality (like invoking the camera).
In my conversations with developers, I’ve heard a pretty common theme from them that “Core Data is hard” or “Core Data is buggy” or “I could never get it to work right and gave up on it”.
You should take a few minutes and read this article by Rands on “the worst seven minutes”.
Way back in the day, I was fairly obsessed with triangles. I really enjoyed my trigonometry class in high school. In addition to being interesting, it was the impetus for me learning to code. I got a little tired of doing all the myriad of
tan()functions to solve the triangles needed by my homework, so I decided to write an app for my TI-83+ graphing calculator to do it all for me. The app would ask you for the three things you knew about the triangle (almost any combination of sides or angles) and give you back all the rest of the information (including perimeter and area). I still have that source code.
I love presenting. I love getting up on stage and teaching developers how to be better developers. I love seeing the light explode in their eyes as concepts click in to place and new ideas and connections are formed. There are few things as exciting to me as this sensation. A lot of my personal motivation for being a good coder is to be continually finding new material that I can teach.
Part 5 in a series on “fixing” Model-View-Controller:
I was talking with a fellow attendee at a recent conference who was surprised to learn about the nerves I get prior to presenting. They thought it must be completely natural for me to get up and present. When I mentioned that wasn’t the case, they encouraged me to write a post about it. I thought that was a great idea, so here we are!
A few days ago I got an email from the folks at DreamHost (my hosting provider) saying their security scans had detected some malicious code that had found its way in to my server.