Read my BDD article in this month's JS Magazine
I have an article on Behaviour Driven Development for JavaScript in June's edition of the excellent
One of the more mesmerizing websites I've worked on recently was for a lingerie boutique in the UK. Aside from the unenviable task of having to look at pictures of women in lingerie all day, I was also forced (forced!) to write a bra size calculator.
The theory behind bra size calculation is arcane and somewhat magical. Understanding of it does not come easily to man nor beast, so it is lucky that I, falling cleanly into neither category, have passed through pain and torment to save you the trouble.
Pleasing, no? The code looks like this, and can be found here:
And to apply it to your own pages, use something a bit like this:
Now we're talking UK sizes here, so exercise extreme caution! It should be trivial to adapt to your country with our lovely conversion charts.
Don't pretend you're not going to play with it. You know you are. Like, right now.
If you enjoyed this dive into creating a JavaScript bra size calculator, you might find the article Writing Compressible JavaScript interesting as it offers optimization strategies for writing efficient code. Additionally, explore Answering Nicholas Zakas' JavaScript quiz to challenge your understanding of JavaScript's intricacies.
I have an article on Behaviour Driven Development for JavaScript in June's edition of the excellent
Writing a library is a balancing act between the (sometimes competing) interests of API clarity, cod
A current meme that's floating around the JavaScript geek corner of the internet is setting quizzes
The FizzBuzz challenge has been around a while but I stumbled across it again after reading another