Cleaning up Quicksilver


Given the Quicksilver source code is now out in the open, I’m trying to learn from it while at the same time cleaning it up. Here’s what I’ve done so far.

Bug fixes

A lot of features were buried in the source, available only by setting some preferences to allow them. Mostly it was due to buggy implementation or pending improvements. I managed to resurrect a few of these nifty ones and fix a few old bugs that have annoyed me for ages.

Color handling

Color handling was commented out in the Quicksilver source; probably because it resulted in errors. A simple change in the source allowed correct handling of color values, and the code for drawing the icon was already there. I added functionality to allow dropping colors from the Quicksilver object pane into color wells and the like - which is what makes this useful.

Handling color in the object pane is now possible

Uninstalled plugins

Added a plugin set to the plugins preference pane to list plugins that you haven’t yet installed or downloaded. Not sure why this was commented out; I didn’t have to add any new code here.

Uninstalled Plugins can now be listed

Triggers

There was a very annoying bug in the triggers preference pane that haunted me from the day I started using Quicksilver. Switching to the iTunes trigger set resulted in errors, and often froze or messed up Quicksilver. Finally, it’s fixed, and we can see and use these triggers.

Quicksilver triggers preference pane has been fixed

Speaking of plugins; I think I heard mention of a “plugin check bug” fixed somewhere, but it wasn’t working for me so I’ve also fixed the issue where the plugin list would be blank until you hit refresh.

Miscellaneous bug fixes

Other things like crashing when you try to relaunch with the “Customize” preference pane open, and with the source, hundreds of warnings when trying to compile, errors in the shell scripts when working in a path with non-alphanumeric characters, etc. have also been fixed.

Fixed a crash with the Quicksilver customize pane

Tidy up

[I wonder] how long it’ll take people to notice the Frankensteinian nature of the source and respond - appropriately - with pitchforks. Alcor

I’ll have to agree with Alcor - to say the source is a mess would be an understatement. There are hundreds of compiler warnings, unused or unimplemented features, classes, objects, code, structures, nibs, etc. Hundreds. I’ve tried to remove as much of the redundant or test code as possible and I’ve yet to reach the end. Mind you, I’ve been doing this for hours a day for the past week. The formatting and indentation is almost as bad. I’m cleaning that up too, with some good old regular expressions and elbow grease. As I go, I’m also trying to improve the logic where I see potential for improvement. Already the application is feeling more responsive but I want to also reduce the memory footprint.

Why go to all this trouble? Mainly, to

  • Make the source more readable; make it easier for people to understand what’s going on.
  • Improve the performance of the application in both speed and memory usage.
  • Fix existing bugs and add new features.

In the meantime, I’ll continue my clean up of the Quicksilver source and when it’s lookin’ fine perhaps post it up (the QS license doesn’t really say much about the source, so I might have to ask Alcor first. Perhaps he’d like to add it to the subversion repository after reviewing?).

Lastly, let me just say, I’ve learnt a lot from looking at the source code to Quicksilver. There are some very neat tricks in there, and great little snippets that could be very useful elsewhere. So thank you Mr. Jitkoff; thank you for writing the application, and thank you for the releasing the source code. It is highly appreciated.


Back to Top ↑

67 Comments so far

Leave a comment
  1. 1

    Are you going to be pushing your changes back into the Google Code repo? I think a lot of people would be interested in performance and stability improvements to QS (although I’ve personally had few problems, I don’t tend to use a lot of the advanced functionality).

  2. 2

    I’m so pleased someone (you) has started to clean things up & start getting rid of the bugs!

    Can’t wait for the release.

    It’d be great if others could all work on the same version (unless you have enough free time) to get a single version of Quicksilver running smooth & bug free :)

  3. 3

    Very exciting, can’t wait for the release!

  4. 4

    Ankur,

    Thans for your valuable work. I’m very atonished to know that the code of Quicksilver is a “mess”. I thought it was developped by a kind of genious. However, more I know great programmers, more I realize that great programmers are not always very structured.

    I could suggest to launch a slim but stable version of Quicksilver, for most of basic uses.

    Anyway, thank you.

  5. 5

    At least you picked a small project to start with. ;)

  6. 6

    This is great news.

  7. 7

    According to the Google Code Pages it’s an Apache License, I don’t know the exact terms, but it probably allows you to distribute it freely…

    After quite a lot of hacking, I’ve finally compiled it as well, and it runs! But I have some problems with the interfaces, the combo-box in your last screenshot is empty in my build, and I can’t activate the command window. I tried installing several plugins, the included Cube interface, the Menu interface and Fumo, but it stays empty. Did you have this problem too?

  8. 8

    “Command interface: Fumo”… Ankur, this reminds me of my old dream :)

  9. 9

    awesome work! you are my new hero! thanks for picking up the cause.

  10. 10

    This is great news. Keep up the good work!

  11. 11

    Ankur — thank you!!!!!!!!!!!

    This is exactly what we QS users (who aren’t programmers!) are hoping for with the OS move. I really hope you and some other developers can pick up from where Alcor left off. Alcor has always been clear on the state of QS, and this is what we need to move forward. I’m pretty sure people would donate some $ to reanimate QS as a community project…

    Out of curiosity, have you compiled the new trunk version?

  12. 12

    Thanks sincerely for all your hard work. QS is just a part of the way I use a computer, and it sounds like Alcor’s just been doing it too long.

    Projects like this can greatly benefit from an outside eye from time to time; I look forward to checking out a binary soon.

  13. 13

    I’m totally failing to compile the source as-is from svn - any pointers?

  14. 14

    Thanks for doing this! I hope it will find its way into the Google Code tree someday.

  15. 15

    Which version are you working on? B5X or Trunk?

  16. 16

    Nice to see this is well received.

    I’m still running Tiger, so I can’t do much with the trunk version (except marvel at it). B5X is the one I’m trying to work on.

    Dunk, it won’t compile “as is” because a lot of the “Run shell script” build phases refer to things that may not be installed on your computer, or may be in different locations. You can comment out most of it and get it to compile.

  17. 17

    Cool. I may, if time permits, check out B5X and try and help with a cleanup, though my ObjC is rusty in the extreme.

    It makes sense to stabilize the B5X branch for those using it, even if no real new features get added.

  18. 18

    Very cool indeed. I run Quicksilver on my iBook and it’s never left the hard drive. In fact, I got so used to having it there, I installed an equivalent (Launchy) on my PC. It’s become as much a part of how I use a computer as clicking on an icon.

    Thanks for keeping QS alive!

  19. 19

    I for one try to ignore the fact that QS is always, no matter what I do, at the top of a ps listing. I, like the majority, don’t wanna do w/o QS, but using 30% of my memory, and fragging my CPU as high as 172% (how is that even possible) makes it hard to ignore. What can I do to help?

  20. 20

    Nice work man, keep it up!

  21. 21

    I just wanted to chime in to add my thanks for all your hard work.

    My understanding is that most code is “a mess”, especially for one-man projects. Team efforts tend to require more clearly structured and documented code.

    Thanks again

    adrian

  22. 22

    Adam, try to wipe your ~/Library/Application Support/Quicksilver and other preferences and see if it helps. I always try to keep my catalog fairly minimal (don’t recurse lots of levels, add specific child directories instead), and keep my plugins to a bare minimum. I see about 25-40MB memory footprint and 0.1% CPU drain. The only problems QS has are the annoying silent crashes once every few days.

    On Leopard, quite a number of core functions have broken, and having a developer with Leopard installed to see what is going on would be very welcome too…

  23. 23

    Now,if you fixed the bug in the Developer plugin that makes Quicksilver silently crash after a day or two of usage, maybe I could start using it again! That would be very much appreciated!

  24. 24

    I think we need to start some sort of organized donation program. For example, before AppleJack was ported to the IntelMacs, a bunch of us donated and purchased the developer an Intel MacMini.

    IMO, one issue is, having multiple developers, how to maintain a single (if that’s best) account and how to share the booty.

  25. 25

    So any chance you can post a link to your “fixed” version of the project?

  26. 26

    Ian-
    That made a big difference. Thanks. However, what I meant by help was what can I do on the project at hand. :) I’m learning my way around Xcode, so I guess I should start w/ just trying to getting the source to build on my setup.

  27. 27

    thank you for doing this!

  28. 28

    Hey Ankur, thanks for your effort. I would like to think I would put the time in if I had the skills, but it’s people like yourself who are responsible for getting things done!

    Keep up the good work!

  29. 29

    I’d like to help you as well. Have you access to a SVN repo we can collaborate through?

    By the way, I’m using Leopard, so I can confirm it works there too.

  30. 30

    Thank you. I don’t know a lick about programming, but I’m addicted/tied/in love with quicksilver. Thanks for giving it a chance to survive.

  31. 31

    Nice to know that someone steps up to try and understand all the code.
    I agree with the fact that programmers that work alone and get a lot of request are more likely to do a ‘quick hack’ and forget to structure it properly or think the’ll do it next time .. etc..etc..

  32. 32

    Thanks for your hard work. Waiting for the next release..

  33. 33

    Hey Ankur, thanks for your hard work and your potential picking it up… if you ever happen to release your changes to quicksilver out in the wild, i think there will be a lot of people happily trying to test it out. Also, as many others, i’d gladly donate some $ to help reanimate the development as community project. I’d might even be able to donate some of my spare time helping out, though my Objective-C programming skills are not that good right now.

  34. 34

    nice one guys, be a real shame to see quicksilver disappear, its a great little app i rely on everyday. hurrah, hurrah! keep up the good work. :)

  35. 35

    Ankur are you committing back to the google project or have you basically forked? Where will your code be available?

  36. 36

    I’ll be committing the changes into the B5X branch of the Google Code repo very soon.

  37. 37

    Great to hear that Ankur! :)

  38. 38

    How come Apple does not pick up the ball? QS is filling out a definite OS deficiency and should be integrated with Spotlight somehow (rather the opposite). Keep up the good work. This has been an OS caveat since the days of the Launcher…Remember the rocket icon?

  39. 39

    An inspiring post! Please put your results up as soon as possible. Those bugs drive me crazy. Thank you.

  40. 40

    I can’t wait for these to get fixed - the iTunes triggers bug is my problem and cannot seem to find a fix anywhere.

  41. 41

    Thank you, thank you for keeping the development of Quicksilver going. I would pay $$ for it–I love it that much. You just made one nerd’s day!

  42. 42

    Big props for undertaking this work! It would be incredibly to see a community coalesce around the QS code… and it’s efforts like yours that will set the bar for participation.

  43. 43

    thank you!! if QS dies it would be like losing a limb!

  44. 44

    Thanks a bunch for doing this. I love Quicksilver, and I couldn’t live without it!

  45. 45

    I’m only commenting to echo what’s already been written. I love QS and am happy to see that it may yet survive. I would gladly contribute to the programming side if I were capable, but since that’s not the case….. another person willing to donate to see a great app continue on. Does anyone know of any other efforts or groups working on QS code?

  46. 46

    Best…Utility…Ever.

    I would support any donation, subscription, merchandise, shareware or other initiative to ensure that QS never fades away.

    My Mac is not a Mac without it.

  47. 47

    I am a huge fan of QS and would hate to see it die. Thank you for picking up the torch!

  48. 48

    let me add my voice to those willing to pay well (up to $100) to have quicksilver continue its progress and even possibly become more stable and documented.

  49. 49

    Ankur, you are the wind beneath my (OS’s) wings! Keep up the good work, and let us know how we can support you.

  50. 50

    First of all, excuse my english: I’m an italian QS user.
    When I knew Alcor dropped QS implementation for Leopard I was very sad: I appreciated and used QS a lot, but Leopard too. In the first Leopard release (10.5.0) QS did’t work (that is proxy object and menu item, or tagging, or getting file info). I bought Launchbar (following Alcor suggestion), but I’dont like it very much (it’s just a launcher, and file managing is not even comparable with QS). Yesterday I had some time and sadly tried relaunce my loved QS. Surprise: my uninstalled old version, on Leopard upgraded to 10.5.2, has regained some functionalities. Is it a dream? I can get finder selection (multiple files too) and act on that file in QS (move or copy them). I got menu item too! My version is 3815, and I never got a freeze.
    Then I serched the web and found this Ankur release, but I hesitate to upgrade my version because, althought not like in Tiger, it works fine: not obviously like in Tiger, but quite fine (better than Launchbar). I use Entourage 2004 plug in too (and on my mac I have Office 2008).
    I ask you what follow:
    which functionalities (or plug in) do I re-gain installing it? I mean: do I find in this new (and more tidy) release all the old plug-ins?
    @Ankur: I payed for Launchbar and I’m ready to support your hard work. I begin with a first donation via Paypal (also if I’m not still using your release).

  51. 51

    which functionalities (or plug in) do I re-gain installing it? I mean: do I find in this new (and more tidy) release all the old plug-ins?

    There is very little new functionality in the B5X releases; mostly improved performance. If you need to use file tagging and other plugins, you should probably wait a little bit until the remaining bugs are fixed in this version, or until the new Leopard-only version Quicksilver is released, whichever comes first.

  52. 52

    Is there a feature where you can call the “Append Text..” action but direct it to .rtf files “that are already open”? I’ve encountered problems using non-.txt files or .txt files that are already open with that action and the “Append Text” feature I think, personally, is one of the most impressive of QS’s already bodacious framework.

  53. 53

    John, if you have the file open in an app like TextEdit, then perform “append text” with QS, then save the file in TextEdit - you’ll overwrite the changes, no? (It is possible to do what you’re after: loop through all open windows, check if anyone of them have the file open, if they do, then switch to that window, scroll to the end of the file and send the appropriate keystrokes; this would be more suited to an AppleScript.)

  54. 54

    Hey ankur. Thanks for the response. I tried that and it doesn’t reveal the QS-appendings to the already open file. Also, what’s the scoop on QS appending text to .rtf files? Thanks!

  55. 55

    it doesn’t reveal the QS-appendings to the already open file

    Wha…?

    what’s the scoop on QS appending text to .rtf files

    There is no scoop - yet. (Bug fixes are the priority at the moment)

  56. 56

    Great . I’ll most likely fiddle with apple script. That’s definitey my bag recently.

  57. 57

    ANKUR, thework you have done to QS, has it been committed to the other builds or are you on a separate branch? Do you know anything about b56?

    I ask only because I am using your b55 and wasn’t sure whether an upgrade to b56 would be bad for my health. Is b56 an extension ot YOUR b55?

    Thanks

  58. 58

    seydoggy: as i understand, ankur had commited his changes and built from the same branch (r76 was what he built his version from IIRC), so the changes he made before are in B56 along with all the new ones. But I think Ankur’s memory optimisations are not part of the new build. Correct?

  59. 59

    where can I get the opensource code for quicksilver? Where do you guys access that?

    I’m interested in infusing some applescripts with some of its features (This will probably just entail calling the separate scripts, instead of dealing with actual code, though…0

    in what language was quicksilver written?

    thanks.

  60. 60

    SeyDoggy, Ian is correct. b56 is an extension of the ‘release’ (wasn’t really a release) I made.

    John, you can add AppleScript actions to ~/Library/Application Support/Quicksilver/Actions/. (Quicksilver is written in Objective-C; code is at Google)

  61. 61

    Thanks Ian and ANKUR. I might give B56 a try then.

  62. 62

    When will this be ready for download?

RSS feed for comments on this post. TrackBack URI

Leave a comment

Comments may be edited for formatting.