Nov 19, 2007

CSS 3 selectors explained

Here’s a nifty CGI that figures out what all those CSS selectors mean.

permalink | computing/web/sites | 2007.11.19-22:33.00

Using Blosxom

I wrote up a page on how this site uses blosxom, and the standard and custom plugins that I use. Since I use blosxom in both static and dynamic mode, I had to hack a bunch of plugins to work correctly in both places, and write my own in some cases.

Blosxom proved to be very flexible. It’s simple enough to go hacking, yet rich enough, with all the plugins available, to do some fairly complex stuff. Its flexibility is both a blessing and a curse: you can do almost anything that you’d want to, but you often have to go hacking in the plugins to make things work if you want to do anything out of the ordinary. Once you have more than a few plugins, you also start to run into conflicts between them, which can only sometimes be fixed by the rename-ordering dance.

permalink | computing/web/blog | 2007.11.19-22:33.00

Batch changing file types/creators

For some reason when downloading files via FTP with Interarchy, all my .html files end up being owned by IE (yuck). Here’s a handy one-liner to fix that (run from the directory containing the errant files). You’ll need the developer tools installed to get SetFile.

find . -name "*.html" | xargs /Developer/Tools/SetFile -c R*ch

This sets the file creator to R*ch, which is BBEdit’s creator code. Of course the *.html can be changed to change other files, like *.txt.

You can also use the -t option to set the file type, for example -t TEXT.

permalink | computing/mac/tips | 2007.11.19-22:33.00

Apple’s WWDC 2004

I’m off to WWDC in San Francisco tomorrow. It’s exciting; this will be the first time that I’ve had a badge all to myself, and will be able to go to the keynote.

permalink | computing/mac/wwdc | 2007.11.19-22:33.00

Color Schemer

In a previous entry I pointed to Color Designer as a nice color design application, useful for web pages and more.

Apple’s downloads page recently featured a different application which does much the same thing, called Color Schemer Studio. This one comes as a 15-day free trial, after which it’s $50. Color Schemer is nicely designed, and seems a little more polished than ColorDesigner, but doesn’t have quite the flexibility.

permalink | computing/mac/software | 2007.11.19-22:33.00

CSSEdit

CSSEdit is another nice web development tool for Mac users. It’s not much use for positional-type stuff, because it doesn’t know anything about your page structure, but it’s great for color, border and font tweaking.

permalink | computing/mac/software | 2007.11.19-22:33.00

GUI wrappers around SSH

I just spent most of the weekend writing a tool that provides a nice GUI frontend for SSH, specifically for creating SSH tunnels. Yeah, I know about SSH Tunnel Manager, but it has a fiddly UI, and, as I found when looking at the source, the author doesn’t care too much about security (it writes your password to a short-lived file in /tmp).

So about 10 hours of hacking later, I had a nice little app with an NSStatusItem which showed the connected state of tunnels, and some tunnel editing UI.

Then Google presented me with SSHKeychain. Wow, what a neat little app. It does everything mine did, and more. Hopefully it will make using CVS over SSH with mozilla a little less painful.

permalink | computing/mac/software | 2007.11.19-22:33.00

Fixing MT-NewsWatcher bugs

I spent a few hours this weekend fixing some MT-NW bugs, which is long overdue. I’ve been distracted by other projects, like redesigning this web site.

For the curious, the bug fix list so far looks like:

  • Fixed file type/creator reversal when saving binaries.
  • The “Mark as not junk” menu item works for article windows now.
  • The Advanced dialog in the binary extration prefs has a sensible title now.
  • Fixed the display font for UTF-8 messages to use the font prefs, rather than default to 9pt Monaco.
  • Fixed an odd behaviour clicking on the radio buttons in the filter edit dialog for a date filter.
  • Fixed a linkage issue that could cause library errors on launch on some machines (GSS-related).
  • Fixed some minor message window layout issues (helpful for translators).
  • Accented characters are no longer stripped when pasting.
  • When bringing up the Spelling panel with a misspelled word selected, it no longer goes to the next misspelled word.
  • MT-NW will now try to authenticate when requested in more situations, making it less necessary to use the ‘Always authenticate’ option.
  • Underscores (‘_’) will no longer be converted to spaces in message with a Content-Transfer-Encoding of Quoted-Printable.
  • Fixed some bugs relating to Smart cut and paste in message editing.

I also ran into another long-standing bug (it’s amazing how pretty fundamental bugs can go lurking unreported for years!) which I started to fix, and then backed off. It’s a stupid issue where “child” windows are tracked via a parent window and an index into the parent window’s list (e.g. the group index in the parent window). That works fine until the parent’s array changes, for example by a resort or quicksearch.

It may sound easy to fix, but there are some complications with the full groups window that make it a bit more tricky.

This is one of those bugs that makes me tempted to start rewriting MT-NW from scratch in Cocoa, and pull in code from the old codebase bit by bit. However, this is a huge task (probably over a year of heavy part-time work), and not one that I’m prepared to embark upon.

Thinking about this also put me in mind of the the real cost of writing and maintaining a freeware application. Taking into account the hundreds of hours that I’ve put into MT-NW over the past 8 years, and using a pretty conservative hourly rate that a developer would get paid, the cost is at least $100,000. Makes you think, eh?

permalink | computing/mac/mtnw | 2007.11.19-22:33.00

ColorDesigner

I just found a pretty nice color design tool called ColorDesigner (screenshot), which is ideal for picking combinations of colors to use on web sites. All the color suites you see on this site were chosen using it.

You can find get it from the author’s site, or download from freshmeat.net

There seem to be a few bugs (like failing to track saved documents), and there’s some stuff that I don’t understand, but it’s pretty neat, and spits out CSS-compatible hex values.

permalink | computing/mac/software | 2007.11.19-22:33.00

How They Improved Mac OS X Performance

MacIntouch just pointed to this really interesting review of various performance improvements in Mac OS X, on kernalthread.com.

Note to self: should read the other articles on kernalthread.com.

permalink | computing/mac/os | 2007.11.19-22:33.00

BEAM Robotics

I’ve been spending some time recently slaving over a hot soldering iron, building BEAM bots. You can see the results here.

permalink | computing/robots | 2007.11.19-22:33.00

Choosing a cellphone and carrier

The time has finally come for me to crawl out of the dark ages and get a cellphone. But what a rat’s nest this is!

GSM, or CDMA? Do you want AMPS with that? How about TDMA? Oh, and if you want some data, how about WCDMA or 3G?

GSM (Global System for Mobile Communication) is a open standard for mobile phones which is widely used in the rest of the world (especially Europe and Asia). It’s based on TDMA. The advantages of GSM are that there are more cool phones, you can easily switch phones (as long as they are unlocked) by swapping your SIM card, and data service is readily available.

In the US, Cingular (including the recently merged AT&T) and T-Mobile use GSM networks. Cingular/AT&T have more coverage than T-Mobile, but T-Mobile has better plans. Cingular’s network uses the 850MHz and 1900MHz spectrum whereas T-Mobile is exclusively 1900MHz; 850MHz gives better in-building reception, so if you want to go GSM, Cingular seems to be the best choice (Cingular and AT&T are actually converting away from an older digital technology, TDMA.)

CDMA is a technology developed and owned by Qualcomm (no open standards here), which works in a different way to TDMA. It has technical advantages over GSM, in that networks can have a higher capacity (at the expense of voice quality), but is not necessarily technically superior. Also, some CDMA phones also include analog (AMPS) capability (more of which in a minute).

In the US, Sprint and Verizon use CDMA networks. Sprint uses a 1900MHz spectrum (again, poor for in-building reception), and Verizon mostly uses 800MHz CMDA, which gives better reception. So, if you want a CDMA phone, go for Verizon.

There is a third, older form of “cellular” technology, AMPS (Advanced Mobile Phone System), which is an analog system that has much greater coverage than the digital networks (GSM and CDMA). AMPS is used by road-side emergency phones and GM’s On-Star system, but it’s being phased out. However, if you want coverage in rural areas where the digital networks don’t reach, then you want a phone with analog capability, which really constrains your choice of phones. No GSM phones support AMPS, so if you want analog, you have to go for CDMA.

If you are now totally confused, here’s a table which summarizes the repercussions of the technological issues.

So, after digesting all that, I figure that I’d get the best coverage and reception from Verizon with a 850/1900MHz phone with AMPS capability (aka analog roaming). Looking at their phones, the Motorola V710 is one of the few non-sucky phones with some hope that it might be able to sync on Mac OS X over iSync. Furthermore, the V710 has analog roaming.

However, what Verizon don’t tell you is that the V710 you get from them is crippled. They turn off a bunch of features on the phone (like Bluetooth OBEX object exchange) so that you have to use their pay-per-use services instead. Oh, and they just discontinued the V710, replacing it with the E815 which doesn’t have analog. Great.

So, maybe I should look into Cingular/GSM. The choice of phones is certainly much greater, and may more of them are iSync-friendly.

permalink | computing/equipment | 2007.11.19-22:33.00

Certificate UI

In browsing through the open Camino bugs I came across bug 151656, which has always niggled at me. To be a serious contender for some users, we need to have basic certificate handling capability.

Some quick LXRing showed that we just need to implement nsICertificateDialogs. However, we should also be able to display certificates (so that the user knows what they are accepting), and give the user a way to get at the certs they’ve accepted before. In other words, we need a bunch of new security UI. Fun!

permalink | computing/camino | 2007.11.19-22:33.00

Camino

It’s about time I started keeping people up to date on what I’ve been doing with Camino, just so so that Mike doesn’t get all the glory!

Recently I implemented global history on the Go menu. Before we just had session history there, which was pretty much useless, so having global history makes it a lot more useful. The menu and its submenus are build using a HistoryDataSource object that I wrote for the history view, so the implementation was fairly easy.

I also beefed up our site icon (aka favicon) code a little, adding support for site icons in <link> elements (thanks to a patch from Ludovic Hirlimann), adding a cache of site icon images, and added site icon display to the history menus, and the history view. It’s not ideal, because the site icons are cached in Necko’s disk cache, which goes away if you crash, and it doesn’t retain https data, so icons for sites that serve them up over https, like Bugzilla, aren’t retained. There are also some odd issues if you try to load icons from the disk cache while in the process of displaying the history menus; the submenus don’t show up. Finally, you can’t synchronously say “give me the image for this site” (because necko disk cache loading isn’t synchronous), so you can’t populate all the menu items in history with icons the first time.

To solve these issue I’ve been pondering writing a simple directory-based cache for site icon images. It would just use a plist catalog file, and hash the icon url to get a filename. We could then load the images directly from disk when we needed them.

permalink | computing/camino | 2007.11.19-22:33.00