OS/X Micro-tip: External display not recognized

June 30th 2010 · Mac Computer

I struggled to get a projector working with OS/X. This was entirely unexpected since I’d never had issues in the past. It always “just worked” in usual Apple fashion. I ran out of time and had to give up.

It continued to nag me, so I started digging further. And then the obvious problem hit me. I’m using Cody Krieger’s excellent gfxCardStatus utility. I had it set to force the use of the Intel GPU in order to conserve battery power. And that was the problem. OS/X requires the NVIDIA chipset in order to drive an external display. OS/X won’t use the Intel GPU to do that.

Setting gfxCardStatus to automatically switch got things working again.


iPhone sales trends, what's next?

June 28th 2010 · iPhone , Dev Trends

AppleInsider posted current and historical sales figures for the iPhone.

Year Amount Sold
2007 74 days to sell 1 million phones
2009 3 days to sell 1 million phones
2010 3 days to sell 1.7 million phones

You can’t really extrapolate, but that makes it likely the next phone will sell over 2 million in three days. That’s assuming, of course, that Apple can generate the same excitement for the next phone. Lack of supply almost certainly hurt those sales figures. Apple is notoriously conservative about demand and the result is choked supply at launch.

Another interesting figure is that 77% of pre-orders went to existing customers. That’s a great recurring revenue stream for Apple and speaks volumes about customer loyalty.

Personally though, I think the next phone is going to be a much harder sell. Every year there’s been some hardware feature I, personally, wanted to see. The iPhone 4 has fulfilled all of my wants. It’s completely replaced a GPS, camera and Flip HD. According to Apple, increasing the screen resolution would be pointless since no one would be able to tell the difference. What’s left for the next phone?

  • 4G / LTE
  • Faster CPU/multiple cores
  • Faster GPU
  • More memory
  • Better battery
  • Better camera
  • RFID

Out of that list, only the 4G and RFID would be completely new. I’m sure there’s more that Apple’s planning but I don’t know if there’s anything else that will really provide a “wow” feature. Haptic feedback built into the screen? Temperature sensor? :–)

Clearly there are still going to be improvements with the OS itself, but the remaining big button issues don’t require additional hardware. Right now it’s feeling like all of the low-hanging fruit have been eaten.


Micro-Tip: Using Subclipse on OS/X with Homebrew

June 21st 2010 · Java

If you install Eclipse on OS/X and then install the Subclipse plug-in, you might be surprised to see an error about missing JavaHL bindings for Subversion.

Subclipse uses the official Java to C bindings provided by the Subversion team. On OS/X these aren’t installed by default. If you use Homebrew to install open source software on OS/X (and I highly recommend it), then just installing Subversion won’t give them to you either.

So, to install Subversion using Homebrew and get the JavaHL bindings necessary for Subclipse, use this line:

brew install --universal --java subversion

This will create the 32 and 64 bit versions (—universal) and the JavaHL bindings (—java). So, regardless of whether you’re running Eclipse in 32-bit or 64-bit you should have the appropriate JavaHL bindings.

When Homebrew finishes building Subversion and the JavaHL bindings it will display this:

You may need to link the Java bindings into the Java Extensions folder:
  sudo ln -s /usr/local/lib/libsvnjavahl-1.dylib /Library/Java/Extensions

There’s no “you may” about it. Go ahead and run the sudo command. That will place the link to the JavaHL bindings in the OS/X Java extension library. Now Subclipse should automatically start working. You don’t even need to restart Eclipse if you had it running.


Mobile multi-tasking is different from traditional multi-tasking

June 16th 2010 · iPhone , Dev Trends

Some companies are switching from Blackberry devices to iOS 4 devices with the advent of multi-tasking on iOS 4. iOS 4 is not the first mobile OS to support multi-tasking. It’s the last.

The reason it’s the last, is because it’s designers wanted to avoid multi-tasking entirely. They were of the opinion that fast switching between apps was 95% of what users meant when they said “multi-tasking”. And to really give that extra touch, developers could write code to save the state of their apps and restore that state when the user started them up again.

The designers were mostly right. Many users never even noticed the lack of multi-tasking. That is until mobile apps gained more complex functionality. When that happened, GPS applications stopped working when you took a phone call. Pandora stopped playing. Skype stopped talking. Your app stopped syncing.

Let’s step back for a moment. Why don’t mobile phones just support traditional multi-tasking? They have in the past. You can do traditional multi-tasking on a Windows Mobile device and on a Blackberry. But the Android and Google phones don’t. What’s the problem?

The problem is two-fold: complexity and limited resources. Complexity arises from the fact that you have a much smaller visual space and simpler UI on a mobile device. Applications tend to take up the entire screen. There’s no easy way to indicate to the user that multiple applications are running. There’s no easy way to allow them to quit or control multiple applications. Users expect mobile devices to be simpler, easier and idiot-proof. They don’t want or expect them to work like little computers.

The second reason is limited resources. Everything that runs on the phone uses CPU time and memory. And everything that uses CPU uses battery power. If you write your applications perfectly then they will use very little of both. A well-written application will sleep between requests from the user. It won’t hit the network every few seconds. It won’t use every last byte of available memory. Unfortunately many apps won’t be well written, or they will need to hit the network or use every byte of memory to accomplish their tasks.

Given the limited resource problem, the Android developers decided to implement a new approach to multi-tasking. An Android developer doesn’t just get to leave their program running. They have to decide what, exactly, needs to run in the background. The answer for most applications is nothing.

The most common form of multi-tasking on the Android (and probably on iOS 4) is simply saving state. The Android OS provides first-class support in the operating system for application developers to write out the current state of their applications and load them back in when their app is resumed/restarted.

From the user’s perspective, it looks like the application is multi-tasking. When they switch away from an app and back again it looks exactly like it did when they left. The note they were writing is still in mid-paragraph, their solitaire hand is still in mid game. The OS will even try to keep the application in memory, making the switch back even faster. But if the application you switched to needs more memory, the old app gets booted out. The user won’t notice except that the switch back takes a little more time.

And that brings us to the less common form of multi-tasking. The ability to actually run in the background. This is for those apps that want to continue playing music, downloading twitter messages, etc. Android supports those types of apps by allowing them to register and run services. The entire application doesn’t run in the background, just a service thread. That background thread doesn’t get to interact with the user, it just gets to service a network connection, play music, etc. The result is far less memory pressure and, theoretically, less CPU usage.

iOS 4, despite Apple’s hyperbole, works almost exactly like Android. The OS now provides first class support for saving state like Android does. And for background apps, there are a few extra wrinkles and one major restriction. iOS 4 provides more “types” of service threads. You can register a music player and it will use the normal iTunes background music controls. You can register a GPS or VOIP app. Those are explicit types. The major restriction is that you can’t register a generic type. There’s no type for background network feeds. So background IM or Twitter isn’t supported.

Apple took this approach so that the OS was the one doing all of the heavy lifting. The hardest code to get right is the code that services the background functionality. With Apple’s approach, an iOS 4 developer only needs to write the guts of the service thread. They don’t get to decided when they are called. Apple thinks this covers 99% of the use cases and uses less resources then the generic Android approach.

That’s why not all of those companies with custom Blackberry or Windows Mobile apps can switch over to an iPhone. There’s still no generic multi-tasking capability, even in iOS 4. If you have a sales support app that expects to get live, continuous feeds, you won’t get that in iOS 4. You can get much closer with Android but Android doesn’t yet have the other enterprise support features that Blackberry and iOS 4 does.

This new approach to multi-tasking in mobile operating systems appears to be the future. Microsoft’s newest mobile OS looks to use the same mechanism. All modern mobile OS’s now use the service thread approach. The difference is in what they allow the service threads to do. My expectation is that iOS 4 will open up to allow more “types”, including a generic network service thread. And Microsoft’s model will probably look more like Android then iOS.


Comparison of iPhone 4 and HTC EVO

June 16th 2010 · iPhone

The iPhone 4 is openly announced so it’s a good time to compare the specifications of both phones. From the specs alone, the HTC EVO has everyone in the tech community salivating.

HTC EVO iPhone 4
Dimensions 4.8" x 2.6" x 0.5" 4.5" x 2.3" x 0.4"
Weight 6 oz 4.8 oz
Processor 1 GHz Snapdragon 800 MHz A4
Cellular 3G EVDO, 4G WiMAX 3G UMTS/HSDPA/HSUPA
peak 10 Mbps 4G peak 5.8 Mbps 3G
peak 3.1 Mbps 3G
WiFi 802.11g 802.11n
Location GPS, compass GPS, compass
Sensors Proximity, light, accelerometer Proximity, light, accelerometer, gyroscope
Storage 8 GB SD, up to 32 GB 16 GB or 32 GB
Memory 512 MB 512 MB
Display 4.3", 800 x 480 (220 ppi) 3.5", 960 x 640 (326 ppi)
Video Out 720p (HDMI) 576p and 480p
Rear Camera 8-megapixel with dual LED flash 5-megapixel with LED flash
Front Camera 1.3-megapixel VGA
Video 720p from rear camera 720p from rear camera
Battery 5hr talk (3G), ?hr data (wifi) 7hr talk (3G), 10hr data (wifi)
Removable battery Fixed battery
Extras Kickstand, FM radio Oleophobic coating

From a specs perspective the phones are pretty close. Where they differ it shows the different focus for Apple and HTC.

The Android phones are edging up in size, the EVO is 20% larger then the iPhone 4. The bigger screens are for media consumption. The EVO even has a kickstand so you can prop it up to watch a movie.

The EVO uses what Sprint calls 4G and the rest of the world calls 3G transitional. On the Sprint WiMAX network you can expect almost twice the speed of HSUPA. You’ll pay for that speed with sharply reduced battery life. When it comes to WiFi the iPhone 4 will outpace the EVO with 802.11n versus 802.11g.

You can add additional storage using the SD card slot on the EVO, something that just isn’t an option on the iPhone. The trade-off is slightly more complexity.

The screens show another sharp deviation. The iPhone 4 has a much higher pixel density but uses an IPS screen instead of the AMOLED screens that are all the rage in the Android space. AMOLED screens have a reputation for deep blacks and brilliant colors at the expense of viewability in direct sunlight. Apple went for the more traditional IPS route.

The cameras on both continue the separation. The HTC EVO went the megapixel route while the iPhone went with better low-light performance and lower pixel count. Both phones record 720p video and the iPhone LED will double as a continuous light.

The biggest difference between the two phones is battery life. Assuming Apple’s stated times are true (and they’ve been quite honest in the past), the iPhone 4 looks to have much better battery life then the EVO. Multiple reviews have stated that the EVO’s battery life is much shorter then expected. At best, it appears the iPhone has about 40% better battery life then the EVO. But since the EVO has a replaceable battery you could theoretically swap it out during the day.

The EVO also has an FM radio and the iPhone has an oleophobic screen to repel grease.

When it comes to features, Apple has been unusually aggressive in the iPhone 4. They aren’t known for pushing the envelope. But with the iPhone 4 Apple is coming very close to the most feature-full Android phone. Apple continues to focus more on what they consider to be quality features over raw numbers. They believe their 5 megapixel rear camera will take superior pictures to competitors 8 megapixel cameras.

Thanks to the shared lineage of the Snapdragon and A4 chipset you can expect performance to be comparable between phones. Android phones continue to provide more RAM then iOS devices though.

At the final tally, Apple is delivering a small powerhouse with a big battery life while EVO is delivering a feature-packed phone with potentially high wireless data speeds.


Sources:

  1. http://www.apple.com/iphone/specs.html
  2. http://newsreleases.sprint.com/phoenix.zhtml?c=127149&p=RssLanding&cat=news&id=1405106
  3. http://en.wikipedia.org/wiki/HTC_Evo_4G
  4. http://en.wikipedia.org/wiki/Iphone
  5. http://www.phonedog.com/2010/06/15/aaron-s-htc-evo-4g-review/
  6. http://www.macrumors.com/2010/06/17/iphone-4-confirmed-to-have-512mb-of-ram-twice-the-ipad-and-3gs/

SoapUI guys are releasing an open-source load testing tool

June 15th 2010 · Java , Dev Trends

att-1000

I just finished watching a video conference put on by eviware (pronounced ev-ee-ware, surprisingly to me). eviware are the guys who created soapUI. soapUI is a Java-based tool for interacting with, and testing, web services.

soapUI has long had support for basic load testing of web services, but eviware went and created a brand new tool for load testing, called loadUI. Not just load testing of web services, but load testing in general. They’re planning on releasing it on June 21st as an open source beta. Like soapUI it will probably have both a free and commercial (“pro”) version.

The tool looks pretty interesting. It doesn’t look like it will be any immediate danger to established tools like LoadRunner, but the feature set is already useful.

The UI is the first thing that strikes you. They wrote it in JavaFX and made it look like a patch panel. I don’t have a screen shot yet of the application, but here’s a shot from the Yahoo Pipes application which has a similar UI paradigm.

att-1001

You drag and drop components onto the project canvas and connect them with wires. They have components to generate load, process statistics, etc. You also drag and drop testing servers. So you can drag new test generators to new servers. What’s especially cool is that it’s all live. During a load test you can add or subtract servers, components, etc. The result is the ability to fine tune your test and then save it for later, repeatable, runs.

They said in the video conference that loadUI can be extended by creating your own components.

The application will work anywhere that JavaFX does but there are issues with the Mac implementation. I have no idea if there are issues with the Linux implementation as well. It appears that Windows is the primary development platform for eviware so it should run well there.

I’ll take a look at loadUI once it’s released and see how useful it is. If nothing else, given its free version, it should be the go-to tool for lightweight load testing. It’s definitely an improvement on ab (Apache Bench).

<< Previous articles
Next articles >>