Shoulders
January 11, 2016
Suppose you half remember a quote about standing on the shoulders of giants. In Safari and many other web browsers you can just type in the phrase "shoulders of giants" and hit return and your default search engine will provide you with pages and pages of links.
On the other hand, suppose you are an iOS developer and you want to enable a user to type a search phrase into a text field and when they tap on the return key you want to display a web page with search results. This turns out to be quite involved.
You need to turn the query into a string and format according to the rules of your target search engine.
Then you need to create a string that represents the URL you want to request - it contains the address of the search engine and the search string at the end.
Then you need to turn this string into a URL object.
Then you need to create a request of this URL object (well, this depends on which web view you want to use).
Somehow you need to make the request and provide somewhere to display the results.
Wait.
Nothing happened?
Did you remember to import the framework you needed?
What I want is a wrapper around all of this detail work. I want something that accepts my search string and my desired search engine (from a list that is provided to me) and loads a web page displaying the results of the search.
I don't want to wade through this boiler-plate code and write the same sort of utility methods that everyone who wants to perform a search has to write. I want to stand on the shoulders of someone who has done this work for all of us.
It's not just for web searches.
Suppose you want to play music on your device. You can open up GarageBand and get some drum loops going and start laying in a lead guitar on top of it.
If you're a developer you get to fight with Core Audio and the MIDI frameworks and that still doesn't give you access to the loops that are on your user's device.
I want to make it easy for someone to write an app that plays music. I need shoulders.
Recently, I bought an Arduino robot. It can roll around the room and turn this way or that.
"Cool", I thought, "I would like to write an app that sends it messages. Swift is open source."
People have already got Swift running on Arduinos and Raspberry Pis. I'd love to be able to control the robot from my Mac or iPhone. How hard could it be?
First, I have to start with the Core Bluetooth stack.
Even if you think that this is an acceptable situation for me, it is not the way to bring youngsters and newbies to our platform.
When a parent brings a child to a parade, the kid has a horrible time standing behind a sea of legs that stand between the child and the cool stuff. The parent needs to see if friendly people will let the child stand in front of them, not blocking their view or the parent needs to lift the child onto their shoulders (not blocking the view of people behind them, of course).
All of a sudden, the child can see the parade. Their world comes alive.
That's what I want as a developer. I want these higher-level kits that wrap the core functionality. I want these for my own work and I want them so I can more easily reach back and bring new developers and people who don't know they can be developers into this world. I want to be able to give a young person a boost and watch how far they go. I want to be able to look at someone who doesn't want to even be a programmer and show them how to use this to accomplish what they want to do.
I don't just want cool demos, I want a boost. I want us to be lifted above the noise to where we have a great view of the cool stuff.
Maybe there's a researcher who wants to enter data or download data and present the results in a bar chart or a pie chart. It's so easy to create one of these charts in Keynote or Numbers or Pages. It's not easy at all to do so in a playground or app they might write.
Let the researcher spend time doing the work that only they can do and provide them with the tools that let them present the data in a compelling way.
Give them the shoulders to stand on.
Apple engineers need to provide us with these shoulders. Otherwise we're stuck getting Core Bluetooth working or converting strings to URLs or calculating angles in radians when we want to be steering a robot or searching the web or drawing a pie chart.