<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Dragons in the Algorithm</title>
	<atom:link href="http://mcherm.com/feed" rel="self" type="application/rss+xml" />
	<link>http://mcherm.com</link>
	<description>Adventures in Programming</description>
	<lastBuildDate>Fri, 03 Feb 2012 20:21:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
		<item>
		<title>Host Error 2</title>
		<link>http://mcherm.com/permalinks/1/host-error-2</link>
		<comments>http://mcherm.com/permalinks/1/host-error-2#comments</comments>
		<pubDate>Fri, 03 Feb 2012 20:21:09 +0000</pubDate>
		<dc:creator>mcherm</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://mcherm.com/?p=617</guid>
		<description><![CDATA[Another posting on how to understand Profile errors. If you ever see &#8220;Host error number XXX&#8221;, it means that this was the XXX&#8217;th error of the day that this Profile instance wrote to the logs. Get someone to look it up in the Profile logs. Also, Calling mrpc ZWRAP with [925, 8864, ""44758220"", &#124;!&#124;] will [...]]]></description>
			<content:encoded><![CDATA[<p>Another posting on how to understand Profile errors.<span id="more-617"></span></p>
<p>If you ever see &#8220;Host error number XXX&#8221;, it means that this was the XXX&#8217;th error of the day that this Profile instance wrote to the logs. Get someone to look it up in the Profile logs.</p>
<p>Also, <em>Calling mrpc ZWRAP with [925, 8864, ""44758220"", |!|]</em> will fail if 8864 is not a valid profile userid (which is the case for me).</p>
]]></content:encoded>
			<wfw:commentRss>http://mcherm.com/permalinks/1/host-error-2/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Removing the &#8220;Macros&#8221; warning in PowerPoint</title>
		<link>http://mcherm.com/permalinks/1/removing-the-macros-warning-in-powerpoint</link>
		<comments>http://mcherm.com/permalinks/1/removing-the-macros-warning-in-powerpoint#comments</comments>
		<pubDate>Mon, 30 Jan 2012 13:16:20 +0000</pubDate>
		<dc:creator>mcherm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mcherm.com/?p=614</guid>
		<description><![CDATA[When you open any PowerPoint presentation made by my company&#8217;s default presentation format, you get a warning that it contains macros and asking whether the macros should be disabled. The macros are useless, but removing this is somewhat awkward and difficult to remember so I&#8217;m writing down the instructions. Launch PowerPoint (these instructions work for [...]]]></description>
			<content:encoded><![CDATA[<p>When you open any PowerPoint presentation made by my company&#8217;s default presentation format, you get a warning that it contains macros and asking whether the macros should be disabled. The macros are useless, but removing this is somewhat awkward and difficult to remember so I&#8217;m writing down the instructions.<span id="more-614"></span></p>
<ol>
<li>Launch PowerPoint (these instructions work for Office 2010).</li>
<li>Open the presentation to be fixed.</li>
<li>Go to the File menu, and select &#8220;Options&#8221;.</li>
<li>Select &#8220;Customize Ribbon&#8221;.</li>
<li>On the right-hand side of the complex dialog find the &#8220;Main Tabs&#8221; section. Check the checkbox next to the &#8220;Developer&#8221; tab.</li>
<li>Click &#8220;OK&#8221; and return. You should now have a &#8220;Developer&#8221; menu above the ribbon.</li>
<li>Select the &#8220;Developer&#8221; menu to display the developer ribbon.</li>
<li>On the ribbon, click the button labeled &#8220;Visual Basic&#8221;</li>
<li>In the upper-left-hand side of the screen there is something labeled &#8220;VBAProject&#8221; with sub-folders labeled &#8220;Modules&#8221; some of which have entries with names like &#8220;Module1&#8243;. You may have to expand the tree-view widget to see some of these.</li>
<li>For each module, double-clicking will open it. Those that are completely blank (all of them in my company&#8217;s template) are useless and can clearly be deleted.</li>
<li>Delete a module by closing it (if you had opened it), then right-clicking on the module and selecting &#8220;Remove Module1&#8230;&#8221;. It will offer to save, but you won&#8217;t need to do that.</li>
<li>After doing this for all unwanted modules, go to the &#8220;File&#8221; menu and select &#8220;Close and Return to Microsoft PowerPoint&#8221;.</li>
<li>Save your newly-changed document.</li>
</ol>
<p>By the way, in case anyone couldn&#8217;t tell, after experience with it I <em>really</em> hate Microsoft&#8217;s &#8220;ribbon&#8221;. The old approach &#8220;Menus&#8221; required people to look around through lots of menus to find the commands they needed (although if they used a command frequently, they could read the menu to see what keyboard command would execute that). Power users could modify the menus if they wanted to (but hardly anyone did). In the new &#8220;Ribbon&#8221; interface, the commands that people use a lot are just one click away &#8212; as long as you know what arcane icon represents the action that you want to perform. If you need to find a new command you no longer have to look through the menus to find it&#8230; instead you simply perform a web search to find someone else who ran that command and follow the arcane set of clicks that they wrote in order to locate the mysterious and well-hidden button that performs the action. Power-users are people who know how to perform an action without looking it up on the web.</p>
]]></content:encoded>
			<wfw:commentRss>http://mcherm.com/permalinks/1/removing-the-macros-warning-in-powerpoint/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using a Mix of Computers and Humans for Security</title>
		<link>http://mcherm.com/permalinks/1/using-a-mix-of-computers-and-humans-for-security</link>
		<comments>http://mcherm.com/permalinks/1/using-a-mix-of-computers-and-humans-for-security#comments</comments>
		<pubDate>Tue, 10 Jan 2012 12:49:42 +0000</pubDate>
		<dc:creator>mcherm</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://mcherm.com/?p=610</guid>
		<description><![CDATA[Suppose that your bank offers currency conversion as a service: give them a deposit or make a withdrawal in euros and they&#8217;ll adjust your balance in dollars. They don&#8217;t do this out of the goodness of their hearts: today&#8217;s conversion rate is around 1.28 $ / €, so they&#8217;d give you 0.75 € for every [...]]]></description>
			<content:encoded><![CDATA[<p>Suppose that your bank offers currency conversion as a service: give them a deposit or make a withdrawal in euros and they&#8217;ll adjust your balance in dollars. They don&#8217;t do this out of the goodness of their hearts: today&#8217;s conversion rate is around 1.28 $ / €, so they&#8217;d give you 0.75 € for every $ and 1.25 $ for every € so they&#8217;d make a good 6.5% margin on the conversions.<span id="more-610"></span></p>
<p>By the way, what&#8217;s the conversion rate on really small amounts? Because of rounding, if you withdraw 1 US cent, converted to euros, they would owe you 3/4 of a euro cent, and rounded to the nearest cent that would be 1 euro cent.</p>
<p>So you walk into the bank and deposit $10. You then tell the teller you would like to make a 1-euro-cent withdrawal. You pocket the euro cent and your balance is $9.99. Ask for <em>another</em> euro cent and your balance is $9.98. Keep going and eventually you&#8217;ll have 10.00 € (in euro pennies). Now deposit this and they&#8217;ll give you $12.50. You just made $2.50. Stand there all day repeating this and you could make some real money.</p>
<p>Of course, this would never work. The teller might smile and give you the first euro cent, but by the second or third she&#8217;ll know that something is up. She may not figure out your currency scheme instantly (although probably she will), but she&#8217;ll tell you to get out and stop wasting her time. But if you were working with a computer instead of a cashier, then <a href="http://blog.acrossecurity.com/2012/01/is-your-online-bank-vulnerable-to.html">it just <em>might</em> work</a>!</p>
<p>The interesting thing to note here is that humans and computers have very different failure modes. There are <a href="http://revision3.com/scamschool/shortchange">some kinds of tricks</a> that humans fall for easily, like those that involve distraction or appeal to authority. Whereas computers won&#8217;t fall for any trick they&#8217;ve been programmed to defend against, but if you find something they are <em>not</em> programmed to expect, then you can exploit it over and over.</p>
<p>That is why robust security mechanisms combine <em>both</em> computers <em>and</em> humans, to get the best of both worlds. Usually this means that the computers do the transaction (it&#8217;s cheaper to offer online deposits and withdrawals than it is to pay a teller to work in a branch on every street corner), but you don&#8217;t just rely on the computers to keep things legit. You also have a security team who monitor the transactions and look for anything out of the ordinary. They then investigate &#8212; usually it&#8217;s just a coincidence or an unusual day, but sometimes it is an attempt at fraud or two friends who made a bet about who could generate the longest bank statement for the month of July. Then the security department can step in.</p>
<p>To put it succinctly and steal a bit from Lincoln: Some of the time you can fool computers all of the time. You can fool all humans but only some of the time. Fooling both is much harder.</p>
]]></content:encoded>
			<wfw:commentRss>http://mcherm.com/permalinks/1/using-a-mix-of-computers-and-humans-for-security/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Namespace for a valid SOAP message</title>
		<link>http://mcherm.com/permalinks/1/namespace-for-a-valid-soap-message</link>
		<comments>http://mcherm.com/permalinks/1/namespace-for-a-valid-soap-message#comments</comments>
		<pubDate>Mon, 12 Dec 2011 14:35:29 +0000</pubDate>
		<dc:creator>mcherm</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://mcherm.com/?p=606</guid>
		<description><![CDATA[A brief hint: if you see an error message like this: InputStream does not represent a valid SOAP 1.1 Message check the namespace of the SOAP envelope SOAP 1.1: http://schemas.xmlsoap.org/soap/envelope/ SOAP 1.2: http://www.w3.org/2003/05/soap-envelope/]]></description>
			<content:encoded><![CDATA[<p>A brief hint: if you see an error message like this:</p>
<p style="padding-left: 30px;">InputStream does not represent a valid SOAP 1.1 Message</p>
<p>check the namespace of the SOAP envelope</p>
<p>SOAP 1.1: <a rel="nofollow" href="http://schemas.xmlsoap.org/soap/envelope/" target="_blank">http://schemas.xmlsoap.org/soap/envelope/</a></p>
<p>SOAP 1.2: <a rel="nofollow" href="http://www.w3.org/2003/05/soap-envelope/" target="_blank">http://www.w3.org/2003/05/soap-envelope/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://mcherm.com/permalinks/1/namespace-for-a-valid-soap-message/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Binary Backward Compatibility</title>
		<link>http://mcherm.com/permalinks/1/binary-backward-compatibility</link>
		<comments>http://mcherm.com/permalinks/1/binary-backward-compatibility#comments</comments>
		<pubDate>Thu, 08 Dec 2011 03:00:12 +0000</pubDate>
		<dc:creator>mcherm</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://mcherm.com/?p=601</guid>
		<description><![CDATA[I saw this interesting article about a weakness in the Scala language. The weakness applies not just to Scala, but to pretty much any language: the community using the language cannot grow past a certain point until it somehow solves the problem of libraries depending on other libraries in a large (deep) tree. Why is [...]]]></description>
			<content:encoded><![CDATA[<p>I saw this <a href="http://lift.la/scalas-version-fragility-make-the-enterprise">interesting article</a> about a weakness in the Scala language. The weakness applies not just to Scala, but to pretty much any language: the community using the language cannot grow past a certain point until it somehow solves the problem of libraries depending on other libraries in a large (deep) tree.<span id="more-601"></span> Why is this a problem? Because when the language moves forward (to the next version) a deep dependency tree means you can&#8217;t move forward until <em>every</em> library in the tree is moved to the new version, and making every library in the community do that simultaneously is extremely difficult. You can see the problem right now in the Python community: Python 3 was realeased THREE YEARS ago, but today many major libraries still don&#8217;t support it.</p>
<p>What I found most interesting was something that David Pollak (the post&#8217;s author) alluded to but did not emphasize: an example of a language that <em>has</em> solved this problem. Surprisingly, it is the much-maligned Java. (And perhaps this feature is one of the reasons for Java&#8217;s success in &#8220;the enterprise&#8221;, where backward compatibility to old or unmaintained libraries is often a very big deal.) The Java solution is to provide an incredibly strong amount of backward compatibility at the binary level (not just the source). As far as I know, essentially all code written under Java 1.0 (16 years ago) will still compile under the most recent Java release, and code <em>compiled</em> by that Java 1.0 compiler will still run under the most recent JVM. The price paid is some real ugliness in the name of backward compatibility like old APIs that still return Hashtable or ArrayList instead of Map or List, and type erasure that makes typed collection less powerful than they could be). But however much you may scoff at Java for poor language design, this feat of backward compatibility is something quite impressive.</p>
]]></content:encoded>
			<wfw:commentRss>http://mcherm.com/permalinks/1/binary-backward-compatibility/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Election Guide for Nov 8, 2011</title>
		<link>http://mcherm.com/permalinks/1/election-guide-for-nov-8-2011</link>
		<comments>http://mcherm.com/permalinks/1/election-guide-for-nov-8-2011#comments</comments>
		<pubDate>Tue, 08 Nov 2011 03:51:33 +0000</pubDate>
		<dc:creator>mcherm</dc:creator>
				<category><![CDATA[Politics]]></category>

		<guid isPermaLink="false">http://mcherm.com/?p=589</guid>
		<description><![CDATA[My election guide for November 8, 2011. My endorsements in Bold. Retention of Judge, Pennsylvania Supreme Court (retain or not): J. Michael Eakin NO, do not retain! &#8212; In 2006, The PA State Legislature voted itself a pay raise in direct violation of the plain wording of the state constitution which states. Judge Eakin was [...]]]></description>
			<content:encoded><![CDATA[<p>My election guide for November 8, 2011.<span id="more-589"></span></p>
<p>My endorsements in <strong>Bold</strong>.</p>
<p>Retention of Judge, Pennsylvania Supreme Court (retain or not):</p>
<p style="padding-left: 30px;">J. Michael Eakin</p>
<p style="padding-left: 60px;"><strong>NO, do not retain!</strong> &#8212; In 2006, The PA State Legislature voted itself a pay raise in direct violation of the plain wording of the state constitution which states. Judge Eakin was one of the Supreme Court judges who <a href="www.courts.state.pa.us/OpPosting/Supreme/out/J-36A-C-2006mo.pdf">found this to be constitutional</a>. In my mind, this makes him unfit for office, and I will vote NOT to retain him.</p>
<p>Pennsylvania Superior Court Judge (vote for 1):</p>
<p style="padding-left: 30px;"><strong>David Wecht (D)</strong></p>
<blockquote>
<ul>
<li><a href="http://www.wecht2011.com/">http://www.wecht2011.com/</a></li>
<li>&#8220;Highly Recommended&#8221; by PA Bar association</li>
<li>Lots of academic and scholarly law work</li>
</ul>
</blockquote>
<p style="padding-left: 30px;">Vic Stabile (R)</p>
<blockquote>
<ul>
<li><a href="http://www.stabileforjudge.com/about.php">http://www.stabileforjudge.com/about.php</a></li>
<li>Former deputy attorney general; former judicial clerk</li>
<li>&#8220;Recommended&#8221; by PA Bar association</li>
</ul>
</blockquote>
<p style="padding-left: 30px;"><em>Better qualified in several ways, I endorse David Wecht.</em></p>
<p>Retention of Judge, Pennsylvania Superior Court (retain or not):</p>
<p style="padding-left: 30px;">Mary Jane Bowes</p>
<blockquote>
<ul>
<li><a href="http://www.pabar.org/public/news%20releases/pr092811.asp">http://www.pabar.org/public/news%20releases/pr092811.asp</a></li>
<li><em>Bar says to keep. I have no independent background knowledge, so I will <strong>ABSTAIN</strong>.</em></li>
</ul>
</blockquote>
<p style="padding-left: 30px;">John T. Bender</p>
<blockquote>
<ul>
<li><a href="http://www.pabar.org/public/news%20releases/pr092811.asp">http://www.pabar.org/public/news%20releases/pr092811.asp</a></li>
<li><em>Bar says to keep. I have no independent background knowledge, so I will <strong>ABSTAIN</strong>.</em></li>
</ul>
</blockquote>
<p>Pennsylvania Commonwealth Court Judge (vote for 1):</p>
<p style="padding-left: 30px;">Anne Covey (R)</p>
<blockquote>
<ul>
<li><a href="http://www.coveyforjudge.com/">http://www.coveyforjudge.com/</a></li>
<li>Bar says &#8220;Recommended&#8221;</li>
</ul>
</blockquote>
<p style="padding-left: 30px;">Kathryn Boockvar (D)</p>
<blockquote>
<ul>
<li><a href="http://www.boockvar.com/">http://www.boockvar.com/</a></li>
<li>Bar says &#8220;Recommended&#8221;</li>
</ul>
</blockquote>
<p style="padding-left: 30px;"><em>Everything I could read paints both as decent, qualified candidates. I may cast my own vote based on party endorsement, but I cannot independently endorse either candidate.</em></p>
<p>Retention of Judge, Pennsylvania Commonwealth Court (retain or not):</p>
<p style="padding-left: 30px;">Robert E. Simpson, Jr.</p>
<blockquote>
<ul>
<li><a href="http://www.pabar.org/public/news%20releases/pr092811.asp">http://www.pabar.org/public/news%20releases/pr092811.asp</a></li>
<li><em>Bar says to keep. I have no independent background knowledge, so I will <strong>ABSTAIN</strong>.</em></li>
</ul>
</blockquote>
<p style="padding-left: 30px;">Renee Cohn Jubelirer</p>
<blockquote>
<ul>
<li><a href="http://www.pabar.org/public/news%20releases/pr092811.asp">http://www.pabar.org/public/news%20releases/pr092811.asp</a></li>
<li>Bar says to keep. I have no independent background knowledge, so I will <strong>ABSTAIN</strong>.</li>
</ul>
</blockquote>
<p style="padding-left: 30px;">Mary Hannah Leavitt</p>
<blockquote>
<ul>
<li><a href="http://www.pabar.org/public/news%20releases/pr092811.asp">http://www.pabar.org/public/news%20releases/pr092811.asp</a></li>
<li><em>Bar says to keep. I have no independent background knowledge, so I will <strong>ABSTAIN</strong>.</em></li>
</ul>
</blockquote>
<p>Pennsylvania Court of Common Pleas Judge (vote for 5):</p>
<p style="padding-left: 30px;"><strong>Nathaniel C. Nichols (R,D)</strong></p>
<blockquote>
<ul>
<li>Endorsed by both major parties, that&#8217;s good enough for me!<strong> </strong></li>
</ul>
</blockquote>
<p style="padding-left: 30px;"><strong>Christine Fizzano Cannon (R,D)</strong></p>
<blockquote>
<ul>
<li>Endorsed by both major parties, that&#8217;s good enough for me!</li>
</ul>
</blockquote>
<p style="padding-left: 30px;">G. Lawrence Demarco (D)</p>
<p style="padding-left: 30px;">Sally Ann Heckert Bikin (D)</p>
<p style="padding-left: 30px;">Michael F. Schleigh (D)</p>
<p style="padding-left: 30px;">Spiros E. Angelos (R)</p>
<p style="padding-left: 30px;">John P. Capuzzi, Sr. (R)</p>
<p style="padding-left: 30px;">G. Michael Green (R)</p>
<p style="padding-left: 30px;"><em>By the time I had reached these, I had run out of energy to do my research. I really don&#8217;t know much about them and so I can&#8217;t make any recommendations except to vote for the two who were endorsed by both parties.</em></p>
<p>Delaware County Council Member (vote for 3):</p>
<p style="padding-left: 30px;"><strong>Jayne Young (D)</strong></p>
<blockquote>
<ul>
<li><a href="http://haverford.patch.com/info_page/council-member-candidate-jayne-young">http://haverford.patch.com/info_page/council-member-candidate-jayne-young</a></li>
<li>Background: Mayor of Landsdowne</li>
<li>Came to speak on non-discrimination bill in Haverford.</li>
<li>Issues: economic revitalization. Health department. Visit each municipal council. Transparent government.</li>
</ul>
</blockquote>
<p style="padding-left: 30px;">John McBlain (R)</p>
<blockquote>
<ul>
<li> <a href="http://haverford.patch.com/info_page/council-member-candidate-john-mcblain">http://haverford.patch.com/info_page/council-member-candidate-john-mcblain</a></li>
<li>Background: City solicitor</li>
<li>Issues: Job creation via property tax abatement for new development</li>
</ul>
</blockquote>
<p style="padding-left: 30px;"><strong>Lin Axamethy Floyd (D)</strong></p>
<blockquote>
<ul>
<li> <a href="http://haverford.patch.com/info_page/h-questions-council-member-candidate-lin-axamethy-floyd">http://haverford.patch.com/info_page/h-questions-council-member-candidate-lin-axamethy-floyd</a></li>
<li>Background: Habitat for Humanity &amp; others. DuPont</li>
<li>Issues: transparent government</li>
</ul>
</blockquote>
<p style="padding-left: 30px;"><strong>Keith Collins (D)</strong></p>
<blockquote>
<ul>
<li> <a href="http://haverford.patch.com/info_page/patch-questions-council-member-candidate-keith-collins">http://haverford.patch.com/info_page/patch-questions-council-member-candidate-keith-collins</a></li>
<li>Background: Army, Police, Minister, Community College Prof</li>
<li>Issues: transparent government</li>
</ul>
</blockquote>
<p style="padding-left: 30px;">Thomas McGarrigle (R)</p>
<blockquote>
<ul>
<li> <a href="http://haverford.patch.com/info_page/council-member-candidate-tom-mcgarrigle">http://haverford.patch.com/info_page/council-member-candidate-tom-mcgarrigle</a></li>
<li>Issues: Economic Biz Development</li>
</ul>
</blockquote>
<p style="padding-left: 30px;"><strong>Colleen P. Morrone (R)</strong></p>
<blockquote>
<ul>
<li> <a href="http://haverford.patch.com/info_page/council-member-candidate-colleen-morrone">http://haverford.patch.com/info_page/council-member-candidate-colleen-morrone</a></li>
<li>Works at Goodwill</li>
<li>Economic Biz Development</li>
</ul>
</blockquote>
<p style="padding-left: 30px;"><em>I have seen Jayne Young &#8220;in action&#8221; and I was impressed. She was fair, articulate, and wise. I endorse her. The others I know much less about. Based on a combination of biography/background and issues, I am happy to support Lin Floyd, Keith Collins, and Colleen Morrone &#8212; and that&#8217;s one more than I&#8217;m allowed to vote for.</em></p>
<p>Delaware County District Attorney (vote for 1):</p>
<p style="padding-left: 30px;"><strong>Jack Whelan (R)</strong></p>
<blockquote>
<ul>
<li><a href="http://jackwhelan4da.com/">http://jackwhelan4da.com/</a></li>
<li>Background: County Council Chair, Assistant DA</li>
</ul>
</blockquote>
<p style="padding-left: 30px;">M. Kendall Brown (D)</p>
<blockquote>
<ul>
<li><a href="http://www.kendallbrownforda.com/">http://www.kendallbrownforda.com/</a></li>
<li>Background: Lawyer, Victims Rights Organizer</li>
</ul>
</blockquote>
<p style="padding-left: 30px;"><em>Kendall Brown is simply not as well qualified for the post. She does not hold an active law license at the moment (says it&#8217;s a paperwork issue and will be sorted out). Meanwhile, Jack Whelan is competent and qualified. <a href="http://delcodems.com/content/editorial-our-picks-delco-da-common-pleas-court">This endorsement</a> of Jack Whelan is from the Delaware county democrats. </em></p>
<p>Haverford Township School Director, &#8220;School Board&#8221; (vote for 5):</p>
<p style="padding-left: 30px;"><strong>Lawrence A. Feinberg (R,D)</strong><br />
<strong> ﻿Maxine Murdoch (R,D)</strong><br />
<strong> Joseph P. Martin (R,D)</strong><br />
<strong> Coleen Bennett (R,D)</strong><br />
<strong> Patricia Giambuzzi (R,D)</strong></p>
<p style="padding-left: 30px;"><em>We have a tradition in our township of non-partisan school board elections. All 5 candidates running are excellent, and I endorse them all. Larry Feinberg in particular has done an excellent job and I believe he will continue to do so.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://mcherm.com/permalinks/1/election-guide-for-nov-8-2011/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Story Points</title>
		<link>http://mcherm.com/permalinks/1/story-points</link>
		<comments>http://mcherm.com/permalinks/1/story-points#comments</comments>
		<pubDate>Thu, 29 Sep 2011 01:27:08 +0000</pubDate>
		<dc:creator>mcherm</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://mcherm.com/?p=585</guid>
		<description><![CDATA[If you have complete and accurate requirements for your project which won&#8217;t change, and your development team is spot-on in estimating and highly consistent in their development pace. and there are no surprises, then you can produce highly accurate project timeline estimates up front. Such accurate estimates are (or, more accurately, would be) quite useful [...]]]></description>
			<content:encoded><![CDATA[<p>If you have complete and accurate requirements for your project which won&#8217;t change, and your development team is spot-on in estimating and highly consistent in their development pace. and there are no surprises, then you can produce highly accurate project timeline estimates up front. Such accurate estimates are (or, more accurately, would be) quite useful and well worth the effort it takes to produce them because of how nicely you can schedule everything. But how about the rest of us, for which none of this is true?<span id="more-585"></span></p>
<p>There really isn&#8217;t much benefit to putting in lots of hours developing a detailed estimate if the project isn&#8217;t going to proceed according to plan <em>anyway</em> (and it rarely does). This is why most agile development approaches &#8212; including Scrum &#8212; use a less-precise but also less time-consuming approach. By going with rough requirements, and a simple imprecise estimation process a team can produce rough estimates in a surprisingly short amount of time. The time saved writing requirement documents and producing estimates can be used to build something useful instead.</p>
<p>The process that I have found to be most useful starts out with requirements that are simple: just a paragraph or two written down for a feature and a few minutes discussion to make sure everyone understands it. The team meets, making sure to include someone from the &#8220;business side&#8221; who can answer questions about what is needed, the developers, QA, DBAs, and whatever other specialists are needed. The business person explains what is needed; the team talks through how they will code and how it will be tested. Then we&#8217;re ready to estimate.</p>
<p>Everyone just says how long they think it will take. To avoid &#8220;groupthink&#8221; where everyone just agrees with the first person to speak, it&#8217;s good to have each person come up with their idea independently before comparing: selecting cards and all revealing at the same time is one way to do this. Everyone estimates: yes, that means the DBA may estimate a Java coding task, but that&#8217;s OK. To avoid long useless debates over whether it&#8217;s 23.2 or 23.4 we usually limit the estimated sizes to some discrete values: 1, 2, 3, 5, 8, 13, 20, and &#8220;more&#8221; are a widely used set of values (the values chosen to make it easy to split a task). If, after hearing what was said we all agree on the size then we&#8217;re done (this is where we all discount the DBA&#8217;s estimate of the Java task); if not then we discuss for a few more minutes: maybe someone realized an extra step the others missed or knows where to find test data without having to enter it. If we still disagree after that, just take the larger estimate.</p>
<p>That&#8217;s it! It takes only a few minutes to produce estimates this way. Of course, the estimates are worth what you put into them: the business MUST realize that these are only rough numbers. A common way to do that is to estimate in &#8220;Story Points&#8221; instead of &#8220;hours&#8221; or &#8220;days&#8221;. Speaking in terms of a unit that is less concrete seems to help remind everyone that this is only a rough value. But it is a rough value that did NOT take weeks of preparation, and thus well worth it.</p>
]]></content:encoded>
			<wfw:commentRss>http://mcherm.com/permalinks/1/story-points/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Faster than the Speed of Falsification</title>
		<link>http://mcherm.com/permalinks/1/faster-than-the-speed-of-falsification</link>
		<comments>http://mcherm.com/permalinks/1/faster-than-the-speed-of-falsification#comments</comments>
		<pubDate>Tue, 27 Sep 2011 01:41:43 +0000</pubDate>
		<dc:creator>mcherm</dc:creator>
				<category><![CDATA[Science]]></category>

		<guid isPermaLink="false">http://mcherm.com/?p=580</guid>
		<description><![CDATA[Lots of science writers are getting very excited about the news that an experiment measured neutrinos going faster than light. But as we all know, they are overreacting. Look, this really shouldn&#8217;t surprise anyone who has ever done any actual science. Karl Popper had a really simple and idealistic concept of how science works: you [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://articles.latimes.com/2011/sep/23/science/la-sci-0923-speed-of-light-20110923">Lots of</a> <a href="http://www.nytimes.com/2011/09/23/science/23speed.html">science writers</a> are getting <a href="http://www.guardian.co.uk/science/2011/sep/22/faster-than-light-particles-neutrinos">very excited</a> about the news that an experiment measured neutrinos going faster than light. But <em>as we all know</em>, they are overreacting.<span id="more-580"></span></p>
<p><a href="http://mcherm.com/blog/wp-content/uploads/2011/09/neutrino_timing.png"><img class="alignleft size-full wp-image-581" title="neutrino_timing" src="http://mcherm.com/blog/wp-content/uploads/2011/09/neutrino_timing.png" alt="Source: http://arxiv.org/abs/1109.4897" width="252" height="200" /></a>Look, this really shouldn&#8217;t surprise anyone who has ever done any actual  science. <a href="http://en.wikipedia.org/wiki/Karl_Popper">Karl Popper</a> had a really simple and idealistic concept of how  science works: you make a theory, use it to make a prediction, run some  experiments to verify the prediction, then if the theory keeps getting  it right then there&#8217;s probably something to it.</p>
<p>Beautiful theory, but in the REAL world any experimenter spends 90% of  their time trying to get the experiment to give the right results. It is  actually quite challenging to figure out where the boundary is between getting your apparatus to work properly and just fiddling with it until you get the result you expected. A good experimentalist understands that boundary and spends a lot of time worrying about possible sources of errors.</p>
<p>That is why I think the paper <a href="http://arxiv.org/abs/1109.4897">that started all this furor</a> was a GOOD paper to publish. Not because I seriously believe that neutrinos go faster than light&#8230; and I doubt that the authors of the paper actually think that either. But because it is a very surprising result, and <em>something</em> unexpected is going wrong here. Are our measurements of position from GPS less accurate than we think? How about the time measurements? These are the things that the paper focuses on, because they are the most important part. Not to publish this just to avoid looking foolish &#8212; <em>that </em>would be a real loss (and biased). So the media will just have to have their field day.</p>
]]></content:encoded>
			<wfw:commentRss>http://mcherm.com/permalinks/1/faster-than-the-speed-of-falsification/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How Even Immutables are Hard with Threads</title>
		<link>http://mcherm.com/permalinks/1/how-even-immutables-are-hard-with-threads</link>
		<comments>http://mcherm.com/permalinks/1/how-even-immutables-are-hard-with-threads#comments</comments>
		<pubDate>Wed, 24 Aug 2011 03:09:52 +0000</pubDate>
		<dc:creator>mcherm</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://mcherm.com/?p=574</guid>
		<description><![CDATA[Armen Rigo has a blog posting (worthy of an article of its own) proposing using STM (Software Transactional Memory) in PyPy. In a discussion on reddit someone suggested that you could have weaker threading guarantees and just use locks manually. It wouldn&#8217;t be so hard, they explained, because: You really only have to do it [...]]]></description>
			<content:encoded><![CDATA[<p>Armen Rigo has <a href="http://morepypy.blogspot.com/2011/08/we-need-software-transactional-memory.html">a blog posting</a> (worthy of an article of its own) proposing using STM (Software Transactional Memory) in PyPy. In <a href="http://www.reddit.com/r/Python/comments/jrm0t/pypy_status_blog_we_need_software_transactional/">a discussion on reddit</a> someone suggested that you could have weaker threading guarantees and just use locks manually.<span id="more-574"></span> It wouldn&#8217;t be so hard, they explained, because:</p>
<blockquote><p>You really only have to do it for data that is not read-only. I would for example say that it&#8217;s pretty rare for classes to change after they have been set up for the first time (presumably before any threads are even started), making the class basically read-only, which could be safely shared across threads.</p></blockquote>
<p>I wanted to give a detailed response with why this approach is nieve. Actually, it has been tried before and failed. It may work OK with certain kinds of languages (mostly &#8220;functional&#8221; languages), but fails with other kinds of languages, and Python is an extreme example of the kind of language where it won&#8217;t work.</p>
<p>For an example, consider Java. The JVM (Java Virtual Machine) has special features that were added to support exactly this behavior, but in practice few programmers use them. Let&#8217;s take a really simple example: suppose you create some data structure and a function to initialize it. In thread A you create the object, then initialize it, then pass it off to existing threads B and C. Threads B and C simultaneously read stuff from the data structure in ways that WOULD be dangerous except that the data structure is immutable after initialization.</p>
<p>The problem is that the guarantees provided in threading are MUCH weaker than you think. It&#8217;s not just that there are different threads all working at the same time and reading and writing from the same memory locations, the architecture of modern CPUs makes that impossible. You see, it takes hundreds of times longer to read something from memory or write it to memory as it takes to process something in the registers. So to execute &#8220;X = Y + 1&#8243;, the computer COULD spend 100 cycles reading Y, then 1 cycle adding 1 then 100 cycles writing X for a total of 201 cycles to execute. But that would be unbearably slow. Instead, it takes 100 cycles to do a bulk read of the whole memory area around where Y is stored into high-speed caches. It takes another 100 cycles to do a bulk read of the whole memory area aroudn where X is stored. It takes 1 cycle to add, then takes 100 cycles to do a bulk write of the memory area containing X. That&#8217;s 301 cycles&#8230; which sounds even worse.</p>
<p>But it&#8217;s NOT worse if the compiler cheats. Instead, it spends 100 cycles reading Y and 100 cycles reading X. Then it executes the +1 for one cycle. Then, BEFORE writing out X it does some OTHER calculations on the chunks of memory that have been read in. If the program has good cache locality (active objects are near each other in memory) it may get 75 cycles of useful work done before it needs to spend 100 cycles to &#8220;flush the cache out&#8221; (write X and the other things that were updated. That would be a total of 375 cycles to do 75 bits of work, or just 5 cycles per line &#8212; a LOT better than 201!</p>
<p>But in order to do this, the compiler has the &#8220;cheat&#8221;. It has to execute bits of work out of order, although it can take special precautions to make sure that it gets the same answer as if it executed them in the order written. As seen by THIS thread. But as seen by a DIFFERENT thread, the steps may appear to happen in a very different order. The other thread won&#8217;t see the effects until they get flushed to main memory, and that won&#8217;t happen after every computation (unless it is running 100x too slow!!!).</p>
<p>WHEW!! Big wall of text there, but the story should explain why one thread in a program may see the computations by another thread happen in a different order. So imagine this:</p>
<p>&#8220;In thread you A create the object, then initialize it, then pass it off to existing threads B and C.&#8221;</p>
<p>But imagine that from thread C&#8217;s point of view, A created it, then passed it off, and only initializes it LATER. In fact, perhaps C will start using it at the same time that A is initializing it &#8212; so it&#8217;s not really immutable, and terrible errors result. This is NOT just a theoretical risk: I have written real code that exhibited this behavior when running on a multi-core machine.</p>
<p>In order to help protect against this, the Java langage added a special exception to the Java threading model. Despite all other threading rules, if a class is declared &#8220;final&#8221; (immutable) and then all code executed within the constructor is guaranteed to be occur before the constructor ends EVEN AS SEEN BY OTHER THREADS. In theory, this is a great tool for creating data structures ahead of time and then reading them after initialization from other threads.</p>
<p>But in <strong>practice</strong> it isn&#8217;t so good. Initializing everything within the constructor of an immutable object turns out to be a real pain. Often you really want to use a hashtable (not immutable), or use Spring injection to populate your objects after the constructor, or slew of other choices that make it hard to stuff all your setup code inside of constructors. Some languages support this better: Scala and Closure are examples of languages on the JVM that use this feature well, but in Java it is awkward because there&#8217;s no little special support for working with immutable objects. Python, as a language, is even worse: there are NO immutable objects in Python! So while it might be possible to do as you suggest (create special locks and use them around every __init__ method, then carefully make sure nothing is modified outside of __init__), the resulting language wouldn&#8217;t really read like Python.</p>
]]></content:encoded>
			<wfw:commentRss>http://mcherm.com/permalinks/1/how-even-immutables-are-hard-with-threads/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>When to Wrap a Library</title>
		<link>http://mcherm.com/permalinks/1/when-to-wrap-a-library</link>
		<comments>http://mcherm.com/permalinks/1/when-to-wrap-a-library#comments</comments>
		<pubDate>Sun, 03 Jul 2011 16:20:21 +0000</pubDate>
		<dc:creator>mcherm</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://mcherm.com/?p=562</guid>
		<description><![CDATA[I find that this comes up fairly frequently. You find some useful library: perhaps it does logging, or enforces design-by-contract, or it provides an API for calling web services. But someone on the team suggests that instead of using the library directly, we should create a wrapper: &#8220;that way, if we ever decide to switch [...]]]></description>
			<content:encoded><![CDATA[<p>I find that this comes up fairly frequently. You find some useful library: perhaps it does logging, or enforces design-by-contract, or it provides an API for calling web services. But someone on the team suggests that instead of using the library directly, we should create a wrapper: &#8220;that way, if we ever decide to switch to a different library instead it will be easy to switch&#8221;. Is this a good idea?<span id="more-562"></span></p>
<p>There are a few really good reasons for wrapping a library. The most important of these, is in order to add functionality or simplify use of the library. For instance, in a recent project we used Spring&#8217;s library for web service calls in order to make calls to our own company&#8217;s collection of web services. But when calling <em>our</em> web services, there are a bunch of things that would be nice to do. We always want the same value for the address to connect to, the timeout for the calls, and the set of headers to provide. We want additional special handling for errors wrapped around every call. Adding these features in a wrapper makes the wrapper <em>less</em> powerful (now it&#8217;s good only for calling <em>our</em> services whereas Spring&#8217;s original library could call any web service), but at the same time makes it much more useful for that one specific purpose.</p>
<p>I have also seen cases where the existing library had a terrible interface (API), and the wrapper attempts to make it palatable. The &#8220;<a title="Slick" href="http://slick.cokeandcode.com/">Slick</a>&#8221; library is a <del>Python</del>[ed] Java wrapper around <a href="http://www.lwjgl.org/">LWJGL</a> adding no real functionality but making it decent enough to use. This is a rare use case: most libraries that have a terrible interface also have lousy features and you&#8217;re better off finding a different library instead.</p>
<p>The most common argument that I hear is neither of these cases: the most common argument that I hear is that we should wrap the library so we can easily switch to a different library. In fact, I most often hear this from people developing in a language with <a title="strong typing defined" href="http://www.artima.com/weblogs/viewpost.jsp?thread=7590">strong typing</a>, such as Java. I find this argument completely unpersuasive, for two reasons. First of all, when you switch libraries, the new library typically does <em>not</em> have exactly the same API. For example, when we <a title="My previous article on why we switched" href="http://mcherm.com/permalinks/1/logging-apis-evaluating-options">switched</a> to SLF4J for logging one of the reasons for doing so was that it offered a better API that allowed functionality not possible with the previous API. Secondly, if you DO switch to a library with an API that is equivalent, in a strongly-typed language you can use standard refactoring tools to perform the switch without any risk of introducing bugs. (If the APIs are close enough a simple search-and-replace for an import statement may do it.)</p>
<p>There are advantages to using a library directly. Developers who have encountered the library elsewhere may already be familiar with it. The documentation for the library is likely to be far more extensive than the documentation for your wrapper. It is often safe to assume that the designers of the library are better at designing an API for this feature than you are. As the library is upgraded, newer features will automatically be available. Most of all, having one fewer layers means there is simply less to learn to understand the system.</p>
<p>There are still a few advantages to wrapping without extra features. It gives you a place to add some logging code, or timers around an external call (for profiling), or validation checks. And there are some cases where you want to be able to use <em>different</em> libraries with the same codebase &#8212; then a wrapper is indispensable. <a href="http://commons.apache.org/logging/">Commons Logging</a> is an example of this: it allows a library to use different logging frameworks depending on what application it has been embedded in.</p>
<p>So my approach to the &#8220;wrap or not to wrap&#8221; question goes like this. First of all, will I add functionality with my wrappers or will removing functionality but thereby simplify the interface? If so, then wrapping makes sense. Secondly, if I haven&#8217;t yet chosen which library to use or if I want to switch back and forth between libraries, then a wrapper will be required. If neither of these applies, then I begin with a strong presumption that I should use the library on its own, and only a real need to add logging, monitoring, or other wrapped behavior will persuade me otherwise.</p>
]]></content:encoded>
			<wfw:commentRss>http://mcherm.com/permalinks/1/when-to-wrap-a-library/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>


