Sunday, September 14, 2014

A Fascinating Feature of Swift

I was just re-reading the swift book, The Swift Programming Language, and came across a feature that I overlooked the first time.

You can define a collection whose type is a protocol type.  This collection can include a bunch of objects of different types that all conform to a single protocol.  

Why is this useful?  When working with values whose type is a protocol type, methods and properties outside the protocol definition are not available.  This allows you to have a collection of different objects, but narrowly define the set of operations on that collection through the protocol type of the collection.  What a great way to create a particular perspective on a collection of different objects.

I can use the protocol to encapsulate the reasons I brought these different objects together, preventing unintended access to methods and properties outside the scope of why I brought these objects together.  This has great security benefits.  While we usually think of protocols as a way to extend objects, we can also use protocols to define a subset of existing capabilities of a set of objects.

Swift is a huge language and it continues to grow.  But even with the current features, there are further depths to explore.

Wednesday, September 3, 2014

Apple to Introduce Updated Hardware and New Product Categories on 9.9.14

At the moment, Xcode 6 Beta 7 has just been released.  We are less than a week from Apple's announcement of new hardware this Fall (Apple teaser: "Wish we could say more").  iOS 8 has been stuck at Beta 5 for a month.  My guess is that Apple may be ahead of the game on iOS 8 and are holding off releasing another beta because of support for unannounced hardware and features in the latest builds they don't wish to become public until the announcement on 9.9.14.

People are always trying to find hidden meanings from the teasers on the announcement invites.  I warrant this one is just a tongue-in-cheek reference to all the times Tim Cook avoided the "what's coming next" question.  Apple will be saying plenty come 9.9.14.

Thursday, August 21, 2014

Vulnerability


I am a bit of an Amanda Palmer fan.  She is a singer/songwriter who really puts herself out there.  She has the ability to make me laugh or cry, not every time, but with enough regularity that she must be tapping into something very raw and human. So, I pay some attention when she produces something.  I am on her mailing list and I get a notice from her (she writes infrequently) that she has a new book coming out.  Now I know this because I have read what she and others have written about how she twisted her life around in order to be able to write it.  So I get this notice which basically just tells me it how to get my hands on hew new book.  Now, honestly, I am not that interested in her book.  I saw her TED talk on the topic and I was wholly satisfied by that.  I am not interested in more details or the broader ramifications or how I too can put this into practice in my own life.  I got what I think I needed to know from her TED talk.  So I am looking at the cover to her book which is so Amanda Palmer (painted writing on naked skin - human parchment), and I notice the forward is written by Brene Brown.  Now, Amanda's husband is Neil Gaiman, a pretty famous writer, but she's got some other person doing the forward which makes me curious so I google her, as one does when you have no idea who a person is but maybe should. Up pops Brene Brown's TED talk.  So I am feeling a little guilty about my intention not to buy Amanda's book after she worked so hard on it and e-mailed me and all, so I decide I'll look at Brene's TED talk on vulnerability -  not my usual fair.  So, I watch the TED talk, find some non-obvious truths there to which I happen to ascribe and decide to share it with you.  You may already know all these truths but sometimes its nice to get a little affirmation about why we keep putting ourselves out there and getting our hearts roughed up a little.

Monday, June 30, 2014

New Jersey Summers

The only two things I like about New Jersey are blueberries in the Summer and being less than 90 minutes from Island Beach State Park.  The most fun a family can have for $5.

Wednesday, November 11, 2009

Introduction

This is the first post in my first blog. All blogs are an act of hubris. In the minds of the authors, they have something to say, to communicate to others, and so they publish in on-line diaries, public to all. I promise no great pearls of wisdom, no keen insights into the topic du jour being discussed. If you choose to read this blog, it is at your own risk of wasting time. What you'll see is what I need to express outside my head, but it will be 100% me.

We'll see where this goes.

VR/ Michael