While it is easy to use Activity Monitor to see whether a running app is 32-bit or 64-bit (sample), it would be even more useful to see this information from the command-line. This post shows you how to combine a bit of rudimentary Python code and correct ps command-line options to see the "bitness" of your running apps.
Executing ps in Terminal.app will show you processes that you own and adding some command-line options: ps -Al, you can get tons of information about each process. In this case, I've asked the ps command to show me all processes and include a decent number of output fields, including one we now really care about, the "flags" field (sample output). "Flags" will end in a "4" (sample Terminal output) if the app is 64-bit, otherwise it ends with a zero.
By saving this script:
as something like "psbit.py" and executing it from the command line with either "32" or "64" as a parameter (it defaults to 64), you will see a list of apps with path names that meet the opted criteria.
When I run it, my system shows 24 active 32-bit processes out of 81 total processes. Good progress, but I shall not rest until I see it be all 64-bit!
Cocoa is cool and Objective-C is a great language, but I like/prefer Python and the PyObjC bridge makes my life easier and programming actually interesting/fun for me.
This Xcode project is an example of how easy it is to create useful custom views in PyObjC with an example of a graph view that displays a circular queue/buffer. Everything is done starting with an Xcode project which is available for download (76KB compressed archive) and modification. Here is a preview of what you can use out of the box:


The easiest and smallest part of the project is the RingBuffer class that implements a very simple circular queue/buffer and provides direct access to the list that stores the information:
# # RingBuffer.py class RingBuffer: def __init__(self, size): """ init with # of elements in the queue """ self.data = [ None for i in xrange(size) ] def append(self, x): """ take away one and put one in """ self.data.pop(0) self.data.append(x) def get(self): """ return the list so we can manipulate it """ return self.data
There's not a lot of rocket science there, but it's amazing how much code you can eliminate by taking advantage of Python's inherent capabilities. In this case, list initialization is a breeze and removal/insertion of new elements could not be easier.
Next up is the CBGraphView class itself:
There was a bug in the threading in version 1.1 (apologies for not posting an RDN-update for 1.1) which is now fixed in version 1.2 (188KB compressed archive). No other functionality changes, just a bug fix.

In response to a comment, I am also releasing a desktop version, conveniently called DBCC Desktop (272KB compressed archive, OS X 10.5 ONLY). It runs dock-less and menu-less, effectively making it a widget for your desktop. Just click the "Clear Cache" button and you'll get your space back. The info button takes you to the DBCC portion of this site. I did not put Sparkle updates in this app, so check back here for updates. NOTE: there is a discrepancy between the sizes reported between the widget and desktop app. I use "du" for the widget and Python modules for the app. I'm working on tracking down why there is such a difference.
As you can see, I take feedback and problem reports pretty seriously, so drop me a note if you have any issues, complaints or feature requests.
It seems that 2009 is starting off with a Twitter phishing problem. Users are being "tricked" into clicking on links that then do all sorts of bad things.
While these attacks can come via "regular" URLs, we will eventually see phishers use sites like TinyURL to mask their destination, making it that much harder on desktop and in-stream protection mechanisms.

If you run OS X 10.5 (Leopard), I offer you Throw Them Back (592K compressed archive) as a way to stay a step ahead of the bad guys. This version (0.9) has two modes. The most useful one is where you start the app up, then copy a URL to the clipboard and invoke the global shortcut key (Command-Control-J :: this will be a configurable option in the next release) which will take the URL, expand it (if necessary) and run it through the PhishTank screening service to see if it is a "bad" site. PhishTank is run by OpenDNS and is a great service, but it is not comprehensive (no service would be). While you can pretty much trust the items tagged as phishing (indicated by a fish icon that will pop up in the window), you should not assume that a lack of notification equals an OK site.
If you are determined to press on even if you do not recognize an expanded URL (or are unsure about a standard URL), use the arrows next to the URL fields to bring up a drawer that will render the site filtered through Google Mobile. That should take care of any malicious code and let you see if this is a site you really want to visit.
The URL you pasted is put back on the clipboard, so you can use it anywhere you like and you can copy the short or expanded URL from the displayed fields.

The second mode is where you just enter or paste a URL right into the field in the window. While that is useful, it is not nearly as speedy.
I have a bunch of items on the TO DO list, including:
I welcome feedback and suggestions in the comments or on Twitter (@hrbrmstr).
| If you do like the software, please consider clicking the button on the right. I'm seriously contemplating making version 1.0 (this is version 0.9) something you have to pay for to get all the additional features. If you act now, you will receive free upgrades forever for just $3.99USD. Version 1.0 pricing will be $4.99USD. |
Great little script here for using the MetaMark URL shortening service in conjunction with Quicksilver.
Some enhancements...
For FireFox users, replace the Safari-laden AppleScript lines with:
applescript = '''tell application "Firefox" set ff to properties of front window as list get item 3 of ff end tell'''
For those who also cannot partake of system beeps for notification upon shortening completion here's a Growl replacement for the end beeping:
popen('growlnotify -n "surl" -m "URL Shortened\n' + url + ' :: ' + shortURL + '"') ;
(that requires installing the growlnotify support - which you probably did if you're a Growl user - and having "/usr/local/bin in the appropriate path (you can just pre-pend that onto the growlnotify command just to be sure.
| Location: | Berwick, ME, US |
| Updated: | 08 Mar 00:10 EST |
| Temp: | |
| Pressure: | |
| Dewpoint: | |
| Humidity: | 30% |
| Wind: | |
| Gusts: |