How to Stop Me from Ever Using Tables for Layout Again

If I get what I ask for, I will never use another table for layout purposes ever. I swear on your grave (this is to align the incentives properly). I want a CSS 3-column layout that does all of the following:

  1. Puts the content div first.
  2. Allows the content div to expand.
  3. Is fluid (i.e., if the browser window expands, so does the width of the page).
  4. Allows me to fix the width of the outside columns.
  5. Has a header and footer that expand the width of the content plus two columns.
  6. There must be no space among the columns or between the columns and the header or footer.
  7. I must be able to specify different background colors for the header, the footer, and each of the three columns.
  8. It must not rely on images to make the effect occur (bandwidth, people–plus I need to be able to edit this sucker without Photoshop).
  9. It must be pixel-perfect on IE 5.5+, Safari 1.0+, and Mozilla 1.0+ (and associated browsers using that version of Gecko).
  10. It must be legible in IE 5.x for Mac.
  11. The content of each column must align to the top at least.
  12. The column background colors must extend to the bottom of the page.
  13. Oh, and one more thing: it must not matter which column is longest.

That’s it. That is trivial to do with a single table (styled, of course, with CSS), but I’ve been searching several resources and I can’t find one that does all of that. Remember, the solution must hit each and every one of those points or I just can’t replicate the designs I get in Photoshop, and asking me to get the designer to change or the project manager to understand or the client to accept limitations does no good–trust me, I’ve tried.

I don’t even require that I be able to vertically center or bottom-align the content. Top-aligned is fine. It doesn’t have to work in Netscape 4.x. It doesn’t have to work in IE 5.0. I can give all that up in return for giving up the necessity of left-to-right ordering of tables plus their misleading semantics.

They’re Sorry, but I Feel Better

As a guy who creates Web sites for a living and has occasionally had his chops gently busted about quality control, things like this strangely make me feel better. This is what I saw when I tried to go to Amazon.com just now:

sorry.png

Sometimes even Amazon frickin’ .com has bad days.

Another Thing I Could Use in CSS: a Replacement for valign=”bottom”

block-align: bottom

Just a way to make sure that block-level items are glued to the bottom of their containing element, however high that element may or may not be. That would solve me having to stick in tables with valign="bottom".

All I found during my Google search before deciding that profitability was the better part of discretion and discretion was the better part of standards compliance were a bunch of forums with people asking, “how do I do this?” and other people saying, “it should work this way,” and still other people saying, “Except in $BROWSER.”

The Economics of Open Source Software

At Cafe Hayek, Don Boudreaux writes about cheaper versus costless goods, and how costless is better than cheaper for the overall economy. His main point is about eliminating some of the fear over global trade, but I noticed it’s a nearly perfect analogy for Free/Libre Open Source Software (FLOSS — a catchy, but not sexy acronym).

His hypothetical scenario is thus:

Suppose a housewife one day accidentally discovers that a gallon of tap water combined with a dash of salt, a pinch of flour, a drop of ammonia, a splash of cooking oil, and tiny bits of several other ordinary kitchen ingredients will produce a concoction that cleans and sanitizes dishes, clothing, countertops, sinks, windows, automobile exteriors and interiors, household pets, and infant children. It also is astonishingly effective at fighting cavities, whitening teeth, and keeping gums healthy – and it keeps breath fresh for 24 hours. This remarkable all-purpose cleaner is 100% safe and totally effective. The cost of producing each gallon of this stuff is $0.02.

Further, in a fit of magnanimity, this resourceful woman publishes her finding on the Net, free of charge.

He then contrasts this against her other option, if she chooses to go public:

Now change the example just a bit. This housewife makes this discovery but, in a fit of self-interestedness, she keeps the concoction secret and starts producing it herself, selling it retail at, say, $5.00 per gallon. Its popularity is immediate and immense.

Notice that in both cases the source of innovation is not the production, but rather the recipe for production. In the first example she gives the recipe away, and production is done by anybody who finds it on Google and makes it in the kitchen. In the second example, it’s secret, and she sells the resulting product.

This is identical to FLOSS software. The recipe (code) is given away, and production (installation, sometimes compiling, and configuration) is done by the end-user. So the money that would have been spent on that software is now free to be used elsewhere. The overall economy is better, as other industries can benefit from this efficiency and the money will likely be spent there, and wealth will be created.

Note that only the cleaning products the woman obviates will be affected. Other cleaning products may see growth as people have more to spend. Similarly, programmers at Microsoft may see cutbacks from FLOSS software, but software development will likely just move up the chain. As operating systems become free, businesses may spend more on collaboration software.

Obviously, that’s what I’m betting on with my job. We provide our platform, Syntax CMS for free to anyone who wants to download it. I’m paid to:

  • Further develop the platform for use by my company for our clients’ needs
  • Provide advice on how best to use the platform to implement strategies we come up with for our clients
  • Program new, unrelated software
  • Program new applications using our platform

Our clients also pay us rather than do it themselves as it’s worth it to them to leave the configuration, programming, and hosting to us rather than manage that in-house. They’re experts at policy and other non-profit activities, generally, not software implementation, development, and maintenance. In other words, they outsource to us. And the reason they pay the premium for me to do it as opposed to a guy in Bulgaria or India is that I’m nearby, understand their organization, know the system better because I help develop it, and come up with creative solutions that push the limit of the software.

The time may come when CMSes are a dime a dozen, but then again, we’re not exactly waiting for that time to come. The reason we open-sourced our CMS is that we don’t see much benefit in keeping it secret. There are plenty of other programs out there. We wanted to remove that issue and focus on what makes us worth hiring.

Time will tell, but it’s nice to know that at least some economists think I’m doing the right thing for the economy, not just the right thing for policy-oriented non-profits.

Now THAT’s a Sandy Smith, or Search Engine Optimization This Week

In a fit of ego, I checked Google’s results for “Sandy Smith” and found myself knocked from the top spot. Since this guy had been trailing me for some time and I thought it due to my annoyingly precise adherence to Web Standards (not just Web standards) including title attributes everywhere, I was curious as to the structure of his page.

Low and behold, go to this page and view the source. The guy has obviously had someone stuff his page for search engines…and it seems to be working. Web Standards? Web standards? Pooh! Pah! Pish Posh! Tish Tosh! An SEO Jedi cares not for these things. Apparently you just shove the thing chock full o’ TITLE tags with every phrase you want searched on, with some minimal text about your content.

Well, I suppose he is selling something so he needs it more than me.

In related news, it looks like a British site has a picture of me after that final bender in Greenwich.

Toyota (Linux) Sucks, Ford (Microsoft) is Great!

Toyota (Linux) completely sucks. My company wanted to haul lumber across dirt roads (build an e-commerce app), but we forgot to budget for a new car and we don’t know anything about driving. So we hired a consultant to find somebody’s car to borrow. He got us a Toyota Corolla his dad got working out of a junk yard (PHP Web application coded by a sixteen-year-old who works for N’Sync CDs).

Now, it couldn’t hold much lumber (had a software-programmed limit to the number of items a customer could order) and we jerked the wheel back and forth like in the movies (CEO’s cousin’s son runs the servers) and, what do you know, it crashed into a tree (it crashed the server).

So the next year, we planned carefully (planned carefully), learned how to drive (figured out what this “Web” thing is), and hired a trucking company (competent consultants) to lease several Ford F-350s (Expensive Windows servers with big license fees on some fairly hefty hardware managed by professional sysadmins) for us and haul the lumber. Suprisingly, everything went smoothly and we only paid 3000% more (everything went smoothly after they payed some gargantuan amount more)!

You can read why Ford (Microsoft) thinks Toyota (Linux) sucks and how we’re proof in this eWeek article.

Plus, you can read about my brother’s company that bought a Toyota truck and then hired monkeys to drive it who had a custom rig that would only tow one brand of trailer (Linux solution maintained by guys who didn’t know what they were doing and only knew how to hook their app up to Oracle)! More proof that Toyota (Lunix) is teh suck! Ford (Take me, Bill Gates, I want your love child!) makes the best cars (operating systems) EVAR!

Syntax from my Breadgiver

Or Word from the Paycheck.

Oscar beat me to the punch, but Syntax CMS 1.1 is out.

This includes some nifty code from me that required a database upgrade (content items can now be featured on one section while displayed as regular content on another–and the system can be expanded to define other “publishing modes” beyond regular and featured), hence the .1 version number.

Oscar also sped up things significantly, particularly in the admin tool. There are also some further refinements to permissions. They’re reflected all over the admin tool–datatype-level and object-level.

Of course, I found a couple of bugs today right after the release, so at some point soon I’ll have those in CVS for the .1 release. However, they’re not really show-stoppers.

A Guy Goes Into a Housebuilder’s Office…

…and the housebuilder says, “Hey, your new house is just about done, here are some pictures from the construction. We just need to finish painting and everything will be ready.”

The customer says, “That’s great, but I think we need more windows. Can we put in some more windows? And instead of 3 bedrooms I’d like 4, but we can take out one of the baths and some of the yard so it should even out. Can you do that by next Thursday?”

The homebuilder is aghast. “Well, I could make those changes, but certainly not by next Thursday. I’ll get with the architect and my suppliers and see if we can present you with a design and an estimate, then we can talk schedule.”

The customer stares at the homebuilder quizzically. “What do you mean, estimate? I’ve already agreed to pay you $450,000 for the house, and the contract was for a house. Now, if I could just show your guys kind of what I want out at the site, I’m sure they could build it. If you don’t do it, I’m afraid I’m going to withhold payment and find a new contractor.”

Crazy, right? But this happens in software development projects many, many times per day, just in the USA. You can’t redesign a house at the last second without bad things happening to the architecture. A Web application is no different.

You certainly can’t expect to get more house for the same money just because you claim you didn’t understand the plans. Yet clients continually ask for more despite the fact they’ve never paid for it and have signed a contract stating exactly what they’ll get.

The only thing that’s different is that in software, there are no materials costs, just labor. But if you think it’s materials that make houses so expensive, you must rent.

It’s sometimes a wonder to me that we managed to climb out of the primordial ooze, let alone evolve opposable thumbs.

And Now, a Word from My Sponsor: Syntax

Work-related news: My company just officially released Syntax CMS to the world as open source.

It took rather a bit of effort to clean it up and get it to the point we thought it releaseworthy. It’s still not perfect, but it does a few things that low-end open source CMSes don’t do, or don’t do very easily. I’ll leave the rest of it for the blog we have about it, but thought I’d point it out here.

As always, if you choose to use it, report bugs and contribute patches at the project source page on Tigris.

Update: Of course I mean “sponsor” in the sense that Forum One pays me the paycheck whence the scratch to maintain this blog and keep body and soul together comes from. Others will doubtless point out that I don’t have a soul. They may well be right. But the company, rightly so, has nothing to do officially with this blog and all opinions are mine…and I think the company is very happy that this is so.

Not Getting It, Eric Meyer Edition, Plus Sanity from the WaSP

Eric Meyer still doesn’t get it. He wants anything that hasn’t been approved out of HTML, or there will be hell to pay!

Of course, the theorist in me is quivering in outrage. The browser-wars veteran isn’t too thrilled either. For years, we heard Microsoft and Netscape say things like “standards are secondary to customer demands” and “standards aren’t as useful as the cool new proprietary features we’re adding”. These things need not be inimical to standards support. They should not require a breaking of standards.

I’m a browser wars veteran, too, and there’s a big difference between supporting standards and implementing only the standards. Fortunately, there’s actually somebody at the usually insane Web Standards Project who Gets It:

Overall, though, it’s not that big a deal. Safari does an excellent (not perfect) job of supporting the various HTML, XHTML, and CSS specs as they’re written and ultimately, that’s what’s most important. If developers don’t want to use the extensions, they don’t have to. The vision that the WaSP has been most adamant about is that developers should be able to build sites that conform to the published specs and have them Just WorkTM in every browser. If browsers want to support additional proprietary extensions on top of that, they’re free to do so and the rest of us are free to ignore them.

Yes! Somebody who actually acts like they built a site between 1996 and 1999! The problem then was twofold: content authors targeting code to one browser and one browser only, and browsers defining the same term in different ways.

The first case was much more annoying from a Web user’s perspective (hello, remember when the Web was for creators and users, not browser makers, user agents, and standards gurus?). That was the source of the dreaded “This site works best in StupidBrowser 4” badges. The problem there was authors who thought their latest trick was more important than letting users read their content. This seems to be a stage people go through when they come to the Web, and most content authors have now gone through it, except for Microsoft-happy CTOs, who are by definition morons. The solution was education about cross-browser compatibility. A tool to achieve that was standards compliance, but the tool was not the be all and end all–it was a means (conform to HTML 4 elements only) to an end (your content works for lots of people).

The second problem was more annoying from a content author’s perspective, particularly if you were trying to be good about cross-browser compatibility. Different browsers treated whitespace, width, and borders differently. Trying to get your site to look the same in multiple browsers was an exercise in frustration.

Sounds familiar, doesn’t it? That’s because, thanks to innovation in Standards coming from a group of purists and people who want to use HTML for data interchange rather than browser authors and content creators with wide-ranging feedback, standards are hard to implement and ambiguous in application. Even the “reference browser” provided by the W3C can’t keep up.

Ironically, if you code to HTML 4.01 and use the Bad Old Way of doing things, the latter problem is gone from modern browsers. All of them basically support the Netscape 4 way of doing things identically. It’s when you do it the New Good Way that suddenly simple things just fail miserably (try getting side-by-side floating boxes within a larger box that scale in width working in IE 5 through 6 without browser detection, I dare ya–and that’s just one browser).

Simply adding extensions that other browsers don’t support, as long as content authors don’t use them in ways that exclude people from sites, just isn’t a big deal. It never was. IE’s addition of the MARQEE tag never affected me, as few people put important information in it, and I never had to use it. Netscape’s handling of whitespace in table cells affected me far more, and table cells and whitespace are all standard components of HTML documents.

Dave Hyatt has shown the way: innovate in response to developer demand, do so in a way that is easy to implement, consult with other browser makers to make sure you and they have the same definition of “easy”, do so in a way that older browsers can safely ignore, and contribute those innovations back to the standards body for blessing.

We need to get HTML back on course, rather than becoming a weird mishmash of automated data interchange and cataloging librarian nirvana RDF hell. The Right Tool for the Right Job. HTML is the Right Tool for written Web document exchange. It is the Wrong Tool for auto-descriptive frameworks or intelligent agents. Let’s focus on that, and actually make content authors’ and hence Web users’ lives easier.