Sam Soffes on Building Functional Apps
I would like to talk about a video of a great talk that I really recommend. I’m really interested on the topic of sharing code between iOS and Mac because basically is what I do with BingWallpapers.
The talk is very interesting, watch it now, but I wanted to share here a couple of great moments. SPOILERS
Build for challenge
Really good advice. Basically is the mantra that makes all my side projects. I’m not so prolific as Sam but it’s fun to have some small project that challenges you in different ways. Funny enough BingWallpapers begun as a simple thing that I did in a couple of hours in Objective-C, but then it helped me to learn more. I ported it to Swift, made a Core framework to share the code between iOS (the app and the extension) and the Mac app. Now I’m using it to practice some FRP (because PhotosKit is painful as it is). So yeah, thumbs up for that advice! ;)
Another funny moment is when he mentions enums, and how the
.all method should be part of the language. I also wrote something about enums a while ago in Swift enums and UISegmentedControl.
Better than inheritance
A recurrent topic that I like to mention. Nothing more to say, watch the video ;)
The ability to freely use functions across all the language makes some new (old really) patterns so easy. It’s not really about the fancy functional programming words, it’s about treating code as data, and passing it around as anything else.
Computers are fast
During the talk I’ve been thinking a couple of times “oh man, computers are fast”. Listening how the app renders the effects for the image every time the user changes something makes me thing every time about that.
And now that Metal is on the Mac maybe will be even faster and more cross platform.
@alexito4 that’s the plan! opened a few radars though *sigh*— Sam Soffes (@soffes) junio 27, 2015
The funny thing about GitHub is when you have things starred like X but you never remember about them. I’m not using it on BingWallpapers because the shared code doesn’t access any of the platform dependent frameworks. At some point I thought I needed to share
Image but at the end I took another approach, explained on Exploring Swift generic functions with WallpapersKit.
Again, go watch it! ;)
PS: All this blog is written in Whiskey, so more KUDOS to Sam ^^