Economic Analysis & The App Store

I read two articles – the app bubble and bad news about iphone economics – which surprised me a bit.

Their analysis, which doesn’t account for gain in human capital and the value of lock-in (or alternatively the cost of switching), seems to posit that the App Store is bad for everyone. I could be completely misevaluating the arguments presented, but I believe that if you dig into the arguments presented significant benefits are not being accounted for.

Apple is Paid to Advertise

Apps aren’t very profitable for Apple either. According to Apple Insider, “Apple has long maintained that the App Store isn’t meant to be a profit generator, as much as a means of attracting customers to the iPhone and iPod touch.” The App Store’s gross profits amount to just 1 percent of Apple’s total gross profits.

If something is a ‘means of attracting customers’ then it is a valuable asset, a marketing tool. Even if Apple were losing money running the App Store they would still continue to operate the store because it is incredible marketing tool. The fact is that Apple is being paid to advertise the iOS platform. There is alot of time and money being pumped into advertising individual iOS applications and the more those applications are being designed and developed vendor lock-in takes place which is extremely valuable (vendor lock-in is what makes Microsoft so valuable, valuable enough that Intel just bet 7.68 billion on a more-or-less Microsoft specific technology). Many smaller companies have to choose between the iOS platform and the Android phone (it really isn’t a platform… yet) and most – in my opinion – are choosing the iPhone. Every application that is released on the App Store increases the marketing value of the App Store.

iOS Apps Keep Customers Happy

The decision to adopt a technology sometimes depends on whether or not your current hardware will support it. This is why Square Space developed an iOS app – it keeps customers happy and helps future customers more easily make the choice to using Square Space. Additionally, developing an App Store application to tie in with your product prevents a second-mover from jumping into the uncaptured market and pulling customers into a separate service which integrates with your free / paid iOS application (ex: some sort of Square Space competitor).

Experience is Valuable

Developers don’t develop open source applications such as Seashore, Sequel Pro, and Adium for profit. Open source applications are developed for the experience and for the gratification that comes with knowing you are the master of something (this video has some thought provoking ideas about the reason people spend time on tasks which do not result in a direct monetary gain). Developers are more valuable when they can bring an idea from conception to release and when they can prove their ability to quickly master new technologies. Having an iOS application published on the App Store gives concrete evidence to an employer that an employee has those skills – it is a screening device. Yes, an individual developer may not make a profit on an app they developed, but if it allows them to earn 20% over the next 5 years then there is most definitely a net gain.

HTML For Email Newsletters & Image Links

Recently I’ve made some minor adjustments on newsletter bound HTML documents. One particular document was made in the iContact WYSIWYG editor and as you can expect the HTML markup was horrendous. Even worse than the markup was the various ways the email displayed in different email viewing environments. Hotmail, Outlook, and Gmail all displayed this same email differently.

The main issue I was experiencing was a mysterious 3px bottom ‘padding’ given to all img elements wrapped in an anchor tag and lined up horizontally using tds (apparently tables are still the norm for email marketing). No actual CSS padding or margin was being applied to the img or any of its container elements. I’m still not entirely sure what was causing the 3px ‘padding’ but adding style=”display:block” to each img element fixed the problem.

AppleScript Tips & Tricks

I’ve done a fair amount of applescript work (mostly automation & UI scripting related projects) over the last couple months and – although very frustrating – applescript can allow you to achieve some incredible automation tasks. I’ve compiled a disjointed lists of tips, tricks, and source code that some trying to wade through applescript (specifically ui scripting which can be especially tricky) might find useful.

Enable Access for Assistive Devices

tell application "System Events"
set UI elements enabled to true
end tell

When “set value of text field” Won’t Work

set value of attribute "AXValue" of text field 1 to "String"

How To Iterate Through Rows in a Table

repeat with r in rows of table 1 of window 1
log r
end repeat

Retrieve Every UI Element Available in a Window

tell application "System Events"
tell process "Process Name"
set visible to true
return every UI element of front window
return name of every UI element of front window
end tell
end tell

Get a List of the Children of a UI Element

return value of attribute "AXChildren" of UI element 1

Create / Update / Connect Network Preferences VPN Services

Although since OS X 10.5 we have been given better applescript access to network preference settings, it still isn’t possible to create / update services / interfaces through applescript. With some tricky UI scripting and the help of the UI Element Inspector (or the advanced UI Browser) it is possible to create and update VPN service information. I also wrote a couple functions that allow you to check the existence of a VPN service and the connection status. You can check out the source code here. Note that although the code is VPN service specific it wouldn’t be terribly hard to modify the code for use in automating the creation of aiport, ethernet, etc services.

Take a Screenshot of a SWF

This is a bit more complex that one would expect. Because the Flash Player isn’t built using cocoa it doesn’t support alot of native applescript methods and getting a screenshot of the actual content (not containing the title bar!) of the swf is actually pretty challenging. The script will take a screenshot of only the content of the actual swf. This is useful if you have a flash app that has loadable swf components that the user should be able to preview through a thumbnail. Coupling the script with the following bash script allows you to easily generate thumbnails for all the swfs in the specified directory.

#!/bin/bash

function normalize_path() {
eval "NORMALIZED_PATH=$1"
NORMALIZED_PATH=`php -r "echo realpath('$NORMALIZED_PATH');"`
}

find ../path/to/swfdirectory -name "*.swf" | while read line; do
# remove the relative reference
normalize_path "$line"
line=$NORMALIZED_PATH

# open the flas
open -a "Flash Player" "$line"

sleep 1

thumbnailPath=${line/.swf/.jpg}
osascript slide_preview.scpt "$thumbnailPath"

killall "Flash Player"
done

exit 0

Other Applescript Code Snippets:

Helpful Applescript Articles

Going Social

It is often hard for me to find the time to actually finish a blog post for this site, I have many many drafts that are about 70% complete but as of now I can’t find the time to finish them and get them out onto this blog.

However, I’ve still been trying to push as much work as I can out into the public realm. Here are some sides that I frequently post code / projects / findings onto:

Hopefully you will find some of the code / ideas I post on those sites useful.

As an aside, I’ve been fascinated with Twitter: there is no ‘right way’ to use Twitter. Facebook is pretty straightforward – connect and stay and in touch with others. Twitter is a generic searchable database accessible from anywhere with easy ways to create relationships between different pieces of data and connect with the larger web as a whole. I use my Twitter account mainly as a bookmarking service; I find the traditional bookmarking model to be very lacking, I’m surprised Apple / Google / Startup will reinvent the wheel. It will be interesting to see what these different massive social sites end up turning into.

Compiling PHP 5.2.11 on OS X 10.5.8

I’ve detailed this problem before but yet again I’ve encountered the infamous iconv compile error. This bug is not new yet it still has not been fixed in the latest PHP release.

When compiling a custom version of PHP with libraries such as libxml and iconv the make process results in a linking error relating to the iconv library. The problem arises because I have two versions of iconv installed – the macports version in addition to the standard installation. A linking conflict arises and to eliminate the error a linking search order change (which is detailed in my previous blog post) must be made. In addition to the makefile modification, the previous workaround for the bug also included using --with-iconv=shared,/opt/local instead of the standard --with-iconv. Either the latest PHP (5.2.11) or OS X update has caused that workaround not to function correctly, now only --with-iconv=/opt/local should be used.

I’ve posted a script that I’m now using to keep my PHP installation up to date.

NetSuite PHPToolkit & Uncaught Empty Search Results Error

So far my experience with NetSuite has been less than favorable. Their developer resources aren’t bad, but they aren’t terribly good either. I’m working on a project that involves searching through contacts & selectively modifying contact data based on search results. In some cases the search will return an empty result set – just like any normal search should. I would have thought that the PHP developer kit was mature enough to handle an empty search set, but apparently not. With the most recent “v2009.2″ framework I receive the following error when attempting to perform a basic ContactSearchBasic:

PHPtoolkit.php [416]:

Undefined property: stdClass::$pageSize

I’m guessing that most of their third party developers are using .NET or Java which would explain this extreme oversight in the PHP framework. Heck, it might be resulting from some obscure PHP compilation configuration option on my local machine (although I’m doubtful that it is). For those are experiencing the same issue I’ve uploaded a patch which fixes the issue in your PHPToolkit.php file.