Archive for the ‘Geekery’ Category
IE passive-aggressive about underscores in host names
Underscores aren’t allowed in host names, so say RFC-952 and RFC-1123 (don’t actually follow those links unless you enjoy reading technical specifications). I didn’t know this, maybe because I prefer hyphens (yes, I have an opinion on underscores vs hyphens, get over it).
It seems IE “enforces” this by quietly blocking cookies from any host that offends the rule. Of course, IE won’t complain when you visit a twisted, underscore-flaunting host, but if cookies are any part of the equation (say, required for login to work) IE will quietly ignore them. This will undoubtedly lead to hours of fun for anyone who is responsible for making the site work the way it should.
Cookies on ASP pages are blocked if the server name contains characters that are not supported by Domain Name System (DNS). For example, you cannot use underscore characters (_) in the server name. This behavior is by design.
Granted that’s an old change, 2002 old. Still, it interfered with my week so I’m taking this opportunity to complain about it.
Safari 4 Beta
I’ve been playing with the new Safari 4 beta for the past hour and there are some pretty notable changes. All in all I think it’s a pretty great update, I might finally be able to ditch that sluggish behemoth known as “Firefox” once and for all.
I’ll leave a real breakdown of the features to someone who is good at writing those things, but the short list is:
- The Windows version is now sporting a native Windows UI. The Apple UI has never looked quite right in Windows, I think this is a great change and a big step towards getting people to actually use Safari in Windows.
- Tabs in the title bar, similar to Google Chrome and Stainless. I’m not 100% sure why, but I expect it was well researched given the technical hassle it must have presented.
- Speaking of tabs, in old Safari once you started dragging a tab left or right you could no longer drag it out of the window, this is fixed in the beta. Kind of a nitpick but it’s been bugging me for a while.
- Bookmarks and History views now use coverflow. I think this is a hugely useful addition, I’ve been using SafariStand largely because of the coverflow history view it offers and I’ve found it very helpful.
- A “top sites” start page similar to what Google Chrome and Opera offer.
- Everything from Webkit. This primarily (to me) means the new, speedy javascript engine and a much improved web inspector.
Prettified Apache Indexes
For kicks I applied some jQuery and CSS to Apache’s directory listings.
Before:

After:

You can see it in action and download it. Some assembly required.
Sweet $20 Enclosure

I popped open my 1TB Fantom GreenDrive the other day and I was surprised to find a WD Caviar Green. Not bad, the WD Caviar Green is easily $100-110 anywhere online, and the Fantom GreenDrive can be found for $120-130. In short, you’re paying $20 for a very sturdy, USB/eSATA enclosure.
The GreenDrive is a little slow for a primary disk though (it’s “green” because the speed varies from 5400 to 7200 RPM, thus using less energy than an always-7200 RPM drive), but the Fantom G-Force runs at 7200 and is apparently also a sweet candy shell around some quality WD chocolate (okay, I’m going a little far there). I think I know where my storage money is going for the foreseeable future.
One definition of “Enterprisy”
Enterprisy:
A system that, with the right tools and considerable effort, can be made to do just about anything, but cannot do any one thing well, with any simplicity or with any elegance. Java and Windows are common examples of enterprisy systems.
Todays projects
Two quick hacking projects today:
- A plugin for Ubiquity (which I mentioned previously) that allows you to interface with Todoist. At the moment you have to hand-code your account token and a project id from the Todoist site, but you can already create quick notes by typing
todo reorganize officein Ubiquity.
- ExtraHead, a tiny plugin for Wordpress. I’m sure this functionality exists elsewhere in the Wordpress world, but I couldn’t find it after 10 minutes of Googling so I wrote a plugin. ExtraHead just makes it easy to insert arbitrary code into a page header, on a page-by-page basis. Just add a custom field with the key
extraheadand whatever code you want in the header as the value.
Web Content Formatting for Non-Geeks
Providing direct ways for non-technical content creators to edit web pages has been a dilemma since the dawn of the web. Indeed the larger problem, exposing powerful formatting and layout abilities without also exposing complex and cryptic presentation formulas, must realistically occupy a reasonably large percentage of everything we task personal computers for. The problem is complex, and a complete solution has not yet been found, but there are a number of powerful and elegant alternatives at our disposal. I’m going briefly discuss two options, embedded rich text editors and lightweight markup languages.
Embedded Rich Text Editors
The technologies the web relies upon have steadily advanced, new more powerful tools have been created, and thanks to the ever-enduring Moore’s law we can squeeze a great deal of functionality into a web page. There was a time when embedding a rich text editor in a page was an excessive and extravagant feat, yet today there are a plethora of simple ways to do it. TinyMCE and FCKEditor are the most popular, but many others exist (including the impressive YUI editor which I did not know about until today).
Embedded rich text editors are great tools but they may not be suitable for the discerning geek. In general these editors have a reputation for creating messy and verbose source code. How important this really is has been and will be a subject of debate for some time, but there is no question that clean, standards-compliant code is a good thing to have. When it comes down to it, I tend to think that if you can do something the right way with a reasonable amount of effort, why sacrifice correctness for a little bit of convenience?
Lightweight Markup Languages
When HTML is too verbose or complex for what you really need to accomplish, and rich text editors don’t give you the quality of code you’re looking for, you’re left with lightweight markup languages.
There are a number of different approaches to lightweight markup, in fact if you follow the Wikipedia link above you’ll possibly find more than you really care to know about, but there are only two that have emerged as the preferred choices among the current generation of web developers: Textile and Markdown. Markdown is great, but for the sake of this article I’m going to focus my attention on Textile, which is currently my favorite.
Textile relies on simple markup that is easy to edit in a plain text editor, or a simple textarea on a web form. A major benefit of Textile is that it is also easy to read in it’s unprocessed form, so editing it is relatively painless and not nearly as confusing as editing raw HTML. The syntax is easy to pick up, and new users can typically start authoring comment with very little introduction.
Here is a quick example of Textile code:
h3. Sample This is a sample paragraph, complete with *bold* text, _italic_ text, +underlined+ text and even a "link to google":http://google.com/. For kicks, here is a second paragraph.
And this is what it looks like when displayed:
h3. Sample
This is a sample paragraph, complete with bold text, italic text, underlined text and even a link to google.
For kicks, here is a second paragraph.
For a complete list of Textile samples view the example-based reference.
One of it’s greatest strengths, Textile adds a great deal in the way of proper typography. For most of the web, trademark symbols are left as TM, hyphens are substituted for en-dashes and “dumb” quotes are used instead of smart quotes. With Textile these nuances of type are easy to handle with very little effort. A (TM) is automatically converted to ™, a single hyphen is converted to an en-dash (two hyphens for an em-dash), and straight quotes around phrases are converted to smart quotes. With minimal effort you get a significantly more professional result.
Conclusion
Lightweight markup is not without it’s shortcomings. Rich text editors often provide enough visual aides to get people going with little or no introduction, and as I stated before the value of clean HTML in a web page is sometimes debated. In addition, the nature of rich text editors leaves the door open for more powerful features, such as built-in flickr browser or point-and-click YouTube video embedding. All the same, for most tasks, for most sites, I believe that lightweight markup languages are the best option.
Links of Interest
- Textile:
- Textile Alternatives
- Embedded Rich Text Editors
Clumsy Bumble
I’ve decided I need to make a video game, probably for the iPhone, of my little bumble bee. I’m going to call it Clumsy Bumble and gameplay will consist of tilting the phone around to navigate a bumble bee through a series of poorly drawn obstacles. There will be a faint but constant buzzing sound, not real buzzing mind you, more of a little buzzy song, something along the lines of “buzz buzzy buzz buzz buzzzzzzzz buzzy buzzy” (lyrics not finalized). The buzzing will stop when the bumble hits something, replaced by a pathetic shriek and the end of the bumble.
That’s one option. Another is to have a side-scroller (also with a buzz song and pathetic bumble bee shrieks) that requires tapping on enemies (creepy bugs, drawn by Jess on a napkin some booze-inspired evening a while back) at which point the bumble will destroy the target with laser beams from it’s eyes. As targets are destroyed, the bumble will emit a little giggle or if something goes wrong, a sad sound of disappointment.
I think the bumble will be named Claude, Claude the Clumsy Bumble. There will be merchandise too, plush Claudes, coffee mugs and toddler onesies.
That’s the plan anyway…
Ubiquity for Firefox
An interesting project from Mozilla Labs. Reminds me of Quicksilver (and I’m not the only one). Most impressive.
Ubiquity for Firefox from Aza Raskin on Vimeo.