About a year ago I recognized the SPAM problem for what it really is; how it really works; and what it really does. There is nothing new about SPAM, it pre-dates the printing press, it pre-dates common literacy, SPAM as we know it is just a special form of an old problem.
What problem?
Bad Manners
It’s rude to talk to someone you’ve not been introduced to. In Pride and Prejudice, Mr Collins tries to introduce himself to Mr Darcy by way of knowing his relative, but is scorned and ignored.
Why don’t well-mannered cultured people speak with those to whom they are not introduced? Simply because they would be mistaken for bad mannered hangers-on, butters-in or favour-grabbers.
Why do we have a problem with spam? Because we authorize our mail servers to accept mail from any ne’er-do-well without the slightest introduction.
Don’t talk to strangers
In the human world (body snatchers and manchurian candidates aside) the humans body and social knowledge is a good substitute for the persons own identity, and thus it is possible to recognize respectability (as we deem it) and trust (as we value it) in whatever circumstance we find ourselves.
In the electronic world of the internet the email From: address is a poor substitute identity, and often spoofed. SYN-spoofing was solved with SYN-cookies; but what is the email equivalent? SYN-cookies don’t avoid depleting resources when the claimed sending node really is the sending node. A higher level email equivalent would merely prove that there was such a valid email identity for the moment.
SPF is an attempt to filter out messages sent from a bogus location. If I know my mother is in Brighton, and I receive a letter asking me to remit 100 pounds to her sister, but the senders postmark is Liverpool, I could guess that the letter was a forgery. SPF is a way for domain administrators to allow mail spoofed from their domain to be recognized. As a consequence most SPAM spoofers will not spoof From: addresses using domains that have SPF records.
However my problem is how to stop hangers-on and cold-callers offering me the latest in pills or potions or job offers in the Belle Vue, California (instead of Belle Vue, Wakefield) from troubling me with their wares. I want them to obtain an introduction, I want to assess how I trust them, and not be troubled by the quantity of callers jostling for attention.
The solution is to resurrect the habit of requiring introductions as we again live in a world inhabited by those who are anxious to push their message upon us as if it were the only thing we longed to hear.
Trusted Identity
If your friends get them selves an SSL certificate for email; or use PGP, establish a web-of-trust, it will be easily possible to recognize email from those friends as such howsoever sent. If the said friends can competently manage this electronic identity and associated cryptographic keys, you will be able to trust their identity,and their mail need never go astray - wrongly filtered as spam.
Those without such SSL or PGP signatures will be strangers, albeit recognizable stangers if they use SPF records.
Have an Identity, be trusted
Whats the solution? Have an identity, use it, be trusted.
Sadly some jurisdictions recognize such signed emails as legally binding, use of signing keys is not recommended to the incompetent in such jurisdictions.
Get your signing keys certified by http://www.thawte.com/
Why haven’t I done this? Because it’s too complicated, I’m too busy, and I don’t trust my computer with my keys (!!), so I’ll have to get a smart-card from FSFE-UK.
Friday, 9 March 2007
Wednesday, 7 March 2007
Collapsing on clusters
I’ve seen use of preceding-sibling to collapse on unique attributes, but how about collapsing clusters on unique attributes? For example:
a,a,a,b,a,b,b,c should collapse to a,b,a,b,c
Here’s some XSLT I came up with to detect which position a node is in it’s cluster, and what cluster number it is. NODE repesents the nodes being collapsed, and VALUE/@value a child node/attribute that is being collapsed upon.
Here we look for the number of nodes that are not preceded by a node having the same value - this will be the number of clusters.
He we count the number of nodes that precede the current node and have the same value, but there is no intervening node with a different value, this will be the position in the current cluster.
a,a,a,b,a,b,b,c should collapse to a,b,a,b,c
Here’s some XSLT I came up with to detect which position a node is in it’s cluster, and what cluster number it is. NODE repesents the nodes being collapsed, and VALUE/@value a child node/attribute that is being collapsed upon.
Here we look for the number of nodes that are not preceded by a node having the same value - this will be the number of clusters.
<xsl:variable name="cluster-no" select="count(preceding-sibling::NODE[
not(VALUE/@value = preceding-sibling::NODE[1]/VALUE/@value) ]
|current()[not(VALUE/@value = preceding-sibling::NODE[1]/VALUE/@value)]
)"/>
He we count the number of nodes that precede the current node and have the same value, but there is no intervening node with a different value, this will be the position in the current cluster.
<xsl:variable name="position-in-cluster" select="count(preceding-sibling::NODE[VALUE/@value = current()/VALUE/@value
and not( VALUE/@value!=following-sibling::NODE[ count(following-sibling::NODE[ generate-id()=generate-id(current())]) > 0 ]/VALUE/@value)])"/>
Tuesday, 27 February 2007
Abortion is Legal, Pictures are Not
Interesting story in The Register, Veronica Connelly’s guilty conviction was upheld. It appears that she had sent pictures of aborted foetus’s to pharmacists that sell the morning-after pill (which technically induces an immediate abortion).
Without discussing whether or not Veronica was intending to be malicious, or how closely the action of the morning-after pill resembles that of a surgical abortion we have an interesting case:
Jewish Holocaust pictures from Nazi Germany (begone, Goodwin!) were not considered more offensive than the actions they documented, although they are acknowledged to be "disturbing." Does this mean that it is or would be illegal to send these pictures or show these pictures to the perpetrators, knowing that it would - and in order to - cause offense? How else should one convict the perpetrators with a sense of their own guilt?
Now consider Veronica’s intentions; was it merely to distress or cause anxiety to the recipient, or to convict them of their "guilt"? - which indirectly but very connectedly leads to distress!
How will Oxfam stimulate my guilt over my greed without decidedly distressing me with imagery of poverty and dispair? Will their mailshots be replaced with advertising billboards instead, thus becoming legal?
I see animal-rights display stands in the streets at times, showing disturbing pictures of the results of shocking treatment of animals. Are the animal-rights activists forbidden from sending these pictures to the perpetrators but permitted to display them in public?
Will I be unable to disuade jihadists under criminal law because my arguments distress them? Or will I have to send only open letters generally published?
I guess the law is to save us from personally communicated harassment when others who are offended by some aspect of our legal activity try and convey that offense to us.
At the moment some forms of abortion are legal, but some ways of talking about it are not, and this puzzles my morals; perhaps Veronica was harassing those who were not directly involved in abortions - though this was not relevant to the judgement; BUT it seems it would still have been illegal for Veronica to have sent those pictures to anyone who had been practicing illegal abortion, even if they were photo’s of the very same aborted foetuses - would this lead to "Yes, I broke the law, but now I’m offended by pictures of it"
I can see this as a good defense for speeding camera tickets.
Without discussing whether or not Veronica was intending to be malicious, or how closely the action of the morning-after pill resembles that of a surgical abortion we have an interesting case:
Jewish Holocaust pictures from Nazi Germany (begone, Goodwin!) were not considered more offensive than the actions they documented, although they are acknowledged to be "disturbing." Does this mean that it is or would be illegal to send these pictures or show these pictures to the perpetrators, knowing that it would - and in order to - cause offense? How else should one convict the perpetrators with a sense of their own guilt?
Now consider Veronica’s intentions; was it merely to distress or cause anxiety to the recipient, or to convict them of their "guilt"? - which indirectly but very connectedly leads to distress!
How will Oxfam stimulate my guilt over my greed without decidedly distressing me with imagery of poverty and dispair? Will their mailshots be replaced with advertising billboards instead, thus becoming legal?
I see animal-rights display stands in the streets at times, showing disturbing pictures of the results of shocking treatment of animals. Are the animal-rights activists forbidden from sending these pictures to the perpetrators but permitted to display them in public?
Will I be unable to disuade jihadists under criminal law because my arguments distress them? Or will I have to send only open letters generally published?
I guess the law is to save us from personally communicated harassment when others who are offended by some aspect of our legal activity try and convey that offense to us.
At the moment some forms of abortion are legal, but some ways of talking about it are not, and this puzzles my morals; perhaps Veronica was harassing those who were not directly involved in abortions - though this was not relevant to the judgement; BUT it seems it would still have been illegal for Veronica to have sent those pictures to anyone who had been practicing illegal abortion, even if they were photo’s of the very same aborted foetuses - would this lead to "Yes, I broke the law, but now I’m offended by pictures of it"
I can see this as a good defense for speeding camera tickets.
Friday, 9 February 2007
Don’t confuse the message
Design should not obscure the message.
Here’s a web page whose purpose is to help parents and carers in Yorkshire know if their children’s school has been closed due to bad weather.
How many parents or carers do you think will suppose that the school is closed?
In fact the "closed" message is just fancy artwork and conveys no particular information about any school. There are no schools closed at all.
The actual URL was: http://www.ridingsfm.co.uk/pages/home.asp?pageid=275&servername=www.ridingsfm.co.uk
You have to wonder why servername is part of the url… maybe it is to support vhosting for no-cookie http 0.9 clients?
Wednesday, 31 January 2007
HP48 Skin for M3100 / Hermes
Here is horizontal (landscape) skin for Christoph Gießelink’s PPC HP48 emulator.See: http://privat.swol.de/ChristophGiesselink/emu48.htm
The skin is for the HTC Hermes model phone running WM5 in keyboard-open mode, to support use without the need to touch the screen at all.
Installation
Just download the zipfile and unzip in your emu48 directory and start a new emulator session with HP48-m3100-horizontal.kmlThe bitmap and layout is based on the PPC skin done by Dave / Murray.
This is landscape but not in the same sense as Dave / Murray landscape which is landscape on a portrait screen. Hermes keyboard-open mode is a landscape screen. When the keyboard is closed and the Hermes resizes the screen to be portrait, it all goes skewy. Really we need to be able to switch between two different skins when they keyboard is opened or closed.
I had to take a few pixel rows out of their layout to make it fit.
Anyway….
I also fixed up the scan-code conversions to deal with the Hermes keyboard, so some Hermes specific keystrokes work as expected, like ! and - and _.
Some new mappings
The TAB key is mapped as the ALPHA key.
The SYMBOL-UP is mapped as SHIFT-R
The SYMBOL-DOWN is mapped as SHIFT-L
(Symbol is the key with a round DOT).
Sadly I could not map SYMBOL-LEFT or RIGHT, because the emulator does not intercept these and probably can’t unless it is signed as a privileged application.
BONUS
Included is an XML based build system to make skin building easier.
I used kimagemapeditor to add hotspot rectangles to my bitmap and then my build-system created the button and annunciator layout file for me. This greatly speeds up the process when modifying or designing new skins.
Note that the kml file Includes a a kmp file which includes all the button positional information, and also a kmi file containing scan-code mappings and fixups.
I generated the kml file like this:
xsltproc HP48-generate.xslt HP48-m3100-horizontal.htm > HP48-m3100-horizontal.kmpxsltproc comes with gnome on my Ubuntu linux. Maybe there is a windows xslt processor that could do this too??
Of course that htm file has to be valid xml too, I had to make the img tag self-closing.
The xslt relies on HP48-attributes.xml, that defines the annunciators and keys that the emulator expects.
The id attributes refer to the numbers in the Annunciator or Button statements, and the name attributes refer to the anchors in the html.
Annunciator anchoes begin with #~- to show where the annunciator should be displayed, and #~+ to show where they should be copied from.
Buttons, of course have only one imagemap entry.
TO-DO
Add scan-code conversions for a lot of the accented characters.
I intend to make this fun by having an HP48 specific xml which defines HP48 button sequences needed to generate each ascii character. I then intend to have a host-specific xml which specifies the scan-codes generated during the entry of each ascii character. I shall spot multi-scan-code sequences, and automatically allocate flags and generate IfFlag code.
Thus, with a fixed calculator specific button-code-map, a per-skin bitmap and imagemap, and a per-platform scan-code specification, I can generate any skin for any calculator emulator on any platform. Hurrah!
Find out or write IfAnnunciator for the kml scripts.
Thursday, 19 October 2006
Counting nodes
I had a problem where I needed to assign a unique integer to each node in a tree, as it was processed; using XSLT 1.0
XSLT 1.0 doesn’t have user definable functions, the only way to return values is as output which can be captured in an
And, naturally, the tree recursion was already generating output and could not easily be used to return a count of nodes processed so far as well.
After a couple of hours of struggling and some syntax checking with my brother Ben (for things like $node/ancestors::* - thanks bro) we have a fragment that does the trick in one line!
This is more clearly excodessed as:
and in english reads as: to find the sequence number for $node, count all preceding nodes who are contained by the common ancestor identified by $ancestorid. Without the codedicate, it would count all preceding nodes in the entire document, instead of those with a certain ancestor.
However this is not complete. preceding does not take into account open nodes, i.e. the node to which it is being applied, nor any of it’s ancestors; so this correction is added:
as the number of non-counted nodes is clearly the difference between the number of ancestors of $node, and the number of ancestors of $ancestor.
The full statement is:
I leave it to the reader to produce a version that reports the total number "rule" nodes under the current ancestor.
Finally I used this recipe:
XSLT 1.0 doesn’t have user definable functions, the only way to return values is as output which can be captured in an
<xsl:variable name="captured"><xsl:call-template name="generate-output"/></xsl:variable>And, naturally, the tree recursion was already generating output and could not easily be used to return a count of nodes processed so far as well.
After a couple of hours of struggling and some syntax checking with my brother Ben (for things like $node/ancestors::* - thanks bro) we have a fragment that does the trick in one line!
count($node/preceding::rule[ancestor::*[generate-id()=$ancestorid]])This is more clearly excodessed as:
count($node/preceding::rule[count(ancestor::*[generate-id()=$ancestorid])])and in english reads as: to find the sequence number for $node, count all preceding nodes who are contained by the common ancestor identified by $ancestorid. Without the codedicate, it would count all preceding nodes in the entire document, instead of those with a certain ancestor.
However this is not complete. preceding does not take into account open nodes, i.e. the node to which it is being applied, nor any of it’s ancestors; so this correction is added:
+ count($node/ancestor::rule) - count($ancestor/ancestor::rule)as the number of non-counted nodes is clearly the difference between the number of ancestors of $node, and the number of ancestors of $ancestor.
The full statement is:
count($node/preceding::rule[ancestor::*[generate-id()=$ancestorid]]) + count($node/ancestor::rule) - count($ancestor/ancestor::rule)I leave it to the reader to produce a version that reports the total number "rule" nodes under the current ancestor.
Finally I used this recipe:
<xsl:template name="rule-number">
<xsl:param name="name"><xsl:message terminate="yes">rule-number called without name</xsl:message></xsl:param>
<xsl:param name="rules-node" select="//dbam-bandwidth-rules"/>
<!– take the first occurance of each rule (no preceding of same ancestor) –>
<xsl:variable name="all_rules" select="$rules-node//rule[not(@name = preceding::rule[count(ancestor::*[generate-id()=generate-id($rules-node)]) > 0]/@name)]"/>
<xsl:for-each select="$all_rules">
<xsl:if test="@name=$name"><xsl:value-of select="position()"/></xsl:if>
</xsl:for-each>
</xsl:template>
Tuesday, 3 October 2006
Kenneth Cope
Greater Than us All is a great album.
I just shelled out some dosh (hard earned cash) to buy the CD version having played my casstte album to oblivion.
I was interested to see some tracks were re-recorded; and it comes to this:
Do you have an original CD album you could send me?
I don’t like the new recordings. They are not what my mind has become adjusted to, and even worse it starts to follow a trend set by the mormon tabernacle choir which seems to be to put inappropriate expression into the performance.
I probably should explain this last accusation a bit more, and I’ll use the tabernacle choir to explain.
I think the choir get bored singing the same old hymns and such so they try and jazz them up and put a bit more emotion into it, but that doesn’t make it better, it only makes it weird. Oh, but its probably more fun to sing.
(Did I mention I’m finding it hard to get decent mo-tab music lately? I’m thinking of downloading all the conferences and ripping the choir out of the middle ot build up a new compilation).
I want "Mo-tab: The same boring old hymns" type stuff, you know, "like momma used to bake" so to speak.
Now you haven’t done a bad job on the new cut of Greater Than Us All, but you are following the trend; a bit more unexpected desparation or wonder in the voice, delay the vocalists entry slightly by half a beat, drag out a middle phrase note for no good reason, it drives me mad. Not every phrase of the song needs to sound like some kind of epiphany or revelation; the song has to do that as a whole, but these days each phrase is trying to compete with the whole song.
It ends up sounding like the emotional expression of some other song overlayed onto this one. (Its nice variety for folk who have sung the song to death no doubt)
Please, be a nice man and send me what you hooked me on, not this slghtly freaky stuff. I like my music straight: A CD of your original cut of Greater Than Us All.
I just shelled out some dosh (hard earned cash) to buy the CD version having played my casstte album to oblivion.
I was interested to see some tracks were re-recorded; and it comes to this:
Do you have an original CD album you could send me?
I don’t like the new recordings. They are not what my mind has become adjusted to, and even worse it starts to follow a trend set by the mormon tabernacle choir which seems to be to put inappropriate expression into the performance.
I probably should explain this last accusation a bit more, and I’ll use the tabernacle choir to explain.
I think the choir get bored singing the same old hymns and such so they try and jazz them up and put a bit more emotion into it, but that doesn’t make it better, it only makes it weird. Oh, but its probably more fun to sing.
(Did I mention I’m finding it hard to get decent mo-tab music lately? I’m thinking of downloading all the conferences and ripping the choir out of the middle ot build up a new compilation).
I want "Mo-tab: The same boring old hymns" type stuff, you know, "like momma used to bake" so to speak.
Now you haven’t done a bad job on the new cut of Greater Than Us All, but you are following the trend; a bit more unexpected desparation or wonder in the voice, delay the vocalists entry slightly by half a beat, drag out a middle phrase note for no good reason, it drives me mad. Not every phrase of the song needs to sound like some kind of epiphany or revelation; the song has to do that as a whole, but these days each phrase is trying to compete with the whole song.
It ends up sounding like the emotional expression of some other song overlayed onto this one. (Its nice variety for folk who have sung the song to death no doubt)
Please, be a nice man and send me what you hooked me on, not this slghtly freaky stuff. I like my music straight: A CD of your original cut of Greater Than Us All.
Subscribe to:
Posts (Atom)