Tag Archives: mac

Time for another look at “pure .NET”

Back in the Nineties there was a lot of fuss about “pure Java”. This meant Java code without any native code invocations that tie the application to a specific operating system.

It is possible to write cross-platform Java code that invokes native code, but it adds to the complexity. If it is an operating system API you need conditional code so that the write API is called on each platform. If it is a custom library it will have to be compiled separately for each platform.

Over on the Microsoft .NET site, developers have tended to have a more casual approach. After all, in the great majority of cases the code would only ever run on Windows. Further, Microsoft tended to steer developers towards Windows-only dependencies like SQL Server. After all, that is the value of owning a developer platform.

Times change. Microsoft has got the cross-platform bug, with its business strategy based on attracting businesses to its cloud properties (Office 365 and Azure) rather than Windows. The .NET Framework has been forked to create .NET Core, which runs on Mac and Linux as well as Windows. SQL Server is coming to Linux.

Another issue is porting applications from 32-bit to 64-bit, as I was reminded recently when migrating some ASP.NET applications to a new site. If your .NET code avoids P/Invoke (Platform Invoke) then you can compile for “Any CPU” and 64-bit will just work. If you used P-invoke and want to support both 32-bit and 64-bit it requires more care. IntPtr, used frequently in P/Invoke calls, is a different size. If you have custom native libraries, you need to compile them separately for each platform. The lazy solution is always to run as 32-bit but that is a shame.

What this means is that P/Invoke should only be used as a last resort. Arguably this has always been true, but the reasons are stronger today.

This is also an issue for libraries and components intended for general use, whether open source or commercial. It is early days for .NET Core support, but any native code dependencies will be a problem.

Breaking the P/Invoke habit will not be easy but “Pure .NET” is the way to go whenever possible.

RemObjects previews native Apple Mac IDE for C#, .NET, Oxygene

RemObjects is previewing a new native Mac IDE for its Oxygene and C# compilers. Oxygene is a Delphi-like language (in other words, a variant of Object Pascal) which targets iOS, Mac, Android, Windows Phone and Windows. RemObjects C# shares the same targets. Both can compile to .NET assemblies for Windows, or to Mono for cross-platform .NET, or to a Mac or iOS executable (using the LLVM compiler), or to Java bytecode for the Android Dalvik runtime. You can get both Oxygene and RemObjects  C# bundled in a product called Elements.

In the past, RemObjects has used Visual Studio as its IDE. While this is a natural choice for Windows users, much development today is done on the Mac. Requiring Mac users to develop in a Windows Virtual Machine adds friction, so RemObjects is now working on a native IDE for the Mac codenamed Fire.

image

I gave Fire the briefest of looks. Here are some of the options for a new .NET application:

image

Note the appearance of ASP.NET MVC 4, and even Silverlight.

Here are the options for a new Cocoa application:

image

If you are developing for Cocoa, you can edit the resource file in Apple’s Xcode and use it in your application. I started a new C# Cocoa app, made a few changes and and then ran it from the IDE:

image

I imagine Microsoft will be keeping an eye on tools like this – if it is not, it should – since they fit with the strategy of supporting Microsoft services on multiple devices. Visual Studio is a fine tool but if Microsoft is serious about cross-platform, it needs strong Mac-native development tools. Xamarin came up with Xamarin Studio, which is cross-platform for Windows and Mac, but the RemObjects approach also looks worth investigating.

PS The first release of RemObjects C# lacked full generic support, for which failing Xamarin and Mono founder Miguel de Icaza took RemObjects to task on Twitter. I was amused to see this in the changelog for April 2014:

 image

65764 Full support for Generics on Cocoa, as requested by Miguel

For more details on Fire, see here.

Review: Nuance Dragon Dictate 4 for the Mac

There is something liberating about working without a keyboard – and I do not mean stabbing hopefully at a touch screen. Voice control means you can sit back, easily refer to books or papers,  and input text more quickly and naturally than is possible using a keyboard. Some conditions including RSI (Repetitive Strain Injury) may make dictation a necessity. I use dictation for transcribing interviews and for rapid text input generally. I do not often use dictation for controlling a computer, as opposed to entering and editing text, but this is also a key feature.

image

Nuance has the best voice recognition system available as far as I can tell, though my experience is mainly with Nuance Dragon NaturallySpeaking on Windows. But what about Mac users? For them, Nuance provides Dragon Dictate, which has recently been updated to version 4. It is not a port of Dragon NaturallySpeaking, but rather has its own distinctive features, though it is less comprehensive, and a glance at the Nuance forums suggests that Mac users feel a bit neglected.

Does Dragon Dictate 4 change that? The good news is that the voice recognition engine in Dragon Dictate appears to be just as good as the one in Dragon naturally speaking. The accuracy is superb though you still have to be realistic. Some recognition problems are just very difficult and the software is bound to make mistakes especially in specialist fields – mine is programming and a specialist phrase like “JIT compiler” is bound to cause an error (Dragon thinks I want “Jet compiler”). Similarly, “pull request” became “full request”. Over time you can build up a custom vocabulary, but recognition will never be 100%, so a dictation system has to handle corrections as well as original input.

Setting up Dragon Dictate involves installing the software and then letting it create a profile and doing some training so that Dragon can learn the characteristics of your voice. I highly recommend using a good quality headset since without it we cannot expect accurate recognition. I found the setup process quick and painless and was soon up and running.

Dragon Dictate has five modes:

  • Dictation Mode is what you use most of the time.
  • Spelling Mode is for spelling out problematic words. You can speak the letters naturally or use the International Radio Alphabet (Alpha Bravo Charlie etc). It is a nice feature since if you know Dragon is likely to get something wrong, you can switch to Spelling Mode, enter the difficult word, and then go back to Dictation Mode.
  • Numbers Mode is for typing numbers.
  • Command Mode is for non-dictation commands. However, commands also work in Dictation Mode. The advantage of Command Mode is that Dragon will not misinterpret your commands as text input; but there is no way to configure Dictation Mode to prevent it interpreting speech intended as text as commands. The manual suggests that you use unnatural pauses for this. For example, if you are reviewing Dragon Dictate and want to type “Command Mode”, you can say “Command [pause] Mode” and get what you want.
  • Sleep Mode puts Dragon in a resting state, so for example you can take a telephone call without Dragon trying to transcribe it.

Switching mode is easy: just speak the mode you want. If Dragon is in Sleep Mode, you can say “Wake up”.

My initial experience with Dragon Dictate 4 was not too good. The problems were not with recognition but rather with navigating and correcting existing text, which I found harder than in Dragon NaturallySpeaking on Windows. In fact my attempts to make corrections all too often ended up with more and more errors as a correction went wrong and I would be trying to correct the correction, getting increasingly frustrated.

Using Microsoft Word 2011, I experienced unexpected behaviour. For example, if I put the cursor in between two words and dictated a word to insert, sometimes the word appeared elsewhere in the text.

Another odd thing: I dictated "for example", and Dragon recognised it as "one example”. No problem: Dragon has a Recognition Window which lists alternatives when you say “correct” followed by the word you want to amend. I said "correct one” and the recognition window appeared offering "for example" as one of the choices. I selected it, but Dragon then entered “for example example” in the text. I was not offered the word “for” on its own.

Dragon Dictate 4 was rescued from a terrible review when I studied the manual. Towards the end is a section entitled “The Cache and the Golden Rule”. This explains that you should not combine the use of keyboard and mouse with dictation when editing a document. If you do, Dragon gets confused about the contents of the document and you see unexpected results. You can fix this with a special command, “Cache Document”, which tells the software to clear and rebuild the cache for the entire document.

If you are not aware of this issue, then you are likely to make increasing use of keyboard and mouse as Dragon gets it wrong, making the issue worse. That is exactly what had happened to me.

Another key point is the difference between training and correcting. If you use the Recognition Window to make a change that is not in fact a recognition fault – such as changing “good” to “excellent” – then you will confuse the voice training. Rather, you should say “Select good”, to select the word you want to change, and then say “excellent” to overtype it.

After studying the manual, I got much better results, though Dragon Dictate still occasionally seems to have a mind of its own.

Nevertheless, this fussiness is a weakness in the software. The best software works the way you want it to, rather than making the user do things a certain way. Why cannot Dragon do its cache repairs automatically in the background?

Still, what Dragon offers is of high value, and in this case if you want the best results you have to do the homework.

There are a few others things to mention. Nuance offers a free app for the iPhone that lets you use it as a remote microphone. Personally I find a headset more convenient but I guess there are scenarios where this is useful.

There are also features in Dragon Dictate aimed at general system control. I tried the MouseGrid, which overlays a grid over the entire screen and lets you zoom into the area of interest for accurate mouse control. You can also move the mouse using Up, Down and so on under voice control, and perform single, double or triple clicks.

Conclusion? The software does not feel as complete or as polished as Dragon NaturallySpeaking, but the excellent voice recognition means that this is the best available for the Mac. Recommended, but with reservations.

Thirty years of mainly not the Mac

It’s Mac anniversary time: 30 years since the first Macintosh (with 128K RAM) in 1984 – January 24th according to Wikipedia; Apple’s beautiful timeline is rather sketchy when it comes to details like actual dates or specs.

My first personal computer though was a hand-me-down Commodore PET 4032 with only 32K of RAM, which pre-dated the Mac by about 4 years (though not by the time I got hold of it).

image

The PET was fun because it was small enough that you could learn almost everything there was to know about it though a book called The PET Revealed that listed every address and what it did. I had a word processor called Wordcraft that was excellent, provided you could live with only having one page in memory at a time; a spreadsheet called VisiCalc that was even better; and a database that was so bad that I forget its name. You could also play Space Invaders using a character-based screen; the missiles were double-dagger (ǂ)characters.

The small company that I was a little involved with at the time migrated to Macs almost as soon as they were available so I had some contact with them early on. The defining moment in my personal computer history though was when I needed to buy a new machine for a college course. What would it be?

If all the choices had cost the same, I would have purchased a Mac. My second choice, since this was a machine for work, would have been a PC clone. Both were expensive enough that I did not seriously consider them.

Instead, I bought a Jackintosh, sorry an Atari ST, with a mono 640 x 200 monitor and a second disk drive. It had the GEM graphical user interface, 512K RAM, a Motorola 68000 CPU, and built-in MIDI ports making it popular with musicians.

The ST exceeded expectations. Despite being mainly perceived as a games machine, there were some excellent applications. I settled on Protext and later That’s Write for word processing, Signum for desktop publishing, Logistix for spreadsheets, Superbase for database, the wonderful Notator for messing around with MIDI and music notation, and did some programming with GFA Basic and HiSoft C.

If I had had a Mac or PC, I would have benefited from a wider choice of business applications, but lost out on the gaming side (which I could not entirely resist). The ST had some quirks but most things could be achieved, and the effort was illuminating in the sense of learning how computers and software tick.

Despite the Mac-like UI of the Atari ST, my sense was that most Atari owners migrated to the PC, partly perhaps for cost reasons, and partly because of the PC’s culture of “do anything you want” which was more like that of the ST. The PC’s strength in business also made it a better choice in some areas, like database work.

I was also doing increasing amounts of IT journalism, and moving from ST Format to PC Format to Personal Computer World kept me mainly in the PC camp.

For many years though I have found it important to keep up with the Mac, as well as using it for testing, and have had a series of machines. I now have my desktop set up so I can switch easily between PC and Mac. I enjoy visiting it from time to time but I am not tempted to live there. It is no more productive for me than a PC, and Microsoft Office works better on a PC in my experience (no surprise) which is a factor. I miss some favourite utilities like Live Writer, dBpoweramp, and Foobar 2000.

That said, I recognise the advantages of the Mac for many users, in terms of usability, design, and fewer annoyances than Windows. Developers benefit from a UNIX-like operating system that works better with open source tools. There is still a price premium, but not to the extent there was when I picked an Atari ST instead.

Happy Anniversary Apple.

Hands on Cross-Platform Windows and Mac development with C++ Builder XE3

I have been writing about Embarcadero’s RAD Studio XE3, which includes Delphi and C++ Builder, and as part of the research I set this up for cross-platform development on a Mac.

My setup uses a Parallels Virtual Machine to run Windows 7, on which RAD Studio XE3 is installed. This is convenient for Mac development, since the IDE itself is Windows only. That said, if I were doing this in earnest I would use multiple displays or perhaps separate physical machines, since it is no fun debugging in a VM with the application running in another operating system behind it.

Is it straightforward to configure? Not too bad. You have to install Xcode on the Mac, and in addition, you have to install the Xcode command line tools, which you can do from Xcode itself, in Preferences – Downloads – Components, or as a separate download.

image

Then you need to find the Platform Assistant (paserver), an agent which runs on the Mac to support remote debugging. I was annoyed to find that this has a dependency on Java SE6, which to be fair it downloaded and installed automatically. Actually I find this amusing, after hearing from an Embarcadero VP how native code is all the rage and nobody uses managed code any more. Except Embarcadero for the paserver.

Once that is all up and running you are done on the Mac side. On Windows, you then need to sort out a remote profile, after having installed RAD Studio of course. The way to do this is first to start a new cross-platform project, which means using the FireMonkey framework. Then right-click TargetPlatforms in the project manager and add a platform. If you add OSX but no remote profile exists, you will be prompted to create one.

image

This is where something went slightly wrong. I created a profile and could connect OK. However, when I tried to build the project, I got an error: Unable to open include file ‘CoreFoundation/CoreFoundation.h’. You get this if for some reason the required library files have not been pulled over from the Mac. The fix is to edit the profile and click Update Local File Cache.

image

After that I was away. Set breakpoints if needed, build and debug.

image

Cross-platform is not new in RAD Studio; it was in XE2, and in some ways better, since you could target iOS as well as OSX. C++ Builder XE3 is actually a new generation though. In the 64-bit update 1, it is the first release to use Clang and LLVM, and from what I understand this represents the future for Embarcadero’s tools.

Updates are promised in 2013 for both Delphi and C++Builder – this roadmap is most of what we have to go on – which will add first iOS and later Android support, at what the company calls a “low cost”. Unlike the iOS support in XE2, the coming update will not use the Free Pascal compiler, but the new architecture based on LLVM. This also suggests that the add-on will replace some of the guts of Delphi when it arrives, so it will be significant and somewhat risky.

The cross-platform capabilities look good, though I am somewhat wary of FireMonkey which is less complete and mature than the Windows-only VCL. For example no Webbrowser component is supplied, which is a significant limitation, though I am sure there are ways of hacking this, perhaps through ChromiumEmbedded for which a Delphi FireMonkey exists.

It is worth a bit of effort, since Delphi and C++Builder are productive tools, and the output is true native code which still had advantages.

More information on RAD Studio XE3 is here.

Xamarin brings C# to development of apps for the Mac App Store

Xamarin has released Xamarin Mac which adds Mac support to the existing iOS and Android compilers from the company:

  • MonoTouch: apps for iPhone and iPad using the MonoDevelop IDE on the Mac
  • Mono for Android: apps for Android using either Visual Studio or MonoDevelop
  • Xamarin.Mac: apps for Mac OS X using MonoDevelop on the Mac

The major platforms missing from the above are Windows and Linux (unless you count Android), even though Mono began as a Linux implementation of Microsoft’s .NET platform.

Xamarin says that a Windows version is not necessary since you can use Microsoft’s tools to code in C# for Windows desktop and Windows phone.

You can also get Mono for Windows, Mac and Linux from the old Mono project site.

Why would you bother with paid-for Xamarin.Mac when you can get Mono for Mac as a free download? There is even a Mac packager which lets you create a standalone package for your Mono app. A good question, but I guess the answer is the benefit of Xamarin-specific libraries and support from the company. Xamarin has also done the work to ensure that you can distribute your app via the Mac App Store.

Xamarin.Mac costs $399 for personal use, or $999 for an enterprise license which allows internal as well as app store distribution. A one year, one seat license with priority support costs $2,499.

Xamarin knows how to charge then, and in the end that may be a key reason why the project is working, whereas Mono struggled as an open source project that never had the resources it deserved.

The Mono Project site now says that it is “sponsored by Xamarin” so open source developers are getting some benefit from the commercial offshoot.

Xamarin is important for the C# language, since it represents a viable implementation which is independent of Microsoft.

Which online storage service? SkyDrive is best value but lacks cool factor

This week both Microsoft and Google got their act together and released Dropbox-like applications for their online storage services, SkyDrive and Google Drive respectively.

Why has Dropbox been winning in this space? Fantastic convenience. Just save a file into the Dropbox folder on your PC or Mac, and it syncs everywhere, including iOS and Android mobiles. No official Windows Phone 7 client yet; but nothing is perfect.

Now both SkyDrive and the new Google Drive are equally convenient, though with variations in platform support. Apple iCloud is also worth a mention, since it syncs across iOS and Mac devices. So too is Box, though I doubt either Box or Dropbox enjoyed the recent launches from the big guys.

How do they compare? Here is a quick look at the pros and cons. First, pricing per month:

  Free 25GB 50GB
Apple iCloud 5GB $3.33 $8.33
Box 5GB $9.99 $19.99
Dropbox 2GB   $9.99
Google Drive 5GB $2.49 $4.99 (100GB)
Microsoft SkyDrive 7GB $0.83
(27GB)
$2.08
(52GB)

and then platform support:

  Web Android Black
berry
iOS Linux Mac Windows Windows
Phone
Apple iCloud X X X Limited X
Box X X
Dropbox X
Google Drive X X X
Microsoft SkyDrive X X X

Before you say it though, this is not really about price and it is hard to compare like with like – though it is obvious that SkyDrive wins on cost. Note also that existing SkyDrive users have a free upgrade to 25GB if they move quickly.

A few quick notes on the differences between these services:

Apple iCloud is not exposed as cloud storage as such. Rather, this is an API built into iOS and the latest OS X. Well behaved applications are expected to use storage in a way that supports the iCloud service. Apple’s service takes care of synchronisation across devices. Apple’s own apps such as iWork support iCloud. The advantage is that users barely need to think about it; synchronisation just happens – too much so for some tastes, since you may end up spraying your documents all over and trusting them to iCloud without realising it. As you might expect from Apple, cross-platform support is poor.

Box is the most expensive service, though it has a corporate focus that will appeal to businesses. For example, you can set expiration dates for shared content. Enterprise plans include Active Directory and LDAP support. There are numerous additional apps which use the Box service. With Box, as with Dropbox, there is an argument that since you are using a company dedicated to cross-platform online storage, you are less vulnerable to major changes in your service caused by a change of policy by one of the giants. Then again, will these specialists survive now that the big guns are all in?

Dropbox deserves credit for showing the others how to do it, Apple iCloud aside. Excellent integration on Mac and Windows, and excellent apps on the supported mobile platforms. It has attracted huge numbers of free users though, raising questions about its business model, and its security record is not the best. One of the problems for all these services is that even 2GB of data is actually a lot, unless you get into space-devouring things like multimedia files or system backups. This means that many will never pay to upgrade.

Google Drive presents as a folder in Windows and on the Mac, but it is as much an extension of Google Apps, the online office suite, as it is a storage service. This can introduce friction. Documents in Google Apps appear there, with extensions like .gdoc and .gsheet, and if you double-click them they open in your web browser. Offline editing is not supported. Still, you do not have to use Google Apps with Google Drive. Another issue is that Google may trawl your data to personalise your advertising and so on, which is uncomfortable – though when it comes to paid-for or educational services, Google says:

Note that there is no ad-related scanning or processing in Google Apps for Education or Business with ads disabled

Google Drive can be upgraded to 16TB, which is a factor if you want huge capacity online; but by this stage you should be looking at specialist services like Amazon S3 and others.

Microsoft SkyDrive is also to some extent an adjunct to its online applications. Save an Office 2010 document in SkyDrive, and you can edit it online using Office Web Apps. Office Web Apps have frustrations, but the advantage is that the document format is the same on the web as it is on the desktop, so you can also edit it freely offline. A snag with SkyDrive is lack of an Android client, other than the browser.

Conclusions

There are many more differences between these services than I have described. Simply though, if you use a particular platform or application such as Apple, Google Apps or Microsoft Office, it makes sense to choose the service that aligns with it. If you want generic storage and do not care who provides it, SkyDrive is best value and I am surprised this has not been more widely observed in reports on the new launches.

One of Microsoft’s problems is that is perceived as an old-model company wedded to the desktop, and lacks the cool factor associated with Apple, Google and more recent arrivals like Dropbox.

Cross-platform Windows and Mac lifts Delphi sales by 54%

Embarcadero has announced 54% growth in sales of Delphi and C++ Builder, its rapid application development tools, in 2011 vs 2010. These tools primarily target Windows, but in the 2011 XE2 edition also support Mac and iOS applications. XE2 also added a 64-bit compiler, making this the most significant Delphi release for years. The company says that the 2011 figures come on top of 15% year on year growth in the previous three years.

This is encouraging for Delphi developers, and well deserved in that Delphi still offers the most productive environment for native code development on Windows. The cross platform aspect is also interesting, though the FireMonkey framework which enables it is less mature than the old VCL, and there are many other options out there for cross-platform apps. FireMonkey does not yet support Android or other mobile platforms apart from Apple iOS.

2012 is also the year of Windows 8, raising the question of whether Delphi and C++ Builder will support the new Windows Runtime (WinRT) in future, and if it does, whether this will be FireMonkey only, or whether it could work with a XAML-defined user interface.

Why developers need a Mac

I am by no means an Apple fan. For one thing, I find Windows (and Linux) stable and fast, so you are not going to hear me argue that my computing life was transformed once I made that Switch (with a capital letter). Admittedly that is partly because I am familiar with how to fix and tune Windows and remove foistware, but it is not that hard. For another, I am not an admirer of Apple’s secretive approach, or the fact that most requests for comment from journalists are responded to with silence. For a third, I dislike the notion that all apps for its popular mobile platform must be distributed through the Apple store and subject to a fee, now extended to in-app upgrades and subscriptions as well as initial sales. There is also much that I admire about Apple’s platform, but I hope I have convinced you that I am not so bedazzled by the company that I am unable to think coherently about its products.

Nevertheless, I have run a Mac alongside Windows for years now, and I find myself needing it increasingly. Here are four reasons.

The first is that sooner or later you will need to build or test an app for the Mac or, more likely, for iOS. You can only do so using a Mac (leaving aside the exciting world of the hackintosh). This is because Apple only provides the iOS SDK and simulators for its own operating system.

As an aside, I recently spoke to Keith Varty who is evangelising Windows Phone development at Nokia. I asked about the issue of Visual Studio only running on Windows, was that an obstacle for developers using a Mac? He pointed out that it is the same in reverse with Apple, you need a Mac to develop for the iPhone. In fact, it is easier to develop for Windows using a Mac, thanks to the existence of excellent PC emulators, than it is to develop for a Mac using Windows. In any case, special rules apply for Apple.

Second, other than in the most closed internal environments, some of your users will have a Mac or at least an iPad or iPhone. A few years back both developers and system administrators could get away with a deliberate ignorance of Apple computers, saying they are “not supported” or “untested” or just “I have no idea.” That is no longer acceptable (if it ever was) and it is important to test apps on a Mac where that is appropriate, as with web or cross-platform Java or Adobe AIR applications, and more generally to get a feel for how things work on a Mac so that you can respond intelligently to users.

Third, in many areas of development Macs are now dominant. This means that Windows-only developers may be disadvantaged. Today, for example, I was researching Sencha products and came across this:

image

Yes, to get the preview developer tools for Sencha Touch 2, you need a Mac. No doubt Windows versions will follow, but there are times when you need a Mac just to keep up with the latest technology.

Fourth, and this is the most difficult point to make, it is valuable to spend some time on a Mac to avoid bad assumptions about usability. One example that comes to mind is version control. On Windows there is no problem using Git, or Subversion, or any number of systems including Microsoft’s Team Foundation Server installed either locally or on its own server. There is some setup involved though. On a Mac with the latest Xcode, you will find a checkbox in the new project wizard:

image

It is built-in. There is nothing more to do other than check this box. And yes, I know it is pretty easy to use Subversion or Git on Windows – though I would never describe a Team Foundation setup as trivial – but I am talking about the usability of a single checkbox. If you are thinking about the design of your own UI then spending some time on a Mac is though-provoking and likely to be beneficial.

By the way, some other parts of Xcode are less usable than Visual Studio so do not read too much into this example!

Another example which comes to mind is installing a web server. Windows has IIS, which is a good web server, and you can enable it on Windows 7 by going to Control Panel, Programs, Turn Windows Features on and off, and then waiting while the dialog populates, and then checking which bits of IIS you want to install:

image

Not difficult, though the intricacies of which Application Development Features you need may require some research. But here is how you set up Apache on a Mac. Go to System Preferences, and check Web Sharing. Apache is now up and running, and on my Mac Mini it started instantly:

image

I am sure there are many more examples, and even examples where Windows has better usability than then Mac (I miss the thumbnail previews in the task bar) but my point is this: it pays to have experience beyond Windows from which to evolve your own user interface ideas.

Post sponsored by Monster for the best in IT Jobs.

Review: JetBrains AppCode for Objective C

I have been trying out JetBrains AppCode, a new IDE for Apple’s Objective C. The company is best known for its IntelliJ IDE for Java, and AppCode essentially takes the same core IDE and reworks it for Objective C. AppCode is itself a Java application, but unless you have a religious objection to this I doubt you will find it a problem: I found it perfectly snappy and responsive on my machine, a 2.3 Ghz Core i5 with 8GB RAM.

Installation was a snap, as Mac users expect.

image

One thing I discovered immediately is that AppCode is not a replacement for Xcode, the official Apple IDE. The Apple SDKs are delivered with Xcode, and AppCode requires it. An AppCode project is also an Xcode project.

image

This is particularly important if you want to use Interface Builder, the Xcode visual designer, since AppCode has no equivalent. Double-click the .xib file and it opens in Xcode. This is a disorientating at first, but in practice I found it convenient to be able to switch between the two IDEs.

So why bother with AppCode, when Xcode is free? It is certainly not essential, but my view is that tools which save time or improve quality are worth the investment. Whether AppCode will do this for you will depend on how you work and whether you have any frustrations with Xcode, which improved considerably in version 4. Out of the box, Xcode has integrated Git or Subversion source code control, unit test integration, refactoring including Rename, Extract, and Encapsulate, the aforementioned Interface Builder, and a ton of other features. Sticking with Xcode is a safe choice.

That said, AppCode feels leaner and less cluttered than Xcode. It also has many additional productivity features in the editor. JetBrains’ IDEs are well known for refactoring, and while AppCode is not as rich as IntelliJ IDEA in this respect, it does have a more than Xcode.

Another strong feature is code generation. Press Command + n in the editor, and a context-sensitive Generate menu offers various time-saving options. I like the way I can type a new method in an implementation file, press Alt + Enter, and select Declare method in the interface to add it automatically to the interface file; or type it first in the interface and have it implemented automatically. It pays to learn the keyboard shortcuts

Live templates let you type an abbreviation and expand it to a block of code, which you then tab through to edit. Type for, select the template, press tab, and AppCode will create a for loop; press tab again to edit the variable name and the number of iterations. You can customise and create your own Live templates in the AppCode Preferences dialog.

image

There are also a ton of performance tools in AppCode [update: note these are links to Xcode tools].  Choose Profile from the Run menu and choose what you want to analyse:

image

then run your app

image

You can also do static analysis according to customisable rules.

There is a debugger which works as you would expect including stack trace and variable inspection.

The best thing I can say about AppCode is that it is a pleasure to use. It does not throw up unnecessary dialogs, it works logically, and the tools are easy to use and configure. I have not always found this to be the case with Xcode, and if you spend a significant amount of your time on Objective C development then I recommend grabbing the trial download to discover if it will speed your work.

Post sponsored by Monster for the best in IT Jobs.