Tag: internets

Jump to:

Article

What my recent redesign taught me about CSS

May 23 08

Repeat visitors (welcome back, both of you!) may notice a few things have been pushed about here on the site. I’ve been chipping away at this design for the better part of two months’ worth of spare time. So you’ll indulge me a bit of discussion. There’s just no way around it, boring as they may be, these sorts of posts are a necessary evil.

Less strict / Citation needed

I’ve decided to switch from XHTML to HTML 5. I was initially hesitant. HTML 5 felt like a cop-out. I’d spent all that time being strict, poring over validator messages. Was I willing to throw that time and effort away?

I guess I had never really understood why I was using XHTML vs. HTML. I suppose it was just because that’s what everyone else was using, and they probably knew better than me. Also, it was a badge of honor to know that my site validated against a stricter doctype.

I’ve lost track of the address, as it’s not on the WHATWG site as far as I can tell, but a little while back I read an article about why HTML 5 was being constructed. It made sense. The gist was that XHTML, particularly XHTML 2, was ill-suited to the purposes of many websites.

The real reason though, the real tipping point, was something incredibly small. One tag, actually. A tag most folks don’t even use regularly: <cite>. In contrast to the W3C, HTML 5 has a very clear definition for the use of <cite>. It’s for titles, and titles only. This is exactly what I wanted. The word “cite” might make sense for the source of quotes, but it’s a stylistic nightmare trying to determine which one gets italicized and which one doesn’t. So, that was it. I was going with the spec that had a better description of <cite>.

pre-cisely

Following the guidelines established in Richard Rutter’s A List Apart article on the subject I’ve set the font sizes in ems and done my best to maintain a steady vertical rhythm.1. Keeping the base font size as whatever the browser uses as a default — generally 16px — I calculated the desired size for text-containing elements such as <p>, <h1>, and the like. I tried not to set the font-size on any <div> containers. This kept me with a standard 16px em from which I could determine margins and paddings.

1 Within reasonable limits of my sanity. Certain elements just proved unwilling to concede at which point I ever so eloquently said “Fuck it! It’s good enough.” At least the text you read will be pleasantly configured.

Then I got to the <pre> element and things started acting funny. In one of my test cases I threw a bit of <code> inside a <pre> the way I would expect to do were I sharing some snippet. When I loaded this test in Firefox I was curious to see the text rendered quite a bit smaller than I had expected.

I didn’t set a font-family nor a font-size on the <pre> because I didn’t really see the need. It was just a box that honored line-breaks. I’d be filling it with <code> elements almost all of the time. I’d already set a font-family on those. Besides, if I changed the size that I wouldn’t be working from the standard 16px size and I’d have to refigure my margins and paddings. Using child selectors, I’ve set the size of <code> elements only if they are children of <pre> elements. It looks a bit like this:

pre code {
	font-size: 0.875em;  /* 16px x 0.875em = 14px */
}

Only, in Firefox, instead of 14px I was getting something in the neighborhood of 11px. After some consternation I realized that Firefox (and likely other browsers) sets up <pre> elements as fixed-width elements. By default, these have a font set at 13px. Sure enough, when I put plain ol’ text in there it came out at 13px.

I wanted a solution that didn’t involve setting a font-size on <pre> elements. After puttering about for a brief while, I came up with one.

pre {
	font-family: inherit;
}

This little line caused the <pre> block to pick up whatever is set by its parent, either a <div> or the <body>. Text inside won’t be fixed width by default nor will it be 13px unless told explicitly to be so.

Relatively speaking

One of my favorite additions to this version of the site is the sidenote, seen above. In fact, that note is one of the major driving forces behind the redesign. I’d just become interested in adding notes of some kind to my writing. I’m not entirely happy with the idea of footnotes in HTML. They work in print because a print page is designed with a specific page size in mind. But where to put them at the bottom of an ever changing landscape? On a page that might have any number of disparate posts?

So, this site uses sidenotes. They’re floated off to the left using negative margins. Negative margins feel pretty solid to me. I’ve had the heebie-jeebies about absolute positioning for years. Absolute positioning, I feel, is best left to scripting. Notes are styled like so2:

2 Oh lordy! It looks so crazy here in public. I swear these numbers seemed reasonable at the time.

.note {
	float: left;
	font-size: 0.75em;
	margin-left: -15.083em;
	text-align: right;
	text-indent: 0;
	width: 13.3333em;
}

Care to guess which major browser choked here?

notes on Internet Explorer 6 with and without position relative set

Figure 1 Internet Explorer 6 with position: relative (left) and without (right).

What you see above is a series of screenshots of a very early version of the site on Internet Explorer 6. The shot on the left is what the note is supposed to look like. The shot on the right is what I actually got using the code above. The text of the note just dropped off the face of the earth in IE 6. Increasing or decreasing the text size didn’t do anything. Nor did altering the size of the browser window. It was just gone. Except for the index.

The note indices are relatively positioned a little bit above the baseline. I’m not using <sup> tags because those are presentational and discouraged. When I saw that little one sitting there amongst a missing note it didn’t take long to figure out that relatively positioned elements showed up just fine. Everything else was swept away.

The solution, of course, was simply to add position: relative; to the note styles. Notes are now floated left, and positioned relatively to themselves. But since we haven’t added any actually positioning, they don’t move.

.note {
	float: left;
	position: relative;
	font-size: 0.75em;
	margin-left: -15.083em;
	text-align: right;
	text-indent: 0;
	width: 13.3333em;
}

In summation

So, that’s the obligatory redesign post. I reserve the right to continue to discuss CSS and HTML, but I’ll try my darnedest to find some kind of hook, as I tried to do here. Don’t worry, I’ll get back to the cross stitchery as soon as feasible.

Tags

Since last we spoke

Jan 13 08

Once again I’ve fallen into a bit of a torpor. My attention to the vast world of the Internets has dimmed. Every few days I start up NewsFire only to be overwhelmed by the sheer mass of new posts I’ve ignored. Typically I just mark all of them as read and close it again. I just can’t bring myself to be interested lately.

I’m going to give it another go, and try first to start with this little blog of mine. While I’d never expect to have something to post every day, I’d really hate to abandon it.

So, catch up time: Since last we spoke I did manage to secure employment. It’s a second shift position — less than ideal, but better than nothing. I start in a little over a week. I’ve gone and completed my physical evaluation, gotten another vaccination, and picked up an ID badge. I’m hoping a job brings some kind of sense of purpose.

I haven’t let the past few weeks go completely to waste. I have a few new projects to post as soon as I’ve mounted and photographed them. One of these is a particularly impressive bit of cross stitchery that has been about a year in the making (more on this later).

Most of my time, however, has been spent on Dragon Quest VIII and Super Mario Galaxy. The former I picked up some time last year without devoting much time and the latter was a Christmas gift. Both are excellent.

It hasn’t been all video games and cross stitch. My other, other out-of-work obsession has been vegan cupcakes. Here’s my latest, and prettiest batch: Chocolate Mint Cupcakes:

Tags

I'm getting pretty good at flipping people off

Aug 05 07

Despite making little or no inroads into encouraging cycling — to the best of my knowledge — Richmond has proven herself rather amenable to a bicycle based commute. Many of the streets in The Fan are quite pleasantly wide enough to allow a cyclist ample space apart from traffic. Speed limits, tempered by abundant stop signs, are low. A great majority of the drivers on the road are mindful of cyclist’s rights.

I have, however, experienced a number of close calls. Many of these were squarely my fault and I accept all responsibility for them. A few were solely the fault of selfish drivers to whom I have angrily displayed my middle finger. While surely not the best tactic to foster good will towards the operators of two-ton crushing machines, this act did provide some solace.

I have been yelled at once, by an older fellow as I squeezed past a line of cars awaiting a left-turner. I was in the parking lane quite content to maintain momentum through a green light when this asshat decided he needed to move directly into my path to skirt around the turning automobile. Despite inconveniencing him for no more than a second or two he felt the need to shout something at me. I only caught the word “idiot” as the rest was utter gibberish.

A jerkwad towing a trailer forced me off the road in a turn. Unmindful of the swath of space his trailer occupied he whipped about the curve at full speed. I narrowly avoided being sideswiped into the dirt.

Just the other day a woman at a stop sign decided I mattered less than any oncoming motorized vehicle and turned directly into me. Or would have, had I not come to a screeching halt in the center of the intersection. I would point out that I had no such stop sign to contend with.

Yet, apart from these few incidents my commute has been pleasant. I catch more admiring glances than angry glares, or so it seems to me. Were the heat not so oppressive of late I would have nothing to complain about.

You may notice a few awkward changes around here. I’m in the midst of a redesign with very little inspiration to guide me. I decided to go ahead and cut clean my script.aculo.us usage that I might use the lighter mootools instead. Not knowing what to do with the content that once got served as JavaScript menus I set them free along the side. I’m none too pleased with the outcome, but will make efforts to repair it shortly.

Tags

On the grid

Mar 26 07

I’ve been toying with the use of ems—a typographic space typically equivalent to the width of an upper-case letter M—to define the width of my columns for a while now. I’ve been doing this to create elastic designs wherein the body text is of a comfortable width. I’d like to think I’ve succeeded in some small way, though I’ll always have room for improvement.

The benefit of using an em as a unit of measurement is that an em is based on the width of text itself. As text size is altered by stylesheets, by scripting, or by user agent controls the number of characters in any given line doesn’t change. By contrast, percentages are based on the width of the parent and pixels are static and unchangeable. A change in text or window size in which the containing element has been set in percentages or pixels will cause the text to shift. This may create a paragraph that is uncomfortable on the eye as it is too wide or too thin. Without also altering line height the overall appearance of the text might be lessened. To illustrate the advantage of setting column widths with ems I whipped up this quick little example page

Without knowing it I had been working towards a typesetting standard that has been used with success for centuries: the grid. To be fair, my use of the em has no particular connection to the grid. I could have just as easily been working with pixel measures and arrived at this point. Because my primary concern was a comfortable reading width I found it quite reasonable to consider the rest of the page equally.

Grid systems for the web

Two excellent slideshows from South By Southwest Interactive 2007 have been posted to the web. In Web Typography Sucks Richard Rutter and Mark Boulton describe the dismal state of online typography and what can be done about it. It includes a section on grids. In Grids Are Good Khoi Vinh constructs a fake web portal on a grid. Both presentations demonstrate how much more pleasant your content can be when applied to classic rules of layout and style.

Inspired, I whipped up a few simple background images that you can use to put your own sites on grids. In the archive you’ll find a number of small images designed to be tiled as background images. It has columns from 3 em to 6 em (with 0.5 em gutters) for text size equivalent to 12 px. It also has line height guides for most of the common heights. Set them as the background image on a containing element to help fine tune your grids.

Download: gridtools.v1.00.zip

These were developed specifically for a project I’ve been working on for the past few weeks and may or may not be of use to you. Try them out, see if they help you, and drop me a line if you have any comments or complaints.

Tags

Mac software I've loved enough to buy, part two

Jan 30 07

This is installment two of my series on Mac software I’ve found useful enough to pay real honest-to-god money for in the hopes that you too might find something you love. I started cataloging all of the applications I’d purchased a little while back to contrast against the amount I’d spent on software (excluding games) as a Windows user. The two figures are not even close. In all fairness, I didn’t start using a Mac until around the time I got a “real job” and steady income. Still, I spent a hefty sum on PC games and very little on other software, choosing to make do with freeware or unregistered shareware. Take that to mean whatever you will.

Salling Clicker


Salling Clicker is quite possibly the nerdiest app I’ve ever paid money to use. It turns your Bluetooth enabled mobile phone into a robust remote control for your Mac. I was so excited about the possibilities of it that it influenced the phone I bought — an aging Sony-Ericsson T616 that I still use to this day despite a bent charging connection because I hate every other phone offered by the major phone carriers. At the time — way back in 2004 — finding a phone with Bluetooth capabilities was no easy feat.

As it uses Bluetooth you don’t need to worry about line-of-sight as you would with an infrared device. So long as you can stay connected (and with the Bluetooth receiver in a G4 PowerBook that’s unfortunately a bit iffy) you can browse your iTunes library, check for new email in Mail.app, or do any number of other nifty little things. Not only that, it’s scriptable with AppleScript. Now that the current line of Macs (aside from the Power Mac variety) come with Front Row and remotes it might not be as novel to control a Mac with a remote control, but Salling Clicker makes up for that with increased expandability and compatibility.

Salling Clicker costs $23.95 and is available at salling.com. There’s even a Windows version available.

Cha-Ching


Before I got a checkbook I started writing all of my incoming and outgoing cash flow in a little notebook. By the time my checkbook finally came in I realized that I hated writing in that little register and I kept using the wee notebook. Well, now I don’t write it down anywhere. I use Cha-Ching.

Cha-Ching is a great example of what differentiates a Mac app from a Windows app. It’s simple, pretty, and effective. Using Cha-Ching is no more complicated than my little notebook solution, nor should it be. You enter a transaction, Cha-Ching does the math for you. Once you’ve entered a transaction you can assign tags and make smart folders (in case you ever wanted to see just how much you spent on software recently). It integrates with Address Book to autofill fields. Cha-Ching even lets you take photos of the stuff you bought with iSight. You can back up your data to .Mac. It does what it needs to do and never gets in your way.

Cha-Ching costs $14.95 while in beta and is available at midnightapps.com

NewsFire


When it comes to Mac RSS readers there are really two choices: NewsFire and NetNewsWire. Preference is split divisively between the two camps. I took them both for a spin and my choice was NewsFire.

NewsFire, like many Mac apps, is an attractive one. It’s got your neat fades. It’s got your rounded buttons. It’s got pizzazz. When a feed is updated it swoops up to the top of the window. NewsFire also lets you create Smart Feeds much like other “Smart” groupings in OS X. You want to know which feeds have audio? Video? NewsFire can do that. Not keen on the iTunes podcast system? NewsFire has an integrated audio player. And because it uses Safari’s WebKit engine news posts appear exactly as they would in Safari, embedded YouTube videos and all.

NewsFire costs $18.99 and is available at newsfirerss.com

So there’s part two. Agree? Disagree? Have an alternate list? Comment away!

Tags

Mac software I've loved enough to buy, part one

Jan 16 07

Macworld 2007 was a bit of a bust for the Mac. All of the major announcements being consumer products with nary a mention of Leopard or iLife to be found. Which is not to say we aren’t still excited about the iPhone or the AppleTV, they just aren’t Mac products. So I decided to make a list of software available for the Mac that I found to be excellent enough to put my hard-earned money down. Over the next couple posts I’ll bring you lists of some terrific applications the Mac community has developed in the hopes that you too might find worthy of your support.

TextMate

TextMate
When it comes to serious text editing on the Mac there is contentious debate between two camps: those who love TextMate and those who love BBEdit. While both are excellent applications and justifiably beloved there are two very good reasons to choose TextMate over BBEdit:

  1. Ruby on Rails – TextMate is the editor of choice for Ruby on Rails development and, from what I’ve read, handles it significantly more gracefully than does BBEdit.
  2. Price – TextMate costs about $75.00 (depending on the exchange rate) less than BBEdit. That made a pretty big difference to me.

It’s no simple task to detail precisely why TextMate is such a worthwhile purchase. Unless you have need of a powerful text editor, and many of you might not, you won’t find much to love here. Web developers and software authors, however, have a great deal to love in TextMate’s tag completion, macros, and color coding. TextMate is expandable by means of Bundles and has the support of a devoted cast of developers. If it doesn’t support a desired language “out of the box” chances are good someone has put together a Bundle for you.

TextMate costs €39 and is available at macromates.com.

FlickrExport for iPhoto

FlickrExport
Flickr is great and all, but wouldn’t it be even greater if you could upload your photos directly through iPhoto and saving yourself at least two steps? That’s precisely what FlickrExport does. Once installed an extra option is made available in iPhoto’s Export screen. Before uploading you can set tags, change the photo’s title, add a description, and scale the photo as needed. After that it’s just a click and your photos are on Flickr. I can’t imagine using Flickr without it anymore.

FlickrExport costs £12 and is available at connectedflow.com. A version for Aperture is also available.

Keyword Manager

Keyword Manager
Dealing with iPhoto’s keywords using the default set of tools leaves a bit to be desired. I never made much headway into putting them to good use until I picked up this plugin. Keyword Manager adds a few extra windows to your iPhoto allowing you to easily and deftly add keywords to your photos and keep them organized. First, it allows instant access to keyword additions directly through one window and keyword organization through another. Keyword Manager keeps your keywords in hierarchical order. Family photos could be tagged with a name, which is kept under a family category itself nested under the primary category “Family.” Or photos of particular buildings in a city might be categorized under that city (itself under the country in which that city is located). Anal retentive taggers rejoice! Your ability to create Smart Albums will be drastically improved.

Keyword Manager makes a great companion to FlickrExport above as all of these keywords assigned in iPhoto will automatically be posted to Flickr. Your Flickr photostream will thus be kept just as organized as your iPhoto Library.

Keyword Manager costs $19 and is available at bullstorm.se

That does it for my first catalog of Mac applications. Stay tuned for another batch of apps you’ll wonder what you ever did without. Disagreements? Suggestions? Your comments and critiques are appreciated.

Tags

Internets! Send me something good down them tubes of yours.

Sep 26 06

I may be a bit late to the party, but I’ve been playing around with del.icio.us lately and I’m starting to really like it. I’ve found excellent software for managing my bookmarks like Pukka, Delibar, and Cocoalicious which piqued my interest. Mostly I like del.icio.us because the “community” aspect can be wholly ignored without effort. I was never able to really grok onto sites like digg because the community is front and center. Every time I want to check out a link I would end up at the comments which I would then read and get angry with myself for wasting time reading them. I don’t have much of any patience left for rampant flame-baiting anymore.

I primarily use del.icio.us as a link dump. If I run across a website on another computer I’ll post it to del.icio.us and usually forget about it for roughly 3 days. Like I said, I’m still getting used to it. Because I thought it was a nifty little idea with a neat presentation I added my del.icio.us cloud to the site (and yes, I’ll fix the colors soon).

I had signed up for the .Mac free trial to test the link and Address Book syncing but so far I have not had a good experience in that regard. I’m not terribly sure that I’m not missing something that should be obvious, but I can never seem to get my synced stuff to appear on the .Mac page. Maybe I can’t with the free trial. I continually get errors and complaints about syncing taking too long. As of tonight I don’t foresee paying for an account once the trial is up.

The .Mac experiment did net me one thing I might use though. I have a new iChat account. If you’ve got iChat, AIM, or Jabber and want to chat shoot me a message and I’ll send you my address. I might post it on the page, but .Mac accounts being email addresses and all I’d really rather not open that can of worms.

Tags

The past is a cancelled check.

Feb 21 06

Or, how I finally made it easy to look at the older bits I’ve made. Using a bit of TxP(TextPattern) jiggery-pokery I have made an archive. Two archives, if that is even possible.

Oh, the crud I have produced over the years. Working on this got me to thinking about previous incarnations — this is probably something like Sorrytown v3.2) — and what I might have posted in previous incarnations. I went digging into this past a bit — I happened to have backups of at least the most recent versions of my personal site laying around — and it made me realize just how little of all of this is worth saving. There’s a lot of apologizing for not updating enough, a lot of talk about insignificant little changes to the site, and a lot of talk about how I might want to update a little more or a little better in the future.

But hey! I made it easier to look at this most recent batch of whining self-indulgences and yawn-inducing nit-pickings!

Tags