Thursday, September 25, 2008

The 7 Plagues of the CSS Amateur

(Draft)

  1. Div-itis
  2. Class-itis
  3. Over-specificity
  4. Redundant Properties and/or Selectors
  5. CSS Frameworks/Reset Stylesheets
  6. Poor accessibility
  7. Poor semantics

Designing your portfolio is hard

How do you summarize your skills and talents into a website?

I am a website designer. Most my work is coming up with solutions to problems. So, Why is it so hard to come up with a solution to the portfolio problem? I want my portfolio to show my skills as a user experience engineer. Well that's kind of hard to do since there aren't many interaction elements in a portfolio. I could make a really cool photo viewer, I suppose, but that's mostly a solved problem. I don't really want to add 2.0 elements to it. And while I'd like to use a better blog platform, I have to admit that blogger is easy to keep. I could just make a theme for blogger I guess...

I was thinking of taking a look at my design process and trying to distill it down. Use graphics of paper-prototypes, whiteboard drawings, sketches, and photos. I think I'll also have a lab which will feature some of my experiments.

I need a new portfolio. I did the old one in college, its embarrassing, but it comes up pretty high on when my name is Google'd, so I need to get a fix in there.

Friday, March 21, 2008

Guidelines for keeping pages clean with in ASP.Net

This is aimed at those who edit websites but are not primarily front-end developers.

Visual Studio Guidelines

  • Don't Use the Design Editor
  • If you are just displaying a piece of data use <asp:literal> rather than label or other constructs
  • Use agnostic ids for containers. #td_books is going to look pretty stupid when it's applied to a >ul>
  • Learn How to use <asp:repeater>
  • If you set a label to a form element set the associatedControlId. This will keep them associated semantically and will force the label to render as <label> rather than <span>

HTML Guidelines

  • Don't use Tables unless you are displaying tabular data
  • If you can click on it make it a link
  • If you can't click on it it's not a link

CSS Guidelines

  • Terminology (brief)
  • Get familiar with and use the site's default stylesheets. Check the site's default stylesheets for applicable rules before declaring your own
  • Class names and ids
    • Unique rules use id, instance rules use class.
    • Should describe the data not the presentation Bad: "sideNav", "topNav", "blue", "bold", "orangeBox" (Yeah, I'm guilty of this) Good: "subNav", "help", "disabled", "itemList"
    • I've stuck to camel-case-drop-first, for my naming conventions.
    • You can set multiple classes on the same element but IE6 doesn't like attaching rules where they are combined for the selector. e.g.: .help.disabled{/*IE6 says "what?"*/}
    • Rather than applying a class to a bunch of elements that are siblings, like in a list, add an id to the parent and reference the children using descendant selectors.
  • Good CSS Requires a good understanding of the semantics of HTML.
  • If you are uncomfortable with CSS ask someone who is.

Wednesday, January 02, 2008

Start Using HTML 5 Now! (Sorta)

So you can't start using <section> and <header> yet. But that doesn't mean you can't start thinking like that.

What the HTML specs are really about is standards, and standards are just agreed upon practices. So if more people start using classes this way in preperation for html5 than we'll be halfway there.

Use HTML5 Semantics for HTML4

Look at the spec and if make sure you're using your tags like HTML5 suggests. Particularly b, i, em, strong, address, blockquote, dl, small.

HTML5 Elements

  • <section><header><footer> -> <div class="section"><div class="header"><div class="footer"> Arguably use <h1><h2><h3> instead of div
  • <nav> -> <div class="nav">
  • <article> -> <div class="article">
  • <aside> -> <div class="aside">
  • <dialog> -> <dl class="dialog">
  • <mark> -> <span class="mark">
  • <date/><time/><datetime/> -> Use Microformats datetime-design-pattern <abbr class="datetime data-1998-03-12T08:30:00-05:00">12 March 1998 from 8:30am EST</abbr>
  • <progress/> -> <span class="progress"><span class="value">0</span>/<span class="max">10</span></span>
  • <meter/> -> Similar to <progress/>. can also add <span class="min"/> and <span class="optimum"/>
  • <var/> -> <i class="var">n</i>.
  • <samp/> -> <kbd class="samp">sample text</kbd>
  • <figure><legend> -> <div class="figure"><em class="legend">

Validate against HTML5

If you want to feel a little better about this choice you can validate against HTML5.

Microformats

While this doesn't really have much to do with HTML5, it is another way you can standardize your practices. There's lots of services that look for microformats so there's no reason not to learn and use them. They'll likely only get more important as time goes on.

Further Reading and References

Tuesday, December 18, 2007

Text editor pet peves

  1. Copying whitespace - I do this all the time and every time it's by accident. I go to hit Ctrl+V and hit Ctrl+C instead so rather than pasting I overwrite the copy from before. It's frustrating. I know some people may want to copy empty whitespace, but never once have I wanted to.
I know this isn't really a list yet, I'm sure I'll think of something to add in the future.

Monday, December 17, 2007

Paging - Ordered List (ol), Unordered List (ul), or what?

Does anyone have a stance on this?

It's pretty clear that there isn't a standard for this. Go to Google, Yahoo!, Ask, eBay, or Amazon, and you are going to see vastly different markup.

It's crazy how different it is. Some are ul, some are links, some are spans, some are h4s. What the H-E-(double-hockey-stick)?

I think it should be a list, but which one? It definitely is an ordered list as pages are in order but if the content is numbered it's kind of stupid. Particularly if the Previous/Next links are in the list. Then you'd get:

  1. Prev
  2. 1
  3. 2
  4. 3
  5. Next

I'm going to use an unordered list for now. But I'd like to know what you think.

Thursday, December 06, 2007

Rails Steals Brain, Police are Apathetic

I started working with Rails at home and have finally got a chance to try out haml, a ruby templating language that replaces Rhtml. I'm really excited about using it and SASS to create some really clean source.

Plus since I'm learning RoR I'll be able to create sites of much greater complexity on my own then I could being just a front-end developer. I have taken programming classes before so I should be okay.

I cool site that teaches the basics of ruby. It helped me understand some of the peculiarities of ruby. After working with C++ and JavaScript I had a little unlearning to do.