<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8338396833705157791</id><updated>2012-01-31T20:29:21.651Z</updated><category term='Personal'/><category term='Coding'/><category term='Holidays'/><category term='Sport'/><category term='Copyright'/><category term='SQL'/><category term='Technology'/><category term='Sony'/><category term='Regular Expressions'/><category term='Music'/><category term='Physics'/><category term='SF'/><category term='Logic'/><category term='Security'/><category term='Science'/><category term='Comedy'/><category term='Open Source'/><category term='Politics'/><category term='Quantum Computing'/><category term='Electronics'/><category term='Mathematics'/><category term='Functional'/><category term='Language'/><category term='Cosmology'/><category term='Food'/><category term='Poetry'/><category term='Privacy'/><category term='WTF'/><category term='Movies'/><category term='Religion'/><category term='Education'/><category term='Lists'/><category term='Books'/><title type='text'>My Code Here</title><subtitle type='html'>Some articles on computing, security, mathematics, science, language, and music. Some not.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default?start-index=101&amp;max-results=100'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>215</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-6287540925537128470</id><published>2012-01-28T15:19:00.017Z</published><updated>2012-01-29T10:00:53.925Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><category scheme='http://www.blogger.com/atom/ns#' term='Privacy'/><title type='text'>On International Data Privacy Day</title><content type='html'>&lt;a href="http://en.wikipedia.org/wiki/Google"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 200px; height: 71px;" src="http://4.bp.blogspot.com/-TaSdS6iRgHI/TyQ5r_DGULI/AAAAAAAABKU/4UKqML_D9Es/s200/220px-Googlelogo.png" alt="" id="BLOGGER_PHOTO_ID_5702746455979479218" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;Europe to Google&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Really, Google? You're &lt;span style="font-style: italic;"&gt;getting rid of over 60 different privacy policies&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;replacing them with one that's a lot shorter&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;easier to read?&lt;/span&gt; Gee, thanks for doing that! I do have trouble with anything requiring an adult's attention span. What's that, your new policy &lt;span style="font-style: italic;"&gt;covers multiple products and features&lt;/span&gt;, reflecting your desire &lt;span style="font-style: italic;"&gt;to create one beautifully simple and intuitive experience?&lt;/span&gt; Terrific! You &lt;span style="font-style: italic;"&gt;believe this stuff matters?&lt;/span&gt; Well that's great, just great.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;First of all:&lt;/span&gt; why oh why, in the name of all that's hairy (and private); why did you ever send this notification to my &lt;span style="font-style: italic;"&gt;Sky Mail account?&lt;/span&gt; I know you provide their service; but you know, that only makes &lt;span style="font-style: italic;"&gt;them&lt;/span&gt;, not &lt;span style="font-style: italic;"&gt;me&lt;/span&gt;, your customer. My contract is with Sky. They carry a privacy policy, to which I've agreed. Your opinions were neither sought nor welcome, and your policy (or policies) has (or have) no dominion over me there.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Secondly:&lt;/span&gt; do you never learn? You killed the much over-hyped Google Buzz in 2010 by deliberately implementing and obscuring such default privacy settings as would shame Facebook. You just killed off any last chance of social network success, by enforcing your account naming policy in Google+ (latest feeble "concessions" notwithstanding). Now you impose, without an opt-out, this unification of accounts across all Google services. What makes you think that I will continue to &lt;span style="font-style: italic;"&gt;want&lt;/span&gt; to entrust &lt;span style="font-style: italic;"&gt;any&lt;/span&gt; of my business correspondence, private letters, other documents and messages, contact lists, calendars, photographs, videos, even this blog, to such a capricious company? To you, who might delete everything I own at any time, on a whim and without appeal, simply because you suddenly decide you don't like my name?&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Thirdly and finally:&lt;/span&gt; shut up, sit down, and pay attention. European citizens will not have privacy policies dictated to them by their service providers. &lt;a href="http://mycodehere.blogspot.com/2012/01/eu-data-protection-reform-2012.html"&gt;Europe shall determine the privacy policy&lt;/a&gt; to be applied to, and by, its service providers. That, or else providers will no longer &lt;span style="font-style: italic;"&gt;be&lt;/span&gt; providers to Europeans.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Sufficient_unto_the_day_is_the_evil_thereof"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 150px; height: 200px;" src="http://1.bp.blogspot.com/-cja-JkygSzE/TyQx4RahGpI/AAAAAAAABKI/46m9z3Oz6nM/s200/180px-Sufficient_unto_the_day_are_the_evils_thereof_-_geograph.org.uk_-_1290591.jpg" alt="" id="BLOGGER_PHOTO_ID_5702737870974950034" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;Sufficient Unto The Day&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;And the same applies across the pond. Facebook Live, in conjunction with the National Cyber Security Counsel, streamed last Thursday's NCSA event anticipating &lt;a href="http://technolog.msnbc.msn.com/_news/2012/01/26/10243278-ftc-head-calls-out-facebook-google-on-data-privacy-day"&gt;International Data Privacy Day&lt;/a&gt; (which is today). This included the keynote opening speech by Federal Trade Commissioner Julie Brill, but if Zuckerberg and co thought their coverage would smooth the ride, then it's safe to say she surprised them. The full text of her remarks can be read here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.ftc.gov/speeches/brill/120126datarivacyday.pdf"&gt;http://www.ftc.gov/speeches/brill/120126datarivacyday.pdf&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;But here are a few samples.&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-style: italic;"&gt;Our enforcement actions in the privacy area are also a call to industry to put important privacy principles into practice. Facebook and Google learned this the hard way.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;The Commission’s complaint against Facebook alleges a number of deceptive and unfair practices [...] These include the 2009 changes made by Facebook so that information users had designated private became public.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;We also addressed Facebook’s inaccurate and misleading disclosures relating to how much information about users apps operating on the site can access [...] that the company misrepresented its compliance with the U.S.-EU Safe Harbor. And we called Facebook out for promises it made but did not keep: It told users it wouldn’t share information with advertisers, and then it did; and it agreed to take down photos and videos of users who had deleted their accounts, and then it did not.&lt;/span&gt;&lt;/blockquote&gt;Google received similar coverage of the FTC's complaint against them in the &lt;span style="font-style: italic;"&gt;Buzz&lt;/span&gt; era. Both companies settled their respective complaints, and have been left embarrassingly subject to a decades-long regime of shame, rehabilitation, audit and assessment. Yet both seem determined to keep testing and risking their parole.&lt;br /&gt;&lt;br /&gt;Facebook and Google: &lt;span style="font-style: italic;"&gt;sufficiently evil, unto the day.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-6287540925537128470?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/6287540925537128470/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2012/01/on-international-data-privacy-day.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/6287540925537128470'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/6287540925537128470'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2012/01/on-international-data-privacy-day.html' title='On International Data Privacy Day'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-TaSdS6iRgHI/TyQ5r_DGULI/AAAAAAAABKU/4UKqML_D9Es/s72-c/220px-Googlelogo.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-7682669955985112565</id><published>2012-01-25T16:17:00.021Z</published><updated>2012-01-27T00:09:12.094Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Technology'/><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><category scheme='http://www.blogger.com/atom/ns#' term='Privacy'/><category scheme='http://www.blogger.com/atom/ns#' term='Sony'/><title type='text'>EU Data Protection Reform 2012</title><content type='html'>&lt;a href="http://en.wikipedia.org/wiki/File:Commflag.jpg"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 150px; height: 200px;" src="http://3.bp.blogspot.com/-1RRXRAzJUCs/TyCGihrWY0I/AAAAAAAABJ8/VJ01_jwQk10/s200/180px-Commflag.jpg" alt="" id="BLOGGER_PHOTO_ID_5701705055964914498" border="0" /&gt;&lt;/a&gt;&lt;b&gt;Europe Sets the Standard&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;The European Commission today proposed a comprehensive reform of the EU's 1995 data protection rules, to strengthen online privacy rights and boost Europe's digital economy. The text of the proposals &lt;i&gt;(&lt;a href="http://ec.europa.eu/justice/data-protection/document/review2012/com_2012_11_en.pdf"&gt;pdf&lt;/a&gt;)&lt;/i&gt; comprises a hefty 91 articles and supporting material, spread over 120 pages. Here, summarised in the form of annotated bullet points, are eight of the most important and/or controversial aspects from an initial reading of today's proposals.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;One Rule for All&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;The intention is to introduce a &lt;i&gt;single regulation (law)&lt;/i&gt; across all 27 member countries. This contrasts with the 1995 &lt;i&gt;&lt;a href="http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=CELEX:31995L0046:en:HTML"&gt;directive&lt;/a&gt;&lt;/i&gt;, which specified only the desired results. While these results were themselves binding, they were left to the individual states to implement, using their own chosen methods and mechanisms. Nobody seriously considers the outcome of that process, predictably enough a patchwork of 27 variegated rule sets, to have been a resounding success.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;No Geographical Boundaries&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;i&gt;Article 3&lt;/i&gt; declares the scope of the new regulation, which would extend to anyone, anywhere in the world (yes you too, America!), involved in the processing of any personal information, relating to any EU citizen. And by &lt;i&gt;personal information&lt;/i&gt; is meant not only names, dates, and places, but also technical data such as IP or Mac addresses; (explicitly) information of a genetic, biometric, or health nature; and so on. Service providers like Facebook or Google must accept these obligations in full, or else deny their services to EU citizens.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;The Right to Erasure&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;i&gt;Article 17&lt;/i&gt; guarantees EU citizens the right to "extended erasure" of their personal data. Not only will the organization that processes personal data have to erase it on demand, but the they will also have to "take all reasonable steps, including technical measures" to get any copy, link, or replication on the Internet removed. Now, although in practice search engine data removal can mostly be automated, data removal from e.g. sites repeating CC-licensed Wikipedia content could be problematic.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Data Portability&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;i&gt;Article 18&lt;/i&gt; introduces the right to data portability - that is, to obtain a complete copy of stored or active data in a structured format. For example, this will allow users to switch between web mail systems with all their data intact.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Mandatory Assessments&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;i&gt;Article 30&lt;/i&gt; binds organizations to systematic security risk evaluations; unlawful forms of processing, unauthorized disclosure, dissemination or access, or alteration of personal data must be prevented. Here, the commission reserves the right to define: &lt;i&gt;what constitutes the state of the art, for specific sectors and in specific data processing situations, in particular taking account of developments in technology and solutions for privacy by design and data protection by default&lt;/i&gt;.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Mandatory Notifications&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;i&gt;Article 31&lt;/i&gt;, already being dubbed &lt;i&gt;&lt;a href="http://www.cnbc.com/id/42769019/Sony_PlayStation_Breach_Involves_70_Million_Subscribers"&gt;the Playstation Clause&lt;/a&gt;&lt;/i&gt;, requires organizations to disclose to their supervisory authority, effectively immediately, and in any case within a maximum of 24 hours, any personal data security breach. Sony famously waited one full week before telling their &lt;span style="font-style: italic;"&gt;SEVENTY MILLION&lt;/span&gt; customers their personal data might have been compromised. This provision has of course come in for immediate and heavy criticism; 24 hours is not a lot of time for the kind of investigations that might be needed to avoid many false alarms. It might also be too short an interval to prepare measures to ensnare hackers, and serve only to warn them their attacks have been noticed and actioned.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Enforcement: Data Protection Officers&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;i&gt;Article 36&lt;/i&gt; provides for data protection officers, designated in regard to their knowledge on data protection laws, who will be independent, and will receive no instructions pertaining to the exercise of their function. These officers will be mandatory in three prescribed cases, namely:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;for any public authority or body;&lt;/li&gt;&lt;li&gt;for any company  permanently  employing more than 250 persons; and&lt;/li&gt;&lt;li&gt;for any company whose core activity consists of monitoring data subjects &lt;i&gt;[qv]&lt;/i&gt;.&lt;/li&gt;&lt;/ol&gt;One important corollary is the &lt;i&gt;end of general notifications to local agencies&lt;/i&gt;, which measure alone should simplify the regulatory environment and save an expected 130 million € per annum.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Enforcement: Enormous Fines&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;i&gt;Article 79&lt;/i&gt; aims to give the legislation the necessary "teeth" to enforce these rules. This it does by  providing individual national data privacy agencies with huge administrative sanctions. Various levels are countenanced, depending upon the particular violation, but the headline figures are: up to one million €, and up to 2% of an enterprise's annual worldwide turnover. Just to put that in context, to Microsoft in 2008, that would have come to 1.2 billion € plus tips.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Conclusion&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It's a bold proposal, obviously designed to take the lead in the international areas of user privacy, data ownership, and data security. Certain of its provisions appear superficially to be quite "heavy" in their commercial import; some rather impractical, and maybe idealistic, although given the technological representation present and the consultancy that has taken place over the last 17 years, certainly not as naive as recent American proposals in adjacent fields &lt;span style="font-style: italic;"&gt;(SOPA, ProtectIP)&lt;/span&gt;. The Commission has clearly decided to take a stand against the piecemeal, partial, and largely failed implementations of its earlier directive. It will be very interesting to see how and where this extensive new structure flexes under the opposing pressures of commerce and politics in coming months.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-style: italic;"&gt;Picture: Berlaymont building of the European Commission (&lt;a href="http://en.wikipedia.org/wiki/File:Commflag.jpg"&gt;Wikipedia&lt;/a&gt;).&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-7682669955985112565?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/7682669955985112565/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2012/01/eu-data-protection-reform-2012.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/7682669955985112565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/7682669955985112565'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2012/01/eu-data-protection-reform-2012.html' title='EU Data Protection Reform 2012'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-1RRXRAzJUCs/TyCGihrWY0I/AAAAAAAABJ8/VJ01_jwQk10/s72-c/180px-Commflag.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-6948206598780991701</id><published>2012-01-20T23:47:00.027Z</published><updated>2012-01-25T06:41:27.631Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Music'/><title type='text'>Alabaster Jones - Glasgow 20/1/12</title><content type='html'>&lt;a href="http://4.bp.blogspot.com/-e4ZzGhwh3kg/TxoTJmFdqZI/AAAAAAAABJw/oaFre9xJdaI/s1600/Alabaster%2BJones.jpg"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 178px; height: 200px;" src="http://4.bp.blogspot.com/-e4ZzGhwh3kg/TxoTJmFdqZI/AAAAAAAABJw/oaFre9xJdaI/s200/Alabaster%2BJones.jpg" alt="" id="BLOGGER_PHOTO_ID_5699889333953997202" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;Pimp My Funk&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Last time I set foot in the &lt;a style="font-style: italic;" href="http://www.classicgrand.com/"&gt;Classic Grand&lt;/a&gt;, Jamaica Street, was in the mid 1970s. My friend Spike and I went to see an X-certificate (18 - yes, we were both underage) &lt;s&gt;porno flick&lt;/s&gt; French film of self-discovery called &lt;a style="font-style: italic;" href="http://www.imdb.com/title/tt0069451/"&gt;La Vallée&lt;/a&gt;. At that time, the small Glasgow movie theatre was renowned for its X-cert fare. So much so, the locals used to call it the &lt;span style="font-style: italic;"&gt;Classic Gland&lt;/span&gt;, and joke that the clientele all wore plastic macs. However, we weren't there - we told ourselves - to ogle and drool at the pretend humping. The big attraction was actually the film's soundtrack: the Pink Floyd album, &lt;a href="http://en.wikipedia.org/wiki/Obscured_by_Clouds"&gt;&lt;span style="font-style: italic;"&gt;Obscured By Clouds&lt;/span&gt;&lt;/a&gt;. Written and recorded during the &lt;span style="font-style: italic;"&gt;Dark Side of the Moon&lt;/span&gt; sessions, it does contain a few rather great songs...&lt;br /&gt;&lt;br /&gt;Tonight I returned with my wife to the now-converted rock club &amp;amp; live music venue that is the repurposed Classic Grand. As before, the motivation was music. We arrived, as seems usual for us nowadays, just as the last band of this &lt;a href="http://www.yrock.co.uk/"&gt;&lt;span style="font-style: italic;"&gt;YRock&lt;/span&gt;&lt;/a&gt;-organised evening took to the stage at 9:30 :-(so we missed all of &lt;span style="font-style: italic;"&gt;Picnic Railway&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;Erin Todd&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;Rosie Bans&lt;/span&gt;, and &lt;span style="font-style: italic;"&gt;Motion Play&lt;/span&gt;)-:&lt;br /&gt;&lt;br /&gt;Named for the &lt;span style="font-style: italic;"&gt;King of the Hill&lt;/span&gt; Oklahoma City pimp voiced by Snoop Dogg, &lt;a href="https://www.facebook.com/Alabasterjonesband?sk=info"&gt;Alabaster Jones&lt;/a&gt; are a band with a solid direction, and that direction is &lt;span style="font-style: italic;"&gt;funk&lt;/span&gt;. Unwavering, uncompromising, and unadulterated, even though alternative. Now, maybe they will develop an appetite for greater variety one day, when they're free to play longer sets than tonight's (the very, very best part of an hour). That should be quite a day. For who would dare to predict what musical dissertations a band, who number among their influences &lt;span style="font-style: italic;"&gt;Prince&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;Hendrix&lt;/span&gt;, and &lt;span style="font-style: italic;"&gt;The Mars Volta&lt;/span&gt;, might end up writing? But until then, they're playing a winning formula with this relentlessly dirty, alt-funk groove odyssey which they do so well.&lt;br /&gt;&lt;br /&gt;Front and centre on keys and main vocals is Paul Loughran, who after the opening one-two salvo of &lt;span style="font-style: italic;"&gt;Too Late&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;Pure Gold&lt;/span&gt;, complains about being hit in the back of the legs by the bass drum. The quality keeps rolling out with &lt;span style="font-style: italic;"&gt;Brand New Day&lt;/span&gt; and the hugely original and catchy &lt;span style="font-style: italic;"&gt;Superkrunk!&lt;/span&gt; - Andy Mushet's slap happy bass melds satisfyingly with tight syncopation from Liam Cutkelvin's drumwork, turning all of us into dancing fools. Paul answers a certain heckler shouting "Get a haircut!" with "I can't believe I've just been told to get a haircut by my dad!"&lt;br /&gt;&lt;br /&gt;What's that intro sound? Wailing and noodling like... is it Pink Floyd again? Dire Straits? Nah, it's &lt;span style="font-style: italic;"&gt;Funkatron!&lt;/span&gt; A sad story maybe &lt;span style="font-style: italic;"&gt;("That's why I'm mean...")&lt;/span&gt;, but in seconds we're back in that familiar warm and funky groove again.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;New Song&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Down In The Mud&lt;/span&gt; is a new song they're premiering at tonight's gig, but I've already downloaded and learned it from Soundcloud, so I'm singing along as Paul gives his humongous keyboard a rest, cavorting and vocalising instead like some over-animated Jay Kay. There's some particularly lovely guitar sketches by maestro Adam Millar in this performance tonight. Next, &lt;span style="font-style: italic;"&gt;Funkatron part 2: where the party is at&lt;/span&gt; gives all three front men a good workout in vocal harmonies, to great effect. And &lt;span style="font-style: italic;"&gt;Grease The Wheels (bring me the butter)&lt;/span&gt; provides a fitting Zappaesque finale, reaffirming the band's quirky sense of humour, and sending us off still dancing.&lt;br /&gt;&lt;br /&gt;Tonight's gig was filmed. &lt;span style="font-style: italic;"&gt;Professionally, with two cameras an' everything!&lt;/span&gt; Unfortunately that meant that we couldn't really stroll up to the front to get any action photos of our own, not without spoiling the video project. Second downer of the night: the bar shuts at 10, in order to let the venue reopen as a club at 11. This meant some people had to be happy with one drink, when the ideal number would obviously have been something more in the region of two.&lt;br /&gt;&lt;br /&gt;Great gig though. Huge fun. &lt;span style="font-style: italic;"&gt;Setlist (with &lt;a href="http://soundcloud.com/alabasterjones"&gt;Soundcloud&lt;/a&gt; links where available):&lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://soundcloud.com/alabasterjones/too-late"&gt;Too Late&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Pure Gold&lt;/li&gt;&lt;li&gt;Brand New Day&lt;/li&gt;&lt;li&gt;&lt;a href="http://soundcloud.com/alabasterjones/superkrunk"&gt;Superkrunk!&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Funkatron&lt;/li&gt;&lt;li&gt;&lt;a href="http://soundcloud.com/alabasterjones/down-in-the-mud"&gt;Down In The Mud&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Funkatron &lt;span style="font-style: italic;"&gt;part 2: where the party is at&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://soundcloud.com/alabasterjones/grease-the-wheels-bring-me-the"&gt;Grease The Wheels&lt;/a&gt;&lt;span&gt; &lt;span style="font-style: italic;"&gt;(bring me the butter)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-style: italic;"&gt;Disclosure: keys and vocals funkmeister Paul is a working colleague of my wife, who insists he is not only a keen and diligent worker, but also one of the nicest blokes you could ever hope to meet. It'll be a sad day for her company when Alabaster Jones get the rewards and &lt;/span&gt;&lt;span style="font-style: italic;"&gt;recognition &lt;/span&gt;&lt;span style="font-style: italic;"&gt;they deserve!&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-6948206598780991701?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/6948206598780991701/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2012/01/alabaster-jones-glasgow-20112.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/6948206598780991701'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/6948206598780991701'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2012/01/alabaster-jones-glasgow-20112.html' title='Alabaster Jones - Glasgow 20/1/12'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-e4ZzGhwh3kg/TxoTJmFdqZI/AAAAAAAABJw/oaFre9xJdaI/s72-c/Alabaster%2BJones.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-649633559147530823</id><published>2012-01-12T12:15:00.008Z</published><updated>2012-01-13T07:59:01.082Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Technology'/><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><title type='text'>Happy 10th Birthday SDL</title><content type='html'>&lt;a href="http://en.wikipedia.org/wiki/File:Bill_Gates_in_WEF_,2007.jpg"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 150px; height: 200px;" src="http://4.bp.blogspot.com/-zISBa4D-f3Y/Tw_eW74_3eI/AAAAAAAABJg/4kNzjKp3XBM/s200/Bill_Gates_in_WEF_%252C2007.jpg" alt="" id="BLOGGER_PHOTO_ID_5697016539262213602" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;Many Happy Returns&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Or successful continuations, if that's your programming paradigm of choice. They're busily blowing out candles and popping the fizz over at Microsoft Security Development Lifecycle Group. It's exactly ten years to the day since William Henry "Bill" Gates III,&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-style: italic;"&gt;[...]&lt;/span&gt; in response to customer feedback, grabbed his dilemma by the horns, and  issued a back-me-or-sack-you directive known lovingly as &lt;span style="font-style: italic;"&gt;Trustworthy Computing&lt;/span&gt;.  Company-wide memos like this were rare. This one went into every  department, as company-wide memos are wont to do, and demanded sweeping  improvements in the "four pillars" on which the customer experience is  based: security, privacy, reliability, and business integrity.&lt;/blockquote&gt;(from my &lt;a href="http://mycodehere.blogspot.com/2009/07/security-101-part-2.html"&gt;&lt;span style="font-style: italic;"&gt;Security 101: Part 2&lt;/span&gt;&lt;/a&gt; a couple of years ago).&lt;br /&gt;&lt;br /&gt;The Microsoft SDL Blog is itself celebrating with an appropriately crusty &lt;a href="http://blogs.msdn.com/b/sdl/archive/2012/01/12/trustworthy-computing-s-10-year-milestone-reflecting-on-humble-beginnings.aspx"&gt;reminiscence&lt;/a&gt;&lt;span style="font-style: italic;"&gt;, Trustworthy Computing’s 10 Year Milestone – Reflecting on Humble Beginnings&lt;/span&gt;, by Steve Lipner, Senior Director of Security Engineering Strategy, on behalf of the rest of the Trustworthy Computing team; frankly outdone by Principal Cybersecurity Architect Michael Howard's comprehensive memoir &lt;a href="http://blogs.msdn.com/b/sdl/archive/2012/01/12/ten-years-since-the-billg-memo-a-personal-view.aspx"&gt;&lt;span style="font-style: italic;"&gt;What a Journey It Has Been&lt;/span&gt;&lt;/a&gt;, and &lt;a href="http://blogs.technet.com/b/privacyimperative/archive/2012/01/12/ten-year-anniversary-of-trustworthy-computing-and-privacy.aspx"&gt;noted&lt;/a&gt; in turn by David Burt at the Microsoft Privacy &amp;amp; Safety TechNet blog among countless other well- (and ill-!) wishers.&lt;br /&gt;&lt;br /&gt;[As an aside, while you're checking out those accounts, the new SDL post &lt;a href="http://blogs.msdn.com/b/sdl/archive/2011/12/02/security.aspx"&gt;&lt;span style="font-style: italic;"&gt;Compiler Security Enhancements in Visual Studio 11&lt;/span&gt;&lt;/a&gt; by Tim Burrell (MSEC security science) gives a rare preview of the new &lt;span style="font-style: italic;"&gt;/sdl&lt;/span&gt; and updated &lt;span style="font-style: italic;"&gt;/GS&lt;/span&gt; switches.]&lt;br /&gt;&lt;br /&gt;Let's join in wishing the Microsoft SDL another ten years of security enhancement and threat mitigation!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-style: italic;"&gt;Picture of His Billness courtesy of &lt;a href="http://en.wikipedia.org/wiki/File:Bill_Gates_in_WEF_,2007.jpg"&gt;Wikipedia&lt;/a&gt;.&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-649633559147530823?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/649633559147530823/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2012/01/happy-10th-birthday-sdl.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/649633559147530823'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/649633559147530823'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2012/01/happy-10th-birthday-sdl.html' title='Happy 10th Birthday SDL'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-zISBa4D-f3Y/Tw_eW74_3eI/AAAAAAAABJg/4kNzjKp3XBM/s72-c/Bill_Gates_in_WEF_%252C2007.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-734353287346554806</id><published>2012-01-10T11:52:00.008Z</published><updated>2012-01-10T12:48:25.328Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Li1up0phi1up0p</title><content type='html'>&lt;a href="https://isc.sans.edu/diary.html?storyid=12127"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 100px; height: 68px;" src="http://1.bp.blogspot.com/-aRwFe_sdK8U/TwwvKAMG9zI/AAAAAAAABI8/xxgO3RAXu34/s400/isc.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5695979477612820274" /&gt;&lt;/a&gt;&lt;b&gt;Just Don't Go There&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I've numfuscated the name of this domain, just to try to ensure that you won't end up going there accidentally. But Li1up0phi1up0p reached a significant milestone last week. In an ecosystem of &lt;i&gt;low to medium&lt;/i&gt; spread, &lt;i&gt;low to medium&lt;/i&gt; profile SQL Injection attacks, many quite serious and mitigated only by these low numbers, this one has over the span of six or more weeks, achieved in excess of one million infected URLs. I've been watching it grow...&lt;br /&gt;&lt;br /&gt;Mark Hofman of &lt;a href="http://www.shearwater.com.au/"&gt;Shearwater&lt;/a&gt; &lt;a href="https://isc.sans.edu/diary.html?storyid=12127"&gt;reported&lt;/a&gt; on December 1 last year, several websites becoming infected with a SQL Injection script containing the string&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;&lt;span style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif; font-size: 15px; line-height: 19px; text-align: -webkit-auto; background-color: rgb(255, 255, 255); "&gt;"&amp;gt;&amp;lt;/title&amp;gt;&lt;/span&gt; &lt;span style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif; font-size: 15px; line-height: 19px; text-align: -webkit-auto; background-color: rgb(255, 255, 255); "&gt;&amp;lt;&lt;/span&gt; &lt;span style="text-align: -webkit-auto; background-color: rgb(255, 255, 255); "&gt;&lt;span&gt;&lt;span style="font-size: 15px; line-height: 19px;"&gt;script src="hXXp://Li1up0phi1up0p.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;wbr style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif; font-size: 15px; line-height: 19px; text-align: -webkit-auto; background-color: rgb(255, 255, 255); "&gt;&lt;span style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif; font-size: 15px; line-height: 19px; text-align: -webkit-auto; background-color: rgb(255, 255, 255); "&gt;com/sl.php"&amp;gt;&lt;/span&gt; &lt;span style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif; font-size: 15px; line-height: 19px; text-align: -webkit-auto; background-color: rgb(255, 255, 255); "&gt;&amp;lt;&lt;/span&gt; &lt;span style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif; font-size: 15px; line-height: 19px; text-align: -webkit-auto; background-color: rgb(255, 255, 255); "&gt;/script&amp;gt;&lt;/span&gt;&lt;/b&gt; &lt;/div&gt;&lt;br /&gt;(or, as I said, something quite like it :-). Checking Google, he found the number of infections at that time to be about 80, covering all versions of MSSQL. Next day, similar checks revealed about 200 infections in the morning, a thousand by lunchtime, and over four thousand that afternoon. One week and 160,000 infected websites into the event, it had become clear the attack was spreading rapidly via several and various automated sources. The most affected single region was &lt;b&gt;.uk&lt;/b&gt;, followed by &lt;b&gt;.de&lt;/b&gt; and then &lt;b&gt;.com&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;Mark's log at the SANS Internet Storm Center blog &lt;i&gt;&lt;a href="https://isc.sans.edu/diary.html?storyid=12127"&gt;ISC Diary&lt;/a&gt;&lt;/i&gt; contains details of database "probing" occurring some time prior to the actual commencement of the attack, and some detailed information about its motive (it's attached to a fake AV scam), while at Kaspersky's ThreatPost, Dennis Fisher &lt;a href="http://threatpost.com/en_us/blogs/lilupophilupop-sql-injection-attack-tops-1-million-infected-urls-010412"&gt;reveals&lt;/a&gt; something of its modus operandi as it works through various  IIS, ASP and Microsoft SQL Server vulnerabilities.&lt;br /&gt;&lt;br /&gt;A very similar attack with the moniker &lt;a href="http://www.pcworld.com/businesscenter/article/224125/lizamoon_attack_what_you_need_to_know.html"&gt;lizamoon&lt;/a&gt; also achieved a million infections earlier in 2011.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-734353287346554806?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/734353287346554806/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2012/01/li1up0phi1up0p.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/734353287346554806'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/734353287346554806'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2012/01/li1up0phi1up0p.html' title='Li1up0phi1up0p'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-aRwFe_sdK8U/TwwvKAMG9zI/AAAAAAAABI8/xxgO3RAXu34/s72-c/isc.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-8049580951687774113</id><published>2012-01-05T09:51:00.005Z</published><updated>2012-01-05T10:20:42.851Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Religion'/><category scheme='http://www.blogger.com/atom/ns#' term='Language'/><category scheme='http://www.blogger.com/atom/ns#' term='Books'/><category scheme='http://www.blogger.com/atom/ns#' term='SF'/><category scheme='http://www.blogger.com/atom/ns#' term='Poetry'/><title type='text'>Scattered Along the River of Heaven</title><content type='html'>&lt;span style="font-weight: bold;"&gt;A Happy New Year to everyone who's currently using the same calendar as me.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://aliettedebodard.com/"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 89px; height: 101px;" src="http://2.bp.blogspot.com/-yTzd688L-UQ/TwVzInJY7cI/AAAAAAAABIk/RJDV129Q4o0/s200/aliette-de-bodard.jpg" alt="" id="BLOGGER_PHOTO_ID_5694083895664373186" border="0" /&gt;&lt;/a&gt;Here's a great short to kindle your new year, new found, interest in Science Fiction. Aliette de Bodard is an American born, Franco-Vietnamese author and defence video analyst who lives in Paris. She has a strong interest in ancient Aztec, Vietnamese and Chinese cultures. This piece, based on four original poems in ancient Chinese (Qing and Tang) styles, is one of those stories you start re-reading immediately upon finishing it:&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://clarkesworldmagazine.com/de_bodard_01_12/"&gt;http://clarkesworldmagazine.com/de_bodard_01_12/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://clarkesworldmagazine.com/de_bodard_01_12/"&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-8049580951687774113?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/8049580951687774113/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2012/01/scattered-along-river-of-heaven.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/8049580951687774113'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/8049580951687774113'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2012/01/scattered-along-river-of-heaven.html' title='Scattered Along the River of Heaven'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-yTzd688L-UQ/TwVzInJY7cI/AAAAAAAABIk/RJDV129Q4o0/s72-c/aliette-de-bodard.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-1940663397841717851</id><published>2011-12-24T08:54:00.009Z</published><updated>2011-12-24T09:52:21.299Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><title type='text'>Amnesty International UK Attacked</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.barracudalabs.com/wordpress/index.php/2011/12/22/authoritarian-regime-uses-human-rights-group-to-spy-on-activists/"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 222px; height: 237px;" src="http://2.bp.blogspot.com/-YhNABdnjeSg/TvWaDyy_iuI/AAAAAAAABIY/I4WBZvIaj24/s400/Amnesty.png" alt="" id="BLOGGER_PHOTO_ID_5689623094218427106" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;Serving up Malware&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Wouldn't it be ironic, and not in a wholesome or entertaining way, if the very act of visiting my (loosely) security based blog, and clicking on my very well intentioned Amnesty International sidebar, were to leave you infected with malware of a context-specific kind? Namely &lt;a href="http://www.sophos.com/en-us/threat-center/threat-analyses/viruses-and-spyware/Troj%7ESpy-XR/detailed-analysis.aspx"&gt;Trojan Spy-XR&lt;/a&gt;, the kind that spies on the activities of human rights activists, returning the electronic information so obtained to... certain countries...&lt;br /&gt;&lt;br /&gt;Okay: China. There is evidence (from this &lt;a href="http://www.threatexpert.com/report.aspx?md5=b8ae7608b6e85b8b435ae3561a4d400d"&gt;ThreatExpert analysis&lt;/a&gt;) that the malicious Java file, currently being served in a cross-site way through a certain genuine but compromised Brazilian automotive website, appears to be associated with China. &lt;a href="http://krebsonsecurity.com/2011/12/amnesty-international-site-serving-java-exploit/"&gt;Brian Krebs&lt;/a&gt; reports the malware as belonging to &lt;span style="font-style: italic;"&gt;"a notorious family of backdoor Trojans"&lt;/span&gt; from that quarter, and Chinese hacking groups are well known to be waging an ongoing campaign against dissident and human rights organizations, to extract personal and logistic information about them.&lt;br /&gt;&lt;br /&gt;So ironic or not, that's what might have happened to you, had you clicked the aforementioned sidebar link within the past week or so. Sorry about that.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Mitigated by Unpopularity and... Java&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Being unaware of the previous and ongoing targeting of human rights workers by this nefarious scheme and others like it, I had assumed that the relative lack of popularity of the Amnesty site (Alexa.com rating below 90,000) - not to mention that of my own blog! - made it a comparatively safe cross-link. But today I learned the organization’s site was hacked with a drive-by attack last April, while its Hong Kong website was in November 2010 hacked and seeded with an exploit dropping malware based around a previously unknown IE zero-day vulnerability (see this &lt;a href="http://community.websense.com/blogs/securitylabs/archive/2010/11/10/Amnesty-International-Hong-Kong-Website-Injected-With-Latest-Internet-Explorer-0_2D00_day-.aspx"&gt;Websense&lt;/a&gt; report). In possible mitigation, these attackers are clearly not out for financial data or gain.&lt;br /&gt;&lt;br /&gt;These attacks, as noted by Brian Krebs, serve to highlight the importance of keeping up to date with security patches. In the case of Java, a safer option might be to remove frequently targeted software you don’t really need.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-1940663397841717851?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/1940663397841717851/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/12/amnesty-international-uk-attacked.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/1940663397841717851'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/1940663397841717851'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/12/amnesty-international-uk-attacked.html' title='Amnesty International UK Attacked'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-YhNABdnjeSg/TvWaDyy_iuI/AAAAAAAABIY/I4WBZvIaj24/s72-c/Amnesty.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-5109836559930283530</id><published>2011-12-12T00:00:00.020Z</published><updated>2012-01-10T15:55:45.346Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Music'/><category scheme='http://www.blogger.com/atom/ns#' term='Personal'/><category scheme='http://www.blogger.com/atom/ns#' term='Holidays'/><title type='text'>My Top Ten Christmas Songs</title><content type='html'>&lt;span style="font-weight: bold;"&gt;OK Let's Get This Thing Over&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Ho³! Everyone seems to be indulging this humbug a little early this year, but as &lt;a href="http://xkcd.com/988/"&gt;XKCD&lt;/a&gt; shows  (click through for full details), at least in America, and subjectively here in the UK too, there appears to be a huge cultural bias towards 40s  and 50s Christmas songs. For once, I won't be straining to reach as far  back in time as my braces will permit, as I own up to some personal  favourites in the genre.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://xkcd.com/988/" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 350px;" src="http://1.bp.blogspot.com/-aaVNZxCFRUc/TuVHi6b2KlI/AAAAAAAABII/Cw5ptBv_1FA/s400/xkcdxmas.png" alt="" id="BLOGGER_PHOTO_ID_5685028769752296018" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;10.&lt;/span&gt; Mike Oldfield, who could never be bothered waiting around for everyone else to learn their parts, started the trend of playing everything yerself. This is from 1975, although originally from the middle ages:&lt;br /&gt;&lt;br /&gt;&lt;iframe src="http://www.youtube.com/embed/eIUlEUWKloM" allowfullscreen="" frameborder="0" height="315" width="420"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;9. &lt;/span&gt;Not strictly a Christmas song, more of a fine study in adolescent rivalry and frustration, slapped on to the B-side of 1986's &lt;i&gt;Trumpton Riots&lt;/i&gt; with the word &lt;i&gt;Christmas&lt;/i&gt; gratuitously grafted into the title: these are the peerless &lt;span style="font-style: italic;"&gt;Half Man Half Biscuit&lt;/span&gt;...&lt;br /&gt;&lt;br /&gt;&lt;iframe src="http://www.youtube.com/embed/eBmFuySb_Qw" allowfullscreen="" frameborder="0" height="315" width="420"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;8. &lt;/b&gt;Justin Hawkins pouted perfectly in 2003: &lt;i&gt;Now how the hell am I gonna make it into the new year?&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;iframe src="http://www.youtube.com/embed/W-eslNwGXrI" allowfullscreen="" frameborder="0" height="315" width="420"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;7. &lt;/span&gt;Another non-Christmas song, Joni Mitchell's &lt;span style="font-style: italic;"&gt;River&lt;/span&gt; just happened to be set at Christmas time in 1971, on a rather melancholy variation of &lt;span style="font-style: italic;"&gt;Jingle Bells&lt;/span&gt;...&lt;br /&gt;&lt;br /&gt;&lt;iframe src="http://www.youtube.com/embed/QPCJxVCcWtk" allowfullscreen="" frameborder="0" height="315" width="560"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;6. &lt;/span&gt;This kazoo-festooned KT Tunstall cover of &lt;span style="font-style: italic;"&gt;Mele Kalikimaka (Christmas In Hawaii)&lt;/span&gt; lit up 2007, but originally written by Robert Alex Anderson in 1949 and appearing on Bing Crosby's &lt;span style="font-style: italic;"&gt;White Christmas&lt;/span&gt; album, it's the only of our ten falling within the XKCD boom years:&lt;br /&gt;&lt;br /&gt;&lt;iframe src="http://www.youtube.com/embed/RytKQXKjkio" allowfullscreen="" frameborder="0" height="315" width="420"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;5.&lt;/span&gt; Greg Lake, replete with Troika (from Sergei Prokofiev's &lt;a href="http://en.wikipedia.org/wiki/Lieutenant_Kij%C3%A9_%28Prokofiev%29"&gt;&lt;span style="font-style:italic;"&gt;Lieutenant Kijé&lt;/span&gt;&lt;/a&gt;, 1934) protested the commercialization of Christmas 1975...&lt;br /&gt;&lt;br /&gt;&lt;iframe src="http://www.youtube.com/embed/RXCEdrnaFlY" allowfullscreen="" frameborder="0" height="315" width="420"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;4.&lt;/span&gt; John Lennon would have shown that Lake guy a thing or two about protest in 1971...&lt;br /&gt;&lt;br /&gt;&lt;iframe src="http://www.youtube.com/embed/yN4Uu0OlmTg" allowfullscreen="" frameborder="0" height="315" width="420"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3.&lt;/span&gt; Kirsty, we will never forget you... with The Pogues, perennially since 1987:&lt;br /&gt;&lt;br /&gt;&lt;iframe src="http://www.youtube.com/embed/HwHyuraau4Q" allowfullscreen="" frameborder="0" height="315" width="560"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2. &lt;/b&gt;A prog masterwork from 1976, &lt;span style="font-style: italic;"&gt;Ring Out Solstice Bells&lt;/span&gt; can be found on &lt;span style="font-style: italic;"&gt;The Jethro Tull Christmas Album&lt;/span&gt;, alongside such yuletide favourites as &lt;span style="font-style: italic;"&gt;A Christmas Song&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;Another Christmas Song&lt;/span&gt;...&lt;br /&gt;&lt;br /&gt;&lt;iframe src="http://www.youtube.com/embed/6qcPS-J0HTg" allowfullscreen="" frameborder="0" height="315" width="420"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1.&lt;/span&gt; Topping my festive selection: 1981 had the coolest Christmas song ever!&lt;br /&gt;&lt;br /&gt;&lt;iframe src="http://www.youtube.com/embed/2SzjDOk_u9I" allowfullscreen="" frameborder="0" height="315" width="560"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Please don't mention The Spice Girls. Have a happy holiday season, everyone.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-5109836559930283530?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/5109836559930283530/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/12/my-top-5-christmas-songs.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/5109836559930283530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/5109836559930283530'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/12/my-top-5-christmas-songs.html' title='My Top Ten Christmas Songs'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-aaVNZxCFRUc/TuVHi6b2KlI/AAAAAAAABII/Cw5ptBv_1FA/s72-c/xkcdxmas.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-7983558605259960119</id><published>2011-12-06T16:54:00.013Z</published><updated>2011-12-06T18:32:52.336Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='WTF'/><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><category scheme='http://www.blogger.com/atom/ns#' term='Electronics'/><category scheme='http://www.blogger.com/atom/ns#' term='Sony'/><title type='text'>Sony Handheld Nonportable</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Vita has Flash Problem&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;And I don't mean Adobe. Even though discontinuing Flash development for mobile devices, Adobe are still in negotiations with Sony for a Vita version of (probably) Flash Mobile 11 - the last version they'll ever make available for phones and tablets. But Steve Jobs has driven all web video irrevocably in the direction of HTML5; and as for Flash games, well, they're mostly rubbish on wee displays like the Vita's 5" OLED capacitive touchscreen anyway. No, the issue I'm referring to is this new announcement from Sony, that the PS Vita will require the use of proprietary memory cards. And just why exactly might that be? A Sony spokesperson &lt;a href="http://www.itworld.com/personal-tech/230363/more-discouraging-playstation-vita-details-revealed"&gt;explains&lt;/a&gt;: &lt;span style="font-style: italic;"&gt;[we are] using proprietary memory cards, both for security reasons, and to ensure a consistent experience for all users.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Ah right, security reasons, of course. And yes, a consistent user experience. Always thinking about its beloved users, Sony is. About their &lt;span style="font-style: italic;"&gt;security&lt;/span&gt;. And about the consistency of their &lt;span style="font-style: italic;"&gt;experience&lt;/span&gt;. So, we should expect these proprietary sticks to be priced similarly to existing, industry standard flash memory cards, right?&lt;br /&gt;&lt;br /&gt;&lt;img src="http://3.bp.blogspot.com/-A2HrJ8gM3DA/Tt5O0RX9_WI/AAAAAAAABH8/n6aMrZEEolU/s1600/sony%2Bflash.png" /&gt;&lt;br /&gt;&lt;span style="font-style: italic;font-size:85%;" &gt;Prices are in dollars. Source: Amazon.com, except for Sony prices, which are current listings at Gamestop.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-7983558605259960119?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/7983558605259960119/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/12/sony-handheld-nonportable.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/7983558605259960119'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/7983558605259960119'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/12/sony-handheld-nonportable.html' title='Sony Handheld Nonportable'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-A2HrJ8gM3DA/Tt5O0RX9_WI/AAAAAAAABH8/n6aMrZEEolU/s72-c/sony%2Bflash.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-3224333699108384368</id><published>2011-11-24T11:52:00.014Z</published><updated>2011-11-29T09:13:51.106Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><title type='text'>DeepEnd Research</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/-pYfjq2PlDCw/TtOpK9-Zf3I/AAAAAAAABHk/k1Fj3WdNg5Y/s1600/tranheadersub4.gif"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 320px; height: 60px;" src="http://2.bp.blogspot.com/-pYfjq2PlDCw/TtOpK9-Zf3I/AAAAAAAABHk/k1Fj3WdNg5Y/s320/tranheadersub4.gif" alt="" id="BLOGGER_PHOTO_ID_5680069560944394098" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;New Security Group&lt;/span&gt;&lt;br /&gt;&lt;span style="text-decoration: underline;"&gt;&lt;br /&gt;&lt;/span&gt;Last month the security community welcomed a new member, &lt;span style="font-style: italic;"&gt;&lt;a href="http://www.deependresearch.org/"&gt;DeepEnd Research&lt;/a&gt;&lt;/span&gt;...&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-style: italic;"&gt;[...] an independent information security research group that will focus on threat and intelligence analysis. Our emphasis will be on malware, exploit analysis, botnet tracking, the underground economy and overall cyberthreats. We will blog about various collection and analysis techniques, observations, and other areas of interest.&lt;/span&gt; &lt;/blockquote&gt;The group has also declared another primary goal: fostering &lt;span style="font-style: italic;"&gt;collaborative research and analysis efforts with other security groups and organizations&lt;/span&gt;. It is staffed by a team of (currently eight) established security researchers, some of whom are already quite well known:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://sempersecurus.blogspot.com/"&gt;Andre' M. DiMino&lt;/a&gt; of the &lt;a href="http://www.shadowserver.org/wiki/"&gt;Shadowserver Foundation&lt;/a&gt; gathering, tracking and reporting volunteer group;&lt;/li&gt;&lt;li&gt;&lt;a href="http://contagiodump.blogspot.com/"&gt;Mila Parkour&lt;/a&gt;, the independent blogger who in February first &lt;a href="http://contagiodump.blogspot.com/2011/02/targeted-attacks-against-personal.html"&gt;exposed&lt;/a&gt; the hacking of personal Gmail accounts belonging to military and government employees, and their associates;&lt;/li&gt;&lt;li&gt;Yuriy Khvyl, Malware Analyst with &lt;a href="http://www.csis.dk/en/csis/about/"&gt;CSIS Security Group&lt;/a&gt;;&lt;/li&gt;&lt;li&gt;Someone called W---T--- (my guess is the American born painter and graphic artist James Abbott McNeill &lt;a href="http://www.ibiblio.org/wm/paint/auth/whistler/"&gt;Whistler&lt;/a&gt;, 1834-1903, who faked his own death to continue his security research);&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Jart Armin from &lt;a href="http://hostexploit.com/"&gt;HostExploit&lt;/a&gt;;&lt;/li&gt;&lt;li&gt;&lt;a href="http://inboxrevenge.wordpress.com/"&gt;Marnie King&lt;/a&gt;;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.securitysurfer.it/?lang=en"&gt;Rossano Ferraris&lt;/a&gt;, Senior Research Engineer for CA Technologies ISBU;&lt;/li&gt;&lt;li&gt;and &lt;a href="http://chrislee.dhs.org/"&gt;Chris Lee&lt;/a&gt;, a self confessed Unix geek with a love of security research and teaching.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;The new group's first post, &lt;a style="font-style: italic;" href="http://www.deependresearch.org/2011/10/dirt-jumper-ddos-bot-new-versions-new.html"&gt;Dirt Jumper DDoS Bot - New versions, New targets&lt;/a&gt;, is a combined research and analysis effort by the first two named above. This is quite a piece of work - complete with its own table of contents! - and signals an intent to deliver on the promise held out by the new team's name.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Dirt Jumper&lt;/span&gt;, also commonly known as &lt;span style="font-style: italic;"&gt;Russkill&lt;/span&gt;, is a cheap (~£200) commercial crimeware kit sold on the hacker underground. It works its DDoS magic by forcing tens of thousands of infected systems to request the home page of a targeted site, or more frequently, of many such sites &lt;span style="font-style: italic;"&gt;en bloc&lt;/span&gt;. &lt;a href="http://krebsonsecurity.com/about/"&gt;Brian Krebs&lt;/a&gt; was recently the focus of its attentions, an experience out of which he naturally &lt;a href="http://krebsonsecurity.com/2011/11/ddos-attack-on-krebsonsecurity-com/#more-12420"&gt;blogged the living daylights&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-3224333699108384368?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/3224333699108384368/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/11/deepend-research.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/3224333699108384368'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/3224333699108384368'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/11/deepend-research.html' title='DeepEnd Research'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-pYfjq2PlDCw/TtOpK9-Zf3I/AAAAAAAABHk/k1Fj3WdNg5Y/s72-c/tranheadersub4.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-6884369199213563905</id><published>2011-11-19T12:04:00.028Z</published><updated>2012-01-04T14:15:56.085Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Technology'/><category scheme='http://www.blogger.com/atom/ns#' term='Coding'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Event Store Methods - part 2 of 2 (guest post)</title><content type='html'>&lt;span style="font-style: italic;"&gt;This is the second and concluding part of &lt;/span&gt;&lt;span style="font-style: italic;"&gt;Colleague C's account of his experience using an Event Store within a system  designed on the Command Query Responsibility Segregation (CQRS)  pattern. All text references to actual projects and namespaces have been removed, leaving only the code snippets essential to the general discussion.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Previously: &lt;a href="http://mycodehere.blogspot.com/2011/11/event-store-methods-part-1-of-2-guest.html"&gt;Aggregates, Entities and Events&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Applying and Replaying Events&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now I can finally get to the interesting  implementation: how events are applied and replayed. It's important to  understand how this happens for events applied far down the object  graph, distant from the root. Most examples you’ll see online don’t go  beyond the root level, and really lack infrastructure to propagate  events down to the entities where they must be applied. Our  implementation has been based around how the &lt;a href="http://ncqrs.org/"&gt;Ncqrs Framework&lt;/a&gt; handles  these scenarios.&lt;br /&gt;&lt;br /&gt;I’m going to detail how this is done, by going  through the commands used for creating a new workflow, a stage for that  workflow, and a tasklist for that stage. Let’s first take a look at the  command handler for creating a new Workflow, which is pretty straightforward:&lt;br /&gt;&lt;br /&gt;&lt;img src="http://4.bp.blogspot.com/-tcgxRc9Uolk/Tse2bgvgWaI/AAAAAAAABEY/greUjrQPWPY/s1600/image00.png" /&gt;&lt;br /&gt;&lt;br /&gt;To take a look at how the events are being applied,  we’ll need to have a look at the code inside that &lt;span style="font-style: italic;"&gt;CreateWorkFlow&lt;/span&gt; factory  method:&lt;br /&gt;&lt;br /&gt;&lt;img src="http://1.bp.blogspot.com/-1CPCSZRtmW0/Tse3AGijbMI/AAAAAAAABEk/9ROtasio29k/s1600/image12.png" /&gt;&lt;br /&gt;&lt;br /&gt;You can see here that some basic business logic is  performed before the event is applied. Our little example application  unfortunately isn’t very interesting, but it illustrates the point. When  we make a call to that private constructor, before we reach that code, a  call is made to the constructor of the AggregateRoot base class. Let’s  have a look at that constructor:&lt;br /&gt;&lt;br /&gt;&lt;img src="http://1.bp.blogspot.com/-SDabCGuYtFA/Tse3g2d87fI/AAAAAAAABEw/OqisJtxgy-I/s1600/image17.png" /&gt;&lt;br /&gt;&lt;br /&gt;The interesting bit is the  mapping strategy. It alleviates the need to write code manually for  registering event handlers, which are just methods on the aggregate root  or entity. The mapping strategy implements an interface, so it would be  possible to define other strategies, and you could have different  aggregate root base classes using different strategies (rather that than  inject the mapping strategy in; I prefer to keep the domain clear of  constructor injection). You’ll notice that you pass a reference to the  instance of the aggregate root into the method.&lt;br /&gt;&lt;br /&gt;Let’s take a look at that method on the mapping strategy:&lt;br /&gt;&lt;br /&gt;&lt;img src="http://3.bp.blogspot.com/-63rYPVaD5k8/Tse34vbje7I/AAAAAAAABE8/6Qib3qtIg5o/s1600/image14.png" /&gt;&lt;br /&gt;&lt;br /&gt;First,  we get all the public and private instance methods on the target  object. We then run a LINQ query to filter those methods to the ones  starting with “On”, and having a single parameter implementing IEvent.&lt;br /&gt;&lt;br /&gt;After  that, we loop through each of those methods and create a delegate to  call each, with a reference to the target object. This is important for  the entity-based event handlers; if you have a set of children, you need  to be able to handle an event on the correct child (we’ll come to this a  bit later). The method is then wrapped inside an event handler, which  has some logic to determine whether a particular handler can handle an  event that it’s been passed. Finally, the list of handlers is returned  to the aggregate root constructor, and the aggregate root adds each to  its event handler collection.&lt;br /&gt;&lt;br /&gt;In the case of the Workflow instance, a couple of event handler methods will be found:&lt;br /&gt;&lt;br /&gt;&lt;img src="http://1.bp.blogspot.com/-glw94liAGW4/Tse5ZdGqZQI/AAAAAAAABFI/4SJ5N8EXNqk/s1600/image16.png" /&gt;&lt;br /&gt;&lt;br /&gt;We now come out of the base class constructor, and enter the constructor of the Workflow instance:&lt;br /&gt;&lt;br /&gt;&lt;img src="http://2.bp.blogspot.com/-q1CokIf5wcw/Tse5oTRfs8I/AAAAAAAABFU/ltYnvwoQc8M/s1600/image11.png" /&gt;&lt;br /&gt;&lt;br /&gt;We  can see that we’re now going to attempt to apply the  WorkflowCreatedEvent to this instance, which takes us back to the  AggregateRoot base class, since the Apply method is a protected method  on the base. Let’s take a look at that:&lt;br /&gt;&lt;br /&gt;&lt;img src="http://2.bp.blogspot.com/-BcJUeSEzlZM/Tse53f7PsBI/AAAAAAAABFg/r2g5tWQo9Zc/s1600/image10.png" /&gt;&lt;br /&gt;&lt;br /&gt;Since we’re just creating  the workflow at this stage, this call to GetNewEventVersion() is going  to return 1. We then take a copy of the current list of event handlers -  at this point in time, a couple of handlers. Why take a copy? During  these event handler calls, other event handlers can be added to the  aggregate root’s collection. Don’t be alarmed by this, it will make  sense shortly! If you didn’t take a copy, you’d get an exception thrown,  as you can't add items to a collection that you’re iterating over.&lt;br /&gt;&lt;br /&gt;Anyway,  we want to apply a WorkFlowCreatedEvent. We’re going to loop over all  the handlers and figure out which one should handle this event. Remember  that the event handlers are actually inside a wrapper, so the call to  HandleEvent here will be a call into this wrapper method. It's a really  simple method, and can be found by going to the EventHandler class:&lt;br /&gt;&lt;br /&gt;&lt;img src="http://4.bp.blogspot.com/-gn_lC4jvfoo/Tse6OAUijBI/AAAAAAAABFs/m21Rylz9kyQ/s1600/image03.png" /&gt;&lt;br /&gt;&lt;br /&gt;Again,  this is pretty simple. We figure out if this handler is to handle this  event by checking that the type of event passed in is the same type as  the first parameter on the handler (this type was passed in when we  created the event handler in the mapping strategy). If it is, we’ll call  the handler, passing in our event to be applied. Remember that the  handler has a reference to a target, which in this case happens to be  the Workflow instance.&lt;br /&gt;&lt;br /&gt;As a result, we’ll end up calling the  OnWorkflowCreated method on the Workflow instance, which will set its ID  and title. After that, we’ll return back to the base &lt;span style="font-style: italic;"&gt;Apply&lt;/span&gt; method. You’ll notice that we assign the &lt;span style="font-style: italic;"&gt;AggregateId&lt;/span&gt;  of the event in the base class. We need to do that after the event  application, because in the case of an event that creates an aggregate,  the ID would still be empty if we attempted to assign it before the  event had been applied. It would also be possible to assign the &lt;span style="font-style: italic;"&gt;AggregateId&lt;/span&gt;  in the event handler, but it’s preferable to have that behaviour in the  base class so it’s not forgotten. Finally, we add the applied event to  the list of uncommitted events, get back to the private constructor that  called the &lt;span style="font-style: italic;"&gt;Apply&lt;/span&gt; method, then return to the static &lt;span style="font-style: italic;"&gt;CreateWorkflow&lt;/span&gt; method, which will return our new instance back to our command handler.&lt;br /&gt;&lt;br /&gt;The  only thing that we need to do now to complete this command is to use  the repository to save the Workflow that we’ve just created. Or more  correctly, to save the &lt;span style="font-style: italic;"&gt;WorkflowCreatedEvent&lt;/span&gt; we’ve just generated. The repository doesn’t do much. It has access to an &lt;span style="font-style: italic;"&gt;IEventStore&lt;/span&gt; interface with a &lt;span style="font-style: italic;"&gt;Store&lt;/span&gt; method to commit events. The aggregate root implements an &lt;span style="font-style: italic;"&gt;IEventProvider&lt;/span&gt; interface, exposing a method to get the uncommitted changes, so this event provider is passed in through the &lt;span style="font-style: italic;"&gt;Store&lt;/span&gt; method.&lt;br /&gt;&lt;br /&gt;Here is a sample implementation of the &lt;span style="font-style: italic;"&gt;Store&lt;/span&gt; method, using SQL Server based storage for the event store:&lt;br /&gt;&lt;br /&gt;&lt;img src="http://1.bp.blogspot.com/-zT0bOdAdd2k/Tse6iudlJpI/AAAAAAAABF4/DkAy5wsVVaU/s1600/image07.png" /&gt;&lt;br /&gt;&lt;br /&gt;You  can see it’s actually fairly straight forward. There is a concurrency  check, that the current version of the aggregate root you’re about to  save matches that of the stored one. Otherwise, someone has updated the  same aggregate root during the time in which we’ve tried to apply other  events. If everything is OK with respect to concurrency, each event is  saved and published. The publish method will put the event on a queue  without blocking, until it has been processed. Then, the version number  is updated on the aggregate root, and updated in the Aggregates table.  In the case of the exception there, I think that that exception should  probably be wrapped up in some sort of &lt;span style="font-style: italic;"&gt;EventStoreSaveException&lt;/span&gt;.  That exception would then bubble up to the point where the command  handler is being called, and you could deal with it in whatever way is  appropriate.&lt;br /&gt;&lt;br /&gt;With all that done, the command has now been handled successfully.&lt;br /&gt;&lt;br /&gt;The next command will demonstrate how event handlers are registered on ‘child’ entities:&lt;br /&gt;&lt;br /&gt;&lt;img src="http://2.bp.blogspot.com/-exXITeMiaOo/Tse68yOdv1I/AAAAAAAABGE/IhUDspwlVcI/s1600/image09.png" /&gt;&lt;br /&gt;&lt;br /&gt;It’s worth taking a quick look at restoring the Workflow. Here’s the implementation of that repository method:&lt;br /&gt;&lt;br /&gt;&lt;img src="http://4.bp.blogspot.com/-u1ebbbwCAfc/Tse7MnD4NpI/AAAAAAAABGQ/9ePqvYPeAjQ/s1600/image02.png" /&gt;&lt;br /&gt;&lt;br /&gt;When  the aggregate constructor is called there, we go through the same  process as previously to register all the event handlers. After that,  the previous events related to that aggregate are fetched from the event  store, using a simple &lt;span style="font-style: italic;"&gt;SELECT SerializedEvent FROM Events WHERE AggregateId = Id&lt;/span&gt; query. These events are then applied to restore the object to its current state. You call exactly the same &lt;span style="font-style: italic;"&gt;Apply&lt;/span&gt;  method already discussed. The only difference: when the object is  restored, the applied events collection gets cleared at the end of the  process, as you’re only interested in saving subsequently applied  events.&lt;br /&gt;&lt;br /&gt;So now that we have our workflow restored, we want to add  a stage to it. If you take a look at the AddStage method, after  performing a little bit of uninteresting business logic, we’ll apply a &lt;span style="font-style: italic;"&gt;WorkflowStageAddedEvent&lt;/span&gt;.  The event handler for this was registered when the aggregate root was  being constructed, so we’ll find the event handler based on the type of  the event. Eventually, this simple handler will be called:&lt;br /&gt;&lt;br /&gt;&lt;img src="http://3.bp.blogspot.com/-G4evoWnKoBY/Tse7hubr6OI/AAAAAAAABGc/4xYs-qEuz7Q/s1600/image06.png" /&gt;&lt;br /&gt;&lt;br /&gt;This is obviously an extremely simple method. What's interesting is what goes on in the construction of the &lt;span style="font-style: italic;"&gt;Stage&lt;/span&gt; class, which inherits from the base &lt;span style="font-style: italic;"&gt;Entity&lt;/span&gt; class. You can see we’re passing a reference to the ‘parent’ aggregate root via the “this” keyword. The constructor for the &lt;span style="font-style: italic;"&gt;Stage&lt;/span&gt; itself is pretty simple, the interesting work taking place in the base constructor:&lt;br /&gt;&lt;br /&gt;&lt;img src="http://4.bp.blogspot.com/-0-m4sDDa6Yc/Tse7w3gjgiI/AAAAAAAABGo/hymcWRduIXY/s1600/image15.png" /&gt;&lt;br /&gt;&lt;br /&gt;It’s  important for the entity to have a reference to its aggregate root. The  event handlers for the entity get registered at the aggregate root  level, because events are applied and saved at that level. We can see  here that the exact same mapping strategy is used, as with the aggregate  root. So, the same mechanism for finding event handler methods on the  aggregate root is used for the &lt;span style="font-style: italic;"&gt;Stage&lt;/span&gt;.  Notice there that the reference passed into the mapping strategy is a  reference to the current entity, rather than the aggregate root. This  means any event handlers found are registered for this particular  entity. In the case of the stage, there's one event handler method, &lt;span style="font-style: italic;"&gt;OnWorkflowStageTaskListAdded&lt;/span&gt;. However, if the workflow had 6 different stages, you’d have 6 different event handlers - one for each stage instance.&lt;br /&gt;&lt;br /&gt;This  is why it’s key for the event handler to store a reference to the  instance on which to call the method. If you remember back to the  process of applying events, the aggregate root goes through its  registered handlers, figuring out what handler to use by matching up the  type of the received event with the type of the first parameter on the  registered handler. The process is just slightly different for events on  entities, which is why you put the event handler in a wrapper. Here’s  the code that figures out whether the event gets handled in the case of  the entity:&lt;br /&gt;&lt;br /&gt;&lt;img src="http://3.bp.blogspot.com/-ptyFIlU0SS0/Tse8RZoo2LI/AAAAAAAABG0/pN7dYyxp7Zk/s1600/image04.png" /&gt;&lt;br /&gt;&lt;br /&gt;As you can see, there is actually a  different type for entity based events. The difference is  that the entity event exposes an &lt;span style="font-style: italic;"&gt;EntityId&lt;/span&gt;  property, which it uses to make a comparison. Remember, this method is  being called from the context of an aggregate root. That’s why you have  the first null check; non-entity-based events could be received by this  method, in which case you'd return straight away, since you obviously  can’t handle those.&lt;br /&gt;&lt;br /&gt;The second check, to see whether we should use this handler for this  event, is a comparison of the ID of the entity with the ID that got  stored with the event. Again, if this test fails, we return; we need the  correct instance upon which to apply the event. After passing all  checks, we call into the same event handler code that the aggregate  roots do, and this will just match up the parameter types.&lt;br /&gt;&lt;br /&gt;So,  for each handler found on the entity, a wrapper is created and  registered with the aggregate root, rather than the entity. While these  entities are being created, their handlers are registered. So when the  item is being restored from the event store, and a &lt;span style="font-style: italic;"&gt;WorkflowStageAdded&lt;/span&gt; event is encountered, this will create a new &lt;span style="font-style: italic;"&gt;Stage&lt;/span&gt;  and register its event handlers. This works no matter far down the  object graph you go in terms of descendants: you will never encounter a &lt;span style="font-style: italic;"&gt;WorkflowStageAdded&lt;/span&gt; event before a &lt;span style="font-style: italic;"&gt;WorkflowCreated&lt;/span&gt; event, if everything has been versioned correctly.&lt;br /&gt;&lt;br /&gt;When that &lt;span style="font-style: italic;"&gt;Stage&lt;/span&gt; was created there, one event handler got registered - &lt;span style="font-style: italic;"&gt;OnWorkflowStageTaskListAdded&lt;/span&gt;. This would be applied when you called the &lt;span style="font-style: italic;"&gt;AddTaskList&lt;/span&gt; method on the &lt;span style="font-style: italic;"&gt;Stage&lt;/span&gt; class.&lt;br /&gt;&lt;br /&gt;I guess there's no necessity to walk through the essentially identical command logic to create a &lt;span style="font-style: italic;"&gt;TaskList&lt;/span&gt; on a &lt;span style="font-style: italic;"&gt;Stage&lt;/span&gt;. However, there is a difference in the event application on the entities, which is nicely handled in the base class:&lt;br /&gt;&lt;br /&gt;&lt;img src="http://3.bp.blogspot.com/-aciFFIIOGKc/Tse8iSLYiVI/AAAAAAAABHA/vjYgfSSpo6w/s1600/image13.png" /&gt;&lt;br /&gt;&lt;br /&gt;The  entity ID gets set. Again, it would be possible to do this in the event  handler, but it’s easier to ensure it takes place on the base class.  The important part again is that the actual application of the event  takes place on the aggregate root, where the handler is registered. So,  the event will be applied to the entity, then saved at the aggregate  root level, and committed to the event store.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;~ END ~&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-6884369199213563905?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/6884369199213563905/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/11/event-store-methods-part-2-of-2-guest.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/6884369199213563905'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/6884369199213563905'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/11/event-store-methods-part-2-of-2-guest.html' title='Event Store Methods - part 2 of 2 (guest post)'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-tcgxRc9Uolk/Tse2bgvgWaI/AAAAAAAABEY/greUjrQPWPY/s72-c/image00.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-5010861752246275126</id><published>2011-11-19T08:32:00.007Z</published><updated>2011-11-21T10:46:55.553Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Technology'/><category scheme='http://www.blogger.com/atom/ns#' term='Coding'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Event Store Methods - part 1 of 2 (guest post)</title><content type='html'>&lt;span style="font-style: italic;"&gt;Those &lt;a href="http://mycodehere.blogspot.com/2011/11/quantum-computing-5-quantum.html"&gt;QC articles&lt;/a&gt; were &lt;/span&gt;&lt;a style="font-style: italic;" href="http://www.youtube.com/watch?v=npjOSLCR2hE"&gt;a long squawk&lt;/a&gt;&lt;span style="font-style: italic;"&gt;, chomping chunks from evenings and weekends over a big month. While I recover, trying to remember what free time and my wife look like, Colleague C has kindly consented to guest blog the following, to help make up the numbers. It's all about discovering the delights of using an Event Store, within a system designed on the Command Query Responsibility Segregation (CQRS) pattern. Having edited the article slightly for style and panache, I'm bound to assume responsibility for any errors thus introduced. Ladies and gentlemen, &lt;/span&gt;&lt;span&gt;His Code Here&lt;/span&gt;&lt;span style="font-style: italic;"&gt; proudly presents: Colleague C!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Aggregates, Entities and Events&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In our system based on an event source, objects are restored to their "current" state by replaying a set of ordered historical events. The one canonical example most often used to describe event sourcing is the common or garden &lt;span style="font-style: italic;"&gt;bank account&lt;/span&gt;. Your account has a current balance, but you don’t just store that balance - you arrive at it, via a historical record of debits and credits, re-applied from an initial (empty) starting point, to eventually produce the current balance.&lt;br /&gt;&lt;br /&gt;Events are simple objects containing no behaviour; they just describe the event in terms of a set of property values. They are ordered using a &lt;span style="font-style: italic;"&gt;version number&lt;/span&gt;. When you want to restore an entity to its current state, you fetch the events relating to it, order them by version number, then apply them in order. Application of events involves nothing more than changing the state of the entity - there is no logic when an event is applied. This is because historical events which have already been applied, and saved, must always be re-playable and never subject to failure, so that the entity can be restored.&lt;br /&gt;&lt;br /&gt;What would happen if business logic were to be included in event application? Business logic is something that potentially changes throughout the lifetime of an application. Initially, for example, you might have a text field on an entity, defined to have a size limit of 255 characters. When applying your event, you would validate that the field contained no more than 255 characters, and everything being OK, you'd proceed with the event application. Later on down the road, a decision is made to change the size limit of this field to 50 characters. So an event in the past that applied 150 characters to that text field is now invalid, in the context of this new rule, and an exception will be thrown - meaning you can’t restore your entity.&lt;br /&gt;&lt;br /&gt;Business logic always occurs &lt;span style="font-style: italic;"&gt;before&lt;/span&gt; you apply an event. And, an event is only applied to the entity if the requested operation is &lt;span style="font-style: italic;"&gt;valid&lt;/span&gt; by all business rules.&lt;br /&gt;&lt;br /&gt;When events are applied to effect changes on entities, obviously they do change the state of the entity, but what we’re presently interested in is the collection of newly applied events, rather than the state change. In event sourcing, when you persist an entity, it’s not like persisting objects with a traditional database style approach. There, you change the state of the entity, then save its &lt;span style="font-style: italic;"&gt;new current state&lt;/span&gt; in some table(s). When you save an entity in an event sourced system, you save &lt;span style="font-style: italic;"&gt;just the newly applied events&lt;/span&gt;. In this context, the state change resulting from a new event application is a mere side effect! One that of course does no harm.&lt;br /&gt;&lt;br /&gt;The storage of events is very straightforward, and many options are available. One is to use a very simple database schema, consisting of just two tables:&lt;br /&gt;&lt;br /&gt;&lt;img src="http://2.bp.blogspot.com/-R1dLRYLPyCE/TsenS7HhehI/AAAAAAAABD0/soiNCiQ3SoM/s1600/image05.png" /&gt;&lt;br /&gt;&lt;br /&gt;The &lt;span style="font-style: italic;"&gt;Aggregates&lt;/span&gt; table contains a list of all the aggregates in the system, with the &lt;span style="font-style: italic;"&gt;ID&lt;/span&gt; of the aggregate, its &lt;span style="font-style: italic;"&gt;Type&lt;/span&gt; (for debugging purposes only), and the current &lt;span style="font-style: italic;"&gt;version&lt;/span&gt;. This last is a little optimisation.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://2.bp.blogspot.com/-mi6U1vxgeac/TseneDT0LnI/AAAAAAAABEA/J2Fy0ieJ7u4/s1600/image08.png" /&gt;&lt;br /&gt;&lt;br /&gt;Each row in the &lt;span style="font-style: italic;"&gt;Events&lt;/span&gt; table describes one event, using:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;an &lt;span style="font-style: italic;"&gt;AggregateID&lt;/span&gt; identifying the aggregate to which the event relates;&lt;/li&gt;&lt;li&gt;the &lt;span style="font-style: italic;"&gt;version&lt;/span&gt; of the event; and&lt;/li&gt;&lt;li&gt;a serialized representation of the event, containing all property values that need to be applied.&lt;/li&gt;&lt;/ol&gt;Note that the &lt;span style="font-style: italic;"&gt;Aggregate ID&lt;/span&gt; column will usually be indexed, since all queries retrieving events will use it.&lt;br /&gt;&lt;br /&gt;&lt;img style="float:left;" src="http://3.bp.blogspot.com/-6mRrJYh_64M/Tsen2QVww4I/AAAAAAAABEM/7YuZL3e36hI/s1600/image01.png" /&gt;A crucial point here is that events are always saved and applied at the &lt;span style="font-style: italic;"&gt;aggregate root level&lt;/span&gt;. It might take a bit of time to illustrate this point, but I’ll explain this in the context of a simple model. In our example, a &lt;span style="font-style: italic;"&gt;workflow&lt;/span&gt; has a &lt;span style="font-style: italic;"&gt;title&lt;/span&gt; and a collection of &lt;span style="font-style: italic;"&gt;stages&lt;/span&gt;. Each &lt;span style="font-style: italic;"&gt;stage&lt;/span&gt; has a &lt;span style="font-style: italic;"&gt;title&lt;/span&gt; and a collection of &lt;span style="font-style: italic;"&gt;task lists&lt;/span&gt;. Each &lt;span style="font-style: italic;"&gt;task list&lt;/span&gt; has a &lt;span style="font-style: italic;"&gt;title&lt;/span&gt;. We might take it a bit further and say that each &lt;span style="font-style: italic;"&gt;task list&lt;/span&gt; has a list of &lt;span style="font-style: italic;"&gt;tasks&lt;/span&gt;, but we’ll stop at the task list. Now let’s describe the model using domain driven design terminology.&lt;br /&gt;&lt;br /&gt;First I'll introduce some important terms for the benefit of people who perhaps haven’t read the Eric Evans book &lt;a href="http://www.amazon.co.uk/Domain-driven-Design-Tackling-Complexity-Software/dp/0321125215"&gt;&lt;span style="font-style: italic;"&gt;Domain-Driven Design: Tackling Complexity in the Heart of Software&lt;/span&gt;&lt;/a&gt;. When I was first reading about this stuff via blog posts and articles found on the net, the terms &lt;span style="font-style: italic;"&gt;aggregate&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;aggregate root&lt;/span&gt; were used in such ways, I wondered if they were synonymous. Perhaps I had also been a bit confused by looking at code from DDD example projects, where the terms used in the book don’t quite map directly to the code (I’ll come to that shortly). Since I won’t explain it better than Eric, I’m going to quote his definition:&lt;br /&gt;&lt;blockquote style="font-style: italic;"&gt;An Aggregate is a cluster of associated objects that we treat as a unit for the purpose of data changes. Each aggregate has a root and a boundary. The boundary defines what is inside the Aggregate. The root is a single, specific Entity contained in the Aggregate... Entities other than the root have local identity, but that identity needs to be distinguishable only within the Aggregate, because no outside object can ever see it out of the context of the root Entity.&lt;/blockquote&gt;We can now attempt to describe our model using these terms. The entire diagram represents the aggregate and its boundary, and we see from it that our &lt;span style="font-style: italic;"&gt;workflow&lt;/span&gt; is an entity, our aggregate root. A &lt;span style="font-style: italic;"&gt;stage&lt;/span&gt; is an entity that's a child of a workflow. It only has local identity, as we'll only ever be interested in a stage in the context of a workflow instance. Similarly, a task list is an entity that's a child of a stage. It has identity local to the stage instance (although still local to the entire aggregate too), as we'll only be interested in a task list in that context. However, as I mentioned a bit earlier, it’s important to note that the task list, despite being a child of a stage, still refers to the workflow as its aggregate root, and not the stage.&lt;br /&gt;&lt;br /&gt;It’s particularly important in the context of the implementation, where a reference to an aggregate root is maintained down the entire graph of an object. This is necessary so we can save and apply events at the aggregate root level. Even when we want to save new events that have taken place on children, such as adding a task list to a stage, still we need to save the entire aggregate root. After all, events always relate to an aggregate root - remember, we query by AggregateID to retrieve them.&lt;br /&gt;&lt;br /&gt;So, how exactly do the proper terms fail to map exactly on to the code?&lt;br /&gt;&lt;br /&gt;You can see that our Workflow class inherits from an AggregateRoot class, which happens to be an abstract base class. Since we mentioned that a workflow is an entity, perhaps we might expect to see it inheriting from Entity? Then we would have a reference to it inside some aggregate root class. Well, as just mentioned, the AggregateRoot class is abstract. It doesn’t really make sense to create an instance of that; you’d rather create instances of actual concrete aggregate roots. So, even though an aggregate root is an entity, in the code we’ll define any root entities as inheriting from AggregateRoot.&lt;br /&gt;&lt;br /&gt;There is also an Entity abstract base class. Stage and TaskList inherit from this. In the code, entities that are not aggregate roots must have a reference to an aggregate root. The entity has a protected AggregateRoot field, a reference to the ‘parent’ aggregate root, although as hopefully my previous explanation will have made clear, this is not really a parent. The AggregateRoot must be passed into the entity's constructor. The only reason that it’s protected as opposed to private is so it can be passed, when a concrete entity creates a child, into the new child.&lt;br /&gt;&lt;br /&gt;Both of these base classes provide all the behaviour for managing &lt;span style="font-style: italic;"&gt;event application&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;replaying&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Having established all that, I can finally get to the interesting implementation: how events are applied and replayed.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Next time: &lt;a href="http://mycodehere.blogspot.com/2011/11/event-store-methods-part-2-of-2-guest.html"&gt;Applying and Replaying Events&lt;/a&gt;.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-5010861752246275126?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/5010861752246275126/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/11/event-store-methods-part-1-of-2-guest.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/5010861752246275126'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/5010861752246275126'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/11/event-store-methods-part-1-of-2-guest.html' title='Event Store Methods - part 1 of 2 (guest post)'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-R1dLRYLPyCE/TsenS7HhehI/AAAAAAAABD0/soiNCiQ3SoM/s72-c/image05.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-6807088505871433010</id><published>2011-11-10T21:00:00.007Z</published><updated>2011-11-30T09:07:15.656Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Quantum Computing'/><category scheme='http://www.blogger.com/atom/ns#' term='Physics'/><title type='text'>Quantum Computing #5: Quantum Teleportation</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://en.wikipedia.org/wiki/File:Transporter2.jpg"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 255px; height: 238px;" src="http://2.bp.blogspot.com/-y8xoCLcER-w/TrvbQBBI8AI/AAAAAAAABDg/x3EpDCrcU0U/s400/Transporter2.jpg" alt="" id="BLOGGER_PHOTO_ID_5673369223800877058" border="0" /&gt;&lt;/a&gt;&lt;span style="font-style: italic;"&gt;Previously:&lt;br /&gt;&lt;/span&gt;&lt;a style="font-style: italic;" href="http://mycodehere.blogspot.com/2011/10/single-qubit-gates.html"&gt;&lt;/a&gt;&lt;blockquote&gt;&lt;a href="http://mycodehere.blogspot.com/2011/10/quantum-computing-for-determined.html"&gt;&lt;span style="font-style: italic;"&gt;Introduction&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a style="font-style: italic;" href="http://mycodehere.blogspot.com/2011/10/single-qubit-gates.html"&gt;Single Qubit Gates&lt;/a&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;a href="http://mycodehere.blogspot.com/2011/10/multiple-qubit-gates.html"&gt;Multiple Qubit Gates&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;a href="http://mycodehere.blogspot.com/2011/10/quantum-computing-3-measurement-review.html"&gt;&lt;span style="font-style: italic;"&gt;Measurement &amp;amp; Review&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://mycodehere.blogspot.com/2011/11/quantum-computing-4-superdense-coding.html"&gt;&lt;span style="font-style: italic;"&gt;Superdense Coding&lt;/span&gt;&lt;/a&gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;Beam Me Over&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you took the time to digest the &lt;a href="http://mycodehere.blogspot.com/2011/11/quantum-computing-4-superdense-coding.html"&gt;previous article on the &lt;span style="font-style: italic;"&gt;Superdense Coding&lt;/span&gt; protocol&lt;/a&gt;, you'll find comparatively few surprises in this one. Remember how two entangled qubits were initially prepared in a special &lt;span style="font-style: italic;"&gt;Bell State;&lt;/span&gt; then one was sent directly to Bob, while Alice processed the second to encode two classical bits of data. Later, Bob successfully decoded those two classical bits. Didn't it seem to you as if Alice somehow reached across the divide, fiddling with the independent states of &lt;span style="font-style: italic;"&gt;both&lt;/span&gt; qubits, using some kind of &lt;a style="font-style: italic;" href="http://www.sciencedaily.com/releases/2009/03/090304091231.htm"&gt;spooky action at a distance&lt;/a&gt;&lt;span style="font-style: italic;"&gt;?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The Quantum Teleportation protocol is a very similar trick. In fact, you could say that it's exactly the same trick, but performed in reverse. This time, using the magic of the entangled qubit pair, and precisely the same set of quantum gates as before, Alice will teleport to Bob the &lt;span style="font-style: italic;"&gt;full state vector&lt;/span&gt; of an arbitrary third qubit - using only &lt;span style="font-style: italic;"&gt;two classical bits&lt;/span&gt; of information.&lt;br /&gt;&lt;br /&gt;There are three preliminary, new, key concepts - all related to the notion of &lt;span style="font-style: italic;"&gt;measurement&lt;/span&gt; - that we'll need in order to investigate and explain the Quantum Teleportation phenomenon today. The first of these is:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/-TdNmmUdr-oU/TrcIOm0IWtI/AAAAAAAABDI/bqruXcPj0KQ/s1600/Basis2.png"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 195px; height: 200px;" src="http://4.bp.blogspot.com/-TdNmmUdr-oU/TrcIOm0IWtI/AAAAAAAABDI/bqruXcPj0KQ/s200/Basis2.png" alt="" id="BLOGGER_PHOTO_ID_5672011302726818514" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;The Measurement Basis&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Specifically, the performance of a &lt;span style="font-style: italic;"&gt;measurement in an arbitrary basis&lt;/span&gt;. Recall that in &lt;a href="http://mycodehere.blogspot.com/2011/10/single-qubit-gates.html"&gt;part one&lt;/a&gt; we said &lt;span style="font-style: italic;"&gt;the labels &lt;/span&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;0&lt;/span&gt;&lt;span style="font-style: italic;"&gt; and &lt;/span&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;1&lt;/span&gt;&lt;span style="font-style: italic;"&gt; might represent unit steps in some arbitrary x- and y-directions&lt;/span&gt;. When later we made a measurement &lt;span style="font-style: italic;"&gt;in the computational basis&lt;/span&gt;, we were in effect holding up a filter, constraining the result to be either &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; or &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt; in this sense. But we are free to change this basis!&lt;br /&gt;&lt;br /&gt;To take a brief physical detour, suppose our qubit is a photon, and measurement involves holding up a pair of polarized sunglasses, either horizontally or vertically, to see whether or not the photon gets through the lens. We know there's a 50-50 chance it that will, simply because holding up &lt;span style="font-style: italic;"&gt;two&lt;/span&gt; such identical and overlapping lenses, one horizontally and one vertically, will prevent &lt;span style="font-style: italic;"&gt;any&lt;/span&gt; photons from getting through. But what's to prevent us holding our sunglasses at ±45° to the horizontal?&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Nothing&lt;/span&gt;. All we're doing is changing the basis of measurement, from the original computational basis, i.e. horizontal &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; or vertical &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;, to this new one, where perhaps &lt;span style="font-weight: bold; color: rgb(204, 0, 0);"&gt;0'&lt;/span&gt; and &lt;span style="font-weight: bold; color: rgb(204, 0, 0);"&gt;1'&lt;/span&gt; mean pointing respectively up or down at 45°. From the diagram we see these new basis vectors can be expressed readily in terms of the originals, like this:&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-weight: bold; color: rgb(204, 0, 0);"&gt;0'&lt;/span&gt; = (&lt;span style="font-weight: bold;"&gt;0&lt;/span&gt;+&lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;)/√2,&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(204, 0, 0);"&gt;1'&lt;/span&gt; = (&lt;span style="font-weight: bold;"&gt;0&lt;/span&gt;-&lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;)/√2.&lt;/blockquote&gt;But this is precisely the state transformation performed by the Hadamard gate. Now we can see that it corresponds to a particular reflection, in a line at 22½° to our basis &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; vector (the light grey line in the diagram is this axis of symmetry). Incidentally this illustrates nicely why the Hadamard gate, &lt;span style="font-style: italic;"&gt;like any reflection&lt;/span&gt;, is its own inverse; since we also have these perfectly symmetrical equations,&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; = (&lt;span style="font-weight: bold; color: rgb(204, 0, 0);"&gt;0'&lt;/span&gt;+&lt;span style="font-weight: bold; color: rgb(204, 0, 0);"&gt;1'&lt;/span&gt;)/√2,&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1&lt;/span&gt; = (&lt;span style="font-weight: bold; color: rgb(204, 0, 0);"&gt;0'&lt;/span&gt;-&lt;span style="font-weight: bold; color: rgb(204, 0, 0);"&gt;1'&lt;/span&gt;)/√2.&lt;/blockquote&gt;And just as &lt;span style="font-weight: bold; color: rgb(204, 0, 0);"&gt;0'&lt;/span&gt; and &lt;span style="font-weight: bold; color: rgb(204, 0, 0);"&gt;1'&lt;/span&gt;  give us an alternative orthonormal basis for measuring single-qubit states  previously expressed in terms of our original computational basis &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;,  so too are there any number of alternative bases for a given  multi-qubit measurement. One important example in 2-qubit systems is:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;The Bell Basis&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is today's new concept number two. Starting from any given 2-qubit computational basis &lt;span style="font-weight: bold;"&gt;00&lt;/span&gt;, &lt;span style="font-weight: bold;"&gt;01&lt;/span&gt;, &lt;span style="font-weight: bold;"&gt;10&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;11&lt;/span&gt;, the Bell basis can be defined as&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-weight: bold; color: rgb(204, 0, 0);"&gt;B&lt;/span&gt;&lt;sub style="font-weight: bold; color: rgb(204, 0, 0);"&gt;0&lt;/sub&gt; = (&lt;span style="font-weight: bold;"&gt;00&lt;/span&gt;+&lt;span style="font-weight: bold;"&gt;11&lt;/span&gt;)/√2,&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(204, 0, 0);"&gt;B&lt;/span&gt;&lt;sub style="font-weight: bold; color: rgb(204, 0, 0);"&gt;1&lt;/sub&gt; = (&lt;span style="font-weight: bold;"&gt;10&lt;/span&gt;+&lt;span style="font-weight: bold;"&gt;01&lt;/span&gt;)/√2,&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(204, 0, 0);"&gt;B&lt;/span&gt;&lt;sub style="font-weight: bold; color: rgb(204, 0, 0);"&gt;2&lt;/sub&gt; = (&lt;span style="font-weight: bold;"&gt;00&lt;/span&gt;-&lt;span style="font-weight: bold;"&gt;11&lt;/span&gt;)/√2,&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(204, 0, 0);"&gt;B&lt;/span&gt;&lt;sub style="font-weight: bold; color: rgb(204, 0, 0);"&gt;3&lt;/sub&gt; = (&lt;span style="font-weight: bold;"&gt;10&lt;/span&gt;-&lt;span style="font-weight: bold;"&gt;01&lt;/span&gt;)/√2.&lt;/blockquote&gt;Notice that these four are exactly the states that Alice prepared last time, in the Superdense Coding protocol, by inserting either an &lt;span style="font-weight: bold;"&gt;X&lt;/span&gt; or a &lt;span style="font-weight: bold;"&gt;Z&lt;/span&gt; gate (or both, or neither) into the path of the top qubit of a pair - an entangled pair, which happened to have been prepared in a certain special initial state. We now recognise that state as &lt;span style="font-weight: bold; color: rgb(204, 0, 0);"&gt;B&lt;/span&gt;&lt;sub style="font-weight: bold; color: rgb(204, 0, 0);"&gt;0&lt;/sub&gt; = (&lt;span style="font-weight: bold;"&gt;00&lt;/span&gt;+&lt;span style="font-weight: bold;"&gt;11&lt;/span&gt;)/√2.&lt;br /&gt;&lt;br /&gt;Exactly as before, it's easy to check by substitution that we can express the Bell state mapping the other way round, for convenience in our subsequent conversions:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-weight: bold;"&gt;00&lt;/span&gt; = (&lt;span style="font-weight: bold; color: rgb(204, 0, 0);"&gt;B&lt;/span&gt;&lt;sub style="font-weight: bold; color: rgb(204, 0, 0);"&gt;0&lt;/sub&gt;+&lt;span style="font-weight: bold; color: rgb(204, 0, 0);"&gt;B&lt;/span&gt;&lt;sub style="font-weight: bold; color: rgb(204, 0, 0);"&gt;2&lt;/sub&gt;)/√2,&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;01&lt;/span&gt; = (&lt;span style="font-weight: bold; color: rgb(204, 0, 0);"&gt;B&lt;/span&gt;&lt;sub style="font-weight: bold; color: rgb(204, 0, 0);"&gt;1&lt;/sub&gt;-&lt;span style="font-weight: bold; color: rgb(204, 0, 0);"&gt;B&lt;/span&gt;&lt;sub style="font-weight: bold; color: rgb(204, 0, 0);"&gt;3&lt;/sub&gt;)/√2,&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;10&lt;/span&gt; = (&lt;span style="font-weight: bold; color: rgb(204, 0, 0);"&gt;B&lt;/span&gt;&lt;sub style="font-weight: bold; color: rgb(204, 0, 0);"&gt;1&lt;/sub&gt;+&lt;span style="font-weight: bold; color: rgb(204, 0, 0);"&gt;B&lt;/span&gt;&lt;sub style="font-weight: bold; color: rgb(204, 0, 0);"&gt;3&lt;/sub&gt;)/√2,&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;11&lt;/span&gt; = (&lt;span style="font-weight: bold; color: rgb(204, 0, 0);"&gt;B&lt;/span&gt;&lt;sub style="font-weight: bold; color: rgb(204, 0, 0);"&gt;0&lt;/sub&gt;-&lt;span style="font-weight: bold; color: rgb(204, 0, 0);"&gt;B&lt;/span&gt;&lt;sub style="font-weight: bold; color: rgb(204, 0, 0);"&gt;2&lt;/sub&gt;)/√2.&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;Partial Measurements&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Our third and final new concept of the day is that of a &lt;span style="font-style: italic;"&gt;partial measurement&lt;/span&gt;. What happens to a composite, multi-qubit state when we perform measurements upon some, but not all, of its constituent qubits? Answer: measured qubits collapse into appropriate basis states in accordance with the probabilities in effect, while unmeasured ones continue in renormalized superpositions.&lt;br /&gt;&lt;br /&gt;Take for example the 2-qubit state (a, b, c, d) = a&lt;span style="font-weight: bold;"&gt;00&lt;/span&gt; + b&lt;span style="font-weight: bold;"&gt;01&lt;/span&gt; + c&lt;span style="font-weight: bold;"&gt;10&lt;/span&gt; + d&lt;span style="font-weight: bold;"&gt;11&lt;/span&gt;, and suppose that we perform a measurement, in the computational basis, on its first qubit. Then the probability of getting a result of &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; is simply the &lt;span style="font-style: italic;"&gt;sum&lt;/span&gt; of the probabilities of getting either &lt;span style="font-weight: bold;"&gt;00&lt;/span&gt; or &lt;span style="font-weight: bold;"&gt;01&lt;/span&gt; from a full, 2-qubit measurement. Similarly, the probability of a &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt; is just the sum for &lt;span style="font-weight: bold;"&gt;10&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;11&lt;/span&gt;:&lt;br /&gt;&lt;blockquote&gt;prob(&lt;span style="font-weight: bold;"&gt;0?&lt;/span&gt;) = prob(&lt;span style="font-weight: bold;"&gt;00&lt;/span&gt;) + prob(&lt;span style="font-weight: bold;"&gt;01&lt;/span&gt;) = |a|² + |b|²,&lt;br /&gt;prob(&lt;span style="font-weight: bold;"&gt;1?&lt;/span&gt;) = prob(&lt;span style="font-weight: bold;"&gt;10&lt;/span&gt;) + prob(&lt;span style="font-weight: bold;"&gt;11&lt;/span&gt;) = |c|² + |d|².&lt;/blockquote&gt;Okay, that tells us everything we can ever know about the first qubit. What can we say about the &lt;span style="font-style: italic;"&gt;posterior state&lt;/span&gt; of the second qubit, i.e., its state &lt;span style="font-style: italic;"&gt;after&lt;/span&gt; this partial measurement? We can answer this by rewriting the original state, collecting terms involving a result of &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; or &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt; for the first qubit measurement:&lt;br /&gt;&lt;blockquote&gt;(a, b, c, d) = a&lt;span style="font-weight: bold;"&gt;00&lt;/span&gt; + b&lt;span style="font-weight: bold;"&gt;01&lt;/span&gt; + c&lt;span style="font-weight: bold;"&gt;10&lt;/span&gt; + d&lt;span style="font-weight: bold;"&gt;11&lt;/span&gt; = &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; (a&lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; + b&lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;) + &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt; (&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;c&lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; + d&lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;).&lt;/blockquote&gt;This lets us read off the result. If the measurement yielded &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; for the first qubit, then the second qubit is now in the state indicated by a&lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; + b&lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;, which of course we must renormalize as usual:&lt;br /&gt;&lt;blockquote&gt;(a&lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; + b&lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;) / √(|a|² + |b|²).&lt;/blockquote&gt;Similarly, a measurement of &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt; for the first qubit implies that the second is now in this state:&lt;br /&gt;&lt;blockquote&gt;(c&lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; + d&lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;) / √(|c|² + |d|²).&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;Quantum Teleportation&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now we finally have enough background to understand the &lt;span style="font-style: italic;"&gt;Quantum Teleportation protocol&lt;/span&gt;, which is illustrated in the diagram below. Alice starts with an arbitrary qubit state which I've called &lt;span style="font-weight: bold;"&gt;ψ&lt;/span&gt;, pronounced &lt;span style="font-style: italic;"&gt;sigh&lt;/span&gt;,  out of deference to 86 years of quantum mechanics... sorry about that!&lt;br /&gt;&lt;br /&gt;So Alice starts with &lt;span style="font-weight: bold;"&gt;ψ&lt;/span&gt; = (a, b) = a&lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; + b&lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;, where |a|² + |b|² = 1. This is the state she wants to  communicate to Bob; and she also has access to &lt;span style="font-style: italic;"&gt;one qubit&lt;/span&gt; of an entangled pair, previously prepared in the state&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-weight: bold; color: rgb(204, 0, 0);"&gt;B&lt;/span&gt;&lt;sub style="font-weight: bold; color: rgb(204, 0, 0);"&gt;0&lt;/sub&gt; = (&lt;span style="font-weight: bold;"&gt;00&lt;/span&gt;+&lt;span style="font-weight: bold;"&gt;11&lt;/span&gt;)/√2.&lt;/blockquote&gt;She now performs the "decoding" second half of the Superdense Coding protocol on her two qubits. So that's a &lt;span style="font-weight: bold;"&gt;cNOT&lt;/span&gt;,  followed by a Hadamard on the first qubit, then a 2-qubit measurement. Remember, this was  the operation performed by Bob last time, and it yields a couple of  classical bit results. We've shown these as thick double wires, intended  to give the impression of big, strong, macroscopic classical logic  levels, insusceptible to decoherence. This decoding operation is  actually termed a &lt;span style="font-style: italic;"&gt;measurement in the Bell basis&lt;/span&gt;. Furthermore, in this setup it's a &lt;span style="font-style: italic;"&gt;partial&lt;/span&gt; measurement. Recall that we are dealing with a system of &lt;span style="font-style: italic;"&gt;three&lt;/span&gt;  entangled qubits, but measuring only two of them. The third, the bottom  one in the diagram, is simply transmitted directly to Bob.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/-gIY-Fdw9lTM/Trkmv2vvMNI/AAAAAAAABDU/3r0o4bmjRGY/s1600/QT.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 202px;" src="http://2.bp.blogspot.com/-gIY-Fdw9lTM/Trkmv2vvMNI/AAAAAAAABDU/3r0o4bmjRGY/s400/QT.png" alt="" id="BLOGGER_PHOTO_ID_5672607809241297106" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Now Bob examines those two classical bits of data he's received from Alice, and uses them to decide which, if any, of his decoding &lt;span style="font-weight: bold;"&gt;X&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;Z&lt;/span&gt; gates to apply. His logic is exactly the reverse of the "encoding" step used in the first half of the Superdense Coding protocol. And that's all there is to the Quantum Teleportation protocol; the output that Bob ultimately obtains is identical to Alice's initial, arbitrary state &lt;span style="font-weight: bold;"&gt;ψ&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;I Don't Believe You&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;And who can blame you! Okay, but be warned: I'll be renormalizing throughout today, so as to avoid any sleight-of-hand accusations. So let's start with the initial state of the 3-qubit system,&lt;br /&gt;&lt;blockquote&gt;(a&lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; + b&lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;)(&lt;span style="font-weight: bold;"&gt;00&lt;/span&gt; + &lt;span style="font-weight: bold;"&gt;11&lt;/span&gt;) / √2 = [a (&lt;span style="font-weight: bold;"&gt;000&lt;/span&gt; + &lt;span style="font-weight: bold;"&gt;011&lt;/span&gt;) + b (&lt;span style="font-weight: bold;"&gt;100&lt;/span&gt; + &lt;span style="font-weight: bold;"&gt;111&lt;/span&gt;)] / √2.&lt;/blockquote&gt;Alice begins by passing the first two qubits through a &lt;span style="font-weight: bold;"&gt;cNOT&lt;/span&gt; gate. This flips the state of the second qubit in the last two terms, i.e., those where the first "control" qubit is &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;, resulting in the state&lt;br /&gt;&lt;blockquote&gt;[a (&lt;span style="font-weight: bold;"&gt;000&lt;/span&gt; + &lt;span style="font-weight: bold;"&gt;011&lt;/span&gt;) + b (&lt;span style="font-weight: bold;"&gt;110&lt;/span&gt; + &lt;span style="font-weight: bold;"&gt;101&lt;/span&gt;)] / √2.&lt;/blockquote&gt;Next she passes the first qubit through a Hadamard. The effect of this is to replace every initial &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; with (&lt;span style="font-weight: bold;"&gt;0&lt;/span&gt;+&lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;)/√2, and every initial &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt; with (&lt;span style="font-weight: bold;"&gt;0&lt;/span&gt;-&lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;)/√2. Collecting terms and combining the √2 divisors, we now have the state&lt;br /&gt;&lt;blockquote&gt;[a (&lt;span style="font-weight: bold;"&gt;000&lt;/span&gt; + &lt;span style="font-weight: bold;"&gt;011&lt;/span&gt; + &lt;span style="font-weight: bold;"&gt;100&lt;/span&gt; + &lt;span style="font-weight: bold;"&gt;111&lt;/span&gt;) + b (&lt;span style="font-weight: bold;"&gt;001&lt;/span&gt; + &lt;span style="font-weight: bold;"&gt;010&lt;/span&gt; - &lt;span style="font-weight: bold;"&gt;101&lt;/span&gt; - &lt;span style="font-weight: bold;"&gt;110&lt;/span&gt;)] / 2.&lt;/blockquote&gt;This is the point at which Alice performs the partial measurement upon the first two qubits. The probability of her getting a result of &lt;span style="font-weight: bold;"&gt;00&lt;/span&gt; is&lt;br /&gt;&lt;blockquote&gt;prob(&lt;span style="font-weight: bold;"&gt;00?&lt;/span&gt;) = prob(&lt;span style="font-weight: bold;"&gt;000&lt;/span&gt;) + prob(&lt;span style="font-weight: bold;"&gt;001&lt;/span&gt;) = (|a|² + |b|²) / 4 = ¼,&lt;/blockquote&gt;since |a|² + |b|² = 1. And in fact if you work out the remaining probabilities for results &lt;span style="font-weight: bold;"&gt;01&lt;/span&gt;, &lt;span style="font-weight: bold;"&gt;10&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;11&lt;/span&gt;, they all turn out to be ¼. Think about that - the measurement outcome is absolutely random, and completely independent of the particular state of the input qubit &lt;span style="font-weight: bold;"&gt;ψ&lt;/span&gt;! This happens because - thanks to the &lt;span style="font-weight: bold;"&gt;cNOT&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;H&lt;/span&gt; gates - we are performing the measurement in the &lt;span style="font-style: italic;"&gt;Bell&lt;/span&gt; basis, and not in the original &lt;span style="font-style: italic;"&gt;computational&lt;/span&gt; basis where we started.&lt;br /&gt;&lt;br /&gt;Fascinating as this detail may be, nevertheless it's not quite what we're after here. We want to know the &lt;span style="font-style: italic;"&gt;posterior state&lt;/span&gt; of the &lt;span style="font-style: italic;"&gt;third&lt;/span&gt; qubit. This does depend critically upon the particular 2-bit classical result just obtained, so just as in the Superdense Coding protocol, we now have four distinct cases to consider.&lt;br /&gt;&lt;div style="text-align: center;"&gt;________&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Case 00:&lt;/span&gt; keeping only the &lt;span style="font-weight: bold;"&gt;000&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;001&lt;/span&gt; terms from our state expression and renormalizing, we obtain the state received by Bob:&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-weight: bold;"&gt;00&lt;/span&gt; (a&lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; + b&lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;) = &lt;span style="font-weight: bold;"&gt;00 &lt;/span&gt;&lt;span style="font-weight: bold;"&gt;ψ&lt;/span&gt;.&lt;/blockquote&gt;That's the magic of quantum teleportation! Without doing anything further, Bob knows from the classical measurement &lt;span style="font-weight: bold;"&gt;00&lt;/span&gt; that &lt;span style="font-style: italic;"&gt;his third qubit is already in Alice's initial state, &lt;/span&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;ψ&lt;/span&gt;&lt;span style="font-style: italic;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;________&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Case 01:&lt;/span&gt; keeping only the &lt;span style="font-weight: bold;"&gt;010&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;011&lt;/span&gt; terms from our state expression, and renormailzing, we obtain the state received by Bob:&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-weight: bold;"&gt;01&lt;/span&gt; (a&lt;span style="font-weight: bold;"&gt;1&lt;/span&gt; + b&lt;span style="font-weight: bold;"&gt;0&lt;/span&gt;).&lt;br /&gt;&lt;/blockquote&gt;Notice however that the &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt; bit in the classical measurement result activates the &lt;span style="font-weight: bold;"&gt;X&lt;/span&gt; gate in Bob's decoding circuit, causing a logical inversion of the third qubit, and a final state of&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-weight: bold;"&gt;01&lt;/span&gt; (a&lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; + b&lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;) = &lt;span style="font-weight: bold;"&gt;01 &lt;/span&gt;&lt;span style="font-weight: bold;"&gt;ψ&lt;/span&gt;.&lt;/blockquote&gt;&lt;span style="font-style: italic;"&gt;Again, Bob has successfully received Alice's full state &lt;/span&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;ψ&lt;/span&gt;&lt;span style="font-style: italic;"&gt; in that third qubit.&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;________&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Case 10:&lt;/span&gt; keeping only the &lt;span style="font-weight: bold;"&gt;100&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;101&lt;/span&gt; terms from our state expression, and renormailzing, we obtain the state received by Bob:&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-weight: bold;"&gt;10&lt;/span&gt; (a&lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; - b&lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;).&lt;/blockquote&gt;Notice however that the &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt; bit in the classical measurement result activates the &lt;span style="font-weight: bold;"&gt;Z&lt;/span&gt; gate in Bob's decoding circuit, causing a sign change in the second basis component of the third qubit, and a final state of&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-weight: bold;"&gt;10&lt;/span&gt; (a&lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; + b&lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;) = &lt;span style="font-weight: bold;"&gt;10 &lt;/span&gt;&lt;span style="font-weight: bold;"&gt;ψ&lt;/span&gt;.&lt;/blockquote&gt;&lt;span style="font-style: italic;"&gt;Again, Bob has successfully received Alice's full state &lt;/span&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;ψ&lt;/span&gt;&lt;span style="font-style: italic;"&gt; in that third qubit.&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;________&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Case 11:&lt;/span&gt; keeping only the &lt;span style="font-weight: bold;"&gt;110&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;111&lt;/span&gt; terms from our state expression, and renormailzing, we obtain the state received by Bob:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-weight: bold;"&gt;11&lt;/span&gt; (a&lt;span style="font-weight: bold;"&gt;1&lt;/span&gt; - b&lt;span style="font-weight: bold;"&gt;0&lt;/span&gt;).&lt;/blockquote&gt;This time both bits in the classical measurement result are &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;, so this state becomes subjected to both the full logical inversion and the phase (sign) change, and the final 3-qubit state is&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-weight: bold;"&gt;11&lt;/span&gt; (a&lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; + b&lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;) = &lt;span style="font-weight: bold;"&gt;11 &lt;/span&gt;&lt;span style="font-weight: bold;"&gt;ψ&lt;/span&gt;.&lt;/blockquote&gt;So in all four cases - in other words, regardless of the outcome of the partial measurement operation - &lt;span style="font-style: italic;"&gt;Bob has successfully received Alice's full state &lt;/span&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;ψ&lt;/span&gt;&lt;span style="font-style: italic;"&gt; in the third qubit.&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;________&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Interactive Demo&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Once again &lt;a href="http://demonstrations.wolfram.com/author.html?author=Brad+Rubin"&gt;Brad Rubin&lt;/a&gt; steps up with the Wolfram Demonstrations Project simulation of the &lt;a href="http://demonstrations.wolfram.com/QuantumTeleportation/"&gt;Quantum Teleportation&lt;/a&gt; protocol, a model of clarity:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://demonstrations.wolfram.com/QuantumTeleportation/"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 318px;" src="http://4.bp.blogspot.com/-Yjf5-1t4Dhk/TrKVwgt9IwI/AAAAAAAABBc/ZKRyHvZtkL8/s400/Wolfram%2BQuantum%2BTeleportation.png" alt="" id="BLOGGER_PHOTO_ID_5670759541461820162" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;This ingenious demo lets you vary both the arbitrary input state &lt;span style="font-weight: bold;"&gt;ψ&lt;/span&gt;, by dragging the indicator point in the upper graph, and the 2-qubit partial measurement result, using the radio buttons below it. Intermediate states of the 3-qubit system are displayed as continuously updated column vectors.&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;Picture of Star Trek transporter chamber from &lt;a href="http://en.wikipedia.org/wiki/File:Transporter2.jpg"&gt;Wikipedia&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-6807088505871433010?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/6807088505871433010/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/11/quantum-computing-5-quantum.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/6807088505871433010'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/6807088505871433010'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/11/quantum-computing-5-quantum.html' title='Quantum Computing #5: Quantum Teleportation'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-y8xoCLcER-w/TrvbQBBI8AI/AAAAAAAABDg/x3EpDCrcU0U/s72-c/Transporter2.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-7475150039230156279</id><published>2011-11-06T00:01:00.003Z</published><updated>2011-11-30T09:07:32.386Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Quantum Computing'/><category scheme='http://www.blogger.com/atom/ns#' term='Physics'/><title type='text'>Quantum Computing #4: Superdense Coding</title><content type='html'>&lt;span style="font-style: italic;"&gt;Previously:&lt;br /&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;a href="http://mycodehere.blogspot.com/2011/10/quantum-computing-for-determined.html"&gt;&lt;span style="font-style: italic;"&gt;Introduction&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a style="font-style: italic;" href="http://mycodehere.blogspot.com/2011/10/single-qubit-gates.html"&gt;Single Qubit Gates&lt;/a&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;a href="http://mycodehere.blogspot.com/2011/10/multiple-qubit-gates.html"&gt;Multiple Qubit Gates&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;a href="http://mycodehere.blogspot.com/2011/10/quantum-computing-3-measurement-review.html"&gt;&lt;span style="font-style: italic;"&gt;Measurement &amp;amp; Review&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;span style="font-style: italic;"&gt;Note: Last week's removal of Greek lettering and matrices has proved too popular to ignore, all feedback being either positive or neutral, so I'll continue using this "new" notation wherever possible.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;Breaking News! A single qubit can transmit &lt;/span&gt;&lt;span style="font-weight: bold;"&gt;two full classical bits&lt;/span&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt; of information.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Not on its own, though. We can only ever encode one single classical bit of information into a solitary, &lt;span style="font-style: italic;"&gt;unentangled&lt;/span&gt; qubit. But when we have access to an &lt;span style="font-style: italic;"&gt;entangled pair&lt;/span&gt;, we can choose to send one &lt;span style="font-style: italic;"&gt;unmodified&lt;/span&gt; to our intended recipient, and encode a full &lt;span style="font-style: italic;"&gt;two classical bits&lt;/span&gt; into the other. To see how, we'll have to examine four quite similar quantum circuits. And we'll need the help of a new single-qubit gate we haven't met before:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The Z Gate&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-WUhFGU6MfvE/Tq6A-vpRYvI/AAAAAAAABAI/8AA6e-16vWw/s1600/1b.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 171px; height: 72px;" src="http://4.bp.blogspot.com/-WUhFGU6MfvE/Tq6A-vpRYvI/AAAAAAAABAI/8AA6e-16vWw/s400/1b.png" alt="" id="BLOGGER_PHOTO_ID_5669610796335850226" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Like its partner the &lt;span style="font-weight: bold;"&gt;X&lt;/span&gt; gate, &lt;span style="font-weight: bold;"&gt;Z&lt;/span&gt; is a kind of inverter. It maps the input qubit state (a, b) to (a, -b). We say that it inverts the &lt;span style="font-style: italic;"&gt;phase&lt;/span&gt; of the second basis vector. For the sake of completeness alone, here is its matrix representation:&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-n1erisU8ONM/Tq6DbWzFErI/AAAAAAAABAU/ssCw99YoVbY/s1600/1c.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 265px; height: 138px;" src="http://3.bp.blogspot.com/-n1erisU8ONM/Tq6DbWzFErI/AAAAAAAABAU/ssCw99YoVbY/s400/1c.png" alt="" id="BLOGGER_PHOTO_ID_5669613486905561778" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Preparing the Bell State&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The two qubits that we'll be using to perform the superdense coding trick have to be entangled, so first let's see how to achieve that. One way is to prepare them both initially in the &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; state. Next, we pass the first qubit of the pair through a Hadamard gate. Finally, we use the output of the &lt;span style="font-weight: bold;"&gt;H&lt;/span&gt; gate as the control input of a controlled-NOT gate, conditionally inverting the second qubit:&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-3E4McH3pNsc/Tq6AR0ZEJTI/AAAAAAAAA_8/ZD4p_mSb3zs/s1600/1a.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 309px; height: 140px;" src="http://4.bp.blogspot.com/-3E4McH3pNsc/Tq6AR0ZEJTI/AAAAAAAAA_8/ZD4p_mSb3zs/s400/1a.png" alt="" id="BLOGGER_PHOTO_ID_5669610024515937586" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;The &lt;span style="font-weight: bold;"&gt;H&lt;/span&gt; gate converts the first &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; into &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt;+&lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;, where I'm going to use '+' and '-' to mean "normalized vector sum" and "normalized vector difference", just to get rid of all the visual noise generated in the calculations by incessant divisions by √2. Since the second qubit remains at &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt;, the combined state after the &lt;span style="font-weight: bold;"&gt;H&lt;/span&gt; gate is &lt;span style="font-weight: bold;"&gt;00&lt;/span&gt;+&lt;span style="font-weight: bold;"&gt;10&lt;/span&gt;. Nothing strange about this so far; all it says is that a measurement on the first qubit will yield either &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; or &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;, each with 50% probability, while a measurement on the second qubit will still yield &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt;, with 100% certainty.&lt;br /&gt;&lt;br /&gt;Next, the qubits arrive at the &lt;span style="font-weight: bold;"&gt;cNOT&lt;/span&gt; gate. This has no effect upon the first part &lt;span style="font-weight: bold;"&gt;00&lt;/span&gt; of the superposition, since there the control (first) qubit is &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt;. However the second part, &lt;span style="font-weight: bold;"&gt;10&lt;/span&gt;, has a &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt; in the control bit position, causing the &lt;span style="font-weight: bold;"&gt;cNOT&lt;/span&gt; gate to invert the second qubit. The combined state at the output of the &lt;span style="font-weight: bold;"&gt;cNOT&lt;/span&gt; gate is therefore &lt;span style="font-weight: bold;"&gt;00&lt;/span&gt;+&lt;span style="font-weight: bold;"&gt;11&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;This is termed a &lt;a href="http://en.wikipedia.org/wiki/Bell_state"&gt;&lt;span style="font-style: italic;"&gt;Bell State&lt;/span&gt;&lt;/a&gt;, and it's actually a fairly remarkable state when you think about it. It says that the qubit pair is in a perfectly balanced superposition of the &lt;span style="font-weight: bold;"&gt;00&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;11&lt;/span&gt; states. Expressed as a sequence of renormalized amplitudes, it is&lt;br /&gt;&lt;blockquote&gt;(a, b, c, d) = (1/√2, 0, 0, 1/√2)&lt;/blockquote&gt;Since |a|² = |d|² = ½, while |b|² = |c|² = 0, this says that a measurement is equally likely (50%) to yield &lt;span style="font-weight: bold;"&gt;00&lt;/span&gt; or &lt;span style="font-weight: bold;"&gt;11&lt;/span&gt;, and to do so absolutely randomly; but it can never yield &lt;span style="font-weight: bold;"&gt;01&lt;/span&gt; or &lt;span style="font-weight: bold;"&gt;10&lt;/span&gt;. Now if you measure just one of the qubits, whatever result you obtain, &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; or &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;, you'll get exactly the same outcome when you measure the second qubit. Even if it's hours or years later, miles or light years away.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Encoding and Decoding&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Remember that both Hadamard gates and inverters are their own inverses. If we were to make a mirror image of the above diagram and then join the two together, our final output state would be the same as the originally prepared &lt;span style="font-weight: bold;"&gt;00&lt;/span&gt;, with probability 100%. This mirror image decoder is shown below, if we temporarily ignore the "&lt;span style="font-weight: bold;"&gt;?&lt;/span&gt;" gate (imagine it to be just a quantum wire, or an Identity gate &lt;span style="font-weight: bold;"&gt;I&lt;/span&gt;):&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-Qnl7q_MFqd0/Tq6K5e2uzRI/AAAAAAAABAs/WEdCCnf-OcE/s1600/1d.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 160px;" src="http://4.bp.blogspot.com/-Qnl7q_MFqd0/Tq6K5e2uzRI/AAAAAAAABAs/WEdCCnf-OcE/s400/1d.png" alt="" id="BLOGGER_PHOTO_ID_5669621701045832978" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Suppose Alice is in charge of the "&lt;span style="font-weight: bold;"&gt;?&lt;/span&gt;" box, and Bob is performing the final measurements. Alice wants to send 2 classical bits of data to Bob, but she's only allowed to operate upon the first of the two qubits (the top one in the diagram) to do it. What should she put in the "&lt;span style="font-weight: bold;"&gt;?&lt;/span&gt;" box?&lt;br /&gt;&lt;br /&gt;Well, if the bits she wants to send are &lt;span style="font-weight: bold;"&gt;00&lt;/span&gt;, then she need apply nothing but a simple quantum wire, since we've just seen that this will result in Bob's measurements yielding the result &lt;span style="font-weight: bold;"&gt;00&lt;/span&gt; with 100% certainty. In the more general case, she needs to examine both of the classical bits that she wants to send. If the first is &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;, then she should add our new friend the &lt;span style="font-weight: bold;"&gt;Z&lt;/span&gt; gate in place of the "&lt;span style="font-weight: bold;"&gt;?&lt;/span&gt;". If the second is &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;, she adds an &lt;span style="font-weight: bold;"&gt;X&lt;/span&gt;. Note that if both bits are &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;, she will now have added both a &lt;span style="font-weight: bold;"&gt;Z&lt;/span&gt; and a following &lt;span style="font-weight: bold;"&gt;X&lt;/span&gt;.&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-weight: bold;"&gt;00&lt;/span&gt; → &lt;span style="font-weight: bold;"&gt;I&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;01&lt;/span&gt; → &lt;span style="font-weight: bold;"&gt;Z&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;10&lt;/span&gt; → &lt;span style="font-weight: bold;"&gt;X&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;11&lt;/span&gt; → &lt;span style="font-weight: bold;"&gt;Z&lt;/span&gt; followed by &lt;span style="font-weight: bold;"&gt;X&lt;/span&gt;&lt;/blockquote&gt;And that's all there is to the &lt;span style="font-style: italic;"&gt;Superdense Coding Protocol&lt;/span&gt;. With those arrangements in place, Bob's measurements will always yield, with 100% certainty, the particular combined state &lt;span style="font-weight: bold;"&gt;00&lt;/span&gt;, &lt;span style="font-weight: bold;"&gt;01&lt;/span&gt;, &lt;span style="font-weight: bold;"&gt;10&lt;/span&gt;, or &lt;span style="font-weight: bold;"&gt;11&lt;/span&gt; that Alice wanted to send him.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;I Don't Believe You&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;No, you'd be mad to, unless you're already a QC expert! We'll go through the four cases individually in detail. Remember, the starting point for Alice is in each case the Bell State &lt;span style="font-weight: bold;"&gt;00&lt;/span&gt;+&lt;span style="font-weight: bold;"&gt;11&lt;/span&gt;. It will also be useful to remember the reversibility of the &lt;span style="font-weight: bold;"&gt;H&lt;/span&gt; gate. Just as it converts basis states &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt; respectively into their sum &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt;+&lt;span style="font-weight: bold;"&gt;1&lt;/span&gt; and difference &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt;-&lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;, so when presented with a sum &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt;+&lt;span style="font-weight: bold;"&gt;1&lt;/span&gt; at its input, does it output &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt;; and with a difference &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt;-&lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;, output &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Case 00:&lt;/span&gt; We already established, using an argument based on considerations of symmetry, the correct operation of the circuit for this first case. Still, it's worth running through the detailed sequence of decoding steps, since these are the same for all subsequent cases. So: Alice does nothing to the &lt;span style="font-weight: bold;"&gt;00&lt;/span&gt;+&lt;span style="font-weight: bold;"&gt;11&lt;/span&gt; state, which is then passed immediately into the second &lt;span style="font-weight: bold;"&gt;cNOT&lt;/span&gt; gate. This has no effect on the &lt;span style="font-weight: bold;"&gt;00&lt;/span&gt; portion of its input, but changes the &lt;span style="font-weight: bold;"&gt;11&lt;/span&gt; part (because the first, control bit is &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;) into &lt;span style="font-weight: bold;"&gt;10&lt;/span&gt;. The &lt;span style="font-weight: bold;"&gt;cNOT&lt;/span&gt; output is therefore &lt;span style="font-weight: bold;"&gt;00&lt;/span&gt;+&lt;span style="font-weight: bold;"&gt;10&lt;/span&gt;. The first of these qubits, &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt;+&lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;, is fed to the second Hadamard, which as mentioned above, converts it to &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt;. Therefore, the final 2-qubit output is &lt;span style="font-weight: bold;"&gt;00&lt;/span&gt;, with probability 100%.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Case 01:&lt;/span&gt; Alice inserts an &lt;span style="font-weight: bold;"&gt;X&lt;/span&gt; gate in the path of the first qubit, converting the initial &lt;span style="font-weight: bold;"&gt;00&lt;/span&gt;+&lt;span style="font-weight: bold;"&gt;11&lt;/span&gt; to &lt;span style="font-weight: bold;"&gt;10&lt;/span&gt;+&lt;span style="font-weight: bold;"&gt;01&lt;/span&gt;. The &lt;span style="font-weight: bold;"&gt;cNOT&lt;/span&gt; changes this to &lt;span style="font-weight: bold;"&gt;11&lt;/span&gt;+&lt;span style="font-weight: bold;"&gt;01&lt;/span&gt;, feeding the first qubit &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;+&lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; into &lt;span style="font-weight: bold;"&gt;H&lt;/span&gt;, which outputs &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt;. Therefore, the final 2-qubit output is &lt;span style="font-weight: bold;"&gt;01&lt;/span&gt;, with probability 100%.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Case 10:&lt;/span&gt; Alice inserts a &lt;span style="font-weight: bold;"&gt;Z&lt;/span&gt; gate in the path of the first qubit, converting the initial &lt;span style="font-weight: bold;"&gt;00&lt;/span&gt;+&lt;span style="font-weight: bold;"&gt;11&lt;/span&gt; to &lt;span style="font-weight: bold;"&gt;00&lt;/span&gt;-&lt;span style="font-weight: bold;"&gt;11&lt;/span&gt;. The &lt;span style="font-weight: bold;"&gt;cNOT&lt;/span&gt; changes this to &lt;span style="font-weight: bold;"&gt;00&lt;/span&gt;-&lt;span style="font-weight: bold;"&gt;10&lt;/span&gt;, feeding the first qubit &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt;-&lt;span style="font-weight: bold;"&gt;1&lt;/span&gt; into &lt;span style="font-weight: bold;"&gt;H&lt;/span&gt;, which outputs &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;. Therefore, the final 2-qubit output is &lt;span style="font-weight: bold;"&gt;10&lt;/span&gt;, with probability 100%.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Case 11:&lt;/span&gt; Alice inserts both a &lt;span style="font-weight: bold;"&gt;Z&lt;/span&gt; and a following &lt;span style="font-weight: bold;"&gt;X&lt;/span&gt; into the path of the first qubit, converting the initial &lt;span style="font-weight: bold;"&gt;00&lt;/span&gt;+&lt;span style="font-weight: bold;"&gt;11&lt;/span&gt; first to &lt;span style="font-weight: bold;"&gt;00&lt;/span&gt;-&lt;span style="font-weight: bold;"&gt;11&lt;/span&gt; as in the previous case, then to &lt;span style="font-weight: bold;"&gt;10&lt;/span&gt;-&lt;span style="font-weight: bold;"&gt;01&lt;/span&gt;. The &lt;span style="font-weight: bold;"&gt;cNOT&lt;/span&gt; changes this to &lt;span style="font-weight: bold;"&gt;11&lt;/span&gt;-&lt;span style="font-weight: bold;"&gt;01&lt;/span&gt;, feeding the first qubit &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;-&lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; into &lt;span style="font-weight: bold;"&gt;H&lt;/span&gt;, which outputs &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;. Therefore, the final 2-qubit output is &lt;span style="font-weight: bold;"&gt;11&lt;/span&gt;, with probability 100%.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;Quantum Erat Demonstrandum!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The second most surprising thing about Superdense Coding - other than the fact that in reality, it works exactly as advertised! - is the time it took to get itself discovered. The whole subject of &lt;a href="http://en.wikipedia.org/wiki/Quantum_mechanics"&gt;Quantum Mechanics&lt;/a&gt; was kicked off by &lt;a href="http://en.wikipedia.org/wiki/Werner_Heisenberg"&gt;Werner Heisenberg&lt;/a&gt; in 1925, with &lt;a href="http://en.wikipedia.org/wiki/Quantum_computer"&gt;Quantum Computing&lt;/a&gt; eventually appearing with &lt;a href="http://en.wikipedia.org/wiki/Richard_Feynman"&gt;Richard Feynman&lt;/a&gt; in 1982; yet it was a further ten years after &lt;span style="font-style: italic;"&gt;that&lt;/span&gt; before the definitive &lt;a href="http://prl.aps.org/abstract/PRL/v69/i20/p2881_1"&gt;Bennett &amp;amp; Wiesner paper&lt;/a&gt; appeared, noting that certain "EPR" (Einstein-Podolsky-Rosen) states &lt;span style="font-style: italic;"&gt;"allow two bits to be encoded reliably in one spin-½ particle..."&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Interactive Demo&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The &lt;a href="http://demonstrations.wolfram.com/index.html"&gt;Wolfram Demonstrations Project&lt;/a&gt; contains a great interactive demo of the &lt;a href="http://demonstrations.wolfram.com/SuperdenseCoding/"&gt;Superdense Coding&lt;/a&gt; protocol, one of several contributed by &lt;a href="http://demonstrations.wolfram.com/author.html?author=Brad+Rubin"&gt;Brad Rubin&lt;/a&gt;. This varies a little from the our example, specifically in the order of the &lt;span style="font-weight: bold;"&gt;X&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;Z&lt;/span&gt; gates during the &lt;span style="font-weight: bold;"&gt;11&lt;/span&gt; case, but the difference vanishes during final measurement. You interact with it by downloading the &lt;span style="font-style: italic;"&gt;Computable Document Format&lt;/span&gt; &lt;a href="http://demonstrations.wolfram.com/download-cdf-player.html"&gt;(CDF) Player&lt;/a&gt;, and optionally the Superdense Coding demo file itself, which looks like this:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://demonstrations.wolfram.com/SuperdenseCoding/"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 267px;" src="http://1.bp.blogspot.com/-6i4LZzOujNg/Tq_tOgklaMI/AAAAAAAABBQ/dcmHu0cx7Is/s400/Wolfram%2BSuperdense%2BCoding.png" alt="" id="BLOGGER_PHOTO_ID_5670011289400076482" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;As you can see, it displays all the intermediate states of the qubits during this quantum computation - and fully normalized, hence all the "1/√2"s.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Footnote&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In this series I've been avoiding discussion about the physical realisation of qubits, but the day after I posted this comment on digital simulator &lt;a href="http://logic.ly/"&gt;Logicly&lt;/a&gt;'s &lt;a href="https://www.facebook.com/logicly"&gt;Facebook&lt;/a&gt; page...&lt;br /&gt;&lt;blockquote style="font-style: italic;"&gt;Has anyone ever asked for a quantum circuit version? You seem to have all the component building and layout logic that would require. Qubit signals: rather than boolean, these would be pairs of complex numbers (or quadruples of floats), and there would be a "measurement" gate with a classical boolean 0 or 1 output. Now seems a good time to start training up on these!&lt;/blockquote&gt;... noted futurologist and SF author Charles Stross &lt;a href="http://www.antipope.org/charlie/blog-static/2011/11/i-may-be-being-unduly-optimist.html"&gt;predicted&lt;/a&gt; &lt;span style="font-style: italic;"&gt;room temperature quantum computing on integrated circuitry within 5 to 20 years&lt;/span&gt;, based on a fascinating &lt;a href="http://www.nature.com/nature/journal/v479/n7371/full/nature10562.html"&gt;discovery&lt;/a&gt; about silicon carbide. My guess is that many more suitable materials will be discovered quite soon, making available QC technologies that will have absolutely no trouble attracting capital investment at the left hand edge of that range.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Next time: &lt;a href="http://mycodehere.blogspot.com/2011/11/quantum-computing-5-quantum.html"&gt;Quantum Teleportation&lt;/a&gt;.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-7475150039230156279?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/7475150039230156279/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/11/quantum-computing-4-superdense-coding.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/7475150039230156279'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/7475150039230156279'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/11/quantum-computing-4-superdense-coding.html' title='Quantum Computing #4: Superdense Coding'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-WUhFGU6MfvE/Tq6A-vpRYvI/AAAAAAAABAI/8AA6e-16vWw/s72-c/1b.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-2894138238357321061</id><published>2011-11-05T21:00:00.004Z</published><updated>2011-11-05T22:33:39.006Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Technology'/><category scheme='http://www.blogger.com/atom/ns#' term='Books'/><category scheme='http://www.blogger.com/atom/ns#' term='Mathematics'/><category scheme='http://www.blogger.com/atom/ns#' term='Coding'/><category scheme='http://www.blogger.com/atom/ns#' term='Logic'/><title type='text'>My Work in Print: 1985</title><content type='html'>I've previously written about the very competitive crafting of optimum machine code programs for Personal Computer World magazine's 1980s &lt;span style="font-style: italic;"&gt;Sub Set&lt;/span&gt; series, &lt;a href="http://mycodehere.blogspot.com/2009/08/so-long-pcw-and-sub-set.html"&gt;here&lt;/a&gt; and &lt;a href="http://mycodehere.blogspot.com/2011/03/computer-museum-1.html"&gt;there&lt;/a&gt;. In 1985, the incumbent series editor David Barrow convinced Century Communications to publish two books of the best submissions. According to the descriptions on their publication history pages, these books were &lt;span style="font-style: italic;"&gt;"Edited and produced working directly from the author's word-processor by NWL Editorial Services, Rushley, High Ham, Somerset"&lt;/span&gt; - a huge novelty in the publishing world at the time. Book geeks: note the cool adjacent ISBNs!&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/-97c6dZDSsu0/TrU6Ij3CncI/AAAAAAAABCY/NNDJwHNm7QY/s1600/Z80.png"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 126px; height: 200px;" src="http://4.bp.blogspot.com/-97c6dZDSsu0/TrU6Ij3CncI/AAAAAAAABCY/NNDJwHNm7QY/s200/Z80.png" alt="" id="BLOGGER_PHOTO_ID_5671503224482471362" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;Best of PCW Assembler Routines for the Z80&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Although the first &lt;a href="http://en.wikipedia.org/wiki/IBM_Personal_Computer"&gt;IBM PC&lt;/a&gt; with its 8-bit Intel &lt;a href="http://en.wikipedia.org/wiki/Intel_8088"&gt;8088&lt;/a&gt; chip had already been available for about four years, still most business software was based on the &lt;a href="http://en.wikipedia.org/wiki/Cp/m"&gt;CP/M&lt;/a&gt; operating system, and the more powerful, backward compatible Zilog &lt;a href="http://en.wikipedia.org/wiki/Zilog_Z80"&gt;Z80&lt;/a&gt;. Joined to legion Sinclair hobbyists, these users constituted quite an army. Here is the index of my contributions to the Z80 edition:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;ECAL&lt;/span&gt; - Calculate error correction byte; &lt;span style="font-style: italic;"&gt;pp. 70-71.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;EFIX&lt;/span&gt; - Validate data with error correction byte; &lt;span style="font-style: italic;"&gt;pp. 71-72.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;NEWPC&lt;/span&gt; - Anticipate PC contents after next instruction; &lt;span style="font-style: italic;"&gt;pp. 78-82.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;RDM32&lt;/span&gt; - 32-bit pseudo-random number generator;&lt;span style="font-style: italic;"&gt; pp. 147-149.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;SQR31&lt;/span&gt; - Square root of 32-bit signed (positive) value; &lt;span style="font-style: italic;"&gt;pp. 169-170.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;SQR32&lt;/span&gt; - Square root of 32-bit unsigned (absolute) value; &lt;span style="font-style: italic;"&gt;pp. 169-170.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;CURT16&lt;/span&gt; - Cube Root of a 16-bit unsigned integer value; &lt;span style="font-style: italic;"&gt;pp. 170-174.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;CURT32&lt;/span&gt; - Cube Root of a 32-bit unsigned integer value; &lt;span style="font-style: italic;"&gt;pp. 174-176.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;SDIV4&lt;/span&gt; - 4-byte signed integer division; &lt;span style="font-style: italic;"&gt;pp. 183-185.&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Barrow, David (editor)&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Best of Personal Computer World Assembler Routines for the Z-80&lt;/span&gt;&lt;br /&gt;Century Communications Ltd&lt;br /&gt;1985&lt;br /&gt;ISBN 0 7126 0506 1&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/-A7U46xW2wAk/TrU6YCPrFgI/AAAAAAAABCk/oFlapVcBD30/s1600/6502.png"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 126px; height: 200px;" src="http://3.bp.blogspot.com/-A7U46xW2wAk/TrU6YCPrFgI/AAAAAAAABCk/oFlapVcBD30/s200/6502.png" alt="" id="BLOGGER_PHOTO_ID_5671503490336888322" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;Best of PCW Assembler Routines for the 6502&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;While businessmen cycled their Z80s, many hobbyists with an aversion to dead-flesh rubber keyboards were devouring Commodore &lt;a href="http://en.wikipedia.org/wiki/Commodore_VIC-20"&gt;VIC-20&lt;/a&gt;s and &lt;a href="http://en.wikipedia.org/wiki/Commodore_64"&gt;64&lt;/a&gt;s, and Acorn's &lt;a href="http://en.wikipedia.org/wiki/BBC_Micro"&gt;BBC Micro&lt;/a&gt;. All of these used the MOS Technology &lt;a href="http://en.wikipedia.org/wiki/MOS_Technology_6502"&gt;6502&lt;/a&gt; processor. Here is the index of my contributions to the 6502 edition:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;RINXY &lt;/span&gt;- Register Indirect addressing mode emulator; &lt;span style="font-style: italic;"&gt;pp. 20-22.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;ECAL &lt;/span&gt;- Calculate error correction byte; &lt;span style="font-style: italic;"&gt;pp. 88-90.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;EFIX &lt;/span&gt;- Validate data with error correction byte; &lt;span style="font-style: italic;"&gt;pp. 90-91.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;SQR15 &lt;/span&gt;- Square root of 16-bit signed (positive) value; &lt;span style="font-style: italic;"&gt;pp. 125-127.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;SQR16 &lt;/span&gt;- Square root of 16-bit unsigned (absolute) value; &lt;span style="font-style: italic;"&gt;pp. 125-127.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;SQR31 &lt;/span&gt;- Square root of 32-bit signed (positive) value; &lt;span style="font-style: italic;"&gt;pp. 127-129.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;SQR32 &lt;/span&gt;- Square root of 32-bit unsigned (absolute) value; &lt;span style="font-style: italic;"&gt;pp. 127-129.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;CURT16 &lt;/span&gt;- Cube Root of a 16-bit unsigned integer value; &lt;span style="font-style: italic;"&gt;pp. 129-134.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;CURT32 &lt;/span&gt;- Cube Root of a 32-bit unsigned integer value; &lt;span style="font-style: italic;"&gt;pp. 134-137.&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Barrow, David (editor)&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Best of Personal Computer World Assembler Routines for the 6502&lt;/span&gt;&lt;br /&gt;Century Communications Ltd&lt;br /&gt;1985&lt;br /&gt;ISBN 0 7126 0507 X&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;A Disassembler in ~1KB&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Colleague C keeps reminding me that &lt;span style="font-style: italic;"&gt;The SUBSET editor David Barrow was able to trim only one byte from John Kerr's compact code&lt;/span&gt;. What the hell is he talking about? The quote comes from &lt;a href="http://www.wearmouth.demon.co.uk/jav/u3so.htm"&gt;this ZX Spectrum Utility&lt;/a&gt;, whose author explains: &lt;span style="font-style: italic;"&gt;The  stated aim was to write a Z80 disassembly routine in as short a space  as possible and, at just over 1K (1090 bytes), it is a rather incredible  program&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Unfortunately my &lt;span style="font-weight: bold;"&gt;DISZ80 &lt;/span&gt;routine was submitted too late - by about two years - for inclusion in the book, and I no longer have the magazine that it appeared in. At the risk of sounding a bit &lt;a href="http://en.wikipedia.org/wiki/J._R._Hartley"&gt;JR Hartley&lt;/a&gt;, if anyone out there has that 1987 issue, it would be good to be able to restore the line comments to the utility. I work in self-documenting, high level languages now, eschewing comments almost universally. But part of the strict &lt;span style="font-style: italic;"&gt;Sub Set&lt;/span&gt; documentation standard insisted that &lt;span style="font-style: italic;"&gt;every single machine code instruction&lt;/span&gt; got fully commented. Oh, and it would also be nice to see exactly where Dave Barrow's one-byte optimization appeared!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Cube Root Algorithm&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I derived the method of cube root extraction used in both books, by applying a kind of induction by analogy to the existing square root algorithm. Dave thought my description of the process sufficiently interesting to publish it. Click for readability:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/-FRs7KLgkolM/TrWt2knToJI/AAAAAAAABCw/86GqBAqFwv8/s1600/cuberoot2.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 308px;" src="http://1.bp.blogspot.com/-FRs7KLgkolM/TrWt2knToJI/AAAAAAAABCw/86GqBAqFwv8/s400/cuberoot2.png" alt="" id="BLOGGER_PHOTO_ID_5671630458796089490" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-2894138238357321061?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/2894138238357321061/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/10/my-work-in-print-1985.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/2894138238357321061'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/2894138238357321061'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/10/my-work-in-print-1985.html' title='My Work in Print: 1985'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-97c6dZDSsu0/TrU6Ij3CncI/AAAAAAAABCY/NNDJwHNm7QY/s72-c/Z80.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-5702523468502849830</id><published>2011-11-04T18:51:00.027Z</published><updated>2011-11-25T01:21:51.822Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Science'/><category scheme='http://www.blogger.com/atom/ns#' term='Education'/><title type='text'>I Hate Susan Adele Greenfield</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" style="font-weight: bold;" href="http://2.bp.blogspot.com/-1IEb4NfwRRQ/TrQ1U8GYEHI/AAAAAAAABBo/dzRqZB7MCjA/s1600/320px-Susan_greenfield.jpg"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 200px; height: 150px;" src="http://2.bp.blogspot.com/-1IEb4NfwRRQ/TrQ1U8GYEHI/AAAAAAAABBo/dzRqZB7MCjA/s200/320px-Susan_greenfield.jpg" alt="" id="BLOGGER_PHOTO_ID_5671216464612823154" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;With A Vengeance&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I think I've despised her since puberty. Mine, not hers. Which was of course some decades ago, and it certainly feels so long, and the hatred so matured, since first I saw her interviewed on some godforsakenly neurological or psychological subject or another. In an age of great expositors, of scientific enlightenment and the engagement of the public, of TV with James Burke, Jacob Bronowski, Carl Sagan, Patrick Moore, Nigel Calder... it seemed perfectly clear to me, from my viewpoint of almost complete ignorance of the subject, that she was winging it. Faking it. Had absolutely no clue what she was talking about. Was doing nothing more than trot off her own personal preconceptions and prejudices, representing these as scientific fact. Cod philosophy claptrap about consciousness and identity.&lt;br /&gt;&lt;br /&gt;Now I am delighted to discover that all this time, almost everyone else with an opinion about her has been quietly in agreement with mine. Quietly, because she seems also to be one ferociously litigious bitch.&lt;br /&gt;&lt;br /&gt;Recently sacked - sorry, wishful thinking there - recently made redundant (January 2010) from her job as Director of the Royal Institution, for having driven that esteemed charity into a £3M debt crisis and near bankruptcy with her ineffective £22M renovation of its still unpopular Albemarle Street wine bar, her response was to sue the world's oldest independent research body for supposed &lt;span style="font-style: italic;"&gt;"sex discrimination"&lt;/span&gt;. And win an out-of-court settlement, what's worse. At least the lawyers had the decency to prevent her blabbing about it, otherwise she might have continued badmouthing the Institution's venerated custodians to this day, milking it for publicity - she has just written her first novel, you see. Appropriately enough, given her press profile (see below), it's a &lt;span style="font-style: italic;"&gt;work of fiction about the effects of technology on the mind&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;In fact, the abolition of the post of Director was the only legal means anyone could find of getting rid of her. So if you grew up as I did, watching faithfully each year's Royal Institution Christmas Lectures, and if you wondered why at the turn of the millennium they took a swerve from their rightful home on BBC Two, wandering aimlessly and destitute through Channel 4, Channel Five, More4 and BBC Four, begging for commercial scraps while their resources and their scale, if not their scope, dwindled; well, now you know precisely whose catastrophic mismanagement was to blame for their woes.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Retractable Roof and Patio&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Greenfield sold off the institution's entire £15m Mayfair property portfolio to raise funds. At the same time as the wine bar fiasco, a flat she used was refurbished with a retractable roof and patio. She got her arse kicked out of that: &lt;span style="font-style: italic;"&gt;"The flat only came with the post,"&lt;/span&gt; said an RI representative, &lt;span style="font-style: italic;"&gt;"[and] she is no longer in the post, so it would be inappropriate if she used it."&lt;/span&gt; To her credit perhaps, she did not even try to defend herself at the time, saying only &lt;span style="font-style: italic;"&gt;"Redundancy is supposed to be about the post, not the person. So my personal performance should not be relevant."&lt;/span&gt; A resolution proposed by her supporters that would have led to the replacement of the RI's council, paving the way for her return as director, was defeated by an overwhelming margin. On BBC Radio 4's &lt;span style="font-style: italic;"&gt;Today&lt;/span&gt; programme she squirmed: &lt;span style="font-style: italic;"&gt;"I was charge of the organisation and I was the person who had the vision. The financial decisions were collective."&lt;/span&gt; Last August she &lt;a href="http://www.thisislondon.co.uk/lifestyle/article-23864977-susan-greenfield-i-laugh-in-the-face-of-bullies.do"&gt;told&lt;/a&gt; the London Evening Standard's Sophie Goodchild, her epitaph would be &lt;span style="font-style: italic;"&gt;“She knew herself, and had a laugh.”&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/-rs0cov_ALKM/TrRQVvnsTuI/AAAAAAAABCM/IxOguTHSKgU/s1600/320px-Faraday_Michael_Christmas_lecture_detail.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 200px; height: 131px;" src="http://1.bp.blogspot.com/-rs0cov_ALKM/TrRQVvnsTuI/AAAAAAAABCM/IxOguTHSKgU/s200/320px-Faraday_Michael_Christmas_lecture_detail.jpg" alt="" id="BLOGGER_PHOTO_ID_5671246165256720098" border="0" /&gt;&lt;/a&gt;Yet for me, the worst slight of all is that &lt;span style="font-style: italic;"&gt;the bogie herself&lt;/span&gt; presented the Institution's 1994 lectures. This was in my view an unspeakable act of scientific and cultural vandalism, to daub her all-cursed name on so pristine a list stretching back to Michael Faraday (pictured), their 1825 initiator. A list containing too my contemporary heroes of science and technology: Desmond Morris, Bernard Lovell, Eric Laithwaite, Richard L Gregory, George Porter, John Napier, David Attenborough, Heinz Wolff, Carl Sagan, Lewis Wolpert, Richard Dawkins and Ian Stewart, to name only some of the presenters I've personally enjoyed over the years.&lt;br /&gt;&lt;br /&gt;The Greenfield and her demented slobbering have naturally had a well documented exposure in the gullible press. She has been responsible for a rash of scare stories spouting baseless drivel about the dangers of the Internet and video games, like the Daily Mail's &lt;a style="font-style: italic;" href="http://www.dailymail.co.uk/news/article-1153583/Social-websites-harm-childrens-brains-Chilling-warning-parents-neuroscientist.html"&gt;Social websites harm children's brains: chilling warning to parents from top neuroscientist&lt;/a&gt; or &lt;a href="http://www.dailymail.co.uk/health/article-2049040/Computer-games-leave-children-dementia-warns-neurologist.html"&gt;&lt;span style="font-style: italic;"&gt;Computer games leave children with 'dementia' warns top neurologist&lt;/span&gt;&lt;/a&gt;, or the Telegraph's &lt;a href="http://www.telegraph.co.uk/technology/internet/8002921/Baroness-Susan-Greenfield-society-should-wake-up-to-harmful-effects-of-internet.html"&gt;&lt;span style="font-style: italic;"&gt;Baroness Susan Greenfield: society should wake up to harmful effects of internet&lt;/span&gt;&lt;/a&gt; or &lt;a style="font-style: italic;" href="http://www.telegraph.co.uk/technology/news/5316735/Computers-could-be-fuelling-obesity-crisis-says-Baroness-Susan-Greenfield.html"&gt;Computers could be fuelling obesity crisis, says Baroness Susan Greenfield&lt;/a&gt;. Serious claims, backed up by absolutely no published research.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Hypocrisy and Fraud&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Why then does she &lt;a href="http://www.telegraph.co.uk/news/uknews/1562433/Top-neuroscientist-backs-computer-brain-game.html"&gt;promote&lt;/a&gt; these "harmful" games for her own personal financial gain? That reeks not merely of a Carol Vorderman-like level of &lt;span style="font-style: italic;"&gt;hypocrisy&lt;/span&gt;, but of &lt;span style="font-style: italic;"&gt;fraud&lt;/span&gt;. For example, out of three studies that she claims prove the £88 game &lt;span style="font-style: italic;"&gt;MindFit&lt;/span&gt; improves mental abilities, two had "basic design flaws" (no control group, the most fundamental scientific defect of all), while the third failed to show the game was any more effective a mental stimulation than playing Tetris. Maybe she's not actually a scientist at all. Writing in &lt;a href="http://www.guardian.co.uk/science/blog/2010/jan/11/susan-greenfield-sacking-royal-institution"&gt;The Guardian&lt;/a&gt;, Doctor Ben Goldacre has wondered why she has never formally written up and published her claims of imagined technological harm, with evidence to back them, rather than continuing to use the media as a platform for her pet hypotheses on technology's evils:&lt;br /&gt;&lt;blockquote&gt;Baroness Greenfield has a theory that computers – which are extremely widespread – pose a serious environmental hazard to children. She therefore has a clear duty to her peers, and more importantly to the public, to present this theory clearly and formally in an academic journal, with the evidence, so that her scientific peers can assess the threat.&lt;/blockquote&gt;Greenfield's response was to liken Goldacre to certain epidemiologists who denied that smoking causes cancer. &lt;span style="font-style: italic;"&gt;"That seems to me to be simply offensive, and unhelpful"&lt;/span&gt;, he comments. Sounds to me more like the raving of some mad third world dictator, than the output you'd expect from our most eminent female scientist. But I think Ben, who has had her in his telescopic sights for some time, dealt her a killer blow today, when on his primary blog Bad Science he asked again, this time getting both &lt;span style="font-style: italic;"&gt;slashdotted&lt;/span&gt; and echoed on &lt;a href="http://boingboing.net/2011/11/03/prof-who-keeps-announcing-the-internet-to-childhood-dementia-and-autism-should-publish-theories-in-a-scientific-journal.html"&gt;Boing Boing&lt;/a&gt;:&lt;br /&gt;&lt;blockquote&gt;Why, in over 5 years of appearing in the media raising these grave worries, has Professor Greenfield of Oxford University never simply published the claims in an academic paper?&lt;/blockquote&gt;Which reminds me, &lt;a href="http://www.youtube.com/watch?v=XztJ-8QXt-4"&gt;Ben's on QI tonight&lt;/a&gt;, so I'll have to curtail my torrential diatribe at this point. Baroness Greenfield: in my humble opinion, you are a disgrace to your profession, to science, to neuroscience and pharmacology, to writing, and to broadcasting; an embarrassment to the peerage; an ugly carbuncle upon the arse of the British Empire; and a poisonous force for evil, ignorance, and prejudice in our world. Either STFU, or DIAF.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;font-size:85%;" &gt;Pictures of &lt;a href="http://en.wikipedia.org/wiki/File:Susan_greenfield.jpg"&gt;Greenfield&lt;/a&gt;&lt;/span&gt;&lt;span style="font-style: italic;font-size:85%;" &gt; and &lt;a href="http://en.wikipedia.org/wiki/File:Faraday_Michael_Christmas_lecture_detail.jpg"&gt;Faraday&lt;/a&gt; courtesy of Wikipedia.&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-5702523468502849830?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/5702523468502849830/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/11/i-hate-susan-adele-greenfield.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/5702523468502849830'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/5702523468502849830'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/11/i-hate-susan-adele-greenfield.html' title='I Hate Susan Adele Greenfield'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-1IEb4NfwRRQ/TrQ1U8GYEHI/AAAAAAAABBo/dzRqZB7MCjA/s72-c/320px-Susan_greenfield.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-4446804810658642080</id><published>2011-11-01T09:00:00.006Z</published><updated>2011-11-05T09:51:53.159Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Functional'/><category scheme='http://www.blogger.com/atom/ns#' term='Language'/><category scheme='http://www.blogger.com/atom/ns#' term='Mathematics'/><category scheme='http://www.blogger.com/atom/ns#' term='Coding'/><title type='text'>Algebra of Functions, Part 4: Parsers</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.blogonauts.com/eats-the-world/the-lambda-calculus"&gt;&lt;img alt="" id="BLOGGER_PHOTO_ID_5477447734388134322" src="http://4.bp.blogspot.com/_rYWwujT7udg/TAPNsZP5EbI/AAAAAAAAAa8/-SdbN4HZ4Xg/s200/lambda-calculus.gif" style="cursor: pointer; float: right; height: 200px; margin: 0pt 0pt 10px 10px; width: 104px;" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;A Series of Tubes&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Note: this 2010 series of articles (part &lt;a href="http://mycodehere.blogspot.com/2010/04/algebra-of-functions-part-1.html"&gt;one&lt;/a&gt;, &lt;a href="http://mycodehere.blogspot.com/2010/04/algebra-of-functions-part-2.html"&gt;two&lt;/a&gt;, &lt;a href="http://mycodehere.blogspot.com/2010/05/algebra-of-functions-part-3.html"&gt;three&lt;/a&gt;, &lt;a href="http://mycodehere.blogspot.com/2010/06/algebra-of-functions-pause-for-breath.html"&gt;3½&lt;/a&gt;) was abandoned incomplete when overtaken by events at the Microsoft C# compiler factory. My utimate target, actually intended to be the article right after this one, was the Continuation Monad; but Eric Lippert got there before me with a surprise sprint (Continuation Passing Style Revisited, part &lt;a href="http://blogs.msdn.com/b/ericlippert/archive/2010/10/21/continuation-passing-style-revisited-part-one.aspx"&gt;one&lt;/a&gt;, &lt;a href="http://blogs.msdn.com/b/ericlippert/archive/2010/10/22/continuation-passing-style-revisited-part-two-handwaving-about-control-flow.aspx"&gt;two&lt;/a&gt;, &lt;a href="http://blogs.msdn.com/b/ericlippert/archive/2010/10/25/continuation-passing-style-revisited-part-three-musings-about-coroutines.aspx"&gt;three&lt;/a&gt;, &lt;a href="http://blogs.msdn.com/b/ericlippert/archive/2010/10/26/continuation-passing-style-revisited-part-four-turning-yourself-inside-out.aspx"&gt;four&lt;/a&gt;, &lt;a href="http://blogs.msdn.com/b/ericlippert/archive/2010/10/27/continuation-passing-style-revisited-part-five-cps-and-asynchrony.aspx"&gt;five&lt;/a&gt;) leading up to his &lt;/span&gt;&lt;span&gt;introduction to async/await&lt;/span&gt;&lt;span style="font-style: italic;"&gt; marathon (Asynchrony in C# 5, part &lt;a href="http://blogs.msdn.com/b/ericlippert/archive/2010/10/28/asynchrony-in-c-5-part-one.aspx"&gt;one&lt;/a&gt;, &lt;a href="http://blogs.msdn.com/b/ericlippert/archive/2010/10/29/asynchronous-programming-in-c-5-0-part-two-whence-await.aspx"&gt;two&lt;/a&gt;, &lt;a href="http://blogs.msdn.com/b/ericlippert/archive/2010/11/01/asynchrony-in-c-5-part-three-composition.aspx"&gt;three&lt;/a&gt;, &lt;a href="http://blogs.msdn.com/b/ericlippert/archive/2010/11/04/asynchrony-in-c-5-0-part-four-it-s-not-magic.aspx"&gt;four&lt;/a&gt;, &lt;a href="http://blogs.msdn.com/b/ericlippert/archive/2010/11/08/asynchrony-in-c-5-part-five-too-many-tasks.aspx"&gt;five&lt;/a&gt;, &lt;a href="http://blogs.msdn.com/b/ericlippert/archive/2010/11/11/whither-async.aspx"&gt;six&lt;/a&gt;, &lt;a href="http://blogs.msdn.com/b/ericlippert/archive/2010/11/19/asynchrony-in-c-5-part-seven-exceptions.aspx"&gt;seven&lt;/a&gt;, &lt;a href="http://blogs.msdn.com/b/ericlippert/archive/2010/11/23/asynchrony-in-c-5-part-eight-more-exceptions.aspx"&gt;eight&lt;/a&gt;). The only reason to publish this short excerpt now is to have a convenient index into the work of Brian McNamara and Luke Hoban, as linked at the end.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Today we take a look at another popular exhibit from the monad menagerie: the &lt;span style="font-style: italic;"&gt;Parse&lt;/span&gt; monad.&lt;br /&gt;&lt;br /&gt;Parsing is such a popular example of the application of monads, because it so neatly fits the characteristic template of a data processing pipeline with side effects. When parsing a string into any given language, each successive step&lt;br /&gt;&lt;ol&gt;&lt;li&gt;consumes part of the input string, and then&lt;/li&gt;&lt;li&gt;passes the remainder on to the next step in the sequence.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;That constitutes the main process. But as a side effect, the just-parsed value is also made available in some way. This might be a keyword of the language, the name of a variable, or perhaps a binary value representing a data value of some particular type; but it could equally well be discardable whitespace, or &lt;span style="font-style: italic;"&gt;any&lt;/span&gt; character, etc.&lt;br /&gt;&lt;br /&gt;In terms of our monad then, the &lt;span style="font-style: italic;"&gt;unamplified type&lt;/span&gt; is the input type string. The &lt;span style="font-style: italic;"&gt;amplified type&lt;/span&gt;, which must be capable of holding all of the output from an operation of parsing, needs to store both a string, representing the remainder of the unconsumed input, and another, parsed value, of some arbitrary type.&lt;br /&gt;&lt;br /&gt;Language geeks love all monads and parser combinators in equal measure, and there is a wealth of information about all this stuff on the web. As for C#, one of the best and most detailed I've seen is Brian McNamara's December 2007 series, "Monadic Parser Combinators", which gets as far as Part Eight before surrendering to F#:&lt;br /&gt;&lt;br /&gt;Part: &lt;a href="http://lorgonblog.spaces.live.com/blog/cns%21701679AD17B6D310%21123.entry"&gt;One&lt;/a&gt;, &lt;a href="http://lorgonblog.spaces.live.com/blog/cns%21701679AD17B6D310%21124.entry"&gt;Two&lt;/a&gt;, &lt;a href="http://lorgonblog.spaces.live.com/blog/cns%21701679AD17B6D310%21132.entry"&gt;Three&lt;/a&gt;, &lt;a href="http://lorgonblog.spaces.live.com/blog/cns%21701679AD17B6D310%21133.entry"&gt;Four&lt;/a&gt;, &lt;a href="http://lorgonblog.spaces.live.com/blog/cns%21701679AD17B6D310%21136.entry"&gt;Five&lt;/a&gt;, &lt;a href="http://lorgonblog.spaces.live.com/blog/cns%21701679AD17B6D310%21137.entry"&gt;Six&lt;/a&gt;, &lt;a href="http://lorgonblog.spaces.live.com/blog/cns%21701679AD17B6D310%21152.entry"&gt;Seven&lt;/a&gt;, &lt;a href="http://lorgonblog.spaces.live.com/blog/cns%21701679AD17B6D310%211772.entry"&gt;Eight&lt;/a&gt;.&lt;br /&gt;Source: &lt;a href="http://lorgonblog.spaces.live.com/blog/cns%21701679AD17B6D310%21134.entry"&gt;Part 4,&lt;/a&gt; &lt;a href="http://lorgonblog.spaces.live.com/blog/cns%21701679AD17B6D310%21148.entry"&gt;Part 5/6&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Very succinct and readable is Luke Hoban's contribution, also from 2007:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://blogs.msdn.com/b/lukeh/archive/2007/08/19/monadic-parser-combinators-using-c-3-0.aspx"&gt;Monadic Parser Combinators using C# 3.0&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-4446804810658642080?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/4446804810658642080/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/11/algebra-of-functions-part-4-parsers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/4446804810658642080'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/4446804810658642080'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/11/algebra-of-functions-part-4-parsers.html' title='Algebra of Functions, Part 4: Parsers'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_rYWwujT7udg/TAPNsZP5EbI/AAAAAAAAAa8/-SdbN4HZ4Xg/s72-c/lambda-calculus.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-7512463595077964500</id><published>2011-10-30T08:00:00.025Z</published><updated>2011-11-30T09:07:44.274Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Quantum Computing'/><category scheme='http://www.blogger.com/atom/ns#' term='Physics'/><title type='text'>Quantum Computing #3: Measurement + Review</title><content type='html'>&lt;span style="font-style: italic;"&gt;Previously:&lt;br /&gt;&lt;/span&gt;&lt;a style="font-style: italic;" href="http://mycodehere.blogspot.com/2011/10/single-qubit-gates.html"&gt;&lt;/a&gt;&lt;blockquote&gt;&lt;a href="http://mycodehere.blogspot.com/2011/10/quantum-computing-for-determined.html"&gt;&lt;span style="font-style: italic;"&gt;Introduction&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a style="font-style: italic;" href="http://mycodehere.blogspot.com/2011/10/single-qubit-gates.html"&gt;Single Qubit Gates&lt;/a&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;a href="http://mycodehere.blogspot.com/2011/10/multiple-qubit-gates.html"&gt;Multiple Qubit Gates&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;Why &lt;span style="font-style: italic;"&gt;One?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When we looked at the state of a single qubit, &lt;span style="font-weight: bold;"&gt;ψ = &lt;/span&gt;α&lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; + β&lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;, we noted that this vector had to be of unit length, a stipulation encoded in the normalization condition |α|² + |β|² = 1. Similarly when we extended to a 2 qubit system, &lt;span style="font-weight: bold;"&gt;ψ = &lt;/span&gt;α&lt;span style="font-weight: bold;"&gt;00&lt;/span&gt; + β&lt;span style="font-weight: bold;"&gt;01&lt;/span&gt; + γ&lt;span style="font-weight: bold;"&gt;10&lt;/span&gt; + δ&lt;span style="font-weight: bold;"&gt;11&lt;/span&gt;, we maintained the analogous constraint |α|² + |β|² + |γ|² + |δ|² = 1. This was accomplished by only ever applying so-called &lt;span style="font-style: italic;"&gt;unitary&lt;/span&gt; (magnitude-preserving) matrix operations to the current state.&lt;br /&gt;&lt;br /&gt;The reason for this has to do with the method of &lt;span style="font-style: italic;"&gt;getting results out&lt;/span&gt; of a quantum computer, which is done by the process of &lt;span style="font-style: italic;"&gt;measurement&lt;/span&gt;. The outcome of a given measurement operation can be any one of the system's basis states. that is, it will be either &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; or &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt; for a single qubit system; &lt;span style="font-weight: bold;"&gt;00&lt;/span&gt;, &lt;span style="font-weight: bold;"&gt;01&lt;/span&gt;, &lt;span style="font-weight: bold;"&gt;10&lt;/span&gt; or &lt;span style="font-weight: bold;"&gt;11&lt;/span&gt; for a 2-qubit system; and so on. Which of the basis states actually gets detected depends upon various probabilities, and in fact these probabilities are just |α|², |β|², etc.&lt;br /&gt;&lt;br /&gt;So to clarify, when we perform an operation of &lt;span style="font-style: italic;"&gt;measurement in the computational basis&lt;/span&gt; on an n-qubit system, we are effectively forcing the state vector to settle into one of its 2ⁿ basis states. Taking the 2-qubit case as an example, the result of the measurement will be either&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-weight: bold;"&gt;00&lt;/span&gt; with probability |α|²,&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;01&lt;/span&gt; with probability |β|²,&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;10&lt;/span&gt; with probability |γ|², or&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;11&lt;/span&gt; with probability |δ|².&lt;/blockquote&gt;Since these are the only possible outcomes, it's easy to see why the sums of the squares of the coefficients α, β, γ and δ must be unity - after all, there's a 100% probability the outcome will be one of these states!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Destructive Read&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The measurement operation irrevocably destroys the previously existing superposition of states, leaving only the single basis state that is the &lt;span style="font-style: italic;"&gt;result&lt;/span&gt; of the measurement. This means that the original state can never be directly observed. All that we can ever know about it comes from the results of destructive read operations.&lt;br /&gt;&lt;br /&gt;For example, suppose we prepare a qubit in the &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; state, then immediately make a measurement. What will the outcome be? Well, the qubit state is &lt;span style="font-weight: bold;"&gt;ψ = 0 = &lt;/span&gt;α&lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; + β&lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;, where α = 1 and β = 0. Measurement will deliver either the state &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; with probability |α|² = 1 (100% certainty), or else the state &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt; with probability |β|² = 0 (0% impossibility). So far, so perfectly common sensible...&lt;br /&gt;&lt;br /&gt;Now, suppose we pass the qubit through a Hadamard gate before making the measurement. The diagram below shows this new process:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/-7B23uquEEbU/Tqa0FqCvORI/AAAAAAAAA_Q/Cd7tH3jcGG8/s1600/1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 233px; height: 63px;" src="http://2.bp.blogspot.com/-7B23uquEEbU/Tqa0FqCvORI/AAAAAAAAA_Q/Cd7tH3jcGG8/s400/1.png" alt="" id="BLOGGER_PHOTO_ID_5667415190370466066" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The output of the &lt;span style="font-weight: bold;"&gt;H&lt;/span&gt; gate prior to measurement is &lt;span style="font-weight: bold;"&gt;ψ = &lt;/span&gt;α&lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; + β&lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;, where α = β = 1/√2; so we have |α|² = |β|² = ½. In other words, the measurement is equally likely to deliver either &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; or &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;; the probability of each is 50%. But regardless of which outcome is observed, the state of the qubit &lt;span style="font-style: italic;"&gt;after&lt;/span&gt; the measurement is &lt;span style="font-style: italic;"&gt;just that observed basis state;&lt;/span&gt; the original superposition of equal quantities &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt; has been obliterated by the measurement operation.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Review&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;More than one reader still finds too much unfamiliar notation in my little introductory series, so here's a quick redux of the story so far, &lt;span style="font-style: italic;"&gt;without&lt;/span&gt; all the matrices and Greek letters...&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Qubits without Greek&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A single qubit can be represented as an ordered pair of numbers (a, b), where |a|² + |b|² = 1. In this scheme, the pair (1, 0) represents the classical logical &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt;, while (0, 1) represents classical &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;:&lt;br /&gt;&lt;blockquote&gt;(1, 0) = &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt;&lt;br /&gt;(0, 1) = &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;&lt;/blockquote&gt;Similarly, an &lt;span style="font-style: italic;"&gt;entangled pair&lt;/span&gt; of qubits can be represented as an ordered sequence (a, b, c, d), where |a|² + |b|² + |c|² + |d|² = 1, and the four particular values (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0) and (0, 0, 0, 1) stand respectively for the classical states &lt;span style="font-weight: bold;"&gt;00&lt;/span&gt;, &lt;span style="font-weight: bold;"&gt;01&lt;/span&gt;, &lt;span style="font-weight: bold;"&gt;10&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;11&lt;/span&gt;:&lt;br /&gt;&lt;blockquote&gt;(1, 0, 0, 0) = &lt;span style="font-weight: bold;"&gt;00&lt;/span&gt;&lt;br /&gt;(0, 1, 0, 0) = &lt;span style="font-weight: bold;"&gt;01&lt;/span&gt;&lt;br /&gt;(0, 0, 1, 0) = &lt;span style="font-weight: bold;"&gt;10&lt;/span&gt;&lt;br /&gt;(0, 0, 0, 1) = &lt;span style="font-weight: bold;"&gt;11&lt;/span&gt;&lt;/blockquote&gt;An &lt;span style="font-style: italic;"&gt;entangled triplet&lt;/span&gt; is represented as a sequence of eight amplitudes (a, b, c, d, e, f, g, h), where |a|² + |b|² + |c|² + |d|² + |e|² + |f|² + |g|² + |h|² = 1, and the following correspondence holds between basis and classical states:&lt;br /&gt;&lt;blockquote&gt;(1, 0, 0, 0, 0, 0, 0, 0) = &lt;span style="font-weight: bold;"&gt;000&lt;/span&gt;&lt;br /&gt;(0, 1, 0, 0, 0, 0, 0, 0) = &lt;span style="font-weight: bold;"&gt;001&lt;/span&gt;&lt;br /&gt;(0, 0, 1, 0, 0, 0, 0, 0) = &lt;span style="font-weight: bold;"&gt;010&lt;/span&gt;&lt;br /&gt;(0, 0, 0, 1, 0, 0, 0, 0) = &lt;span style="font-weight: bold;"&gt;011&lt;/span&gt;&lt;br /&gt;(0, 0, 0, 0, 1, 0, 0, 0) = &lt;span style="font-weight: bold;"&gt;100&lt;/span&gt;&lt;br /&gt;(0, 0, 0, 0, 0, 1, 0, 0) = &lt;span style="font-weight: bold;"&gt;101&lt;/span&gt;&lt;br /&gt;(0, 0, 0, 0, 0, 0, 1, 0) = &lt;span style="font-weight: bold;"&gt;110&lt;/span&gt;&lt;br /&gt;(0, 0, 0, 0, 0, 0, 0, 1) = &lt;span style="font-weight: bold;"&gt;111&lt;/span&gt;&lt;/blockquote&gt;When our quantum computers are big enough to contain &lt;span style="font-style: italic;"&gt;n&lt;/span&gt; entangled qubits, there will be &lt;span style="font-style: italic;"&gt;2ⁿ&lt;/span&gt; coefficients or "amplitudes" a, b, c, ..., and still the sum of all their squares will be 1.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Quantum Gates without Matrices&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Like classical logic gates, quantum gates are defined by the operation they perform upon their inputs. In the case of a single qubit gate, we could say the input state (a, b) results in the output (a', b'):&lt;br /&gt;&lt;blockquote&gt;(a, b) → (a', b'),&lt;/blockquote&gt;where of course |a'|² + |b'|² = 1. The single-qubit gates we looked at in part 1 were: firstly the quantum wire &lt;span style="font-weight: bold;"&gt;I&lt;/span&gt;, which transmits the input qubit unaltered:&lt;br /&gt;&lt;blockquote&gt;(a, b) → (a, b)&lt;/blockquote&gt;secondly the quantum inverter or NOT gate &lt;span style="font-weight: bold;"&gt;X&lt;/span&gt;, which swaps the two amplitudes of its single-qubit input, and so in particular, converts classical &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; to &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;vice-versa:&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;(a, b) → (b. a)&lt;br /&gt;&lt;br /&gt;(1, 0) → (0, 1) = &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; → &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;&lt;br /&gt;(0, 1) → (1, 0) = &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt; → &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt;&lt;/blockquote&gt;and lastly, for a bit of quantum exclusivity, the Hadamard gate &lt;span style="font-weight: bold;"&gt;H&lt;/span&gt;, which can combine pure basis states:&lt;br /&gt;&lt;blockquote&gt;(a, b) → ((a+b)/√2, (a-b)/√2)&lt;/blockquote&gt;You might find this last operation written without the √2 scale factors, particularly in multi-step quantum computations, when it is common to roll up such adjustments into a single normalization following the final step of the calculation:&lt;br /&gt;&lt;blockquote&gt;(a, b) → (a+b, a-b)&lt;/blockquote&gt;The only multiple-qubit gate we've seen so far is the controlled-NOT or &lt;span style="font-weight: bold;"&gt;cNOT&lt;/span&gt; gate, which swaps the last two amplitudes of its entangled input qubit pair:&lt;br /&gt;&lt;blockquote&gt;(a, b, c, d) → (a, b, &lt;u&gt;d, c&lt;/u&gt;)&lt;/blockquote&gt;By explicitly tracing through the details of the four transitions, we found that this twist corresponded to an inversion of the second qubit, &lt;span style="font-style: italic;"&gt;if and only if&lt;/span&gt; the first qubit was &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;:&lt;br /&gt;&lt;blockquote&gt;(1, 0, 0, 0) → (1, 0, 0, 0) = &lt;span style="font-weight: bold;"&gt;00&lt;/span&gt; → &lt;span style="font-weight: bold;"&gt;00&lt;/span&gt;;&lt;br /&gt;(0, 1, 0, 0) → (0, 1, 0, 0) = &lt;span style="font-weight: bold;"&gt;01&lt;/span&gt; → &lt;span style="font-weight: bold;"&gt;01&lt;/span&gt;;&lt;br /&gt;(0, 0, 1, 0) → (0, 0, &lt;u&gt;0, 1&lt;/u&gt;) = &lt;span style="font-weight: bold;"&gt;10&lt;/span&gt; → &lt;span style="font-weight: bold;"&gt;1&lt;u&gt;1&lt;/u&gt;&lt;/span&gt;;&lt;br /&gt;(0, 0, 0, 1) → (0, 0, &lt;u&gt;1, 0&lt;/u&gt;) = &lt;span style="font-weight: bold;"&gt;11&lt;/span&gt; → &lt;span style="font-weight: bold;"&gt;1&lt;u&gt;0&lt;/u&gt;&lt;/span&gt;.&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;Measurement&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Finally, in the first half of &lt;span style="font-style: italic;"&gt;this&lt;/span&gt; article, we have just covered the question of &lt;span style="font-style: italic;"&gt;getting results out&lt;/span&gt; of the qubit complex. When you perform a &lt;span style="font-style: italic;"&gt;measurement in the computational basis&lt;/span&gt;, the single qubit (a, b) will deliver a result of either (1, 0) = &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt;, with probability |a|², or else (0, 1) = &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;, with probability |b|². The qubit will also adopt that measured state, from the point of the measurement onwards; having collapsed into probabilities, there now remains no trace of the original state amplitudes (a, b).&lt;br /&gt;&lt;br /&gt;To take a numerical example, the (unknowable) initial state of the qubit might be (a, b) = (+0.8, -0.6). Now suppose a measurement is performed on this qubit. The outcome will be either &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt;, with a probability of |a|² = 0.8² = 64%, or else &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;, with a probability of |b|² = 0.6² = 36%. Notice that the two outcomes have probabilities adding up to 100%, and that between them, they exhaust all the possibilities.&lt;br /&gt;&lt;br /&gt;A similar measurement upon a &lt;span style="font-style: italic;"&gt;qubit pair&lt;/span&gt; in the state (a, b, c, d) will yield a result of (1, 0, 0, 0), i.e. &lt;span style="font-weight: bold;"&gt;00&lt;/span&gt;, with probability |a|²; alternatively, a result of (0, 1, 0, 0) = &lt;span style="font-weight: bold;"&gt;01&lt;/span&gt;, with probability |b|²; and so on.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Next time: &lt;a href="http://mycodehere.blogspot.com/2011/11/quantum-computing-4-superdense-coding.html"&gt;Superdense Coding&lt;/a&gt;.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-7512463595077964500?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/7512463595077964500/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/10/quantum-computing-3-measurement-review.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/7512463595077964500'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/7512463595077964500'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/10/quantum-computing-3-measurement-review.html' title='Quantum Computing #3: Measurement + Review'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-7B23uquEEbU/Tqa0FqCvORI/AAAAAAAAA_Q/Cd7tH3jcGG8/s72-c/1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-323641442771623599</id><published>2011-10-27T16:33:00.005+01:00</published><updated>2011-10-27T17:16:07.756+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><title type='text'>China Commands And Controls</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Over 90% of C&amp;amp;C Centres in Beijing&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Last March security firm RSA revealed one of the most spectacular &lt;a href="http://www.rsa.com/node.aspx?id=3872"&gt;data breaches&lt;/a&gt; in history. Not because of the methods used, which were a combo of a Trojan and some fairly elementary social engineering (though perhaps understandably, RSA felt it necessary to characterise the breach as &lt;span style="font-style: italic;"&gt;an extremely sophisticated cyber attack&lt;/span&gt;). Neither because of the quantity of data compromised in that one attack. But because of the sensitivity of the data, which compromised in turn the &lt;span style="font-style: italic;"&gt;SecurID two-factor authentication&lt;/span&gt; products, and hence the crown jewels, of many other corporations and organisations.&lt;br /&gt;&lt;br /&gt;Back then, security experts claimed that "dozens of other multinational companies" were simultaneously infiltrated in much the same way. In fact the truth now emerges to have been closer to 760 or more organizations, including almost 20% of &lt;span style="font-style: italic;"&gt;Fortune 100&lt;/span&gt; companies, who had their networks hit by the same resources as were used against RSA, in a series of attacks which actually began last November. Brian Krebs has the full list &lt;a href="http://krebsonsecurity.com/2011/10/who-else-was-hit-by-the-rsa-attackers/"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;But even more startling is the following chart, which shows the geographic distribution of the command and control networks used to coordinate these attacks:&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/-Wfpg5VhPKfk/Tql8xPDY9uI/AAAAAAAAA_w/pABkm4C3ltw/s1600/chinapie.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="http://4.bp.blogspot.com/-Wfpg5VhPKfk/Tql8xPDY9uI/AAAAAAAAA_w/pABkm4C3ltw/s400/chinapie.png" alt="" id="BLOGGER_PHOTO_ID_5668198791318664930" border="0" /&gt;&lt;/a&gt;&lt;span style="font-style: italic;"&gt;299 of the 329 Command &amp;amp; Control centres are in or around Beijing&lt;/span&gt;.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-323641442771623599?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/323641442771623599/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/10/china-commands-and-controls.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/323641442771623599'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/323641442771623599'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/10/china-commands-and-controls.html' title='China Commands And Controls'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-Wfpg5VhPKfk/Tql8xPDY9uI/AAAAAAAAA_w/pABkm4C3ltw/s72-c/chinapie.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-1245994377748402268</id><published>2011-10-27T13:18:00.005+01:00</published><updated>2011-10-27T16:15:05.141+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><title type='text'>Avira Attacks Self</title><content type='html'>&lt;a href="http://4.bp.blogspot.com/-cuisOUJDWkA/TqlWiSt7k2I/AAAAAAAAA_k/IY0naqHhsMY/s1600/Avira.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 105px; height: 130px;" src="http://4.bp.blogspot.com/-cuisOUJDWkA/TqlWiSt7k2I/AAAAAAAAA_k/IY0naqHhsMY/s200/Avira.png" alt="" id="BLOGGER_PHOTO_ID_5668156753162507106" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;It's like CA eTrust all over again&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Always a bit of a guilty laugh whenever this happens to some poor unsuspecting antivirus vendor. After Wednesday's signature update, Avira's freebie anti-virus offering started marking certain components of &lt;span style="font-style: italic;"&gt;its own code&lt;/span&gt; as "potentially malign".&lt;br /&gt;&lt;br /&gt;Stefan Berka of Avira Operations broke the news thusly on their own &lt;a href="http://forum.avira.com/wbb/index.php?page=Thread&amp;amp;threadID=137969"&gt;support forum&lt;/a&gt;: &lt;span style="font-style: italic;"&gt;Hello, We have had an false positive for the Avira file AESCRIPT.DLL which was detected as "TR/Spy.463227"&lt;/span&gt;. Their &lt;a href="http://www.avira.com/en/support-threats-statistics/tid/7142/tlang/en/period/monthly"&gt;statistics&lt;/a&gt; show around 4,000 false positive samples received on Oct 26, before the fixed Virus Definition File was deployed.&lt;br /&gt;&lt;br /&gt;False positives in application files or Windows components are actually quite common, particularly in free offerings like this one, but the last time such an "auto-immune" false detection is known to have occurred was over two years ago, when the CA eTrust antivirus &lt;a href="http://blog.dynamoo.com/2009/08/ca-etrust-goes-nuts-with-stdwin32-and.html"&gt;went completely mad&lt;/a&gt;, renaming and quarantining parts of itself, together with various bits of MS Visual Studio, Incredibuild, and others. Users at that time were advised to block the update, as well as to consider temporarily disabling on-access scanning. And that was only one month after its previous attack on them pesky Windows system files.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-1245994377748402268?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/1245994377748402268/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/10/avira-attacks-self.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/1245994377748402268'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/1245994377748402268'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/10/avira-attacks-self.html' title='Avira Attacks Self'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-cuisOUJDWkA/TqlWiSt7k2I/AAAAAAAAA_k/IY0naqHhsMY/s72-c/Avira.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-6582512806758398453</id><published>2011-10-23T22:50:00.011+01:00</published><updated>2011-11-30T09:08:22.103Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Quantum Computing'/><category scheme='http://www.blogger.com/atom/ns#' term='Physics'/><title type='text'>Quantum Computing #2: Multiple Qubit Gates</title><content type='html'>&lt;span style="font-style: italic;"&gt;Previously:&lt;br /&gt;&lt;/span&gt;&lt;a href="http://mycodehere.blogspot.com/2011/10/quantum-computing-for-determined.html"&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;/a&gt;&lt;blockquote&gt;&lt;a href="http://mycodehere.blogspot.com/2011/10/quantum-computing-for-determined.html"&gt;&lt;span style="font-style: italic;"&gt;Introduction&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;a style="font-style: italic;" href="http://mycodehere.blogspot.com/2011/10/single-qubit-gates.html"&gt;Single Qubit Gates&lt;/a&gt;&lt;span style="font-style: italic;"&gt;.&lt;/span&gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;Entanglement&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Last time we saw that a single qubit can be in either basis state, &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; or &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;, or any normalized superposition of the two:&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-weight: bold;"&gt;ψ = &lt;/span&gt;α&lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; + β&lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;, where |α|² + |β|² = 1.&lt;/div&gt;&lt;br /&gt;When we come to analyse systems of two or more qubits, it's important to realise that we &lt;span style="font-style: italic;"&gt;don't&lt;/span&gt; just replicate the above, once per additional qubit, as we would in classical logic. This is because qubit states can be &lt;span style="font-style: italic;"&gt;entangled&lt;/span&gt;. They have to be treated as a whole: as &lt;span style="font-style: italic;"&gt;the overall state of the qubit set&lt;/span&gt;. Therefore, to take the next simplest example, a two-qubit system can be in any of the four basis states, &lt;span style="font-weight: bold;"&gt;00&lt;/span&gt;, &lt;span style="font-weight: bold;"&gt;01&lt;/span&gt;, &lt;span style="font-weight: bold;"&gt;10&lt;/span&gt; or &lt;span style="font-weight: bold;"&gt;11&lt;/span&gt;, as well as any normalized superposition of these four:&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-weight: bold;"&gt;ψ = &lt;/span&gt;α&lt;span style="font-weight: bold;"&gt;00&lt;/span&gt; + β&lt;span style="font-weight: bold;"&gt;01&lt;/span&gt; + γ&lt;span style="font-weight: bold;"&gt;10&lt;/span&gt; + δ&lt;span style="font-weight: bold;"&gt;11&lt;/span&gt;, where |α|² + |β|² + |γ|² + |δ|² = 1.&lt;/div&gt;&lt;br /&gt;As before, we can introduce an arbitrary set of orthogonal column vectors to represent each of these four basis states,&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/-DUzcvmkwlDE/TqUa_3zYIHI/AAAAAAAAA98/loy6x8AA5hU/s1600/a1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 89px;" src="http://3.bp.blogspot.com/-DUzcvmkwlDE/TqUa_3zYIHI/AAAAAAAAA98/loy6x8AA5hU/s400/a1.png" alt="" id="BLOGGER_PHOTO_ID_5666965390729158770" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;which gives us this representation of the multi-qubit state as a column vector:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/-8dCRUFGhLos/TqUc9WBObgI/AAAAAAAAA-I/IpWF1sRXqqE/s1600/a1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 104px; height: 108px;" src="http://3.bp.blogspot.com/-8dCRUFGhLos/TqUc9WBObgI/AAAAAAAAA-I/IpWF1sRXqqE/s400/a1.png" alt="" id="BLOGGER_PHOTO_ID_5666967546323955202" border="0" /&gt;&lt;/a&gt;and in general, an n-qubit system will have 2ⁿ pairwise independent (orthogonal) states in its computational basis, and hence 2ⁿ components in its state column vector.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;The Controlled-NOT Gate&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Recall what single-qubit gates such as &lt;span style="font-weight: bold;"&gt;X&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;H&lt;/span&gt; looked like: 2x2 unitary matrices operating  on unit state column vectors. Similarly, n-qubit gates are represented  by unitary 2ⁿx2ⁿ matrices. Our next example is termed the &lt;span style="font-style: italic;"&gt;Controlled-NOT&lt;/span&gt; gate, or &lt;span style="font-weight: bold;"&gt;cNOT&lt;/span&gt; (feel free to invent your own pronunciation). This has two inputs and two outputs. The first input is passed through unchanged to the corresponding output. When this first input is &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt;, the second input is also passed through unchanged to its corresponding output. But when the first input is &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;, the second input gets inverted as through an &lt;span style="font-weight: bold;"&gt;X&lt;/span&gt; gate. Here is the matrix representation of &lt;span style="font-weight: bold;"&gt;cNOT&lt;/span&gt;, and its operation upon a general 2-qubit state column vector:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/-NBNYVUPczlk/TqUhIa9ZcLI/AAAAAAAAA-U/k18HkTWCsUk/s1600/a1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 348px; height: 226px;" src="http://2.bp.blogspot.com/-NBNYVUPczlk/TqUhIa9ZcLI/AAAAAAAAA-U/k18HkTWCsUk/s400/a1.png" alt="" id="BLOGGER_PHOTO_ID_5666972134675148978" border="0" /&gt;&lt;/a&gt;To see exactly how this matrix represents a &lt;span style="font-weight: bold;"&gt;cNOT&lt;/span&gt; operation on two qubits, we consider its effect upon each of the four basis states in turn:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/-jrvjV1A2Wz8/TqUi_7bJsII/AAAAAAAAA-g/uAqsKV-yeDg/s1600/a1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 364px; height: 400px;" src="http://4.bp.blogspot.com/-jrvjV1A2Wz8/TqUi_7bJsII/AAAAAAAAA-g/uAqsKV-yeDg/s400/a1.png" alt="" id="BLOGGER_PHOTO_ID_5666974187794313346" border="0" /&gt;&lt;/a&gt;By checking each of these four cases in turn, we can confirm that the gate operates as advertised in the description above. Finally for the sake of completeness, and courtesy of &lt;a style="font-style: italic;" href="http://en.wikipedia.org/wiki/File:CNOT_gate.svg"&gt;Wikipedia&lt;/a&gt;, here is the circuit diagram symbol of a &lt;span style="font-weight: bold;"&gt;cNOT&lt;/span&gt; gate. The top quantum wire represents the "control" qubit, which is transmitted unaltered, while the bottom path represents the "controlled", i.e. conditionally inverted, qubit.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/-_4yP1gGUZ0A/TqUlFBlzbhI/AAAAAAAAA-s/APZ-ZJ4SZoM/s1600/150px-CNOT_gate.svg.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 150px; height: 91px;" src="http://3.bp.blogspot.com/-_4yP1gGUZ0A/TqUlFBlzbhI/AAAAAAAAA-s/APZ-ZJ4SZoM/s400/150px-CNOT_gate.svg.png" alt="" id="BLOGGER_PHOTO_ID_5666976474372206098" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Miscellany&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;That's the meat of the present article in the series. I'll finish with a couple of general remarks on what we've seen so far.&lt;br /&gt;&lt;br /&gt;There's actually an entire family of controlled gates similar to &lt;span style="font-weight: bold;"&gt;cNOT&lt;/span&gt;, differing only in the particular single-qubit operation that's applied to the controlled qubit when the control is &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;.  Their matrices are easily obtained by substituting the single-qubit  operation's 2x2 sub matrix in the bottom right quadrant of &lt;span style="font-weight: bold;"&gt;cNOT&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;All  quantum gates have square matrix representations, since they all have  the same number of outputs as inputs. That's because quantum  computations have to be &lt;span style="font-style: italic;"&gt;reversible&lt;/span&gt;.  It's easy to show that gates like the classical AND, OR etc. can't be  made reversible, as there's less information in their output (one bit) than  in their inputs (two or more bits). This also implies that those classical gates  necessarily dissipate energy during their operation.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Next time: &lt;a href="http://mycodehere.blogspot.com/2011/10/quantum-computing-3-measurement-review.html"&gt;Measurement&lt;/a&gt;; also, a Review of the story so far, devoid of matrices &amp;amp; Greek letters!&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-6582512806758398453?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/6582512806758398453/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/10/multiple-qubit-gates.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/6582512806758398453'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/6582512806758398453'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/10/multiple-qubit-gates.html' title='Quantum Computing #2: Multiple Qubit Gates'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-DUzcvmkwlDE/TqUa_3zYIHI/AAAAAAAAA98/loy6x8AA5hU/s72-c/a1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-2398962840640501719</id><published>2011-10-21T14:17:00.029+01:00</published><updated>2011-11-19T11:10:41.260Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Music'/><title type='text'>Electro '08</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Top 5 Electro of 2008?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This week French shoegazy dreampop act &lt;span style="font-weight: bold;"&gt;M83&lt;/span&gt; released their sixth album, the two disc &lt;span style="font-style: italic;"&gt;Hurry Up We're Dreaming&lt;/span&gt;, prompting the impeccable Dan Cairns (Sunday Times) to compare it to their previous, &lt;span style="font-style: italic;"&gt;Saturdays=Youth&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;"the twin peak - with &lt;span style="font-weight: bold;"&gt;Cut Copy&lt;/span&gt;'s &lt;/span&gt;In Ghost Colours&lt;span style="font-style: italic;"&gt; - of 2008 electro"&lt;/span&gt;.  The comparison seems to be made a little unfavourably, though exactly how much so  would have been easier to gauge had not the ST sadly, recently, discontinued its  out-of-five star ratings.&lt;br /&gt;&lt;br /&gt;Fussy genre definitions thus loosened, the comparison elicits the above question. Chiefly because &lt;span style="font-style: italic;"&gt;Dan is always right&lt;/span&gt;. He has &lt;span style="font-style: italic;"&gt;technical and theoretical&lt;/span&gt; musical knowledge, setting him apart from most so-called music critics. He knows, and will show you on a stave, exactly why the songwriting of Charlotte Hatherley must be cherished. Two weeks ago, he declared Lana Del Rey's &lt;span style="font-style: italic;"&gt;Video Games&lt;/span&gt; the song of the year, with disregard to the currents of hype and other irrelevancies engulfing that artist. Declared it as scientific fact; Dan does not equivocate, nor trade mere opinion.&lt;br /&gt;&lt;br /&gt;So yeah, he's right too about the eminence of both acts in the &lt;span style="font-style: italic;"&gt;twin peak&lt;/span&gt; quote. But which of their songs are the true, 80s-retro royalty of 2008? And what other acts and tracks deserve inclusion beside these?&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;I'll start...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/File:UK-Motorway-M83.svg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 120px; height: 44px;" src="http://2.bp.blogspot.com/-1LBmRQrPOlY/TqF3lXt13vI/AAAAAAAAA9k/gPPITiKCkf0/s400/120px-UK-Motorway-M83.svg.png" alt="" id="BLOGGER_PHOTO_ID_5665941290113949426" border="0" /&gt;&lt;/a&gt;&lt;a href="http://en.wikipedia.org/wiki/File:MESSIER_083_ESO_XXL.jpg"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 200px; height: 200px;" src="http://1.bp.blogspot.com/-B29TXLOrRDo/TqF6d-VeXjI/AAAAAAAAA9w/1-XpLUAynUY/s200/240px-MESSIER_083_ESO_XXL.jpg" alt="" id="BLOGGER_PHOTO_ID_5665944461576658482" border="0" /&gt;&lt;/a&gt;Oddly enough, &lt;span style="font-weight: bold;"&gt;M83&lt;/span&gt; were &lt;span style="font-style: italic;"&gt;not&lt;/span&gt; named after the south/east section of Glasgow's M8 junction 25, between the Clyde Tunnel Expressway and the South-Link Motorway. In fact no UK road has ever received that &lt;a href="http://www.sabre-roads.org.uk/forum/viewtopic.php?f=1&amp;amp;p=513140"&gt;designation&lt;/a&gt;, which only ever appeared on that one Corporation / Fairclough gantry and local route sign drawing. So they chose instead to be named after the &lt;a href="http://en.wikipedia.org/wiki/Messier_83"&gt;Southern Pinwheel Galaxy&lt;/a&gt;, a barred spiral in Hydra.&lt;br /&gt;&lt;br /&gt;They released a prolific four singles in 2008, all from the haunting &lt;span style="font-style: italic;"&gt;Saturdays=Youth&lt;/span&gt;. The second of the four, &lt;span style="font-style: italic;"&gt;Graveyard Girl&lt;/span&gt;, is naturally the most haunted - even without its haunty spoken section:&lt;br /&gt;&lt;blockquote style="font-style: italic;"&gt;I'm 15 years old&lt;br /&gt;and I feel it's already too late to live&lt;br /&gt;don't you?&lt;/blockquote&gt;&lt;iframe src="http://www.youtube.com/embed/LCkk0-az5TA" allowfullscreen="" frameborder="0" height="315" width="420"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Now let's get the second half of the &lt;span style="font-style: italic;"&gt;twin peak&lt;/span&gt; quickly out of the way: &lt;span style="font-weight: bold;"&gt;Cut Copy&lt;/span&gt;. Nobody, not even Jeff Lynne himself, ever channeled ELO better than the Aussies' &lt;span style="font-style: italic;"&gt;So Haunted&lt;/span&gt;. However, my vote goes to track one, for the Melbourne electro outfit's funky 80s retrocapture tech, first displayed here at 1:17:&lt;br /&gt;&lt;br /&gt;&lt;iframe src="http://www.youtube.com/embed/gNwuES4lMeQ" allowfullscreen="" frameborder="0" height="315" width="560"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;The production work lavished on MGMT's fairly ordinary ditties by Mercury Rev / Flaming Lips producer Dave Friddman elevated Oracular Spectacular to electro royalty, and 2008 saw a total of four singles released from it, from &lt;span style="font-style: italic;"&gt;Time To Pretend&lt;/span&gt; through &lt;span style="font-style: italic;"&gt;Kids&lt;/span&gt;. I won't pretend to choose between those two.&lt;br /&gt;&lt;br /&gt;&lt;iframe src="http://www.youtube.com/embed/B9dSYgd5Elk" allowfullscreen="" frameborder="0" height="315" width="420"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;&lt;iframe src="http://www.youtube.com/embed/fe4EK4HSPkI" allowfullscreen="" frameborder="0" height="315" width="560"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Ladytron &lt;/span&gt;continued to innovate with their fourth album &lt;span style="font-style: italic;"&gt;Velocifero &lt;/span&gt;in 2008, and particularly with a change of direction in their first single &lt;a href="http://www.youtube.com/watch?v=9yaEwcmrR4Q"&gt;&lt;span style="font-style: italic;"&gt;Ghosts&lt;/span&gt;&lt;/a&gt;. This might have given them their worst UK chart performance of the millennium to date, but the more typically daytronic &lt;span style="font-style: italic;"&gt;Runaway &lt;/span&gt;laughingly made up for that with a breakthrough at #30 in the US dance chart:&lt;br /&gt;&lt;br /&gt;&lt;iframe src="http://www.youtube.com/embed/PHMynl9QX7g" allowfullscreen="" frameborder="0" height="315" width="420"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Finally a confession: this isn't actually my top 5 electro from 2008. A well-thumbed &lt;a href="http://www.last.fm/user/tsmradio/journal/2008/05/06/bprky_tsm_radio_uk_review%3A_futuristic_retro_champions_-_epic_new_song"&gt;TSM Radio review&lt;/a&gt; from May 2008 fondly recalls &lt;span style="font-style: italic;"&gt;Epic New Song&lt;/span&gt; by the now tragically defunct &lt;span style="font-weight: bold;"&gt;Futuristic Retro Champions&lt;/span&gt;. Now, I honestly don't know whether this is my favourite FRC, since I once tried in vain to grade them all for a playlist, ending up with a total of twelve songs scoring 10/10. So my sixth and final, thank you, goodnight and safe home selection, is a sampling &lt;span style="font-style: italic; font-weight: bold;"&gt;(the full collection &lt;/span&gt;&lt;a style="font-weight: bold;" href="http://itunes.apple.com/gb/album/love-and-lemonade/id426887893"&gt;Love And Lemonade&lt;/a&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt; is available at &lt;/span&gt;&lt;a style="font-style: italic; font-weight: bold;" href="http://itunes.apple.com/gb/album/love-and-lemonade/id426887893"&gt;iTunes&lt;/a&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;)&lt;/span&gt; of the most emotronic happy hardcore ever committed to disc ... in or around 2008.&lt;br /&gt;&lt;br /&gt;&lt;object height="81" width="100%"&gt; &lt;param name="movie" value="http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F11698860&amp;amp;show_comments=true&amp;amp;auto_play=false"&gt; &lt;param name="allowscriptaccess" value="always"&gt; &lt;embed allowscriptaccess="always" src="http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F11698860&amp;amp;show_comments=true&amp;amp;auto_play=false" type="application/x-shockwave-flash" height="81" width="100%"&gt;&lt;/embed&gt; &lt;/object&gt;   &lt;span&gt;&lt;a href="http://soundcloud.com/everythingflows/1-01-epic-new-song-frcs"&gt;Epic New Song - Futuristic Retro Champions&lt;/a&gt; by &lt;a href="http://soundcloud.com/everythingflows"&gt;everythingflows&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;object height="81" width="100%"&gt; &lt;param name="movie" value="http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F11698967&amp;amp;show_comments=true&amp;amp;auto_play=false&amp;amp;color=ff7700"&gt; &lt;param name="allowscriptaccess" value="always"&gt; &lt;embed allowscriptaccess="always" src="http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F11698967&amp;amp;show_comments=true&amp;amp;auto_play=false&amp;amp;color=ff7700" type="application/x-shockwave-flash" height="81" width="100%"&gt;&lt;/embed&gt; &lt;/object&gt;   &lt;span&gt;&lt;a href="http://soundcloud.com/everythingflows/1-02-jenna-futuristic-retro"&gt;Jenna - Futuristic Retro Champions&lt;/a&gt; by &lt;a href="http://soundcloud.com/everythingflows"&gt;everythingflows&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;object height="81" width="100%"&gt; &lt;param name="movie" value="http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F11699527&amp;amp;show_comments=true&amp;amp;auto_play=false&amp;amp;color=ff7700"&gt; &lt;param name="allowscriptaccess" value="always"&gt; &lt;embed allowscriptaccess="always" src="http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F11699527&amp;amp;show_comments=true&amp;amp;auto_play=false&amp;amp;color=ff7700" type="application/x-shockwave-flash" height="81" width="100%"&gt;&lt;/embed&gt; &lt;/object&gt;&lt;span&gt;&lt;a href="http://soundcloud.com/everythingflows/1-09-told-ya-frcs"&gt;Told Ya - Futuristic Retro Champions&lt;/a&gt; by &lt;a href="http://soundcloud.com/everythingflows"&gt;everythingflows&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Your mileage may vary. Hey, I'm no Dan Cairns.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;font-size:85%;" &gt;Image credits: &lt;a href="http://en.wikipedia.org/wiki/File:UK-Motorway-M83.svg"&gt;M83 road sign&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/File:MESSIER_083_ESO_XXL.jpg"&gt;Messier 83&lt;/a&gt;, all via Wikipedia.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-2398962840640501719?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/2398962840640501719/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/10/electro-08.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/2398962840640501719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/2398962840640501719'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/10/electro-08.html' title='Electro &apos;08'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-1LBmRQrPOlY/TqF3lXt13vI/AAAAAAAAA9k/gPPITiKCkf0/s72-c/120px-UK-Motorway-M83.svg.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-4805026274199019921</id><published>2011-10-16T09:51:00.012+01:00</published><updated>2011-11-30T09:10:30.446Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Quantum Computing'/><category scheme='http://www.blogger.com/atom/ns#' term='Physics'/><title type='text'>Quantum Computing #1: Single Qubit Gates</title><content type='html'>&lt;span style="font-style: italic;"&gt;Previously:&lt;br /&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;a style="font-style: italic;" href="http://mycodehere.blogspot.com/2011/10/quantum-computing-for-determined.html"&gt;Introduction&lt;/a&gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;Mathematics? What Mathematics?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Recent mention of Mike Nielsen's &lt;a style="font-style: italic;" href="http://mycodehere.blogspot.com/2011/10/quantum-computing-for-determined.html"&gt;Quantum Computation&lt;/a&gt; videos sparked a flurry of interest among friends and colleagues, mostly tempered by wariness about the mathematics involved. That's a pity, because there's actually very little mathematics needed to make a start on this stuff. &lt;span style="font-style: italic;"&gt;Complex numbers&lt;/span&gt;, for example, are not strictly essential for an introduction to the subject. And even when they become so, well after all&lt;span style="font-weight: bold;"&gt;, &lt;/span&gt;they are just pairs of &lt;span style="font-style: italic;"&gt;normal&lt;/span&gt; numbers, with a special rule for multiplication. Similarly, &lt;span style="font-style: italic;"&gt;matrices&lt;/span&gt; are nothing more than a shorthand way of multiplying ordinary numbers pairwise, two by two, and then adding up the results.&lt;br /&gt;&lt;br /&gt;Still it can be a sub-optimal experience to jump into Wikipedia's &lt;a style="font-style: italic;" href="http://en.wikipedia.org/wiki/Quantum_gate"&gt;Quantum gate&lt;/a&gt; page, finding yourself immediately surrounded by not only these, but also the curious &lt;a style="font-style: italic;" href="http://en.wikipedia.org/wiki/Bra-ket_notation"&gt;ket notation&lt;/a&gt;. Well, let's at least see if we can get started without &lt;span style="font-style: italic;"&gt;that!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is the first in a series of articles on quantum computation, to be published over the next several Sundays, loosely following the content of Prof. Nielsen's videos. It describes, in a thoroughly simplified style, a couple of single-qubit gates. Future articles will apply the same stripped-down approach to multiple qubit gates, and then &lt;span style="font-style: italic;"&gt;measurement&lt;/span&gt;, and in surprisingly short order, &lt;span style="font-style: italic;"&gt;superdense coding&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;quantum teleportation&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Another unusual aspect of these articles, also owed to Prof. Nielsen, is the complete lack of any reference to physical implementations of quantum gates and circuits. This is just how classical Boolean logic (or the &lt;a href="http://en.wikipedia.org/wiki/Propositional_calculus"&gt;&lt;span style="font-style: italic;"&gt;propositional calculus&lt;/span&gt;&lt;/a&gt;) developed historically, many years before physical AND gates were realised in switches, valves, water sluices, &lt;a href="http://www.youtube.com/watch?v=SudixyugiX4"&gt;dominoes&lt;/a&gt; or &lt;a href="http://www.youtube.com/watch?v=H-53TVR9EOw&amp;amp;NR=1"&gt;marbles&lt;/a&gt;. We simply describe a two-value quantum computational algebra, taking it on trust that there's no shortage of potentially available physical realisations.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The Computational Basis&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Like a classical, logical bit, the quantum bit or &lt;span style="font-style: italic;"&gt;qubit&lt;/span&gt; has two computational basis states; &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;. Some writers use instead &lt;span style="font-weight: bold;"&gt;↑&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;↓&lt;/span&gt; to represent the basis states. Personally I'd have preferred to use something like &lt;span style="font-weight: bold;"&gt;T&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;F&lt;/span&gt;, but hey. Whatever symbols are used, they're usually embedded in the forementioned &lt;span style="font-style: italic;"&gt;ket&lt;/span&gt; marks, like these:&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center; font-weight: bold;"&gt;&lt;a href="http://1.bp.blogspot.com/-NEGIOXTxD1I/TqUxPKzlokI/AAAAAAAAA-4/pAU_Axdn4is/s1600/ket0.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 20px; height: 20px;" src="http://1.bp.blogspot.com/-NEGIOXTxD1I/TqUxPKzlokI/AAAAAAAAA-4/pAU_Axdn4is/s200/ket0.png" alt="" id="BLOGGER_PHOTO_ID_5666989842784166466" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/-mOPBsj6H_Rc/TqUyItdMiMI/AAAAAAAAA_E/v5Ssxri8XIQ/s1600/ket1.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 20px; height: 20px;" src="http://2.bp.blogspot.com/-mOPBsj6H_Rc/TqUyItdMiMI/AAAAAAAAA_E/v5Ssxri8XIQ/s200/ket1.png" alt="" id="BLOGGER_PHOTO_ID_5666990831338031298" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;but for purely typographical reasons I'll be omitting those, at least to start with, and using instead just the bold &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;For the purposes of the matrix transformations which follow, the basis states can conveniently be represented by &lt;span style="font-style: italic;"&gt;any&lt;/span&gt; two orthogonal unit column vectors. Note that the unfortunately named &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; is &lt;span style="font-style: italic;"&gt;not&lt;/span&gt; the zero vector; &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; is just a label for the ordinary, basis state vector we've chosen to represent "logical zero". For example, the labels &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt; might represent unit steps in some arbitrary x- and y-directions, respectively:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/-NO-_mcZ-qp4/TpwNHjDod0I/AAAAAAAAA7o/wVF2CaKyClA/s1600/f1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 86px; height: 137px;" src="http://1.bp.blogspot.com/-NO-_mcZ-qp4/TpwNHjDod0I/AAAAAAAAA7o/wVF2CaKyClA/s400/f1.png" alt="" id="BLOGGER_PHOTO_ID_5664416854645962562" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The qubit's actual state &lt;span style="font-weight: bold;"&gt;ψ&lt;/span&gt; can also be any linear combination (or &lt;span style="font-style: italic;"&gt;superposition&lt;/span&gt;) of these basis states,&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/-NiZ7mF4Ww-k/TpwNn-lx3eI/AAAAAAAAA70/WKQIMqHY2lo/s1600/f1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 208px; height: 59px;" src="http://3.bp.blogspot.com/-NiZ7mF4Ww-k/TpwNn-lx3eI/AAAAAAAAA70/WKQIMqHY2lo/s400/f1.png" alt="" id="BLOGGER_PHOTO_ID_5664417411792756194" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;where |α|² + |β|² = 1.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Quantum Gates&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Quantum computing has its own "gates", by analogy with the classical AND, OR, NOT etc. These can be represented by square matrices. For example, a single-qubit gate might be represented by a 2x2 &lt;span style="font-style: italic;"&gt;unitary&lt;/span&gt; matrix &lt;span style="font-weight: bold;"&gt;M&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Wait, what? Unitary? - Well, a gate matrix multiplying any given quantum state column vector yields a new state, and this new state must also satisfy the above &lt;span style="font-style: italic;"&gt;normalization&lt;/span&gt; condition, |α|² + |β|² = 1. Unitary matrices are just those which preserve this criterion. In other words, they preserve the &lt;span style="font-style: italic;"&gt;unit length&lt;/span&gt; of the state vector &lt;span style="font-weight: bold;"&gt;ψ&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;The simplest quantum gate is the single-qubit "wire", which - pay careful attention now - looks like this:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/-er81ToAN4T4/Tp71PxkgSAI/AAAAAAAAA88/JLeChIkjhac/s1600/f1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 161px; height: 45px;" src="http://4.bp.blogspot.com/-er81ToAN4T4/Tp71PxkgSAI/AAAAAAAAA88/JLeChIkjhac/s400/f1.png" alt="" id="BLOGGER_PHOTO_ID_5665235032631953410" border="0" /&gt;&lt;/a&gt;and just transmits the state vector unaltered. The matrix representation of this is the 2x2 &lt;span style="font-style: italic;"&gt;Identity&lt;/span&gt; matrix, &lt;span style="font-weight: bold;"&gt;I&lt;/span&gt;.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://2.bp.blogspot.com/-BW3_DvHaRNQ/TpwOxrKJF6I/AAAAAAAAA8A/d9vwczBRDgQ/s1600/f1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 273px; height: 135px;" src="http://2.bp.blogspot.com/-BW3_DvHaRNQ/TpwOxrKJF6I/AAAAAAAAA8A/d9vwczBRDgQ/s400/f1.png" alt="" id="BLOGGER_PHOTO_ID_5664418677886883746" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The NOT Gate&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;For historical reasons, the quantum NOT gate is also known as the Pauli-X gate, and appears in both circuit diagrams and matrix representations as the letter &lt;span style="font-weight: bold;"&gt;X&lt;/span&gt;. Here's its symbol for use in quantum circuits:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/-XzfHlzVZPik/Tp70WlD4EJI/AAAAAAAAA8w/sGY4JmmAe9k/s1600/f1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 160px; height: 66px;" src="http://3.bp.blogspot.com/-XzfHlzVZPik/Tp70WlD4EJI/AAAAAAAAA8w/sGY4JmmAe9k/s400/f1.png" alt="" id="BLOGGER_PHOTO_ID_5665234050021331090" border="0" /&gt;&lt;/a&gt;This gate "inverts" its input, in the sense that given an input of &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt;, its output will be &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;; and conversely, given an input of &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;, its output will be &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt;. As for those peculiar &lt;span style="font-style: italic;"&gt;superposition&lt;/span&gt; states, it seems reasonable that an arbitrary input state &lt;span style="font-weight: bold;"&gt;ψ&lt;/span&gt; containing a certain quantity α of the &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; basis vector, together with a corresponding quantity β of the &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt; basis vector, should upon passing through a NOT gate, have those quantities reversed. And that's just what this &lt;span style="font-weight: bold;"&gt;X&lt;/span&gt; does:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/-eWBMnUBWKIM/TpwPJ33_lTI/AAAAAAAAA8M/3VqS5hmUlXg/s1600/f1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 229px; height: 135px;" src="http://1.bp.blogspot.com/-eWBMnUBWKIM/TpwPJ33_lTI/AAAAAAAAA8M/3VqS5hmUlXg/s400/f1.png" alt="" id="BLOGGER_PHOTO_ID_5664419093617284402" border="0" /&gt;&lt;/a&gt;Like the classical logical inverter, the quantum &lt;span style="font-weight: bold;"&gt;X&lt;/span&gt; gate is its own inverse. In terms of linear algebra it's trivial to show, by explicit &lt;a href="http://en.wikipedia.org/wiki/Matrix_multiplication"&gt;matrix multiplication&lt;/a&gt;, that &lt;span style="font-weight: bold;"&gt;XX&lt;/span&gt; = &lt;span style="font-weight: bold;"&gt;I&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/-16ayPk-xHAk/Tp7wHaAkaeI/AAAAAAAAA8k/n_HtQs8N7jE/s1600/f1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 299px; height: 64px;" src="http://2.bp.blogspot.com/-16ayPk-xHAk/Tp7wHaAkaeI/AAAAAAAAA8k/n_HtQs8N7jE/s400/f1.png" alt="" id="BLOGGER_PHOTO_ID_5665229391310121442" border="0" /&gt;&lt;/a&gt;The quantum circuit diagram below is therefore equivalent to a single wire.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/-zHzWQIIPzFs/Tp72KudXLNI/AAAAAAAAA9I/NqpcPPO0GwQ/s1600/f1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 254px; height: 74px;" src="http://2.bp.blogspot.com/-zHzWQIIPzFs/Tp72KudXLNI/AAAAAAAAA9I/NqpcPPO0GwQ/s400/f1.png" alt="" id="BLOGGER_PHOTO_ID_5665236045408971986" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The Hadamard Gate&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Our first truly quantum gate, without a classical analogue, is the &lt;span style="font-style: italic;"&gt;Hadamard&lt;/span&gt; gate &lt;span style="font-weight: bold;"&gt;H&lt;/span&gt;. Given an input of &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt;, its output is the &lt;span style="font-style: italic;"&gt;sum&lt;/span&gt; of the &lt;span style="font-weight: bold;"&gt;0&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt; basis states (normalized, of course). Similarly, given an input of &lt;span style="font-weight: bold;"&gt;1&lt;/span&gt;, its output is the normalized &lt;span style="font-style: italic;"&gt;difference&lt;/span&gt; between the two basis states. It's like this:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/-1pCgvn81zvM/TpwcH2wcafI/AAAAAAAAA8Y/DTSZWfMbAE0/s1600/f1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 343px; height: 142px;" src="http://2.bp.blogspot.com/-1pCgvn81zvM/TpwcH2wcafI/AAAAAAAAA8Y/DTSZWfMbAE0/s400/f1.png" alt="" id="BLOGGER_PHOTO_ID_5664433352608606706" border="0" /&gt;&lt;/a&gt;The √2 is the normalization adjustment needed to give the output vector unit length. "Noise" like this is often omitted from practical quantum computations, it being universally acknowledged that the state vector &lt;span style="font-style: italic;"&gt;always&lt;/span&gt; requires such normalization; but I'll retain it, to avoid confusion.&lt;br /&gt;&lt;br /&gt;The Hadamard gate is also its own inverse. In terms of linear algebra it's trivial to show, by explicit matrix multiplication, that &lt;span style="font-weight: bold;"&gt;HH&lt;/span&gt; = &lt;span style="font-weight: bold;"&gt;I&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/-7an7zUQ91mE/Tp73gEakuJI/AAAAAAAAA9U/KEhNEXhqzgs/s1600/f1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 69px;" src="http://1.bp.blogspot.com/-7an7zUQ91mE/Tp73gEakuJI/AAAAAAAAA9U/KEhNEXhqzgs/s400/f1.png" alt="" id="BLOGGER_PHOTO_ID_5665237511591737490" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;and hence that the series circuit of two Hadamard gates, just like the case of two inverters, is also equivalent to a single quantum wire.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Next time: &lt;a href="http://mycodehere.blogspot.com/2011/10/multiple-qubit-gates.html"&gt;Multiple Qubit Gates&lt;/a&gt;.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-4805026274199019921?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/4805026274199019921/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/10/single-qubit-gates.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/4805026274199019921'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/4805026274199019921'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/10/single-qubit-gates.html' title='Quantum Computing #1: Single Qubit Gates'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-NEGIOXTxD1I/TqUxPKzlokI/AAAAAAAAA-4/pAU_Axdn4is/s72-c/ket0.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-2118050358215874144</id><published>2011-10-15T07:56:00.005+01:00</published><updated>2011-10-15T09:54:37.230+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><title type='text'>The Dangerous Mod</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/-FFdtiih__PM/Tpkvp6EHi9I/AAAAAAAAA7E/w6yyIpQ_pBQ/s1600/QuickTime%2BTask.png"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 294px; height: 400px;" src="http://2.bp.blogspot.com/-FFdtiih__PM/Tpkvp6EHi9I/AAAAAAAAA7E/w6yyIpQ_pBQ/s400/QuickTime%2BTask.png" alt="" id="BLOGGER_PHOTO_ID_5663610403402779602" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;Popup Worry&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Kaspersky continues to perform as one of the best available Internet security packages, and although everyone is only ever one slip away from a major breach and a catastrophic loss of reputation, I would not hesitate to recommend it. Maybe that's why I've given this little popup notification a bit more attention than it warrants at first sight.&lt;br /&gt;&lt;br /&gt;A look in the usual forum or three reveals that people have indeed found messages like this one quite confusing. For one thing, they are unforgivably ambiguous. Is it the application, or the modification, that is being flagged as "potentially dangerous"? And quite separately, which one is it that has no digital signature - the original app, or the process (installer) trying to update it?&lt;br /&gt;&lt;br /&gt;Then there's the question of relevancy when it comes to "98% of users trust this application". Do they trust the modified or unmodified version? And why exactly do they trust it? You don't have to be particularly security savvy to know: the mere fact that "more than a million" users have run a program, doesn't prove it's not malware. Aren't those users being a little bit cavalier, at this time of apparently ubiquitous fake certificates?&lt;br /&gt;&lt;br /&gt;Of course, clicking "Help" does nothing to improve matters, unless you count as progress, advice on how to prevent these pesky warnings from appearing at all. The so-called "Help" link just takes you to a description of popup warning management options within the security app itself, completely oblivious to the context of your present dilemma!&lt;br /&gt;&lt;br /&gt;Finally, I have to grumble about the available options. None of these is entirely satisfactory. &lt;span style="font-weight: bold; font-style: italic;"&gt;Yes, I trust&lt;/span&gt; - as we have just been told - obviously risks running a "potentially dangerous modification of the application". Yet how is a typical user supposed to evaluate the &lt;span style="font-weight: bold; font-style: italic;"&gt;Restrict&lt;/span&gt; option? Why on earth would you ever consider &lt;span style="font-style: italic;"&gt;allowing&lt;/span&gt; "dangerous operations" in the first place?&lt;br /&gt;&lt;br /&gt;As for the seemingly safe &lt;span style="font-weight: bold; font-style: italic;"&gt;Block&lt;/span&gt; option: nothing terrifies me more than the prospect of trying to update my wife's iPad2 to iOS5, as I am destined soon to do, then being blocked halfway through an elaborate backup / restore operation because the necessary instructions are stuck in a blocked QuickTime Task. Where is the &lt;span style="font-style: italic;"&gt;"Ask me later, when it actually tries to do something"&lt;/span&gt; option? Remember, almost everyone now has this kind of update configured to run automatically in the background. I probably won't want to have to deal with this warning as soon as it pops up. Yet it cannot be dismissed without making an apparently irrevocable decision about the fate of a potentially critical app.&lt;br /&gt;&lt;br /&gt;Nor can it be ignored; &lt;span style="font-style: italic;"&gt;it's a stay-on-top window&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Calm Down, Dear&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now, it goes without saying (to security experts like you and me :-) that the correct option is to click the inconspicuous little information icon beside the application name, and verify as many details as possible, &lt;span style="font-style: italic;"&gt;sans&lt;/span&gt; signature. In this case, the app name, path, vendor, product version and create / modified dates check out, while I can see that it's the original app that had no sig. Hey, it's been running that way since July! Only now is the warning disambiguated: it's about the modification of an unsigned file.&lt;br /&gt;&lt;br /&gt;Here, both the original file and the agency performing the modification are trusted. So I choose &lt;span style="font-weight: bold; font-style: italic;"&gt;Yes, I trust&lt;/span&gt; and get on my way.&lt;br /&gt;&lt;br /&gt;This rant is all about UI design and user guidance. Kaspersky, you might be as I contend, &lt;span style="font-style: italic;"&gt;the best&lt;/span&gt; in the personal computing security business; but you sometimes make the mistake of assuming you're communicating with colleagues. Often instead, you need to &lt;a style="font-style: italic;" href="http://www.youtube.com/watch?v=VWpcMp-h2DE"&gt;explain as you would a child&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-2118050358215874144?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/2118050358215874144/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/10/dangerous-mod.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/2118050358215874144'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/2118050358215874144'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/10/dangerous-mod.html' title='The Dangerous Mod'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-FFdtiih__PM/Tpkvp6EHi9I/AAAAAAAAA7E/w6yyIpQ_pBQ/s72-c/QuickTime%2BTask.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-6297511670661727294</id><published>2011-10-08T10:10:00.013+01:00</published><updated>2011-11-30T09:05:38.211Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Science'/><category scheme='http://www.blogger.com/atom/ns#' term='Books'/><category scheme='http://www.blogger.com/atom/ns#' term='Quantum Computing'/><category scheme='http://www.blogger.com/atom/ns#' term='Mathematics'/><category scheme='http://www.blogger.com/atom/ns#' term='Coding'/><category scheme='http://www.blogger.com/atom/ns#' term='Logic'/><category scheme='http://www.blogger.com/atom/ns#' term='Physics'/><title type='text'>Quantum Computing for the Determined</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/-nfysOOpoREE/TpBV0laPF_I/AAAAAAAAA60/NIGBqhNh6mc/s1600/Michael_Nielsen_Web-e1302788735753.jpg"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 177px; height: 200px;" src="http://4.bp.blogspot.com/-nfysOOpoREE/TpBV0laPF_I/AAAAAAAAA60/NIGBqhNh6mc/s200/Michael_Nielsen_Web-e1302788735753.jpg" alt="" id="BLOGGER_PHOTO_ID_5661119093488424946" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;Moving Pictures&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Nobody seems willing to predict when quantum computing will take off. Some are even beginning to &lt;a href="http://www.networkworld.com/news/2011/092611-quantum-computing-250825.html"&gt;question&lt;/a&gt; whether it will ever do so. Meanwhile, optimists patiently await that crucial breakthrough, the discovery of the perfect physical realisation of the qubit. There's no shortage of candidates. The Nitrogen Vacancy (NV) centre in diamond is one. NVs are the crystal lattice imperfections in pink diamonds that give them their hue. Then again, a lot of progress has recently been made involving trapped ion systems.&lt;br /&gt;&lt;br /&gt;The optimists wait - &lt;span style="font-style: italic;"&gt;impatiently&lt;/span&gt;, on second thoughts! - for one of these, or for some other exotic virtual particle inhabiting some material (or as yet unknown metamaterial), that will finally and abruptly realise the qubit as coherent, entangled and scalable.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.amazon.co.uk/Quantum-Computation-Information-10th-Anniversary/dp/1107002176"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 200px; height: 200px;" src="http://3.bp.blogspot.com/-qWY2xsioVWM/TpBYLxQRYLI/AAAAAAAAA68/xR1tDnkIHkc/s200/Book.jpg" alt="" id="BLOGGER_PHOTO_ID_5661121690828103858" border="0" /&gt;&lt;/a&gt;As they wait, they polish their grasp of linear algebra, matrices, the various fundamental and second-order quantum "gates" that have been conceived, and the circuits made possible by these. Rehearse the limitations imposed by their fragility and inscrutability. Marvel at the astonishing algorithms that have been developed in qubit theory, while worrying about their scant number and opaque discoverability.&lt;br /&gt;&lt;br /&gt;Almost to a man or woman, they have found and honed their new algebraic skills using &lt;span style="font-style: italic;"&gt;The Book:&lt;/span&gt; &lt;a href="http://www.amazon.co.uk/Quantum-Computation-Information-10th-Anniversary/dp/1107002176"&gt;Quantum Computation and Quantum Information&lt;/a&gt;, by Michael A. Nielsen (University of Queensland) and Isaac L. Chuang (IBM / Stanford University). Or &lt;span style="font-style: italic;"&gt;Mike and Ike&lt;/span&gt;, as this revered tome is universally known. A literally pioneering work, it was the first of its kind, and is still today the standard to which all else is inevitably compared (my earlier review is &lt;a href="http://mycodehere.blogspot.com/2010/05/book-review-quantum-computation-and.html"&gt;here&lt;/a&gt;). In fact it's the most highly quoted physics publication of the last 25 years, and one of the ten most highly quoted physics books of all time (source: &lt;span style="font-style: italic;"&gt;Google Scholar&lt;/span&gt;, December 2007).&lt;br /&gt;&lt;br /&gt;In support of its tenth anniversary edition, Professor Nielsen has released a set of 22 short video lectures on &lt;a href="http://michaelnielsen.org/blog/quantum-computing-for-the-determined/"&gt;his blog&lt;/a&gt;. They're a great introduction to the subject. However, he has stopped just short of completing the course, due to intervening work commitments. &lt;span style="font-style: italic;"&gt;He has promised to complete it if there's enough interest in the videos produced so far.&lt;/span&gt; Here's the first one:&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;iframe src="http://www.youtube.com/embed/X2q1PuI2RFI" allowfullscreen="" frameborder="0" height="315" width="560"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;You know what you must do!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Next time: &lt;a href="http://mycodehere.blogspot.com/2011/10/single-qubit-gates.html"&gt;Single Qubit Gates&lt;/a&gt;.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-6297511670661727294?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/6297511670661727294/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/10/quantum-computing-for-determined.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/6297511670661727294'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/6297511670661727294'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/10/quantum-computing-for-determined.html' title='Quantum Computing for the Determined'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-nfysOOpoREE/TpBV0laPF_I/AAAAAAAAA60/NIGBqhNh6mc/s72-c/Michael_Nielsen_Web-e1302788735753.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-317115605260927094</id><published>2011-09-28T00:30:00.011+01:00</published><updated>2011-09-28T22:38:38.066+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><category scheme='http://www.blogger.com/atom/ns#' term='Mathematics'/><title type='text'>Public Key Cryptography</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/-8j_JIXAAOL8/ToJwfDrgWYI/AAAAAAAAA6o/v4wjEeGHkUA/s1600/Adi_Shamir_2009.jpg"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 134px; height: 200px;" src="http://1.bp.blogspot.com/-8j_JIXAAOL8/ToJwfDrgWYI/AAAAAAAAA6o/v4wjEeGHkUA/s200/Adi_Shamir_2009.jpg" alt="" id="BLOGGER_PHOTO_ID_5657207760796801410" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;Brave New Cipher&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As an avid reader of Scientific American in the 1970s, and of Martin Gardner's &lt;span style="font-style: italic;"&gt;Mathematical Games&lt;/span&gt; column in particular, I was lucky enough to be schooled in the basics of public key cryptography just as it was being invented. Well, two years after its 1975 inception, to be accurate.  Firstly through Martin's column, which in the August 1977 issue became the first to publicize the PKC method worldwide; and then in the same journal, subsequently from the writings of Rivest, Shamir and Adleman (RSA) themselves.&lt;br /&gt;&lt;br /&gt;It was an exciting time for anyone of a mathematically sympathetic imagination. For the first time in history, the question of the practicability of devising a cipher, to be encoded and decoded rapidly by computer, used repeatedly without changing the key, and unbreakable by sophisticated cryptanalysis, received an answer and a proof; and the answer was affirmative.&lt;br /&gt;&lt;br /&gt;Martin's original article can be read here:&lt;br /&gt;&lt;a href="http://www.fortunecity.com/emachines/e11/86/cipher1.html"&gt;&lt;blockquote&gt;http://www.fortunecity.com/emachines/e11/86/cipher1.html&lt;/blockquote&gt;&lt;/a&gt;The number theory behind the scheme is simple and elegant, as we hope from such things. But that very beauty of theory and expression can distract the student from the equally important subject of housekeeping.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Secure Public Keys&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is the main message in Eric Lippert's recent article, &lt;a style="font-style: italic;" href="http://blogs.msdn.com/b/ericlippert/archive/2011/09/27/keep-it-secret-keep-it-safe.aspx"&gt;Keep it secret, keep it safe&lt;/a&gt;. As an example, most of us will be aware that Alice and Bob each have one private and one public key, based upon a certain mathematical "trapdoor function", namely prime factorisation. Each party must ensure that his or her private key remains known only to him or herself. What's perhaps less obvious is that their initial exchange of &lt;span style="font-style: italic;"&gt;public&lt;/span&gt; keys must also be made via a guaranteed secure channel.&lt;br /&gt;&lt;br /&gt;Why? Surely the strength of the scheme rests on the fact that eavesdropper Eve can do nothing with full knowledge of these keys? True enough, but Eve is not the only shadowy figure in the telephone exchange room.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Historical note: in cryptography discussions such as these, the cast of characters (Alice, Bob, Eve, etc.) is mostly drawn from Bruce Schneier's seminal book, &lt;a href="http://www.schneier.com/book-applied.html"&gt;Applied Cryptography&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Eric uses &lt;span style="font-style: italic;"&gt;Mallory&lt;/span&gt; to denote this malicious, meddlesome, man-in-the-middle, although &lt;span style="font-style: italic;"&gt;Trudy&lt;/span&gt; (for &lt;span style="font-style: italic;"&gt;intruder&lt;/span&gt;) is possibly more common. If Mallory can intercept the initial exchange of public key information, then he may modify these keys in transit, replacing them with his own public key.&lt;br /&gt;&lt;br /&gt;Any message from Alice will be encrypted using her private key, and Bob's public key. But now Mallory can intercept such messages, and replace them with alternatives containing his own subversive propaganda, encrypted using his own private key, and Bob's public key. Bob will then in turn decrypt the bogus message using his own private key and Mallory's public key, which he still believes to be Alice's; and so all will appear to be well. Oops!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;An Opportune Time&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is a particularly urgent time to be reminding ourselves of the basic mechanics of the system. We have recently seen Certifying Authorities become compromised, appearing to issue shedloads of bogus certificates, and even go bust (&lt;a href="http://en.wikipedia.org/wiki/DigiNotar"&gt;DigiNotar&lt;/a&gt;). Ironically, &lt;a href="http://www.bbc.co.uk/news/technology-13681566"&gt;RSA itself has become the victim&lt;/a&gt; of one of the most wide-ranging breaches in the history of the industry, its SecurID token system and thereby the security of its targeted (Lockheed Martin) and collateral clients being utterly compromised. Meanwhile, the SSL itself, in its most common implementation (TLS 1.0/SSL 3.0), has been hacked by a cookie thieving &lt;a href="http://threatpost.com/en_us/blogs/new-attack-breaks-confidentiality-model-ssl-allows-theft-encrypted-cookies-091911"&gt;BEAST&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;It's only by understanding the detailed operation of PKC that we'll be able to discern the implications of breaches and failures such as these. But the important details are not in the pretty mathematics, they're higher up in the wider system, where the real, exploitable vulnerabilities reside. They're in the arena of public/private key housekeeping. As Eric puts it, &lt;span style="font-style: italic;"&gt;solve the key management problem first!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Related articles:&lt;br /&gt;&lt;blockquote&gt;&lt;a href="http://www.usatoday.com/tech/news/story/2011-09-27/webpage-hackers/50575024/1"&gt;Authencity of Web pages comes under attack&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.upi.com/Top_News/US/2011/09/28/Hackers-impersonating-trusted-Web-pages/UPI-44141317229135/?spt=hs&amp;amp;or=tn"&gt;Hackers impersonating 'trusted' Web pages&lt;/a&gt;&lt;br /&gt;&lt;a href="http://searchsecurity.techtarget.com/magazineContent/Secure-online-payment-system-requires-end-to-end-encryption"&gt;Secure online payment system requires end-to-end encryption&lt;/a&gt;&lt;/blockquote&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-style: italic;"&gt;Pic: Adi Shamir, 2009. Source: &lt;/span&gt;&lt;a style="font-style: italic;" href="http://en.wikipedia.org/wiki/File:Adi_Shamir_2009.jpg"&gt;Wikipedia&lt;/a&gt;&lt;span style="font-style: italic;"&gt;.&lt;/span&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-317115605260927094?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/317115605260927094/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/09/public-key-cryptography.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/317115605260927094'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/317115605260927094'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/09/public-key-cryptography.html' title='Public Key Cryptography'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-8j_JIXAAOL8/ToJwfDrgWYI/AAAAAAAAA6o/v4wjEeGHkUA/s72-c/Adi_Shamir_2009.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-5075928851591896641</id><published>2011-09-26T13:55:00.005+01:00</published><updated>2011-09-30T16:38:22.456+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Science'/><category scheme='http://www.blogger.com/atom/ns#' term='Politics'/><title type='text'>Risk Shift</title><content type='html'>&lt;span style="font-weight: bold;"&gt;The Trouble With Politics?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In the LA Times just over a week ago, there was an interesting report about a recent study of teenage drivers:&lt;br /&gt;&lt;a href="http://www.latimes.com/health/la-he-teen-driver-laws-20110914,0,7056006.story"&gt;&lt;/a&gt;&lt;blockquote&gt;&lt;a href="http://www.latimes.com/health/la-he-teen-driver-laws-20110914,0,7056006.story"&gt;http://www.latimes.com/health/la-he-teen-driver-laws-20110914,0,7056006.story&lt;/a&gt;&lt;/blockquote&gt;Basically, the situation in all the states (California being no more than a particular case in point) has been, for over a decade, that the newest drivers, which is to say 16-17 year olds, have been subjected to various restrictions on their ability to (a) carry passengers, and (b) drive at all during certain times of day. There have also been other restrictions adopted by certain states, such as driving without supervision, or the ability to use mobile phones while driving, but these two have been the main and most popular ones in every state since the first of these so-called "graduated driver licensing programs" was originally introduced in Florida in 1996.&lt;br /&gt;&lt;br /&gt;What the study has revealed is that the anticipated - and indeed observed - reduction in fatal accidents involving 16-17 year old drivers, has been "almost exactly matched" by a corresponding increase in fatalities involving 18-19 year olds.  In other words, the carnage has merely been pushed two years into the future.&lt;br /&gt;&lt;br /&gt;(According to my reading of the evidence, the increase is actually closer to &lt;span style="font-style: italic;"&gt;half&lt;/span&gt; the earlier reduction, but we'll let that go for now.)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Hot Potato&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It's obvious with hindsight, that what these programs have done is to mask the immaturity and inexperience of new drivers for a year or two. By preventing them from being exposed to certain driving situations and environments, the restrictions have of course done nothing to prepare them for such eventual exposure.&lt;br /&gt;&lt;br /&gt;Politically, this has become a very awkward truth. During the first couple of years of every such program, public officials have been able to point to a real reduction in young driver related fatalities, and boast with confidence that their policies have been saving lives. Now that it turns out in general &lt;span style="font-style: italic;"&gt;not&lt;/span&gt; to have been the case, what are the chances that these programs will be cancelled overnight?&lt;br /&gt;&lt;br /&gt;Absolute zero, obviously. But for more than just the usual reasons, i.e. short elected terms, and blissful ignorance of the actual evidence. This will not become just another case of badly thought out laws surviving through inertia. For if these programs were discontinued, there would be a bow wave of doubled fatalities lasting for as long as the initial reduction, namely two years, as today's pre-existing 18-19 year olds meet the newly liberated 16-17 year old wave of fresh idiots.&lt;br /&gt;&lt;br /&gt;Obviously there's a lot that can be done, in terms of education and training, to defuse these unintended consequences and arrive at a program that does make sense. Still, it's an interesting study, and a good reminder of how shortsighted, wilfully or otherwise, we and our politicians can be.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-5075928851591896641?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/5075928851591896641/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/09/risk-shift.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/5075928851591896641'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/5075928851591896641'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/09/risk-shift.html' title='Risk Shift'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-4382254018104355403</id><published>2011-09-24T11:00:00.008+01:00</published><updated>2011-11-10T16:13:00.954Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Music'/><title type='text'>It Will Be A Good Day</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Six For Saturday&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;iframe src="http://www.youtube.com/embed/nYdPtcx-4mo" allowfullscreen="" frameborder="0" height="315" width="560"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;▲ What you get when you play Charlotte Hatherley's &lt;a href="http://www.youtube.com/watch?v=brS8pYY2dnY"&gt;White&lt;/a&gt; video backwards.&lt;br /&gt;&lt;br /&gt;&lt;iframe src="http://www.youtube.com/embed/mx3hSNQXtI4" allowfullscreen="" frameborder="0" height="315" width="420"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;▲ They're all good days.&lt;br /&gt;&lt;br /&gt;&lt;iframe src="http://www.youtube.com/embed/JTTwlAT_AwU" allowfullscreen="" frameborder="0" height="315" width="560"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;▲ 2005 electro with a dark tone, superbly conveyed by Helen Marnie's understated delivery.&lt;br /&gt;&lt;br /&gt;&lt;object id="muzuplayer-6ylF00lWGR-404586" height="413" width="612"&gt;&lt;param name="movie" value="http://www.muzu.tv/player/getPlayer/a/6ylF00lWGR/vidId=146628"&gt;&lt;param name="wmode" value="transparent"&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;param name="allowfullscreen" value="true"&gt;&lt;embed src="http://www.muzu.tv/player/getPlayer/a/6ylF00lWGR/vidId=146628" type="application/x-shockwave-flash" allowscriptaccess="always" wmode="transparent" allowfullscreen="true" name="muzuplayer-6ylF00lWGR-404586" height="413" width="612"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;▲ Flautist Kate Holmes (no, not that one) is also "Client A" in &lt;a href="http://en.wikipedia.org/wiki/Client_%28band%29"&gt;CLIEИT&lt;/a&gt;, where Charlotte Hatherley once appeared as "Client C" (and when you read that Charlotte has two elder &lt;a href="http://www.dailymail.co.uk/home/you/article-462262/Charlottes-worldwide-web.html"&gt;sisters&lt;/a&gt;, Abigail and Beatrice, a heartbreaking little narrative springs to mind).&lt;br /&gt;&lt;br /&gt;&lt;iframe src="http://www.youtube.com/embed/soWnOSgfqwY" allowfullscreen="" frameborder="0" height="315" width="560"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;▲ Bars of seven measures from Poland's greatest export! Love the funky piano @ 3:50.&lt;br /&gt;&lt;span style="font-size:85%;"&gt;Yes I know there aren't "measures" in a musical "bar". It's a pub gag.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;iframe src="http://www.youtube.com/embed/eHTbWtacquk" allowfullscreen="" frameborder="0" height="315" width="420"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;▲ &lt;span style="font-style: italic;"&gt;One of my favourite pop songs&lt;/span&gt; - Carla J Easton (Futuristic Retro Champions). Nuff said.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-4382254018104355403?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/4382254018104355403/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/09/it-will-be-good-day.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/4382254018104355403'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/4382254018104355403'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/09/it-will-be-good-day.html' title='It Will Be A Good Day'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/nYdPtcx-4mo/default.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-4127519264497966585</id><published>2011-09-09T09:14:00.009+01:00</published><updated>2011-09-09T12:34:33.604+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Technology'/><category scheme='http://www.blogger.com/atom/ns#' term='Language'/><category scheme='http://www.blogger.com/atom/ns#' term='Mathematics'/><category scheme='http://www.blogger.com/atom/ns#' term='Coding'/><category scheme='http://www.blogger.com/atom/ns#' term='Logic'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Algebra</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/-2EibilM5GfQ/TmnVc26y_CI/AAAAAAAAA6Q/5Eg96HTpIv4/s1600/Giuseppe_Peano.jpg"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 158px; height: 200px;" src="http://1.bp.blogspot.com/-2EibilM5GfQ/TmnVc26y_CI/AAAAAAAAA6Q/5Eg96HTpIv4/s200/Giuseppe_Peano.jpg" alt="" id="BLOGGER_PHOTO_ID_5650281899268176930" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;Don't you just hate those Microsoft developers?*&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You've just started replacing that fusty old, string-based SQL Builder with a modern, class-based model, featuring fully composable queries, query clauses, and expressions, all the way down to basic arithmetic. Suddenly, they bring out &lt;a href="http://msdn.microsoft.com/en-us/netframework/aa904594"&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;LINQ&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Some time later, recognising the monadic algebra behind the new pattern-based query comprehension keywords, you decide to harness it to implement the &lt;span style="font-style: italic;"&gt;continuation monad&lt;/span&gt;, which will allow you to write asynchronous code in a purely synchronous paradigm. Suddenly, they announce &lt;a href="http://blogs.msdn.com/b/csharpfaq/archive/2010/10/28/async.aspx"&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;async/await&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;No matter how good, how revolutionary your design, the fact remains that you just can't beat a good &lt;span style="font-style: italic;"&gt;keyword&lt;/span&gt;. There's simply no better or more powerful implementation, nothing tidier than a well conceived and designed primary language feature. This observation highlights the need to know thoroughly, completely and perfectly, the nature of the feature under implementation.&lt;br /&gt;&lt;br /&gt;Unless your main business is writing compilers, your greatest enemy is the client specification, perhaps represented by the design engineer, stating non-goals like &lt;span style="font-style: italic;"&gt;there is no requirement to compare or subtract two fields&lt;/span&gt;. Because you know that there will be. And when that requirement is finally unearthed, you will already have been forced down the &lt;span style="font-style: italic;"&gt;Agile&lt;/span&gt; pipe, and have implemented a horribly hobbled subset of the operations that would have been required to express properly a well-formed algebra - of queries, or asynchronous tasks, or whatever.&lt;br /&gt;&lt;br /&gt;The sad truth is that many of us lack the basic mathematical skills to appreciate the seachange wrought on your design by a proper, complete, closed and proven algebra. And while the scope for such effort and expenditure by application developers continues to shrink, and a good job too, with the increasing power and usability of production compilers and other tools; still it is imperative to be ready to identify such situations when they do occur, and to be prepared to design the solution along veins of sound, algebraic principles.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Vindication&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Eric Lippert's &lt;a href="http://blogs.msdn.com/b/ericlippert/archive/2011/09/07/what-is-this-thing-you-call-a-quot-type-quot-part-two.aspx"&gt;latest blog article&lt;/a&gt; is a beautiful exercise in such pure, abstract, algebraic thinking, and brilliantly displays its payoff. He asks, what in C# is a &lt;span style="font-style: italic;"&gt;type?&lt;/span&gt; The naive answers most of us would propose, these have all by now been discounted with the aid of counterexamples, in the &lt;a href="http://blogs.msdn.com/b/ericlippert/archive/2011/08/29/what-is-this-thing-you-call-a-quot-type-quot-part-one.aspx"&gt;predecessor article&lt;/a&gt;. A type is &lt;span style="font-style: italic;"&gt;not&lt;/span&gt; a name with a set of values. Neither can it be defined as a set of assignment rules. Still less is a type some kind of predicate for determining which among an infinite set of values belong to it. Eric demonstrates the strictly formal application of mathematical logic at work in his conception, when he actually makes essential use of &lt;a href="http://en.wikipedia.org/wiki/Russell%27s_paradox"&gt;Russell's Paradox&lt;/a&gt; in proving the inadequacy of these attempts!&lt;br /&gt;&lt;br /&gt;A type, in the mind of compiler writer Eric, is nothing more than &lt;span style="font-style: italic;"&gt;an abstract mathematical entity obeying certain algebraic rules&lt;/span&gt;. He follows this definition with a good analogy based on &lt;a href="http://en.wikipedia.org/wiki/Giuseppe_Peano"&gt;Giuseppe Peano&lt;/a&gt;'s axiomatic definition of &lt;span style="font-style: italic;"&gt;natural number&lt;/span&gt;. Turning back to his equally axiomatic &lt;span style="font-style: italic;"&gt;type&lt;/span&gt; definition, he then shows how its axioms can be used to construct compile-time proofs of runtime type safety (ignoring temporarily wrinkles like the &lt;span style="font-weight: bold;"&gt;cast&lt;/span&gt; operator, or &lt;a href="http://blogs.msdn.com/b/ericlippert/archive/2007/10/17/covariance-and-contravariance-in-c-part-two-array-covariance.aspx"&gt;unsafe array covariance&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;But perhaps the best illustration of the power of the abstract analytical approach is seen when he dips into Gödel's undecidability results, and identifies areas where such proofs cannot be constructed reliably. The lesson here is that still, the formal analysis rigorously controls the progress toward a compiler solution; this time accurately and unambiguously delineating the "holes in the road" where practical workarounds must be applied, or where - in measurably unrealistic, and perfectly predictable situations - a compiler failure can be tolerated.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Expression too complex to analyse.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;font-size:85%;" &gt;Pic: Giuseppe Peano, from &lt;a href="http://en.wikipedia.org/wiki/File:Giuseppe_Peano.jpg"&gt;Wikipedia&lt;/a&gt;. Not actually a Microsoft dev.&lt;br /&gt;*I just love those Microsoft developers!&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-4127519264497966585?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/4127519264497966585/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/09/algebra.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/4127519264497966585'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/4127519264497966585'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/09/algebra.html' title='Algebra'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-2EibilM5GfQ/TmnVc26y_CI/AAAAAAAAA6Q/5Eg96HTpIv4/s72-c/Giuseppe_Peano.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-3035931963641227319</id><published>2011-09-08T11:00:00.011+01:00</published><updated>2011-09-09T09:11:19.672+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><title type='text'>Project Security Review #1</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/-5v4CY1NDdOY/Tmi0vlOCLTI/AAAAAAAAA5g/vKfDvR2Asi0/s1600/EoP_S.png"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 57px; height: 62px;" src="http://3.bp.blogspot.com/-5v4CY1NDdOY/Tmi0vlOCLTI/AAAAAAAAA5g/vKfDvR2Asi0/s200/EoP_S.png" alt="" id="BLOGGER_PHOTO_ID_5649964462074113330" border="0" /&gt;&lt;/a&gt;&lt;a href="http://www.microsoft.com/security/sdl/adopt/threatmodeling.aspx"&gt;&lt;span style="font-weight: bold;"&gt;Threat Modelling&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/-CEv8ZPrzFlQ/Tmi1LyQU4rI/AAAAAAAAA5o/5OVltVardXw/s1600/EoP_T.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 46px; height: 63px;" src="http://2.bp.blogspot.com/-CEv8ZPrzFlQ/Tmi1LyQU4rI/AAAAAAAAA5o/5OVltVardXw/s200/EoP_T.png" alt="" id="BLOGGER_PHOTO_ID_5649964946609726130" border="0" /&gt;&lt;/a&gt;Now we're really moving! It might only have been a 90 minute session last thing in the working day, but yesterday, we finally managed to convene our very first, "formal", Threat Modelling meeting.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Summary&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://2.bp.blogspot.com/-MBapvK0_Spw/Tmi1bkC5HFI/AAAAAAAAA5w/r6C9UDA_duY/s1600/EoP_R.png"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 40px; height: 53px;" src="http://2.bp.blogspot.com/-MBapvK0_Spw/Tmi1bkC5HFI/AAAAAAAAA5w/r6C9UDA_duY/s200/EoP_R.png" alt="" id="BLOGGER_PHOTO_ID_5649965217673190482" border="0" /&gt;&lt;/a&gt;Good representation - included people from across the spectra of projects, departments, job descriptions and levels - including &lt;span style="font-style: italic;"&gt;director!&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Refresher coverage of threat / vulnerability terminology and &lt;a href="http://en.wikipedia.org/wiki/STRIDE_%28security%29"&gt;STRIDE&lt;/a&gt; classifications.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Brief look at the latest SDL Threat Modelling software - well, at least it installed and ran OK - but we reverted to a big whiteboard &lt;span style="font-style: italic;"&gt;(thanks Colin!)&lt;/span&gt;, and directed most of our efforts to:&lt;/li&gt;&lt;/ul&gt;&lt;a href="http://1.bp.blogspot.com/-EyLoKuYqMSQ/Tmi1pAoqAGI/AAAAAAAAA54/R0VpEveWyz4/s1600/EoP_I.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 68px; height: 54px;" src="http://1.bp.blogspot.com/-EyLoKuYqMSQ/Tmi1pAoqAGI/AAAAAAAAA54/R0VpEveWyz4/s200/EoP_I.png" alt="" id="BLOGGER_PHOTO_ID_5649965448686076002" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;A Game Of Cards&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Yes, we finally got to take the wrapper off Adam Shostick's deck, and play a round of &lt;a href="http://www.microsoft.com/security/sdl/adopt/eop.aspx"&gt;Elevation Of Privilege&lt;/a&gt;. Now when I say "a round" I really mean "one trick", as it took the best part of an hour to get just those seven cards played. That also meant that we really concentrated on just &lt;span style="font-style: italic;"&gt;Tampering&lt;/span&gt; vulnerabilities for the whole session, since it's built into the rules of the game that you must start with that suit.&lt;a href="http://4.bp.blogspot.com/-oZLM_HupNOg/Tmi1y336TXI/AAAAAAAAA6A/wam3IlUh5Z8/s1600/EoP_D.png"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 54px; height: 68px;" src="http://4.bp.blogspot.com/-oZLM_HupNOg/Tmi1y336TXI/AAAAAAAAA6A/wam3IlUh5Z8/s200/EoP_D.png" alt="" id="BLOGGER_PHOTO_ID_5649965618132831602" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/-Sw3vUStdKV0/Tmi15k18D0I/AAAAAAAAA6I/gLRMga39wPA/s1600/EoP_E.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 67px; height: 54px;" src="http://1.bp.blogspot.com/-Sw3vUStdKV0/Tmi15k18D0I/AAAAAAAAA6I/gLRMga39wPA/s200/EoP_E.png" alt="" id="BLOGGER_PHOTO_ID_5649965733283368770" border="0" /&gt;&lt;/a&gt;And that was one of the main lessons learned from this exercise. The card game exists only to facilitate and drive forward the brainstorming exercise. It dislodges little hints of system vulnerabilities, encouraging their discussion in a welcoming, improv-style, "Yes, and..." atmosphere. Anything that impedes this process needs to be removed, even when that involves abandoning or changing certain rules of the game.&lt;br /&gt;&lt;br /&gt;Now I just have to get that &lt;a href="http://msdn.microsoft.com/en-us/magazine/cc163519.aspx"&gt;Data Flow Diagram&lt;/a&gt; tidied up and entered into the &lt;a href="http://www.microsoft.com/security/sdl/adopt/threatmodeling.aspx"&gt;Threat Modelling tool&lt;/a&gt;, in time for the imminent follow-up...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-3035931963641227319?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/3035931963641227319/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/09/project-security-review-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/3035931963641227319'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/3035931963641227319'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/09/project-security-review-1.html' title='Project Security Review #1'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-5v4CY1NDdOY/Tmi0vlOCLTI/AAAAAAAAA5g/vKfDvR2Asi0/s72-c/EoP_S.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-6565409023358136049</id><published>2011-09-04T07:53:00.005+01:00</published><updated>2011-09-07T12:09:51.806+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Books'/><category scheme='http://www.blogger.com/atom/ns#' term='Politics'/><category scheme='http://www.blogger.com/atom/ns#' term='SF'/><title type='text'>Hannes Bok</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.thewaythefutureblogs.com/2011/09/hannes-bok-futurian-artist-in-chief/"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 200px; height: 190px;" src="http://3.bp.blogspot.com/-B-r_Mcz2jXc/TmMgyoKLGxI/AAAAAAAAA5Y/m0sBWoeGzqU/s200/fred_bok.jpg" alt="" id="BLOGGER_PHOTO_ID_5648394411798371090" border="0" /&gt;&lt;/a&gt;&lt;a href="http://www.thewaythefutureblogs.com/2011/09/hannes-bok-futurian-artist-in-chief/"&gt;&lt;span style="font-weight:bold;"&gt;The Futurian Artist in Chief&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Inveterate name dropper Fred Pohl's first hand reminiscences on the early history of SF, memories from the elder half of the previous century, continue to amaze me with their depth and clarity. Meanwhile his blog sparkles too with pithy one-liners and snarky, short form, political comment. ♥&lt;br /&gt;&lt;br /&gt;This weekend's treat: part one of a biographical sketch of Hannes Bok (real name Wayne Woodard), the only member of the pro-crashed fan club &lt;a href="http://fancyclopedia.editme.com/FUTURIAN"&gt;Futurians of New York&lt;/a&gt; ever to win a Hugo for illustrative drawing and painting. The story covers his fortuitous early association with one aspiring writer named Ray Bradbury, and the role played by the first ever &lt;a href="http://fanac.org/worldcon/NYcon/w39-p00.html"&gt;World Science Fiction Convention&lt;/a&gt; &lt;span style="font-style: italic;"&gt;(WorldCon)&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Update (Sep 7):&lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://www.thewaythefutureblogs.com/2011/09/hannes-bok-futurian-artist-in-chief/"&gt;Futurian Artist in Chief&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.thewaythefutureblogs.com/2011/09/hannes-bok-part-2-the-story-with-the-unhappy-ending/"&gt;The story with the unhappy ending&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-6565409023358136049?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/6565409023358136049/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/09/hannes-bok.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/6565409023358136049'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/6565409023358136049'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/09/hannes-bok.html' title='Hannes Bok'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-B-r_Mcz2jXc/TmMgyoKLGxI/AAAAAAAAA5Y/m0sBWoeGzqU/s72-c/fred_bok.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-8988829102958731497</id><published>2011-08-26T10:46:00.005+01:00</published><updated>2011-08-27T10:58:06.916+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WTF'/><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><title type='text'>Hunter Two</title><content type='html'>&lt;span style="font-weight:bold;"&gt;Via &lt;a href="http://bash.org/?244321"&gt;bash.org&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I telephoned the 90s, and overheard this chat on IRC:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;[Cthon98]&lt;/span&gt; hey, if you type in your password, it will show as stars&lt;br /&gt;&lt;span style="font-style: italic;"&gt;[Cthon98]&lt;/span&gt; ********* see!&lt;br /&gt;&lt;span style="font-style: italic;"&gt;[AzureDiamond]&lt;/span&gt; hunter2&lt;br /&gt;&lt;span style="font-style: italic;"&gt;[AzureDiamond]&lt;/span&gt; doesn't look like stars to me&lt;br /&gt;&lt;span style="font-style: italic;"&gt;[Cthon98]&lt;/span&gt; [AzureDiamond] *******&lt;br /&gt;&lt;span style="font-style: italic;"&gt;[Cthon98]&lt;/span&gt; that's what I see&lt;br /&gt;&lt;span style="font-style: italic;"&gt;[AzureDiamond]&lt;/span&gt; oh, really?&lt;br /&gt;&lt;span style="font-style: italic;"&gt;[Cthon98]&lt;/span&gt; Absolutely&lt;br /&gt;&lt;span style="font-style: italic;"&gt;[AzureDiamond]&lt;/span&gt; you can go hunter2 my hunter2-ing hunter2&lt;br /&gt;&lt;span style="font-style: italic;"&gt;[AzureDiamond]&lt;/span&gt; haha, does that look funny to you?&lt;br /&gt;&lt;span style="font-style: italic;"&gt;[Cthon98]&lt;/span&gt; lol, yes. See, when YOU type hunter2, it shows to us as *******&lt;br /&gt;&lt;span style="font-style: italic;"&gt;[AzureDiamond]&lt;/span&gt; that's neat, I didnt know IRC did that&lt;br /&gt;&lt;span style="font-style: italic;"&gt;[Cthon98]&lt;/span&gt; yep, no matter how many times you type hunter2, it will show to us as *******&lt;br /&gt;&lt;span style="font-style: italic;"&gt;[AzureDiamond]&lt;/span&gt; awesome!&lt;br /&gt;&lt;br /&gt;(pause)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;[AzureDiamond]&lt;/span&gt; wait, how do you know my password?&lt;br /&gt;&lt;br /&gt;(pause)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;[Cthon98]&lt;/span&gt; I just copy pasted YOUR ******'s and it appears to YOU as hunter2 cause it's your password&lt;br /&gt;&lt;span style="font-style: italic;"&gt;[AzureDiamond]&lt;/span&gt; oh, ok.&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-8988829102958731497?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/8988829102958731497/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/08/hunter-two.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/8988829102958731497'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/8988829102958731497'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/08/hunter-two.html' title='Hunter Two'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-3174116539821303550</id><published>2011-08-26T09:50:00.010+01:00</published><updated>2011-08-27T10:59:00.938+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><category scheme='http://www.blogger.com/atom/ns#' term='Regular Expressions'/><title type='text'>SDL Tools TFS 2010 Update</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://blogs.msdn.com/b/sdl/archive/2011/08/25/updates-to-sdl-tools-are-now-available.aspx"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 200px; height: 200px;" src="http://4.bp.blogspot.com/-Ve4xuX6t3w8/TldivaUVBgI/AAAAAAAAA5Q/SqyMZiU61p4/s200/SDL.jpg" alt="" id="BLOGGER_PHOTO_ID_5645089224590165506" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;Better, Late&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Team Foundation Server 2010 takes credit for most of the &lt;a href="http://blogs.msdn.com/b/sdl/archive/2011/08/25/updates-to-sdl-tools-are-now-available.aspx"&gt;just-released updates&lt;/a&gt; to Microsoft's SDL toolset:&lt;br /&gt;&lt;br /&gt;&lt;a style="font-weight: bold;" href="http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;amp;id=2955"&gt;Threat Modeling Tool v3.1.8&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The main pre-coding system security analysis tool has been updated with a number of bug fixes, improving the stability of the product's Visio 2010 and TFS 2010 support. &lt;a href="http://www.microsoft.com/download/en/confirmation.aspx?id=2955"&gt;6MB msi&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a style="font-weight: bold;" href="http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;amp;id=21769"&gt;MiniFuzz Tool v1.5.5&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This SDL verification phase helper has also benefited from several stability-related bug fixes, and improved control of target application shutdown. It too has had TFS 2010 support added. &lt;a href="http://www.microsoft.com/download/en/confirmation.aspx?id=21769"&gt;2MB msi&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a style="font-weight: bold;" href="http://www.microsoft.com/download/en/details.aspx?id=20095"&gt;RegExFuzz Tool v1.1.0&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;H Beam Piper and John Scalzi's retro SF aside, this is my favourite little fuzzy. It allows checking against a specific class of DoS attack, via regular expression patterns with exponential evaluation times. The update again contains a number of bug fixes based on version 1 feedback. &lt;a href="http://www.microsoft.com/download/en/confirmation.aspx?id=20095"&gt;2MB msi&lt;/a&gt;.  Unfortunately there are still a couple of unresolved known issues, albeit fairly minor ones. From the supplied documentation &lt;span style="font-style: italic;"&gt;(ReadMe.rtf):&lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;The tool does not handle nested anchors in a regular expression. A regular expression can be assumed to start with ‘^’ and ended with ‘$’. If these tags or their variants are included in a target regular expression, the tool will throw an unhandled exception. The work-around is to break up the nested regular expression and test the resulting regular expressions individually.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;The tool requires that hexadecimal (‘\x’ prefix) characters within the regular expression be 2 characters. Those with a 0-padding assumed single character description will cause the tool to throw an unhandled exception. The work-around is to make all hexadecimal character descriptions two characters ‘\xCC’.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-3174116539821303550?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/3174116539821303550/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/08/sdl-tools-tfs-2010-update.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/3174116539821303550'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/3174116539821303550'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/08/sdl-tools-tfs-2010-update.html' title='SDL Tools TFS 2010 Update'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-Ve4xuX6t3w8/TldivaUVBgI/AAAAAAAAA5Q/SqyMZiU61p4/s72-c/SDL.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-1993019357382127216</id><published>2011-08-23T15:18:00.009+01:00</published><updated>2011-08-23T23:27:19.708+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><category scheme='http://www.blogger.com/atom/ns#' term='Personal'/><category scheme='http://www.blogger.com/atom/ns#' term='Privacy'/><title type='text'>FOADIACFWLS</title><content type='html'>&lt;a style="font-weight: bold;" href="http://www.bbc.co.uk/news/uk-11754487"&gt;Turning the Heat on the Cold Callers&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Got another phone call yesterday from a lady in India, number withheld, asking if I had a Windows PC. &lt;span style="font-style: italic;"&gt;None of your business&lt;/span&gt;, I informed her. &lt;span style="font-style: italic;"&gt;It may be none of my business, but we are having a lot of trouble with the infections on your computer!&lt;/span&gt; she offered.&lt;br /&gt;&lt;br /&gt;I thought about stringing her along, as I usually do; but I was busy. I had work to do. And I'm getting a bit tired of these organised criminal gangs of cold calling bastards, ripping off innocent and vulnerable users for hundreds of pounds with their fake antivirus scams. So on something of an impulse, I suggested: &lt;span style="font-style: italic;"&gt;Fuck off and die in a car fire with leather seats!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Her immediate response was: &lt;span style="font-style: italic;"&gt;You fuck off, you son of a bitch. [click] [bzzz]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now I'm going to take a wild guess, that a genuine technical support organisation would have had a much higher level of professionalism than &lt;span style="font-style: italic;"&gt;that&lt;/span&gt;. Maybe next time I'll go with &lt;span style="font-style:italic;"&gt;I can tell you I don't have money. But what I do have are a very particular set of skills...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span jsid="text"&gt;Oh! and also, wouldn't it be great, using a combo of tech, psych, and you know, Jeff Goldblum, to be able to upload a virus to &lt;span style="font-style: italic;"&gt;them?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-1993019357382127216?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/1993019357382127216/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/08/foadiacfwls.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/1993019357382127216'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/1993019357382127216'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/08/foadiacfwls.html' title='FOADIACFWLS'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-1099619259492107548</id><published>2011-08-21T15:22:00.005+01:00</published><updated>2011-08-21T15:45:46.006+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Technology'/><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><category scheme='http://www.blogger.com/atom/ns#' term='Books'/><category scheme='http://www.blogger.com/atom/ns#' term='SF'/><title type='text'>Cheap Chips and Network Security</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.antipope.org/charlie/blog-static/2011/08/what-am-i-missing.html"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 90px; height: 90px;" src="http://4.bp.blogspot.com/-YcGUDCc0MLM/TlEVeIgsN8I/AAAAAAAAA5I/-c_nONWqAy4/s200/CStross.png" alt="" id="BLOGGER_PHOTO_ID_5643315415496800194" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;(Via &lt;/span&gt;&lt;a style="font-weight: bold;" href="http://www.antipope.org/charlie/blog-static/2011/08/what-am-i-missing.html"&gt;Charlie Stross&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;In 1980 two eminent computer scientists were discussing trends in microprocessor production. One objected to the other's claim, "But there's no market for such cheap chips! What are you going to do, embed them in door handles?"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Five years later, checking into a hotel, he suddenly realized he was using a magstripe card to open his room door. There was a microprocessor in the door handle.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.antipope.org/charlie/blog-static/2011/08/what-am-i-missing.html"&gt;This piece&lt;/a&gt; is an extension to Charlie's brilliant, speculative &lt;a style="font-style: italic;" href="http://www.antipope.org/charlie/blog-static/2011/08/usenix-2011-keynote-network-se.html"&gt;USENIX 2011 Keynote&lt;/a&gt;&lt;span style="font-style: italic;"&gt;: Network Security in the Medium Term, 2061-2561 AD&lt;/span&gt;. Both articles are highly informative and entertaining, written by one of our greatest living Science Fiction novelists - who also happens to have penned the first published "mainstream" technical review of Linux (in 1994), among scores of similar articles during his tenure at &lt;a href="http://www.antipope.org/charlie/old/linux/index.html"&gt;Computer Shopper&lt;/a&gt;. And both are, of course, highly recommended reading.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-1099619259492107548?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/1099619259492107548/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/08/cheap-chips-and-network-security.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/1099619259492107548'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/1099619259492107548'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/08/cheap-chips-and-network-security.html' title='Cheap Chips and Network Security'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-YcGUDCc0MLM/TlEVeIgsN8I/AAAAAAAAA5I/-c_nONWqAy4/s72-c/CStross.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-344179991021353987</id><published>2011-08-11T12:23:00.028+01:00</published><updated>2011-08-27T11:24:08.005+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Regular Expressions'/><category scheme='http://www.blogger.com/atom/ns#' term='Coding'/><title type='text'>Simple Regular Expressions #4</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/-gsMz3zwxHCo/TkPS85PTikI/AAAAAAAAA5A/mGIwGsSm7a0/s1600/css-is-awesome.jpg"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 200px; height: 195px;" src="http://4.bp.blogspot.com/-gsMz3zwxHCo/TkPS85PTikI/AAAAAAAAA5A/mGIwGsSm7a0/s200/css-is-awesome.jpg" alt="" id="BLOGGER_PHOTO_ID_5639583101996993090" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight:bold;"&gt;That Old Saw&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Another Regex question, another blog post! This time, Colleague A wants to highlight search terms by inserting some CSS spans into his HTML. It's the old problem of ignoring the content of tags during substitution. For example, suppose he highlights the search term &lt;span style="font-style: italic;"&gt;school&lt;/span&gt; by applying the CSS &lt;span style="font-weight: bold;"&gt;class&lt;/span&gt; &lt;span style="font-style: italic;"&gt;xred&lt;/span&gt;. This causes injection of spans like this into his output:&lt;br /&gt;&lt;blockquote&gt;Alan went to class at &amp;lt;span &lt;span style="font-weight: bold;"&gt;class&lt;/span&gt;="xred"&amp;gt;school&amp;lt;/span&amp;gt; next day.&lt;/blockquote&gt;So far the rendering is as expected:&lt;blockquote&gt;Alan went to class at &lt;span style="color: rgb(204, 0, 0); font-weight: bold;"&gt;school&lt;/span&gt; next day.&lt;/blockquote&gt;Trouble is, he next wants to highlight the search term &lt;span style="font-style: italic;"&gt;class&lt;/span&gt; in &lt;span style="font-style: italic;"&gt;xgreen&lt;/span&gt;:&lt;br /&gt;&lt;blockquote&gt;Alan went to &lt;span style="color: rgb(0, 153, 0); font-weight: bold;"&gt;class&lt;/span&gt; at &lt;span style="color: rgb(204, 0, 0); font-weight: bold;"&gt;school&lt;/span&gt; next day.&lt;/blockquote&gt;Doing another simple replace operation would cause the new, "false positive" instances of the term &lt;span style="font-style: italic;"&gt;class&lt;/span&gt; (occurring within the previously added HTML tags) to be incorrectly incorporated into new &lt;span style="font-style: italic;"&gt;xgreen&lt;/span&gt; spans, resulting instead in invalid markup, and an onscreen train wreck.&lt;blockquote&gt;Alan went to class at class="xred"&amp;gt;school next day.&lt;/blockquote&gt;The following method of avoiding substitutions within tags is far from the best available solution, even among those offered by Regex. However, it does provide a conveniently simple example to let me introduce another Regex concept, namely &lt;span style="font-style: italic;"&gt;Assertions&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Zero Width Assertions&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In the context of regular expressions, an assertion is simply a statement about the &lt;span style="font-style: italic;"&gt;context&lt;/span&gt; of the current match. The simplest examples are the "begins with", "ends with" and "exact match" assertions, which use the &lt;span style="font-weight: bold;"&gt;^&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;$&lt;/span&gt; characters to match the beginning and end of the line, respectively. Suppose our input is &lt;span style="font-weight: bold;"&gt;12345&lt;/span&gt;. Then the pattern &lt;span style="font-weight: bold;"&gt;234&lt;/span&gt; will match this successfully. The pattern &lt;span style="font-weight: bold;"&gt;^234&lt;/span&gt; will not, because the caret ^ constrains the matching to occur at the &lt;span style="font-style: italic;"&gt;start&lt;/span&gt; of the input string, and ours does not start with &lt;span style="font-weight: bold;"&gt;234&lt;/span&gt; (the pattern &lt;span style="font-weight: bold;"&gt;^123&lt;/span&gt; will of course succeed). Similarly in the pattern &lt;span style="font-weight: bold;"&gt;234$&lt;/span&gt;, the dollar &lt;span style="font-weight: bold;"&gt;$&lt;/span&gt; constrains the matching to occur at the &lt;span style="font-style: italic;"&gt;end&lt;/span&gt; of the input string, and so this will also fail to match our input, whereas &lt;span style="font-weight: bold;"&gt;345$&lt;/span&gt; will succeed. Finally, using both assertions, &lt;span style="font-weight: bold;"&gt;^12345$&lt;/span&gt; will match only the entire input string &lt;span style="font-weight: bold;"&gt;12345&lt;/span&gt;, while any other sub-pattern such as &lt;span style="font-weight: bold;"&gt;^1234$&lt;/span&gt; fails.&lt;br /&gt;&lt;br /&gt;These two meta characters are examples of &lt;span style="font-style: italic;"&gt;atomic&lt;/span&gt; zero-width assertions, also known as &lt;a href="http://msdn.microsoft.com/en-us/library/az24scfc.aspx#atomic_zerowidth_assertions"&gt;&lt;span style="font-style: italic;"&gt;anchors&lt;/span&gt;&lt;/a&gt;. &lt;span style="font-style: italic;"&gt;Zero-width&lt;/span&gt; means that they do not cause the engine to advance through the string or consume characters; they just assert something about the current position in the input. There are several other anchors, but now I want to turn to more general assertions.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Assertion Types&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Both of the above examples can be characterised as &lt;span style="font-style: italic;"&gt;positive&lt;/span&gt; assertions, in that they require something to be &lt;span style="font-style: italic;"&gt;true&lt;/span&gt; about the current position; namely that it &lt;span style="font-style: italic;"&gt;is&lt;/span&gt; the start, or end, of the line. You could imagine another assertion type, where you want to match a particular sequence anywhere &lt;span style="font-style: italic;"&gt;except&lt;/span&gt; either or both of those positions. And yes, such &lt;span style="font-style: italic;"&gt;negative&lt;/span&gt; assertions are available, as we'll soon see.&lt;br /&gt;&lt;br /&gt;Another characteristic of assertions is the direction they face. The caret &lt;span style="font-weight: bold;"&gt;^&lt;/span&gt; is termed a &lt;span style="font-style: italic;"&gt;look-behind&lt;/span&gt; assertion; it states that no input exists before the current position. Similarly the dollar &lt;span style="font-weight: bold;"&gt;$&lt;/span&gt; is termed &lt;span style="font-style: italic;"&gt;look-ahead&lt;/span&gt;, as it states there's no further input available beyond the current position.&lt;br /&gt;&lt;br /&gt;Finally, the new assertions I'm about to introduce, while still zero-width, are no longer atomic. Instead of referring to known fixed points, such as the beginning or end of the string, line, previous match, or word/non-word boundary, these new assertions contain their own independent &lt;span style="font-style: italic;"&gt;subexpression&lt;/span&gt; patterns, which they assert &lt;span style="font-style: italic;"&gt;do&lt;/span&gt; (or &lt;span style="font-style: italic;"&gt;do not&lt;/span&gt;) occur immediately &lt;span style="font-style: italic;"&gt;before&lt;/span&gt; (or &lt;span style="font-style: italic;"&gt;after&lt;/span&gt;) the current position in the input. The parentheses here reflect the difference between &lt;span style="font-style: italic;"&gt;positive&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;negative&lt;/span&gt; assertions, and between &lt;span style="font-style: italic;"&gt;look-behind&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;look-ahead&lt;/span&gt; behaviour. So there have to be four types, right?&lt;br /&gt;&lt;br /&gt;They all use syntax similar to grouping constructs. &lt;span style="font-style: italic;"&gt;Positive&lt;/span&gt; assertions are indicated by &lt;span style="font-weight: bold;"&gt;=&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;negative&lt;/span&gt; by &lt;span style="font-weight: bold;"&gt;!&lt;/span&gt;. By default these are assumed to be &lt;span style="font-style: italic;"&gt;look-ahead&lt;/span&gt;, unless prefixed by &lt;span style="font-weight: bold;"&gt;&amp;lt;&lt;/span&gt; to signify &lt;span style="font-style: italic;"&gt;look-behind&lt;/span&gt;.&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-style: italic;"&gt;positive look-ahead&lt;/span&gt;: (?= subexpression)&lt;br /&gt;&lt;span style="font-style: italic;"&gt;negative look-ahead&lt;/span&gt;: (?! subexpression)&lt;br /&gt;&lt;span style="font-style: italic;"&gt;positive look-behind&lt;/span&gt;: (?&amp;lt;= subexpression) ◀ this is the one we are going to use&lt;br /&gt;&lt;span style="font-style: italic;"&gt;negative look-behind&lt;/span&gt;: (?&amp;lt;! subexpression)&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;Back To Highlighting&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Refer to &lt;a href="http://msdn.microsoft.com/en-us/library/az24scfc.aspx#grouping_constructs"&gt;MSDN&lt;/a&gt; for examples of each of these. Now I just want to finish by showing how a &lt;span style="font-style: italic;"&gt;zero-width positive look-behind assertion&lt;/span&gt; can be used to protect the content of those HTML tags.&lt;br /&gt;&lt;br /&gt;How can we write a pattern to match search terms ignoring tag contents? If we're inside a tag, then there's a &lt;span style="font-weight: bold;"&gt;&amp;lt;&lt;/span&gt; somewhere to our left, as yet unmatched by a closing &lt;span style="font-weight: bold;"&gt;&amp;gt;&lt;/span&gt;, while if we're outside, then either there are no  &lt;span style="font-weight: bold;"&gt;&amp;lt;&lt;/span&gt; on the left, or else every such &lt;span style="font-weight: bold;"&gt;&amp;lt;&lt;/span&gt; is matched by a corresponding &lt;span style="font-weight: bold;"&gt;&amp;gt;&lt;/span&gt; &lt;span style="font-style: italic;"&gt;also on our left&lt;/span&gt;. In other words, we want everything on our left to consist of: start of line &lt;span style="font-weight: bold;"&gt;^&lt;/span&gt;, followed by any number of (a) &lt;span style="color: rgb(204, 0, 0);"&gt;non-&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(204, 0, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(204, 0, 0);"&gt; characters&lt;/span&gt;, or else (b) &lt;span style="font-weight: bold; color: rgb(51, 51, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt; characters&lt;/span&gt; with eventual matching &lt;span style="font-weight: bold; color: rgb(51, 51, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt; characters&lt;/span&gt;:&lt;br /&gt;&lt;blockquote&gt;^(&lt;span style="color: rgb(204, 0, 0);"&gt;[^&amp;lt;]&lt;/span&gt;|&lt;span style="color: rgb(51, 51, 255);"&gt;&amp;lt;[^&amp;gt;]*&amp;gt;&lt;/span&gt;)*&lt;/blockquote&gt;Finally, wrap that as the subexpression in the third template above, and we're done:&lt;br /&gt;&lt;blockquote&gt;(?&amp;lt;=^([^&amp;lt;]|&amp;lt;[^&amp;gt;]*&amp;gt;)*)&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;Code Sample&lt;/span&gt;&lt;br /&gt;&lt;div    style="border: #000080 1px solid;   font-family:'Courier New', Courier, Monospace;font-size:10pt;color:#000;"&gt;&lt;pre&gt;&lt;span style="color:#0000ff;"&gt;private&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;static&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; Highlight(&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; input, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; search, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; cssClassName)&lt;br /&gt;{&lt;br /&gt;  &lt;span style="color:#0000ff;"&gt;const&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; assertion = &lt;span style="color:#a31515;"&gt;"(?&amp;lt;=^([^&amp;lt;]|&amp;lt;[^&amp;gt;]*&amp;gt;)*)"&lt;/span&gt;;&lt;br /&gt;  &lt;span style="color:#0000ff;"&gt;var&lt;/span&gt; pattern = &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Format(&lt;span style="color:#a31515;"&gt;"{0}{1}"&lt;/span&gt;, assertion, search);&lt;br /&gt;  &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;Regex&lt;/span&gt;.Replace(&lt;br /&gt;      input,&lt;br /&gt;      pattern,&lt;br /&gt;      match =&amp;gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Format(&lt;span style="color:#a31515;"&gt;"&amp;lt;span class=\"{0}\"&amp;gt;{1}&amp;lt;/span&amp;gt;"&lt;/span&gt;, cssClassName, match.Value));&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;private&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;static&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; Test()&lt;br /&gt;{&lt;br /&gt;  &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; Highlight(&lt;br /&gt;      &lt;span style="color:#a31515;"&gt;"&amp;lt;span class=\"ignorethisclass\"&amp;gt;This&amp;lt;/span&amp;gt; is the class."&lt;/span&gt;,&lt;br /&gt;      &lt;span style="color:#a31515;"&gt;"class"&lt;/span&gt;,&lt;br /&gt;      &lt;span style="color:#a31515;"&gt;"highlight"&lt;/span&gt;);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#008000;"&gt;// Output: &amp;lt;span class="ignorethisclass"&amp;gt;This&amp;lt;/span&amp;gt; is the &amp;lt;span class="highlight"&amp;gt;class&amp;lt;/span&amp;gt;.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;span style="font-weight: bold;"&gt;Disclaimer&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Remember, this is only an illustrative example. As a practical HTML postprocessing solution, there's still a number of holes in it!&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-344179991021353987?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/344179991021353987/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/08/simple-regular-expressions-4.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/344179991021353987'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/344179991021353987'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/08/simple-regular-expressions-4.html' title='Simple Regular Expressions #4'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-gsMz3zwxHCo/TkPS85PTikI/AAAAAAAAA5A/mGIwGsSm7a0/s72-c/css-is-awesome.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-3947998957888694926</id><published>2011-08-02T20:16:00.006+01:00</published><updated>2011-08-07T16:39:51.133+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Movies'/><category scheme='http://www.blogger.com/atom/ns#' term='Personal'/><title type='text'>Ten Visitors</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Featuring: A Litter of Bichon Frise&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Sounds like a wine order to me! "Waiter, if you would send to my table, a carafe of Pinot Noir. Yes, and a litter of Bichon Frise, thank you."&lt;br /&gt;&lt;br /&gt;&lt;iframe src="http://www.youtube.com/embed/qersPbETQpo" allowfullscreen="" frameborder="0" height="349" width="560"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Half a dozen of the little Water Spaniel / Standard Poodle descendants, who came visiting last night. They brought their parents, Pepi and Popi. And &lt;span style="font-style: italic;"&gt;they&lt;/span&gt; brought their owners, our friends Bojan and Theresa.&lt;br /&gt;&lt;br /&gt;At no point did Linda consider, even for a second, keeping any of them - as you can clearly see from her picture:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/-1-wfpdTULcA/Tj6uYpHCHWI/AAAAAAAAA4Y/Rzg_Dl1Y-jI/s1600/P1010891.JPG"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://1.bp.blogspot.com/-1-wfpdTULcA/Tj6uYpHCHWI/AAAAAAAAA4Y/Rzg_Dl1Y-jI/s400/P1010891.JPG" alt="" id="BLOGGER_PHOTO_ID_5638135521889885538" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;No, not even the one she'd picked out and decided to name "Number Five":&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/-F4mbdTN7DiE/Tj6uy5-1mmI/AAAAAAAAA4g/udIEdIL4gT8/s1600/P1010892.JPG"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://1.bp.blogspot.com/-F4mbdTN7DiE/Tj6uy5-1mmI/AAAAAAAAA4g/udIEdIL4gT8/s400/P1010892.JPG" alt="" id="BLOGGER_PHOTO_ID_5638135973095512674" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If anything my own resolve was tougher still. No way did I want to keep one of these...&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/-L9SsFgNLsjs/Tj6v_qW0-OI/AAAAAAAAA4o/ljHnhT2jfo4/s1600/P1010890.JPG"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://3.bp.blogspot.com/-L9SsFgNLsjs/Tj6v_qW0-OI/AAAAAAAAA4o/ljHnhT2jfo4/s400/P1010890.JPG" alt="" id="BLOGGER_PHOTO_ID_5638137291751094498" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;...never mind two...&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/-gyI189XPRnU/Tj6wX8znuaI/AAAAAAAAA4w/dCUs361dDLg/s1600/P1010889.JPG"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://3.bp.blogspot.com/-gyI189XPRnU/Tj6wX8znuaI/AAAAAAAAA4w/dCUs361dDLg/s400/P1010889.JPG" alt="" id="BLOGGER_PHOTO_ID_5638137709020559778" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;...and least of all, erm, three...&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/-2GP4zscJF4o/Tj6w9dVGScI/AAAAAAAAA44/Q94oa-IQ3-k/s1600/P1010888.JPG"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://4.bp.blogspot.com/-2GP4zscJF4o/Tj6w9dVGScI/AAAAAAAAA44/Q94oa-IQ3-k/s400/P1010888.JPG" alt="" id="BLOGGER_PHOTO_ID_5638138353406069186" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;All too soon, the pups had to be packed away again...&lt;br /&gt;&lt;br /&gt;&lt;iframe src="http://www.youtube.com/embed/K67ctPmsrYQ" allowfullscreen="" frameborder="0" height="349" width="560"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;I do hope that they will all find excellent homes. But not before they've visited us again!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-3947998957888694926?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/3947998957888694926/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/08/ten-visitors.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/3947998957888694926'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/3947998957888694926'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/08/ten-visitors.html' title='Ten Visitors'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/qersPbETQpo/default.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-1149932757860848544</id><published>2011-07-30T13:00:00.010+01:00</published><updated>2011-08-15T10:29:03.660+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Music'/><title type='text'>Yes: Fly From Here</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/-GGSpSvoMJ7Q/TjGpBtNv61I/AAAAAAAAA2o/_ClEHIuVrn8/s1600/Yes-Fly-From-Here-538957.jpg"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 400px; height: 399px;" src="http://1.bp.blogspot.com/-GGSpSvoMJ7Q/TjGpBtNv61I/AAAAAAAAA2o/_ClEHIuVrn8/s400/Yes-Fly-From-Here-538957.jpg" alt="" id="BLOGGER_PHOTO_ID_5634470455599426386" border="0" /&gt;&lt;/a&gt;I'm in a minority, albeit far from unique within the Yes fan base, in being already aware of - in fact, for decades very familiar with - the musical sapling at the centre of this new Yes album. That was due to my extensive &lt;a href="http://jmkerr.com/db/"&gt;collection&lt;/a&gt; of live bootleg CDs of the band, at one point containing several thousand discs.&lt;br /&gt;&lt;br /&gt;The Horn/Downes penned demo &lt;span style="font-style: italic;"&gt;We Can Fly From Here&lt;/span&gt; was played at a total of 67 shows on the 1980 &lt;a style="font-style: italic;" href="http://en.wikipedia.org/wiki/Drama_%28Yes_album%29"&gt;Drama&lt;/a&gt; tour of North America and Europe. I owned recordings of 32 of these performances.&lt;br /&gt;&lt;br /&gt;Despite its live coverage, the song was never included on a studio album. Not even on the 2004 Rhino release of &lt;span style="font-style: italic;"&gt;Drama&lt;/span&gt;, expanded though that was from 6 to 16 tracks, with the inclusion of much bonus material, some less worthy. Though it did have an official live release in 2005, on the Rhino live box set &lt;a href="http://en.wikipedia.org/wiki/The_Word_is_Live"&gt;&lt;span style="font-style: italic;"&gt;The Word Is Live&lt;/span&gt;&lt;/a&gt;, it wasn't until this most recent blinding roundabout of personnel changes, ending in the reunion of core Yes men Chris, Steve and Alan, with the song's original writers, that a studio release became a possibility. And actually, much more than that.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Old School Prog&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To say that I disapproved of the replacement, in 1980, of angelic but abstract singer/lyricist Jon Anderson, and classically trained keyboard maestro Rick Wakeman, by those two &lt;span style="font-style: italic;"&gt;Age Of Plastic&lt;/span&gt; Buggles Trevor Horn and Geoff Downes, would be completely to misapply the moderate and perfectly serviceable concept of disapproval. In fact, I suffered a complete breakdown of rationality, an implosion of incredulity, which sounded a little like this: &lt;span style="font-style: italic;"&gt;What? The! Fuck?!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Looking back, I knew nothing about record production, and so missed the fact that a lot of the best and my favourite 80s pop - Propaganda, Frankie Goes To Hollywood (with Steve Howe on guitars!), Art Of Noise, Lisa Stansfield, Simple Minds - all was Trevor Horn produced.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Fly From Here&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The main, 25 minute, 6 part epic (including the now obligatory &lt;span style="font-style: italic;"&gt;Overture&lt;/span&gt;) is not at all bombastic, quite the opposite; for the most part it canters and trots a few simple themes which weave around themselves, or around light relief at one stage reminiscent of Zappa's &lt;span style="font-style: italic;"&gt;Tink Walks Amok&lt;/span&gt;. All the same, and following in the tradition of their peerless &lt;a href="http://en.wikipedia.org/wiki/Close_to_the_Edge_%28song%29"&gt;&lt;span style="font-style: italic;"&gt;Close To The Edge&lt;/span&gt;&lt;/a&gt;, which grew out of a single melodic idea by Steve Howe, it is unmistakably an old school Yes reworking of seed material, by way of thematic contributions from all band members, into a thing of epic scale.&lt;br /&gt;&lt;br /&gt;It also shares a lot more than just structural outline and scale with its 1973 predecessor. Simplicity for one thing, in both its wondrously plain but beautiful musical motifs, and its simplistic lyrics. &lt;span style="font-style: italic;"&gt;I get up, I get down&lt;/span&gt; has become a static descriptive thread about an abandoned airfield. Then too there's variety of texture, with its &lt;span style="font-style: italic;"&gt;Madman at the Screens&lt;/span&gt; diversion, or the madly sauntering, Howe-penned &lt;span style="font-style: italic;"&gt;Bumpy Ride&lt;/span&gt;. And it all ends, of course, with the equally obligatory &lt;span style="font-style: italic;"&gt;Reprise&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;This analysis of the title piece is borne out during the 18½ minute "Making Of" DVD, which came free with my copy. Everyone interviewed attests to the same narrative of frictionless collaboration and inclusiveness. Production god Trevor Horn tellingly emphasises, "I didn't want anything &lt;span style="font-style: italic;"&gt;programmed&lt;/span&gt;," shaking and lowering his head as if discarding too heavy, unpleasant baggage; "I wanted it to sound more like the band sounded in the 70s, necessarily, than the band sounded in the 80s." Steve Howe cements the account: "It would be an illusion to say: Ah! This record sounds like the 70s. But the thing might be, there might be a concept in our new album, &lt;span style="font-style: italic;"&gt;Fly From Here&lt;/span&gt;, that does carry a lot of that 70s... but it's not about copying the sound, it's really about just thinking in that way."&lt;br /&gt;&lt;br /&gt;By turns anthemic, acoustic, inspirational, soft, rocking, and diverting, the album's centrepiece is an unconditional melodic, harmonic, rhythmic and organisational success. As for the remaining tracks...&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The Man You Always Wanted Me To Be&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A love song with melodic hooks and an irresistible message. Uncomplicated pop, flavoured with the soft rock sensibility of Downes' and Howe's &lt;span style="font-style: italic;"&gt;Asia&lt;/span&gt; work.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Life on a Film Set&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Another Buggles written reworking. Starts off slow and acoustic, then switched midstream to a fiesta dance, eleven to the bar. Nice cross-cutting solo guitar work from Steve. &lt;span style="font-style: italic;"&gt;Yes!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Hour of Need&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The Japanese release has an extended version of this song, a ballad written by Steve Howe. I'll withhold my verdict until I manage to get hold of that, as it's reputed to be a great improvement on this little three minute ditty.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Solitaire&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is my favourite Steve Howe solo work, out of the entire canon comprising his own solo releases and those acoustic spots with Yes. Many long time fellow Yes fans have already disagreed with me on this, but I hear the richest ever concatenation of varied guitar styles, the most accurate fretboard and pick fingering, and melodies mostly sweet, only occasionally and at the very end, minor and sinister.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Into the Storm&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A strong finish, again featuring some great solo work by Steve, who appears to have gone all out for quality over number of notes this time.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Conclusion!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Fly From Here&lt;/span&gt; is a great little album with a clearly retro sensibility. One I felt inspired and obliged to write about at length. One that deserves a chance of commercial success, however unlikely that might be for almost any artist today, least of all a 40+ year old progressive rock outfit. The overall sound can be summed up by saying &lt;span style="font-style: italic;"&gt;you can hear all the instruments&lt;/span&gt;, something unfashionable given recent fads for production munge*, compression and clipping. Also something at which the previous album, 2001's Magnification &lt;span style="font-style: italic;"&gt;(Yes! From ten years ago!)&lt;/span&gt; spectacularly failed - at least if you ask Steve Howe.&lt;br /&gt;&lt;br /&gt;Fittingly, the cover artwork is a superb Roger Dean original in something of a career-spanning amalgam of styles, started in 1970, and left unfinished until now.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;*My own term. Fortuitously, I now discover its &lt;a href="http://en.wikipedia.org/wiki/Munge"&gt;usage&lt;/a&gt; in computer security, specifically password creation, where it means &lt;span style="font-style: italic;"&gt;Modify Until Not Guessed Easily&lt;/span&gt;. Well, that is &lt;span style="font-style: italic;"&gt;precisely&lt;/span&gt; what I mean by &lt;span style="font-style: italic;"&gt;munge&lt;/span&gt; in the context of musical production: modified until there's nought but a thick beige soup, whose ingredients can no longer even be guessed. Except maybe for mechanically recovered broiler chicken.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-1149932757860848544?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/1149932757860848544/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/07/yes-fly-from-here.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/1149932757860848544'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/1149932757860848544'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/07/yes-fly-from-here.html' title='Yes: Fly From Here'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-GGSpSvoMJ7Q/TjGpBtNv61I/AAAAAAAAA2o/_ClEHIuVrn8/s72-c/Yes-Fly-From-Here-538957.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-7492579512618872978</id><published>2011-07-29T12:00:00.002+01:00</published><updated>2011-07-29T16:03:33.059+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><category scheme='http://www.blogger.com/atom/ns#' term='Personal'/><title type='text'>Happy Birthday (2) To Me</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Little Bloggie's 2nd Birthday&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Cool, so I've been blogging here for two whole years! Time for another bit of metaspection.&lt;br /&gt;&lt;br /&gt;Most of what I have to say about that is just to repeat &lt;a href="http://mycodehere.blogspot.com/2010/07/happy-birthday-to-me.html"&gt;last year's birthday message&lt;/a&gt;. The targets for the blog have remained the same: two posts per week, half the posts technical in nature, half nontechnical. Oh, and half the technical ones &lt;span style="font-style: italic;"&gt;security related&lt;/span&gt;. Those targets continue to be met - the technical and security quotas comfortably, and the overall to within about 10%.&lt;br /&gt;&lt;br /&gt;How successful has the endeavour been to date? Just as last year, the technical articles have continued to prove the less popular, and the security related ones, less so again. This echoes a typical &lt;span style="font-style: italic;"&gt;Facebook&lt;/span&gt; experience, where comments on world affairs of any importance get ignored, while random posts about &lt;a href="https://www.facebook.com/photo.php?fbid=125328870885418&amp;amp;set=a.113631245388514.26687.100002249172403&amp;amp;type=1&amp;amp;theater"&gt;toasted cheese&lt;/a&gt; or &lt;a href="https://www.facebook.com/photo.php?fbid=125093194242319&amp;amp;set=a.113631245388514.26687.100002249172403&amp;amp;type=1&amp;amp;theater"&gt;mismatched shoes&lt;/a&gt; attract dozens of comments...&lt;br /&gt;&lt;br /&gt;The blog's popularity, according to Google Analytics, has risen slowly but steadily to around 300 unique visitors per month. At this low level, comment spam remains almost nonexistent. I've only ever had to delete two comments in that category. Speaking of Google Analytics, can you see the point where my post about &lt;a href="http://mycodehere.blogspot.com/2010/03/sony-fb.html"&gt;Sony's PS3 Linux crimes&lt;/a&gt; got linked at &lt;a href="http://www.neogaf.com/forum/showthread.php?t=391387&amp;amp;page=55"&gt;NeoGAF&lt;/a&gt;?&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/-GIzmAF0gSxw/Ti_ysq_OMZI/AAAAAAAAA2I/vDhOXG2DgRk/s1600/PS3spike.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 92px;" src="http://2.bp.blogspot.com/-GIzmAF0gSxw/Ti_ysq_OMZI/AAAAAAAAA2I/vDhOXG2DgRk/s400/PS3spike.png" alt="" id="BLOGGER_PHOTO_ID_5633988508131406226" border="0" /&gt;&lt;/a&gt;Our design, development and test departments have now had one &lt;span style="font-style: italic;"&gt;Day O' Security &lt;/span&gt;&lt;a style="font-style: italic;" href="http://mycodehere.blogspot.com/2011/03/i-hate-you-all.html"&gt;presentation&lt;/a&gt;, or rather two identical half-presentations, that went quite well overall. Though it remains to be seen at the forthcoming &lt;a href="http://www.microsoft.com/security/sdl/adopt/eop.aspx"&gt;&lt;span style="font-style: italic;"&gt;Game O' Cards&lt;/span&gt;&lt;/a&gt;, as well as the promised &lt;span style="font-style: italic;"&gt;Son O' Day O' Security: Clowns and Dancing Girls&lt;/span&gt;, how many colleagues have retained their new knowledge of &lt;a href="http://mycodehere.blogspot.com/2009/08/security-glossary.html#CIA"&gt;&lt;span style="font-style: italic;"&gt;CIA&lt;/span&gt;&lt;/a&gt; and &lt;span style="font-style: italic;"&gt;&lt;a href="http://mycodehere.blogspot.com/2009/08/security-glossary.html#STRIDE"&gt;STRIDE&lt;/a&gt;!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;On a negative note, I've just lost my protégé, which probably seems a bit careless. Kind of a dev-&lt;span style="font-style: italic;"&gt;elopement&lt;/span&gt;, you could say. Too soon to know for certain whether my mentoring on the fascinating realm of &lt;span style="font-style: italic;"&gt;computer security testing&lt;/span&gt; drove him to his extreme of plank-walking despair, or enabled some shimmering new empire-building opportunity in the arena of &lt;span style="font-style: italic;"&gt;inhouse &lt;a href="http://mycodehere.blogspot.com/2011/06/security-testing-part-4-pentests.html"&gt;penetration testing&lt;/a&gt;&lt;/span&gt;. Either way, our own security team having just been &lt;span style="font-style: italic;"&gt;binarated&lt;/span&gt; (by analogy with &lt;span style="font-style: italic;"&gt;decimated&lt;/span&gt;), I'd best go start recruiting once more. We're going to need a bigger budget...&lt;br /&gt;&lt;br /&gt;Happy 2nd birthday, little bloggie.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-Wr-uyrgotdY/Ti_3yhyG8jI/AAAAAAAAA2Q/pQspyUZxp-E/s1600/HappyBirthday2.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 379px;" src="http://2.bp.blogspot.com/-Wr-uyrgotdY/Ti_3yhyG8jI/AAAAAAAAA2Q/pQspyUZxp-E/s400/HappyBirthday2.jpg" alt="" id="BLOGGER_PHOTO_ID_5633994106297840178" border="0" /&gt;&lt;/a&gt;&lt;span style="font-style: italic;font-size:85%;" &gt;Photo credit:  Abdulrahman Bin Slmah &lt;a href="http://www.blogger.com/www.abdulz.com"&gt;www.abdulz.com&lt;/a&gt; &lt;a href="http://creativecommons.org/licenses/by-nc-sa/2.0/"&gt;CC licensed&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-7492579512618872978?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/7492579512618872978/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/07/happy-birthday-to-me-2.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/7492579512618872978'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/7492579512618872978'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/07/happy-birthday-to-me-2.html' title='Happy Birthday (2) To Me'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-GIzmAF0gSxw/Ti_ysq_OMZI/AAAAAAAAA2I/vDhOXG2DgRk/s72-c/PS3spike.png' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-3425102749104905116</id><published>2011-07-27T10:57:00.006+01:00</published><updated>2011-07-28T13:08:00.321+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><title type='text'>Attack Type Update</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Popularity Upheaval&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Imperva's just published web application attack report (&lt;a href="http://www.imperva.com/docs/HII_Web_Application_Attack_Report_Ed1.pdf"&gt;3.46MB PDF&lt;/a&gt;) contains something of a surprise. For some time now, it's been the case that XSS (cross-site scripting) attacks were the most popular, having overtaken SQL injection. Not any more. They have been edged out, at least where implicated in application attacks, by a narrow margin of 37% to 36% (SQLi remaining at 23%), by new kid &lt;span style="font-style: italic;"&gt;Directory Traversal&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-weight: bold;"&gt;The Four Main Attack Types&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://www.imperva.com/docs/HII_Web_Application_Attack_Report_Ed1.pdf"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 153px;" src="http://4.bp.blogspot.com/-0T9eNHR7qao/TjFO2XFruvI/AAAAAAAAA2g/vhKRYbfRNMk/s400/AttackTypes.png" alt="" id="BLOGGER_PHOTO_ID_5634371304634956530" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-style: italic;"&gt;(from Imperva’s &lt;a href="http://www.imperva.com/docs/HII_Web_Application_Attack_Report_Ed1.pdf"&gt;Web Application Attack Report&lt;/a&gt; Edition #1 - July 2011)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;What is it? Essentially finding a way to pass-through the sequence of characters that represents the command &lt;span style="font-style: italic;"&gt;“traverse upward to the parent directory”&lt;/span&gt;, into one of the vulnerable application's file APIs. Such a vulnerability can be present because of either insufficient security validation, or else insufficient sanitising of a user-provided input selecting a particular file name or path. The result of a Directory Traversal attack is exposure to the attacker, of the contents of files and folders not intended to be thus accessible.&lt;br /&gt;&lt;br /&gt;Obviously the severity of the attack depends upon the nature of the exposed material. Favourite targets include such particularly sensitive files content as users' personal account information, system metadata, and so on. The technique itself of course is not new, only its paramount popularity.&lt;br /&gt;&lt;br /&gt;Imperva Web Application Attack Report Edition #1 (July 2011):&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://www.imperva.com/docs/HII_Web_Application_Attack_Report_Ed1.pdf"&gt;http://www.imperva.com/docs/HII_Web_Application_Attack_Report_Ed1.pdf&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-3425102749104905116?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/3425102749104905116/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/07/attack-type-update.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/3425102749104905116'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/3425102749104905116'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/07/attack-type-update.html' title='Attack Type Update'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-0T9eNHR7qao/TjFO2XFruvI/AAAAAAAAA2g/vhKRYbfRNMk/s72-c/AttackTypes.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-3711930527451434149</id><published>2011-07-17T00:29:00.037+01:00</published><updated>2011-08-26T00:31:36.075+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Language'/><category scheme='http://www.blogger.com/atom/ns#' term='Personal'/><category scheme='http://www.blogger.com/atom/ns#' term='Holidays'/><title type='text'>John And Linda's Big French Adventure II</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Wednesday 29 June&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As is becoming commonplace immediately prior to a holiday in France, our religiously serviced and meticulously maintained Civic develops sudden and spontaneous maladies out of &lt;span style="font-style: italic;"&gt;le bleu&lt;/span&gt;. This year it's a grinding sound from one of the wheels during forward motion, and a cacophanous monotone whining buzz when reversing. Both seem related to the offside rear disc brake (offside when it's in the UK, that is). Incidentally, why do we even have a &lt;span style="font-style: italic;"&gt;phrase&lt;/span&gt; like &lt;span style="font-style: italic;"&gt;"rear disc brake"?&lt;/span&gt; Surely that alone indicates a bug, a fatal and fundamental flaw in your design. Like &lt;span style="font-style: italic;"&gt;"pilot light"&lt;/span&gt;, or, dunno, maybe &lt;span style="font-style: italic;"&gt;"exploding nipple ring"&lt;/span&gt;. Give me rear drums, or give me... erm... well, &lt;span style="font-style: italic;"&gt;multiple handbrakes&lt;/span&gt;, I suppose.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Thursday 30 June&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Car Guy Noel says we're good to go, despite sounding like angle grinders driving, or a lovelorn wookie in reverse; repairs are necessary, but can't be organised with zero notice. I &lt;span style="font-style: italic;"&gt;could&lt;/span&gt; fix it myself, assuming of course that brake pads haven't been replaced by multicore proprietary silicon since last I looked in there. But I'm bound by the same time constraints as Noel, vis-a-vis obtaining any necessary replacement parts. Either way, they'll have to await our return in &lt;span style="font-style: italic;"&gt;une Quinzaine&lt;/span&gt; or so.&lt;br /&gt;&lt;br /&gt;My heart's not in my work, and I've finished doing anything nearly productive by about 6:20pm. Still a good hour and a bit in credit, but not the 7pm finish I'd promised my long suffering colleagues. What can I say, there's nothing left in the tank guys, I feel as guilty as a newborn lamb. Off to collect Linda, get home, start packing.&lt;br /&gt;&lt;br /&gt;7pm: collect Linda, go home, make dinner (sausages!), eat dinner (yuk.), collapse into bed too knackered to pack. Luckily, Linda's already got most of it done: like, from about a month ago.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/-DAbvkWBN4lM/TjUYQAYaLiI/AAAAAAAAA2w/sBhlnFr5RVo/s1600/P1010656.JPG"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 200px; height: 150px;" src="http://2.bp.blogspot.com/-DAbvkWBN4lM/TjUYQAYaLiI/AAAAAAAAA2w/sBhlnFr5RVo/s200/P1010656.JPG" alt="" id="BLOGGER_PHOTO_ID_5635437171983396386" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;Friday 1 July&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;7am: bounce out of bed and pack the car; finally depart about 12. Yes, seriously. What's the rush? All we have to do is reach Portsmouth sometime today. At 4pm there's a rumble in my psychic powers. I turn on the car radio, search MW for 5 live, and we're just in time to catch the first few points of Murray v Nadal. &lt;span style="font-style: italic;"&gt;Andy wins the first set!&lt;/span&gt; Then loses pretty much every remaining point in the match.&lt;br /&gt;&lt;br /&gt;Car continues to grind and buzz. Thanks to a 2 hour gridlock near Brum, we don't hit Victory until after 10pm. Unload suitcases into the Hilsea Travelodge, where the brasserie is already closed. Damn, that would have been ace, sitting outside on a night like this, getting wired into some big steak. Instead we're forced to chow down on local chip shop fare: sausages again (puke).&lt;br /&gt;&lt;br /&gt;Besides the apologetic and mildly despairing "Smile" notice, there's a mysterious second door in our Travelodge bedroom. Solid varnished darkwood, it has no handle, and no keyhole. We try prising it open by squeezing our fingers into the frame gap. There is no movement. We settle down to a somewhat wary rest, fully expecting it to admit a headless intruder at some point during the night. &lt;span style="font-style: italic;"&gt;When it does finally burst open at 4am, admitting an eight foot wall of torrenting blood, Linda sleeps through it all, apparently remembering nothing about it in the morning.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now playing: Queen - &lt;a style="font-style: italic;" href="http://en.wikipedia.org/wiki/Absolute_Greatest"&gt;Absolute Greatest&lt;/a&gt;... which reminds me, here's one I wrote earlier! For Harry Hill: &lt;span style="font-style: italic;"&gt;Careful, Freddie! You've already broken &lt;/span&gt;two&lt;span style="font-style: italic;"&gt; of those! What more do you want?&lt;/span&gt; Freddie Mercury: &lt;span style="font-style: italic;"&gt;I want to break free...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/-v4TOIrux_R8/TjUaX5StKqI/AAAAAAAAA24/k9n4SfItjGk/s1600/IMG_0428.JPG"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 200px; height: 150px;" src="http://4.bp.blogspot.com/-v4TOIrux_R8/TjUaX5StKqI/AAAAAAAAA24/k9n4SfItjGk/s200/IMG_0428.JPG" alt="" id="BLOGGER_PHOTO_ID_5635439506542635682" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;samedi 2 juilliet&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Travelodges have no phones, so the 6 o'clock alarm is a polite knock on the door, simultaneous with both of our mobiles going quite loopy. But we're already up, half washed, two-thirds dressed, three-quarters way to the ferry port by then. No worries, plenty time! With a full English breakfast at the self-service on board the beautiful MV Normandy (big fat 6-hour cruise ferries each way this year, none of that &lt;span style="font-style: italic;"&gt;Express&lt;/span&gt; crossing nonsense), we wave goodbye to the last of our sterling.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/-Sg5DvVrj3rM/TjUbscDL0lI/AAAAAAAAA3A/8UHA3BXIO40/s1600/P1010658.JPG"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 200px; height: 150px;" src="http://4.bp.blogspot.com/-Sg5DvVrj3rM/TjUbscDL0lI/AAAAAAAAA3A/8UHA3BXIO40/s200/P1010658.JPG" alt="" id="BLOGGER_PHOTO_ID_5635440958981788242" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;We're On A Boat!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Exploring the extent of our freedom above deck, soon we decide it's a little breezy up here, and go visiting the various shops on board. Before long we take up a comfy table in the bar, silently participating in the quiz being run by entertainments crew. &lt;span style="font-style: italic;"&gt;Can't believe that not a single entrant identified the voice of Groucho Marx - what on earth are we coming to?&lt;/span&gt; Oh shut up, Mr Grumpy.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/-Y9rBppu3Ou8/TjUcPDSkQ8I/AAAAAAAAA3I/UixMqTb3hGY/s1600/IMG_0448.JPG"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 200px; height: 150px;" src="http://4.bp.blogspot.com/-Y9rBppu3Ou8/TjUcPDSkQ8I/AAAAAAAAA3I/UixMqTb3hGY/s200/IMG_0448.JPG" alt="" id="BLOGGER_PHOTO_ID_5635441553630839746" border="0" /&gt;&lt;/a&gt;A couple of hours later we realise France can be seen approaching, so we're back out on deck devouring its coastline with eyes and cameras. Next, in no time we're back in our cars; then it's an (almost) error-free afternoon drive to Paimpol, confidently following nothing but the intermediate road signs via St Malo, Dinard, and St Brieuc. The contrast with last year's refugee landing and midnight random drive now seems like chalk and, well, anti-chalk.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/-19GKqsUFxyQ/TjUeY7lDTVI/AAAAAAAAA3Q/oHsyP3n0vIA/s1600/IMG_0452.JPG"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 200px; height: 150px;" src="http://2.bp.blogspot.com/-19GKqsUFxyQ/TjUeY7lDTVI/AAAAAAAAA3Q/oHsyP3n0vIA/s200/IMG_0452.JPG" alt="" id="BLOGGER_PHOTO_ID_5635443922382835026" border="0" /&gt;&lt;/a&gt;Resolved to buy some local bread, cheese and Bordeaux to mark our arrival, we are lucky enough to reach Paimpol's Carriefour just before its 8pm closing. As we wait in the checkout queue, Linda tells me she's noticed our landlord M. Koffe standing in another line. When I investigate I'm unconvinced it's the right guy, and return to tell her this. &lt;span style="font-style: italic;"&gt;Didn't you ask if it was him?&lt;/span&gt; Well no, curiously not; call me a big fat feartie, but I decided not to approach some random Frenchman with the salutation "Monsieur Koffe!" on the sole basis that he was black...&lt;br /&gt;&lt;br /&gt;It's about two minutes after closing time when Linda tries to get someone to show her where to find &lt;span style="font-style: italic;"&gt;un adaptateur&lt;/span&gt;. That person's insincerity, unhelpfulness and feigned ignorance are a blot on the whole nation's image and reputation! Luckily this will be our last cause for complaint about the locals this year.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Spook!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Departing for Ploubazlanec, I'm suddenly aware that we were supposed to phone ahead if arriving after 8pm local time, and of course when we get to the gîte at 8:15 there's no sign of life. Linda asks if I'm going to go round to see the neighbour, Emily, who was keyholder last year. &lt;span style="font-style: italic;"&gt;And this part is true, and Linda is my witness:&lt;/span&gt; for no reason I can discern or imagine, I tell her, "Sure, but I don't think she'll be there. I think there might just be a man, doing some work upstairs in her house." She looks at me a little askance, and I don't blame her.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/-3ze4wwvW4Po/TjUfrVa97-I/AAAAAAAAA3Y/HBVDt41o7Oo/s1600/IMG_0457.JPG"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 200px; height: 150px;" src="http://2.bp.blogspot.com/-3ze4wwvW4Po/TjUfrVa97-I/AAAAAAAAA3Y/HBVDt41o7Oo/s200/IMG_0457.JPG" alt="" id="BLOGGER_PHOTO_ID_5635445338069135330" border="0" /&gt;&lt;/a&gt;There's a note with two telephone numbers on the door, but we can't get through on either; a recorded French voice just keeps telling us, &lt;span style="font-style: italic;"&gt;Orange. Blablah, blablah, blablah&lt;/span&gt;. The note says in English, "We are at Paimpol with friends," and so we go back there, thinking the problem might be nothing more than poor mobile reception; perhaps we can just pick up the key from them in town. But none of that is the case. I do however succeed in leaving a message on their &lt;span style="font-style: italic;"&gt;home&lt;/span&gt; answering service, the longest French monologue I've ever attempted or achieved in my life, ending with "Au secours! C'est tout! Au revoir! A très bientôt!" But their &lt;span style="font-style: italic;"&gt;home&lt;/span&gt; being in Nantes, 250 kilometres away, I don't expect much to come of that.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/-F2h4Glk4sKg/TjUg04x3RLI/AAAAAAAAA3g/ZscrXwiHYL0/s1600/P1010665.JPG"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 200px; height: 150px;" src="http://2.bp.blogspot.com/-F2h4Glk4sKg/TjUg04x3RLI/AAAAAAAAA3g/ZscrXwiHYL0/s200/P1010665.JPG" alt="" id="BLOGGER_PHOTO_ID_5635446601690858674" border="0" /&gt;&lt;/a&gt;We return to Ploubazlanec looking for our Plan B. I take a walk round to Emily's house and ring the bell, but she's not there. Instead, a disembodied male voice from behind and above me demands, "Qui est là?"&lt;br /&gt;&lt;br /&gt;"Où êtes-vous?" I ask, looking and turning around in a circle. I move into the middle of the driveway and there, poking out of a high attic window, I spot a rather distinguished looking, grey haired and bespectacled gentleman, holding a hammer.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Il Arrive!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/-F00DCLinfXs/TjUheDCG7CI/AAAAAAAAA3o/mOL6Uh4o36o/s1600/IMG_0458.JPG"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 200px; height: 150px;" src="http://2.bp.blogspot.com/-F00DCLinfXs/TjUheDCG7CI/AAAAAAAAA3o/mOL6Uh4o36o/s200/IMG_0458.JPG" alt="" id="BLOGGER_PHOTO_ID_5635447308817984546" border="0" /&gt;&lt;/a&gt;I manage to explain our plight in broken French phrases, ending with my animated headshaking impression of the recorded voice, &lt;span style="font-style: italic;"&gt;Orange. Blablah, blablah, blablah&lt;/span&gt;. "&lt;span id="result_box" class="short_text" lang="fr"&gt;&lt;span class="hps"&gt;Etes-vous&lt;/span&gt; &lt;span class="hps"&gt;anglais?&lt;/span&gt;&lt;/span&gt;" - "&lt;span id="result_box" class="short_text" lang="fr"&gt;&lt;span class="hps"&gt;Nous sommes&lt;/span&gt; &lt;span class="hps"&gt;écossaise&lt;/span&gt;&lt;/span&gt;" - "Attendre là," he offers, chuckling "C'est une distinction très importante!" and disappearing. I do a little jig, waiting for him to reappear in the doorway. Which he does. With a phone! Now we're communicating. I pass him the note from the door and he phones M. Koffe, announcing after a minute's conversation, "Il arrive!" - "F&lt;span id="result_box" class="short_text" lang="fr"&gt;&lt;span class="hps"&gt;antastique!&lt;/span&gt;&lt;/span&gt;" I opine, thanking him &lt;span style="font-style: italic;"&gt;très beaucoup&lt;/span&gt;...&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/-HU2hAswH7b0/TjUkC5p9bdI/AAAAAAAAA34/A_h6aC5swms/s1600/IMG_0459.JPG"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 200px; height: 150px;" src="http://4.bp.blogspot.com/-HU2hAswH7b0/TjUkC5p9bdI/AAAAAAAAA34/A_h6aC5swms/s200/IMG_0459.JPG" alt="" id="BLOGGER_PHOTO_ID_5635450140979195346" border="0" /&gt;&lt;/a&gt;Returning to Linda, I tell her how my odd little prediction has just come true. She makes one of her own: &lt;span style="font-style: italic;"&gt;there will be a bottle of cider in the fridge&lt;/span&gt;. Naturally enough, once M. &amp;amp; Mme Koffe arrive, full of welcomes and apologies, allow us in, waive the deposit, and then depart, this prediction too proves correct.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;dimanche 3&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; juilliet&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/-VZAuKs9qITA/TjUkckNGv6I/AAAAAAAAA4A/skvX2hTQmvQ/s1600/IMG_0460.JPG"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 200px; height: 150px;" src="http://4.bp.blogspot.com/-VZAuKs9qITA/TjUkckNGv6I/AAAAAAAAA4A/skvX2hTQmvQ/s200/IMG_0460.JPG" alt="" id="BLOGGER_PHOTO_ID_5635450581897625506" border="0" /&gt;&lt;/a&gt;&lt;span style="font-style: italic;"&gt;Just look at all that beautiful Breton countryside!&lt;/span&gt; After croissants, raspberry jam and coffee, Linda can't wait to walk the 100m or so downhill to &lt;span style="font-style: italic;"&gt;la plage&lt;/span&gt;. I stay behind, clean up in the kitchen and try to get my mobile working by swapping SIMs and topping up. Once that's done I test it by phoning Linda, and my goodness gracious me, wasn't it just as well that I did! The poor wee darling is stranded on the margin, with sunstroke and unsocked heels and toes blistered from her brand new holiday shoes. I ride gladly to the rescue.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/-vuHtsgYpfc8/TjUiee08HgI/AAAAAAAAA3w/yOa29nCCyV8/s1600/P1010666.JPG"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 200px; height: 150px;" src="http://1.bp.blogspot.com/-vuHtsgYpfc8/TjUiee08HgI/AAAAAAAAA3w/yOa29nCCyV8/s200/P1010666.JPG" alt="" id="BLOGGER_PHOTO_ID_5635448415790571010" border="0" /&gt;&lt;/a&gt;Her iPod now charging nicely, my clever wife arranges for lunch &lt;span style="font-style: italic;"&gt;alfresco&lt;/span&gt; - or should that be &lt;span style="font-style: italic;"&gt;en plein air?&lt;/span&gt; - under the parasol, with gourmet pork and Camembert. All this from last night's leftovers! Even the Diet Coke tastes ten times better here. After yesterday's early rise, six hour cruise, four hour drive and access crisis, today's theme is &lt;span style="font-style: italic;"&gt;a day of rest&lt;/span&gt;. I start reading my holiday book, &lt;span style="font-style: italic;"&gt;The Wise Man's Fear&lt;/span&gt; by Patrick Rothfuss, a thousand-page hardback edition I'd bought some weeks earlier and saved for Brittany. Later we venture to our favourite restaurant for our favourite Sunday dinners - moules à la crème, &lt;span id="result_box" class="short_text" lang="fr"&gt;&lt;span class="hps"&gt;and filet&lt;/span&gt; &lt;span class="hps"&gt;de bœuf à la&lt;/span&gt; &lt;span class="hps"&gt;béarnaise&lt;/span&gt;&lt;/span&gt;. Now we're really here!&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/-aIVnPJmQaQo/TjUny5cFAcI/AAAAAAAAA4I/0pPsCAJP5y4/s1600/P1010694.JPG"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 150px; height: 200px;" src="http://4.bp.blogspot.com/-aIVnPJmQaQo/TjUny5cFAcI/AAAAAAAAA4I/0pPsCAJP5y4/s200/P1010694.JPG" alt="" id="BLOGGER_PHOTO_ID_5635454264089575874" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;lundi 4&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; juilliet&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Early morning trip to la boulangerie for bread, strawberry jam, etc. Get the maps out. Plan an excursion. Go to the seaside!&lt;br /&gt;&lt;br /&gt;Evening meal: Président Camembert on baguette, with duck, pork, salad, etc. Check one box on my holiday list. That just leaves "barbecue"...&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;mardi 5&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; juilliet&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span id="result_box" class="short_text" lang="fr"&gt;&lt;span class="hps"&gt;Merde!&lt;/span&gt; J&lt;span class="hps"&gt;'ai oublié&lt;/span&gt; &lt;span class="hps"&gt;mes médicaments!&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;(to be continued)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-3711930527451434149?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/3711930527451434149/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/07/john-and-lindas-big-french-adventure-ii.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/3711930527451434149'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/3711930527451434149'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/07/john-and-lindas-big-french-adventure-ii.html' title='John And Linda&apos;s Big French Adventure II'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-DAbvkWBN4lM/TjUYQAYaLiI/AAAAAAAAA2w/sBhlnFr5RVo/s72-c/P1010656.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-6033927680534724583</id><published>2011-06-30T10:41:00.006+01:00</published><updated>2011-06-30T18:50:44.924+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Privacy'/><category scheme='http://www.blogger.com/atom/ns#' term='Education'/><title type='text'>Facebook: An Ugly Stupid Service</title><content type='html'>&lt;span style="font-weight: bold;"&gt;... designed to teach you to systematically undervalue your privacy.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Author and freedom fighter Cory Doctorow in great form on this subject, censorship, psychology, and education (from &lt;a href="http://www.youtube.com/watch?v=RAGjNe1YhMA"&gt;TEDxObserver&lt;/a&gt;):&lt;br /&gt;&lt;br /&gt;&lt;iframe src="http://www.youtube.com/embed/RAGjNe1YhMA" allowfullscreen="" frameborder="0" height="390" width="640"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Rediscovered this morning at &lt;a href="http://www.boingboing.net/2011/06/29/why-writers-should-h.html"&gt;this &lt;span style="font-style: italic;"&gt;Boing Boing&lt;/span&gt; post&lt;/a&gt; - itself inspired by &lt;a href="http://whatever.scalzi.com/2011/06/29/mastering-ones-own-domain-an-no-this-is-not-a-seinfeld-reference/"&gt;John Scalzi's &lt;span style="font-style: italic;"&gt;Whatever&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;TEDTalks are distributed under a &lt;a href="http://creativecommons.org/licenses/by-nc-nd/3.0" title="Creative Commons (CC) license" target="_blank"&gt;Creative Commons (CC) licence&lt;/a&gt;.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-6033927680534724583?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/6033927680534724583/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/06/facebook-ugly-stupid-service.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/6033927680534724583'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/6033927680534724583'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/06/facebook-ugly-stupid-service.html' title='Facebook: An Ugly Stupid Service'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/RAGjNe1YhMA/default.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-5608152821967150658</id><published>2011-06-27T10:29:00.014+01:00</published><updated>2011-06-27T13:44:02.660+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><title type='text'>Security Testing Part 4 - Pentests</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/-3va-mbbpm1w/TghgpGV6LRI/AAAAAAAAA1c/kZZAa_tBvoM/s1600/monoflag.png"&gt;&lt;img style="float: right; margin: 0pt 0pt 10px 10px; cursor: pointer; width: 160px; height: 115px;" src="http://1.bp.blogspot.com/-3va-mbbpm1w/TghgpGV6LRI/AAAAAAAAA1c/kZZAa_tBvoM/s200/monoflag.png" alt="" id="BLOGGER_PHOTO_ID_5622850393965473042" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;A Monotone Spectrum&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Penetration_test"&gt;&lt;span style="font-style: italic;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;Pentests&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;, short for &lt;span style="font-style: italic;"&gt;Penetration Tests&lt;/span&gt;, describe the simulation of malicious attacks for the purpose of evaluating a computer system or network's security. These attacks are available in any colour, as long as it's &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;greyscale&lt;/span&gt;...&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;In The Clear&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;Pentests&lt;/span&gt; are quite often &lt;span style="font-style: italic;"&gt;clear box&lt;/span&gt; (or &lt;a href="http://en.wikipedia.org/wiki/White_box_testing"&gt;&lt;span style="font-style: italic;"&gt;white box&lt;/span&gt;&lt;/a&gt;, or &lt;span style="font-style: italic;"&gt;full disclosure&lt;/span&gt;) attacks, simply because as testers we more often than not have full access to, and complete knowledge of, the infrastructure to be tested. So, why not make best use of this advantage? Such knowledge includes all available information about the internal data structures and algorithms employed, the relevant source code used to implement these, the network diagrams, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;IP&lt;/span&gt; address data, actual passwords, and so on.&lt;br /&gt;&lt;br /&gt;Examples of white box testing include:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Application_programming_interface"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;API&lt;/span&gt;&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Fault_injection"&gt;Fault Injection&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/Mutation_testing"&gt;Mutation Testing&lt;/a&gt; methods.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Most &lt;span style="font-style: italic;"&gt;static &lt;/span&gt;testing, e.g., code reviews, inspections and Valkyries (damn &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;autocorrect&lt;/span&gt;: I meant &lt;span style="font-style: italic;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;walkthroughs&lt;/span&gt;&lt;/span&gt;); testing where the software isn't actually used. Instead for example, the code may be read, or scanned automatically for syntactic &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_7"&gt;validity&lt;/span&gt;.&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Code coverage can only be delivered through white box testing. &lt;/span&gt;Without inspecting the source code, there can be no guarantee that any given code path is exercised.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;White box methodology is frequently used to evaluate the completeness of test suites created through black box testing methods (see below). This strategy allows the examination of the rarely tested parts of a system, ensuring coverage of the most important function points.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;In The Black&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;Pentests&lt;/span&gt; can also of course be &lt;a href="http://en.wikipedia.org/wiki/Black_box_testing"&gt;&lt;span style="font-style: italic;"&gt;black box&lt;/span&gt;&lt;/a&gt; (also known as &lt;span style="font-style: italic;"&gt;blind&lt;/span&gt;) tests, where there is assumed to be no prior knowledge of the infrastructure to be tested. As testers, we must first determine the location and extent of the system under test, before commencing analysis. When we use &lt;span style="font-style: italic;"&gt;black box&lt;/span&gt; penetration testing methods, we are assuming the role of a real, external, black hat hacker, who is trying to intrude into our system without much actual knowledge about it. By contrast - &lt;span style="font-style: italic;"&gt;almost&lt;/span&gt; literally! - &lt;span style="font-style: italic;"&gt;white box&lt;/span&gt; testing can be seen as simulating what might happen after a leak of sensitive information, or equivalently, during an "inside job", when the attacker has access to confidential information.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Grey Goo&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In between these two extremes, a school of grey box testing has evolved. As the name suggests, these &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;pentests&lt;/span&gt; combine aspects of black and white box attacks. The main reason to do this is to provide customised test coverage for various elements in distributed systems. For example, we might use our knowledge of internal data structures and algorithms for the purpose of designing our test cases. Then when it comes to the point of actually executing these tests, we perform them as a normal user, i.e., at a black box level.&lt;br /&gt;&lt;br /&gt;A good example of grey boxing is when we modify the content of a data repository, which is not itself part of the delimited system under test. That's not something which a user would normally be able to do, so it can introduce a white box element into an otherwise black box test or attack suite. Another example in a similar vein might be the determination of error message contents, or system boundary values, by reverse engineering.&lt;br /&gt;&lt;br /&gt;Note that most instances of input data manipulation and/or output formatting do &lt;span style="font-style: italic;"&gt;not&lt;/span&gt; qualify as grey box techniques, because by definition, input and output are not part of the &lt;span style="font-style: italic;"&gt;system under test&lt;/span&gt;. So for example, integration testing between two code modules written by two distinct developers, where only certain &lt;span style="font-style: italic;"&gt;interfaces&lt;/span&gt; are exposed for test, is still regarded as &lt;span style="font-style: italic;"&gt;black boxing&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.isecom.org/osstmm/"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 190px; height: 200px;" src="http://1.bp.blogspot.com/-im1GG8CxI5M/Tghr11hjoPI/AAAAAAAAA1k/Bzd25_Xi1Oo/s200/osstmm_blue_200.jpg" alt="" id="BLOGGER_PHOTO_ID_5622862707417129202" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;Careful Now!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Elementary white box penetration testing can often be done automatically, and therefore cheaply. Black box attacks are another matter entirely. Because you are literally attacking a network (often a working production system) blindly, your test activities will inevitably comprise actual security attacks. You will cause denial of service, both intentionally and as a side effect of the stress you put on network response time via vulnerability scanning. At worst, you might cause actual harm to the system, rendering it just as inoperable as had a real black hat attacked. Much of the time and effort required with black box &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;pentests&lt;/span&gt; lies in trying not to destroy things, while still reaching deeply enough to expose vulnerabilities.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Pronounced "Awe Stem"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;OSSTMM&lt;/span&gt;, or &lt;a href="http://www.isecom.org/osstmm/"&gt;Open Source Security Testing Methodology Manual&lt;/a&gt;, is both a peer-reviewed security testing, metric measurement and analysis &lt;span style="font-style: italic;"&gt;methodology&lt;/span&gt;, and a &lt;span style="font-style: italic;"&gt;philosophy &lt;/span&gt;of operational security. It is a Creative Commons licensed publication of the Institute for Security and Open Methodologies (&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;ISECOM&lt;/span&gt;). As such, the encapsulated methodology, covering what / when / where to test, is itself free to use and distribute under the Open Methodology License (&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;OML&lt;/span&gt;).&lt;br /&gt;&lt;br /&gt;The &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;Manual's&lt;/span&gt; primary objective is to create a scientific methodology and metrics for operational security evaluation, based upon test results. It suits most kinds of security audit: penetration tests, ethical hacks, security and vulnerability assessments, and so on. Secondarily it acts as a central reference in all security tests regardless of the size of the organization, technology, or protection, and provides analyst guidelines, enabling a certified &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;OSSTMM&lt;/span&gt; audit by assuring:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;test thoroughness and legal compliance;&lt;/li&gt;&lt;li&gt;inclusion of all necessary channels;&lt;/li&gt;&lt;li&gt;results quantification, consistency and repeatability; and&lt;/li&gt;&lt;li&gt;that factual information is derived exclusively from tests.&lt;/li&gt;&lt;/ol&gt;According to the &lt;a href="http://www.isecom.org/osstmm/"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;ISECOM&lt;/span&gt; website&lt;/a&gt;, a handbook version of version 3 of the manual will be "available soon".&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Previously:&lt;br /&gt;&lt;blockquote&gt;&lt;a href="http://www.blogger.com/Part%201%20-%20Overview."&gt;Part 1&lt;/a&gt; - Overview&lt;br /&gt;&lt;a href="http://mycodehere.blogspot.com/2011/02/security-testing-part-2-lab-work.html"&gt;Part 2&lt;/a&gt; - Lab Work&lt;br /&gt;&lt;a href="http://mycodehere.blogspot.com/2011/03/security-testing-part-3-attack-surface.html"&gt;Part 3&lt;/a&gt; - The Attack Surface&lt;br /&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-5608152821967150658?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/5608152821967150658/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/06/security-testing-part-4-pentests.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/5608152821967150658'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/5608152821967150658'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/06/security-testing-part-4-pentests.html' title='Security Testing Part 4 - Pentests'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-3va-mbbpm1w/TghgpGV6LRI/AAAAAAAAA1c/kZZAa_tBvoM/s72-c/monoflag.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-6526058749334867402</id><published>2011-06-23T12:37:00.009+01:00</published><updated>2011-07-18T00:42:25.221+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Books'/><title type='text'>Remember EA_Spouse?</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/-ndVo3VX_flI/TgMrooUpp2I/AAAAAAAAA1E/DOWYeQhe6YY/s1600/SwordOfFireAndSea.JPG"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 214px; height: 320px;" src="http://1.bp.blogspot.com/-ndVo3VX_flI/TgMrooUpp2I/AAAAAAAAA1E/DOWYeQhe6YY/s320/SwordOfFireAndSea.JPG" alt="" id="BLOGGER_PHOTO_ID_5621384736907306850" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;Well She Wrote A Book&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;No, not about the &lt;a href="http://ea-spouse.livejournal.com/274.html"&gt;labour practices of a top video games firm&lt;/a&gt; in 2004 and beyond. Although that singular LiveJournal article certainly showed, among other things, that the (then anonymous) Erin Hoffman had a terrific talent for certain kinds of writing; &lt;span style="font-style: italic;"&gt;EA: The Human Story&lt;/span&gt; was nominated for Joel Spolsky's &lt;span style="font-style: italic;"&gt;Best Software Essays&lt;/span&gt; of 2004.&lt;br /&gt;&lt;br /&gt;Subsequent events showed her to be equally determined, single purposed and shit stirring when deciding to embark upon a campaign, to highlight or right a wrong, to raise the profile of an issue she feels is getting brushed under the beanbag. Her &lt;a href="http://www.gamewatch.org/phpbb3/"&gt;gamewatch.org forum&lt;/a&gt; today holds over 12,000 posts in as many topics, though it seems not to have changed that world; for example, &lt;a href="http://www.gamewatch.org/phpbb3/viewtopic.php?f=6&amp;amp;t=1349"&gt;one comment&lt;/a&gt; from five years into the project (July 2009) revealed:&lt;br /&gt;&lt;blockquote style="font-style: italic;"&gt;They're still doing it. I have a friend who is working 6am to 9pm 7 days a week as his project approaches release.&lt;br /&gt;&lt;br /&gt;Despite Riccitiello's assurances otherwise, his middle management is fighting him and refusing to change. They are still paying below-the-poverty-line wages, they still are incapable of figuring out a schedule that doesn't involve abuse of its employees, and they are still playing games with employee classifications to avoid providing full benefits.&lt;br /&gt;&lt;br /&gt;I'm in the industry, and if my company ever got acquired by EA, I would quit on the spot. My salary would be cut, my hours increased without compensation, and my work transformed into a bureaucratic mess (I've heard how heavy in middle management EA is). I'd be spending more time filling out useless make-the-managers-look-busy reports and attending endless meetings than coding and documenting. Nothing is worth this price, and people looking to enter the industry need to realize that.&lt;br /&gt;&lt;br /&gt;Anyone but EA.&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;So Not About That Then&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So no, like I said, the book's not actually about any of that. As you might more reasonably have guessed, &lt;span style="font-style: italic;"&gt;Sword of Fire and Sea&lt;/span&gt; - subtitled &lt;span style="font-style: italic;"&gt;The Chaos Knight, Book One&lt;/span&gt; - is a fantasy, written by one "obsessed with hidden truths, and the responsibility involved in uncovering them." Main character Captain Vidarian Rulorat is the last surviving member of his family. Obligated to an allegiance with the High Temple of Kara'zul by his great-grandfather's abdication of imperial commission (for love of a fire priestess, no less), Vidarian struggles to resolve the conflicts between the real world of his family legacy, and Andovar's hidden and morally ambiguous history.&lt;br /&gt;&lt;br /&gt;One of the things drawing me towards this title, in addition to its glowing reviews by multiple Hugo Award winning SF/F novelists ("Read it and be swept away" says Allen Steele), is its length. Or rather, the dearth of it. Erin has made the very deliberate choice to keep it succinct. Short novels, she says, are rare in fantasy these days. She loves the short form, and obviously hopes many others secretly do too. From her &lt;a href="http://whatever.scalzi.com/2011/06/23/the-big-idea-erin-hoffman/"&gt;Big Idea&lt;/a&gt; piece via &lt;a href="http://whatever.scalzi.com/"&gt;John  Scalzi&lt;/a&gt;:&lt;br /&gt;&lt;blockquote style="font-style: italic;"&gt;I want to get in, get euphoric, and get out, without getting bogged down in lengthy genealogy records or endless hikes across Mordor.&lt;/blockquote&gt;Available to preorder at &lt;a href="http://www.amazon.co.uk/Sword-Fire-Sea-Chaos-Knight/dp/1616143738"&gt;amazon.co.uk&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-6526058749334867402?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/6526058749334867402/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/06/remember-easpouse.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/6526058749334867402'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/6526058749334867402'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/06/remember-easpouse.html' title='Remember EA_Spouse?'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-ndVo3VX_flI/TgMrooUpp2I/AAAAAAAAA1E/DOWYeQhe6YY/s72-c/SwordOfFireAndSea.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-1980575358861919903</id><published>2011-06-19T14:15:00.039+01:00</published><updated>2011-07-18T00:51:21.176+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Technology'/><category scheme='http://www.blogger.com/atom/ns#' term='Electronics'/><category scheme='http://www.blogger.com/atom/ns#' term='Personal'/><title type='text'>Computer Museum (2)</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/-Ej1t0wlyV08/Tf3-66O9vNI/AAAAAAAAA0s/51PP1t5hGhc/s1600/P1010635.JPG"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="http://4.bp.blogspot.com/-Ej1t0wlyV08/Tf3-66O9vNI/AAAAAAAAA0s/51PP1t5hGhc/s320/P1010635.JPG" alt="" id="BLOGGER_PHOTO_ID_5619928198046137554" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;Re-Animation&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Fun though it was to dig out my old Sharp PC-1211 for the &lt;a href="http://mycodehere.blogspot.com/2011/03/computer-museum-1.html"&gt;previous article&lt;/a&gt; in this series, it was a little disheartening to realise that any attempt to procure its toxic little mercury batteries would likely land me on a terrorist watchlist for the rest of my life. So it was a happy surprise to be reminded that its successor, the PC-1500, takes four bog standard AA cells. Here it is, recently emerged from the loft, all powered up and asking for permission to erase its now random memory contents, the dream debris of its (almost three decade) nap.&lt;br /&gt;&lt;br /&gt;This 1983 purchase was funded through the usual channels. In other words, I initially went halfers with my pal Brian. Then once I'd accumulated enough buroo cheques, I did him over like Eric Cartman for full ownership. Honestly, sometimes I wonder how my friends ever did put up with my behaviour. But the time between striking this partnership and its ultimate betrayal was a golden age; the PC-1500 turned out to be a hacker's wet dream.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Peek And Poke&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We discovered various ways to abuse this BASIC programmable pocket computer, forcing it to interpret pre-crafted code memory contents as data, and &lt;span style="font-style: italic;"&gt;vice-versa&lt;/span&gt;. This first revealed that the BASIC ROM recognised several keywords not mentioned in the official user's manual. Not just any keywords, but the holy trinity of PEEK, POKE, and the almighty CALL. Soon we had discovered enough single machine code I/O instructions to discern that the processor was very Z80-like in its architecture, at which point Troy fell, and shit was lost.&lt;br /&gt;&lt;br /&gt;Soon armed with the full processor instruction set, we started writing super fast Moon Landers, Star Treks, Snakes, Space Invaders... and of course my own personal favourite, Son of the Revenge of Complex Arithmetic III. Having figured out the display hardware too, we had what felt like unlimited graphics power. Although the monochrome LCD was just 156×7 pixels, it was much cleaner and sharper looking than that of the PC-1211, which had used an ugly yellow-green filter to protect its fragile, almost still prototypical, vampiric liquid crystals, from damage by daylight.&lt;br /&gt;&lt;br /&gt;Actually on second thoughts, I think Dominoes was my favourite, for several reasons. It was the first game I wrote using the full power of the machine, and the one that paid off the initial purchase costs. The domino images were pixel-perfect, and the game let me introduce my dad to computers (no mean feat for a geek in the early 80s), because its UI was so friendly: to play the 3-4 domino, you just typed 34. Finally, the AI was terrific; it made a truly formidable opponent. How did I achieve this level of awe? &lt;span style="font-style: italic;"&gt;I programmed it to look at your hand&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/-qV323zpmyZ8/Tf4TNezHZiI/AAAAAAAAA00/jczDXTYq9Dc/s1600/P1010636.JPG"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="http://1.bp.blogspot.com/-qV323zpmyZ8/Tf4TNezHZiI/AAAAAAAAA00/jczDXTYq9Dc/s320/P1010636.JPG" alt="" id="BLOGGER_PHOTO_ID_5619950507331642914" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;Technology Caught Evolving&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So here's what my PC-1500 looks like inside. Notice the two 0.1" pitch chips, the ones labelled TC5514P, sticking up like sore thumbs on an otherwise 0.05" pitch surface mount 2-layer board with through plating. Those are 1K by 4 bit static RAMs. The big LH5801 on the bottom board is the CMOS static 8-bit CPU, its LH5811 neighbour the peripheral I/O controller (an unwritten law said these always had to be named +10 higher than the corresponding CPU part number). The whole machine, like all such pioneers, screams a thoroughgoing compromise of new and old technology; 6V performance versus 130mW C-MOS battery life.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;No Peripheral Vision&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We never did fork out for the audio cassette interface and printer. This might seem unbelievable now, but it's true: the ritual and preamble to playing a computer game involved an hour or so of &lt;span style="font-style: italic;"&gt;typing it all back in again&lt;/span&gt;. From your own notebooks, or from multipage magazine listings. Quite often this was the point at which games evolved, as you'd notice some possible improvement, or identify a great extension, each time you laboriously re-typed the now familiar code.&lt;br /&gt;&lt;br /&gt;That was bad enough for BASIC code. But now we had to enter machine code and hexadecimal data, all without the aid of an assembler. Not something you want to have to do even once, but we did it every day. More than the lack of program memory, it was this tiresome drudgery that taught us only ever to write optimum code, first time.&lt;br /&gt;&lt;br /&gt;I did design, and build into one of those pale blue Marshalls Electronics project boxes, a DC power supply to use with the PC-1500. Sadly I never really trusted my own crowbar overvoltage protection circuit enough to use it for more than a few minutes at a time. Eventually binned it just last year.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Previously:&lt;/span&gt; &lt;a href="http://mycodehere.blogspot.com/2011/03/computer-museum-1.html"&gt;Computer Museum (1)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="update"&gt;▶&lt;/a&gt; &lt;a href="http://3.bp.blogspot.com/-qGNGzZd1pO4/TgXGqji5vMI/AAAAAAAAA1M/UcXl9QDTS60/s1600/P1010648.JPG"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 200px; height: 96px;" src="http://3.bp.blogspot.com/-qGNGzZd1pO4/TgXGqji5vMI/AAAAAAAAA1M/UcXl9QDTS60/s200/P1010648.JPG" alt="" id="BLOGGER_PHOTO_ID_5622118144240368834" border="0" /&gt;&lt;/a&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;Update (June 25):&lt;/span&gt; the day after I power it up, the old PC-1500 begins haemorrhaging from the top right corner of the display. Click the photo on the right to sleuth the evidence. What the hell is this? So I dismantle it...&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/-EglYvl6Xf2c/TgXlyAWO4RI/AAAAAAAAA1U/E6P1X8p8xrE/s1600/P1010649.JPG"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 200px; height: 150px;" src="http://2.bp.blogspot.com/-EglYvl6Xf2c/TgXlyAWO4RI/AAAAAAAAA1U/E6P1X8p8xrE/s200/P1010649.JPG" alt="" id="BLOGGER_PHOTO_ID_5622152357091402002" border="0" /&gt;&lt;/a&gt;◀ Inside there's this 10cm dark red opaque plastic block, soft yet brittle, seemingly stuck to the top of the display with strawberry jam. That's it on the right hand side, while the trail of blood can now be seen on the PCB, display, bezel, and other components of the casing. This is going to take a lot of solvent, and a few drums of cotton buds...&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Half a bottle of meths and 100 cotton buds later:&lt;/span&gt; burp. Well that was an epic, what a fiddly stripdown, clean and rebuild. But the operation, the sticky gunky gluey plastic blockectomy, has been a success, and the wee beastie is back in pristine working condition. As for the thing I removed, not been able to find any reference to that in the online PC-1500 reference material. I suspect it may have been a thermal mass.&lt;br /&gt;&lt;br /&gt;The late seventies belonged to the bright, power hungry, red 7-segment LED wristwatch and calculator. Arriving in their New Romantic mullets, the first LCD replacements were quite temperamental, by which I mean, &lt;span style="font-style: italic;"&gt;temperature sensitive&lt;/span&gt;. They needed thermistor circuits to stabilize their viewing angle. My guess is that the soft plastic strip I've removed and discarded was designed to average out fluctuations in the sensed temperature, e.g. to stop the display from fading when the device was held in warm hands.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/-b7YRypMNPbg/Tf6I11H8I1I/AAAAAAAAA08/fWpw9Xvw0cA/s1600/cc.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 88px; height: 31px;" src="http://4.bp.blogspot.com/-b7YRypMNPbg/Tf6I11H8I1I/AAAAAAAAA08/fWpw9Xvw0cA/s400/cc.png" alt="" id="BLOGGER_PHOTO_ID_5620079843379782482" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-style: italic;"&gt;This work, including photography, is licensed under a &lt;/span&gt;&lt;a style="font-style: italic;" rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/"&gt;Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported Licence&lt;/a&gt;&lt;span style="font-style: italic;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://mycodehere.blogspot.com/2011/03/computer-museum-1.html"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-1980575358861919903?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/1980575358861919903/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/06/computer-museum-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/1980575358861919903'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/1980575358861919903'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/06/computer-museum-2.html' title='Computer Museum (2)'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-Ej1t0wlyV08/Tf3-66O9vNI/AAAAAAAAA0s/51PP1t5hGhc/s72-c/P1010635.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-6885825894371776603</id><published>2011-06-18T00:13:00.022+01:00</published><updated>2012-01-08T10:10:59.661Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Music'/><title type='text'>Sonny Marvello</title><content type='html'>&lt;span style="color: rgb(204, 0, 0);"&gt;Update 16 December 2011&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This post has been removed.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 0, 0);"&gt;Update 7 January 2012&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;On the other hand, the band's offensive remarks haven't yet been removed from Facebook, and are still publicly viewable. I guess it does no further harm to repeat them here:&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="https://www.facebook.com/sonnymarvello/posts/3015725752922"&gt;https://www.facebook.com/sonnymarvello/posts/3015725752922&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;img src="http://2.bp.blogspot.com/-DURYU_DoFsA/Twi_4BUTRaI/AAAAAAAABIw/0DXDZRpYt-4/s1600/Sonny%2BMarvello.png" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-6885825894371776603?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/6885825894371776603/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/06/sonny-marvello.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/6885825894371776603'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/6885825894371776603'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/06/sonny-marvello.html' title='Sonny Marvello'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-DURYU_DoFsA/Twi_4BUTRaI/AAAAAAAABIw/0DXDZRpYt-4/s72-c/Sonny%2BMarvello.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-9154202982407244274</id><published>2011-06-17T20:46:00.012+01:00</published><updated>2011-07-18T01:12:52.274+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Music'/><title type='text'>Prog Rock &amp; Metal News</title><content type='html'>&lt;a href="http://news.google.co.uk/news/section?pz=1&amp;amp;cf=all&amp;amp;ned=uk&amp;amp;hl=en&amp;amp;csid=7d6ecf57b214b344"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 171px; height: 41px;" src="http://3.bp.blogspot.com/-S-QwLaI1_ns/TfvaK5qOgPI/AAAAAAAAA0k/ggIm2PTbgKA/s400/news.gif" alt="" id="BLOGGER_PHOTO_ID_5619324840886305010" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;Read All Around It&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Most mornings, Google News is your excellent first stop shop for all that's happened in the night. The exception is Sunday, when nothing lighter than the dead tree edition of The Sunday Times will satisfy (online access not required, thanks). Truth is, I would still buy that weekly hundredweight of paper if everything except Dan Cairns's new music reviews got blacked out.&lt;br /&gt;&lt;br /&gt;For all those other, lesser days of the week, the customizability of the Google News U.K. page* ensures there's always more than enough news, knowledge and gossip on tap. The important step is that customization. My own choice of standard sections, given geography and blogging interests, holds no surprises: World, U.K., Scotland, Glasgow, Sci/Tech, Physics, Astronomy, Space, Computer Security, Video Games, Entertainment, and Rock Music.&lt;br /&gt;&lt;br /&gt;If you haven't personalised your Google News page yet, use the &lt;span style="font-style: italic;"&gt;Add a section&lt;/span&gt; link at the top right to find and add news categories that interest you, and the &lt;span style="font-style: italic;"&gt;Edit this page&lt;/span&gt; link to organise these, or to delete those of no interest. I'll never forget that enlightened day when my whole life, well my Google News experience anyway, improved tenfold as I finally got rid of those toxic default &lt;span style="font-style: italic;"&gt;Business, Sports, Health&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;Spotlight&lt;/span&gt; pages.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The Lost Chord&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;But there's one more, essential category of update you won't want to be without. I speak obviously of the latest events in the world of &lt;span style="font-style: italic;"&gt;progressive metal music&lt;/span&gt;. None of the standard supplied pages can quite satisfy the exacting criteria of this specific thirst for knowledge. Despair not, fellow geek headbangers, I bring you good news! Literally. I mean I've created a suitable custom section, based on the simple query "prog rock, progressive metal", which teases out of the Googleplex, just the optimum mixture of attention worthy, classic and modern, metal, prog, and their bastard offsprogs.&lt;br /&gt;&lt;br /&gt;On the &lt;span style="font-style: italic;"&gt;Add a section&lt;/span&gt; page under &lt;span style="font-style: italic;"&gt;Search for sections&lt;/span&gt;, type &lt;span style="font-style: italic;"&gt;progressive metal&lt;/span&gt; and hit &lt;span style="font-style: italic;"&gt;Search&lt;/span&gt;. You should return just one result, titled &lt;span style="font-style: italic;"&gt;Prog Rock &amp;amp; Metal&lt;/span&gt;; that's my page. Here's a link to its current content:&lt;span style="text-decoration: underline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://news.google.co.uk/news/section?pz=1&amp;amp;cf=all&amp;amp;ned=uk&amp;amp;hl=en&amp;amp;csid=7d6ecf57b214b344"&gt;&lt;/a&gt;&lt;blockquote&gt;&lt;a href="http://news.google.co.uk/news/section?pz=1&amp;amp;cf=all&amp;amp;ned=uk&amp;amp;hl=en&amp;amp;csid=7d6ecf57b214b344"&gt;http://news.google.co.uk/news/section?pz=1&amp;amp;cf=all&amp;amp;ned=uk&amp;amp;hl=en&amp;amp;csid=7d6ecf57b214b344&lt;/a&gt;&lt;/blockquote&gt;Never a week goes by without at least one or two interesting developments popping up here, which I haven't yet seen elsewhere. And the page is currently enjoying a great surge in popularity! Last time I checked, I think there were a total of approximately four subscribers. Wow! Clearly this is a phenomenon whose something something &lt;span style="font-style: italic;"&gt;now!&lt;/span&gt; And just imagine: &lt;span style="font-style: italic;"&gt;you&lt;/span&gt; can be subscriber number &lt;span style="font-style: italic;"&gt;five.&lt;/span&gt; That's right, I'm letting you in on the ground floor of this unique opportunity.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;You're welcome.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;* Actually the BBC News site gets roughly equal time; public service output is an excellent antidote to &lt;a href="http://www.thefilterbubble.com/"&gt;filter bubbling&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Update (July 18):&lt;/span&gt; Yes, in the wake of the phone hacking scandal, my entire extended family and I have now joined the inevitable total boycott of all News International publications. But to my shame, I should have done this many years ago. But for all its faults, crimes, and abuses, still there's nothing out there to approach the quality of The Sunday Times &lt;span style="font-style:italic;"&gt;when it's good&lt;/span&gt;. Trouble is, we can no longer determine when those times are, and when by contrast, it is being controlled - nay, written - by organised criminals. My Secondary English teacher Mrs Abraitis once enjoined us all to commit to this, then venerable, paper; and as many a raped choirboy might attest, such formative imperatives often cast long shadows.&lt;br /&gt;&lt;br /&gt;Today I can only hope that Dan Cairns will move his musical journalism expertise quickly elsewhere.&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-9154202982407244274?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/9154202982407244274/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/06/prog-rock-metal-news.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/9154202982407244274'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/9154202982407244274'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/06/prog-rock-metal-news.html' title='Prog Rock &amp; Metal News'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-S-QwLaI1_ns/TfvaK5qOgPI/AAAAAAAAA0k/ggIm2PTbgKA/s72-c/news.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-6230806054058511795</id><published>2011-06-13T18:03:00.005+01:00</published><updated>2011-06-25T18:37:08.495+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WTF'/><category scheme='http://www.blogger.com/atom/ns#' term='Comedy'/><title type='text'>Focus!</title><content type='html'>&lt;span style="font-weight: bold;"&gt;A Fortuitous Juxtaposition&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;RSS readers will have missed the coincidence of expression in my &lt;span style="font-style: italic;"&gt;Technology&lt;/span&gt; sidebar today, where these two articles from different Microsoft blogs collided:&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-sIamfg_EzAg/TfZDscD9jsI/AAAAAAAAA0Q/nUgwq9qDl6Y/s1600/Focus.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 222px;" src="http://3.bp.blogspot.com/-sIamfg_EzAg/TfZDscD9jsI/AAAAAAAAA0Q/nUgwq9qDl6Y/s400/Focus.png" alt="" id="BLOGGER_PHOTO_ID_5617752015917387458" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Nice to know the Key to Success at Microsoft is not something that you need to steal.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-6230806054058511795?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/6230806054058511795/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/06/focus.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/6230806054058511795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/6230806054058511795'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/06/focus.html' title='Focus!'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-sIamfg_EzAg/TfZDscD9jsI/AAAAAAAAA0Q/nUgwq9qDl6Y/s72-c/Focus.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-6214537994040300229</id><published>2011-06-13T17:00:00.000+01:00</published><updated>2011-06-13T17:57:15.485+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><title type='text'>A Really Good 4096-bit AES Key Service</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Where Do I Sign?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Sorry, there's just no such thing. Oh it exists in principle, yes. In theory. In Plato's universe of ideals, yes, you can buy them there. Pick them up for free, in fact. But as Robert X. Cringely (who is not a spy) explains in the article &lt;a href="http://www.cringely.com/2011/06/when-engineers-lie/"&gt;When Engineers Lie&lt;/a&gt;, &lt;span style="font-style: italic;"&gt;"Build a really good 4096-bit AES key service and watch the Justice Department introduce themselves to you."&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Bob also answers the perennial question about &lt;span style="font-style: italic;"&gt;architectural secrecy:&lt;/span&gt; why is it needed at all, if 1024- or 2048-bit codes really would take thousands of years to crack? Isn’t the encryption, combined with a hard limit on login attempts, good enough? The answer is &lt;span style="font-style: italic;"&gt;no&lt;/span&gt;. Part of the explanation is that the U.S. government insists on nobbling the key services of every provider - RSA, Cisco, Microsoft, just everybody - to ensure they're sufficiently insecure, to enable snooping. The cost of noncompliance is, of course, jail.&lt;br /&gt;&lt;br /&gt;For the obligatory silver lining, Bob points to IPv6 and Open Source, which he reckons &lt;span style="font-style: italic;"&gt;"are beginning to close some of those security doors that have been improperly propped open."&lt;/span&gt; Go read &lt;a href="http://www.cringely.com/2011/06/when-engineers-lie/"&gt;his article&lt;/a&gt; at &lt;a href="http://www.cringely.com/"&gt;I, Cringely&lt;/a&gt; to find out why.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;V For Vendetta&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Recently this little blog hasn't been doing its job, of reporting on the latest big security breaches, how they were done, whodunnit, and to whom. Quite simply there have been far too many; an almost unprecedented number of successful attacks, on a scale rarely seen previously. And as I've said before, the media coverage of this phenomenon has been such as to render my monthly &lt;span style="font-style: italic;"&gt;Security Digest&lt;/span&gt; utterly redundant.&lt;br /&gt;&lt;br /&gt;Instead we sit on the sidelines enjoying the mayhem, grumbling agreement with Bob Cringely. Or with &lt;a href="http://risky.biz/lulzsec"&gt;Patrick Grey at Risky.biz&lt;/a&gt;, who reckons that we - the professional security community - secretly love LulzSec. Patrick's rant is still more entertaining than Bob's, and just as thought provoking, as he laments his ten years of futility, trying to get businesses to see and acknowledge the potential for chaos which LulzSec is now so ably demonstrating, and which is gradually earning the reluctant respect of security researchers:&lt;br /&gt;&lt;blockquote style="font-style: italic;"&gt;Security types like LulzSec, because they're proving what a mess we're in. They're pointing at the elephant in the room and saying "LOOK AT THE GIGANTIC FUCKING ELEPHANT IN THE ROOM ZOMG WHY CAN'T YOU SEE IT??? ITS TRUNK IS IN YR COFFEE FFS!!!"&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;Not Necessarily the Official SDL Position&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Local hero and a familiar name to readers of this blog, Adam Shostack chimes in to express reluctant, or guarded, agreement. In his article &lt;a href="http://newschoolsecurity.com/2011/06/are-lulz-our-best-practice/"&gt;Are Lulz Our Best Practice?&lt;/a&gt; he confides that he takes &lt;span style="font-style: italic;"&gt;"a certain amount of pleasure in watching LulzSec. Whoever’s doing it are actually entertaining, when they’re not breaking the law. And even sometimes when they are."&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In prescribing the way out of our present troubles, Adam returns to the main point being made by Bob in the first article above. Salvation lies in admitting the breaches that do occur, talking about them and about the wider world of security openly, transparently and honestly.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-6214537994040300229?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/6214537994040300229/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/06/really-good-4096-bit-aes-key-service.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/6214537994040300229'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/6214537994040300229'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/06/really-good-4096-bit-aes-key-service.html' title='A Really Good 4096-bit AES Key Service'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-1806272968355909398</id><published>2011-06-12T12:33:00.009+01:00</published><updated>2011-06-18T00:58:57.570+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Music'/><title type='text'>Seven Seas of Rhye</title><content type='html'>Wouldn't exactly call myself a Queen fan.&lt;br /&gt;&lt;br /&gt;Commercially, they had some spectacular &lt;span style="font-style:italic;"&gt;ups&lt;/span&gt;; some surprising, and some predictable, &lt;span style="font-style: italic;"&gt;downs&lt;/span&gt;. Theatrically, they were always &lt;em&gt;sans pareil&lt;/em&gt;. Lyrically of course, Freddie never stopped improving for all of his life. But &lt;span style="font-style: italic;"&gt;musically&lt;/span&gt; speaking, seriously, I don't think they ever bettered this song. The rolling sixth beloved of all forms of popular music, and equally overused in them all, gets a twist in the opening piano arpeggio. Verse lengths are permuted by variations in the end pause (and one &lt;span style="font-style: italic;"&gt;minor&lt;/span&gt; deviation). An excursion into the subdominant bridge resolves almost too smoothly into the tonic return. And the ingenious, percussive meter of the final verse alone is worth the ticket price.&lt;br /&gt;&lt;br /&gt;&lt;object height="510" width="640"&gt;&lt;param name="movie" value="http://www.youtube-nocookie.com/v/P1j-6vRykFs?version=3&amp;amp;hl=en_GB"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;embed src="http://www.youtube-nocookie.com/v/P1j-6vRykFs?version=3&amp;amp;hl=en_GB" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" height="510" width="640"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;Saw them play this in Glasgow in 1973, when they supported Mott The Hoople. They got encored - while Ian Hunter, exiting stage right, had to beg for theirs! That tour was the very first, the last, the only time Queen played support for &lt;span style="font-style: italic;"&gt;anyone&lt;/span&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-1806272968355909398?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/1806272968355909398/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/06/seven-seas-of-rhye.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/1806272968355909398'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/1806272968355909398'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/06/seven-seas-of-rhye.html' title='Seven Seas of Rhye'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-3843239897292830129</id><published>2011-06-04T11:09:00.036+01:00</published><updated>2011-06-20T17:08:11.002+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Regular Expressions'/><category scheme='http://www.blogger.com/atom/ns#' term='Coding'/><title type='text'>Simple Regular Expressions #3½</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Undo Revisited&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I've been taken to task for failing to provide a Regex-based solution to the problem in the &lt;a href="http://mycodehere.blogspot.com/2011/04/simple-regular-expressions-3.html"&gt;previous article&lt;/a&gt; of this series, namely, removal of backtracked elements from a path. One correspondent even left a &lt;a href="http://mycodehere.blogspot.com/2011/04/simple-regular-expressions-3.html?showComment=1307178370918#c4853030645412447310"&gt;comment&lt;/a&gt; containing the missing Regex solution! Another complained that my I/O path specific .Net workaround would be zero help to someone just happening upon my article, maybe while researching some other aspect of the underlying patterns.&lt;br /&gt;&lt;br /&gt;It's a fair cop, and the only way to salvage even a wee bit of reputation is to provide a full explanation of the proposed Regex solution. In mitigation, the proposed mechanism (&lt;span style="font-style: italic;"&gt;Balancing Group Definitions&lt;/span&gt;, described below) is also unique to the .Net implementation of Regex. But hey, I'm only the piano player...&lt;br /&gt;&lt;br /&gt;This is one of those curious cases where the attempt to generalise the problem reveals a simplifying hidden structure. The first underlying pattern mentioned above is the &lt;span style="font-style: italic;"&gt;Undo&lt;/span&gt; (or sometimes the &lt;span style="font-style: italic;"&gt;Delete&lt;/span&gt;) pattern. Consider the original example:&lt;br /&gt;&lt;blockquote  style="font-weight: bold; font-style: italic; font-family:courier new;"&gt;d:\project&lt;span style="color: rgb(204, 0, 0);"&gt;\client\forms\..\..&lt;/span&gt;\version.cs&lt;/blockquote&gt;The entire midsection &lt;span style="font-family:courier new;"&gt;"\client\forms\..\.."&lt;/span&gt; is redundant; we'd like to delete such missteps, obtaining a "normalised" answer such as&lt;br /&gt;&lt;blockquote style="font-weight: bold; font-style: italic; font-family: courier new;"&gt;d:\project\version.cs&lt;/blockquote&gt;Consider the operating system's behaviour as it attempts to follow the original verbose path. It acts like a finite state machine. Each time it encounters a subdirectory name, like &lt;span style="font-family:courier new;"&gt;\client&lt;/span&gt; or &lt;span style="font-family:courier new;"&gt;\forms&lt;/span&gt;, it enters that subdirectory. Each time it encounters the &lt;span style="font-style: italic;"&gt;parent token&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;\..&lt;/span&gt; it reverses back out of the most recently entered subdirectory.&lt;br /&gt;&lt;br /&gt;But look what happens when we replace the phrases &lt;span style="font-style: italic;"&gt;subdirectory name&lt;/span&gt; with &lt;span style="font-style: italic;"&gt;letter&lt;/span&gt;, and &lt;span style="font-style: italic;"&gt;parent token&lt;/span&gt; with &lt;span style="font-style: italic;"&gt;backspace&lt;/span&gt;. Now the problem can be seen to be completely analogous with that of &lt;span style="font-style: italic;"&gt;correcting a typed word&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A Typo Processor&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Let's use the &lt;span style="font-weight: bold; font-style: italic; font-family:courier new;" &gt;#&lt;/span&gt; symbol to represent the pressing of the backspace key. Then our new problem is to take an input comprising a sequence of letters and &lt;span style="font-weight: bold; font-style: italic; font-family:courier new;" &gt;#&lt;/span&gt; symbols, and parsing it, recover the correctly typed word. For example, if I misspell &lt;span style="font-weight: bold; font-style: italic; font-family:courier new;" &gt;yield&lt;/span&gt; as &lt;span style="font-weight: bold; font-style: italic; font-family:courier new;" &gt;yeild&lt;/span&gt; but correct the mistake manually before completing the word, then the input string (the received sequence of keystrokes) might be &lt;span style="font-weight: bold; font-style: italic; font-family:courier new;" &gt;y&lt;span style="color: rgb(204, 0, 0);"&gt;ei##&lt;/span&gt;ield&lt;/span&gt;, and the required output is, of course, &lt;span style="font-weight: bold; font-style: italic; font-family:courier new;" &gt;yield&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;The pattern that our Typo Detector has to detect is: a number (one or more) of &lt;span style="font-weight: bold; font-style: italic; font-family:courier new;" &gt;#&lt;/span&gt; symbols, &lt;span style="font-style: italic;"&gt;immediately preceded by exactly that same number of letters&lt;/span&gt;. This then is the pattern - in the example case, &lt;span style="font-weight: bold; font-style: italic; font-family:courier new;" &gt;ei##&lt;/span&gt; - that must be removed, in order to, erm, &lt;span style="font-style: italic;"&gt;yield&lt;/span&gt; the corrected word.&lt;br /&gt;&lt;br /&gt;Following the naive reasoning of the original article, we might try using something like &lt;span style="font-weight: bold; font-style: italic; font-family:courier new;" &gt;\w#&lt;/span&gt; (one "word" character, followed by a backspace token) to match the typo pattern. And just as before, this fails in the second simplest test case (the &lt;span style="font-weight: bold; font-style: italic; font-family:courier new;" &gt;ei##&lt;/span&gt; of the previous paragraph). What we need is &lt;span style="font-weight: bold; font-style: italic; font-family:courier new;" &gt;\w\w##&lt;/span&gt; to match that case. But then we also need &lt;span style="font-weight: bold; font-style: italic; font-family:courier new;" &gt;\w\w\w###&lt;/span&gt; to detect the case where three consecutive mistyped characters are corrected. And so on. In fact what we need is approximated by the pseudopattern&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;&lt;/span&gt;&lt;blockquote  style="font-family:courier new;"&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;\w{n}#{n}&lt;/span&gt;&lt;/blockquote&gt;where &lt;span style="font-weight: bold; font-style: italic; font-family:courier new;" &gt;n&lt;/span&gt; cannot be specified in advance, but&lt;br /&gt;&lt;ul&gt;&lt;li&gt;is greater than zero, and&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;represents the same number in both positions&lt;/span&gt;.&lt;/li&gt;&lt;/ul&gt;Actually, we want even more than that. What about cases where I make a mistake while correcting a previous typo? For example &lt;span style="font-weight: bold; font-style: italic; font-family:courier new;" &gt;y&lt;span style="color: rgb(204, 0, 0);"&gt;ei#i##&lt;/span&gt;ield&lt;/span&gt;. Ideally we'd also like permuted edit patterns like this one, &lt;span style="font-weight: bold; font-style: italic; font-family:courier new;" &gt;\w\w#\w##&lt;/span&gt;, extracted as entire single units. Unbelievably, this functionality is readily provided by the Microsoft proprietary Regex extension known as...&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The Balancing Group Definition&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;But first, let's revise the &lt;span style="font-style: italic;"&gt;Group&lt;/span&gt; concept from the ground up. Groups are simply added to a Regex by surrounding any pattern subexpression in parentheses. For example, the pattern&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;&lt;/span&gt;&lt;blockquote  style=" font-weight: bold;font-family:courier new;"&gt;&lt;span style="font-style: italic;"&gt;0141&lt;span style="color: rgb(204, 0, 0);"&gt;(\d{3})&lt;/span&gt;\d{4}&lt;/span&gt;&lt;/blockquote&gt;not only matches any BT landline number in Glasgow, but also allows the central three-digit exchange code to be retrieved conveniently as a &lt;span style="font-style: italic;"&gt;group&lt;/span&gt; for use elsewhere. These anonymous groups are retrieved by numerical index, which can quickly get a bit too fiddly for comfort.&lt;br /&gt;&lt;br /&gt;The next level of usability is the &lt;span style="font-style: italic;"&gt;named&lt;/span&gt; group. The prefix &lt;span style="font-weight: bold; font-style: italic; font-family:courier new;" &gt;?&lt;/span&gt; within a group introduces its name, which should be enclosed in either apostrophes or angle brackets. For example, the pattern&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;&lt;/span&gt;&lt;blockquote  style="font-family:courier new;"&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;0141&lt;span style="color: rgb(204, 0, 0);"&gt;(?'exchange' \d{3})&lt;/span&gt;\d{4}&lt;/span&gt;&lt;/blockquote&gt;allows retrieval of the three-digit &lt;span style="font-weight: bold; font-style: italic; font-family:courier new;" &gt;exchange&lt;/span&gt; group by &lt;span style="font-style: italic;"&gt;name&lt;/span&gt;. And we are nearly there. Because it's an interesting implementation detail about groups, and in particular named groups, that they are pushed on to a stack as they are identified. This means that they can also be popped off. If we can &lt;span style="font-style: italic;"&gt;push&lt;/span&gt; a group for each word character typed, &lt;span style="font-style: italic;"&gt;pop&lt;/span&gt; one for each backspace token, and &lt;span style="font-style: italic;"&gt;determine when the stack becomes empty&lt;/span&gt;, then we can detect &lt;span style="font-style: italic;"&gt;all redundant groups&lt;/span&gt; in the input stream.&lt;br /&gt;&lt;br /&gt;The &lt;span style="font-style: italic;"&gt;balancing group definition&lt;/span&gt; will delete ("pop") a previous group, and replace it ("push") with the interval between the previously defined group and the current group. Syntactically, we append the previous group name to the current one, using a hyphen for separation. So it looks like this:&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;&lt;/span&gt;&lt;blockquote  style="font-family:courier new;"&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;(?'curr-prev' subexpression)&lt;/span&gt;&lt;/blockquote&gt;The current group name &lt;span style="font-weight: bold; font-style: italic; font-family:courier new;" &gt;curr&lt;/span&gt; is optional, since nothing says that all groups have to be named. The previous group name &lt;span style="font-weight: bold; font-style: italic; font-family:courier new;" &gt;prev&lt;/span&gt; is mandatory; we do need some way of referring to it, since we're about to &lt;span style="font-style: italic;"&gt;pop&lt;/span&gt; it.&lt;br /&gt;&lt;br /&gt;Here is the magic pattern:&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;&lt;/span&gt;&lt;blockquote  style="font-family:courier new;"&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;\w(&lt;span style="color: rgb(204, 0, 0);"&gt;(?&amp;gt;\w(?'N')|#(?'-N'))&lt;/span&gt;*&lt;span style="color: rgb(204, 0, 0);"&gt;(?(N)(?!))&lt;/span&gt;)#&lt;/span&gt;&lt;/blockquote&gt;Since it detects an erroneous word character which is subsequently deleted, it begins naturally enough with &lt;span style="font-weight: bold; font-style: italic; font-family:courier new;" &gt;\w(&lt;/span&gt; and ends with &lt;span style="font-weight: bold; font-style: italic; font-family:courier new;" &gt;)#&lt;/span&gt;. Hey this is easy! Now look at the first interior pattern, west of the asterisk:&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;  color: rgb(204, 0, 0);font-family:courier new;" &gt;&lt;blockquote&gt;(?&amp;gt;\w(?'N')|#(?'-N'))&lt;/blockquote&gt;&lt;/span&gt;This is saying a couple of things:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;If there's another word character &lt;span style="font-weight: bold; font-style: italic;  color: rgb(204, 0, 0);font-family:courier new;" &gt;\w&lt;/span&gt; then push a new group, which we call &lt;span style="font-weight: bold; font-style: italic;  color: rgb(204, 0, 0);font-family:courier new;" &gt;N&lt;/span&gt;.&lt;/li&gt;&lt;li&gt;Otherwise if there's a backspace token &lt;span style="font-weight: bold; font-style: italic;  color: rgb(204, 0, 0);font-family:courier new;" &gt;#&lt;/span&gt; then pop the most recent group named &lt;span style="font-weight: bold; font-style: italic;  color: rgb(204, 0, 0);font-family:courier new;" &gt;N&lt;/span&gt;.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;The asterisk allows this process to happen any number of times, including zero. This corresponds to typing some characters, deleting a few, typing some more, and so on. Penultimately, east of the asterisk and just prior to the final &lt;span style="font-weight: bold; font-style: italic; font-family:courier new;" &gt;#&lt;/span&gt;, we find another expression:&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic; font-family:courier new;" &gt;&lt;span style="color: rgb(204, 0, 0);"&gt;&lt;blockquote&gt;(?(N)(?!))&lt;/blockquote&gt;&lt;/span&gt;&lt;/span&gt;This is a trick! If there are still undeleted word character groups on the stack, i.e. an &lt;span style="font-weight: bold; font-style: italic;  color: rgb(204, 0, 0);font-family:courier new;" &gt;N&lt;/span&gt; that hasn't yet been popped, this construction forces a match against the pattern &lt;span style="font-weight: bold; font-style: italic;  color: rgb(204, 0, 0);font-family:courier new;" &gt;(?!)&lt;/span&gt; about which all we need know is that it will fail. Well okay, it's called an &lt;span style="font-style: italic;"&gt;expressionless negative lookahead&lt;/span&gt;, if you really must know &lt;span style="font-style: italic;"&gt;everything!&lt;/span&gt; Otherwise so long as the final &lt;span style="font-weight: bold; font-style: italic; font-family:courier new;" &gt;#&lt;/span&gt; appears, we have found a wholly redundant segment.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Back To The Path&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If in our magic pattern we now replace &lt;span style="font-weight: bold; font-style: italic; font-family:courier new;" &gt;\w&lt;/span&gt; with a pattern for a subdirectory name,  such as &lt;span style="font-weight: bold; font-style: italic; font-family:courier new;" &gt;\\\w+&lt;/span&gt;, and if we further replace &lt;span style="font-weight: bold; font-style: italic; font-family:courier new;" &gt;#&lt;/span&gt; with the parent directory pattern &lt;span style="font-weight: bold; font-style: italic; font-family:courier new;" &gt;\\\.\.&lt;/span&gt; throughout, then we transform it into the path normalizer that was the subject of the original article. The details are horrendous, because filesystem subdirectory names can contain other than word characters, including dots. We have to exclude &lt;span style="font-weight: bold; font-style: italic; font-family:courier new;" &gt;\..&lt;/span&gt; from these, and &lt;span style="font-weight: bold; font-style: italic; font-family:courier new;" &gt;\.&lt;/span&gt; requires even more special handling. Nevertheless we have solved the fundamental problem of applying Regex here, and as it so happens that all of my subdirectory names were well behaved and dotless in any case, this solution would have worked for me.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Further Generalisation&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The Undo/Delete pattern itself represents a simple subset of the problems that these &lt;a href="http://msdn.microsoft.com/en-us/library/bs2twtah.aspx"&gt;Regex Grouping Constructs&lt;/a&gt; are capable of solving. Refer to the MSDN Regex topic on the applicability of &lt;a href="http://msdn.microsoft.com/en-us/library/bs2twtah.aspx#balancing_group_definition"&gt;Balancing Group Definitions&lt;/a&gt; for a complete guide to applying these constructs in &lt;span style="font-style: italic;"&gt;any&lt;/span&gt; given recursively nested construct parsing context, such as matching parentheses, opening and closing brackets, quotation marks, mathematical expressions, or lines of program code containing multiple nested calls (most of which cannot be parsed in Regex implementations other than the .Net one).&lt;br /&gt;&lt;br /&gt;Though be warned, the expository technical language used over there assumes at least some familiarity with the domain of abstract formal languages. Perhaps a better, more gentle introduction to balancing groups can be found in either of these articles:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bclteam/archive/2005/03/15/396452.aspx"&gt;.NET Regular Expressions: Regex and Balanced Matching [Ryan Byington]&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://weblogs.asp.net/whaggard/archive/2005/02/20/377025.aspx"&gt;Matching Balanced Constructs with .NET Regular Expressions [Wes Haggard]&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-style: italic;"&gt;Update (20 June 2011): I was going to share my .NET Regex Tester online with you, before I noticed that Derek Slager's is, in his own words, better... so, here's a link to his:&lt;/span&gt;&lt;br /&gt;&lt;a href="http://derekslager.com/blog/posts/2007/09/a-better-dotnet-regular-expression-tester.ashx"&gt;&lt;/a&gt;&lt;blockquote&gt;&lt;a href="http://derekslager.com/blog/posts/2007/09/a-better-dotnet-regular-expression-tester.ashx"&gt;http://derekslager.com/blog/posts/2007/09/a-better-dotnet-regular-expression-tester.ashx&lt;/a&gt;&lt;/blockquote&gt;&lt;span style="font-style: italic;"&gt;Good luck!&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-3843239897292830129?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/3843239897292830129/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/06/simple-regular-expressions-3.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/3843239897292830129'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/3843239897292830129'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/06/simple-regular-expressions-3.html' title='Simple Regular Expressions #3½'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-7414283792858401051</id><published>2011-05-23T09:06:00.018+01:00</published><updated>2011-06-18T00:43:26.112+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Technology'/><category scheme='http://www.blogger.com/atom/ns#' term='Science'/><category scheme='http://www.blogger.com/atom/ns#' term='Electronics'/><category scheme='http://www.blogger.com/atom/ns#' term='Education'/><category scheme='http://www.blogger.com/atom/ns#' term='Physics'/><title type='text'>Logicly</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/-hzyglweQrbo/Tdo9BqSf3sI/AAAAAAAAA0E/eKtKsGO3AWY/s1600/Adder.png"&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/-ft3NaG8EbH4/TdoVw6CmBSI/AAAAAAAAAz8/VTBQ_Hx7dyw/s1600/Logicly.png"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 200px; height: 132px;" src="http://2.bp.blogspot.com/-ft3NaG8EbH4/TdoVw6CmBSI/AAAAAAAAAz8/VTBQ_Hx7dyw/s200/Logicly.png" alt="" id="BLOGGER_PHOTO_ID_5609820215801414946" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight:bold;"&gt;The Digital Division&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Little Nephew has a physics exam today, so we've been busy revising the &lt;a href="http://www.sqa.org.uk/files/nq/Physics.pdf"&gt;curriculum&lt;/a&gt; over the weekend. Near as I can tell he's hitting full marks in the first five out of the six component units: Movement, Radiation, Telecommunications, Electricity, Sound and Music. Not that the sample questions are a great indicator of a candidate's proficiency. I'm certain you could replace your grasp of physics by the algorithm, "Divide the first number by the second", and score about 65% using that stratagem alone. He does seem already to have grasped this fact.&lt;br /&gt;&lt;br /&gt;The sixth and final unit covers the basics of Digital Electronics. Whether because it's the most recently introduced (we have previously had multiple sessions on the other areas), or because there are no number pairs to divide into each other, this does appear to be his one comparatively weak spot.&lt;br /&gt;&lt;br /&gt;I've written &lt;a href="http://mycodehere.blogspot.com/2009/11/on-education.html"&gt;previously&lt;/a&gt; about the efficacy of bringing practical demonstrations and &lt;span style="font-style: italic;"&gt;aides-mémoires&lt;/span&gt; into our lessons, and for several months had been toying with the idea of writing a simulator for the basic digital electronic components - gates, flip-flops, registers, switches, LEDs and so on. Even made a few aborted attempts, in C#, &lt;a href="http://en.wikipedia.org/wiki/Logo_%28programming_language%29"&gt;Logo&lt;/a&gt;, and &lt;a href="http://scratch.mit.edu/"&gt;Scratch&lt;/a&gt;. But these kept getting bogged down by one particular detail: propagation delay. If a given circuit would in reality oscillate, then I felt that the model should do likewise. Unfortunately, this single choice opens the floodgates to a torrent of design decisions, turning the unwary engineer into a startled frozen rabbit...&lt;br /&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/KISS_principle"&gt;&lt;span style="font-weight: bold;"&gt;K.I.S.S.&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Eventually yesterday, while he took his well-earned break and game of L.A. Noire between units 5 and 6, I decided I'd reinvented enough wheels for this month; performed a quick web search; and downloaded a 30 day demo of the first digital electronics simulator found. This was &lt;a style="font-weight: bold;" href="http://logic.ly/"&gt;Logic.ly&lt;/a&gt;, and I could never have wished for a more perfectly dovetailed fit to match our educational requirements. Had it up and running in three seconds. Had example circuits from his textbook entered and working ten seconds after that. Okay I might be exaggerating a little; it's actually a cross-platform web based app, requiring installation of Adobe AIR to provide the offline standalone version. But that's just how it felt. Everything dragged and clicked exactly as expected, working instantly, with not a single word of prompting. &lt;span style="font-style: italic;"&gt;Surely the only possible definition of the perfect UI.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Designer Josh Tynjala has &lt;span style="font-style: italic;"&gt;Kept It Simple, Stupid&lt;/span&gt;. There's no fatally misguided attempt to model propagation delay accurately, which I see now is technology dependent anyway. After all, some ways of constructing real, physical logic gates, instead of allowing runaway oscillating designs, might go into a thermally destructive linear mode. Rather than second-guess your technology tradeoffs, Josh's gates simply tolerate forced inconsistencies, and leave aberrant behaviours to be discovered in later, practical lashups with real components. Bravo.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;What's In The Box&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The supplied component set was also more than ideal for our needs &lt;span style="font-style: italic;"&gt;(hyperbole intended)&lt;/span&gt;. Gates include inverters, and &lt;span style="font-style: italic;"&gt;n&lt;/span&gt;-input gates &lt;span style="font-style: italic;"&gt;(2 ≤ n ≤ 8)&lt;/span&gt; in all flavours &lt;span style="font-style: italic;"&gt;(AND, OR, NAND, NOR, XOR, XNOR)&lt;/span&gt;. A nice touch is the configurability of these last two for either &lt;span style="font-style: italic;"&gt;odd/even parity&lt;/span&gt; or &lt;span style="font-style: italic;"&gt;"=1"&lt;/span&gt; behaviour. At the next level of integration, there are flip-flops of the &lt;span style="font-style: italic;"&gt;SR&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;D&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;JK&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;T&lt;/span&gt; kinds. Input controls include fixed logic levels, toggle and pushbutton switches, and a square wave generator. Outputs can go to either single lamps or 4-input hex digit displays.&lt;br /&gt;&lt;br /&gt;Despite my earlier remarks on propagation time, the available components do include a buffer.  According to the documentation, this &lt;span style="font-style: italic;"&gt;"simply propagates the signal it  receives. In the real world, a buffer will boost the electrical signal,  if it has lost strength. In Logicly's simulation, one may use the buffer  to affect propagation time."&lt;/span&gt; Hmm, I read that as: &lt;span style="font-style: italic;"&gt;"future expansion".&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Three demo circuits are provided to help get you started on more advanced projects: a D Latch memory cell, 1-bit Full Adder, and a Ripple Counter. Best of all, you can &lt;a style="font-style: italic;" href="http://logic.ly/demo/"&gt;try the free demo online&lt;/a&gt; (no download required, but does need Flash 10).&lt;br /&gt;&lt;br /&gt;&lt;a href="http://logic.ly/demo/"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 244px;" src="http://2.bp.blogspot.com/-hzyglweQrbo/Tdo9BqSf3sI/AAAAAAAAA0E/eKtKsGO3AWY/s400/Adder.png" alt="" id="BLOGGER_PHOTO_ID_5609863384584412866" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Customisation&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The circuit editor has configurable grid size and snap. Logic gate symbols are switchable between the distinctive shapes of the ANSI/IEEE standard, and the rectangles used by the IEC. Wire colours are used to indicate logic levels 0, 1 or indeterminate; these colours can be disabled or customised. Finally, unconnected inputs can be assigned a default logic level. When I started playing with chips in the 1970s, everything was TTL, and floating inputs went to logic "1". Some cretins even used this fact in their designs. The same idiots who bequeathed us the millennium bug, no doubt.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;My Wish List&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A killer feature would be the ability to package your own debugged circuit into its own little chip, a bit like the supplied flip-flop components, making it available for reuse in further designs. That's a lot of work, but I'm sure Josh has already thought of it plenty of times. Just the same, think I'll email him with the suggestion. Alternatively, or additionally, some more components from the MSI range would be good. Shift registers, multi-bit adders, that sort of thing. Lastly, a native &lt;span style="font-style: italic;"&gt;Print&lt;/span&gt; option in the standalone version might not hurt a lot.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;So... Did It Work?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Little Nephew is sitting his exam as I write this. I know he'll do extremely well.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-7414283792858401051?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/7414283792858401051/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/05/logicly.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/7414283792858401051'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/7414283792858401051'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/05/logicly.html' title='Logicly'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-ft3NaG8EbH4/TdoVw6CmBSI/AAAAAAAAAz8/VTBQ_Hx7dyw/s72-c/Logicly.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-6708851195602841491</id><published>2011-05-21T11:21:00.002+01:00</published><updated>2011-05-21T11:25:23.504+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Music'/><title type='text'>Ambient Cursed Drone Psychedelic Travel Toulouse</title><content type='html'>&lt;iframe style="position: relative; display: block; width: 400px; height: 100px;" src="http://bandcamp.com/EmbeddedPlayer/v=2/album=3301907682/size=venti/bgcol=FFFFFF/linkcol=4285BB/" allowtransparency="true" frameborder="0" height="100" width="400"&gt;&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;a href="http://saaad.bandcamp.com/album/pink-sabbath-ep"&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;Pink Sabbath EP by Saåad&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;/a&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-6708851195602841491?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/6708851195602841491/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/05/ambient-cursed-drone-psychedelic-travel.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/6708851195602841491'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/6708851195602841491'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/05/ambient-cursed-drone-psychedelic-travel.html' title='Ambient Cursed Drone Psychedelic Travel Toulouse'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-3679617057680480099</id><published>2011-05-20T09:25:00.026+01:00</published><updated>2011-05-21T00:57:22.371+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><category scheme='http://www.blogger.com/atom/ns#' term='Logic'/><category scheme='http://www.blogger.com/atom/ns#' term='Sony'/><title type='text'>Is Jonathan Fargher Entirely Trustworthy?</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.bbc.co.uk/news/technology-13424923"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 200px; height: 150px;" src="http://3.bp.blogspot.com/-C55VL3QIBYY/TdZJbgQoC_I/AAAAAAAAAz0/WefnbhONvwU/s200/LBP.jpg" alt="" id="BLOGGER_PHOTO_ID_5608751122801495026" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;Sony's Apology Package&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Haven't had much to say about Sony's recent security troubles. Well, it's hard to travel anywhere on the news websites and blogs, without crashing into Floydian walls of opinion about the corporation and its permanently besieged Playstation Network. Even on the subject of this post, namely the "apology package", there are countless deafening choruses of "too little", "too late", "also, I want an Xbox", and related flamewars without end.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;However&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Jonathan Fargher, senior PR manager for Sony Computer Entertainment Europe (SCEE), has crossed a line with me. And I'm sure, with every other gamer with a gramme of technically literacy. If I may quote just two lines of his, from say the &lt;a href="http://www.bbc.co.uk/news/technology-13424923"&gt;BBC's report&lt;/a&gt;:&lt;br /&gt;&lt;ol style="font-style: italic;"&gt;&lt;li&gt;Clearly there's going to be a minority of people out there who have some of those games.&lt;/li&gt;&lt;li&gt;We certainly believe [...] the choice of games that we're offering [...] is good value.&lt;/li&gt;&lt;/ol&gt;Of course I have to be careful what I say now, mindful of my country's draconian, and quite literally, unspeakably insane 17th century libel laws. But given these two statements, it is quite easy to prove with rigor, using little more than the rules of the predicate calculus, that Jonathan Fargher is either deranged, or a liar.&lt;br /&gt;&lt;br /&gt;The proof doesn't depend on the truth or falsity of the individual statements themselves; given certain platitudes, it's as certain as any proof in logic, more so than any in the rest of mathematics. It is true regardless of whether or not some people already have some or all of these games; whether those people form a minority, or a majority; whether the choice of games is good value or a ripoff; and whether or not Jonathan Fargher believes some, any, all or none of the above. No single given factoid convicts. Rather, Jonathan Fargher's problem is that there's no consistent assignment of truth values to the various parts of his statements, that avoids the incriminating conclusion.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Reductio Ad Absurdum&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We proceed by assuming the truth of everything Jonathan Fargher claims in those two statements above. From this we derive a contradiction. Finally we conclude that either Jonathan Fargher believes this contradiction, in which case he is arguably deranged; or alternatively, he doesn't actually believe (one or more of) his own claims. In that case, inescapably, he's a liar.&lt;br /&gt;&lt;br /&gt;So, working from the back to the front: the second thing Jonathan Fargher believes is that the choice of games is "good value". How can we express this in less subjective terms? Let's take a look at that choice.&lt;br /&gt;&lt;br /&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;th&gt;PS3 Title&lt;/th&gt;&lt;th&gt;Release Date&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Dead Nation&lt;/td&gt;&lt;td align="right"&gt;Dec 2010&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Infamous&lt;/td&gt;&lt;td align="right"&gt;May 2009&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Little Big Planet&lt;/td&gt;&lt;td align="right"&gt;Oct 2008&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Ratchet and Clank: Quest for Booty&lt;/td&gt;&lt;td align="right"&gt;Aug 2008&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Wipeout HD/Fury&lt;/td&gt;&lt;td align="right"&gt;Dec 2009&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;Apart from the PSN exclusive zombie shooter &lt;span style="font-style:italic;"&gt;Dead Nation&lt;/span&gt;, and the &lt;span style="font-style:italic;"&gt;Fury&lt;/span&gt; addition to warhorse &lt;span style="font-style:italic;"&gt;Wipeout HD&lt;/span&gt;, everything here is two or more years old.&lt;br /&gt;&lt;br /&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;th&gt;PSP Title&lt;/th&gt;&lt;th&gt;Release Date&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Killzone Liberation&lt;/td&gt;&lt;td align="right"&gt;Nov 2006&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Little Big Planet PSP&lt;/td&gt;&lt;td align="right"&gt;Nov 2009&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ModNation PSP&lt;/td&gt;&lt;td align="right"&gt;May 2010&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Pursuit Force&lt;/td&gt;&lt;td align="right"&gt;Nov 2005&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;Wow. I'd forgotten there even &lt;span style="font-style: italic;"&gt;was&lt;/span&gt; a PSP console in 2005.&lt;br /&gt;&lt;br /&gt;Yet regardless of the considerable age and the low current prices (below £10) of many of these titles, and notwithstanding the fact that you get to pick only &lt;span style="font-style:italic;"&gt;two games&lt;/span&gt; from either list, none of this allows us to deny Jonathan Fargher's claim of "good value". Why? Because here, they're &lt;span style="font-style: italic;"&gt;free&lt;/span&gt;. Any attempt to compute the value-for-money of a given selection results in a &lt;span style="font-style: italic;"&gt;division by zero&lt;/span&gt; error.&lt;br /&gt;&lt;br /&gt;That can't be right. Are we now agreeing with Jonathan Fargher, and going fargher still, to say that the selection represents &lt;span style="font-style: italic;"&gt;infinite value&lt;/span&gt;? No. Clearly the concept of value-for-money is inapplicable to truly free offers. A better gauge is the &lt;span style="font-style: italic;"&gt;popularity&lt;/span&gt; of the selections. The more popular the game, the higher its value as a free offering. But here we begin to see the seeds of the contradiction that we seek. In a given console community, &lt;span style="font-style: italic;"&gt;popular&lt;/span&gt; games are by definition those most likely to be owned already. And to such an existing owner, a free download of such a game obviously has a very low value indeed.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Summing Up&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;From Jonathan Fargher's Second Law, we are being offered a "good value" selection of games, in other words, a set containing at least some &lt;span style="font-style: italic;"&gt;popular&lt;/span&gt; games. By definition, such games are already owned by a majority of a given console community. That contradicts Jonathan Fargher's First Law, that no more than "a minority of people" will already have any of those games.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;Quod erat demonstrandum.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-3679617057680480099?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/3679617057680480099/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/05/is-jonathan-fargher-entirely.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/3679617057680480099'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/3679617057680480099'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/05/is-jonathan-fargher-entirely.html' title='Is Jonathan Fargher Entirely Trustworthy?'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-C55VL3QIBYY/TdZJbgQoC_I/AAAAAAAAAz0/WefnbhONvwU/s72-c/LBP.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-6751983520088120548</id><published>2011-05-09T09:00:00.003+01:00</published><updated>2011-05-14T11:12:51.398+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><title type='text'>Obscurity ≠ Security</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Unintended File Sharing&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In their &lt;a href="http://www.usenix.org/events/leet11/tech/full_papers/Nikiforakis.pdf"&gt;paper&lt;/a&gt; presented at LEET '11, the March USENIX Workshop on &lt;a href="http://www.usenix.org/event/leet11/index.html"&gt;&lt;span style="font-style: italic;"&gt;Large-Scale Exploits and Emergent Threats&lt;/span&gt;&lt;/a&gt;, a team of five researchers from Belgium and France draw attention to certain very significant weaknesses in file hosting services (FHS) such as &lt;span style="font-weight: bold;"&gt;Easyshare&lt;/span&gt;, &lt;span style="font-weight: bold;"&gt;FileFactory&lt;/span&gt;, and the daddy of them all, &lt;span style="font-weight: bold;"&gt;RapidShare&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Basically these sites and many others use the secret URI method of sharing uploaded files. Of the 88 services examined in the study (12 of the original 100 having become excluded, because they offered search features, and therefore no pretence of privacy), 34 were found to employ simple sequential file identifiers. 20 of these used no further mitigation against the simplest attacks. The other 14 appended the original file name, yielding an ID effectively unknown to the attacker.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Attack!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Unfortunately, those most vulnerable 20 include some of the most popular and highly (Alexa) ranked sites. Their entire collections of private hosted files can be enumerated quite simply, by uploading a test file to acquire a valid file ID; then repeatedly decrementing that.&lt;br /&gt;&lt;br /&gt;The researchers confirmed the viability of this attack by actually implementing an automatic crawler for those 20 sites. It managed to retrieve some 10,000 files per day for a whole month. Approximately half of these files had no other visible links on the web, suggesting that their owners do in fact regard them as effectively private data.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Decimate!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Even among the FHSs using additional obscurity, such as the original file name or randomly generated identifiers, short key lengths and restricted character sets were often found, as in many password contexts, still to leave protection relatively weak.&lt;br /&gt;&lt;br /&gt;Additional security features available with some FHSs include CAPTCHA and a delay before download. Amusingly, most of these services also offer a paid "PRO" version which removes these "restrictions". Password protection, which makes more sense in real security terms, is only offered in about a quarter of cases.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;HoneyFiles&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The paper then goes on to document further vulnerabilities, for example  in the publicly available software that even some of the better FHSs use  to provide their services. But even that is not its best part. The researchers next went on to develop ingenious techniques utilising decoy documents, to determine the extent to which the security vulnerabilities of these websites are already being exploited by malicious users.&lt;br /&gt;&lt;br /&gt;They even geolocated the hundreds of attacks on their "HoneyFiles". Perhaps unsurprisingly, more than half originated in Russia, and a further quarter in Ukraine. But significant contributions from fifteen other countries confirmed the world wide nature of these attack types. The researchers detected repeated attempts to use the fake credentials advertised in their HoneyFiles, as well as attempted SQL injection and file inclusion attacks.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Remedy&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Encryption on the user's local computer is obviously a good mitigation. The researchers have developed a proof-of-concept Firefox add-on, automatically to encrypt and decrypt files on upload and download, and to hide encrypted files through steganography.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://www.usenix.org/events/leet11/tech/full_papers/Nikiforakis.pdf"&gt;http://www.usenix.org/events/leet11/tech/full_papers/Nikiforakis.pdf&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-6751983520088120548?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/6751983520088120548/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/05/obscurity-is-not-security.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/6751983520088120548'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/6751983520088120548'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/05/obscurity-is-not-security.html' title='Obscurity ≠ Security'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-4272953273931594321</id><published>2011-05-04T12:37:00.028+01:00</published><updated>2011-06-30T16:30:08.114+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Music'/><category scheme='http://www.blogger.com/atom/ns#' term='Politics'/><title type='text'>Mission Accomplished</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Ten Years After&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-style: italic;"&gt;Note: written on the day Osama Bin Laden was killed.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;There's no doubt over the main news story this week: after a decade of planning, attempted operations, rhetoric, minor victories, apparently endless cold trails, dashed expectations and anticlimax, the operation was finally given the green light last weekend. To enter an impoverished strip of land, an isolated state ruled by an Islamist group regarded by some as being more than merely sympathetic to terrorism. A seemingly impossible border crossing, finally if indirectly negotiated by just over two dozen brave and dedicated professionals. A single determination and fixity of purpose, in an operation which had to be co-ordinated in utter secrecy until eventually, success was made certain, and the word was out.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Daniel_Barenboim"&gt;Daniel Barenboim&lt;/a&gt;, co-founder of the &lt;a href="http://en.wikipedia.org/wiki/West-Eastern_Divan_%28orchestra%29"&gt;West-Eastern Divan Orchestra&lt;/a&gt;, led an orchestra of European musicians in a "peace concert" &lt;a href="http://www.bbc.co.uk/news/world-middle-east-13264688"&gt;performance in Gaza&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://en.wikipedia.org/wiki/Daniel_Barenboim"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 220px; height: 293px;" src="http://4.bp.blogspot.com/-RpOpyuISdJI/TcKuF7ewMYI/AAAAAAAAAzg/k55S46lcDho/s400/DanielBarenboim.jpg" alt="" id="BLOGGER_PHOTO_ID_5603232303291576706" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;Daniel Barenboim, Vienna, 2008. Picture: &lt;a href="http://en.wikipedia.org/wiki/File:Barenboim_Vienna.jpg"&gt;Wikipedia&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Guerrilla Performance&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Since  its inception in 1999, millions have followed and been entertained,  educated and inspired by the history, the example, and the performances of the West-Eastern Divan  Orchestra. The brainchild of Barenboim, an Argentina-born Jew who today  holds Palestinian citizenship, and his friend, the now deceased  Palestinian literary scholar &lt;a href="http://en.wikipedia.org/wiki/Edward_Said"&gt;Edward Said&lt;/a&gt;,  it was intended from the start to bring together young musicians from  Israel and Arab countries, seeking to enable dialogue between the  various cultures of the Middle East, and promoting peace and  co-operation via the making of music together. Today, still  featuring both Jewish and Palestinian musicians, the orchestra has  members drawn from Egypt, Iran, Jordan, Lebanon and Syria, and boasts an  international reputation for the quality of its performances.&lt;br /&gt;&lt;br /&gt;First time I watched Paul Smaczny's multi-award-winning 2005 movie about the West-Eastern Divan Orchestra, &lt;a style="font-style: italic;" href="http://www.knowledge-is-the-beginning.com/Story.html"&gt;Knowledge Is The Beginning&lt;/a&gt;, it was mostly with my jaw on my lap. I recall saying to Linda, &lt;span style="font-style: italic;"&gt;"This wee guy's saving the world!"&lt;/span&gt; and also if I remember correctly, there was a wee bit of dust or some such bloody thing in my eye at the time.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://en.wikipedia.org/wiki/West-Eastern_Divan_%28orchestra%29"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 217px;" src="http://1.bp.blogspot.com/-oT7xWJEyb1U/TcFB0npbPbI/AAAAAAAAAzY/sGur0ODLXws/s400/Div%25C3%25A1n_Este-Oeste_2005.jpg" alt="" id="BLOGGER_PHOTO_ID_5602831783677345202" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;The West-Eastern Divan Orchestra, Pilas, Sevilla, 2005. Picture: &lt;a href="http://en.wikipedia.org/wiki/File:Div%C3%A1n_Este-Oeste_2005.jpg"&gt;Wikipedia&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;This latest victory against the forces of fear, ignorance and intolerance once   again shows the maestro continuing from strength to strength. Israeli citizens are prohibited by law from entering Gaza, however the new Egyptian military leaders have plans to open the border at the Rafah crossing. Barenboim entered Gaza via Egypt, together with 25 other musicians. Then they played some Mozart.&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-size:180%;"&gt;~&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-style: italic;"&gt;Update (June 25):&lt;/span&gt; Well whaddayaknow, Danny boy's only gone and got himself an &lt;a href="http://www.bbc.co.uk/news/entertainment-arts-13891509"&gt;honorary knighthood&lt;/a&gt; from Her Maj. Or rather, from the British ambassador to Berlin, at a gala dinner in the German capital. He is now a KBE - Knight of the British Empire - the highest honour said empire can bestow upon mere foreigners.&lt;br /&gt;&lt;br /&gt;I've also learned that there are two versions of Paul Smaczny's film &lt;span style="font-style: italic;"&gt;Knowledge Is The Beginning&lt;/span&gt; in circulation. The one currently showing on British Sky TV is the original, and ends when the dream of a Ramallah concert seems lost. Paul yelled out &lt;span style="font-style: italic;"&gt;Cut!&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;Print!&lt;/span&gt; then spliced in some other live performance footage to round off the work... a matter of mere days before it became clear, towards the end of the tour, that in fact the troublesome security issues had been resolved; Ramallah was going ahead.&lt;br /&gt;&lt;br /&gt;The edition on the &lt;a href="http://www.google.co.uk/search?q=Knowledge+Is+The+Beginning&amp;amp;ie=utf-8&amp;amp;oe=utf-8&amp;amp;aq=t&amp;amp;rls=org.mozilla:en-GB:official&amp;amp;client=firefox-a#hl=en&amp;amp;ds=pr&amp;amp;pq=%22knowledge%20is%20the%20beginning%22&amp;amp;xhr=t&amp;amp;q=%22Knowledge%20Is%20The%20Beginning%22%20%22Ramallah%20Concert%22%20DVD&amp;amp;cp=46&amp;amp;pf=p&amp;amp;sclient=psy&amp;amp;client=firefox-a&amp;amp;hs=W7H&amp;amp;rls=org.mozilla:en-GB%3Aofficial&amp;amp;tbs=p_ord:p&amp;amp;tbm=shop&amp;amp;source=hp&amp;amp;aq=f&amp;amp;aqi=&amp;amp;aql=&amp;amp;oq=%22Knowledge+Is+The+Beginning%22+%22Ramallah+Concert%22+DVD&amp;amp;pbx=1&amp;amp;bav=on.2,or.r_gc.r_pw.&amp;amp;fp=a4050da38e1c9aba&amp;amp;biw=1920&amp;amp;bih=976"&gt;2DVD set&lt;/a&gt; is a revised and updated version. It shows the different factions entering the West Bank, all under their Spanish diplomatic passports, but separately and at different times (the Israeli musicians not arriving until the day of the performance). This is followed by some actual footage of the Ramallah concert, and rounded off by one of (Sir!) Daniel's amazing humanitarian speeches. The second DVD is, of course, that entire concert.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-4272953273931594321?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/4272953273931594321/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/05/mission-accomplished.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/4272953273931594321'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/4272953273931594321'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/05/mission-accomplished.html' title='Mission Accomplished'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-RpOpyuISdJI/TcKuF7ewMYI/AAAAAAAAAzg/k55S46lcDho/s72-c/DanielBarenboim.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-7557807354607283964</id><published>2011-04-22T09:45:00.022+01:00</published><updated>2011-04-28T23:15:51.213+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Technology'/><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><category scheme='http://www.blogger.com/atom/ns#' term='Politics'/><category scheme='http://www.blogger.com/atom/ns#' term='Privacy'/><title type='text'>Freedom House Report</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.freedomhouse.org/template.cfm?page=664"&gt;&lt;img style="float: right; margin: 0pt 0pt 10px 10px; cursor: pointer; width: 154px; height: 200px;" src="http://1.bp.blogspot.com/-mMIr166JpN8/TbFAsdJISfI/AAAAAAAAAzQ/2CjIHFhfL5s/s200/FOTN2011-1.jpg" alt="" id="BLOGGER_PHOTO_ID_5598326944279579122" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;UK: Worst of a Good Lot&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Sponsored by the United Nations Democracy Fund (&lt;a href="http://www.un.org/democracyfund/"&gt;UNDEF&lt;/a&gt;), &lt;span style="font-weight: bold; font-style: italic;"&gt;Freedom House&lt;/span&gt; just published the report &lt;a href="http://www.freedomhouse.org/template.cfm?page=664"&gt;Freedom On The Net 2011&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The good news: UK narrowly escapes relegation from the first division, retaining its &lt;span style="font-style: italic;"&gt;Internet freedom status designation&lt;/span&gt; of "Free" (up to 30 points) with a nail biting 25 bad boys - up from 2009's (adjusted) total of 23 strikes. Only Italy and South Africa, at 26 points each, fare worse in this division.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Trajectory: Slight Decline&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The full league tables are here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.freedomhouse.org/images/File/FotN/MainScoreTable.pdf"&gt;http://www.freedomhouse.org/images/File/FotN/MainScoreTable.pdf&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The most worrying aspect, for user rights activists anyway, emerges when these scores are analysed by the three broad UNDEF categories: &lt;span style="font-style: italic;"&gt;obstacles to access&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;limits on content&lt;/span&gt;, and more disturbingly than those, &lt;span style="font-style: italic;"&gt;violations of user rights&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;1: Obstacles to Access&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The first category assesses barriers to access, both infrastructural and economic; governmental blocking of apps and/or tech; and control over access providers. Clearly there is some room for mitigation in this category, as not all of a network's shortcomings are necessarily planned to be such. The UK however makes no capital of this mitigation, scoring but a single point here - the best performance in fact among all of the (now 37) nations covered by this year's report.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;2: Limits on Content&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Next the survey considers "content limits" - all forms of censorship, including website filtering and blocking, content manipulation, and the availability, diversity and usage of digital media for social and political activism and news. Here we find the UK scraping its arse along the bottom of the channel, tying with Italy on 8 points, only South Africa worse on 9.&lt;br /&gt;&lt;br /&gt;The &lt;a href="http://www.iwf.org.uk/"&gt;Internet Watch Foundation&lt;/a&gt; comes  under particular and extensive criticism for its persistent technical incompetence, absence of clarity and transparency in its blocking and removal criteria  and actions, its inadequate appeals process, and lack of any judicial  (or even governmental) oversight.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;3: Violations of User Rights&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;That just leaves legal protections, restrictions and prosecutions, surveillance, privacy, imprisonment, and harassment including physical attacks. No surprises here, with the UK emphatically at the bottom of the division on 16 points (second worst is Italy on 12).&lt;br /&gt;&lt;br /&gt;The disastrous &lt;a href="http://www.legislation.gov.uk/ukpga/2010/24/contents"&gt;Digital Economy Act&lt;/a&gt; is highlighted, although the interim conclusion on that score states &lt;span style="font-style: italic;"&gt;"In  a positive development, the newly elected coalition government has  promised to review and repeal a number of laws that negatively affect  online free expression and privacy."&lt;/span&gt; As we have now seen this fail to happen, there must be doubt over the UK's overall "Free" status today.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Conclusions&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Internet freedom in the UK is measurably deteriorating year by year, as evidenced by the decline in the "free" status reported by successive Freedom House biennial surveys. The country specific report provides the details:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.freedomhouse.org/images/File/UK2011.pdf"&gt;http://www.freedomhouse.org/images/File/UK2011.pdf&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Many of these reasons have already been well publicised, for example:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The expansive restrictions of English libel law are identified as having &lt;span style="font-style: italic;"&gt;"...a significant chilling effect on both content producers and ISPs."&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Further high profile cases, illustrating the frequently ass like nature of the law, are included; such as freedom to tweet your frustration about airport closures through the medium of mad parody, and police sanctioning of cybercafe snooping by proprietors.&lt;/li&gt;&lt;/ul&gt;It's hard to escape the conclusion that we have already seen the UK's final days at the top table of Internet freedom.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-7557807354607283964?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/7557807354607283964/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/04/freedom-house-report.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/7557807354607283964'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/7557807354607283964'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/04/freedom-house-report.html' title='Freedom House Report'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-mMIr166JpN8/TbFAsdJISfI/AAAAAAAAAzQ/2CjIHFhfL5s/s72-c/FOTN2011-1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-5935057704390553056</id><published>2011-04-22T00:07:00.007+01:00</published><updated>2011-04-30T23:09:36.517+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Music'/><title type='text'>Ravish Revisited</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/-_e6ztbdnDto/TbC5TsNiKMI/AAAAAAAAAzI/lXdptWTd3hs/s1600/Ravish_01_front.jpg"&gt;&lt;img style="float: right; margin: 0pt 0pt 10px 10px; cursor: pointer; width: 320px; height: 320px;" src="http://3.bp.blogspot.com/-_e6ztbdnDto/TbC5TsNiKMI/AAAAAAAAAzI/lXdptWTd3hs/s320/Ravish_01_front.jpg" alt="" id="BLOGGER_PHOTO_ID_5598178084758104258" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;New Artwork!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Having a great Easter holiday right now, driving around mostly at random. Yesterday saw a day trip to the Lake District, stopping off at Windermere, grabbing an alfresco at the &lt;a href="http://www.wateredgeinn.co.uk/"&gt;Wateredge Inn&lt;/a&gt;. More about that later, &lt;span style="font-style: italic;"&gt;maybe...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Day before was a lazy local sightseeing trip of New Lanark and the Tinto hills. That's when we found this lovely old pavilion. Now admit it, if you rounded a random corner to find such a distinguished, beautiful brickwork black board, you'd screech to a halt for a proper pic, and use it as artwork for your new single.&lt;br /&gt;&lt;br /&gt;Well, we got there first. And while the super limited mini-vinylesque edition might already be sold out, you can still help yourself to the free MP3 download here:&lt;br /&gt;&lt;a href="http://jmkerr.com/music/2011-ravish/01%20Ravish.mp3"&gt;&lt;/a&gt;&lt;blockquote&gt;&lt;a href="http://jmkerr.com/music/2011-ravish/01%20Ravish.mp3"&gt;1: Ravish&lt;/a&gt;&lt;br /&gt;&lt;a href="http://jmkerr.com/music/2011-ravish/02%20The%20Drummer%27s%20Hashpipe.mp3"&gt;2: The Drummer's Hashpipe&lt;/a&gt;&lt;br /&gt;&lt;a href="http://jmkerr.com/music/2011-ravish/03%20The%20Devil%27s%20Pot%20Pipe.mp3"&gt;3: The Devil's Pot Pipe&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Artwork: &lt;a href="http://jmkerr.com/music/2011-ravish/Ravish_01_front.jpg"&gt;Front&lt;/a&gt; &lt;a href="http://jmkerr.com/music/2011-ravish/Ravish_02_back.jpg"&gt;Back&lt;/a&gt;&lt;/blockquote&gt;&lt;a href="http://jmkerr.com/music/2011-ravish/Ravish_02_back.jpg"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-5935057704390553056?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/5935057704390553056/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/04/ravish-revisited.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/5935057704390553056'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/5935057704390553056'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/04/ravish-revisited.html' title='Ravish Revisited'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-_e6ztbdnDto/TbC5TsNiKMI/AAAAAAAAAzI/lXdptWTd3hs/s72-c/Ravish_01_front.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-6474728858449543557</id><published>2011-04-08T23:59:00.080+01:00</published><updated>2011-04-28T11:51:58.372+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Music'/><title type='text'>Penultimate Retrochamps</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/-3acuJIsBRbQ/TaBC-Rt_6mI/AAAAAAAAAwc/5TWSI7EdoTc/s1600/P1010604.JPG"&gt;&lt;img style="float: right; margin: 0pt 0pt 10px 10px; cursor: pointer; width: 400px; height: 300px;" src="http://3.bp.blogspot.com/-3acuJIsBRbQ/TaBC-Rt_6mI/AAAAAAAAAwc/5TWSI7EdoTc/s400/P1010604.JPG" alt="" id="BLOGGER_PHOTO_ID_5593544374869813858" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;Futuristic Retro Champions&lt;br /&gt;The Captain's Rest, &lt;/span&gt;&lt;span style="font-weight: bold;"&gt;Glasgow&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;8 April 2011&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;On iTunes: &lt;a style="font-style: italic;" href="http://itunes.apple.com/gb/album/love-and-lemonade/id426887893"&gt;Love and Lemonade&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Never would have thought it possible, simultaneously to be so very sad, yet so happy. Certainly not after just that single pint of fresh orange and lemonade! But the happiness comes as standard with FRC, about whose contagious brand of &lt;a style="font-style: italic;" href="http://mycodehere.blogspot.com/2011/02/emotronic-happy-hardcore.html"&gt;emotronic happy hardcore&lt;/a&gt; I've written before. It comes from their performance, their open and unapologetic optimism, bright melodies and infinite smiling.&lt;br /&gt;&lt;br /&gt;Happiness comes too from stellar songwriting, which above all else about them, so deserves to be cherished. Pleasure comes from their sheer quality of vocal harmony, arrangement, execution and production. From ingenious lyrics that create empathy, joy and sublimation. The &lt;span style="font-style: italic;"&gt;absolute nailing&lt;/span&gt; of the sound they're after, with the biggest, bossest Black &amp;amp; Decker nail bloody gun. &lt;span style="font-style: italic;"&gt;So nailed&lt;/span&gt; that sometimes you will misfile it. This can lead to hallucinations.&lt;br /&gt;&lt;br /&gt;For example last year, on first hearing their mighty single &lt;span style="font-style: italic;"&gt;May The Forth&lt;/span&gt;, I recall thinking aye - that was really well bloody good. But later the same day, the chorus still in my head as I happened to put the song on again, stupid brain said wow, &lt;span style="font-style: italic;"&gt;didn't realise they did covers - but that sure was one fantastic classic&lt;/span&gt;. Shut up, stupid brain! You're out of your depth. You've pulled this trick on me before, telling me the music from that &lt;span style="font-style: italic;"&gt;Comet&lt;/span&gt; ad was another legendary 80s dance anthem, when actually it was just &lt;span style="font-style: italic;"&gt;Badly Drawn Boy&lt;/span&gt;'s &lt;a href="http://www.youtube.com/watch?v=Tdrv0LbCKNo"&gt;&lt;span style="font-style: italic;"&gt;All Possibilities&lt;/span&gt;&lt;/a&gt; (2002).&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/-p6xoc5AU8B8/TaC7ZX3L0YI/AAAAAAAAAyE/zdqFurtGNiw/s1600/001.png"&gt;&lt;img style="float: left; margin: 0pt 10px 10px 0pt; cursor: pointer; width: 194px; height: 200px;" src="http://3.bp.blogspot.com/-p6xoc5AU8B8/TaC7ZX3L0YI/AAAAAAAAAyE/zdqFurtGNiw/s200/001.png" alt="" id="BLOGGER_PHOTO_ID_5593676781770756482" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;Hey I Thought This Was About FRC -&lt;br /&gt;You Said Something About Sadness?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Ah yes, the sadness. Having known for this past half-year, that tonight's show would be their last ever appearance in Glasgow; tomorrow's in Edinburgh's Wee Red Bar, their last anywhere. It was a sign of the greatest affection that this loyal knot of fans, as the band took the stage tonight and a smiling Sita began "Oh well, here we are then, this is it", reacted with one voice: &lt;span style="font-style: italic;"&gt;boo&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;This warm welcome seemed entirely expected, and they brushed it off instantly. Seconds later, all were dancing to &lt;span style="font-style: italic;"&gt;Epic New Song&lt;/span&gt;. Swiftly followed by &lt;span style="font-style: italic;"&gt;Hi!&lt;/span&gt;, the first song they ever recorded. Oooh, meta - Retrochamps get nostalgic! A beaming Fergus Weir joined them on stage, providing chant vocals in &lt;span style="font-style: italic;"&gt;Let's Make Out&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;The gentle &lt;span style="font-style: italic;"&gt;Isn't It Lovely&lt;/span&gt; showed another side of the band, who continued to inject variety into the night with everyone taking a turn at lead vocals. When Sita steps up to the mic, every inch the pop star, she owns it. Yet from Harry's showcase &lt;span style="font-style: italic;"&gt;Speak To Me&lt;/span&gt;, through Carla's riotous &lt;span style="font-style: italic;"&gt;DIY Love Song&lt;/span&gt; to Ceal's vocal debut &lt;span style="font-style: italic;"&gt;Uh Oh (No Show)&lt;/span&gt; when she asks politely for a little more volume on her mic "just for this one song", the singing duties are passed round with that generosity, that freedom from ego, so often found in art school and music college bands, and so rarely elsewhere. Harry and Ceal even swapped guitar and bass duties toward the end.&lt;br /&gt;&lt;br /&gt;The &lt;span style="font-style: italic;"&gt;(New Order? Ladytron?)-&lt;/span&gt;styled gem &lt;span style="font-style: italic;"&gt;You Make My Heart&lt;/span&gt; exhibits again that time warping magic, paradoxically at once both retro classic and brightly original. As for the peerless &lt;span style="font-style: italic;"&gt;Jenna&lt;/span&gt; - like I said, Sita simply &lt;span style="font-style: italic;"&gt;owns&lt;/span&gt;. She actually made eye contact with me as together we sang one of their funniest lines, &lt;span style="font-style: italic;"&gt;"But you're so tall, and I'm Pieraccini!"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Packed into that tiny cellar, we sang all their words back to them. Poor Linda, squeezed in even closer to the deafening PA than I during &lt;span style="font-style: italic;"&gt;May The Forth&lt;/span&gt;, sought in vain any conscious hint of irony as certain fans in the... &lt;span style="font-style: italic;"&gt;mature&lt;/span&gt; category, not quite pulling box shapes like others half their age and size, would belt out - &lt;span style="font-style: italic;"&gt;Watching you dance / has given me / a second chance to feel young again&lt;/span&gt;...&lt;br /&gt;&lt;br /&gt;The one band member not accorded equal respect with everyone else was their beleaguered "one trick" drum machine, who showed some signs of giving out early on. &lt;span style="font-style: italic;"&gt;Our fault&lt;/span&gt;, quipped Sita, &lt;span style="font-style: italic;"&gt;running him five years on that one set of batteries&lt;/span&gt;. At the end of the night, I knew how he felt.&lt;br /&gt;&lt;br /&gt;Setlist: &lt;span style="font-style: italic;"&gt;Epic New Song, Hi!, Let's Make Out, Speak To Me, Strawberries And Vodka Shots, Count To Ten, Uh Oh (No Show), DIY Lovesong, Isn't It Lovely?, May the Forth, Jenna, You Make My Heart&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/-0u3pmwcVqmU/TaClzndBX0I/AAAAAAAAAx8/bRGel-ibaAk/s1600/002.jpg"&gt;&lt;img style="float: right; margin: 0pt 0pt 10px 10px; cursor: pointer; width: 400px; height: 239px;" src="http://2.bp.blogspot.com/-0u3pmwcVqmU/TaClzndBX0I/AAAAAAAAAx8/bRGel-ibaAk/s400/002.jpg" alt="" id="BLOGGER_PHOTO_ID_5593653043376774978" border="0" /&gt;&lt;/a&gt;&lt;a href="http://en.wikipedia.org/wiki/Futuristic_Retro_Champions"&gt;&lt;span style="font-weight: bold;"&gt;Band Wiki&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Though on the night we did catch &lt;span style="font-style: italic;"&gt;FRC&lt;/span&gt;'s full set, we were as usual irredeemably late, missing out on the decks of &lt;span style="font-style: italic;"&gt;Manda Rin&lt;/span&gt; and most of &lt;span style="font-style: italic;"&gt;Little Eskimos&lt;/span&gt;. This was partly due to our driver (=me) mentally relocating The Captain's Rest, first to Bath Street, then even less helpfully to St Vincent Street, before finally giving up entirely and heading off randomly - not to mention &lt;span style="font-style: italic;"&gt;fortunately&lt;/span&gt; - in the direction of Great Western Road.*&lt;br /&gt;&lt;br /&gt;When we arrived, Carla's brother Murray Easton on the door recognised me as the band's shadow lurking, unofficial Wikipedia guy. And he must have told; for after the show, when I asked Sita to autograph my new copy of the 2CD &lt;span style="font-style: italic;"&gt;Love And Lemonade&lt;/span&gt;, she mentioned that Wiki in the signing [pic]. Later too Carla and her boyfriend tried to say hello, while Linda and I raved back at them (in my case a little hoarsely) about the night's performance. Murray having left with his marker pen, I was unable to collect Carla's autograph. &lt;span style="font-style: italic;"&gt;Desolation!&lt;/span&gt; We might just have to take a run through to Edinburgh tonight...&lt;br /&gt;&lt;br /&gt;On the other hand, these perfectly retro mini-vinyl style CDs hid a beautiful sealed note from "Casio Carla" (actually she drives a big Yamaha) which, given the super-limited edition of just 75 copies, might have to do instead until we meet again. No you can't see it, it's &lt;span style="font-style: italic;"&gt;mine&lt;/span&gt;. Murray did let slip a few details about the new band the girls are planning soon to form, but I'm keeping shtum about that too, at least until there's an official announcement. Their level of talent and originality is just shocking; it can't happen too soon. &lt;span style="font-style: italic;"&gt;And that goes for you too, Harry Weeks!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;More photos from the gig: &lt;a href="https://picasaweb.google.com/johnmkerr/FRCCaptainSRestApr82011#"&gt;https://picasaweb.google.com/johnmkerr/FRCcaptainsrestApr82011#&lt;/a&gt; by Linda Kerr.&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-style: italic;"&gt;Free to use under the &lt;/span&gt;&lt;a style="font-style: italic;" href="http://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License"&gt;Creative Commons Attribution-ShareAlike 3.0 Unported licence&lt;/a&gt;&lt;span style="font-style: italic;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;* Wow, eight adverbs counting "first". Candidate for worst sentence ever written!&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;[Update: 9 Apr 2011]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Ultimate Retrochamps: The Disbanding&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Ten o'clock on a soft Glasgow April evening. Forty miles to the east, FRC play the final tumultuous chord of their ultimate show &lt;span style="font-style: italic;"&gt;(our last ever show ever!)&lt;/span&gt;, and Saturday night curfew sounds in Edinburgh's Wee Red Bar. Meanwhile back here, forty miles in the west, a sad duty calls. Wikipedia won't update itself:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-style: italic;"&gt;FRCs &lt;strike&gt;are&lt;/strike&gt; were...&lt;br /&gt;&lt;strike&gt;Current&lt;/strike&gt; Members...&lt;br /&gt;2006 - &lt;strike&gt;present&lt;/strike&gt; 2011...&lt;/span&gt;&lt;/blockquote&gt;Farewell, you Futuristic Retro Champions. When you quit, &lt;span style="font-style: italic;"&gt;you were still&lt;/span&gt; - in the words of Manda Rin - &lt;a style="font-style: italic;" href="http://www.glasgowmusic.co.uk/ReadFeature-0000000012"&gt;the best new band in Scotland&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;[Update: 12 Apr 2011]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Check out Murray's account of that whole weekend: &lt;a style="font-style: italic;" href="http://musicinglasgow.blogspot.com/2011/04/futuristic-retro-champions-last-weekend.html"&gt;http://musicinglasgow.blogspot.com/2011/04/futuristic-retro-champions-last-weekend.html&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8338396833705157791-6474728858449543557?l=mycodehere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mycodehere.blogspot.com/feeds/6474728858449543557/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mycodehere.blogspot.com/2011/04/penultimate-champs.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/6474728858449543557'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8338396833705157791/posts/default/6474728858449543557'/><link rel='alternate' type='text/html' href='http://mycodehere.blogspot.com/2011/04/penultimate-champs.html' title='Penultimate Retrochamps'/><author><name>John M Kerr</name><uri>http://www.blogger.com/profile/09707247617873542958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-3acuJIsBRbQ/TaBC-Rt_6mI/AAAAAAAAAwc/5TWSI7EdoTc/s72-c/P1010604.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8338396833705157791.post-1588539255043539666</id><published>2011-04-06T11:21:00.025+01:00</published><updated>2011-04-28T11:53:48.481+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Regular Expressions'/><category scheme='http://www.blogger.com/atom/ns#' term='Coding'/><title type='text'>Simple Regular Expressions #3</title><content type='html'>&lt;span style="font-weight: bold;"&gt;No Back Tracking&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I was processing a number of Visual Studio files. A large-ish number of C# solution, project, and source files. Looking for any obsolete (or otherwise redundant) &lt;span style="font-weight: bold; font-style: italic;"&gt;.cs&lt;/span&gt; file which wasn't included in a &lt;span style="font-weight: bold; font-style: italic;"&gt;.csproj&lt;/span&gt; - or worse, any &lt;span style="font-weight: bold; font-style: italic;"&gt;.csproj&lt;/span&gt; that wasn't explicitly built by a &lt;span style="font-weight: bold; font-style: italic;"&gt;.sln&lt;/span&gt;
