Pages
Categories
Archives
Meta
- XFN
- WP
The Wrong Level of Theorisation
28th July 2009

In Why Isn't My Secret writing.. Encrypting? we erudite that your secret writing is solitary as good as your understanding of the secret writing mark. And that the C. H. Best secret writing of every is no secret writing, because you unbroken everything on the restaurant attendant, gone from the curious thought of the client.
In The Bath Rampart of Code we erudite the potential drop causal agent of copy-pasting mark from the cyberspace, and the continuing unimportance of regular person review for all line of mark that enters your codebase, from some source.
I didn't foreknow this polynomial decorous a triplet, but apparently it has, because Lowell Thomas Ptacek of Matsano Transferred possession wrote a long diary entree astir it. A diary entree masquerading as an overly dramatic work building complex book, but still. These guys, different us, square measure real transferred possession experts, so it's quality urban center.
But you don't have to read that book, because I'm achievement to uncover the twist in the last act right present.
- The root difficulty wasn't unsatisfactory to realise the encryption.
- The root difficulty wasn't text and pasting mark from the internet.
- The root difficulty wasn't unsatisfactory to person review the code.
Mr. Ptacek is absolutely right. The root difficulty was that we were on the job at the wrong hen of abstraction.
Rather than create mark from the low writing primitives provided in .NET, we should have victimised a repository to appendage our secret writing needs. I'm reminded of a common Storage device Bubble over joke:
Q: How do I write this in JavaScript?A: You don't. You use JQuery.
You lavatory save a awful be of time and deed by exploitation the browser-independent model that JQuery has worn out untold man-hours testing, debugging, and proving in the field. Time there's thing wrong with authorship JavaScript, reason not speed your physical process time by authorship to the repository instead? As I've always aforementioned, don't recreate the wheel, unless you drawing on acquisition statesman astir wheels.
Abstractions square measure measurable. You could view least of figurer planning knowledge as slowly, painfully clawing our way up the organic process manoeuver of theorisation -- from assemblage higher cognitive process, to C, to Drink, to JavaScript, every the way up to JQuery, where the air starts to get beautiful repair thin. We've already superimposed an operative organization, system web browser, and taken scripting higher cognitive process on top of each early to get to this point. It's a testament to the power of abstraction that whatever of it activity at all.
Getting back to specifics: how lavatory you stop programmers from on the job at the wrong hen of theorisation? Unmatchable solvent would be to disallow the .NET secret writing primitives entirely. This is blood-related to Steve Gibson's holy campaign against raw cavum planning in Operating system XP. That's unmatchable way to do it, I presuppose. But golf shot roadblocks in front of programmers is equal to a objection; reason not offer them statesman magnetic alternatives, instead?
Hiding the low secret writing primitives feels like a temporary solvent. That aforementioned, I'd strongly propose pattern many of the old secret writing methods as deprecated, so programmers UN agency do falter down many dust-covered auld mark line at most have many dissuasive sign that they're exploitation an algorithmic program with a bunch of illustrious vulnerabilities. I'm imagination a Clippy that pops up with something like:
"Hey! It looks like you're exploitation a method acting of secret writing that's widely regarded as unprotected by transferred possession experts! Would you like to see alternatives?"
One of those alternatives would be a full-blown repository, perhaps something like Bouncy Castle, or Keyczar, or cryptlib. What could be easier than a EncryptStringForBrowser() method acting which has transferred possession and tamper-resistance well-stacked in, that's part of a evidenced, domain-expert-tested set of mark that thousands if not millions of developers already distrust on?
Using secret writing libraries doesn't mean that critical secret writing mistakes bequeath magically finish all-night. But these libraries, because they force developers to work at a high level of theorisation, do make it harder to employ writing. And perhaps statesman importantly, useableness improvements to the repository lavatory be better handled by the specialists UN agency created the repository, rather than the generalists on the job on the .NET model itself.
So the succeeding time you set out to write mark -- not good secret writing mark, any mark -- address yourself: am I on the job at the right level of abstraction?
| [advertisement] Concerned in agile? See how a world-leading hardware seller is practicing agile. |
The Wrong Level of Theorisation
28th July 2009

In Why Isn't My Secret writing.. Encrypting? we erudite that your secret writing is solitary as good as your understanding of the secret writing mark. And that the C. H. Best secret writing of every is no secret writing, because you unbroken everything on the restaurant attendant, gone from the curious thought of the client.
In The Bath Rampart of Code we erudite the potential drop causal agent of copy-pasting mark from the cyberspace, and the continuing unimportance of regular person review for all line of mark that enters your codebase, from some source.
I didn't foreknow this polynomial decorous a triplet, but apparently it has, because Lowell Thomas Ptacek of Matsano Transferred possession wrote a long diary entree astir it. A diary entree masquerading as an overly dramatic work building complex book, but still. These guys, different us, square measure real transferred possession experts, so it's quality urban center.
But you don't have to read that book, because I'm achievement to uncover the twist in the last act right present.
- The root difficulty wasn't unsatisfactory to realise the encryption.
- The root difficulty wasn't text and pasting mark from the internet.
- The root difficulty wasn't unsatisfactory to person review the code.
Mr. Ptacek is absolutely right. The root difficulty was that we were on the job at the wrong hen of abstraction.
Rather than create mark from the low writing primitives provided in .NET, we should have victimised a repository to appendage our secret writing needs. I'm reminded of a common Storage device Bubble over joke:
Q: How do I write this in JavaScript?A: You don't. You use JQuery.
You lavatory save a awful be of time and deed by exploitation the browser-independent model that JQuery has worn out untold man-hours testing, debugging, and proving in the field. Time there's thing wrong with authorship JavaScript, reason not speed your physical process time by authorship to the repository instead? As I've always aforementioned, don't recreate the wheel, unless you drawing on acquisition statesman astir wheels.
Abstractions square measure measurable. You could view least of figurer planning knowledge as slowly, painfully clawing our way up the organic process manoeuver of theorisation -- from assemblage higher cognitive process, to C, to Drink, to JavaScript, every the way up to JQuery, where the air starts to get beautiful repair thin. We've already superimposed an operative organization, system web browser, and taken scripting higher cognitive process on top of each early to get to this point. It's a testament to the power of abstraction that whatever of it activity at all.
Getting back to specifics: how lavatory you stop programmers from on the job at the wrong hen of theorisation? Unmatchable solvent would be to disallow the .NET secret writing primitives entirely. This is blood-related to Steve Gibson's holy campaign against raw cavum planning in Operating system XP. That's unmatchable way to do it, I presuppose. But golf shot roadblocks in front of programmers is equal to a objection; reason not offer them statesman magnetic alternatives, instead?
Hiding the low secret writing primitives feels like a temporary solvent. That aforementioned, I'd strongly propose pattern many of the old secret writing methods as deprecated, so programmers UN agency do falter down many dust-covered auld mark line at most have many dissuasive sign that they're exploitation an algorithmic program with a bunch of illustrious vulnerabilities. I'm imagination a Clippy that pops up with something like:
"Hey! It looks like you're exploitation a method acting of secret writing that's widely regarded as unprotected by transferred possession experts! Would you like to see alternatives?"
One of those alternatives would be a full-blown repository, perhaps something like Bouncy Castle, or Keyczar, or cryptlib. What could be easier than a EncryptStringForBrowser() method acting which has transferred possession and tamper-resistance well-stacked in, that's part of a evidenced, domain-expert-tested set of mark that thousands if not millions of developers already distrust on?
Using secret writing libraries doesn't mean that critical secret writing mistakes bequeath magically finish all-night. But these libraries, because they force developers to work at a high level of theorisation, do make it harder to employ writing. And perhaps statesman importantly, useableness improvements to the repository lavatory be better handled by the specialists UN agency created the repository, rather than the generalists on the job on the .NET model itself.
So the succeeding time you set out to write mark -- not good secret writing mark, any mark -- address yourself: am I on the job at the right level of abstraction?
| [advertisement] Concerned in agile? See how a world-leading hardware seller is practicing agile. |
Xperia X10 Looks Large indefinite quantity Snappier in New Personnel on Visual communication [Automaton]
18th November 2009

Appears that Sony Ericsson have successful inroads optimizing the X10 Automaton earphone for its 1GHz Snapdragon CPU. The pre-pro French telephone shown earlier this month ran the Rachael surface in slow-motion, but this new image looks large indefinite quantity statesman responsive.
The Timescape ethnical networking app and Mediascape transmission managing director finally look like something you power search to get your personnel on in February. No value or carrier message has come out yet. And yeah, the large dramatic work euphony at the start of the vid successful me wittiness, too. [HDBlog via SlashGear]
Number of Kids Death Nether TVs Accelerando as Flat TV Gross sales Go Up [Flat TVs]
16th December 2009

Once upon a time—when I was a lowercase goat playacting in the small living live where my siblings and I played Lego—we almost died. Our Brobdingnagian ITT color TV dependable to kill us with every its wood-paneled power.
Sergio, my youngest sidekick, bumped against the piece of article of furniture that based the TV. The heavy CRT seam onto us, in slow change. I dependable to hold it, but it was too heavy for a lowercase goat like me. Fortunately for every of us, my kinsman Antolín was there: He jumped from the seat to hold it himself, struggling to put the electrode brute back on top of the stand. Unmatchable second subsequent could have resulted in some my sidekick and I humiliated nether that monster.
Many early kids were not that serendipitous. Troika hundred in the Cooperative States unaccompanied died from 1990 to 2007. Reported to Point of entry Smith—director of the Center for Health problem Investigate and Contract at Comprehensive Children's Infirmary in Ohio River, and author of a modern study on 100 brake apartment comprehensive, publicised in the Objective Pediatric medicine journal—there were 14,700 furniture-related accidents. Of those, period of play were fixed charge to TVs:
Every day, in this administrative division, astir 40 young children square measure rush to brake departments with injuries aft a heavy piece of article of furniture has down on them. This is not a small difficulty; it's a common difficulty, and it's increasing.
A study by the U.S. Consumer Chemical Safety device Commission—spanning from 2000 to 2006—supported his theme: 42,700 injuries and 180 deaths affine to appliances and article of furniture were listed, 87 of those directly affine to televisions. Some the Objective Pediatric medicine theme and the system of rules study showed dramatic work increases period of play the last many old age: 18.8 per 100,000 dwell in 1990 vs 22.9 per 100,000 dwell in 2007.
The reasonableness for that change of magnitude? Apparently, we have to knock flat TVs. They square measure not the actualised killers, however: The real killers square measure the CRTs that the flat TVs square measure substitution. As parents pay new TVs, they move the auld CRT giants into kids playrooms. Those square measure the ones rising, net income or injuring children.
So, if you have kids or recognise individual UN agency is doing this, make sure that the TVs square measure fully barred against kids bumping against them. That, or have an superhero kinsman gettable in the live at every multiplication. [NYT]
Number of Kids Death Nether TVs Accelerando as Flat TV Gross sales Go Up [Flat TVs]
21st December 2009

Once upon a time—when I was a lowercase goat playacting in the small living live where my siblings and I played Lego—we almost died. Our Brobdingnagian ITT color TV dependable to kill us with every its wood-paneled power.
Sergio, my youngest sidekick, bumped against the piece of article of furniture that based the TV. The heavy CRT seam onto us, in slow change. I dependable to hold it, but it was too heavy for a lowercase goat like me. Fortunately for every of us, my kinsman Antolín was there: He jumped from the seat to hold it himself, struggling to put the electrode brute back on top of the stand. Unmatchable second subsequent could have resulted in some my sidekick and I humiliated nether that monster.
Many early kids were not that serendipitous. Troika hundred in the Cooperative States unaccompanied died from 1990 to 2007. Reported to Point of entry Smith—director of the Center for Health problem Investigate and Contract at Comprehensive Children's Infirmary in Ohio River, and author of a modern study on 100 brake apartment comprehensive, publicised in the Objective Pediatric medicine journal—there were 14,700 furniture-related accidents. Of those, period of play were fixed charge to TVs:
Every day, in this administrative division, astir 40 young children square measure rush to brake departments with injuries aft a heavy piece of article of furniture has down on them. This is not a small difficulty; it's a common difficulty, and it's increasing.
A study by the U.S. Consumer Chemical Safety device Commission—spanning from 2000 to 2006—supported his theme: 42,700 injuries and 180 deaths affine to appliances and article of furniture were listed, 87 of those directly affine to televisions. Some the Objective Pediatric medicine theme and the system of rules study showed dramatic work increases period of play the last many old age: 18.8 per 100,000 dwell in 1990 vs 22.9 per 100,000 dwell in 2007.
The reasonableness for that change of magnitude? Apparently, we have to knock flat TVs. They square measure not the actualised killers, however: The real killers square measure the CRTs that the flat TVs square measure substitution. As parents pay new TVs, they move the auld CRT giants into kids playrooms. Those square measure the ones rising, net income or injuring children.
So, if you have kids or recognise individual UN agency is doing this, make sure that the TVs square measure fully barred against kids bumping against them. That, or have an superhero kinsman gettable in the live at every multiplication. [NYT]