«
»

On Parsing Version Information

While Thomas is headed off to Thailand for a three-week vacation and will probably have a pretty good time there, I’m busy finishing AppFresh Development Preview 4 for release. One of the biggest challenges is to get version detection and parsing right for as many applications as possible to be able to compare your currently installed version to the latest available version in a meaningful way and make the Unknown category a bit emptier.

Version numbers come in different fashions, from simple (“2.3″, “1.5.5″) to pretty complex (“R 2.4.1 GUI 1.18″, “0.8.6a”), they appear in multiple places and variations in your installed application and on the internet (osx.iusethis.com) and often, there is also a revision or build number (“4038″, “327″) that might be useful. AppFresh tries to break down all information it finds and combines the pieces to get the most precise version information for comparison. Some problems cannot be solved, e.g. when the application bundle contains a revision number only, like “4038″, and iusethis only knows about the version number, like “1.5.5″. There’s no way for AppFresh to know which revision belongs to which version, therefore it can’t compare them and will list the application as “Unknown”.

Even if the information is there, it can be difficult to break it down into usable pieces, as there is no standard for defining version numbers. Apple has a Tech Note detailing how version numbers should look like, but a lot of developers don’t follow that at all and come up with their own creations, so the number of these patterns that AppFresh has to understand is larger than we originally thought. AppFresh currently uses complex regular expressions to match certain patterns and I’m trying to improve these expressions so more patterns can be matched. As we can’t install all applications to test the whole version parsing algorithm, we added a built-in “Report as broken” function to AppFresh, which provides us with selective data on failing applications but which isn’t used very much. To be able to test and improve version parsing, I’d like to build a database of version strings which can be automatically matched as I modify the regular expressions.

That’s why I built a small tool which you can run once on your machine to generate a profile of all version strings that occur within all applications in your Applications folder. After double-clicking the tool, the profile will be generated and placed on your Desktop in a file called “Collected Versions” (this might take a few seconds, sorry for the
rudimentary “interface”). To submit the collected information, please upload the generated file here (needless to say, the profile contains no personal information and we don’t save anything but this file). Your contribution is greatly appreciated, especially if you have lots of not-so-widely-used applications on your system. Thanks for your help!

Update: I’ve updated the tool to run on PowerPC and include ~/Applications.

11 Responses to “On Parsing Version Information”

  1. Michael Says:

    Version Info Uploaded! Lovin’ AppFresh. Can’t wait for Preview 4.

  2. Ricky Says:

    Could you please provide a PPC version of your “small tool?” It won’t run on my G5 iMac.

  3. John Says:

    I know this is just a quick tool, but me running it’s not going to be very useful to you — I put most of my apps into ~/Applications, not /Applications. From what I can see of the resulting .plist file, you only look for apps in the latter directory.

  4. Greg Peterson Says:

    Hey Jonas,

    It’s me, the guy who was whining about having this app idea before you ;-) . I just want to reiterate that my little gripe is nothing personal. I’ve uploaded my app info via your little tool and would like to take any future opportunities to assist in the development of this application. I’m glad that you’ve got it implemented better than I probably ever would have (having near no application coding experience whatsoever), and I would love nothing more than to see this app grow into something really great. So, please keep me posted, if you will, of any opportunities I have of testing builds, etc. to help with the development beyond the obvious suggesting of ideas and such, which I will try to do. I can’t help with programing though, unfortunately.

    Thanks.

    -Greg

  5. Nobody in particular Says:

    Jonas, I want to congratulate you on an excellent program and an excellent command of English! If only all German software engineers were like you…

  6. Jonas Witt Says:

    Has been fixed, sorry.

  7. Daniel Says:

    Done.

    Waiting patiently for Preview 4 :-)

  8. mawa Says:

    Done.

    Consider me your greatest fan, btw.

  9. sporobolus Says:

    after clicking Upload, the page hangs in Safari with about 1/10 of a progress bar in the address field — should i assume it has uploaded?

  10. sporobolus Says:

    unfortunately “Report as broken” is also broken for me ;?> — i get “Please wait…” and a motionless progress bar for several minutes; it’s a good feature, though; for clarity, i’d suggest wording it “Report application version problem”; for convenience, i’d suggest making it a contextual menu item on individual app rows

  11. brad Says:

    When checking for updates, I get a long delay at the end of the progress bar. It says:
    81 of 82 apps checked
    Apple updates (100% done)…
    And the progress bar is almost full. There is a delay of a minute or so (I haven’t timed it), without any indication that things are still happening.
    It does complete ok, but this pause is confusing/concerning.

metaquark.de | Blog | Buy | About | Contact | Imprint & Privacy Policy

Aurora | AppFresh