code

You are currently browsing articles tagged code.

Del.icio.us “Tagometer” Wordpress Widget

I don’t know if anybody else has already created one, but it seems almost too obvious and simple to not do it.

I whipped up a Wordpress Widget for the new Del.icio.us “Tagometer” badge. No need to thank me, its probably the simplest widget ever written.

Download Del.icio.us Tagometer Widget (.gz file)

Super-simple install. Just download and un-gzip in your “wp-content/plugins” directory and enable it in the control panel. You can then add it like any other Wordpress widget. No configuration necessary (or possible).

You can see an example at right, under “Tagometer”.

For those of you who are old fashioned, you can also call the functions directly from your Wordpress templates to customize where the badge ends up.

Tags: , , ,

Quicksilver/Adium Away Message Hack

Update: My script no longer works with newer versions of Adium, but brnrdbrk was kind enough to update it for 1.3.

Quicksilver/Adium Hack

So I finally figured out how to write AppleScripts that hook directly into Quicksilver’s “text clipping” interface. For the longest time I’ve wanted to be able to set away messages from Quicksilver… and now I can:

using terms from application "Quicksilver"
    on process text ThisClipping

    tell application "Adium"
        set my status message to ThisClipping
        set my status type to away
    end tell

end process text

end using terms from It may not look like much, but I’m a happy boy. Put that into an AppleScript using Script Editor and save it to ~/Library/Application Support/Quicksilver/Actions. Restart Quicksilver, and you’ll be able to set any text you type in Quicksilver after the “.” command as your Adium away message.

The on process text terms has lots of other uses too. I’m sure I’ll come up with more.

Tags: , , , , , , , ,

Java Makes You Stupid

Java developers! This is a call to action!

Go pick up those dusty computer science “theory” books you decided to save thinking that maybe, just maybe, they might come in handy some day. Read them! Brush up on data structures, algorithms, and object oriented programming concepts. Practice big-O program analysis. Write some recursive algorithms. Review all those topics that you “forgot” because you thought you would never use them again.

I’m tired of screening Java developers who can’t tell me how the internals of the libraries they use are actually implemented. When computer scientists talk about “data structures,” we talk about hash tables, binary search trees, and linked lists, not java.util.Collection. We learned about program analysis in school because we were supposed to use it - if you can’t tell me about the runtime implications of the algorithms you choose, then you shouldn’t use them.

You got the degree, so you’re obviously not stupid. Now start using what you learned.

Tags: , ,

Del.icio.us Plugin Possibly Broken

Well, it looks like the boys and girls at Del.icio.us may have made some changes to their RSS feeds that break my plugin.

So I’ve taken it offline for awhile, and I’ll figure out whats wrong with it when I’ve got some more free time. You’ve been warned.

Tags: , , ,

Mini-HowTo: Installing Java on Debian Unstable

Every time I set up a new system I have to figure out how to do this again, so I decided to post instructions for my benefit and for the benefit of those who might also be having problems with this.

Debian’s “Social Contract” forbids it from distributing “non-free” code as official packages. Thus, Sun’s version of Java is not in any of the official mirrors. You can sometimes find third-party packages from Blackdown and other groups, but they are often out of date and annoying. I prefer to get my Java directly from Sun.

I install my JDKs into /opt and use “dummy packages” to let Debian know that I really do have Java installed. That way I can install Debian packages requiring Java to be installed and everything will go smoothly.

This mini-HowTo assumes that you’re running Debian Unstable (Sid), but it should also work if you’re using Testing or even Ubuntu. It also assumes you’re doing all these steps as root.

Read the rest of this entry »

Tags: , , ,

« Older entries