• Random
  • Archive
  • RSS
  • Ask me anything

Ryan Angilly

A business guy who became a really good software developer first by accident

Designers should not use IDs when writing HTML/CSS (right?)


I just had a little chat with Zatch Sharpie about how designers should write HTML/CSS.

It’s my contention that designers should never use IDs.  Ever.  Classes are for designers to style things.  IDs are for developers who are writing JS to interact with specific elements.  Zatch had never heard this opinion before.  In fact he had heard the contrary and retorted with the classic “IDs are for things you use once, classes are for things you use multiple times.”

A good example is the footer or body element.  There should never be more than one of these on a page.  Ok, fine.  But I have to ask: what is the downside to using a class to style it anyway?

There is literally no downside to a designer using classes for all styling, but the flip side is not true.  If a designer uses an ID to style a #email-container wrapper, and then all of the sudden we want to display more than one #email-container we have to go back and fix not only the #email-container style but any styles that descend from it.

I really don’t want to get into a flamewar here, but I’d love to hear other people’s opinions on this.  The only opinions I can find online against using classes for everything is that doing so is “sloppy.”  I don’t see how.  Sounds like religion to me.

Let me know what you think!

(Image source)

    • #css
    • #javascript
    • #design
    • #web development
    • #nerd religion
    • #developers
    • #designers
  • 10 months ago
  • 2
  • Comments
  • Permalink
  • Share
    Tweet

The ‘Cache-Control’ header is your friend on Heroku

FourthSegment has a bunch of static pages that were loading too slowly. We hadn’t really put much thought into caching, so I thought I’d spend an hour speeding things up. Here’s what I came up with.

I added this method to ApplicationController to be used as a before_filter:

This tells Heroku’s Varnish layer to cache the content. The ab results testing out the homepage speak for themselves.

Before:

After:

#winning.

    • #heroku
    • #varnish
    • #caching
    • #performance
    • #web development
    • #FourthSegment
    • #http
  • 11 months ago
  • 13
  • Comments
  • Permalink
  • Share
    Tweet

Scoped mass-assignment in Rails3

I’ve fought this beast a few times — I think this is a perfect solution. Via @dpickett

    • #Rails
    • #Ruby
    • #web development
    • #activerecord
  • 1 year ago
  • 3
  • Comments
  • Permalink
  • Share
    Tweet

Dynamic Properties in IE — aka CSS on Acid

http://msdn.microsoft.com/en-us/library/ms537634(v=vs.85).aspx#Implement

I really cannot fathom what Microsoft was thinking when they implemented this.  Javascript in your CSS?  Sad trombone.  Someone enlighten me?

    • #js
    • #css
    • #separation of concerns
    • #web development
  • 1 year ago
  • Comments
  • Permalink
  • Share
    Tweet

Phenomenal primer on writing JavaScript widgets

    • #JavaScript
    • #js
    • #widget
    • #web development
    • #jquery
  • 1 year ago
  • 16
  • Comments
  • Permalink
  • Share
    Tweet

Portrait/Logo

About

Hi, I'm Ryan, and I build stuff on the internet. I'm currently building Signal Genius.

I blog about my failed startup, MessageSling, at The Day Series.

Things I used to do:

  • Built and launched FourthSegment
  • Hacked at Punchbowl.com.
  • Founded MessageSling.com.
  • Spent several years at EMC

Me, Elsewhere

  • @angilly on Twitter
  • Facebook Profile
  • angilly on Flickr
  • angilly on Foursquare
  • My Skype Info
  • ryana on github

Twitter

loading tweets…

Following

I Dig These Posts

  • Photo via tmills

    A serious bath-taking bear.

    [via]

    Photo via tmills
  • Photo via tmills

    I read this thing on Vice tonight about how girls hate girls even when they’re friends and while all things women are forever hermetically sealed...

    Photo via tmills
  • Link via graysky
    cdixon.org – chris dixon's blog / Best practices for raising a VC round

    (via Instapaper)

    Link via graysky
  • Photo via dancroak

    Puppy.

    Photo via dancroak
See more →
  • RSS
  • Random
  • Archive
  • Ask me anything
  • Mobile

Effector Theme by Carlo Franco.

Powered by Tumblr