Ted Wise header image 1

What people want in iPhone OS 4.0

January 11th, 2010 · iPhone

TUAW solicited email requests from its readers asking for what they wanted to see in OS 4.0.  Excluding changes to the built-in apps (that's coming in a later article), this is what people asked for, along with my own comments.

1. The lock screen needs to change.

Absolutely agreed. I want better handling of notifications. Best case, a hardware indicator light that shows new email has arrived, ala Blackberry and Nexus One.

2. A new home screen.

Don't care about this one. It would be nice but its not a hot button issue for me.

3. Vertical swipe home screen.

No. I don't want this.

4. Overhaul app navigation.

Don't really care about this one either. Again, improvements would be nice but not really all that important to me.

5. Multi-tasking.

I would love this. In my email to TUAW I suggested a special path for app approval that granted apps the right to run in the background. Those apps would have to go through extended testing by Apple that validated their efficiency.

6. Flash.

God no. Flash needs to die on mobile. We need to push HTML5 as hard as possible.

7. Selectively turn off landscape mode.

Don't care. This rarely bothers me.

8. Apps should remember where we were. The OS should handle this.

No. This would require the OS to freeze an app and resume it. I'm not interested in the overhead required to do that. Apps should continue to do this on their own.

9. Remove Apple apps

Don't care.

10. All-app accessible documents folder

I would like something along these lines but I rarely miss it now.

11. Better support for codecs

Nice but I rarely miss it.

12. Disk mode

I could care less about this.

So what did I, personally, ask for?

1. Multi-tasking

2. Better notification support

The current one-shot notification display isn't sufficient. It was designed when emails and the occasional text message were all you could get. That's not the case any more.

3. Better lock screen

So my list was covered. My bigger points were hardware, something not covered by the TUAW list.

1. Higher-resolution screen to match the Droid

2. Better GPS chipset to match dedicated GPS units

3. Better GSM chipset to provide better voice quality and support for CDMA

4. Hardware message/notification indicator

And, I would add a better camera and flash unit.

But, overall, I'm still extremely happy with the device.

View Comments

The Google Phone

December 17th, 2009 · iPhone

There've been reports lately about the new Nexus One phone from Google. It appears to be a phone directly controlled by Google. Past Android phones have been produced in the traditional way, by having hardware vendors create the phones and then sell them to mobile operators. Google appears to be taking the Apple approach with the Nexus One phone.

Here's the problem with the traditional model, and the reason Apple took a different approach with the iPhone - fragmentation.

Every Android device sold today has a different form factor. The quality of the hardware differs. The operating system version differs. Some new Android devices have recent OS releases, some don't. Each handset maker tailors the OS to their hardware. Each mobile operator adds their own elements to the phones as well. The result is that OS updates have to come from the mobile operators. And they have been very, very slow to make those updates. Some are likely to never significantly update the phones at all.

So to sell software for the Android you have to target multiple OS versions. And there are significant functionality differences between versions. Google Navigator, the new GPS driving application from Google, won't run on all Android handsets, because of this exact problem. In comparison, iPhone OS releases get very fast version uptake - and, as a developer, you know that users can upgrade if they need to.

Google appears to be recognizing that the traditional model doesn't work well when you're trying to drive innovation through software. The bulk of your new functionality will only be available to people buying handsets with the new OS releases. Hence the Nexus One.

The big question now is what their plans are for it. Is it simply a reference model? I would guess not. Are they going to sell it as an unlocked phone for $600? I would guess not again. But there my guesses end. I don't know whether they'll sell the model through the mobile operators, or sell them as subsidized phones outside of the mobile operator network. If they sell them through the mobile operators they'll be emulating the iPhone. They'll also be screwing over all of the current Android handset makers (except for HTC, who make the Nexus One for Google). But if they directly subsidize them, they'll have to create a model for that - supported by ads or some other cost-reducing option.

At the moment, Android is just a Symbian/Windows Mobile competitor. If the Nexus One approach takes off, it could become a true iPhone competitor.

View Comments

Polarizing Ideas

December 14th, 2009 · Computing

There's a recurring theme in computing - that every new idea is polarizing. A change in viewpoint and approach is regarded as a silver bullet by one group and as a minor tweak by another.

Neither viewpoint is correct. By way of example, object-oriented design was looked at as the savior of programming by some and as "just a function lookup table" by others.

I was reminded of this fact recently when an internal discussion started about comments Larry Ellison made around cloud computing. Larry stated that "the cloud" is vapor, just a computer attached to a network and delivering applications. Larry's a example of the group that sees ideas a minor tweaks.

This is very common to people with an engineering mindset. When presented with an idea, they see it in terms of the implementation. And the implementations are rarely earth shattering. They tend to be variations of what already exists. From that perspective, a cloud is nothing more then a tweak to existing practices.

But cloud computing is a sea change. It's adding a layer between the physical and the functional. That layer provides flexibility and convenience. Is it a silver bullet that will revolutionize computing? No.

And that's the trick in computing. Don't be quick to dismiss and don't buy the hype.

There's a recurring theme in computing - that every new idea is polarizing.  A change in viewpoint and approach is regarded as a silver bullet by one group and as a minor tweak by another.
Neither viewpoint is correct.  By way of example, object-oriented design was looked at as the savior of programming by some and as "just a function lookup table" by others.
I was reminded of this fact recently when an internal discussion started about comments Larry Ellison made around cloud computing (http://blogs.channelinsider.com/cloud_computing/content/business_models/larry_on_cloud_computing.html).  Larry stated that "the cloud" is vapor, just a computer attached to a network and delivering applications.  Larry's a example of the group that sees ideas a minor tweaks.
This is very common to people with an engineering mindset.  When presented with an idea, they see it in terms of the implementation.  And the implementations are rarely earth shattering.  They tend to be variations of what already exists.  From that perspective, a cloud is nothing more then a tweak to existing practices.
But cloud computing is a sea change.  It's adding a layer between the physical and the functional.  That layer provides flexibility and convenience.  Is it a silver bullet that will revolutionize computing?  No.
And that's the trick in computing.  Don't be quick to dismiss and don't buy the hype.

View Comments

Google Chrome OS

November 19th, 2009 · Web

Google just held a press conference on their Chrome OS.  It was information packed.  Here's a dump of what they talked about.

Google Chrome OS Webcast

Overview

  • Still a year away from release.
  • Source code released today (http://src.chromium.org/). Development will be public.
  • Google Chrome is the foundation of Google OS.
  • Chrome has 40 million "primary" users, people who have Chrome as their primary browser.
  • Chrome for Linux is the foundation of Chrome OS.
  • Chrome OS is based around HTML5 (graphics, threads, database storage, etc.).
  • Chrome OS is a response to "perfect storm of converging trends", rise of the netbook, growth of the cloud and always-on devices (netbooks with 3G and smart phones).
  • Chrome OS is a "better model" to meet this changing environment. It's speed, simplicity and security.
  • Chrome OS needs to be very fast - starts fast and runs fast.

The Applications

  • Everything in Chrome OS is a web application. Users don't install software or update it.
  • Chrome OS is a browser with modifications.
  • All data in Chrome OS is in the cloud. Users should be able to just swap machines.
  • Security is built in from the ground up. Everything runs inside the browser security model.
  • Chrome OS already cold boots in 7 seconds - intention is to reduce that more.
  • Chrome OS intentionally looks like a browser.
  • Applications can be pinned to tabs.
  • There's a dedicated tab that has a menu of applications.
  • Some applications can run in "panels", small windows - media player and chat are examples.
  • All data is in the cloud. Editing text files is editing them in the cloud.
  • Apps can go full screen.
  • Can have multiple Chrome "windows", groups of tabs. There's an Exposé-like mode to move tabs between windows.
  • All public web apps can be used as applications in Chrome OS. Demo was opening up an Excel file with Microsoft's Live web app.
  • Everything that works in Chrome works in Chrome OS. That includes Flash and video/audio codecs.

The Kernel

  • Chrome OS should feel more like a TV then a computer. Everything should just work.
  • Local storage is flash. No hard drives.
  • Going with the "Apple model". They're tailoring the OS to the hardware and throwing out legacy hardware. No BIOS.
  • Everything has cryptographic signatures to ensure nothing has been tampered with.
  • Conventional security model is that applications run with the same privileges and power as you. Chrome OS uses the browser model. Applications aren't trusted.
  • Extends Chrome browser sandbox model further. Known programs are further isolated.
  • File system is locked down. Read-only root file system. Data encryption. Data synced to the cloud.
  • All user data is encrypted.
  • Machines are interchangeable since all data is synced. A new machine will look just like your old one after it is synced with the cloud. Data can be cached on the device.
  • Incorporated code from Linux, Ubuntu, Moblin, WebKit and others.
  • Will run on x86 and ARM.
  • Will support printers and printing.

Intentions

  • Chrome OS is being designed against reference hardware.
  • Google is working with OEMs to create Chrome OS devices. Chrome OS isn't designed for existing devices. To get Chrome OS you'll have to buy a Chrome OS device.
  • Pushing code back upstream to open source projects that are being used by Chrome OS.
  • To develop Chrome OS you'll need one of a short list of existing netbooks (demo was on EEE PC). You can also run it in a VM.
  • They made a very high-level video to explain the vision and concepts (http://www.youtube.com/watch?v=0QRO3gKj3qw).
  • Google wants the devices to have full-size keyboards.
  • Working with w3c to standardize as much as they can.
  • Initial expectation is that the device will be a second, "companion", device.
  • Codecs will be hardware accelerated.
  • Improvements in Chrome OS will also make their way to Chrome.
  • Certain, "select", plug-ins will be incorporated into Chrome OS, e.g., Flash (and maybe Silverlight).

Comments

  • You don't really have overlapping windows. Panels are the only thing that overlap and they overlap the Chrome window.
  • "System software" will probably be Chrome extensions, JavaScript (and HTML) that has access to functions that aren't accessible by applications.
  • This has been a long time coming. It's what Google has been moving toward for a while. The more people on the net, the more ads they see, the more money Google makes.

Lots more information here - http://www.chromium.org/chromium-os

View Comments

New iMac is a monster – and that’s good for laptops

November 17th, 2009 · Mac

The newest iMacs are available with Core i5 and Core i7 CPUs and early benchmarks are in. Intel is phasing out the Core 2 Duo chips in favor of the i5 and i7 lines.

In general, the i5 is a single CPU with 4 cores inside it - compared to the Core 2 Duo with 2 cores. The i7 is a single CPU with 4 cores plus hyper-threading. Hyper-threading lets you run two threads simultaneously on each core. So an i5 can run four threads and an i7 can run eight threads simultaneously.

Both the i5 and i7 are able to be used as mobile processors. I sent an email out a while back about a laptop with an i7 inside it.

The CPU benchmarks for the i7 iMac puts it in the same ballpark as the Intel Xeon processors, which are very fast CPUs not suitable for mobile uses. The i5 is about 50% faster then a Core 2 Duo - and that's with the i5 running at a _lower_ speed. An i7 running at a faster speed then the i5 (but still slower then the Core 2 Duo) is almost twice as fast as a Core 2 Duo.

This puts an i7 iMac in desktop workstation territory - suitable for rendering and professional video processing.

This is all very exciting for geeks, but especially for mobile ones. As the i7 migrates into laptops, the only sticking point left in mobile performance for developers and consultants will be hard drives. Laptop hard drives perform much worse then desktop equivalents. But SSDs (flash-memory hard drives) perform equally well in mobile or desktop platforms. With an i7 and an SSD, a laptop would perform equally well to a desktop in all but one category - graphics.

And even there it's a pretty good story. Mobile graphics have come a long way. Thanks to the competition between Nvidia and ATI (AMD) and the fact that the market has swung to selling more laptops then desktops, the mobile graphics chips have gotten very good.

It used to be easy to buy a desktop that would outperform a laptop. That's changing. In the future you'll have to buy workstation class desktops in order to exceed laptop performance. And that's good for mobile consultants.

View Comments

Automating the creation of WordPress Pages

November 11th, 2009 · General, Ruby

I put together a list of OS/X processes in a spreadsheet and wrote a short script to turn that into HTML. My intention was to update the spreadsheet whenever I found new information and then automatically update the blog. My small script was only useful to create HTML to manually place on a blog page. And the spreadsheet had more information then I could reasonably display in a simple table.

What I really wanted was to create a page per process. Luckily, WordPress was built with XML-RPC interfaces that could solve this problem.

The resulting script works by first generating and setting the contents of the main process page. The page was initially created before the script was run. After the main process page is updated, the script then starts creating a page for each individual process. If a process page already exists, then the page's contents are updated.

First, we setup the XML-RPC client:

 
blog = XMLRPC::Client.new3(:host => "tedwise.com", :path => "/xmlrpc.php")
 

Then we pull down a list of all the pages:

 
pages = blog.call("wp.getPages", 1, USERID, PASSWORD, 1000)
 

The wp.getPages call only returns a maximum of 10 pages. The WordPress documentation doesn't mention it, but the wp.getPages call takes an optional third parameter that raises that maximum. In the above example, I raise the maximum to 1000. The 'pages' object holds the full description of all the pages in the WordPress blog.

I locate the main page with a simple bit of Ruby:

 
page = pages.find {|p| p['title'] == 'OS/X Processes'}
 

Then generate the contents of the page from the spreadsheet CSV file and update the page.

 
blog.call("wp.editPage", 0, page['page_id'], USERID, PASSWORD, {:wp_page_parent_id => page['wp_page_parent_id'], :wp_slug => page['wp_slug'], :title => page['title'], :description => content, :categories => page['categories'], :mt_allow_comments => 0, :mt_allow_pings => 0}, true)
 

Most of the parameters to the wp.editPage call come from the information pulled down from WordPress in the wp.getPages call.

Each process entry in the spreadsheet is checked against the list of pre-existing pages. If the page doesn't exist, we generate a WordPress slug:

 
def slugify(title)
  title.downcase.gsub(/[ ._]/, '-')
end
 

After the slug is generated, we create the WordPress page.

 
blog.call("wp.newPage", 0, USERID, PASSWORD, {:wp_page_parent_id => parent_id, :wp_slug => slug, :title => title, :description => content, :categories => ["Mac"], :mt_allow_comments => 0, :mt_allow_pings => 0}, true)
 

If the page does exist, it gets updated using the same call as the main page. The whole script is available here.

View Comments

Simple guide to Maven

November 9th, 2009 · Java

I resisted Maven for a very long time. It seemed to be extremely complex for no great benefit. I thoroughly understood Ant and had built extensive and complex scripts that worked quite well.

But, eventually, I saw the light. I saw how trivial it made the majority of builds. I saw how it integrated with IDEs and Continuous Integration servers. And how all of those tasks I’d built in Ant were no longer necessary. But I also realized that Maven was still a mystery to many developers and that the vast majority of the documentation I found was preaching to the choir. So, I decided to provide a very basic guide to Maven.

Maven builds are controlled by Project Object Model (POM) files. POM files, unlike Ant scripts, describe the project. A POM file doesn’t have code or task steps, it just describes the structure of the project. It’s up to Maven to take that description and use it to build the project.

Maven makes a lot of assumptions. Just about the simplest POM file you could have might look like this:

 
<project>
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.mycompany</groupId>
    <artifactId>my-project</artifactId>
    <version>1.0-SNAPSHOT</version>
</project>
 

This little file would compile Java code, copy resources, generate a documentation web site and assemble a JAR file. What does it say exactly?

  • modelVersion - The Maven POM version number. It’s the version number of the POM specification
  • groupId - The project’s organizational group
  • artifactId - The name of the artifact the project creates
  • version - The version number of the artifact created

Maven manages dependencies between projects. If your project needs a jar file like Log4J, you’ll add that dependency to your POM file and Maven will automatically fetch that jar file and make it available when the code is compiled.

That dependency tracking works for your own project components as well. That’s why Maven needs you to define component names that are globally unique. So, in our above example, the final JAR file for our project would be ‘my-project.jar’ but it would be registered with Maven as com.mycompany.my-project.

The version number means something to Maven as well. Maven tracks multiple versions of each component. So if you need Log4J version 1.2, you ask for it explicitly.

When your own code is compiled and stored by Maven, it also has to have a version number. Version numbers with ‘SNAPSHOT’ in them are special. They’re “work-in-progress” code. Maven breaks components into ‘releases’ and ‘snapshots’. It won’t allow you to store components that have snapshot version numbers as releases.

How does Maven know how to build your code from just that little project file? It makes even more assumptions. It assumes that your project directory structure looks like this:

/src
  /main
    /java - All your Java source files, e.g., /com/mycompany/Main.java
    /resources - Resource files that need to end up in the project JAR
    /webapp - Web files if you’re building a WAR
  /test
    /java - All your test Java source files
    /resources - Resource files needed for testing
/target - Everything generated by the build, include the JAR/WAR file

There are additional directories. All of them together are known as the Standard Directory Layout.

If your source code follows that directory structure, then Maven will know how to compile it, unit test it and package it. If it doesn’t, then you’ll have to tell Maven how your directory structure differs.

Let’s say that your project stores Java source code in ‘/src/java’ and puts the Java unit test code in ‘/src/test’. Then your POM file would look like this:

 
<project>
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.mycompany</groupId>
    <artifactId>my-project</artifactId>
    <version>1.0-SNAPSHOT</version>
 
    <build>
        <sourceDirectory>src/java</sourceDirectory>
        <testSourceDirectory>src/test</testSourceDirectory>
    </build>
</project>
 

With just these few elements, Maven supports many “goals”. These goals are akin to Ant tasks and describe what you want Maven to do. Some common goals:

  • clean - remove any old build files
  • compile - compile the code
  • test - compile the code and run the unit tests
  • package - compile and test the code and create any build products
  • site - generate site documentation

Maven components are stored in repositories. You can define as many repositories as you like, but you can’t install your own JAR files or other build products in the default Maven repositories. You have to create and host your own.

Each developer also has their own “local” repository. The local repository is just a set of directories on each developer’s machine (located under ‘.m2’ in the user’s home directory). When Maven downloads components from repositories they are stored locally. Developers can also install components directly into the local repository.

When you start adding dependencies to your POM files, Maven will attempt to locate them in one of it’s repositories and then download them to the local repository.

Let’s look at a POM file with a dependency.

 
<project>
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.mycompany</groupId>
    <artifactId>my-project</artifactId>
    <version>1.0-SNAPSHOT</version>
 
    <dependencies>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.13</version>
        </dependency>
    </dependencies>
</project>
 

This POM file will cause Maven to download the Log4J 1.2.13 component and make it available on the classpath while compiling the code. If you were creating a WAR file, EAR file, etc. it would also copy the jar file into the ‘lib’ directory of the final package. You can add as many dependencies as you like and, optionally, give them a scope. The scope tells Maven whether the dependency is only necessary when testing the code or only necessary to compile but not for packaging.

When you’re working in a team, you need to be able to share your custom components between team members. That’s when you setup a private repository. The easiest way is to install Sonatype Nexus, an open source repository. After it’s installed, you define which public repositories you want to use then and create a ‘release’ and a ‘snapshot’ repository.

Once you’ve created your private repositories, each developer will edit their Maven settings file (.m2/settings.xml):

 
<?xml version=“1.0encoding=“UTF-8?>
<settings>
  <mirrors>
    <mirror>
      <id>nexus-public-snapshots</id>
      <name>Nexus Public Snapshots Mirror</name>
      <mirrorOf>public-snapshots</mirrorOf>
      <url>http://maven.mycompany.com:8081/nexus/content/groups/public-snapshots</url>
    </mirror>
    <mirror>
      <id>nexus</id>
      <name>Nexus Public Mirror</name>
      <mirrorOf>*</mirrorOf>
      <url>http://maven.mycompany.com:8081/nexus/content/groups/public</url>
    </mirror>
  </mirrors>
</settings>
 

Now, Maven will always look in your private repository for components. Your private repository should include “proxies” for any public Maven repositories you want to use.

Once this is done, you can tell Maven to automatically install built components into your private repository when you execute the ‘deploy’ goal. You tell Maven where the components should go with ‘distributionManagement’ definitions.

 
<project>
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.mycompany</groupId>
    <artifactId>my-project</artifactId>
    <version>1.0-SNAPSHOT</version>
 
    <dependencies>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.13</version>
        </dependency>
    </dependencies>
 
    <distributionManagement>
      <repository>
        <id>releases</id>
        <name>Internal Releases</name>
        <url>http://maven.mycompany.com:8081/nexus/content/repositories/releases</url>
      </repository>
      <snapshotRepository>
        <id>snapshots</id>
        <name>Internal Snapshots</name>
        <url>http://maven.mycompany.com:8081/nexus/content/repositories/snapshots</url>
      </snapshotRepository>
    </distributionManagement>
</project>
 

Maven will automatically choose between the ‘release’ and ‘snapshot’ repository based on the project version number.

There are many additional features and functions built-in to Maven. But Maven is also extensible. It will download components “on-the-fly” as you reference them in your POM files. Maven plug-ins are used for everything from deciding which Java language-level to use, to whether Javadocs should be generated.

 
<project>
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.mycompany</groupId>
    <artifactId>my-project</artifactId>
    <version>1.0-SNAPSHOT</version>
 
    <build>
<plugins>
<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.5</source>
                    <target>1.5</target>
                </configuration>
            </plugin>
        </plugins>
    </build>
 
    <reporting>
<plugins>
<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.5</version>
            </plugin>
        </plugins>
    </reporting>
</project>
 

In the above POM file, a ‘build’ plug-in describes the source and target Java language level for the project. A ‘reporting’ plug-in adds Javadoc generation. ‘Build’ plug-ins modify the compile and package phases. ‘Reporting’ plug-ins modify the output generated by the ‘site’ goal.

Once you understand all of the basic concepts of Maven and how they are used, it becomes much simpler to use the Maven documentation and to locate pre-existing Maven components. The easiest way to find dependencies is to search for them on MVNrepository. Once you find the appropriate one you can choose from the list of available versions and it will display the section to include in your POM file:

 
<dependency><groupId>log4j</groupId><artifactId>log4j</artifactId><version>1.2.15</version></dependency>
 

And now when you look at the Maven plug-ins, the documentation will make much more sense.

View Comments

Putting things in perspective

November 6th, 2009 · Computing

The hot technical topic is alternative operating systems. But, with the release of Windows 7, let's put things into perspective.

Here are the estimated Worldwide OS usage figures for October 2009:

  • 70.48 - Windows XP
  • 18.83 - Windows Vista
  • 2.82 - OS/X 10.5
  • 2.15 - Windows 7
  • 1.17 - OS/X 10.6
  • 0.96 - Linux (all versions)
  • 0.93 - OS/X 10.4
  • 0.78 - Windows 2000
  • 0.26 - Mac/OS/X version unknown
  • 0.11 - Windows 98
  • 0.10 - Windows NT
  • 0.06 - Windows ME

or

  • 92.51 - Windows (all versions)
  • 5.18 - OS/X/Mac (all versions)
  • 0.96 - Linux (all versions)

Even those lists are visually misleading. There's a giant percentage cliff between Windows and OS/X. Let's look at this another way, Windows 7 has already outsold OS/X Snow Leopard (10.6) at 2 to 1.

Windows has 18 times the market share of the Mac and 96 times the market share of Linux.

And while Windows market share _is_ decreasing (even after the Windows 7 release), it's decrease is very, very, very small. 0.25% in October. One quarter of one percentage point.

It's not all peaches and cream. If you're looking for further data in the above list, look no further then the very first item - Windows XP at 70.48%. XP owns the world market. But it isn't directly upgradeable to Windows 7. That's the nasty fly in the Microsoft ointment right now. The vast majority of those XP users are never, ever, ever going to proactively upgrade to Windows 7. XP will decrease mainly by attrition as new computers replace old ones. In comparison, one fifth of all Mac users are already on Snow Leopard.

But this isn't a giant, gaping market hole for Microsoft's competition. Because nobody is around who can take advantage of it. Apple doesn't care about market share. They don't want the Windows XP crowd and they really, really don't want the Windows 98 crowd. And those attrition people are never going to intentionally look at Linux.

Where the real problem for Microsoft lies, is in the transition to "non-traditional" computing devices. Netbooks and smart phones. Thanks to the web, consumers see very little downside to changing computing paradigms for the gain in mobility.

But even there, that's still a 92.5% market share.

(Statistics come from http://arstechnica.com/microsoft/news/2009/11/october-2009-os-stats-windows-7-passes-snow-leopard-linux-1.ars)

View Comments

Windows and OS/X steal from each other

October 12th, 2009 · Mac

Well, that's no big surprise. Here's two Infoworld slide shows that attempts to show the top 10 items each stole from the other. They got some things wrong though.

http://www.infoworld.com/d/windows/top-10-features-apple-stole-windows-966?source=fssr

http://www.infoworld.com/d/mac/top-10-features-microsoft-stole-mac-os-x-971?source=fssr

What OS/X stole from Windows

  1. Finder sidebar - stolen from the Explorer navigation pane. Yep.
  2. Finder breadcrumb path display - stolen from the Explorer address bar. Probably.
  3. Finder back and forward buttons - stolen from Explorer. Probably.
  4. Dock minimize app windows to icon - stolen from Taskbar. Yep.
  5. Screen sharing - stolen from Remote Desktop Connection. Yes, indirectly. Screen sharing is based on the open source VNC. But VNC was developed after Microsoft released RDP.
  6. Time Machine - stolen from Microsoft backup. No. The two are so different you can't say Apple lifted it from Microsoft.
  7. System preferences - stolen from control panel. No. The original Mac OS put all of the system preference items in a folder. That folder looked very much like both system preferences and the Windows control panel.
  8. ActiveSync - stolen from Outlook. No. I think its disingenuous to include licensed technology.
  9. Command-tab - stolen from Windows command-tab. Yes. Very much yes. It's a true copy-cat.
  10. Terminal - stolen from the command prompt. Oh hell no. OS/X is a variant of Unix, which live and die by the terminal window. Windows had nothing to do with the Terminal.

What Windows stole from OS/X

  1. Windows 7 taskbar - stolen from the Dock. Yep.
  2. Jump lists - stolen from Dock menus. No. They're not the same thing.
  3. Aero Peek - stolen from Exposé. Yep.
  4. File preview - stolen from the Finder. Yep.
  5. Screen sharing - I think this is a mistake in the article.
  6. Sticky notes - stolen from Stickies. Yep.
  7. Saved searched - stolen from Finder smart folders. Yep.
  8. Network shared in sidebar - stolen from Finder. Not sure.
  9. RSS reader in the browser - stolen from Safari. Not sure.
  10. Disk burner - stolen from Disk Utility. Not really. Disk Utility is a general purpose tool. The burning functions are in the Finder and in Disk Utility.

The real lesson here is that both operating systems "steal" from each other. They stand on the shoulders of the operating systems that came before them and learn from each other.

View Comments

Compiling Ruby with MacRuby 0.5b1

October 8th, 2009 · Mac, Ruby

MacRuby 0.5 beta 1 is out and can be downloaded from here.  The beta can only be used on Snow Leopard, which means its Intel-only.  They switched from using YARV as the internal engine to using LLVM.  The major side effect of this change is that Ruby code can now be compiled.

Compilation is still pretty rough though.  Many simple programs won't work, so at this point it's more of an example then a useful tool.

In order to get MacRuby to compile code, you need to have LLVM installed.  It doesn't come as part of the MacRuby 0.5b1 download.  I found directions at the Hatena::Diary blog.  They're in Japanese.  I don't speak the language and Google Translate butchers it, so I'm recreating it here with some additional notes.

The first thing to do is to download and install MacRuby.  It's a zip file containing an OS/X install package.  The package installs the MacRuby binaries to /usr/local/bin.  Make sure it's in your PATH.  All of the usual Ruby suspects are here, prefaced with 'mac'.  So you have 'macruby', 'macgem', 'macirb', etc.

After you install it, you can run pretty much any Ruby program with macruby.  This is still very much a work in progress, so don't be surprised when a program doesn't run or doesn't run correctly.

You use the 'macrubyc' command to compile code.  But if you try to run it now, you'll get an error saying that it can't find 'llc'.  That's because you don't have LLVM installed.  And you need a very current copy.

Here's where Hatena's directions come into play.

$ svn co -r 82747 https://llvm.org/svn/llvm-project/llvm/trunk llvm-trunk
$ cd llvm-trunk
$ ./configure --prefix ~/opt
$ UNIVERSAL=1 UNIVERSAL_ARCH="i386 x86_64" ENABLE_OPTIMIZED=1 make -j2
$ UNIVERSAL=1 UNIVERSAL_ARCH="i386 x86_64" ENABLE_OPTIMIZED=1 make install

The 'svn' command will checkout revision 82747 of LLVM into the directory 'llvm-trunk'. Make sure you're in the directory you want the source checked out into when you run it.

The next two commands go down into the source code directory and set it up to install in an 'opt' directory under your home, e.g., '/Users/ctwise/opt'.  This keeps the LLVM install local and won't conflict with any later system-wide installs.  If you want LLVM installed to the same location as macruby then use the command './configure --prefix /usr/local'.

The fourth command compiles LLVM.  It's setup to run two compiles simultaneously.  If you're using a tool that monitors CPU load, you'll see both CPUs pegged.  This compile step takes a long time.

The last command installs LLVM into the location you specified.  If you want LLVM installed to '/usr/local', then you'll need to change the install command slightly to use sudo.

$ sudo env UNIVERSAL=1 UNIVERSAL_ARCH="i386 x86_64" ENABLE_OPTIMIZED=1 make install

Once you add '~/opt/bin' to your PATH, you can start compiling Ruby.

This small test program compiles and runs fine.

 
puts "Hello, World!"
 
'abc'.each_char do |str|
  puts str.upcase
end
 

When run with 'macruby', it produces this output:

 
$ macruby test.rb
Hello, World!
A
B
C
 

To compile the program you use 'macrubyc'.

 
$ macrubyc -o test test.rb
 

This will create an executable named 'test' as well as a 'test.o' object file.

-rwxr-xr-x  1 ctwise  staff  14784568 Oct  8 09:28 test*
-rw-r--r--  1 ctwise  staff      2408 Oct  8 09:28 test.o
-rw-r--r--  1 ctwise  staff        69 Oct  8 09:27 test.rb

If you want, you can use the 'file' command to see what the files are.

 
$ file test*
test:    Mach-O 64-bit executable x86_64
test.o:  Mach-O 64-bit object x86_64
test.rb: ASCII text
$ ./test
Hello, World!
A
B
C
 

And when you run 'test', you'll see the same output as running 'macruby test.rb'.

When I tried slightly more complex projects using gems, the compile went through cleanly but the resulting executable exited with an error code. YMMV.

The help file for 'macrubyc' states that it supports 'normal' and 'full' compilation. But setting it to 'full' gives you a message that 'full' mode isn't supported yet. A more interesting option is the '-V' or '--verbose' option. This will show you the actual commands being run to compile the code.

View Comments