3.3.1 with a twist

The by now famous paragraph 3.3.1 in the iPhone Developer Program License Agreement for iPhone OS 4.0 says that “Applications that link to Documented APIs through an intermediary translation or compatibility layer or tool are prohibited”. Which, of course, ruins the day for Adobe and Flash CS5. The idea was to have Flash scripts run on the iPhone on just such a compatibility layer.

The theories as to the reason why are, generally speaking: f*ck Adobe, preserve performance on the iPhone and iPad, and/or make multiprocessing efficient on these devices. With regard to that last, the theory goes that the OS figures out how the app works and hooks into the app and the app framework, but if there’s a compatibility layer in between, that becomes very difficult and inefficient. Actually, purely technically, without any fanboyisms, it does make sense to me.

In that case, and reading the 3.3.1 literally, nothing stops me, or Adobe, from implementing a translation from our own specific languages using a precompiler, as long as you end up compiling actual Objective-C code using XCode into the app. That’s what I would do, and I find it a better solution, anyway.

But the anti-Adobe conspiration theorists may claim Apple doesn’t want you to do this, either. I don’t know if they do, but let’s assume.

Now it gets interesting. There is no way that Apple can detect from the runtime code, or even the source code, that the code has been produced by a precompiler, if that precompiler does a decent job. If they want to stop that from happening, they’ll have to monitor the user’s machine for precompilers and editing tools, like World of Warcraft is monitoring for bots. What a fascinating circus that would be.

Subversion server on Snow Leopard server

As I already bragged about, I got me one of those delicious little OSX Mini Snow Leopard Server boxes. So sweet you could kiss it. I just got everything together to make it run a subversion server through Apache, too, and as a way to document that process, I could just as well make a post out of it. Then I can find it again later for my own needs.

First of all, subversion server is already a part of the OSX Snow Leopard distribution, so there is no need to go get it anywhere. Mine seems to be version 1.6.5, according to svnadmin. Out of the box, however, apache is not enabled to connect to subversion, so that needs to be fixed.

We’ll start by editing the httpd.conf for apache to load the SVN module. You’ll find the file at:

/etc/apache2/httpd.conf

Uncomment the line:

#LoadModule dav_svn_module libexec/apache2/mod_dav_svn.so

Somewhere close to the end of the file, add the following line:

Include "/private/etc/apache2/extra/httpd-svn.conf"

Now we need to create that httpd-svn.conf file. If you don’t have the “extra” dir, make it, then open the empty file and add in:

<Location /svn>
  DAV svn
  SVNParentPath /usr/local/svn
  AuthType Basic
  AuthName "Subversion Repository"
  AuthUserFile /private/etc/apache2/extra/svn-auth-file
  Require valid-user
</Location>

Save and exit. Then create the password file and add the first password by:

sudo htpasswd -c svn-auth-file username

…where “username” is your username, of course. You’ll be prompted for the desired password. You can add more passwords with the same command, while dropping the -c switch.

Time to create svn folders and repository. Create /usr/local/svn. Then create your first repository by:

svnadmin create firstrep

Since apache is going to access this, the owner should be apache. Do that:

sudo chown -R www firstrep

Through Server Admin, stop and restart Web service. Check if no errors appear. Then use your fav SVN client to check if things work. Normally, you’d be able to adress your subversion repository using:

http://yourserver/svn/firstrep

Finally, don’t forget to use your SVN client to create two folders in the repository, namely “trunk” and “tags”. Your project should end up under “trunk”.

Once up and running, this repository works perfectly with Panic’s Coda, which is totally able to completely source code control an entire website. If you don’t know Coda, it’s a website editor of the text editor kind, not much fancy graphic tools, but it does help with stylesheets and stuff. It’s for the hands-on developer, you could say.

The way you manage a site in Coda is that you have a local copy of your site, typically a load of PHP files, which are version controlled against the subversion repository, then you upload the files to the production server. Coda keeps track of both the repository server and the production server for each site. The one feature that is missing is a simple way of having staged servers, that is uploading to a test server, and only once in a while copy it all up to the production server. But that can be considered a bit outside of the primary task of the Coda editor, of course.

You could say that if your site isn’t mission critical, but more of the 200 visitors a month kind, you can work directly against the production server, especially since rolling back and undoing changes is pretty slick using the Coda/subversion combo. But it does require good discipline, good nerves, and a site you don’t really, truly need for your livelihood. You can break it pretty bad and jumble up your versions, I expect. Plus, don’t forget, the database structure and contents aren’t any part of your version control if you don’t take special steps to accomplish that.

Coda doesn’t let you access all the functionality of subversion. As far as I can determine, it doesn’t have provisions for tag and branch, for instance. But it does have comparisons, rollbacks and most of the rest. The easiest way to do tagging would be through the command line. Or possibly by using a GUI SVN client, there are several for OSX. I’m just in the process of testing the SynchroSVN client. Looks pretty capable, but not all that cheap.

The cutest little muscle machine ever

I got me that brand new Apple Mini with Snow Leopard OSX Server unlimited edition included. This is such an adorable machine, you wouldn’t believe it. It has everything you can wish for in a server, as far as I can make out after just a couple of hours with it. It’s super easy to set up and to monitor. It’s small, it’s beautiful, it’s almost totally noiseless, and seems to use hardly any power. When you feel the case, it’s just barely warmer than the environment and the same goes for the power supply. When I switch off everything else in the room, I can only hear the server running from less than a meter’s distance. It seems to produce about the same noise level my 13″ white MacBook does when it’s just started and perfectly cool. In other words, practically inaudible. Still, it’s running two 500 Gb drives in there, which I’ve set up as a mirrored (Raid 1) set.

I’ll probably brag about this system some more once I get to know it better. But meanwhile, it’s the nicest computer purchasing experience I’ve ever had. Except for the Mac Pro. And the MacBook. And the iMac, of course. And the iPhone. And Apple TV.

server_dimensions_20091020

What a strange piece

Can’t help commenting on this opinion piece on TechRepublic: The Apple Tablet will disrupt Apple’s device momentum. Just a few choice quotes:

… 1) providing good entertainment; and 2) providing flexible input and output. The success of the iPhone illustrates how correct I was in the first point. It stumbled into the entertainment angle.

Yes, sure, Apple “stumbled” into success.

In fact, every key innovation in PC technology for the past 30 years has been driven by gamers, but Microsoft, HP, and everyone else – including Apple with its largely accidental success with the iPhone – have ignored this in the portable electronic device market. And the whole time, I feel like I’ve been jumping up and down, screaming, “Deliver the games, become the dominant games delivery system – and the rest will follow!”

You didn’t scream loud enough, did you? Oh, btw, me and a lot of other people I know buy iPhones for other reasons than games, like for their business and connectivity apps, you know? Haven’t heard of those yet? Maybe if you stopped jumping up and down and screaming for a sec, you’d hear us talking about that.

“Take my word: The super-hyped Apple Tablet – which is supposed to be a convergence of the iPhone, the Apple Mac, and the netbook phenomenon – is going to be a failure”

What Apple Tablet? Nobody has seen one, but you already know what it’s going to be and even why it will ultimately fail.

Why will the Apple Tablet fail? The one thing consumers don’t want is another gadget that ultimately does the exact same thing as several other gadgets they already own, especially one that requires all kinds of contortions to move legally-licensed and legitimately-owned content around from device to device.

Yes, especially as Apple is known for making their users buy media again and again every time another product of theirs comes on the market. Like the last time people bought all their media on the Play-For-Sure system only to discover that it wouldn’t play on the new generation Apple Zune. We’re not going to walk into that trap again, are we? When will Apple finally learn to treat their customers with respect, like Microsoft does with their iTunes, which is not only DRM free but works across devices without new purchases being required.

Oh, wait, did I get that backwards?

Then I just skimmed through the rest, but if you feel like being abused by more of that bad thinking, please head over there and enjoy some more of these “insights”.

Anything but games are illegal?

I’m having this most surrealistic dialog with a very agreeable iTunes support person, about invoicing. The thing is I bought a few apps from the iTunes app store, among which Omni Focus for the iPhone, but the invoice (or “receipt”) I got from Apple doesn’t mention sales tax at all. Just the net amount in Swedish crowns. It is, however, correctly addressed to my company.

As practically anyone realizes, this is super weird and means I can’t recover the sales tax when I enter this document into my accounting. So I wrote to iTunes support and asked for a correct invoice. The ensuing conversation follows (I took out the name of the iTunes representative).

Continue reading “Anything but games are illegal?”

The real iPhone conspiracy

So I’ve used a Mac for a while and I’m just starting on iPhone development and a blinding flash of the almost-obvious strikes me. This is not the Blackberry killer or the Palm killer, it’s the long-fuse Microsoft killer.

Remember the monkey dance? Ballmer yelling “Developers, developers, developers!”, while jumping around like a neurally defective and sweating profusely (one could be excused for suspecting some cholinergic poison, but he lived through it, so that is not the answer). Right. I mean, he’s right. Developers is what makes or breaks a platform, but now he’s losing them, so he really has no reason to celebrate.

When Apple designed the iPhone, they could have created a special development system and language for it, but even though it may have been easier, they didn’t. They chose to tweak the development environment for OSX to include the iPhone, and by necessity, also putting OSX on the iPhone. The result of this is that if you want to develop for the iPhone, you have to get a Mac (strike 1), learn OSX (strike 2), learn Objective-C (strike 3), learn Cocoa (strike 4), and by then you’re so deeply immersed in the Mac environment that you won’t find your way out again. Since you can run your Windows stuff, including Visual Studio, just fine under Parallels or Fusion, you don’t need that Dell or HP machine for anything anymore, and you’re not sorry to see them go. In other words, you’ve got a developer that clearly isn’t going to like going back to .NET development again. I mean, once you’ve used these two environments (Xcode/Cocoa/Objective-C vs .NET/Visual Studio) it’s practically impossible to enjoy .NET anymore. It’s so far behind and so very clunky in comparison it’s almost a joke.

So, every developer you task with iPhone development is almost certainly lost from the .NET camp forever. This I can’t prove, but I’m convinced of it. But now is the question: who are these developers? Do they already develop for the Mac or are they from the “other” side? Again, by the seat of my pants, I’m convinced that a very large and increasing proportion come from large enterprise .NET development organisations that need to add a client for their large systems on the iPhone. See where this is going?

It’s only just begun.

Update: I suddenly realized that I fused two unrelated events together in my mind. Steve Ballmer did the monkey dance and yelled “Developers, developers…!” at two different, equally traumatizing, occasions. I’m not sure that’s any better, though. It’s all very disturbing.

The end of .NET? I can’t wait.

Ok, I admit, that title is a bit over the edge, but still that is how I feel. Developing for .NET is increasingly becoming not fun and far too expensive. The only reason to do it is because customers expect products for .NET, but under slowly increasing pressure from developers, that is going to change. It may take a while, but it will happen. There are a number of reasons for this.

.NET development is single platform. Admittedly the largest platform, but a platform that is increasingly having to share the market with other platforms. And already, according to some, there’s more sales potential for small developers in the OSX market than in the Windows market, due to a number of factors like customers that are more willing to buy and to pay for software, less competition in each market segment, etc.

.NET development is also entirely dependent on Microsoft’s development tools and those are increasingly expensive. For reasonable development, you need an IDE, a good compiler, version control, bug handler, coverage analysis, profiling, and a few more. We used to have most of that in the regular Visual Studio, but recently MS has removed all the goodies and plugged them into the Team system only, which carries an obscene pricetag (in Sweden around USD 13,000 + VAT for the first year…). This means that a regular one-man development shop can barely afford the crippled Visual Studio Professional at USD 1,500 for the first year. Sadly, there aren’t even any decent and affordable third party products to complement the VS Pro so it becomes a “real” development suite. And with every version of Visual Studio this only gets worse. More and more features are added to the Team suite and removed from the Pro. This is not the way to breed a happy following.

Meanwhile, OSX comes with XCode, which is almost as good as Visual Studio Pro, and is free. Objective-C is also a much more modern language with more depth than any .NET language, even though it is actually older. But, sadly, it’s not cross platform either and I don’t see how you can get the Windows fanboys of the Scandiavian healthcare scene to even consider another platform. Same probably goes for most other industries.

I’m no fan of Java, but on the other hand I’ve never worked much with it so that opinion doesn’t count. Eclipse, the IDE often used for Java development, is cross platform, very capable, and open for other languages such as Python, Flex, and many more. Yes, I know, in theory so is Visual Studio, but how many real languages do you have there? You’ve got one: Basic, masquerading as C#, J#, and, um, Basic.

Using Eclipse on any platform, you’ve got a real good chance of covering the line of tools you need, profilers, coverage, version control, without much pain and without breaking the bank. And you can write crossplatform integrated larger systems.

So, I guess it’s time to bite the bullet. I really like XCode and OSX, I really know C# and .NET, but I really only believe in Java, Flex, Python, Perl, C++ under Eclipse for enterprise development in vertical markets. And in XCode under OSX for regular shrinkwrapped desktop apps.

Not even Silverlight is very attractive and that is largely due to the marketing and pricing of the tools for it. A small developer organisation can’t afford it. Flex and AIR looks like serious contenders, though.

GotoMeeting runs on the Mac!

I love GotoMeeting, but until now I had to run it under Windows. You could only run it as a viewer under OSX before, but the latest version has a full function Mac client. I opened GotoMeeting under OSX (Firefox) then under XP (Firefox) on the same machine in a full screen virtual window, and I got this beautiful effect as the image was recursively drawn out into the distance. Looks a bit like a very deep cinema with the rows populated by Mac icons up front and in the back. Click for a larger image.