Author Archive
Three reasons for writing and maintaining framework test
The received opinion in the software engineering test driven development community is “never test your framework.” This is good advice. And like most good advice, there are exceptional reasons why framework testing might be appropriate:
1. If the framework is undergoing rapid development and is not well-covered in tests, ensuring the framework acts as assumed before running your own tests might save a lot of debugging time later. This is especially true when the API is changing fast.
2. When you don’t understand exactly how the framework behaves, a few tests will help clarify what’s going on. For example, a recently popular CSS framework “decided to be helpful and sneakilly [sic] stuffed jquery into the minified <framework>.js file. Everything worked fine except the ajax:whatever call backs when using remote => true.”
3. I forgot reason three, which is annoying because I started this blog post with three reasons in mind.
Where to test a framework
Some guidelines:
- If it’s mission critical, have a small, separate suite of tests which run independently.
- If it’s for clarity, or for watching something liable to change in the future (such as the ongoing webrat versus capybara matchers issues), drop a framework test right in with a particular spec.
There is a fine line here, easy to cross, but it’s also a line as much in the eye of any particular beholder. That is, when and where to add a few framework tests depends a lot on the developer’s opinion.
Mastery matters now more than ever
I just purchased masterymatters.net, which I intend on pointing here after I publish this blog post.
The .com has been taken by a reading mastery family business in Prince George BC. That’s annoying in one way, kind of cool in another. Uncle Tony lives up there, since 19 Sixty Whatnot. They probably know each other. I’ll link to them at some point.
The reason I bought it was I see a big hole in mastery education. Academically, we’re trained to be generalists, and most employment (de facto) generalists over specialists. Employers won’t train for it, it’s something employees need to pick up on their own time.
Mastery is a long, difficult road, we all need some help along the way.
Your Personal Value Proposition
What’s your PVP? You know, your Personal Value Proposition?
Do you know?
This is important, and here’s why: from observation, having a PVP separates you from the great mass of people who either do not have a PVP, or who cannot articulate their PVP. It’s similar to the USP – Unique Selling Proposition – marketers use for promoting businesses and products.
There’s more. Think about successful people, those who crave success, and everyone else:
- A List: people who know and communicate their PVP and connect with each other.
- B List: people who know and communicate A Lister’s PVPs, and connect up to A List, sometimes across, rarely down.
- Everyone else: people who either don’t know or cannot articulate their PVP.
Which one are you?
From (again) experience, you the reader are most likely “Everyone else” or (a slight possibility) an A Lister. B Listers typically don’t connect down. “Everyone else” (let’s just say the “E List”) don’t connect well at all, in any direction.
Is this bad?
Hard to say. Highly connected people with huge networks assert it’s necessary for success, but that’s survivorship and self-selection bias: it was necessary for their success. People finding success without a large audience, without being highly connected, who hears about it? I personally know people who are massively successful, who are also incredibly reclusive. I didn’t meet them on Twitter or Facebook, to be sure.
And dammit, I just found out Smiley Ratliff passed on a couple of years ago.
Test Driven Development – Yea or nay?
Here’s an interesting observation I’ve made as a result of reading (over the last 10 years) the pros and cons of test driven development (TDD). The discussion seems to eventually get this point:
- “TTD is a crock. I just don’t see the need to fully test everything. It’s a waste of my time.”
- “TDD is awesome. We found TDD really helped speed up our development and ship better product.”
Feel encouraged to draw your own conclusions.
Get rich or get welfare
Ok.
I get it.
Fundamental conundrum of web search
The more people interested in a topic, the worse the search results.
Try it. Search for cars, sex, money, movies or music. You’ll see.
Entropy, as demonstrated by squirrels
Entropy, as I understand it, is that natural tendency for things to go from bad to worse.
I keep a small number of semi-exotic succulents on an outdoor staircase and landing at my apartment in the East Bay. In the spring, I do a massive cleanup of sweeping, pruning and replanting, once the winter is past.
This spring, I no longer finished when as many as four squirrels moved in to the neighborhood.
Now, when I step outside every day, I see squirrel damage. I repot today, tomorrow, that pot might well be dug up. If not tomorrow, then within a week or so.
There is new damage Every. Single. Day.
Because, someone close by is feeding these squirrels peanuts.
So the squirrels have taken to burying the surplus peanuts in my pots. The irony of this is that I’m allergic to peanuts.
I spend 30 minutes cleaning up; a squirrel spends 5 minutes digging it all back up.
The entropy of the situation: whoever is feeding these squirrels is doing it at relatively speaking, zero cost. Just a few bucks for a bag of peanuts snatched from the aisle in passing at the grocery store. Then getting lots of jollies as the squirrels “visit” for their feeding. Poor squirrels. So hungry.
I could spend hours every week dealing with someone else’s single moment of peanut purchase.
It’s a game I don’t think I can win. Whoever is feeding these varmints, and certainly the varmints, have more time than I do. They can spend a little time to cost me a lot of time. Entropy is on their side.
The upshot: someone else’s few moments of jolliness is likely to cost me my stairscape. Something I have taken a lot of pleasure in, and cultivated over the last many years.
In another part of the country, this would not be an issue. It would be Mulligan stew. But this is California.
Taxon, Taxa, Taxonomies. Ruh roh.
I do a bit of blogging here and there. One of the more recent, and more interesting, features of WordPress is its capability for defining custom taxonomies. A taxonomy, of course, being a collection of like items called taxa (sing. taxon), arranged in some sensible order.
However, trouble is brewing in paradise…
Taxonomy from Wikipedia:
Taxonomy is the practice and science of classification. The word finds its roots in the Greek τάξις, taxis (meaning ‘order’ or ‘arrangement’) and νόμος, nomos (meaning ‘law’ or ‘science’). Taxonomy uses taxonomic units, known as taxa (singular taxon).
So, what?
So, watch for this:
- “taxonomy” will be used for synonymously for taxon
- “taxonomies” will be in lieu of taxa as the plural form
What this means is that when someone says “taxonomy” you are going to have to infer its meaning as an element in a collection of like elements collectively referred to as a taxonomy, or as the collection itself.
Frankly, stupid, pedantic words like “taxon” and “taxa” exist for a reason. Using the correct form of such words eliminates confusion.
Unfortunately, this requires people learning what such words actually mean. Which means either 1. reading, or 2. being instructed.
Which flies in the face of how the vast majority learn anything, which is to copy the accepted usage from peers, and not bother with the difficult details of real meaning.
Consequently, within WordPress, “taxonomy” is going to remain a slippery, confusing topic. If you don’t understand taxonomies, rest assured, that’s not entirely your fault.
Stopped reading the news…
…and it shows!
A fair number of articles here are my response to inanities and absurdities found in the news. But when the Chronicle slipped advertising onto the front page, I lost interest in reading.
Nothing personal against SFGate.com. I do hope they survive, I’m just no longer in their target audience.
Which leaves me hanging: what to write about?
Just when you’re about Frenched out…
…something like this pops up:
“If an American GI wanted to take home a souvenir, I’d say there was nothing reprehensible about that, it’s an act you can easily understand,” said Levisse-Touze, director of a Paris museum with exhibits on the city’s liberation.
and…
French officials have no intention of scolding him: They have only thanks and kind words for him, pointing out that he once risked his life for France.
Yes. Thank you. We would do it again if necessary.
(Read more at SFGate.)
Mitterand or DeGaulle or someone once stated that the US and the French were like an old married couple, always squabbling, in public. But in the end pulling together. Much truth to that.
Toulon is my favorite city in France. What’s yours?