Why I Love Swift: Functional Programming

Apple’s Swift language, which is not even a year old, has grown on me in ways I would never have expected. Partly, that’s because it has opened my eyes to ways of programming I was unaware of.

One of the programming paradigms that Swift forced me to at least look at was functional programming. What’s functional programming? Well, here’s a post by Guanshan Liu, Functional Programming in Swift, that does a much better job than I could ever do. And there’s a great book, Functional Programming in Swift. Simply put, functional programming allows functions to be used as parameters within a function call. Is that very useful or just another egg-head, ivory-tower CompSci methodology that no app developer really needs? Hardly.

Let’s say within a HomeKit app I’m creating that I have an array of accessories (home-automation devices) and their services. Now, that and a nickel won’t get me a cup of coffee nor do much for any user of my HomeKit app. So I want to use the list of the services’ serviceType, mind you in the same order as Apple’s service types supported by HomeKit’s Accessory profile, and the devices that have those service types. Hmmm… More…

Austin vs Silicon Valley

Note: This post was originally written by Zac Sweers on Quara in response to the question, What is Austin like for startups and tech companies? How does it compare to Silicon Valley?“. Zac does the best job I’ve yet read of distilling the issues facing Austin and the growth of its tech business.

There are two big issues that startups in Austin face that I think stunt their collective growth. This is based on my time there (5 years of college), interning a short time at a local start up, having a few friends found local startups, and just general observations of the startup community. I now live in Palo Alto, CA working at a startup called Flipboard. More…

Xcode Issues: How To Work-Around An Ineligible iOS Device

There may come a day, a sad day, when you install the latest version of Xcode, plug-in you iOS device, wait for it to appear in the list of scheme supported devices, and…nothing. Then you click on the scheme pull-down menu and see the following,

Xcode Ineligible Device Post 03 15 2015 Img 1

How did your iOS device become ineligible for development? Well, I don’t know and nobody else seems to have an answer. But there is a work-around More…

Too Little Too Late

The GOP’s legislation is too late–this train has left the station. I’ll bet the Bay Area is prepping the champagne for the February FCC vote. It should.

This is all the more ironic because it was Verizon’s successful challenge to the FCC’s previous efforts to regulate Net Neutrality under Section 706 that opened the barn door for deregulation under Title II. In its ruling for Verizon, the court said, in effect, that the FCC’s Net Neutrality regs could only be allowed were the FCC to place broadband back under Title II. In short, what the FCC hath given in releasing broadband from Title II it may surely taketh away by reregulating it back into Title II. So, that’s all?!?!

Verizon won the battle only to loose the war. As Justice Frankfurter once said, a Right to do something doesn’t mean it’s always right to do.

The GOP legislation, especially because of provisions to limit current powers the FCC has, will go nowhere. First, President Obama has said that he will veto it and there aren’t enough backers for a veto proof majority. Meanwhile the Dems feel zero pressure to move the bill. There are even sizable factions within the GOP supporting Net Neutrality even to the extent of the FCC reregulating broadband under Title II.

Going forward, hopefully CTIA will work with the FCC to cater the Title II regs, under its forbearance, so that they are as focused as possible.

The good news is that, even if CTIA sits this out, it’s unlikely that the Title II rules will be onerous. That’s because when the Internet was first placed under Title II in 1992, the person who worked to limit the applicable sections (20, 21, and 23 I believe) was none other than FCC Chairman Tom Wheeler, then at CTIA.

The (Obvious) Importance Of Customer Convenience

There’s a discussion over at the Pebble forums about whether a user should be able to manage multiple Pebble watches in the Pebble app for iPhone or Android.


Why manage switching between multiple Pebbles from the Pebble app? Well, for one, it’s a better user experience.

Most customers wanting to do anything with their one Pebble, or many Pebbles, will naturally go to the Pebble app. That should be embraced.

The Pebble app should be the single place for all things Pebble. Doing that affirms a positive user, and therefore brand, experience and keeps the user focused on Pebble. Having an app that allows customers to manage multiple Pebbles in an easy way will also encourage them to buy more Pebble products.

If managing another Pebble becomes a hassle, then Pebble potentially looses additional sales to a current customer. Worse, that now less-than-satisfied customer means it’s less likely Pebble sells to others who read or hear that the app isn’t that convenient.

Anecdotally, think where the iTunes ecosystem would be if you couldn’t manage multiple iPods, iPhones, etc. within the iTunes app. The answer is, not the dominant position it is in today.

Xcode 5 Notes

Some migrating their iOS projects over to Xcode 5 but not converting their project’s xib(s) or storyboard(s) might notice that the performance of Xcode drops when trying to edit those files. Looking in Activity Viewer, it isn’t Xcode that is taking-up all the cycles, but a tool, Interface Builder Cocoa Touch, that has now gone from using its normal smidgen percentage of CPU to over 60%! This will make editing a storyboard or xib very painful.

A search of “Interface Builder Cocoa Touch” will not result in links that address this is issue. After all, Xcode 5 has only been publicly available since today. So what to do?

The problem is the Interface Builder Document settings for the iPhone Storyboard or xib in which the performance is laggy.

Start by looking in the File Inspector of each storyboard in which the performance problem exists. It is likely that the storyboard Interface Builder Document setting was set for “Xcode 4.6”. That is, as it turns-out, bad. Changing the IB Default Document setting of the xib or storyboard to “Default Xcode 5” will fix the problem. Once you make that change, the Interface Builder Cocoa Touch tool will return to its sipping of only a few threads and using 0.0% of the CPU.

VC Funding–SiValley vs. Texas

After reading an article in the New York Times about how music acts as a possible attractant to start-up’s, I wanted to get some numbers to see if that were true. From a historical basis, it’s important to remember that in 1999 Texas was doing nearly 10% of the venture funding of Silicon Valley, of as I call it, SiValley (cute, huh?).

2012 VC Funding

Year SiValley Texas Austin
2012 $10,968 $934 $621
% of SiValley 100% 6.2% 5.7%
2012 VC Funding Stage SiValley Texas % of SiValley
Seed $316 $2 0.6%
Early-Stage $3,279 $180 5.5%
Expansion $4,570 $344 7.5%
Later Stage $2,802 $408 14.6%

Source: PricewaterhouseCooper MoneyTree Survey

GLKit – Transforming A Vector With A Quaternion Part II

OpenGL 3d axes

As nice as yesterday’s post about one way to transform a vector3 using GLKit,

- (GLKVector3)transformVector3:(GLKVector3)inputVector3 withAttitudeQuaternion:(GLKQuaternion)attitudeQuaternion
GLKVector3 deltaV = inputVector3;

//Always ensure that your attitude quaternion has been normalized
attitudeQuaternion = GLKQuaternionNormalize(attitudeQuaternion);

//Convert the normalized attitude quaternion into a GLKMatrix3.
GLKMatrix3 tempQMatrix3 = GLKMatrix3MakeWithQuaternion(attitudeQuaternion);

//Since v' = v T, where T is a transform matrix, multiply
//the attitudeQuaternion GLKMatrix3 with the necessary GLKVector3.
deltaV = GLKMatrix3MultiplyVector3(tempQM3, deltaV);

return deltaV;

there is a simpler way to do this. The authors of GLKit of course knew that vector3 rotation would be a huge part of any application employing GLKit. And they naturally took care of that,

- (GLKVector3)transformVector3:(GLKVector3)inputVector3 withAttitudeQuaternion:(GLKQuaternion)attitudeQuaternion
GLKVector3 deltaV = inputVector3;

// Always ensure that your attitude quaternion has been normalized
attitudeQuaternion = GLKQuaternionNormalize(attitudeQuaternion);

// To transform, or rotate a vector using a quaternion, v' = q* v q,
// where q is the quaternion and v is the original vector.
deltaV = GLKQuaternionRotateVector3(attitudeQuaternion, deltaV);

return deltaV;