The Wonderful World of Bugs

22
The Wonderful World of Bugs 1 by Andy Budd of Clearleft.com
  • date post

    17-Oct-2014
  • Category

    Technology

  • view

    3.010
  • download

    5

description

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

Transcript of The Wonderful World of Bugs

Page 1: The Wonderful World of Bugs

The Wonderful World

of Bugs

1by Andy Budd of Clearleft.com

Page 2: The Wonderful World of Bugs

Hacks

2by Andy Budd of Clearleft.com

Page 3: The Wonderful World of Bugs

How many people feel they use too many hacks?

and how many people feel that use too few?

3by Andy Budd of Clearleft.com

Page 4: The Wonderful World of Bugs

Hacks have been

given a bad name…

…literally

4by Andy Budd of Clearleft.com

Page 5: The Wonderful World of Bugs

Wouldn’t be here

today if it wasn’t for

CSS hacks

5by Andy Budd of Clearleft.com

Page 6: The Wonderful World of Bugs

Sadly, hacks have

become synonymous

with CSS

6by Andy Budd of Clearleft.com

Page 7: The Wonderful World of Bugs

It doesn’t have to be

this way…

7by Andy Budd of Clearleft.com

Page 8: The Wonderful World of Bugs

Bug Fixing

8by Andy Budd of Clearleft.com

Page 9: The Wonderful World of Bugs

Browsers are buggy…

9by Andy Budd of Clearleft.com

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

Page 10: The Wonderful World of Bugs

Bugs come from

lots of places•Syntactic errors

•Specificity clashes

•Overly complicated code

•Browser bugs

•Incomplete understanding of the

CSS specification

10by Andy Budd of Clearleft.com

Page 11: The Wonderful World of Bugs

Andy’s first law of bug fixing…

…keep it simple (stupid)

11by Andy Budd of Clearleft.com

Page 12: The Wonderful World of Bugs

Andy’s second law of bug fixing…

…always assume it’s your fault

12by Andy Budd of Clearleft.com

Page 13: The Wonderful World of Bugs

Andy’s third law of bug fixing…

…prevention is better than cure

13by Andy Budd of Clearleft.com

Page 14: The Wonderful World of Bugs

Andy’s fourth law of bug fixing…

…offence is the best form of defence

14by Andy Budd of Clearleft.com

Page 15: The Wonderful World of Bugs

Andy’s fifth law of bug fixing…

…isolate the problem

15by Andy Budd of Clearleft.com

Page 16: The Wonderful World of Bugs

Andy’s sixth law of bug fixing…

…use hacks only as a last resort

16by Andy Budd of Clearleft.com

Page 17: The Wonderful World of Bugs

Using Hacks Sensibly

17by Andy Budd of Clearleft.com

Page 18: The Wonderful World of Bugs

Types of Hack•Hacks that rely on parsing bugs

•Hacks that rely on unsupported or

misinterpreted CSS

18by Andy Budd of Clearleft.com

Page 19: The Wonderful World of Bugs

Good hacks…

19by Andy Budd of Clearleft.com

• Are valid

• Only target older browsers

• Are ugly?

Page 20: The Wonderful World of Bugs

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

20by Andy Budd of Clearleft.com

Page 21: The Wonderful World of Bugs

Questions?

21by Andy Budd of Clearleft.com

Page 22: The Wonderful World of Bugs

Thanks you!

http://www.andybudd.com/atmedia06

22by Andy Budd of Clearleft.com