<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' version='2.0'><channel><atom:id>tag:blogger.com,1999:blog-5867400</atom:id><lastBuildDate>Thu, 28 Jan 2010 00:29:20 +0000</lastBuildDate><title>Journeys End</title><description>We walk many paths, many roads&lt;br&gt;
Till death halts our steps.&lt;br&gt;
Every day a new adventure,&lt;br&gt;
A new journey of self discovery.&lt;br&gt;
&lt;br&gt;</description><link>http://www.shuningbian.net/index.php</link><managingEditor>noreply@blogger.com (steve)</managingEditor><generator>Blogger</generator><openSearch:totalResults>435</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5867400.post-3561852340594242385</guid><pubDate>Thu, 28 Jan 2010 00:15:00 +0000</pubDate><atom:updated>2010-01-28T11:19:55.643+11:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>internet</category><title>Shorty Awards Audit Part 2: Exception or The Rule?</title><description>&lt;span style="font-family: 'Lucida Grande'; font-size: 12px;"&gt;After discovering &lt;a href="http://www.shuningbian.net/2010/01/shorty-awards-audit.php"&gt;previously&lt;/a&gt;&amp;nbsp;that &lt;b&gt;@mercola had 64% valid votes (IMHO) where as @DrRachie had 88% valid votes&lt;/b&gt;, I wonder if this is an phenomenon is the same in other categories. In other words:&lt;b&gt; is @mercola's valid vote percentage the exception or the rule?&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style="font-family: 'Lucida Grande'; font-size: small;"&gt;&lt;span style="font-size: 12px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'Lucida Grande'; font-size: small;"&gt;&lt;span style="font-size: 12px;"&gt;To answer this question, I ran the audit script for 1st and 2nd placers in the #music category. Here is the breakdown for the current leader, @yelyahwilliams:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'Lucida Grande'; font-size: small;"&gt;&lt;span style="font-size: 12px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://chart.apis.google.com/chart?chs=350x100&amp;amp;chd=t:13.983183,0.654002,0.996574,84.272812&amp;amp;cht=p3&amp;amp;chl=deleted|1%20tweet|2%20tweet|3plus%20tweet" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="91" src="http://chart.apis.google.com/chart?chs=350x100&amp;amp;chd=t:13.983183,0.654002,0.996574,84.272812&amp;amp;cht=p3&amp;amp;chl=deleted|1%20tweet|2%20tweet|3plus%20tweet " width="320" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family: 'Lucida Grande'; font-size: small;"&gt;&lt;span style="font-size: 12px;"&gt;deleted accounts: 449 (13.98%)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: 'Lucida Grande'; font-size: small;"&gt;&lt;span style="font-size: 12px;"&gt;accounts with 1 tweet: 21 (0.65%)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: 'Lucida Grande'; font-size: small;"&gt;&lt;span style="font-size: 12px;"&gt;accounts with 2 tweets: 32 (1.00%)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: 'Lucida Grande'; font-size: small;"&gt;&lt;span style="font-size: 12px;"&gt;other accounts: 2706 (84.27%)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: 'Lucida Grande'; font-size: small;"&gt;&lt;span style="font-size: 12px;"&gt;total: 3211&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style="font-family: 'Lucida Grande'; font-size: small;"&gt;&lt;span style="font-size: 12px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'Lucida Grande'; font-size: small;"&gt;&lt;span style="font-size: 12px;"&gt;There is a discrepancy of 3, from users BenFreemann, ovan10, and YannickBraun.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'Lucida Grande'; font-size: small;"&gt;&lt;span style="font-size: 12px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'Lucida Grande'; font-size: small;"&gt;&lt;span style="font-size: 12px;"&gt;Now for @ivetesangalo:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;a href="http://chart.apis.google.com/chart?chs=350x100&amp;amp;chd=t:9.073684,0.631579,1.936842,88.210526&amp;amp;cht=p3&amp;amp;chl=deleted|1%20tweet|2%20tweet|3plus%20tweet" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="91" src="http://chart.apis.google.com/chart?chs=350x100&amp;amp;chd=t:9.073684,0.631579,1.936842,88.210526&amp;amp;cht=p3&amp;amp;chl=deleted|1%20tweet|2%20tweet|3plus%20tweet " width="320" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family: 'Lucida Grande'; font-size: small;"&gt;&lt;span style="font-size: 12px;"&gt;deleted accounts: 431 (9.07%)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: 'Lucida Grande'; font-size: small;"&gt;&lt;span style="font-size: 12px;"&gt;accounts with 1 tweet: 30 (0.63%)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: 'Lucida Grande'; font-size: small;"&gt;&lt;span style="font-size: 12px;"&gt;accounts with 2 tweet: 92 (1.94%)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: 'Lucida Grande'; font-size: small;"&gt;&lt;span style="font-size: 12px;"&gt;other accounts: 4190 (88.21%)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: 'Lucida Grande'; font-size: small;"&gt;&lt;span style="font-size: 12px;"&gt;total: 4750&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style="font-family: 'Lucida Grande'; font-size: small;"&gt;&lt;span style="font-size: 12px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'Lucida Grande'; font-size: small;"&gt;&lt;span style="font-size: 12px;"&gt;There is a discrepancy of 7 from&amp;nbsp;andreiaAMO, Brubruna, buguinhaBrito, Erica_nasciment, julianestephany, KEKELZITA, and pedro_PERWAH.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'Lucida Grande'; font-size: small;"&gt;&lt;span style="font-size: 12px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'Lucida Grande'; font-size: small;"&gt;&lt;span style="font-size: 12px;"&gt;It would seem that&amp;nbsp;&lt;b&gt;@mercola's 64% is an exception not the rule&lt;/b&gt;. Granted, I only sampled 4 leaders. I suspect however that when I run the statistics for the leaders in #celebrity, I would see the same results: that &lt;b&gt;the rule is for percentage of valid votes are 80% or higher.&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'Lucida Grande'; font-size: small;"&gt;&lt;span style="font-size: 12px;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'Lucida Grande'; font-size: small;"&gt;&lt;span style="font-size: 12px;"&gt;I will update when the #celebrity&amp;nbsp;audit is done. Note that I am auditing those categories where the leaders have vote counts in the thousands. This should reduce anomalies.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'Lucida Grande'; font-size: small;"&gt;&lt;span style="font-size: 12px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'Lucida Grande'; font-size: small;"&gt;&lt;span style="font-size: 12px;"&gt;Cheers,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'Lucida Grande'; font-size: small;"&gt;&lt;span style="font-size: 12px;"&gt;Steve&lt;/span&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/5867400-3561852340594242385?l=www.shuningbian.net%2Findex.php' alt='' /&gt;&lt;/div&gt;</description><link>http://www.shuningbian.net/2010/01/shorty-awards-audit-part-2-exception-or.php</link><author>noreply@blogger.com (steve)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5867400.post-7262644204419016677</guid><pubDate>Wed, 27 Jan 2010 12:20:00 +0000</pubDate><atom:updated>2010-01-28T11:29:20.531+11:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>internet</category><title>Shorty Awards Audit</title><description>&lt;span class="Apple-style-span" style="font-size: small;"&gt;After reading the sordid tale of ballot stuffing via twitter over at &lt;/span&gt;&lt;a href="http://blogs.discovermagazine.com/badastronomy/2010/01/23/alt-med-guy-whacked-with-shorty-end-of-the-stick/"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Bad Astronomy&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;, I wonder if @&lt;/span&gt;&lt;a href="http://twitter.com/mercola"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;mercola&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;has the same "problem". Further, I wanted to know if it was also affecting @&lt;/span&gt;&lt;a href="http://twitter.com/DrRachie"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;DrRachie&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;To that end I wrote a python script to "audit" shorty award votes. Given a username, the script will scrape &lt;/span&gt;&lt;a href="http://shortyawards.com/"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;shortyawards.com&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; for voters, and hit their &lt;/span&gt;&lt;a href="http://twitter.com/"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;twitter.com&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; profile to generate a file containing 2 columns: username and number of updates.&amp;nbsp;Users with deleted accounts will have -1 updates.&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;I have ran the script for @mercola, and at the time of data collection (UTC 1100) this is the breakdown of where the votes came from:&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;

&lt;a href="http://chart.apis.google.com/chart?chs=350x100&amp;amp;chd=t:12.062392,14.107452,9.982669,63.708839&amp;amp;cht=p3&amp;amp;chl=deleted|1%20tweet|2%20tweet|3plus%20tweet" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;img border="0" height="91" src="http://chart.apis.google.com/chart?chs=350x100&amp;amp;chd=t:12.062392,14.107452,9.982669,63.708839&amp;amp;cht=p3&amp;amp;chl=deleted|1%20tweet|2%20tweet|3plus%20tweet" width="320" /&gt;&lt;/span&gt;&lt;/a&gt;
&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;deleted accounts: 348 (12.07%)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;accounts with 1 tweet: 407 (14.11%)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;accounts with 2 tweets: 288 (9.98%)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;other accounts: 1838 (63.71%)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;total:&amp;nbsp;2885&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;The discrepancy of 4 comes from users who somehow managed to have no tweets: I suspect the account was deleted, then recreated. These 4 users were:&amp;nbsp;bugoff48,&amp;nbsp;budsgirl54,&amp;nbsp;tracyaustin,&amp;nbsp;janesperr.&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;You might wonder why I took an exception to users with 2 tweets. The following screen shots should suffice as an explanation:&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://www.shuningbian.net/uploaded_images/Picture-3-789799.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;img border="0" height="154" src="http://www.shuningbian.net/uploaded_images/Picture-3-789796.png" width="200" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;a href="http://www.shuningbian.net/uploaded_images/Picture-2-785974.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;img border="0" height="164" src="http://www.shuningbian.net/uploaded_images/Picture-2-785966.png" width="200" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;I checked at random 10 users with only 2 tweets, and they were all people who created a twitter account for the express purpose of voting in the shorty awards, which is against the rules.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;Personally, &lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;I would say that only 64% of votes for @mercola are valid&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;. This puts him in the lead still, but only ~300 votes in front.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;Feel free to do your own analysis of &lt;/span&gt;&lt;a href="http://pastebin.com/f4565b739"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;the data&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;span style="text-decoration: line-through;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;I am still running the script for DrRachie, so I will update when that script is done. In case you are wondering why it takes so long, that's because I am been nice and rate limiting my queries :)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Update 1&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;: realised some users were showing up twice. Removed them, recalculated, re-linked data.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Update 2&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;: @DrRachie's data is available! See the following.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class="" style="clear: both; text-align: left;"&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;OK, here is a break down of where @DrRachie's votes came from:&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div class="" style="clear: both; text-align: left;"&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;ul&gt;&lt;a href="http://chart.apis.google.com/chart?chs=350x100&amp;amp;chd=t:6.479358,2.350917,2.694954,88.417431&amp;amp;cht=p3&amp;amp;chl=deleted|1%20tweet|2%20tweet|3plus%20tweet" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;img border="0" height="91" src="http://chart.apis.google.com/chart?chs=350x100&amp;amp;chd=t:6.479358,2.350917,2.694954,88.417431&amp;amp;cht=p3&amp;amp;chl=deleted|1%20tweet|2%20tweet|3plus%20tweet" width="320" /&gt;&lt;/span&gt;&lt;/a&gt;
&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;deleted accounts: 113 (6.50%)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;accounts with 1 tweet: 41 (2.35%)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;accounts with 2 tweets: 47 (2.70%)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;other accounts: 1542 (88.42%)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;total: 1744&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;Again there is a discrepancy, this time of a single user,&amp;nbsp;Superpositional.&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;Just as I did for @mercola, I checked random accounts with 2 tweets. They all broke the rule. These accounts contained only&amp;nbsp;tweets voting in the&amp;nbsp;shorty awards.&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;My personal opinion is that 88% of votes for @DrRachie are valid&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;, a percentage much higher than @mercola's.&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;Again, the &lt;/span&gt;&lt;a href="http://pastebin.com/m4d01a61a"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;data is available&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; for your own analysis.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;What should be done about this, I hear you ask. Personally I am happy if @mercola and @DrRachie both have their vote count adjusted accordingly.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Update 3&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;: I am running the same analysis for 1st and 2nd place for #music, to see if the same pattern holds. Those results will be in a new post.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Update 4&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;: I should point out that I am aware both @mercola and @DrRachie received votes in multiple categories. But seeing as how majority of votes are in #health, I feel it would be Too Much Effort to separate the vote out. Though if enough people complain, I will fix it.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Update 5&lt;/span&gt;&lt;/b&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;:&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.shuningbian.net/2010/01/shorty-awards-audit-part-2-exception-or.php"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Part 2&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt; has been posted. It explores the question whether 64% valid votes is the exception or the rule.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;Cheers,&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;Steve&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5867400-7262644204419016677?l=www.shuningbian.net%2Findex.php' alt='' /&gt;&lt;/div&gt;</description><link>http://www.shuningbian.net/2010/01/shorty-awards-audit.php</link><author>noreply@blogger.com (steve)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5867400.post-3892054459353831864</guid><pubDate>Sun, 10 Jan 2010 04:20:00 +0000</pubDate><atom:updated>2010-01-10T15:20:34.883+11:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>internet</category><title>An Idea for Personal Domains</title><description>&lt;p&gt;Given that we can have purely numeric domains, i.e. 131500.info, why not have domains that map to our mobile phone numbers for personal use?&lt;/p&gt;

&lt;p&gt;What's the point? For one, you can give out your public mobile number instead of your website, since it is much easier to communicate numbers than domain names. This can be used to communicate other information that is difficult to convey by voice, e.g. emails, skype names, etc. A simple website at $your_mobile.mob would overcome all these.&lt;/p&gt;

&lt;p&gt;This obviously has privacy implications, and as such should be entirely opt-in.&lt;/p&gt;

&lt;p&gt;Any such system would need to be regulated, ideally controlled by carriers. A custom TLD like .mob would probably be a good idea too. One must also keep in mind however that such easily predictable domain names will be targeted by spammers.&lt;/p&gt;
 
Cheers,&lt;br/&gt;
Steve&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5867400-3892054459353831864?l=www.shuningbian.net%2Findex.php' alt='' /&gt;&lt;/div&gt;</description><link>http://www.shuningbian.net/2010/01/idea-for-personal-domains.php</link><author>noreply@blogger.com (steve)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5867400.post-1595644931157597206</guid><pubDate>Tue, 05 Jan 2010 10:13:00 +0000</pubDate><atom:updated>2010-01-05T21:53:26.806+11:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>software</category><title>Introducing GeoNote AR (2.0)</title><description>&lt;a href="http://www.shuningbian.net/uploaded_images/Icon-780810.png" imageanchor="1" style="clear: right; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://www.shuningbian.net/uploaded_images/Icon-780809.png" /&gt;&lt;/a&gt;

&lt;p&gt;Some of you might know I have been working on a little iPhone app called GeoNote (&lt;a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=317860964&amp;mt=8"&gt;iTunes link&lt;/a&gt;). Its basic goal is to allow you to annotate the real world by allowing you to leave little messages (notes) which are "pinned" to real world locations. These little messages are visible to anyone running GeoNote.&lt;/p&gt;

&lt;p&gt;Initially GeoNote had a rather unflattering interface: just a List View of notes. However as the iPhone SDK and the iPhone itself evolved, GeoNote also evolved. First it gained Map view, which was much more intuitive and useful, then with the iPhone 3GS and a bit of time on my hands, GeoNote gained Augmented Reality view:&lt;/p&gt;

&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://www.shuningbian.net/uploaded_images/2010-16-55-50-723751.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://www.shuningbian.net/uploaded_images/2010-16-55-50-723749.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;

&lt;p&gt;Cool isn't it :D It is available in GeoNote 2.0, but only for people with iPhone 3GS. GeoNote will run on iPod touch and iPhone 3G, but AR will not be available.&lt;/p&gt;

&lt;P&gt;The Augmented Reality View is activated by holding the phone up like you would to take a landscape picture, with the home button on the right. The colour scheme is customisable, since I haven't found a nice set of colours. It looks rather retro'ish with the default green colour scheme:&lt;/p&gt;

&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://www.shuningbian.net/uploaded_images/2009-20-10-45-749801.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://www.shuningbian.net/uploaded_images/2009-20-10-45-749799.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;

&lt;p&gt;There are a lot of things that cane be done better, like a nice way to select notes, and more customisation for things like limiting distance, etc. But as they say, release early, release often :-)&lt;/p&gt;

&lt;p&gt;For more on the app, visit: &lt;a href="http://gtd.pictorii.com"&gt;http://gtd.pictorii.com&lt;/a&gt;. It is rather nasty right now, I will work on that :)&lt;/p&gt;

&lt;p&gt;
Cheers,&lt;br/&gt;
Steve&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5867400-1595644931157597206?l=www.shuningbian.net%2Findex.php' alt='' /&gt;&lt;/div&gt;</description><link>http://www.shuningbian.net/2010/01/introducing-geonote-ar-20.php</link><author>noreply@blogger.com (steve)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5867400.post-1566154014645144360</guid><pubDate>Thu, 31 Dec 2009 09:02:00 +0000</pubDate><atom:updated>2009-12-31T20:02:39.289+11:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>electronics</category><category domain='http://www.blogger.com/atom/ns#'>arduino</category><category domain='http://www.blogger.com/atom/ns#'>IRL</category><category domain='http://www.blogger.com/atom/ns#'>seeeduino</category><title>Reality Blows: Strange LCD Problem and Strange Solution.</title><description>&lt;p&gt;I spent the better part of two hours struggling with your average HD44780 driven 16x2 character LCD, even though I was using the LiquidCrystal library that comes with the arduino environment. My problem was the text I was printing out looks like this:&lt;/p&gt;

&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://www.shuningbian.net/uploaded_images/2009-19-48-03-742189.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://www.shuningbian.net/uploaded_images/2009-19-48-03-741838.jpg" width="320" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;

&lt;p&gt;I tried a lot of things, like adding in delays here and there, even going so far as to use a subclass of LiquidCrystal which inserts a 2ms delay after each write to no avail. Then by a process of elimination, I found that if I reverse the order in which the lines were printed, i.e. print line 1 then line 0, the problem goes away:&lt;/p&gt;

&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://www.shuningbian.net/uploaded_images/2009-19-48-23-766553.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://www.shuningbian.net/uploaded_images/2009-19-48-23-766553.jpg" width="320" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;

&lt;p&gt;Whiskey Tango Foxtrot.&lt;/p&gt;

&lt;p&gt;
Cheers,&lt;br/&gt;
Steve&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5867400-1566154014645144360?l=www.shuningbian.net%2Findex.php' alt='' /&gt;&lt;/div&gt;</description><link>http://www.shuningbian.net/2009/12/reality-blows-strange-lcd-problem-and.php</link><author>noreply@blogger.com (steve)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5867400.post-3878591336067062646</guid><pubDate>Thu, 31 Dec 2009 04:51:00 +0000</pubDate><atom:updated>2009-12-31T20:03:26.571+11:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>software</category><category domain='http://www.blogger.com/atom/ns#'>code</category><category domain='http://www.blogger.com/atom/ns#'>osx</category><title>Order Matters With XCode's Build Phrases</title><description>&lt;p&gt;I use a custom script to insert the current git commit into &lt;a href="http://gtd.pictorii.com"&gt;GeoNote&lt;/a&gt;, so when I get bug reports I have a better idea of which version the user is running. The script is as below:
&lt;p&gt;

&lt;pre class="brush:c"&gt;
import os
from Foundation import NSMutableDictionary

version = os.popen4("/sw/bin/git rev-parse --short HEAD")[1].read()
info = os.environ['INFOPLIST_FILE']
print info
plist = NSMutableDictionary.dictionaryWithContentsOfFile_(info)
print plist
plist['revision'] = version[:-1]
plist.writeToFile_atomically_(info, 1)
&lt;/pre&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://www.shuningbian.net/uploaded_images/Picture-3-768694.jpg" imageanchor="1" style="margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="88" src="http://www.shuningbian.net/uploaded_images/Picture-3-768672.jpg" width="320" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;
&lt;p&gt;This was added as a Run Script Build Phrase. The problem I noticed was that the commit short hash inserted into Info.plist was always one commit behind. After some head scratching, I realised this was because by default the new build phrase is inserted &lt;em&gt;last&lt;/em&gt;, &lt;em&gt;and&lt;/em&gt; the order matters! It isn't actually possible to reorder build phrases by drag and dropping the children nodes around. You have to do a head-insert by dragging a child to the parent, which inserts it at the top.&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://www.shuningbian.net/uploaded_images/Picture-1-733397.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://www.shuningbian.net/uploaded_images/Picture-1-733375.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;

&lt;p&gt;Voila, problem solved.&lt;/p&gt;
Cheers,&lt;br /&gt;
Steve&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5867400-3878591336067062646?l=www.shuningbian.net%2Findex.php' alt='' /&gt;&lt;/div&gt;</description><link>http://www.shuningbian.net/2009/12/order-matters-with-xcodes-build-phrases.php</link><author>noreply@blogger.com (steve)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5867400.post-424243259697827388</guid><pubDate>Tue, 22 Dec 2009 01:33:00 +0000</pubDate><atom:updated>2009-12-22T13:01:31.070+11:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>rant</category><category domain='http://www.blogger.com/atom/ns#'>IP</category><category domain='http://www.blogger.com/atom/ns#'>IRL</category><title>Don't Worry About the Pirates.</title><description>&lt;p&gt;
So you are an indie musician, and you are worried about pirates – those naughty people who are allegedly stealing food off your table and from the mouth of your children.
&lt;/p&gt;
  
&lt;p&gt;
Well I am here to tell you there is no need to worry – pirates may just be the best thing to ever happen to you.
&lt;/p&gt;
  
&lt;p&gt;
First, let me tell you something that you probably don't want to hear – &lt;strong&gt;you are nobody&lt;/strong&gt;. You are nobody in the sense that 99.9999% of the people on this planet has never heard of you. The only way to change this is to get your music into the ears of as many people as possible
&lt;/p&gt;
  
&lt;p&gt;
Big artists do this – they have TV spots, radio spots, newspaper reviews. These are all ways to &lt;strong&gt;reach listeners without them paying anything&lt;/strong&gt;. 
&lt;/p&gt;  

&lt;p&gt;
This is also what you need to do, and pirates do this very well. If a single pirate distributed your music to two other pirates, and they in turn distribute to two more pirates and so forth, in a very short time you would have reached all of western civilisation. 
&lt;/p&gt;

&lt;p&gt;  
Now I can see you getting puffed up, about to yell at me how this doesn't make you a dime. Just give me a second, will you? 
&lt;/p&gt;
  
&lt;p&gt;
The second thing I am going to tell you is that to a first approximation, &lt;strong&gt;you make money only from your fans&lt;/strong&gt;. Remember that the word "fan" comes from &lt;strong&gt;fan&lt;/strong&gt;atic – they are people who bought the Fellowship of the Ring when it first came out on DVD, then bought the Director's Cut, then bought the Special Limited Collector's Tin Box Edition  , and then the Super Mega Ultra Edition that came with a Gandalf bust, then they did it again for the Two Towers, Return of the King, then for the whole damn series. These are people who have 12 versions of each Lord of The Rings trilogy, and will purchase the anniversary edition when it comes out in 2012 anyway. 
&lt;/p&gt;  

&lt;p&gt;
The point is: &lt;strong&gt;your fans love you&lt;/strong&gt;, they will buy your music, your merchandise, and go to your concerts even if they can get it for free – that is just how fans are. 
&lt;/p&gt;

&lt;p&gt;  
Now the only way to get fans is to have people listen to your music, and as long as you have a non-zero conversion rate of joe-listener-to-fan, you come out on top. &lt;strong&gt;The more people you reach, the more fans you get, and the more money you make.&lt;/strong&gt; 
&lt;/p&gt;  

&lt;p&gt;
Just in case you don't get it yet, here it is in point form: 
&lt;/p&gt;  

&lt;ul&gt;

&lt;li&gt;no one has heard of you&lt;/li&gt;
&lt;li&gt;if no one has heard of you, you have no fans&lt;/li&gt;
&lt;li&gt;you make money from fans&lt;/li&gt;
&lt;li&gt;people become fans from listening to your music&lt;/li&gt;
&lt;li&gt;pirates distribute your music to millions, even billions of people&lt;/li&gt; 
&lt;li&gt;this increases your fanbase&lt;/li&gt;
&lt;li&gt;a larger fanbase means more money&lt;/li&gt; 
&lt;li&gt;a large enough fanbase means you have Made It Big&lt;/li&gt; 
&lt;/ul&gt;
  
&lt;p&gt;
Got it? 
&lt;/p&gt;

&lt;p&gt;
Cheers,&lt;br/&gt;
Steve
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5867400-424243259697827388?l=www.shuningbian.net%2Findex.php' alt='' /&gt;&lt;/div&gt;</description><link>http://www.shuningbian.net/2009/12/dont-worry-about-pirates.php</link><author>noreply@blogger.com (steve)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5867400.post-6691046107022406560</guid><pubDate>Mon, 21 Dec 2009 13:37:00 +0000</pubDate><atom:updated>2009-12-22T00:44:43.000+11:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>electronics</category><category domain='http://www.blogger.com/atom/ns#'>arduino</category><title>Latching Power Supply With Electronic Turn Off</title><description>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.shuningbian.net/uploaded_images/manual_latch_electronic_off_psu-731597.gif"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 320px; height: 226px;" src="http://www.shuningbian.net/uploaded_images/manual_latch_electronic_off_psu-731595.gif" border="0" alt="" /&gt;&lt;/a&gt;

&lt;p&gt;This circuit has (as far as I can tell), 0 off current, and 17mA on current. It is latched by the momentary push button, and can be turned off by applying &gt;0.7V at the input as shown. It is intended for use with embedded interactive installation (e.g. an arduino) where the user pushes the button to turn the device on, and the device will turn itself off after some time to conserve battery.&lt;/p&gt;

&lt;p&gt;It is a modified version of &lt;a href="http://www.edn.com/article/CA472837.html"&gt;this circuit&lt;/a&gt;.

&lt;p&gt;
Cheers,&lt;br/&gt;
Steve&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5867400-6691046107022406560?l=www.shuningbian.net%2Findex.php' alt='' /&gt;&lt;/div&gt;</description><link>http://www.shuningbian.net/2009/12/latching-power-supply-with-electronic.php</link><author>noreply@blogger.com (steve)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5867400.post-8848068596510528457</guid><pubDate>Thu, 17 Dec 2009 09:00:00 +0000</pubDate><atom:updated>2009-12-17T20:21:06.293+11:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>australia</category><category domain='http://www.blogger.com/atom/ns#'>censorship</category><category domain='http://www.blogger.com/atom/ns#'>IRL</category><category domain='http://www.blogger.com/atom/ns#'>internet</category><category domain='http://www.blogger.com/atom/ns#'>computer</category><category domain='http://www.blogger.com/atom/ns#'>politics</category><title>Nice Work Australia Computer Society</title><description>&lt;p&gt;
You came to me during my first year in university, and sold yourself as the paragon of virtue and integrity - the kind organisation I would be foolish not to be associated with if I want to get anywhere in Australia doing software, or "Information Technology" as they call it now days.
&lt;/p&gt;

&lt;p&gt;
I didn't join then, because I didn't have the money. I didn't join later because my career focus shifted away from software. I won't join now ever, because you have sold out.
&lt;/p&gt;

&lt;p&gt;
I am referring to the &lt;a href="http://www.acs.org.au/index.cfm?action=load&amp;temID=noticedetails&amp;notID=1009"&gt;honorary membership you awarded&lt;/a&gt; to none other than one Stephen Conroy, &lt;a href="http://www.acs.org.au/index.cfm?action=load&amp;temID=noticedetails&amp;notID=1009"&gt;Internet Villain of the Year, 2009&lt;/a&gt;.
&lt;/p&gt;

&lt;p&gt;
You had such nice things to say about him too:
&lt;/p&gt;

&lt;blockquote&gt;
“We are very pleased to honour Senator Conroy’s contribution and support of the significance of ICT to the economy and the key role of ICT professionals in Australia’s future,” said Mr Wells.
&lt;/blockquote&gt;

&lt;p&gt;
If I am so inclined as to read between the lines, I can't help but get the feeling you are thanking Mr. Conroy for pushing the Internet filter scheme, and in the process provided jobs for the programmers and technicians involved in the various trials and consultations.
&lt;/p&gt;

&lt;blockquote&gt;
“Senator Conroy has always encouraged the ACS in its role as the independent voice of the ICT profession, welcoming our input to various enquiries and working groups, and regularly attending key ACS events. We are grateful for his on-going support,” Mr Wells said.
&lt;/blockquote&gt;

&lt;p&gt;
I don't think Mr. Conroy is listening to your input, or learning from your events - he continues to believe filtering the Internet is doable, and not a waste of time and resources.
&lt;/p&gt;

&lt;p&gt;
I reject you, Australia Computer Society, as "voice of the ICT profession". Your actions are deplorable and shows a lack of integrity. If I was a member, I would be ashamed.
&lt;/p&gt;

&lt;p&gt;
Cheers,&lt;br/&gt;
Steve&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5867400-8848068596510528457?l=www.shuningbian.net%2Findex.php' alt='' /&gt;&lt;/div&gt;</description><link>http://www.shuningbian.net/2009/12/nice-work-australia-computer-society.php</link><author>noreply@blogger.com (steve)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5867400.post-1674837946483077666</guid><pubDate>Tue, 15 Dec 2009 14:58:00 +0000</pubDate><atom:updated>2009-12-16T02:01:27.597+11:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>arduino</category><category domain='http://www.blogger.com/atom/ns#'>code</category><title>Yet Another Arduino Float Print Function</title><description>&lt;pre class="brush:c"&gt;
void floatPrint(float f, int places=6)
{
        int _d;
        if (f &lt; 0)
        {
                Serial.print("-");
                f*=-1;
        }

        _d = (int)f;
        
        if (!places)
        {
                return;
        }

        Serial.print(_d, DEC);
        Serial.print('.');

        while(places--)
        {
                f-=_d;
                f*=10;
                _d = (int)f;
                Serial.print(_d, DEC);
        }
}

void floatPrintln(double f, int places=6)
{
        floatPrint(f, places);
        Serial.println();
}
&lt;/pre&gt;
&lt;p&gt;Why another float print function? The ones I found wasn't too nice, one of which required long integers. Yuck. It was also fun, and now I know where to look for one in the future :P&lt;/p&gt;

&lt;/p&gt;
&lt;p&gt;
Cheers,&lt;br/&gt;
Steve&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5867400-1674837946483077666?l=www.shuningbian.net%2Findex.php' alt='' /&gt;&lt;/div&gt;</description><link>http://www.shuningbian.net/2009/12/yet-another-arduino-float-print.php</link><author>noreply@blogger.com (steve)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5867400.post-6689185165759323174</guid><pubDate>Mon, 07 Dec 2009 08:24:00 +0000</pubDate><atom:updated>2009-12-07T19:36:05.956+11:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>code</category><category domain='http://www.blogger.com/atom/ns#'>c</category><title>A subtle source of linker errors under XCode</title><description>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.shuningbian.net/uploaded_images/Picture-6-776493.jpg"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 225px; height: 59px;" src="http://www.shuningbian.net/uploaded_images/Picture-6-776482.jpg" border="0" alt="" /&gt;&lt;/a&gt;

&lt;p&gt;If one source file is sourcecode.c.objc and another is sourcecode.cpp.objcpp, you will have problems if you try to call function defined in one file from the other. The resolve this either make them the same source type, or &lt;a href="http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html"&gt;follow this guide&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This drove me nutty because the template I was working off has code set to sourcecode.cpp.objcpp, but XCode adds new classes as sourcecode.c.objc! To check the file type, use "Get Info" in the source file's context menu.&lt;/p&gt;
&lt;p&gt;
Cheers,&lt;br/&gt;
Steve&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5867400-6689185165759323174?l=www.shuningbian.net%2Findex.php' alt='' /&gt;&lt;/div&gt;</description><link>http://www.shuningbian.net/2009/12/subtle-source-of-linker-errors-under.php</link><author>noreply@blogger.com (steve)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5867400.post-768181384734797813</guid><pubDate>Sun, 11 Oct 2009 10:22:00 +0000</pubDate><atom:updated>2009-10-11T22:20:04.433+11:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>software</category><category domain='http://www.blogger.com/atom/ns#'>python</category><category domain='http://www.blogger.com/atom/ns#'>code</category><title>qrbackup</title><description>&lt;p&gt;I generated a gpg keypair for myself today, and I was looking for a fairly safe way to back it up. I don't particularly trust DVD/CDs, and keeping it on flash is even more worrying. I wanted a means of backup I can &lt;em&gt;see and touch&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.ollydbg.de/Paperbak/"&gt;Paperbak&lt;/a&gt; would be great if it was ported to something not windows. Since it wasn't, I settled on &lt;a href="http://en.wikipedia.org/wiki/QR_Code"&gt;QR Code&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Thus &lt;a href="http://git.pictorii.com/?p=qrbackup.git;a=summary"&gt;qrbackup&lt;/a&gt; was born. It will base32 encode a file, then encode it into QR codes using &lt;a href="http://code.google.com/apis/chart/"&gt;google chart service&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I have tested it from backup to restoration, and it works. YMMV, more instructions available after &lt;a href="http://git.pictorii.com/?p=qrbackup.git;a=summary"&gt; the jump&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;
Cheers,&lt;br/&gt;
Steve&lt;/p&gt;

&lt;p&gt;P.S. Pardon my python.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5867400-768181384734797813?l=www.shuningbian.net%2Findex.php' alt='' /&gt;&lt;/div&gt;</description><link>http://www.shuningbian.net/2009/10/qrbackup.php</link><author>noreply@blogger.com (steve)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5867400.post-1476159407964215194</guid><pubDate>Wed, 05 Aug 2009 11:58:00 +0000</pubDate><atom:updated>2009-08-05T22:04:36.097+10:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>linux</category><category domain='http://www.blogger.com/atom/ns#'>software</category><category domain='http://www.blogger.com/atom/ns#'>code</category><title>git-daemon on debian vserver</title><description>&lt;p&gt;Annoyingly &lt;code&gt;git-daemon-run&lt;/code&gt; requires &lt;code&gt;runit&lt;/code&gt; on debian, but &lt;code&gt;runit&lt;/code&gt; will fail to install properly in a debian vserver because it doesn't have &lt;code&gt;init&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;One solution is to &lt;a href="http://wiki.linux-vserver.org/util-vserver:InitStyles"&gt;reconfigure vserver to use &lt;code&gt;plain&lt;/code&gt; init style&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;However I didn't want to this because I don't want to take down my vserver just yet. So here is the required line for &lt;code&gt;/etc/inetd.conf&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;
git     stream  tcp     nowait  nobody /usr/bin/git git daemon --inetd /var/git-repos
&lt;/pre&gt;

&lt;p&gt;
Cheers,&lt;br/&gt;
Steve&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5867400-1476159407964215194?l=www.shuningbian.net%2Findex.php' alt='' /&gt;&lt;/div&gt;</description><link>http://www.shuningbian.net/2009/08/git-daemon-on-debian-vserver.php</link><author>noreply@blogger.com (steve)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5867400.post-4755422629681539517</guid><pubDate>Sun, 02 Aug 2009 15:20:00 +0000</pubDate><atom:updated>2009-09-30T20:52:37.856+10:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>rant</category><title>Homeopathic logic</title><description>&lt;p&gt;On Dr Karl on Triple J Podcast recently, and a lady called in (lets call her B) to say homeopathy works for her. She said her children were never vaccinated, and only receives homeopathy treatments, just like all her friend’s children, and that they are all healthy. B thus concluded that homeopathy works, and to show she isn’t the only one who thinks so, she presents the Royal family, who practices homeopathy, as a supporting fact.&lt;/p&gt;

&lt;p&gt;It would appear at first she is right: homeopathy works and the facts are compelling - but a little critical thinking goes a long way.&lt;/p&gt;

&lt;p&gt;Firstly, the only logical conclusion one can draw from the facts presented isn’t &lt;em&gt;homeopathy works&lt;/em&gt;, but &lt;em&gt;homeopathy isn’t fatal&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;To arrive at B’s conclusion one would need to:&lt;p&gt;
&lt;ul&gt;
 &lt;li&gt;give one of her children placebo&lt;/li&gt;
 &lt;li&gt;give one of her children prescribed medicine&lt;/li&gt;
 &lt;li&gt;give one of her children nothing&lt;/li&gt;
 &lt;li&gt;give one of her children homeopathy&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Further, one would need to observe the child given homeopathy doing better than the other children to show homeopathy:&lt;/p&gt;
&lt;ul&gt;
 &lt;li&gt;isn’t a (costly) placebo&lt;/li&gt;
 &lt;li&gt;works better than prescribed medicine&lt;/li&gt;
 &lt;li&gt;isn’t harmful&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These kind of things are done in clinical trials, and no clinical trial to date has shown that homeopath has anything more than a placebo effect.&lt;/p&gt;

&lt;p&gt;So what about the Royal Family? Surely, you think to yourself, this lends homeopathy the weight of authority. However this is a logical fallacy known as&lt;a href="http://en.wikipedia.org/wiki/Argument_from_authority"&gt; “argument from authority” or “appeal to authority”&lt;/a&gt;. Simply put, just because some one in authority says it is true, doesn’t mean it is. After all, we were told there were weapons of mass destruction in Iraq...&lt;/p&gt;

&lt;p&gt;It would appear most adults do not engage critical thinking:  to look at what facts are presented, evaluate how reliable they are, and judge claims based on those facts. Even a cursory examination of the principles of homeopathy shows it runs contrary to, and has no basis in, reality. Yet this makes no difference to some people, who latch on to any fanciful tale as the truth as long as it makes them feel better, or it aligns with their world view.&lt;/p&gt;

&lt;p&gt;In a world populated by scientologists, perhaps it is unsurprising we find fervent supporters of homeopathy. I can only hope that natural selection does its job.&lt;/p&gt;
&lt;p&gt;
Cheers,&lt;br/&gt;
Steve&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5867400-4755422629681539517?l=www.shuningbian.net%2Findex.php' alt='' /&gt;&lt;/div&gt;</description><link>http://www.shuningbian.net/2009/08/homeopathic-logic.php</link><author>noreply@blogger.com (steve)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5867400.post-6044641807798155894</guid><pubDate>Sun, 07 Jun 2009 05:22:00 +0000</pubDate><atom:updated>2009-09-09T15:01:41.856+10:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>linux</category><category domain='http://www.blogger.com/atom/ns#'>software</category><category domain='http://www.blogger.com/atom/ns#'>code</category><title>Dealing with rkhunter warnings</title><description>&lt;p&gt;rkhunter often warns on file property changes after upgrade and such, and sometimes you just aren't sure whether it is due to recent upgrades, or because you really were compromised. The following script was written to compare the checksum of all files rkhunter warns about against the originals in a debian repository.&lt;/p&gt;

&lt;p&gt;The latest version of this is available &lt;a href="http://git.pictorii.com/?p=scripts.git;a=blob_plain;f=verify.sh;hb=rei"&gt;in my script.git respos&lt;/a&gt;.&lt;/p&gt;

&lt;pre class="brush:bash"&gt;
#!/bin/bash
desc="
This script will verify whether files for which rkhunter has logged a 
warning for is still valid. It does this by finding which debian package
it came out of, and downloads them, unpacks them, then checks
the checksums.

Run it by supplying a rkhunter log file as first argument
"

HASHER="sha256sum"

IFS="
"
function find_suspect_files
{
 echo "parsing $1 for suspect files" 1&gt;&amp;2
 grep -1 Warning "$1"| grep File | sed 's|.*File: ||'
}

function find_packages
{
 echo "finding packages" 1&gt;&amp;2
 for suspect_file in $1
 do
  package=$(dpkg -S $suspect_file|awk '{print $1}'|sed 's/.$//')
  echo "suspect file $suspect_file found in $package" 1&gt;&amp;2
  echo $package
 done

}

function make_aptitude_args
{
 echo "generating aptitude arguments" 1&gt;&amp;2
 for package in $1
 do
  version=$(dpkg -p $package | grep Version | awk '{print $2}')
  echo $package=$version
 done
}

function cleanup
{
 echo "cleaning up"
 popd
 rm -rf tmp
 exit $1
}

function setup
{
 echo "setting up"
 rm -rf tmp
 mkdir tmp
 pushd tmp
}

if [ $# -ne 1 ];
then
 echo "$desc"
 exit 1
fi

suspect_files=$(find_suspect_files "$1")

packages=$(find_packages "$suspect_files" | sort | uniq)

if [ -z "$packages" ];
then
 echo "***WARNING****"
 echo "No packages contain any of the suspect files!"
 cleanup 1
fi

aptitude_args=$(make_aptitude_args "$packages")

setup

echo "downloading packages"
aptitude download $aptitude_args 1&gt;/dev/null
if [ $? -ne 0 ];
then
 echo "aptitude download failed!"
 echo "args=$aptitude_args"
 cleanup 1
fi

echo "unpacking"
for deb_file in *.deb
do
 ar -x $deb_file
 tar zxf data.tar.gz 
 rm -rf data.tar.gz control.tar.gz
done

for suspect_file in $suspect_files
do
 if [ ! -f ".$suspect_file" ]
 then
  echo "***WARNING****"
  echo "For some reason .$suspect_file does not exis!"
  continue
 fi
 echo -n "verifying $suspect_file... "
 suspect_sum=$($HASHER $suspect_file | awk '{print $1}')
 clean_sum=$($HASHER ".$suspect_file" | awk '{print $1}')
 if [ $suspect_sum == $clean_sum ];
 then
  echo "OK"
 else
  echo
  echo "***WARNING****"
  echo "Checksum mistmatch for $suspect_file!!!"
  echo "Should be: $clean_sum"
  echo "Is: $suspect_sum"
 fi
done
cleanup
&lt;/pre&gt;
&lt;p&gt;
Cheers,&lt;br/&gt;
Steve&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5867400-6044641807798155894?l=www.shuningbian.net%2Findex.php' alt='' /&gt;&lt;/div&gt;</description><link>http://www.shuningbian.net/2009/06/dealing-with-rkhunter-warnings.php</link><author>noreply@blogger.com (steve)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5867400.post-4082884727803901462</guid><pubDate>Wed, 03 Jun 2009 14:20:00 +0000</pubDate><atom:updated>2009-06-04T00:55:07.707+10:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>rant</category><category domain='http://www.blogger.com/atom/ns#'>electronics</category><category domain='http://www.blogger.com/atom/ns#'>arduino</category><category domain='http://www.blogger.com/atom/ns#'>software</category><category domain='http://www.blogger.com/atom/ns#'>computer</category><title>microbric viper review</title><description>&lt;p&gt;The microbric viper is neat. Good quality parts and unique idea. Makes a decent robotics platform if you get the wheel add-on. However, you gotta have small fingers to get some of the parts in place. Despite this, the hardware is solid, I like it. The one thing I would ask for however is more short-nuts and a printed manual, not a CDROM with a PDF. Take a leaf from LEGO and their construction manuals.&lt;/p&gt;

&lt;p&gt;While the hardware is decent, the microbric viper is sadly let down by the software.&lt;/p&gt;

&lt;p&gt;The microbric viper uses the basicAtom (by basicmicro), a PIC 16F87{6,7} with a custom bootloader. Now there is nothing wrong with this - arduino uses a custom bootloader too. However the custom bootloader uses a proprietary programming protocol. This is pretty fail, but what really fails is the programming software only runs under windows (or wine under ubuntu, but only for now).&lt;/p&gt;

&lt;p&gt;IMHO the basic-esque language used by basicAtom is no better than what picaxe offers. I am completely at a lost as to why companies would use the basicmicro's products and lock themselves to a single supplier. Think about it: if basicmicro goes bust, your products using the basicAtom will not longer have a supported development environment.&lt;/p&gt;

&lt;p&gt;Robotics companies need to seriously consider how their selection of controller will affect their customers - specifically those customers who aren't going to be running windows and staying with in the limits of whatever custom language designed by the controller vendors.&lt;/p&gt;

&lt;p&gt;Arduino would be the best choice IMHO. Open hardware, open software. You don't have to pay premiums for the bootloader, and the number of people who will consider your product increases to include people like me.&lt;/p&gt;

&lt;p&gt;I bought the microbric viper because it was on sale: reduced to $29 from $199. If I had known I could only program it under windows or that it used such a closed platform, I won't have bought it, even for that price.&lt;/p&gt;

&lt;p&gt;
Cheers,&lt;br/&gt;
Steve&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5867400-4082884727803901462?l=www.shuningbian.net%2Findex.php' alt='' /&gt;&lt;/div&gt;</description><link>http://www.shuningbian.net/2009/06/microbric-viper-review.php</link><author>noreply@blogger.com (steve)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5867400.post-5413287960566795008</guid><pubDate>Fri, 29 May 2009 12:27:00 +0000</pubDate><atom:updated>2009-05-29T22:29:33.532+10:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>electronics</category><title>New addition to the work bench</title><description>&lt;div style="float:left; margin-right: 10px; margin-bottom: 10px;"&gt;&lt;a href="http://www.flickr.com/photos/sentientintelligence/3575882456/" title="photo sharing"&gt;&lt;img src="http://farm4.static.flickr.com/3311/3575882456_b5ed4642d4_m.jpg" alt="" style="border: solid 2px #000000;" /&gt;&lt;/a&gt;&lt;/div&gt;Thanks to Anthony from &lt;a href="http://area.net.au/"&gt;Area I.T. &amp; T&lt;/a&gt;, I am now a happy owner of a dual channel 40Mhz oscilloscope.&lt;br /&gt;&lt;br /&gt;I am happier than a pig in mud!&lt;br /&gt;&lt;br /&gt;Cheers,&lt;br /&gt;Steve&lt;br clear="all" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5867400-5413287960566795008?l=www.shuningbian.net%2Findex.php' alt='' /&gt;&lt;/div&gt;</description><link>http://www.shuningbian.net/2009/05/new-addition-to-work-bench.php</link><author>noreply@blogger.com (steve)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>3</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5867400.post-3107102331772473286</guid><pubDate>Sun, 17 May 2009 15:17:00 +0000</pubDate><atom:updated>2009-05-18T01:27:48.999+10:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>electronics</category><category domain='http://www.blogger.com/atom/ns#'>arduino</category><category domain='http://www.blogger.com/atom/ns#'>code</category><title>Sketch to calibrate SEN-08663</title><description>&lt;p&gt;Got my hands on a ADJD-S371 on a breakout board from Sparkfun. The code below can be used to calibrate it. The most up-to-date version of the code can be found at &lt;a href="http://git.pictorii.com/?p=sketches.git;a=tree"&gt;my git repository under colour_sensor_calibration&lt;/a&gt;.&lt;/p&gt;

&lt;pre class="brush:cpp"&gt;
#include &amp;lt;Wire.h&amp;gt;
/* Calibrates the sensor to get white balance. Pin 2 should be connected
 * to LED on the breakout board's LED pin. Calibration is done by placing the
 * breakout board inside a pin pong ball, and using the built-in LED for
 * illumination.
 *
 * Amount of light is measured by charging N capacitors for time X then
 * reading off the voltage. (Conjecture)
 *
 * N is controlled by CAP_XXX
 * T is controlled by INT_XXX
 *
 * Calibration is done by adjusting the integration time. No real reason.
 */
int _slave_id = 0x74;
int _LED_pin = 2;

uint8_t read_register(uint8_t addr)
{
  i2c_send(_slave_id, &amp;addr, 1);
  return i2c_read(_slave_id);
}

void write_register_int(uint8_t addr, int data)
{
 write_register_multibyte(addr, (uint8_t*)&amp;data, 2);
}

/* write data[i] = register+i */
void write_register_multibyte(uint8_t addr, uint8_t* data, uint8_t bytes)
{
 for (int i = 0; i &lt; bytes; ++i)
 {
  write_register(addr+i, data[i]);
 }
}

void write_register(uint8_t addr, uint8_t data)
{
 uint8_t bytes[] = {addr, data};
 i2c_send(_slave_id, bytes, 2);
}

uint8_t i2c_read(uint8_t id)
{
 Wire.requestFrom(_slave_id, 1);
 for(int i = 0; i&lt;10 &amp;&amp; !Wire.available(); ++i, delay(10));
 if (!Wire.available())
 {
  return 11;
 }
 return Wire.receive();
 
}

void i2c_send(uint8_t id, uint8_t * data, uint8_t len)
{
 Wire.beginTransmission(id);
 for(int i = 0; i &lt; len; ++i)
 {
  Wire.send(data[i]);
 }
 Wire.endTransmission();
}

#define CTRL    0x00
#define CONFIG    0x01

#define CAP_RED   0x06
#define CAP_GREEN   0x07
#define CAP_BLUE   0x08

#define INT_RED_LO   0x0A
#define INT_RED_HI   0x0B
#define INT_GREEN_LO  0x0C
#define INT_GREEN_HI  0x0D
#define INT_BLUE_LO  0x0E
#define INT_BLUE_HI  0x0F

#define DATA_RED_LO  0x40
#define DATA_RED_HI  0x41
#define DATA_GREEN_LO  0x42
#define DATA_GREEN_HI  0x43
#define DATA_BLUE_LO  0x44
#define DATA_BLUE_HI  0x45

int read_colour(uint8_t low_addr)
{
 int lo = read_register(low_addr);
 int hi = read_register(low_addr+1);

 return lo|(hi&lt;&lt;8);
}

int red_integration_time = 2048;
int green_integration_time = 2048;
int blue_integration_time = 2048;

void set_integration_times(int red, int green, int blue)
{
 write_register_int(INT_RED_LO, red);
 write_register_int(INT_GREEN_LO, green);
 write_register_int(INT_BLUE_LO, blue);
}

void setup()
{
 pinMode(_LED_pin, OUTPUT);
 digitalWrite(_LED_pin, HIGH);

 Serial.begin(57600); 
 Wire.begin(); // join i2c bus (address optional for master)
 Serial.println("Setting up...");

 // datasheet says, wait 10us for hardware reset, so lets wait 1000
 delay(1);

 // gain setup
 write_register(CAP_RED, 0x08);
 write_register(CAP_GREEN, 0x08);
 write_register(CAP_BLUE, 0x08);

 set_integration_times(
  red_integration_time, 
  green_integration_time, 
  blue_integration_time
 );

 // ask for colour data and offset
 write_register(CTRL, 0x01);
}

void loop()
{
 if (read_register(CTRL))
 {
  return;
 }
 
 int red, green, blue;
 red = read_colour(DATA_RED_LO);
 green = read_colour(DATA_GREEN_LO);
 blue = read_colour(DATA_BLUE_LO);
 
 Serial.println("--------------");
 Serial.print("red: ");Serial.println(red);
 Serial.print("green: ");Serial.println(green);
 Serial.print("blue: ");Serial.println(blue);


 Serial.print("red_int: ");Serial.println(red_integration_time);
 Serial.print("green_int: ");Serial.println(green_integration_time);
 Serial.print("blue_int: ");Serial.println(blue_integration_time);

 // have to calibrate against blue, because LED has a blue bias otherwise
 // it would look like blue has high gain than it does
 float P = 1;
 int reference = blue;
 red_integration_time += (reference - red)*P;
 green_integration_time += (reference - green)*P;
 blue_integration_time += (reference - blue)*P;

 // set the new integration times
 set_integration_times(
  red_integration_time, 
  green_integration_time, 
  blue_integration_time
 );
 
 // ask for colour data again
 write_register(CTRL, 0x01);
}&lt;/pre&gt;
&lt;p&gt;
Cheers,&lt;br/&gt;
Steve&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5867400-3107102331772473286?l=www.shuningbian.net%2Findex.php' alt='' /&gt;&lt;/div&gt;</description><link>http://www.shuningbian.net/2009/05/sketch-to-calibrate-sen-08663.php</link><author>noreply@blogger.com (steve)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5867400.post-4017154557320374150</guid><pubDate>Fri, 08 May 2009 06:03:00 +0000</pubDate><atom:updated>2009-07-29T14:54:21.997+10:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>software</category><category domain='http://www.blogger.com/atom/ns#'>internet</category><category domain='http://www.blogger.com/atom/ns#'>code</category><title>Facebook python authentication gateway</title><description>&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; it occurred to me what I have below is the basics of a thin facebook api wrapper. I might make it into one at some point in the future.&lt;/p&gt;

&lt;p&gt;If you don't know what this does, you don't need it. Hope this helps some one. Written because pyfacebook is broken, always returns error 100.&lt;/p&gt;

&lt;pre class="brush:py"&gt;
FB_API_HOST="api.facebook.com"
FB_API_PATH="/restserver.php"

def get_session(auth_token):
        params={
                "api_key":FB_API_KEY,
                "v":"1.0",
                "auth_token":auth_token,
                "generate_session_secret":1,
                "method":"auth.getSession",
        }

        sorted = params.items()
        sorted.sort(key=lambda x:x[0])

        str_to_hash = ''.join(["%s=%s"%(x[0], x[1]) for x in sorted])
        str_to_hash += FB_API_SECRET

        md5 = hashlib.md5()
        md5.update(str_to_hash)

        sig = md5.hexdigest()

        params["sig"] = sig

        encoded_params = urllib.urlencode(params)
        headers = {
                "Content-type":"application/x-www-form-urlencoded",
        }

        conn = httplib.HTTPConnection(FB_API_HOST)
        conn.request("POST", FB_API_PATH, encoded_params, headers)

        response = conn.getresponse()

        print response.status, response.reason
        return response.read()
&lt;/pre&gt;

&lt;p&gt;This Works For Me when I use it with iphone facebook-connect client:&lt;/p&gt;
&lt;pre&gt;
[FBSession sessionForApplication:myApiKey getSessionProxy:myURL delegate:self];
&lt;/pre&gt;
&lt;p&gt;
Cheers,&lt;br/&gt;
Steve&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5867400-4017154557320374150?l=www.shuningbian.net%2Findex.php' alt='' /&gt;&lt;/div&gt;</description><link>http://www.shuningbian.net/2009/05/facebook-python-authentication-gateway.php</link><author>noreply@blogger.com (steve)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>3</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5867400.post-513247405015977783</guid><pubDate>Tue, 28 Apr 2009 14:41:00 +0000</pubDate><atom:updated>2009-04-29T00:51:54.167+10:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>howto</category><category domain='http://www.blogger.com/atom/ns#'>software</category><category domain='http://www.blogger.com/atom/ns#'>code</category><category domain='http://www.blogger.com/atom/ns#'>osx</category><category domain='http://www.blogger.com/atom/ns#'>computer</category><title>Stripping trailing whitespace from XCode</title><description>&lt;div style="float:right"&gt;
&lt;img  src="http://shuningbian.net/files/xcode_strip_trailing_whitespace_regex.jpg"/&gt;
&lt;/div&gt;
&lt;p&gt;Firstly, my usual approach of &lt;code&gt;s/\s+$//g&lt;/code&gt; doesn't work since it eats up the newline too. &lt;code&gt;s/\s+$/\n/g&lt;/code&gt; doesn't work either because the Replace: field in the find dialogue doesn't escape the &lt;code&gt;\n&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Final solution is as shown: &lt;code&gt;s/[ \t]+$//g&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;
Cheers,&lt;br/&gt;
Steve&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5867400-513247405015977783?l=www.shuningbian.net%2Findex.php' alt='' /&gt;&lt;/div&gt;</description><link>http://www.shuningbian.net/2009/04/stripping-trailing-whitespace-from.php</link><author>noreply@blogger.com (steve)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5867400.post-418253492937132722</guid><pubDate>Mon, 06 Apr 2009 02:21:00 +0000</pubDate><atom:updated>2009-04-07T00:57:21.833+10:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>ylde</category><category domain='http://www.blogger.com/atom/ns#'>comic</category><title>Family Planning</title><description>&lt;h3&gt;YLDE comic: half as funny half as often.&lt;/h3&gt;
&lt;br/&gt;because imitation is the best form of flattery.

&lt;a href="http://shuningbian.net/files/familyplanning-600.png"&gt;
&lt;img src="http://shuningbian.net/files/familyplanning-400.png" 
title="and the product of their age will be my private key"/&gt;
&lt;/a&gt;

&lt;p&gt;
Cheers,&lt;br/&gt;
Steve&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5867400-418253492937132722?l=www.shuningbian.net%2Findex.php' alt='' /&gt;&lt;/div&gt;</description><link>http://www.shuningbian.net/2009/04/family-planning.php</link><author>noreply@blogger.com (steve)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5867400.post-3901723615750373215</guid><pubDate>Thu, 02 Apr 2009 10:11:00 +0000</pubDate><atom:updated>2009-04-02T21:14:45.005+11:00</atom:updated><title>Finally</title><description>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://farm4.static.flickr.com/3655/3406014833_b84cd321e9.jpg?v=0"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 500px; height: 375px;" src="http://farm4.static.flickr.com/3655/3406014833_b84cd321e9.jpg?v=0" border="0" alt="" /&gt;&lt;/a&gt;

&lt;p&gt;I &lt;a href="http://peter.stillhq.com/jasmine/rubikscubesolution.html"&gt;cheated thought&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;
Cheers,&lt;br/&gt;
Steve&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5867400-3901723615750373215?l=www.shuningbian.net%2Findex.php' alt='' /&gt;&lt;/div&gt;</description><link>http://www.shuningbian.net/2009/04/finally.php</link><author>noreply@blogger.com (steve)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5867400.post-4628948543218416916</guid><pubDate>Mon, 16 Feb 2009 07:04:00 +0000</pubDate><atom:updated>2009-02-16T18:07:08.084+11:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>electronics</category><title>Futurlec Ultrasonic Sensor Note</title><description>&lt;p&gt;Part number &lt;strong&gt;US1440&lt;/strong&gt;, these sensors are &lt;em&gt;not&lt;/em&gt; dual use, which means the transmitter and receiver is not exchangeable. They also look identical from the outside, so if you build my &lt;A href="http://www.shuningbian.net/2009/02/arduino-ultrasound-ranger.php"&gt;arduino ultrasound ranger&lt;/a&gt; with these (as I did) and find you can't see echoes, try swapping your transmitter and receiver around! It cost me no small amount of headach this morning.&lt;/p&gt;
&lt;p&gt;
Cheers,&lt;br/&gt;
Steve&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5867400-4628948543218416916?l=www.shuningbian.net%2Findex.php' alt='' /&gt;&lt;/div&gt;</description><link>http://www.shuningbian.net/2009/02/futurlec-ultrasonic-sensor-note.php</link><author>noreply@blogger.com (steve)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5867400.post-5806653802913302312</guid><pubDate>Sun, 15 Feb 2009 13:52:00 +0000</pubDate><atom:updated>2009-06-01T12:38:01.212+10:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>electronics</category><category domain='http://www.blogger.com/atom/ns#'>arduino</category><category domain='http://www.blogger.com/atom/ns#'>code</category><category domain='http://www.blogger.com/atom/ns#'>seeeduino</category><title>Arduino ultrasound ranger</title><description>&lt;a href="http://www.shuningbian.net/uploaded_images/ultrasound_ranger-732633.gif"&gt;&lt;img style="float:right;margin:1em; border: thin solid black;" src="http://www.shuningbian.net/uploaded_images/ultrasound_ranger-732630.gif" border="0" alt="" /&gt;&lt;/a&gt;

&lt;p&gt;Code to drive it is &lt;a href="http://git.pictorii.com/?p=sketches.git;a=blob;f=ultra_sound_range_finder_test/ultra_sound_range_finder_test.pde;h=22392b358bea3d379c6c78d486838acb6e1872b0;hb=HEAD"&gt;avaliable under GPL.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;An updated version of the &lt;a href="http://git.pictorii.com/?p=schematics.git;a=blob;f=ultrasound_ranger.sch;h=fb0796dcbd27b4d9862ca65c013d9403912eed56;hb=HEAD"&gt;schematic as a .sch file&lt;/a&gt; is available also.&lt;/p&gt;

&lt;p&gt;
Cheers,&lt;br/&gt;
Steve&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5867400-5806653802913302312?l=www.shuningbian.net%2Findex.php' alt='' /&gt;&lt;/div&gt;</description><link>http://www.shuningbian.net/2009/02/arduino-ultrasound-ranger.php</link><author>noreply@blogger.com (steve)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-5867400.post-7149812196066536801</guid><pubDate>Fri, 13 Feb 2009 11:47:00 +0000</pubDate><atom:updated>2009-02-13T22:54:39.062+11:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>rant</category><title>The libertarian argument against vaccination</title><description>&lt;p&gt;Goes like this:&lt;/p&gt;

&lt;blockquote&gt;I have a right to decide what happens to my children!&lt;/blockquote&gt;

&lt;p&gt;To that I say, we have the right to not be a victim of your stupidity. Further, laws represent social contracts that all members of society enter into for everyone's benefit. Getting vaccinated is one such contract which serves to prevent epidemics of infectious diseases.&lt;/p&gt;

&lt;p&gt;If you &lt;em&gt;really&lt;/em&gt; don't want to vaccinate your child, then please ensure your child never comes into physical contact with the rest of society for our sake. I would not welcome them without vaccinations.&lt;/p&gt;
&lt;p&gt;
Cheers,&lt;br/&gt;
Steve&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5867400-7149812196066536801?l=www.shuningbian.net%2Findex.php' alt='' /&gt;&lt;/div&gt;</description><link>http://www.shuningbian.net/2009/02/libertarian-argument-against.php</link><author>noreply@blogger.com (steve)</author></item></channel></rss>