Pseudo-Comments in CSS (Or, How Browsers Parse Styles)

The CSS spec does not mention it, but you can mimic C-style and/or unix-style line comments in CSS files (with some caveats). Others have written about them before (see in particular, SitePoint’s Web Foundations post covering CSS Comments). The present post examines them in further detail.

[Note: Thanks to Louis Lazaris and Web Tools Weekly, this post was originally published on October 21, 2015, at It is actually a follow-up (slightly modified) to my earlier post on CSS line rule comments. ]

Continue reading “Pseudo-Comments in CSS (Or, How Browsers Parse Styles)”

CSS line comments

CSS line rule comments

It’s not widely understood but, yes, you can use line comments in CSS files.

See the fully fleshed out example on ~

Continue reading “CSS line comments”

Constructor Inheritance in JavaScript

[ originally posted 12 Feb 2013 ]

Note: this post acts as justification for my Constructor kata on github. It’s really a re-post for posterity, as 1) I thought it worth preserving a specimen of my former thinking, because 2) I think far less often in the constructor/super inheritance pattern in JavaScript than I did even a year ago (i.e, summer of 2014).

Continue reading “Constructor Inheritance in JavaScript”

3rd-party code still needs tests

[ original gist 28 March 2013 ]

“If there are no tests, it does not work,” a former colleague said, who could have added, “whether your code or someone else’s.”

I’m not the first to say it but it needs re-stating: 3rd-party libraries are no guarantee that your code continues to behave as expected.

If one of the duties of your work is making sure you’re not introducing bloat or cruft or inefficiencies or bugs or unexpected behavior, then you’re cutting corners if you don’t have tests, whether you use 3rd-party code or not.

Continue reading “3rd-party code still needs tests”

The Plus & Minus of TDD ~ a commenter’s great response to Cedric Beust.

[ original gist 4 AUG 2013 ]

Text below is not my own; it is copied from a comment on Cedric Beust’s blog at


Here are some of the things I like about TDD:

Continue reading “The Plus & Minus of TDD ~ a commenter’s great response to Cedric Beust.”

How well does TDD work when testers are writing the tests?

[ original gist 3 June 2013 ]

The point of agile is lost when teams fixate on roles and responsibilities. Fixed roles (“dev”, “qa”) harm you in the long run – and the long run is always up sooner than you think.

That’s a noisy prelude to my answer to the question: Should QA Write Unit Tests?

Continue reading “How well does TDD work when testers are writing the tests?”