Learning Swift and the Best of Both Worlds play

Well, having suffered through Objective C and liked XCode compiler, it has sure been interesting to see what Apple has come up next with Swift. It’s the brain child of Chris Lattner. He’s had a pretty incredible career, developing LLVM (a compiler backend) and then Clang (a front end) and finally XCode that’s been used for Apple’s development tools.

The Swift uses LLVM and runs in the same environment as Objective C, but has scripting like constructs built in as well as being strongly typed, so it is in the middle ground between scripting simplicity and the power of C. The iBook is actually a pretty good description of everything that it can do with native support for sequences, lists, ranges, it is pretty neat. If we were doing a marketingplaybook.com essay, it would be about how Swift is the best of compiled and interpreted languages:

  • It has the really nice abbreviated syntax of a Python but has the strict type checking of Objective C (sometime even more so)
  • It has the power of classes and because it uses the LLVM backend, you can mix and match it with Objective C

And Playgrounds let’s you make changes and insert code and see what is happening on the right pane. Pretty cool because Swift incrementally compiles so it really is the best of both worlds.

Others are doing the same thing with Google Go and Facebook Hack, so there’s so much more for programmers to learn. How fun is that!

Check this out for coolness where a data structure as a series of sequences and dictionaries and this looks at all the numbers in the sequences to find the largest number:

let​ ​interestingNumbers​ = [
​ ​"Prime"​: [​2​, ​3​, ​5​, ​7​, ​11​, ​13​],
​ ​"Fibonacci"​: [​1​, ​1​, ​2​, ​3​, ​5​, ​8​],
​ ​"Square"​: [​1​, ​4​, ​9​, ​16​, ​25​],
​var​ ​largest​ = ​0
​for​ (​kind​, ​numbers​) ​in​ ​interestingNumbers​ {
​ ​for​ ​number​ ​in​ ​numbers​ {
​ ​if​ ​number​ > ​largest​ {
​ ​largest​ = ​number
​ }
​ }


Excerpt From: Apple Inc. “The Swift Programming Language.” iBooks. https://itun.es/us/jEUH0.l


This thing definitely has it’s subtleties, for instance the use of question mark to say that the variable may have a legitmate value or a nil is pretty cool but different syntax. Touch-magazine explains it pretty well though.

First there is this cool idea of a data type type that applies to all types, so this means you can make any type Optional:

enum Optional : NilLiteralConvertible {
case None
case Some(T)

This interesting syntax means that there are two cases, with a nil for case and then Some(T) means just return the type. So it allows something like `OptionalInt` which says it can be a nil or an integer value. So that `Int?` just maps to `Optional<Int>` 

There is a different use of the question mark, where it is syntactic sugar that says if the object is a nil then don’t execute it.  Finally, there is the ability to cast things as needed, so there is both “upcasting” and “downcasting”, so you there is this idiom that says takes something and cast it down to its more basic component. For instance, if a string is an object, then the “if let” gives you a nice temporary constant to refer to it as that “downcast” item.


var str : String

if let object=str is NSObject {

   println(“I’m an object at my core”)



Similarly you can upcast something, so for instance with the `as?` it means that if you can see if it is the higher level object or through a forced conversion


var floatValue : Float

if let intValue=floatValue as? Int {

  println(“I can treat this object \(floatValue) as a integer \(intValue)by a forced cast which cuts off the decimal part for now”)



Amazon Affiliates

It’s been interesting to see how the affiliate programs really work. A great example of creating a business platform. As an example Amazon provides affiliates with a margin when anything goes through their site. For instance Amazon Gift Cards is a passthough that allows this site and Amazon to integrate

First we make it possible

In all the work we’ve been doing as we are on the frontiers of technologies, I remember the first ad campaign I saw about technology. It was a great presentation by some great folks and it had a simple theme:

First we make it possible

Then we make it practical

How you get there is all about how you create a really large change in the users mind and how they get excited about it. It leads to having mind share way before the revenue figures get large. Here are some companies that did that like Apple (Apple II, Mac, iPod, iPhone, iPad, whew!), Blackmagic (in video cameras), Go Pro (in adventure cameras), Microsoft (Windows)

Small volume manufacturing

In the new world, so often software has to get integrated into hardware. It’s one of toughest things to do.

As soon as you get to a single physical piece you have inventory risk and also almost everything is contract manufacturing and that means a trip to China. Finding a partner there is just so difficult.

It was interesting to see how many folks are around that can help like lowvoltagelabs.com and of course maker faire. Just shows that there is lots of interest in low cost manufacturing and this cross over between hardware and software.

There isn’t as they say an review site for factories which is is what makes it hard.

Makes me want to do anything that minimizes risk like the $10m contributed to the pebble watch. Quite a few have broken a million dollars. Watches have been hot.

Quirky also takes ideas and tries to manufacture and promote it.

Others are Oya which is a local game console company. The Form1 which is a 3D printer.

Ankle biter economy

Great points by old friend and classmate Dave Maney in Forbes. A classic stealth play problem for large platform businesses where there are low barriers to entry. Dave actually talks about the millions of drag races that small companies start and inevitable the big companies lose. Of course, this is great in the aggregate, but it isn’t too comforting to know that only one in a million survive, even if the cost of starting is low. So, it might make sense to make a play that gives you a protect niche at first before taking on the big guys. So Netflix might start doing mail order before it competes with Blockbuster and Sony Universal. Facebook might start with doing college networks before taking on Google and Yahoo. Tesla might start with an exotic roadster before building a Camry killer.  You get the idea 🙂

Winning the consultant drag race

Who hasn’t thought about being a consultant. Ok maybe it is in a negative sense to be out of the line of fire for a while. Maybe on the positive, it’s to help lots of people.

One of us (you can guess which!) even ran a consulting business for a while. We had a chance to interview some consultants and what we basically learned is that there a couple of key ways to turn a massive drag race into a stealth play. A niche where you can win. We learned there are three parts

The first and most important. Figure out the megatrend. It is much easier to consult into a growing market than one that is falling. So look around your industry and ask that gets you to a classic gap analysis.

I. What is everyone talking about and what is the big idea that they are staying. Big data. Cloud. 4g.

II. What do people think is just impossible and can’t be done easily. That’s the gap.

III. It is actually hard to just go from a small $5k assignments to a really big firm. You might never go there but somehow people who believe they are following a big dream have that passion and it is a test of big markets we talked about above.

Here is what we learned is the key is finding a relatively small gap in the market and then building:

1. Specific Tools. It is important to be good at something that is a specific deliverable. Something simple like a 24-hour assessment of the state. Or a specific methodology that gets to a good presentation. Having this vs general tools. That’s what later becomes books and slides and other things.

2. Specific Expertise. Build your street credibility as a general pundit. That means being able to be seen in the industry broadly as someone with expertise on a specific topic. These days that is about being at the right conferences and also about good work in the blogosphere. It is far more valuable to be an expert on mobile payments schemes for retail than a general IT expert.

3. Specific Clients. One fellow said it very well. It helps to start close to home. That is the best way to find gaps in tools and expertise is to engage in specific clients. If the area is super open that may mean there a million potential customers but most consulting is referral based so that means that you have to build the first client and get a good referral. The people who are leaders in a trend don’t you. The laggards won’t know what you are talking about. So you have to find the middles.

So how do you get from here (reading this at a Starbucks) to being Stephen Covey. Well first is a big topic that someone cares about. Something that is obvious to a top level CEO type that someone needs. Here are some of the tricks we’ve learned

A. Start with a taste test. On day one. Your value is zero so you really want to be useful first and then have people want more. And this is needed to start the referral pipeline. They need a small thing with one concrete result.

B. Start in your wheelhouse and extend to a big trend. If you’ve spend 20 years writing oracle software, don’t become a strategy consultant. Be a “bring oracle traditional ops to big data” is a good example.

C. Go to trade shows and meeting and get on the current pundit blogs bid they are bemoaning something figure out how you fill out. And finally this is where the referral network starts.

Cameras from Platform to Stealth to Drag Race

It is incredible sometimes to watch how some fields can completely change due to a technical revolution.

The digital camera business is clearly one of these. For decades mechanical cameras were similar and dominated by a high end duopoly of Canon and Nikon with Minolta as the dark horse.

They were standards built on the great platform of their lenses. In razor and razor blade fashion, you could spend $30k on lenses and then be trapped forever more as a Canon or a Nikon person. A lense would last literally for decades.

Then came the digital revolution. It meant that the initial digital models looked just like their mechanical film brethren. I had a Nikon f80. (I need to find it again) bought incredible Nikon glass like their incomparable 70-200. And it was painful to switch to Canon.

With these digital cameras came TSE who realized that they didn’t have to follow the dimensions of the big cameras. In particular the so called mirror-less cameras came out.

In the beginning these were point and shoots with very small sensors that couldn’t hope to match the quality of a 35mm film. But silicon moves ahead and with digital came the replacement of optical viewfinders with touchscreen a and displays ripped out of high volume mobile phones. The first players were stealthy. They were adjuncts to the prosumer cameras. Like my first canon point and shoot. It was 3 megapixels and no match for a film camera.

The platform leaders responded with their strengths and built a whole digital line around their lenses. But the upstarts kept coming with higher quality and more important none of the size limitations of having to be optical.

Today the world is again Balkanized. Nikon and Canon don’t have competitor systems because they need to defend their high end turf so instead the prosumer is switch en masse to a whole set of players.

Sony, never a player at the high end, acquired Minolta and then built a whole family of Mirrorless and digital cameras around their new E-mount. These cameras were light and small and had quality very close to their bigger brethren. Moreover they shared technology with dedicated video cameras.

Two smaller vendors Olympus and Panasonic joined forces to create a micro-4/3 mount which is much smaller but therefore much lighter. And image quality was very close because lenses could be designed with less cost and more importantly they out big processors in their cameras to do everything from image stabilization to correction of know lense defects. Fuji innovated on sensors and also created their own mount system.

In the end we now have a drag race for the next set of prosumer standards. Nikon and Canon still don’t complete while my four best camera buddies have evenly divided into a Olympus fan, a Fuji fan. A Samsung dabbler and me. I’m just dithering away looking for a market leader.

In the end the cycle has begun again but this time focused on lenses for these new mounts. Who will win, well that’s what a drag race means. It isn’t clear.

Shoot 5K video

Gizmodo makes a pretty darn good point, it a dSLR can shoot 14 fps at 22MP, then you can use it to shoot short videos. As frame rates rise, maybe you get to the point where it won’t cost $30K to shoot a fast video….

This is a great example of how one market and intrude on another. A reverse kind of stealth play when something enters the market from a completely different direction.

Kickstarter…another way to test ideas.

Most of the buzz about Kickstarter has been about how it allows companies to start without venture money. To us though, it is really about something that is more fundamental. It is a way to test market an idea and also to refine the product before you inuvest the dollars. I’d put a company on kickstarter just to see what the response is and also to get some enthusiasts to help you design the product. It is a great way to get a stealth play off the ground.

So for example, using an iPod nano as a watch is a good example. They needed $10k and raised more than $900K. But the bigger import is understanding that people want gadgets like this. 

The D16 is another example. It is a low cost camera in the tradition of 16mm cameras. Not every filmmaker can afford a $30K Canon C100 camera, so like the old days of 16mm, they have found a stealth play that undercuts the traditional and very expensive Sony, Canon and Red hegenomy.

Blackmagic proves (in another market) that a simple, focused product can win

It’s a subtle kind of stealth play, but Blackmagic at $3K for a medium resolution (2.5K lines) (like the iPhone in the phone market before it) proves that in a crowded market with clear needs, that a simple, low-cost product focused on simplicty can win. It is a simple box but has the right features (RAW format a little bit better than 1080p now know as 2K) but it has an SSD, uses someone elses lenses (Leica and Canon) and has Thunderbolt.

Another good sign for new entrants, do something simple that fits at a great price point and the internet will take over and sell it for you…

Canon recognised a need for large sensor cinema cameras but priced them for Hollywood and left DSLRs to rot. With Canon it seems they have tunnel vision. The announcement of the 4K DSLR with no 4K 25p, only 24p proves this. Nobody outside Hollywood or Japan exists! It is like building a car for a worldwide market and having it leave the factory with 3 wheels. Some, like Nikon, took 3 years to realise there was even a market! Some like Red aimed at the market but failed and went back to the Hollywood glitterati, their natural home. Blackmagic Design meanwhile could so easily have priced this raw camera at $10,000 and still sell out but the fact they didn’t is hugely significant.

The Blackmagic Cinema Camera may well clean up. DSLRs have a serious rival now.