Aug 23

I like to run Windows XP at all times in my OS X machine for access to essential software not available on the Mac, e.g.  the Roboform password manager and the Babylon dictionary and translation utility.  For that, I use Sun’s free VirtualBox virtualization product.

To quickly launch XP when I need it, I wanted a launch icon in my Dock.

To do that:

  1. First, know the name of the virtual machine you want to launch by invoking in Terminal:
    VBoxManage list vms
  2. Run Automator, choose the “Run Shell Script” action, and type in the script:
    VBoxManage startvm "THE_NAME_OF_VIRTUAL_MACHINE"

    Creating a shell script in Automator

    Creating a shell script in Automator

  3. Save the script into your /Applications folder (or create a /Applications/scripts folder for these kinds of scripts), e.g. as “Win XP VM”, making sure to save it as an “Application” instead of a “Workflow”.
  4. Now find the script you just created in Finder and drag and drop it to the Dock.

Optionally, you can change the icon of the application to be the same as VirtualBox (a downloaded XP icon would be even better):

  1. In Finder, select the VirtualBox application and press Command-I
  2. Click the icon at the top-left and press Command-C to copy the icon
  3. Now select the script that you created in Automator earlier and press Command-I
  4. Click the icon at the top-left and press Command-V to replace the icon

Sources:

Tagged with:
May 18

Here’s a useful and free tool for seeing the filesystem of your iPhone and iPod Touch once it’s connected to your PC or Mac via USB cable and transferring files: DiskAid

Before this will work, you may have to ensure the following:

In Windows, the “Apple Mobile Device” service must be running
You should enter the Passcode on your iPhone or iPod Touch
The device must be jailbroken if you want to see anything outside the Media folder, e.g. if you want to see the root folder.

Tagged with:
May 14

This is straight from the department of “I wish I had known this before so I wouldn’t have Carpal Tunnel Syndrome today.”

You know  how on Windows XP, you could copy a big directory tree from one directory/drive/machine and sometimes the copy doesn’t complete.  Maybe your Wi-Fi cut out during the large copy.  You’re left with the task of re-starting the entire copy operation.

Or perhaps you just want to do a copy of one set of files over another set of files but only care about creating new files, not updating changed files.

Then you have surely faced the Confirm File Replace dialog numerous times because of all the existing files.  But are you going to click “No” every single motherf’in time?  In the past, I just clicked “Yes to all”–even if that was just a waste of the computer’s time, my own time wasn’t wasted and I could do something else like write poetry.

But actually, there is a hidden option “No to All”,  as explained by LifeHacker.  You just hold the SHIFT key and click the “No” button in the Confirm File Replace dialog.

Tagged with:
May 09

Ahead of the Android enthusiasts meeting in Saigon, I wanted to make sure that I didn’t show up with an embarrassingly-old 1.0 firmware on my Android Dev Phone.  Yeah, I haven’t done much beyond just use it as a regular user since I got it 4 months ago.  But no need to make it obvious I’m an Android poseur.

So I needed to update to the latest firmware 1.5, a.k.a. “Cupcake”.

The official instructions are at HTC Support but they were nicely summarized by some dude.  I’ve included his instructions with my changes in red (I didn’t get the minor problem he ran into):

  1. From the HTC support page, download radio image ota-radio-2_22_19_26I.zip and recovery image signed-dream_devphone-ota-147201.zip
  2. make sure HTC Gphone is connected to your computer, and `adb devices` see your phone listed
  3. adb push ota-radio-2_22_19_26I.zip /sdcard/update.zip
  4. adb shell sync
  5. shut down your GPhone. When preparing to restart, please press and hold “Home” then hit the Start (should be the same power off button aka the “Call End” button) button, waiting for the “!” icon to appear.
  6. Press ALT + l (this is a lowercase L, not a capital i or number 1) to display the console output
  7. Press ALT + s  to install the update
  8. Press HOME + BACK and write the install, and there will follow an automatic reboot
  9. adb push signed-dream_devphone-ota-147201.zip /sdcard/update.zip
  10. repeat 4 – 8

That worked pretty well, but it didn’t solve the syncing problem I’ve been having (my contacts having not been syncing to Google since I first got the phone.

Note that several applications have problems when upgrading from 1.0 to 1.5 and need to be updated, including ChompSMS, Power Manager, Toggle Settings, Task Manager for Root Users, System Monitor.

The new OS runs snappier, supports video recording mode and a on-screen soft keyboard, lists applications under Manage Applications much quicker.

Tagged with:
May 02

The 2008 Google Test Automation Conference was keynoted by the entertaining speaker James Whittaker from Microsoft.

Key takeaways from the Google Tech Talk video were:

  • Insourcing → Outsourcing → Crowdsourcing →  Testsourcing
    • Some companies are already doing crowdsourcing of testing:
      • utest.com pays the internet community to find bugs in software. (Companies who want their products tested credit their account with at least $2000, with which they pay for discovered bugs that they aprove.)
    • The speaker believes that in the next phase of evolution, we’ll have “testsourcing” where vendors are providing tests themselves.
  • Virtualization:
    • Virtual machines and their environments are going to be key for wrapping up and reproducing bugs as they happen.  They should run not only on testers’ machines but also users’ machines.
    • Market of the future: virtual test machines
  • Visualization:
    • Microsoft testers use a tool to visualize their codebase (see image below) and focus their testing
      • Microsoft's codebase visualization tool
      • Size denotes lines of code
      • Darkness denotes complexity [can't hear what he mumbles there]
      • I wish I knew what this tool was
    • Game testers use numerous GUI tools:
      • displays where they are in the application itself (in addition to the usual game screen) as they play the game
      • displays surrounding testable objects and allows them to teleport to them
      • displays objects that need to be tested because the code has changed
      • displays the degree of testing that has been done for each object
Tagged with:
Mar 19

In a fit of flu-induced geekdom, I decided let myself read most of this mammoth 31-page AnandTech article, updating my quasi-nil knowledge about solid-state drives (SSD).

Take-aways

It was a damn long article so here are the key take-aways:

  • SSDs are still maturing
  • There are good and there are bad SSD drives.
  • Flash memory in a standard SSD can be erased only about 10,000 times before it goes bad and stops storing data.
  • With SSDs, consumers expect low latency (good for booting and loading applications) rather than high bandwidth (good for storing lots of media files), something that some small manufacturers are only now starting to understand and optimize accordingly for.
  • As with hard-disk drives (HDD), write performance for SSDs degrades as the disk fills up, but for different reasons.  Because of the inherent need to sometimes erase and re-write large portions of data, an SSD will slow down over time.
    • You can “reset” most of the original performance of the SSD by doing what’s called a “secure erase” of the entire drive.  Not very convenient.
    • You can also avoid some of the long-term slow-down by partitioning your drive in such a way that it sacrifices some of the space.
    • Windows 7 will eventually support a TRIM command that can prolong but not perpetuate the time for performance to degrade.  However, this will require new SSD firmware, and thus potentially new SSD drives.  You may want to hold on before purchasing.
  • Intel SSDs are producing the best and most expensive consumer SSDs, and today  OCZ may be ideal for the value consumer.

The power of online reviews

Along with a recap of SSD peculiarities and performance comparisons of SSD drives now on the market, the article recounts how the author effectively forced a manufacturer (OCZ) to update its firmware to improve its latency even at the expense of more marketable bandwidth numbers.  This is  a good example of how one trusted popular online reviewer can have the power to not only make or break a product but sometimes have more say than a company’s engineering, marketing, and executive staff before the product even hits the market.

Tagged with:
Mar 19

Developing iPhone Applications without using Objective C

When the iPhone SDK came out in March 2008, mobile developers were very excited to be able to develop native applications for the increasingly popular device.  However, that excitement was partially tempered by some requirements of the platform, which for most meant learning how to program Objective C, a language that only Mac developers are familiar with.  Just as with iPod users, iPhone application developers do come from all walks of life–they’re not all Mac die-hards.
 
As as result there have been several efforts to produce a framework or tool with which applications could be developed using more familiar languages. Rhodes does this for Ruby programmers. XMLVM does this for Java programmers.

XMLVM

I watched the Google Tech Talk about XMLVM, which goes into significant depth about the conversion process.  Essentially, the technology does cross-compilation from the compiled version of your Java application, in other words JVM bytecode instead of Java source code. Thus, the entire process of compiling an iPhone application would consist of Java source -> JVM bytecode -> Objective C source -> native iPhone binary.  The speaker goes into detail with an example showing the conversion of JVM bytecode into Objective C source, which is easy to understand and can be educational.
 
Opting for bytecode as source for XMLVM makes it easier to implement but produces bloated code.  Not only that, but the bytecode is converted not into native iPhone native code, but into Objective C source code.  Add to that that the conversion is done using XSLT, and you can guess how inefficient the process and the output will be.
 
The speaker emphasizes that this is an academic project without abundant resources, with the implication that the code produced by this reference implementation is not expected to perform well for commercial purposes.  So while it’s interesting to see this idea in action, not even the speaker believes that this cross-compiler can be put to serious use yet, if ever.

Other languages for the XMLVM

Java is not the only source language that can benefit from XMLVM.  There is support for other input languages and output code.  See the website for more information.

Enhancing the iPhone emulator with hardware data

One nice tool that the XMLVM team developed was a way to send device data to the desktop emulator, which naturally cannot emulate everything that the iPhone can do.  For example, you can use a real iPod Touch or iPhone to send accelerometer to the emulator.  The same could be envisioned for other functionality, e.g. GPS, light sensor, proximity sensor, etc.  I imagine this is so helpful for the development process that others must have implemented something like that as well.

Better to Develop in Objective-C

My opinion regarding these kinds of language-adapting frameworks or tools that allow developers to code in their familiar language is not very positive.  In general, I don’t think it’s a good idea to distance yourself from the target platform.  Problems include:
  • Limited functionality
  • Lower performance
  • More complicated development process
  • More source of bugs in your way (from not just the iPhone OS and SDK, but from the language adapter)
  • Smaller community of developers, fewer development tools, less documentation
All these problems are multiplied when you’re dealing with a hot platform like the iPhone, where innovation comes fast along with bugs and the language adapter is always one or more steps behind on completeness, robustness, and performance optimization.  Do you really want to develop cool apps with only features that are “so last year”?  The fact that the iPhone platform and its evolution are so closed doesn’t help either.
Tagged with:
Aug 02

nothing clever to say, move along…

preload preload preload