Tag: specificity



Concentrating on the credit portion, this bit of POSH code can be enhanced with even greater meaning by overlaying a microformat. For instance, one way to assign classes and pieces of information to the credit information might be:

<div id=”hcard-Robert-M-Cherny” class=”vcard”>
<h3>About the author:</h3>
<h4><a class=”url fn n” href=”http://navigationarts.com”>
<span class=”given-name”>Rob</span>
<span class=”family-name”>Cherny</span></a><br>
<span class=”title”>Lead Developer</span></h4>
<p>
<span class=”org”>NavigationArts, LLC</span><br>
<span class=”adr”>
<span class=”street-address”>
7901 Jones Branch Road</span><br>
<span class=”locality”>McLean</span>,
<span class=”region”>VA</span>,
<span class=”postal-code”>22102</span>
<span class=”country-name”>
United States of America</span><br>
<span class=”tel”>703.584.8920</span>
</span>
</p>
</div>

This example adopts the hCard microformat defined at microformats.org. The classes defined for vcard, given-name, additional-name, family-name, org, adr, and so forth identify key pieces of information. While on the markup-heavy side, it does, in a very granular way, specify the meaning of each element, which is of potentially great use.

In XML, tags give meaning to each field of information. With microformats, valid class and other attribute information can be added to the POSH code to enable understanding of the granular pieces of information.







There are two things wrong with this from a best practices standpoint. Both have to do with the naming of the classes on the <p> elements: rederror and bolduser both convey presentation information that implies what those elements look like. The standard practice is to avoid basing a name on a description of a “physical” or visual characteristic.

A better solution might be:

<style type=”text/css”>
p.errormessage {color: red;}
p.userfield { font-weight: bold; }
</style>
<p class=”errormessage”>Warning: Username not found!</p>
<p class=”userfield”><label for=”username”>Username:</label>
<input type=”text” id=”username” name=”username” /></p>







Only by going through real-world development with clients and attempting— successfully or not—to launch internal projects (often with punishing deadlines) do we hone our skills, learn our lessons, and, importantly, become strong enough and flexible enough to apply those lessons “the next time.” That’s striving for excellence, also known as professionalism.

Although learning specific skills and techniques and standards is critical to our becoming better developers, there are key areas that can be imparted only by working on actual Web development projects: communication, adaptation, and
persistence.

Communication

The Internet is about communication. The list of technologies that facilitate human contact goes on and on: instant messaging, email, VoIP when the telephone gets dated. Those meetings your colleagues describe as too long and pointless could instead be about finding consensus, focused on agreeing on the best solutions, if everyone has already discussed the problems before they reached the meeting room.