<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Kuan&#039;s Personal Blog</title>
	<atom:link href="http://kuanh.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://kuanh.wordpress.com</link>
	<description></description>
	<lastBuildDate>Thu, 09 Jun 2011 20:34:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='kuanh.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Kuan&#039;s Personal Blog</title>
		<link>http://kuanh.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://kuanh.wordpress.com/osd.xml" title="Kuan&#039;s Personal Blog" />
	<atom:link rel='hub' href='http://kuanh.wordpress.com/?pushpress=hub'/>
		<item>
		<title>&#8216;Personal data&#8217; in the UK, Anonymisation and Encryption</title>
		<link>http://kuanh.wordpress.com/2011/06/09/personal-data-in-the-uk-anonymisation-encryption/</link>
		<comments>http://kuanh.wordpress.com/2011/06/09/personal-data-in-the-uk-anonymisation-encryption/#comments</comments>
		<pubDate>Thu, 09 Jun 2011 20:25:16 +0000</pubDate>
		<dc:creator>K</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://kuanh.wordpress.com/?p=62</guid>
		<description><![CDATA[Footnote 97 of our paper &#8216;Personal Data&#8217; in Cloud Computing &#8211; What Information is Regulated? The Cloud of Unknowing, Part 1 mentioned that the appeal against an Information Tribunal decision, Department Of Health v Information Commissioner &#38; The Pro Life Alliance [2009] UKIT EA/2008/0074, was going to be heard by the courts (errata: it should [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kuanh.wordpress.com&amp;blog=1959440&amp;post=62&amp;subd=kuanh&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Footnote 97 of our paper <a href="http://www.cloudlegal.ccls.qmul.ac.uk/Research/researchpapers/45905.html">&#8216;Personal Data&#8217; in Cloud Computing &#8211; What Information is Regulated? The Cloud of Unknowing, Part 1</a> mentioned that the appeal against an Information Tribunal decision, <a href="http://www.informationtribunal.gov.uk/DBFiles/Decision/i344/DOH%20v%20IC%20and%20PLA%20(EA-2008-0074)%20Decision%2015-10-09%20(w).pdf">Department Of Health v Information Commissioner &amp; The Pro Life Alliance</a> [2009] UKIT EA/2008/0074, was going to be heard by the courts (errata: it should have read High Court, not Court of Appeal).</p>
<p>That judgment has now been published, and is important regarding the interpretation of the &#8216;personal data&#8217; definition in the UK.</p>
<p>This definition is critical when considering whether <span style="font-weight:bold;">anonymised or encrypted personal data</span> processed in the cloud should be treated as &#8216;anonymous data&#8217;, and therefore, eg, be transferable outside the EEA free of data protection law constraints &#8211; or whether such data would remain &#8216;personal data&#8217; subject to the provisions of data protection legislation.</p>
<p>The UK legislation implementing the EU Data Protection Directive was the Data Protection Act 1998 (<span style="font-weight:bold;">DPA</span>), s.1(1) of which provides, in words that differ from the Directive&#8217;s definition:</p>
<blockquote><p>&#8216;&#8221;personal data&#8221; means data which relate to a living individual who can be identified&#8211;<br />
(a) from those data, or<br />
(b) from those data and other information which is in the possession of, or is likely to come into the possession of, the data controller,<br />
and includes any expression of opinion about the individual and any indication of the intentions of the data controller or any other person in respect of the individual;&#8217;</p></blockquote>
<p>The s.1(1) interpretation question is as follows. Suppose that a data controller holds information which is personal data. It then attempts to anonymise this information, and intends to disclose the resulting anonymised information to a third party. What is the status of that anonymised information? Is it still &#8216;personal data&#8217;, or can it be treated as anonymous data?</p>
<p>Now, para. (b) of the definition, above, requires that, when considering whether a living individual can be identified from the &#8216;anonymised&#8217; data, account must be taken of &#8216;other information&#8217; held by the data controller.</p>
<p>A strict, &#8216;hard-line&#8217; interpretation of that provision might suggest that &#8216;anonymised&#8217; information can <span style="font-style:italic;">never</span> be treated as anonymous data for so long as the controller retains the original personal data from which the anonymised data were derived, because if you put together the anonymised data (&#8216;those data&#8217;) with the original personal data (&#8216;other information&#8217;) still possessed by the data controller, then of course people can still be identified &#8211; by the <span style="font-style:italic;">data controller</span>, from the <span style="font-style:italic;">original</span> personal data.</p>
<p>Or, suppose that the data controller has key-coded the original personal data (changed names to code numbers, with a &#8216;key&#8217; showing which number corresponds to which name), and destroyed the original personal data, but still possesses the key. Again, people can be identified from the key-coded data in combination with the key. So, on the &#8216;hard-line&#8217; view, the key-coded data would remain &#8216;personal data&#8217;.</p>
<p>If encryption is applied to a data set, the whole data set would be transformed, and not just names within the data set. However, where the data controller possesses the decryption key, encrypted personal data might be viewed as similar to key-coded data, and if so would, on the hard-line view, always be considered &#8216;personal data&#8217;.</p>
<p>So the recent judgment is very relevant to cloud computing as well as other areas of computing, and indeed more generally.</p>
<h2>PLA</h2>
<p>On 21 April 2011, Cranston J dismissed the Department of Health&#8217;s appeal, in <span style="font-style:italic;">Department of Health v Information Commissioner</span>, [2011] EWHC 1430 (Admin) (<span style="font-weight:bold;">PLA</span>).</p>
<p>After the UK Department of Health changed their approach to the release of anonymised abortion statistics, the Pro Life Alliance requested from the Department, under the Freedom of Information Act 2000 (<span style="font-weight:bold;">FOIA</span>), anonymised statistics in the more detailed form in which they had previously been released.</p>
<p>The Information Tribunal considered that the requested information was &#8216;personal data&#8217; in the hands of the Department of Health under s.1(1)(b) DPA. However, it held that, as it considered the possibility of identification by a third party from the requested statistics was &#8216;extremely remote&#8217;, the disclosure would not contravene the data protection principles of Sch 1 to that Act and was proportionate and justified when balanced against important legitimate public interests in disclosure.</p>
<p>On appeal, the judge held that the Tribunal&#8217;s interpretation was wrong: the requested information was not &#8216;personal data&#8217;, and therefore the Tribunal should have held that the disclosure of the information to the public did not constitute the processing of personal data. (He went on to rule that, even if he were wrong and the information was &#8216;personal data&#8217;, the Tribunal had acted properly in its overall assessment, from the statistical evidence and its own judgement, that it was &#8216;extremely remote&#8217; that the public to whom the statistical data was disclosed would be able to identify individuals from it, and in deciding that disclosure was justified under the DPA.)</p>
<p>Although Cranston J was invited to adopt Lady Hale&#8217;s reasoning in <span style="font-style:italic;"><a href="http://www.bailii.org/uk/cases/UKHL/2008/47.html">Common Services Agency v Scottish Information Commissioner</a></span> [2008] UKHL 47 (<span style="font-weight:bold;">CSA</span>), he felt bound by precedent to follow the judgment of Lord Hope, as the majority of the judges had agreed with Lord Hope&#8217;s leading speech.</p>
<p>He acknowledged that the <span style="font-style:italic;">CSA</span> judgments were not easy to interpret, but concluded from the wording of Lord Hope&#8217;s proposed order that Lord Hope had recognised that:</p>
<blockquote><p>although the Agency <span style="font-style:italic;">[data controller]</span> held the information as to the identities of the children to whom the requested information related, it did not follow from that that the information, sufficiently anonymised, would still be personal data when publicly disclosed. All members of the House of Lords agreed with Lord Hope&#8217;s order demonstrating, in my view, their shared understanding that anonymised data which does not lead to the identification of a living individual does not constitute personal data&#8230; The status of information in the data controller&#8217;s hands did not arise for decision in the CSA case. It was concerned with the implications of disclosure by the data controller&#8230; The opening sentence of paragraph 27 <span style="font-style:italic;">[of CSA]</span> acknowledges that the Agency holds the key to identifying the children, but continues that, in his Lordship&#8217;s opinion, the fact that the Agency had access to this information did not disable it from processing it in such a way consistent with recital 26 of the Directive, &#8220;that it becomes data from which a living individual can no longer be identified&#8221;. That must relate to whether any living individuals can be identified by the public following the disclosure of the information. It cannot relate to whether any living individuals can be identified by the Agency, since that is addressed in the first sentence of the paragraph. Thus the order made by the House of Lords in the CSA case was concerned with the question of fact, whether barnardisation could preclude identification of the relevant individuals by the public.</p></blockquote>
<p>(paras. 51-52)</p>
<p>Cranston J said that this conclusion reflected recital 26 of the Data Protection Directive, which recognises that the Directive does not apply to data rendered anonymous, giving that recital greater force than a suggestion that the Article 29 Working Party&#8217;s opinion on &#8216;personal data&#8217; required a broader initial interpretation of &#8216;personal data&#8217; (para. 53)</p>
<p>Indeed, any other conclusion seemed to him to be:</p>
<blockquote><p>divorced from reality. The Department of Health&#8217;s interpretation is that any statistical information derived from reporting forms or patient records constitutes personal data. If that were the case, any publication would amount to the processing of sensitive personal data. That would be so notwithstanding the statistical exemption in Section 33, since that exemption does not exclude the requirement to satisfy Schedule 3 of the DPA. Thus, the statistic that 100,000 women had an abortion in a particular year would constitute personal data about each of those women, provided that the body that publishes this statistic has access to information which would enable it to identify each of them. That is not a sensible result and would seriously inhibit the ability of healthcare organisations and other bodies to publish medical statistics.</p></blockquote>
<p>(para. 54)<br />
<h3>APGER</h3>
<p>A discussion of the interpretation issue had previously appeared in a recent Upper Tribunal decision, <span style="font-style:italic;"><a href="http://www.osscsc.gov.uk/judgmentfiles/j3247/GI%20150%202011.doc">All Party Parliamentary Group on Extraordinary Rendition v The Information Commissioner &amp; The Ministry of Defence</a></span> [2011] UKUT 153 (AAC) (<span style="font-weight:bold;">APGER</span>), published in April 2011. This decision was briefly discussed in <span style="font-style:italic;">PLA</span>.</p>
<p>The APGER asked the MoD for information on individuals detained or captured by UK soldiers operating jointly with forces of another country in Iraq or Afghanistan including, in the case of Iraq, detentions or captures jointly with US forces, information on their subsequent transfer to Guantanamo Bay or other detention facilities.</p>
<p>The Tribunal did not think that the dates of detention and dates and locations of any transfers would enable identification of individuals and therefore constitute personal data, based on the content of the information (especially the shortness of the detention periods) and the absence of any evidence that individuals would be identifiable from the information by reason of other knowledge held in the relevant communities (para. 109).</p>
<p>The MoD had also argued, based on (b) of the &#8216;personal data&#8217; definition, that information on the numbers of individuals transferred to particular detention facilities or particular kinds of detention facilities remained personal data, even when anonymised, &#8216;because the individuals remained identifiable by the MOD from other information in the possession of the MOD (ie, the unredacted information)&#8217;.</p>
<p>In this context, the Tribunal considered <span style="font-style:italic;">CSA</span> and said (para. 127) that:</p>
<blockquote><p>&#8216;Anonymisation by redaction is itself a form of processing. If the data controller carries out such anonymisation, but also retains the unredacted data, or retains the key by which the living individuals can be identified, the anonymised data remains “personal data” within the meaning of paragraph (b) of the definition and the data controller remains under a duty to process it only in compliance with the data protection principles.&#8217;</p></blockquote>
<p>They also said (para. 128), emphasis added:</p>
<blockquote><p>&#8216;However, we remain concerned at the use of this analysis in such a way as would have the effect of treating truly anonymised information as if it required the protection of the DPA, in circumstances where that is plainly not the case and indeed would be absurd. Lord Hope’s reasoning appears to lead to the result that, in a case where the data controller retains the ability to identify the individuals, the processing of the data by disseminating it in a fully anonymised form, from which no recipient can identify individuals, can only be justified by showing that it is effected in compliance with the data protection principles. Certainly the whole of the information still needs the protection of the DPA in the hands of the data controller, for as long as the data controller retains the other information which makes individuals identifiable by him. But outside the hands of the data controller the information is no longer personal data, because no individual can be identified. <span style="font-weight:bold;">We therefore think, with diffidence given the difficulties of interpretation which led to such divergent reasoning among their Lordships, the best analysis is that disclosure of fully anonymised information is not a breach of the protection of the Act because at the moment of disclosure the information loses its character as personal data. It remains personal data in the hands of the data controller, because the controller holds the key, but it is not personal data in the hands of the recipients, because the public cannot identify any individual from it. That which escapes from the data controller to the outside world is only plain vanilla data.</span> We think this was the reasoning that Baroness Hale had in mind, when she said at [92]:<br />
“For the purpose of this particular act of processing, therefore, which is disclosure of these data in this form to these people, no living individual to whom they relate is identifiable”.&#8217;</p></blockquote>
<p>Also of interest is the MoD&#8217;s further argument against the release of the requested information even with redaction of names, because it might constitute personal data of third parties within s.40(2) FOIA: &#8216;where small numbers of persons were involved, redaction of the names was insufficient and that individuals would be identifiable from information known to the public in areas where the detainees had been located prior to their detention.&#8217; (para. 124)</p>
<p>There, the Tribunal noted that, while the Information Commissioner had referred in argument to whether there was an “appreciable risk” of identification, that did not appear to them to be the statutory test, which uses the phrase “can be identified”.&#8217; However, in considering the facts of the matter, the Tribunal then said (para. 129) that &#8216;On the evidence that we have received, our conclusion on the balance of probabilities is that publication of the information the subject of the MOD’s appeal will not render individuals identifiable.&#8217; Thus, the test of identifiability applied in practice there was &#8216;the balance of probabilities&#8217;, which supports the suggestion in <a href="http://www.cloudlegal.ccls.qmul.ac.uk/Research/researchpapers/45905.html">our paper</a> of &#8216;more likely than not&#8217; (p. 40, last paragraph).</p>
<h2>Summary and comment</h2>
<p>As mentioned in footnote 97 of <a href="http://www.cloudlegal.ccls.qmul.ac.uk/Research/researchpapers/45905.html">our paper</a>, a Scottish court had previously remarked that the &#8216;hard-line&#8217; approach to s.1(1) DPA, whereby the original personal data would have to be destroyed before anonymised information could be released, seemed &#8216;hardly consistent&#8217; with recital 26 of the Directive.</p>
<p>While the Tribunal in <span style="font-style:italic;">APGER</span> based their decision on Lady Hale&#8217;s judgment and Cranston J in <span style="font-style:italic;">PLA</span> followed Lord Hope, both have now firmly rejected the hard-line interpretation. It is not yet known whether the Department of Health will be appealing <span style="font-style:italic;">PLA</span>.</p>
<p>Pending the outcome of any appeal, it is at least now clear that in the UK a data controller should be able to anonymise originally-personal data and then disclose or process the anonymised data, as long as the data are sufficiently anonymised so that the public cannot identify living individuals from the anonymised data. It should not matter that the data controller itself can identify living individuals from the anonymised data and/or the original personal data.</p>
<p>This makes it much more likely that securely-encrypted personal data may be stored in the cloud as &#8216;anonymous data&#8217;, and should also mean sufficiently-anonymised personal data may be stored or otherwise processed in the cloud.</p>
<p>However, the difficulty of &#8216;sufficiently&#8217; or &#8216;fully&#8217; anonymising personal data still remains. How much and what anonymisation will be good enough? It seems data will not be &#8216;personal data&#8217; if the likelihood of identification is &#8216;extremely remote&#8217; (<span style="font-style:italic;">PLA</span>), or perhaps if &#8216;on the balance of probabilities&#8217; disclosure of that data will not render individuals identifiable (as applied in <span style="font-style:italic;">APGER</span>).</p>
<p>Also, it&#8217;s still not entirely clear how the data controller must handle the anonymised data. Consider key-coded data, on the assumption that key-coding sufficiently anonymises the data (which may itself be problematic). Under <span style="font-style:italic;">APGER</span>, while the controller still holds the key-coded data and the key it must process that data only in compliance with the DPA &#8211; even though it may release the data without breaching the DPA because, on disclosure, the data would, in the hands of third parties, lose &#8216;personal data&#8217; character. In contrast, Cranston J seems to consider that sufficiently anonymised personal data would not be personal data. The exact factual circumstances may well affect the position &#8211; key-coding is not the same as aggregation, and it may also make a difference whether the controller retains the original personal data and/or the key.</p>
<p>Note further, in relation to the status of the anonymisation or encryption process itself (discussed in <a href="http://www.cloudlegal.ccls.qmul.ac.uk/Research/researchpapers/45905.html">our paper</a> at 3.3.1), that the Tribunal in <span style="font-style:italic;">APGER</span> has stated that &#8216;Anonymisation by redaction is itself a form of processing.&#8217; (para 127)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kuanh.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kuanh.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kuanh.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kuanh.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kuanh.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kuanh.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kuanh.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kuanh.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kuanh.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kuanh.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kuanh.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kuanh.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kuanh.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kuanh.wordpress.com/62/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kuanh.wordpress.com&amp;blog=1959440&amp;post=62&amp;subd=kuanh&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kuanh.wordpress.com/2011/06/09/personal-data-in-the-uk-anonymisation-encryption/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/348fd01534d19cd5e4db3203058376d5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">K</media:title>
		</media:content>
	</item>
		<item>
		<title>Amazon SimpleDB Developer Guide &#8211; unofficial errata etc</title>
		<link>http://kuanh.wordpress.com/2011/04/24/amazon-simpledb-developer-guide-unofficial-errata-etc/</link>
		<comments>http://kuanh.wordpress.com/2011/04/24/amazon-simpledb-developer-guide-unofficial-errata-etc/#comments</comments>
		<pubDate>Sun, 24 Apr 2011 20:57:31 +0000</pubDate>
		<dc:creator>K</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">https://kuanh.wordpress.com/2011/04/25/amazon-simpledb-developer-guide-unofficial-errata-etc/</guid>
		<description><![CDATA[Updated 28 April 2011: my review of this book has now been published on Slashdot. They edited it down. Here&#8217;s the complete review as submitted, complete with links to Amazon&#8217;s current free-tier offer, and cloud computing cartoons! These are my notes of errata, typos, queries/issues, and hoped-for improvements to the 2010 Packt book &#8220;Amazon SimpleDB [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kuanh.wordpress.com&amp;blog=1959440&amp;post=15&amp;subd=kuanh&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a title="Bookmark using any bookmark manager!" href="http://www.addthis.com/bookmark.php" rel="nofollow" target="_blank"><img src="http://s7.addthis.com/static/btn/lg-addthis-en.gif" alt="Bookmark and Share" width="125" height="16" border="0" /></a></p>
<p>Updated 28 April 2011: my review of this book has now been <a href="http://books.slashdot.org/story/11/04/27/1218207/Book-Review-Amazon-SimpleDB-Developer-Guide">published on Slashdot</a>. They edited it down. Here&#8217;s the <a href="http://slashdot.org/submission/1544424/Book-Review-Amazon-SimpleDB-Developer-Guide">complete review as submitted</a>, complete with links to Amazon&#8217;s current free-tier offer, and cloud computing cartoons!</p>
<p>These are my notes of errata, typos, queries/issues, and hoped-for improvements to the 2010 Packt book <a href="http://www.amazon.co.uk/gp/product/1847197345/ref=as_li_tf_tl?ie=UTF8&amp;tag=kuanh-21&amp;linkCode=as2&amp;camp=1634&amp;creative=6738&amp;creativeASIN=1847197345">&#8220;Amazon SimpleDB Developer Guide&#8221;</a><img style="border-style:none!important;margin:0;" src="http://www.assoc-amazon.co.uk/e/ir?t=kuanh-21&amp;l=as2&amp;o=2&amp;a=1847197345" alt="" width="1" height="1" border="0" /> by Prabhakar Chaganti and Rich Helms &#8211; aka, all the mistakes I made or spotted, so you don’t have to!</p>
<p>I’ve no comments on the PHP code as I only tried the Java and Python, using Windows. Forgive the ugly &#8220;pre&#8221; blocks for some of the code, but that was the only way I could stop WordPress from turning normal quotes into the dreaded &#8220;smart&#8221; curly quotes that prevent code from running.</p>
<h2 align="left">Page by page</h2>
<p>p 5 &#8211; link at the bottom is wrong – extra slash, link doesn’t work in the PDF.</p>
<p>pp 25-26 &#8211; needs “keep with next” for pics and captions.</p>
<p>p 27 &#8211; link at the top doesn&#8217;t work.</p>
<p>p 28 and throughout &#8211; they should have put &#8220;awsAccessId, awsSecretKey&#8221; in a different font to make it really obvious that you insert your actual keys there rather than, eg, thinking there&#8217;d be a prompt to enter your keys when you run the code. Going further, the book should have made it crystal clear that you need quotes around the keys &#8211; they&#8217;re strings.</p>
<p>pp 28-31 – no typica imports were given – the book should provide them once, then they can be used throughout the book, but the first time would help a lot, especially given that this is a &#8220;getting started&#8221; book, because Eclipse suggests several options and it&#8217;s not clear which is the correct one. In Chapters 2 onwards the <strong>minimum imports </strong>needed (some need more) are generally:<br />
import com.xerox.amazonws.sdb.Domain;<br />
import com.xerox.amazonws.sdb.SDBException;<br />
import com.xerox.amazonws.sdb.SimpleDB;<br />
(alternatively, the easiest if laziest solution is to import com.xerox.amazonws.sdb.*; )</p>
<p>Cf Chapters 9 and 10, eg p 194, which <strong><em>do</em></strong> give all the code, complete with all imports and even “main” – why the inconsistency? It would be easier for readers if the full code were provided in the early chapters. Contrast with <a href="http://blog.fpmurphy.com/2009/08/amazon-simpledb-typica-tutorial.html">this SimpleDB typica tutorial</a>, which gives all imports (and makes it crystal clear that the keys go in as strings).</p>
<p>There are also inconsistencies in the Python code, eg p 211 gives the preliminary code to import boto and set up the connection etc, whereas some earlier chapters leave that out. All the Python code should be similarly complete, for the convenience of those readers who (as seems most likely) try different chapters at different times: don&#8217;t assume readers will work through the whole book in a single sitting. In contrast, the <a href="http://aws.amazon.com/eclipse/">Amazon Web Services toolkit for Eclipse</a> took seconds to install, a few more seconds to enter my credentials, and the SimpleDB sample code given ran immediately.</p>
<p>p 38 – this Chapter should explain installation for Windows too, ie open a command window in the boto-[whatever] folder, then it&#8217;s python setup.py install. Add environment variables for your keys as user variables in the normal way eg through Computer Properties -&gt; Advanced System Settings -&gt; Advanced -&gt; Environment Variables). This is a strange omission as it’s in an <a href="http://www.ibm.com/developerworks/web/library/ar-cloudaws5/index.html?ca=dgr-lnxw01Amazon-SimplDB&amp;S_TACT=105AGX59&amp;S_CMP=grsitelnxw01">IBM Developerworks tutorial on SimpleDB/Python/boto</a>written by one of this book&#8217;s authors.</p>
<p>p 40 – there should be a True at the bottom of the page for the output you get after creating new item. Similarly with top of p 41.</p>
<p>p 42 &#8211; the last one:</p>
<pre>sdb_connection.get_attributes('prabhakar-dom-1',car1')</pre>
<p>should be:</p>
<pre>sdb_connection.get_attributes('prabhakar-dom-1','car1')</pre>
<p>- ie there&#8217;s a missing open quote.</p>
<p>p 59 – I don’t get Domain:Cars as the output in the penultimate line. Also, the code for creating the domain has a double underscore in the name cars__domain – but it needs to be single underscore ie cars_domain, or else copy/pasting the subsequent code (which uses cars_domain) won’t work.</p>
<p>p 60 – needs a space after the import ie it&#8217;s import SPACE inspect. Also, pp.pprint(inspect.getmembers(cars_domain, inspect.ismethod)) won’t work because the name has a single underscore here, see p 59. And so on.</p>
<p>p 63 &#8211; The line</p>
<pre>Domain domain = sdb.getDomain("songs");</pre>
<p>should be</p>
<pre>Domain domain = sdb.getDomain("Cars");</pre>
<p>p 64 – pasting the Python code shown here won’t work unless the double underscore on p 59 is fixed, or you use a double underscore here instead, ie cars__domain</p>
<p>p 70 – “It makes sure you call save() to actually persist your additions to SimpleDB” is misleading and gives the impression that add_value automatically includes a save() &#8211; cf p.71, which reads (correctly) “You must once again call save() in order to persist the changes.” The p 70 sentence should read something like “After calling add_values, make sure that you also call save()&#8230;”</p>
<p>p 75 &#8211; cars __domain should be (see p 59) cars_domain<br />
Missing code (this should be line 4):</p>
<pre>myitem2 = cars_domain.get_item('Car 2’)</pre>
<p>p 78 – I get</p>
<pre>u'dealer'</pre>
<p>in the results of running the code, not</p>
<pre>'dealer'</pre>
<p>p 88 – Java code gives the body of the method provided for zeropadding; but readers may be more interested in the <strong><em>use</em></strong> of the method, eg<br />
String encoded = DataUtils.encodeZeroPadding(int number, int maxNumDigits);<br />
or</p>
<pre>int decoded = DataUtils.decodeZeroPaddingInt("0000234");</pre>
<p>p 93 – again it would be more useful if rather than providing the method body this page provided code showing its use, like: Date aDate = new Date(); String encodedDate = DataUtils.encodeDate(aDate); System.out.println(encodedDate); &#8211; and similarly with the decodeDate() method.</p>
<p>p 111 – the p 116 info on quoting should be given here, and in the main body of the text rather than a side “warning” &#8211; I personally find those warnings easily missed, possibly because they’re in a smaller font. Using the backtick ` (above the Tab key) <strong><em>instead of</em></strong> a single quote ‘ isn’t obvious, especially to someone typing out the code instead of copy/pasting, so it merits major highlighting. The <a href="http://docs.amazonwebservices.com/AmazonSimpleDB/latest/DeveloperGuide/">Amazon guide</a> is much clearer on when ` must be used. To emphasise, in SELECT queries you must use ` around the domain name if the name contains, eg, a hyphen or underscore, or else it won&#8217;t work. (And you&#8217;re not &#8220;escaping&#8221; here, you&#8217;re <strong><em>quoting</em></strong> with a backtick.)</p>
<p>p 115 – there&#8217;s info missing about You’re a Strange Animal, whereas info about that item was added in p 108 and 110 &#8211; the example should be carried through in full ie:</p>
<pre>&gt;&gt; 1045845425 {u'Genre': u'Rock', u'Rating': u'****', u'Song': u"You're a Strange Animal", u'Artist': u'Gowan', u'Year': u'1985'}</pre>
<p>(cf pp 122, 124, 125, 129, 130, 131, 132, 134 which <em><strong>are</strong></em> consistent on that front).</p>
<p>p 136 – getAttributes in Java  &#8211; this code won’t run, and I can’t find the getItemsAttributes() method in <a href="http://typica.s3.amazonaws.com/com/xerox/amazonws/sdb/Domain.html">http://typica.s3.amazonaws.com/com/xerox/amazonws/sdb/Domain.html</a></p>
<p>p 146 – the download link for JetS3t is now <a href="http://jets3t.s3.amazonaws.com/downloads.html">http://jets3t.s3.amazonaws.com/downloads.html</a>. And the info here is incomplete – “Add the jets3t-0.7.2.jar to your classpath” is not good enough. You also have to add commons-httpclient-*.jar (in the jets3t libs directory) to the classpath, or else it won’t work.</p>
<p>By the way, this isn&#8217;t mentioned in the book but, when testing stuff on S3, a good way to check the results of running the code is to use <a href="http://www.jets3t.org/applications/cockpit.html">JetS3t Cockpit</a> (run the script in the JetS3t bin directory eg cockpit.bat if you&#8217;re on Windows). And if you try the book&#8217;s examples, you might want to use a different bucket name from packt_songs, or, alternatively, don&#8217;t forget to delete that bucket when you&#8217;re through. Bucket names are unique throughout the whole of AWS, not just to your account, so if you don&#8217;t delete it, no other readers will be able to use the same bucket name.</p>
<p>p 148 – “We will use a MD5 hash that is generated from the name of the song, name of the artist, and year.” – but, the code given doesn’t in fact use the year.</p>
<p>p 149 – why is the line with user key details commented out?</p>
<p>p 149-151 – isn&#8217;t there more efficient “for” code to do this, like the Python version on p 152, instead of going through each item individually?</p>
<p>p 151 – code is missing for “You’re a Strange Animal”. p154 – “/songs_folder” is used here, cf &#8220;/Users/prabhakar/Documents/SimpleDB Book/songs/” on p 160 – another inconsistency. More importantly, the code doesn’t run unless the mimes.type file from the jets3t configs folder is added to the classpath (I copied it to a lib folder in my Eclipse SimpleDB then added that lib folder to the project’s build path as Class folder in the project’s properties). Also, this code doesn’t allocate keys for the uploaded files using the relevant data from SimpleDB; the keys here are just the filenames. Either the book should provide code that uses SimpleDB data as the keys (as the Python code on p 159 does), or else it should explain clearly to readers that this can’t be done in Java.</p>
<p>p 160 – songs.select should be songs_domain.select in order to work with the previously-given code. Also, it wouldn&#8217;t hurt to remind Windows users to escape the backslash in the file/folder path eg C:\\path to\\songs/%s.mp3</p>
<p>p 161 – why not use more efficient code with a “for” loop? In any event, this code wouldn’t run: first, “The method downloadObjects(S3Bucket, DownloadPackage[]) in the type S3ServiceSimpleMulti is not applicable for the arguments (S3Bucket, DownloadPackage[])”, then on casting downloadPackages to DownloadPackage[] and trying to run it: “Unable to determine S3 Object key name from signed URL: null”. And also warnings of deprecated methods/types. Also, it’s not clear what&#8217;s the local location files get downloaded to, cf p 164 for Python which makes clear what the specified download directory will be. The info on <a href="http://www.ibm.com/developerworks/library/ar-cloudaws2/">http://www.ibm.com/developerworks/library/ar-cloudaws2/</a> with the comments in the code is clearer as to which code is mean to do what, and it would have helped if the code in the book had been similarly commented.</p>
<p>p 164 – see p 160 comment on “songs_domain” – occurs twice.</p>
<p>p 172 – “This sample will print the following values to the console:” – not exactly, the requestID will of course vary with the user.</p>
<p>pp 186-188 – memcached is also available for Windows <a href="http://www.splinedancer.com/memcached-win32/">http://www.splinedancer.com/memcached-win32/</a> &#8211; installation instructions are on that page, your directory structure may vary of course.</p>
<p>p 189 – why so specific on “Copy the JAR file named java_memcached-release_2.5.0.jar to a folder that is on your classpath.”? Why not just say, add it to your classpath? (adding it as an external jar also works, for instance). This page should also include instructions for memcached Windows, as p 38 sort of does &#8211; ie download the python-memcached library, extract the files, run cmd, cd to the folder, use “python setup.py install”; start the server with the command “c:\path\to\memcached.exe -d start”.</p>
<p>p 190 – it can&#8217;t be a bad idea to remind readers to start the memcached server running first, here.</p>
<p>p 192 – “mc = memcache.Client(['127.0.0.1:12312'])” – why is the port said to be 12312 here? Cf p 190 where it’s port 11211 for the Java. Only 11211 works for me, at least when using memcached for Windows with Python.</p>
<p>pp 194-196 – the Java code didn’t work for me, it still keeps retrieving the data afresh from SimpleDB – even though the Java test on p 190-191 showed that the memcached server is working fine, and the caching certainly works in Python (p 202).</p>
<p>p 201 – the code starting at the bottom of the page should be saved into a file called sdb_memcache.py – a big omission. Newbies – best to save the py files to the same folder as your Python installation eg the Lib subfolder; and NB you have to fix the indents if you copy/paste.</p>
<p>p 202 – if using memcached for Windows, it won’t work unless you use port number 11211 ie: sdb_mc = SDBMemcache(&#8220;127.0.0.1&#8243;,&#8221;11211&#8243;) p 205 &#8211; &#8220;In this chapter, we will explore how to run parallel operations against SimpleDB using boto.&#8221; &#8211; but it&#8217;s not just using boto. The page number&#8217;s missing from this page.</p>
<p>p 213 &#8211; &#8220;Here is a simple Python script that updates items by making three different calls to SimpleDB, but in a serial fashion, that is one call after another.&#8221; &#8211; but, no script was actually given?? And why not give the code for &#8220;Running this through <span style="font-family:'Lucida Console';">time</span>&#8220;?</p>
<p>p 213-216 &#8211; it would have been more helpful to give the explanations as comments against the relevant parts of the code, so that it&#8217;s clear which bit of the code does what. That&#8217;s a general point about the earlier Java code in this book too.</p>
<p>p 221 &#8211; to install eggs you have to first install <a href="http://packages.python.org/distribute/easy_install.html">easy_install</a>. Although I&#8217;d already installed setuptools, I still had to download <a href="http://peak.telecommunity.com/dist/ez_setup.py">ez_install.py</a> for this to work.</p>
<p><a href="http://digg.com/submit?url=https%3a%2f%2fkuanh.wordpress.com%2f2011%2f04%2f25%2famazon-simpledb-developer-guide-unofficial-errata-etc%2f&amp;title=Amazon+SimpleDB+Developer+Guide+-+unofficial+errata+etc"><img style="border:0;" title="Digg This" src="http://digg.com/img/badges/100x20-digg-button.png" alt="Digg This" width="100" height="20" border="0" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kuanh.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kuanh.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kuanh.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kuanh.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kuanh.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kuanh.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kuanh.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kuanh.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kuanh.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kuanh.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kuanh.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kuanh.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kuanh.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kuanh.wordpress.com/15/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kuanh.wordpress.com&amp;blog=1959440&amp;post=15&amp;subd=kuanh&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kuanh.wordpress.com/2011/04/24/amazon-simpledb-developer-guide-unofficial-errata-etc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/348fd01534d19cd5e4db3203058376d5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">K</media:title>
		</media:content>

		<media:content url="http://s7.addthis.com/static/btn/lg-addthis-en.gif" medium="image">
			<media:title type="html">Bookmark and Share</media:title>
		</media:content>

		<media:content url="http://www.assoc-amazon.co.uk/e/ir?t=kuanh-21&#38;l=as2&#38;o=2&#38;a=1847197345" medium="image" />

		<media:content url="http://digg.com/img/badges/100x20-digg-button.png" medium="image">
			<media:title type="html">Digg This</media:title>
		</media:content>
	</item>
		<item>
		<title>Make Lexology readable!</title>
		<link>http://kuanh.wordpress.com/2007/10/21/make-lexology-readable/</link>
		<comments>http://kuanh.wordpress.com/2007/10/21/make-lexology-readable/#comments</comments>
		<pubDate>Sun, 21 Oct 2007 19:26:18 +0000</pubDate>
		<dc:creator>K</dc:creator>
				<category><![CDATA[law]]></category>
		<category><![CDATA[usability]]></category>
		<category><![CDATA[accessibility]]></category>
		<category><![CDATA[legal sites]]></category>
		<category><![CDATA[Lexology]]></category>

		<guid isPermaLink="false">http://kuanh.wordpress.com/2007/10/21/make-lexology-readable/</guid>
		<description><![CDATA[Lexology is a handy website which brings together in one place bulletins, newsletters, articles and the like produced for their clients by many law firms, with a daily email listing recently posted articles in the countries and subject areas you&#8217;ve indicated your interest in when you signed up. But the font used in both their [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kuanh.wordpress.com&amp;blog=1959440&amp;post=4&amp;subd=kuanh&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.lexology.com/" title="Lexology site">Lexology</a> is a handy website which brings together in one place bulletins, newsletters, articles and the like produced for their clients by many law firms, with a daily email listing recently posted articles in the countries and subject areas you&#8217;ve indicated your interest in when you signed up.</p>
<p>But the font used in both their emails and website is small, and in some light shade of grey, rather than black. That combination isn&#8217;t very accessible for those of us with poor eyesight, like me.</p>
<p>I&#8217;ve raised this usability issue with Lexology direct a couple of times now. I gather that offering users a choice of fonts is on the cards, but I don&#8217;t know if it&#8217;ll be soon enough to save what&#8217;s left of my eyesight, so I&#8217;ve come up with another solution.</p>
<p>I&#8217;m publishing it here in the hope that it&#8217;ll help preserve other people&#8217;s eyes too. That can be my good deed for this millennium.</p>
<p>To use it, you need -<br />
(1) the free Firefox browser: <a href="http://getfirefox.com/">http://getfirefox.com/</a> - but only if you&#8217;re allowed to install Firefox at work, of course. Otherwise, you&#8217;re stuck with trying it at home only.<br />
(2) the free Greasemonkey 0.3 or later: <a href="http://greasemonkey.mozdev.org/">http://greasemonkey.mozdev.org/</a><br />
(3) this userscript I made earlier: <a href="http://userscripts.org/scripts/source/13166.user.js">http://userscripts.org/scripts/source/13166.user.js</a> </p>
<p>For those interested, the main page for that script is <a href="http://userscripts.org/scripts/show/13166" title="Make Lexology Readable page for script">here</a>.</p>
<p><strong>Added later</strong>: nearly 150 people have installed that script in less than 24 hours, according to that page. There must be more demand for something like this than I thought. I never knew there were so many Firefox-using Lexology readers.</p>
<p><strong>Instructions</strong></p>
<p>1. Download and install Firefox from <a href="http://getfirefox.com/">http://getfirefox.com/</a></p>
<p>2. Open Firefox and go to <a href="http://greasemonkey.mozdev.org/">http://greasemonkey.mozdev.org/</a> in Firefox.</p>
<p>3. Click the &#8220;Install Greasemonkey&#8221; link.</p>
<p>4. If you see &#8220;To protect your computer, Firefox prevented this site (greasemonkey.mozdev.org) from installing software on your computer&#8221;, click &#8220;Edit Options&#8221;, &#8220;Allow&#8221;, &#8220;OK&#8221;, &#8220;Close&#8221;.</p>
<p>5. Click the &#8220;Install Greasemonkey&#8221; link again, then &#8220;Install now&#8221;.</p>
<p>6. Then close Firefox, open it again, and click the link to this script:<br />
<a href="http://userscripts.org/scripts/source/13166.user.js">http://userscripts.org/scripts/source/13166.user.js</a></p>
<p>7. Click Install, waiting a few seconds first if necessary.</p>
<p>Next time you visit Lexology via Firefox, it&#8217;ll be much easier to read. I&#8217;ve made the font black, for instance. There are ways to <a href="http://www.google.com/search?hl=en&amp;q=open+outlook+links+in+firefox" title="Make Outlook links open in Firefox search">make Outlook hyperlinks open automatically in Firefox</a> instead of Internet Explorer, if you don&#8217;t want to copy and paste from the Lexology email.</p>
<p>How to uninstall the script? In Firefox, under Tools, there will be a new menu item &#8220;Greasemonkey&#8221;. If you want to get rid of this script and revert to the old view of Lexology, go to Tools/Greasemonkey/Manage User Scripts, select &#8220;Make Lexology Readable&#8221;, and click Uninstall, and OK. You could alternatively Disable the script instead of uninstalling it, if you prefer.</p>
<p>I thought about creating a version of the script for Internet Explorer 7, for those of us who aren&#8217;t allowed to install Firefox on their work computers. But there&#8217;s probably no point as most firms aren&#8217;t using IE 7. Even if they are, if they won&#8217;t let you install Firefox they probably won&#8217;t let you install a browser add-on for IE 7 either, so again there seems to be no point. However, if you&#8217;d like a version for IE 7 please let me know by adding a comment, and if enough people want it I may well try to produce something.</p>
<p>Thanks: <a href="http://diveintogreasemonkey.org/" title="Dive into Greasemonkey">Mark Pilgrim</a>.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/kuanh.wordpress.com/4/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/kuanh.wordpress.com/4/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kuanh.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kuanh.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kuanh.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kuanh.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kuanh.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kuanh.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kuanh.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kuanh.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kuanh.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kuanh.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kuanh.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kuanh.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kuanh.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kuanh.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kuanh.wordpress.com&amp;blog=1959440&amp;post=4&amp;subd=kuanh&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kuanh.wordpress.com/2007/10/21/make-lexology-readable/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/348fd01534d19cd5e4db3203058376d5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">K</media:title>
		</media:content>
	</item>
	</channel>
</rss>
