Breadcrumb Script

I just hacked out this bit of PHP to make nice titles and header URLs throughout the site. It needs some customization specific to this site, but before I do that I wanted to post it just in case anyone wants to use it on their site:

Sorry, this code has been depreceated because it has a few known bugs and I don’t have time right now to go back and fix it up. Sorry!

Good Vibrations

Inspired by Textism, I have decided to personally abandon all–capital acronyms and words. It really breaks up the flow of the line to have a word that stands above everything else and hinders readability, so through the beauty of CSS I have approximated SMALL CAPS, an underused typographical tool. I’m also taking this oppurtunity to make better use of the <acronym> tag, which I use occasionally but not nearly enough, this time inspired by Mark Pilgrim’s excellent series on accesibility. An acronym will look like this, HSPVA, and when you hold your mouse over it should tell you what the acronym stands for. Tonight I’ll go through client sites I’ve designed and apply these concepts there as well. I hope you appreciate it, and now you know what it is so you won’t be like Julie and think it’s “tiny shouting.” 🙂

In other meta–news a new toy review (first draft) is up, and an FAQ

Anchor Tag Demystified

I’m writing this mainly for my sister Charleen, who wanted to know this for something on Mullenweg.com, but hopefully it will be helpful to anyone wanting to learn a little HTML.

Most Basic

The purpose of the anchor, or <A> tag, is to reference someplace. Links are the very essence of the web, the hyper in hypertext. Let’s talk about the most most important attribute, href. A very basic link might look something like this:
<a href="http://www.photomatt.net">PhotoMatt</a>
To break it down, the <a at the front indicates the beginning of the anchor tag. After that we have the href attribute, which basically tells the browser where to go when you click on that link. You can have a fully qualified address or a relative address there, which we’ll discuss more in a minute. The place we want to send the browser to is equal to “http://www.photomatt.net”. The two biggest mistakes people make when making an anchor tag are forgetting the equal sign and forgetting to quote the attribute value, in this case “http://www.photomatt.net”. (Note: you can quote it either with double or single quotes, which can be useful when echoing out statements in PHP.) Then we close the first part of the A tag (don’t forget the endquote!) with >. Now we write the text which we want to appear linked, which in this case is PhotoMatt, then we close the anchor tag with </a> to indicate that the link is over. You can enclose multiple words or even an entire sentence. That’s it! You now have a link. Note that all the code should be lowercase, like in the example above. This is a good practice in every version of HTML, and is required in XHTML.

Getting Fancy

Now I know you’re thinking, what more could there be? Well to be honest, there isn’t that much else. One common technique, and one I like to use on this site, it to use the title attribute to give a little more information about the link. The title attribute works functionally just like href, but instead the content displays as a tooltip or popup in most browsers, and can be useful for telling additional information about the link. Here’s an example:
<a href="http://www.photomatt.net" title="Photos and thoughts from Matthew Mullenweg">PhotoMatt</a>
The end result is this: PhotoMatt. In the title attribute you can put a description of the link, warn that it’s a PDF or Word document, warn that it’s opening in a new window, whatever you want. Zeldman.com makes great use of the title attribute on almost all his links.

Another commonly used attribute is target, which tells the browser where to open the link. You should use it when you want to open a link someplace other than the current window or frame. In XHTML the target tag is depreciated (illegal, gone) unless you’re using frames and the corresponding DOCTYPE. The goal of this attribute is to facilitate linking in frames. A common use of the target attribute is to open a link in a new window, and to do that you set the attribute equal to “_blank”. If you’re using frames you can set it to “_top”,”_self”, or “_parent”, which will replace either the entire window, the same window/frame, or the parent framesetting document. If you’re not using frames you should’t have to mess with much other than “_blank”, so don’t worry about this too much. There is one neat trick you might use though: if you want to open new windows on certain links, but you don’t want to be too intrusive, you can have all your links open in one separate window. The target attribute can refer to windows by name, very useful in a framed setting. However if no window/frame with that frame exists, it will open a new one. So if you gave all your link targets the same name, say “dalink”, the first time someone clicks a link with that target it will open a new window. If they leave that window open, go back to your page, and click on another link with an identical target, instead of opening a brand new window it will reuse the window you’ve already opened. A good example of this (again) is Zeldman.com. Here’s a tricked out example of what we have so far:
<a href="http://www.photomatt.net" title="Photos and thoughts from Matthew Mullenweg" target="_blank">PhotoMatt</a>

Coming soon: Accessibility, It’s All Relative, and Style Notes! Keep your dials locked.

The Dark Side of Hacking Bill

Wired — The Dark Side of Hacking Bill

“Contrary to widespread, if uninformed speculation, our legislation is narrowly crafted, with strict bounds on acceptable behavior by the copyright owner,” Berman said in a statement. “It gives copyright creators a very limited safe harbor from liability when they use technological tools for the narrow purpose of thwarting P2P piracy. It does not allow copyright owners to send viruses through P2P networks, destroy files, hack into the personal files of P2P users, or indiscriminately block lawful file-trading.”
. . .

“Will having a firewall — or implementing strong system security practices or being a good system administrator — become illegal and prosecuted as circumventing copyright controls under the existing Digital Millennium Copyright Act?”

Getting Better

Well it’s looking like all the trouble with the desktop is related to some funky memory, and now that I’ve taken it out things are rock solid again. Espescially now that the new motherboard came in the other day and it has been working out great. It has a ton of cool features that I know I’ll never use, like a voice that tells you what goes wrong (if anything) during POST. Some other things though, such as the DDR333 RAM, USB 2.0, and ATA133 I hope to utilize sooner rather than later.

Update

Okay well the installation finished, and it booted XP up and I was able to do a few things. I decided to reboot to make sure everything was kosher, and what do you know, it isn’t. Currently it looks like NTLDR, the loader for the operating system itself won’t load. I’m not sure exactly why I’m going to all this trouble with the new motherboard coming tomorrow, but I would like to get it working tonight. Hopefully the new motherboard will fix things.

Arrrggghh!!!

Unbelievable! I couldn’t make this stuff up:
OMFG

Yes your eyes are not decieving you. Apparently the genius known as Windows XP is having trouble installing the SYSTEM!! I’m typing so hard I think I might hurt my laptop, so I am going to stop now. Grrrrrr. Appparently, despite a small setback setup should complete in “9 minutes,” we’ll see.

No Man Is an Island

Contrary to About a Boy, and despite the quite fine gadgets that were in that movie, the conclusion that everyone comes to that no man is an island also rings true in an economic sense. I just read a clever passage in a book by P.J. O’Rourke, which I’ll post more about later:

A pencil is a simple object, but there’s not a single person in the world who can make one. That person would need to be a miner to get the graphite, a chemical engineer to turn graphite into pencil lead, a lumberjacj to cut the cedar trees, and a carpenter to shape the pencil casing. He’d need to know how to make yellow paint, how to spray it on, and how to make a paint sprayer. He’d have to go back to the mines to get the ore to make the metal for the thingy that holds the eraser, then build a smelter, a rolling plant, and a michine-tool factory to produce equipment to crimp the thingy in place. And he’d have to grow a rubber tree in his backyard. All this would take a lot of money. Yet a pencil sells for nine cents

Obviously he becomes more frivilous as it goes on, but I thought it was a nice take on Milton Friedman’s pencil example in illustrating the importance of division of labor. Now I need to go get back to something I’m good at.

New Features

If you browse the photolog you’ll notice a few new features on it. Most significantly, you can now vote on pictures, rating them -1 through 10 according to how much you like the picture. When some more votes start rolling in I’ll implement something that shows the top rated photos. Second I’ve made it so it displays the time and date the photo was taken right above the photo. You have always been able to access this info through the ‘properties’ link but that’s a clunky way to get to it.

There seems to be a bug on the root photo page where the first type you go to it nothing shows up. It is fixed immediately if you just reload, but I can’t seem to track down what is causing the problem. Email me or comment if this is happening to you. Cheers :).

Back to

In summary, the day was wonderful. The company was pleasant, the boat was spacious, the pictures came out great, and I even caught a fish. With all that, the highlight of the day was definitely the jet skis, which I probably spent about 2 hours or more on. The Yamaha WaveRunner I was on had a speedometer, and I’ve decided there is nothing quite like speeding across a glass–still lake at 52 miles per hour with the wind cooling the healthy sun shining down on you. I am so tired I can hardly type, so it’s going to be an early night for me.

To Fish!

It’s waaay to early in the morning and I am preparing to spend the rest of the day on a boat catching fish (or at least trying) with a line and hook. No power, no A/C, no connectivity. Taking camera so look for some snapshots tonight. Until then, I bid the civilized world adieu. 🙂