The Wonderful World
                                           of Bugs
by Andy Budd of Clearleft.com                     1
Hacks
by Andy Budd of Clearleft.com           2
How many people feel they use too many hacks?




                      and how many people feel that use too few?

by And...
Hacks have been
                                given a bad name…

                                           …literally
b...
Wouldn’t be here
  today if it wasn’t for
  CSS hacks




by Andy Budd of Clearleft.com   5
Sadly, hacks have
                                become synonymous
                                with CSS


by Andy Bud...
It doesn’t have to be
  this way…




by Andy Budd of Clearleft.com   7
Bug Fixing
by Andy Budd of Clearleft.com                8
Browsers are buggy…



   …but not as buggy as we’d like to think




by Andy Budd of Clearleft.com                9
Bugs come from
                                lots of places
                                •Syntactic errors
          ...
Andy’s first law of bug fixing…


                                          …keep it simple (stupid)




by Andy Budd of Cle...
Andy’s second law of bug fixing…



                   …always assume it’s your fault

by Andy Budd of Clearleft.com       ...
Andy’s third law of bug fixing…


                                     …prevention is better than cure




by Andy Budd of ...
Andy’s fourth law of bug fixing…



        …offence is the best form of defence

by Andy Budd of Clearleft.com            ...
Andy’s fifth law of bug fixing…


                                             …isolate the problem




by Andy Budd of Clea...
Andy’s sixth law of bug fixing…



               …use hacks only as a last resort

by Andy Budd of Clearleft.com          ...
Using Hacks Sensibly
by Andy Budd of Clearleft.com                          17
Types of Hack
                                •Hacks that rely on parsing bugs
                                •Hacks that...
Good hacks…
    • Are valid
    • Only target older browsers
    • Are ugly?




by Andy Budd of Clearleft.com      19
Responsible hacking
                                • Use hacks sparingly
                                • Only add a sma...
Questions?

by Andy Budd of Clearleft.com                21
Thanks you!
                 http://www.andybudd.com/atmedia06
by Andy Budd of Clearleft.com                        22
Upcoming SlideShare
Loading in...5
×

The Wonderful World of Bugs

1,897

Published on

The talk I gave on CSS bug hunting during @media 2006

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,897
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
64
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

The Wonderful World of Bugs

  1. 1. The Wonderful World of Bugs by Andy Budd of Clearleft.com 1
  2. 2. Hacks by Andy Budd of Clearleft.com 2
  3. 3. How many people feel they use too many hacks? and how many people feel that use too few? by Andy Budd of Clearleft.com 3
  4. 4. Hacks have been given a bad name… …literally by Andy Budd of Clearleft.com 4
  5. 5. Wouldn’t be here today if it wasn’t for CSS hacks by Andy Budd of Clearleft.com 5
  6. 6. Sadly, hacks have become synonymous with CSS by Andy Budd of Clearleft.com 6
  7. 7. It doesn’t have to be this way… by Andy Budd of Clearleft.com 7
  8. 8. Bug Fixing by Andy Budd of Clearleft.com 8
  9. 9. Browsers are buggy… …but not as buggy as we’d like to think by Andy Budd of Clearleft.com 9
  10. 10. Bugs come from lots of places •Syntactic errors •Specificity clashes •Overly complicated code •Browser bugs •Incomplete understanding of the CSS specification by Andy Budd of Clearleft.com 10
  11. 11. Andy’s first law of bug fixing… …keep it simple (stupid) by Andy Budd of Clearleft.com 11
  12. 12. Andy’s second law of bug fixing… …always assume it’s your fault by Andy Budd of Clearleft.com 12
  13. 13. Andy’s third law of bug fixing… …prevention is better than cure by Andy Budd of Clearleft.com 13
  14. 14. Andy’s fourth law of bug fixing… …offence is the best form of defence by Andy Budd of Clearleft.com 14
  15. 15. Andy’s fifth law of bug fixing… …isolate the problem by Andy Budd of Clearleft.com 15
  16. 16. Andy’s sixth law of bug fixing… …use hacks only as a last resort by Andy Budd of Clearleft.com 16
  17. 17. Using Hacks Sensibly by Andy Budd of Clearleft.com 17
  18. 18. Types of Hack •Hacks that rely on parsing bugs •Hacks that rely on unsupported or misinterpreted CSS by Andy Budd of Clearleft.com 18
  19. 19. Good hacks… • Are valid • Only target older browsers • Are ugly? by Andy Budd of Clearleft.com 19
  20. 20. Responsible hacking • Use hacks sparingly • Only add a small number of hacks to your main CSS • Better to filter hacks into separate stylesheets • Always comment your hacks by Andy Budd of Clearleft.com 20
  21. 21. Questions? by Andy Budd of Clearleft.com 21
  22. 22. Thanks you! http://www.andybudd.com/atmedia06 by Andy Budd of Clearleft.com 22
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×