A serious threat: SOPA and PIPA

January 18th, 2012

As a technologist and a lover of liberty and freedom as provided to me as a citizen of the United States (and resident of planet Earth), I can’t in good conscious allow this day to pass without taking a moment to comment on the struggle over the continued existence of the internet as we know it. If you happen to browse to Google or Wikipedia or quite a few other sites today (January 18, 2012), you might see some others making a stand as well.

I implore anyone who believes in the freedom of speech granted by the First Amendment of the Bill of Rights — or believes that our government should be by and for the people and not by and for a few select corporations, to take a moment and become aware of the heinous legislation being proposed by Congress this month in the form of the Protect IP Act (PIPA) and Stop Online Piracy Act (SOPA). I say proposed by Congress, but they were certainly proposed by the lobbyists of a very small set of media corporations. Do not be fooled by the money and greed behind the SOPA and PIPA and their ridiculous claims that this legislation is to protect Americans and American jobs from criminals. By any neutral and educated observation, this would do nothing but hurt Americans and American jobs — well, at least for all but the tiny handful who think they can purchase the U.S. government, and have, so far, been quite successful.

This is some of the most stifling legislation against the freedom of speech imaginable, and would easily put us on the same footing as some of the worst regimes in the world. In its current form, these acts would result in a near apocalyptic destruction of the internet as we know it, and would result in a loss of freedom, knowledge, and commerce across the world caused by a very small group of media corporations who only seek to protect their own markets through government intervention.

The threat is real. While you may think it’s “just the internet”, the internet is one of the largest contributors to advancement in knowledge and science, commerce, and political and social reform in the current era of history. Governments in the middle east have been overturned by the power of the internet. Thriving industries and life saving procedures have been formed due to the internet. A free and open internet is essential to the continued growth of society and our nation.

I’ve listed a number of excellent links to detailed information about SOPA and PIPA:

Lot’s of Static

January 4th, 2012

I’ve been using WordPress for a few years now as the software “engine” behind my blog. When I’ve aided others in blog creation, I’ve generally pointed or assisted them along a similar route. Recently, a trend among nerd / developer literati is a move to static generated web sites with no active backend database and software generating the web pages on the fly (i.e. WordPress). The benefits (and deficits) are legion, but the adventure itself is the most intriguing — so I’ve started tinkering with my own static site generation application. These (apps) are pretty much a dime a dozen these days, but what they generally lack is a polished fronted UI accessible via both Mac and iOS platforms that is user friendly and useable by non-developers. Finally, a good pet project for me to work on!

As part of the transition, this website will probably be looking a bit different in the near future. I’m also leaning toward ditching comments. I don’t think this is a great travesty as 1) very, very few people actually read my blog — especially when I average about two posts a year) and 2) those very few probably have other great ways to share their thoughts. Also, I’m hoping this project will reinvigorate my desire to post some useful thoughts here!

Yes. We want native apps.

January 16th, 2011

I could probably blog a post a day about my disdain for web apps, cross-platform apps, and any other lowest common denominator computing experience. I refrain due to the fact that I wouldn’t want to bore the living crap out of my dad, my brother and the one or two other people who read my blog on occasion. Even so, I have made my feelings known on a few occasions, although usually a bit tangentially:

Alex Payne has penned a very cogent work on yet another user-experience failure of the mythical first-class cross-platform toolkit / language. I love this comparison:

Imagine a new restaurant that wants to make the most of their burgeoning lunch traffic. They start serving low-quality meat: after all, it’s cheap, plentiful, and requires nothing more than placing a different order with their distributor. For a few weeks, profits are up. But pretty soon, so are customer complaints, and the stars on their Yelp page are rapidly dwindling. The owner doesn’t understand. The meat isn’t great, sure, but it’s perfectly edible, and for a while it seemed like the restaurant was making more money and attracting new customers. What went wrong?

Of course, no matter how times IT departments and businesses flaunt the idea that the Web or Flash or cross-platform widget toolkit is “good enough”, the fact of the matter is:

Do People Really Want Native Apps?

Yes.

Pure Heart, Clean Code – Part 2

November 25th, 2010

A few months back, I gave a short tutorial on how to integrate a code formatter / beautifier (uncrustify) into Xcode 3. Unfortunately (or fortunately), an alpha variant of an all new and improved Xcode 4 is available to members of the ADC. In an attempt to not break any NDAs, I’ll try to document this method in a generic way. Fortunately, it requires no configuration within Xcode 4 itself.

Interestingly, the method I’m about to discuss is also valid in Xcode 3, but not as efficient as the method I described in the previous article, as it doesn’t allow for a full document “cleansing” in place (one must select the code to be cleansed first). Before Xcode 4 finds its way to a final release, I imagine we’ll have many other options available to us – including one that will allow us to fully replicate the previous functionality.

Automator Template Selection

The gist of the following method is to use an Automator script that calls uncrustify and attach it to Xcode as Service that shows up in the Services menu. Tony Arnold has created three Automator workflows to provide similar functionality. I really don’t like how all of them work – purely due to the limitations of the method used. For example, Tony’s Uncrustify Current Document mimics the original functionality from my initial article but instead of processing the document live, processes the underlying file, causing some odd state in Xcode and a fairly unpleasant user experience. Therefore, I’ll just discuss how to create the Uncrustify Selected Text variant. If you want, you can just bypass the next paragraph and use Tony’s version, but come back afterwards because I have one more additional tip.

I’ve never really used the Automator before. It’s actually pretty slick. First, open Automator and choose to create a new Service template. This will create a new Services based workflow. You will select text and Xcode as the parameters to the new service workflow. You will drag one Action, Run Shell Script and enter the following as the script:

/usr/local/bin/uncrustify -q -c ~/uncrustify.cfg -l oc

The astute notice this is pretty much the same from the previous article. Save your new workflow to ~/Library/Services/ as Uncrustify Selected Text. Now, when running Xcode, a new option will become available in the Services menu when text is selected in the Xcode editor, allowing you to uncrustify your selection.

Automator Action

Oh, almost forgot the added bonus tip. Previously, we assigned a keyboard shortcut to the uncrustify task. There isn’t a direct method in Automator to assign a shortcut, but we can add it in System Preferences > Keyboard under Keyboard Shortcuts. Select Application Shortcuts and add a shortcut, selecting Xcode as the Application and Uncrustify Selected Text as the Menu Title. Pick your favorite keyboard shortcut, and you’re ready to go!

RIP Xserve

November 6th, 2010

I was a bit saddened today to see that the sexiest single U server on the market was being discontinued. That very delineation is probably part of the reason for it’s abandonment. Apple makes hardware (and software) designed around the user experience, and while the Xserve was no exception, the target user isn’t necessarily all that concerned about user experience in the server commodity market. The concern is cost, density, power, cooling, performance, and host of other non-UE concerns. Often, those responsible for purchasing aren’t even involved in the act of deploying or maintaining the boxes – the ultimate IT dissonance effect. Unfortunately, in the server space, users aren’t going to rebel from the IT mantra of “make my life easier”. The datacenter is also a rapidly changing market itself, with a number of very powerful cost drivers that definitely lend to a space very contradictory to Apple’s core values. Density and virtualization are the words of the day, and I can’t imagine Apple wanting to spends it’s limited resources remaining competitive in this space.

Interestingly, Apple could maintain a very strong presence in this market without jeopardizing it’s vaunted control. It might even be what Apple is doing in it’s own new NC data center. What if Apple partnered with VMWare to offer a VM only variant of Mac OS X server that could then run on commodity hardware? This would allow for the requisite controlled hardware and driver environment. The Hackintosh community is already doing this anyway on bare metal. The risk isn’t any greater by offering it in this manner if limited only to the more expensive Server variant. Leave enterprise server hardware to the domain experts in those areas, HP, Dell, IBM, and still maintain a presence in that market – and a revenue stream.

Could you imagine a partnership with Dell selling a datacenter of Blades running OS X under VMWare? Sign me up!

Microsoft and the End of Cross-Platform Application Frameworks (again)

October 31st, 2010

Microsoft discussed strategy a bit this week at PDC. One of the more interesting themes was a shift in development platform strategies with a focus on HTML5 as the cross-platform methodology of choice and a relegation of Silverlight as the application platform for Windows Phone 7.

I see this not so much as an acceptance of the failure of Silverlight over Flash as the failure of Silverlight / Flash as a cross-platform hybrid platform – I think Apple has won (with HTML5) and Microsoft knows it. I’m not even sure that Microsoft is really that sad about it – they were worried about Flash for the same reasons Apple was. As has been twittered a good deal as of late, did we not learn anything from the complete failure of cross-platform application frameworks in the 90s (particularly Java on the client)? Cross-platform application frameworks are only good for the tools vendors and consultants – not for developers or the consumers. I’ll defend that statement in another blog entry, but I feel like I’ve probably already done that two or three times already in past entries.

HTML5 & the web is the Microsoft answer to cross-platform (funnily enough, it’s Apple’s answer as well) – a market they (nor Apple) could really care less about in the relative scheme of things – it doesn’t directly help their OS or their applications. It’s just a minimum requirement that must be met to have a viable OS. Silverlight (and it’s underlying WPF/.NET underpinnings) is going to be the native app platform for the Windows Phone and likely every other MS platform before it’s over with – which is probably pretty smart – it’s a good platform.

Supporting HTML5 and the web is only required to provide support for the lowest common denominator platform. Innovation isn’t going to take place in the lowest common denominator – it’s going to occur in the targeted platform space with native applications that take full advantage of the underlying platform. Otherwise, you could just give us all Chrome and be done with it, and as I have stated often before, common denominator cross-platform solutions breed mediocre user experiences and commoditize the entire computing experience into a bland, boring space.

I hate magnetic media…

August 30th, 2010

Hard drive failed on my Mac Mini web server, sending me scrambling for backups and a replacement hard drive. I’m slowly putting back the pieces, but a number of images and links are still a bit broken. My apologies and should have them remedied shortly.

UPDATE: Apparently, the automated backups of WordPress that I’ve been making did not include any media assets. The pictures I can recover from the deep recesses of my iPhoto library most likely, but the one sound file of my 15 seconds of fame appears to be lost forever. Alas. This is ironic considering this (more recently augmented with Dropbox). Unfortunately, my web server somehow missed out on all the backup fun.

UPDATE #2: Through the miracle of the internet, I was able to recover another copy of the audio file. Meaningless to everyone but me, but glad I found it!

Sour Milk in the Latte

August 12th, 2010

Oracle tonight just dropped a proverbial Daisy Cutter on the computing community. Everyone is abuzz on the impact to Android and Google – the direct targets of the Oracle lawsuit, but this whole action will likely have a chilling effect on the Java community (and conceivably MySQL as well).

First off, to get this out of the way, IANAL. That stated, Google’s creation of the Dalvik runtime for Android always reeked of underhandedness if not infringement. It was very clear that they didn’t want to be beholden to Sun and it’s licensing and restrictions surrounding J2ME / J2SE and Java, and attempted to skirt the letter of the law (or the contract / license to be more precise), by creating an alternate “universe” or run-time that just happened to be near perfectly compatible with the Java language and frameworks. Of course, Sun was a weak opponent at the time, and didn’t have the money or the muscle to take on an opponent like Google. I’m sure Sun’s pitiful state of affairs did not go unnoticed by Google in this decision. Who knew that Oracle would acquire the IP and technologies? So, do I think Oracle has the right to go after Google? Absolutely.

Unfortunately, for Java proponents, there is a much greater concern here. I’ve been somewhat critical of Java in the past. I feel entitled – I worked in the language full-time for nearly seven years (Java in my mind is fast on its way to becoming the next Cobol, but that’s really irrelevant to the purposes of this post!) Sun always maintained Java as the benevolent Dictator – or your idiot Uncle who always wore a leisure suit at family reunions – depending on your perspective. Numerous efforts were made to share control and input, but let there be no doubt – Java was under Sun’s control.

As Sun became weaker and more senile with age, it’s governance of Java also became even more incoherent. To be honest, while Java’s founders and a number of brilliant engineers at Sun managed to build a wonderful language, the strategic and business management of Java from the very beginning was a disaster. It never seemed that Sun ever knew what to do with Java, first pushing it on the client-side, then finding at least a justifiable position on the server-side. Of course, even then, it never provided Sun with a significant competitive advantage over the influx of commodity server vendors and seemed to be more of a distraction than anything else. If not for a number of “angels” – IBM, Oracle, BEA, and the fear of the common “enemy” in Microsoft, Java would have likely fallen into irrelevance long before it reached the ubiquity found today (noticed, it dropped from the #1 spot for the first time in 5 years last month). Interestingly, Oracle, and especially IBM, did know how to leverage Java within their organizations for competitive advantage.

When Oracle acquired Sun, the first thought running through my head is the literal fear that must be running through the minds of those saddled to Java – particularly IBM. While Sun was either a benevolent dictator – or incompetent stooge, they at least maintained a benign, if almost altruistic attitude towards Java. Sun was safe. The past has proven, Oracle is anything but benevolent — ruthless and cutthroat (and very successful) are more appropriate adjectives. Since the acquisition, the Java stalwarts at Sun including the primary inventor himself, James Gosling, have quickly exited the doors of the tall oval buildings in Redwood City (UPDATE: check out James Gosling latest blog entry). Outside of these unnerving departures, Oracle remained relatively mum on their stewardship of the language.

While this lawsuit seems perfectly justifiable, I think it’s definitely clear that this steward has teeth and will treat the technology much more as an asset to be protected and to be profited from than a philanthropic duty to the computing community. Oracle isn’t Sun. They aren’t going to sit idly by while a technology they own profits others with no consequent benefit to themselves. These are interesting days indeed, not only for Google, but IBM and a huge outsourcing community who built their organizations around Java.

No matter, with Microsoft relegated to lame duck, it’s exciting to see someone other than Apple and Google in the technology news these days!

UPDATE: This whole mess made me recall an excellent blog article I read on this very subject almost three years ago; seems almost prophetic now.

The Disintegration of Yahoo

August 12th, 2010

An enlightening look at the fall of one of the biggest dot com boomers, Yahoo by Paul Graham. Probably the most interesting perspective is the deliberate attempt to subvert the natural order of a technology company to become a company of suits, resulting in the utter destruction of the company (or at least its potential). So many great lessons to be learned here for anyone big or small wishing to be a successful technology organization.

Paul Graham wraps up with this utterly awesome paragraph:

“Hacker culture often seems kind of irresponsible. That’s why people proposing to destroy it use phrases like “adult supervision.” That was the phrase they used at Yahoo. But there are worse things than seeming irresponsible. Losing, for example.”

Yearly Pilgrimage

July 4th, 2010

Another year, another WWDC. I generally blog after every WWDC, and this year I’m a bit behind. Honestly, I’ve been torn between watching all the WWDC video sessions and taking care of the house of woe (my whole house has been sick or demobilized for one reason or another for three weeks – including wife, both kids, and one of the two dogs).

Overall, this was the best WWDC for me yet — although this one was a bit different than past years. First, I realized, this was my 5th WWDC. That’s a bit mind boggling to me actually. It just seems like yesterday I started tinkering with Objective-C and Cocoa and cursing the bizarre syntax filled with brackets. It took at least a year I guess before I fell in love with the expressiveness and self-documentation of Objective-C, to the point where I prefer it now much more than anything else I have to deal with.

Rich standing in front of 1 Infinite Loop sign in Cupertino

Probably the more significant difference from previous years was the near total focus on the newly coined, iOS platform – all things iPhone and iPad (and probably more in the near future). Whereas most of my opportunities at my day job and even in my free time were focused on Mac OS X projects, the last year has slowly seen my desire to play more with the iPhoneOS rise. The release of the iPad has pushed me over the edge (although the iPad pushed me over like a Mack truck hitting me at 100mph). I have no doubt that the iPad is revolutionary to mainstream computing – much of which can be credited to iOS, and to the applications being developed in Objective-C and Cocoa. So, the timing of this years totalitarian focus on iOS caught me at the perfect peak of my interest.

The sessions this year felt very well focused, well organized, and much more helpful than years past. Not that the quality was poor before – I just think the solitary focus greatly increased the cohesiveness and content of the sessions. Better yet, these sessions have been made available within 3 weeks to practically everyone for FREE (versus past years where they cost non-attendees $500+ and generally took multiple-months to release). This is truly awesome. You can’t see everything at WWDC – this year even more so than in the past. Often, the videos are so delayed, their timeliness has passed and they’ve already gone a bit stale. Not so this year. I’ve been filling all my spare time obsessively watching these things – including the sessions I had already attended. They also look great on the iPad.

As far as aprés sessions, I did a couple things different this year. First, I took the pilgrimage to mecca and visited Apple headquarters on Sunday. A couple folks (Jeff LaMarche and Scott Knaster I believe) graciously organized a chartered bus from Moscone down to Cupertino for a small fee. Amazingly, I’ve never been to Apple HQ, and I really enjoyed the opportunity to set foot at Infinite Loop and talk with a bunch of great folks on the way there and back.

Of course, Tommy’s was excellent as usual (I went twice). And I definitely like Anejo better than Reposado (which I guess makes sense). Wholly different this year, I generally avoided the crowded parties and opted for dinners and drinks and such with smaller groups.

The yearly Stump the Experts was excellent as usual, minus some commentary that it might be the last year for the even. I certainly hope not — this would be a travesty and also eradicate one of the last vestiges of history and homage to the Mac, and everything that has come before. Not to mention, it’s just plain fun. In “honor” of my experience a couple years back, I got introduced to the crowd at the start of the show again and given free goodies. It keeps my Stump t-shirt streak alive at three!

For those who weren’t able to attend this year due to the sellout, please make sure to buy your ticket on the 2nd day after they go on sale to insure getting a ticket (2nd day – since I’ll be ordering mine on the first day and I don’t want to take any chances!)

Pure Heart, Clean Code

April 13th, 2010

A month or two ago while processing through a lot of old code, particularly a lot that I didn’t originally write (or at least I’m claiming I didn’t write), it dawned on me how pleasant a world it would be if I could quickly reformat the code – to make the code bend to my will… curly braces on their own line as God intended them… whitespaces where they belonged, and not where they aren’t, etc. So, the adventure began.

From many years with other languages and editors and IDEs, the concept that this would not only be missing from Xcode, but somewhat difficult to obtain was a bit foreign. Nonetheless, with a bit of Internet research, an external tool called Uncrustify, and some experimenting, I coerced Xcode to do my bidding. Oh, before I get started – the Edit->Format->Re-Indent option in Xcode is worthless, so we’ll just ignore it for this outing.

To note, I tinkered with multiple external formatters and the weak internal xcode formatter before I finally settled with uncrustify. Uncrustify has fairly good Objective-C support, can easily be integrated with xcode as a user script, and provides a centralized formatter for pretty much all languages that xcode natively supports.

First stop, acquire Uncrustify. I built mine from source, but if you want an easier route, it can easily be installed by using MacPorts.

Edit User Scripts in Xcode

Once you’ve verified that you have a functional version of uncrustify (uncrustify –version at the terminal command prompt should do the trick – I’m currently using 0.55), the next step is to integrate uncrustify’s usage into Xcode. We need to add a custom script, so open up Xcode, head to the Scripts menu (look for the funky little scroll-like icon) and choose Open Scripts Folder. We need to create a new script with the following:


#!/bin/sh
echo -n "%%%{PBXSelection}%%%"
/usr/local/bin/uncrustify -q -c ~/uncrustify.cfg -l oc+
echo -n "%%%{PBXSelection}%%%"

Input will be Entire Document. Directory will be Selection. Output will be Replace Document Contents. Errors will be Merge with Script Output. I set this script to have a key combination action of Shift-Command-P (P for Pretty).

The only thing left to do is to configure uncrustify to format our code in the specific dialect of style that we prefer. This task is actually quite a bit more difficult than expected. Uncrustify uses a very simple but daunting configuration file. My recommendation, take one of the supplied sample configs (ben2.cfg is very good), merge in the objc.cfg sample, and tweak as necessary. Once you’re done, place the configuration file where specified in your script (above, I used ~/uncrustify.cfg). For those interested, I’ve attached my uncrustify.cfg. I’m still tweaking it here and there, so it’s definitely a work in progress, but it does the job for the most part.

Now, any time my cursor is an editor, a simple Shift-Command-P will reformat my code quickly and to my liking. I find myself now often typing code very hastily without regards to style and formatting and following up with a Shift-Command-P to make it nice and readable.

Hypocritical Rancor

April 11th, 2010

The last week has seen quite the bristling of a hypocritical and vociferous group of “developers” and technical pundits. The best recapping of this whole situation can be found at John Gruber’s blog: initial discovery and assessment. The two loudest crowds seem to be the Adobe Flash fans and the C# Mono folks.

Let’s just leave the actual “rule” from Apple aside for a moment and just speak from a user experience perspective.

First, let’s talk performance… The fact that you can make a good performing app with an intermediary language certainly isn’t proof that it isn’t much more likely to have a performant application that is written in a more native language. I mean, if hardware had not gotten faster, we would all be programming in assembly (or C). Abstractions are great for developers but not great for machines. There is a reason Java and C# haven’t taken over the desktop or game development – and the examples that can be given of the few sparse games in those two languages / platforms doesn’t change the fact that other than casual web games and a few Xbox toys, they aren’t used seriously by professional game studios. With mobile platforms, the hardware is going in the opposite direction from desktop hardware. Not to mention, I’m curious about the incongruities of a cross-compiler from a managed memory model to one that isn’t, but hey – maybe they’ve figured it out.

As for user experience, Gruber nailed it. The Kindle application is a very good example of the problem with many cross-platform libraries…. I’ve never seen an application for the Mac written in a language / library other than Objective-C / Cocoa that felt right – and that includes applications written in the Apple approved C / Carbon libraries (which are slowly being deprecated)… If MonoTouch is that good at traversing the paradigms between .NET and Cocoa, that’s damn impressive, but I don’t believe it… The problem is, that on every other platform, interface incongruities are just the norm – expected, so cross-platform libraries are not abhorred as greatly – the users aren’t as discerning. On the Mac and it’s derivatives, consistency of behavior and user experience are tightly defined. I haven’t seen people getting up in arms about the HIG (human interface guidelines). Did you know that you can be rejected from the app store from not complying with the HIG? Now, most would say that’s just more Apple restrictive behavior, but it’s not – it’s protecting the user experience and the platform. Obviously, most didn’t see the HIG requirements as offensive though, although these new requirements are truly enforcing the same thing.

Again, languages and frameworks are not difficult for any experienced developer to pick up. For most programmers, the basics of Objective-C and Cocoa can easily be picked up in days… proficiency can be attained in a couple weeks. Once proficient, why would you choose the targeted platform over another? .NET is a bit a richer than Cocoa, but certainly not worth forsaking the native platform, the tools, the documentation, etc. provided? Flash has no real benefits for a traditionally trained programmer.

As an aside, I think Mono outside of Novell is pretty much dead anyway. I can’t imagine it will ever make major inroads outside of certain niches – folks who need to develop for Linux but have a lot of .NET experience. Many couldn’t be doing Mono right now if they weren’t also Novell partners. Microsoft’s threats have gone a long way in making corporate lawyers nervous, and it’s only through the negotiated protections offered by the Novell / Microsoft partnership that have allowed some to move forward.

As much as everyone has belabored this iPhone OS issue, the rancor towards Microsoft and their general destruction of C# and .NET has never reached similar fervor. The real reason Microsoft has stifled these technologies is often applied to Apple – an anti-competitive bent of protectionism. I don’t deny – I’m sure there is a significant element of this in Apple’s intentions as well – but at least they have a pretty good logical and conceivably more benevolent reason as well.

Even Icaza said it:

“The most important part is that Microsoft has shot the .NET ecosystem in the foot because of the constant thread of patent infringement that they have cast on the ecosystem. Unlike the Java world that is blossoming with dozens of vibrant Java virtual machine implementations, the .NET world has suffered by this meme spread by Ballmer that they would come after people that do not license patents from them.”

Of course, Google is our angel – savior from the capitalistic bastards facing us in Cupertino and Redmond. If anyone thinks Google is any more noble and less evil, keep dreaming. Why aren’t they releasing all their new apps for platforms other than Android? Why did they buy AdMobile (which they knew would be a problem with the SEC) in a move to block Apple from acquiring it? To think that Google is any different is naiveté at its extreme.

In the end, I would rather the new iPhone/iPad platform be more open – or at least have more than one pathway to sale and deployment. But, the raucous rancor and fervor exhibited over the last week is nothing but hypocrisy. Bitter hypocrisy…