<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>狗爺語錄</title>
	
	<link>http://me.abelcheung.org</link>
	<description>吠盡不平事</description>
	<lastBuildDate>Sun, 09 May 2010 20:28:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/abelcheung" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="abelcheung" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Kakuro strategy: sum of far away cells</title>
		<link>http://me.abelcheung.org/2010/05/10/kakuro-strategy-sum-of-far-away-cells/</link>
		<comments>http://me.abelcheung.org/2010/05/10/kakuro-strategy-sum-of-far-away-cells/#comments</comments>
		<pubDate>Sun, 09 May 2010 20:28:54 +0000</pubDate>
		<dc:creator>Abel</dc:creator>
				<category><![CDATA[Fun & Games]]></category>
		<category><![CDATA[arithmetics]]></category>
		<category><![CDATA[kakuro]]></category>

		<guid isPermaLink="false">http://me.abelcheung.org/?p=735</guid>
		<description><![CDATA[After <a href="http://me.abelcheung.org/tag/kakuro/" class="liinternal">a series of kakuro strategies</a> about difference of cells, here comes a variation of theme: sum of seemingly unrelated cells. Here is the starting[......]<p class='read-more'><a href='http://me.abelcheung.org/2010/05/10/kakuro-strategy-sum-of-far-away-cells/'>(Continue reading...)</a></p>]]></description>
			<content:encoded><![CDATA[<p><span class="drop">A</span>fter <a href="http://me.abelcheung.org/tag/kakuro/" class="liinternal">a series of kakuro strategies</a> about difference of cells, here comes a variation of theme: sum of seemingly unrelated cells. Here is the starting situation:</p>
<div class="wp-caption aligncenter" style="width: 471px"><img class="alignnone" src="http://farm2.static.flickr.com/1411/4592907044_bc8622b96e_o.png" alt="Image of kakuro problem" width="461" height="549" title="Figure 1: original problem" /><p class="wp-caption-text">Figure 1: original problem</p></div>
<p>Maybe some smarter people can spot a better way of solving this one, but in my case I&#8217;m stuck for quite some time before realizing the next solvable cells can be determined using addition and subtraction of areas again. And finding these areas are definitely not easy:</p>
<table width="100%">
<tr>
<td>
<div class="wp-caption aligncenter" style="width: 212px"><a href="http://farm5.static.flickr.com/4040/4593101462_fef9da1af3_o.png" class="tt-flickr tt-flickr-Medium" title="Figure 2: step 1 (horizontal)" target="_blank" rel="lightbox[735]"><img class="alignnone" src="http://farm5.static.flickr.com/4040/4593101462_540ea6a69e_m.jpg" alt="image of kakuro puzzle, step 1" width="202" height="240" /></a><p class="wp-caption-text">Figure 2: step 1 (horizontal)</p></div>
</td>
<td>
<div class="wp-caption aligncenter" style="width: 212px"><a href="http://farm4.static.flickr.com/3362/4592481581_b54f94b688_o.png" class="tt-flickr tt-flickr-Medium" title="Figure 3: step 2 (vertical)" target="_blank" rel="lightbox[735]"><img class="alignnone" src="http://farm4.static.flickr.com/3362/4592481581_497c0647ce_m.jpg" alt="image of kakuro puzzle, step 2" width="202" height="240" /></a><p class="wp-caption-text">Figure 3: step 2 (vertical)</p></div>
</td>
</tr>
</table>
<p>Subtracting red area (calculated vertically) from green area (calculated horizontally) gives A+B=17, therefore A=9 and B=8.</p>
<p>Is this the end? Not so soon! Two more cells can be determined with similar method and similar areas:</p>
<table>
<tr>
<td>
<div class="wp-caption aligncenter" style="width: 212px"><a href="http://farm2.static.flickr.com/1278/4592481637_981c9a0d11_o.png" class="tt-flickr tt-flickr-Small" title="Figure 4: step 3 (horizontal)" target="_blank" rel="lightbox[735]"><img class="alignnone" src="http://farm2.static.flickr.com/1278/4592481637_eebdf9e333_m.jpg" alt="image of kakuro puzzle, step 3" width="202" height="240" title="Figure 4: step 3 (horizontal)" /></a><p class="wp-caption-text">Figure 4: step 3 (horizontal)</p></div>
</td>
<td>
<div class="wp-caption aligncenter" style="width: 212px"><a href="http://farm2.static.flickr.com/1348/4592481603_0a7aae5782_o.png" class="tt-flickr tt-flickr-Medium" title="Figure 5: step 4 (vertical)" target="_blank" rel="lightbox[735]"><img class="alignnone" src="http://farm2.static.flickr.com/1348/4592481603_75178074d9_m.jpg" alt="image of kakuro puzzle, step 4" width="202" height="240" title="Figure 5: step 4 (vertical)" /></a><p class="wp-caption-text">Figure 5: step 4 (vertical)</p></div>
</td>
</tr>
</table>
<p>After similar subtration (green area minus red area), we got A-C-D=1. As it was already found above that A=9, thus C=2 and D=6.</p>
<p>Probably this is the last post in the kakuro series until some more elegant strategies can be found, because I don&#8217;t have much info to add about subtraction of areas.</p>
]]></content:encoded>
			<wfw:commentRss>http://me.abelcheung.org/2010/05/10/kakuro-strategy-sum-of-far-away-cells/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>9 years of worthless waiting for usable music typesetting program</title>
		<link>http://me.abelcheung.org/2010/03/19/9-years-of-worthless-waiting-for-usable-music-typesetting-program/</link>
		<comments>http://me.abelcheung.org/2010/03/19/9-years-of-worthless-waiting-for-usable-music-typesetting-program/#comments</comments>
		<pubDate>Fri, 19 Mar 2010 15:15:37 +0000</pubDate>
		<dc:creator>sapristoire</dc:creator>
				<category><![CDATA[Music]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[music typesetting]]></category>

		<guid isPermaLink="false">http://me.abelcheung.org/?p=733</guid>
		<description><![CDATA[The history
Immediately after registering and paying for <a href="http://arkkra.com/" target="_blank" class="liexternal">Mup Music Publishing program</a> around summer 2001, I was so fascinated with its ease of usage a[......]<p class='read-more'><a href='http://me.abelcheung.org/2010/03/19/9-years-of-worthless-waiting-for-usable-music-typesetting-program/'>(Continue reading...)</a></p>]]></description>
			<content:encoded><![CDATA[
<h3>The history</h3>
<p><span class="drop">I</span>mmediately after registering and paying for <a href="http://arkkra.com/" target="_blank" class="liexternal">Mup Music Publishing program</a> around summer 2001, I was so fascinated with its ease of usage and simple syntax, so that Lilypond (at that time the only free software for music typesetting) was ditched with no second thought, and even wrote an article about Mup in <a href="http://www.opensource.hk/node/124" target="_blank" class="liexternal">LinuxHall magazine</a> (disclaimer: I was an editor for the magazine). It was rare for me to prefer shareware to free software, but this was <em>the</em> rare case. With such great tool I saw a glimpse of hope for my wild ambition: getting <a href="http://en.wikipedia.org/wiki/Piano_Concerto_No._2_%28Prokofiev%29" target="_blank" rel="nofollow" class="liwikipedia">Prokofiev&#8217;s second piano concerto</a> done. Undoubtably it would be a daunting project, especially when considering the user-unfriendliness of Lilypond (it was/is programmers&#8217; solution to typesetting, not musicians&#8217; solution), but with Mup I could see the light of getting the beast done in a year or two: an almost 150 page of orchestral work, containing many obstacles not solvable with simplistic notation programs (though not as bad as contemporary music).</p>
<div class="alignright" style="text-align: center;">
<img class='scorerender-image' width="70" height="91" title='Music fragment in "mup" notation' alt='Music fragment in "mup" notation' src='http://me.abelcheung.org/wp-content/plugins/scorerender/misc/tint-image.php?img=sr-mup-86a4be24f9d542b736718830940bce0d.png&#038;color=F7F4EF' id='sr-86a4be24f9d542b736718830940bce0d' /><br />
Cross-staff stem
</div>
<p>Indeed, it turned out Mup was not <em>that</em> perfect at that moment: cross-staff stem was not doable. That implied giving up and waiting for Mup to implement the functionality. After a <em>long</em> wait, it&#8217;s finally there; so a happy user could continue the crusade, after maybe one year later.</p>
<p>That had become sort of a cycle: typesetting till a certain point, an obstacle was encountered, report and wait till Mup has support implemented, and go back to step 1. In these many years, Lilypond has grown a lot too. However, no matter how versatile it was, there were 2 major reasons I actively distant myself from Lilypond:</p>
<ul>
<li>In the old days vertical spacing between piano staves had to be <strong><a href="http://dvoi.com/files/lilypond/2.4.1/input/test/out-www/collated-files.html#piano-staff-distance.ly" target="_blank" class="liexternal">defined manually using code</a></strong>! (also see <a href="http://lilypond.org/doc/v2.10/Documentation/user/lilypond/Vertical-spacing-of-piano-staves#Vertical-spacing-of-piano-staves" target="_blank" class="liexternal">what&#8217;s done in newer version</a>). That&#8217;s <strong>RIDICULOUS</strong>. No notation program should be called &#8216;usable&#8217; under such circumstance. To say bluntly, it&#8217;s perhaps better off using image editing program to fix the spacing afterwards.</li>
<li>The constantly changing syntax made me really uncomfortable in using Lilypond for any serious purpose. Any major release, any minor release, and even any patch level contains incompatible changes, some as &#8216;trivial&#8217; as changing plural form for settings (yes, same code wouldn&#8217;t work in later version unless using <code>convert-ly</code> to add or remove an &#8217;s&#8217;). There was apparently no discussion about the names of settings used, and maintainers seemed to be toying with names arbitrarily at will.</li>
</ul>
<h3>The problem</h3>
<p>Everything went on as usual up to a certain point: cross-bar beaming. To put it exactly, I was completely stuck typesetting this passage (from last movement):</p>
<input type='hidden' name='code' value='&#91;score lang=&quot;lilypond&quot;&#93;&#10;rh = {&#10;	\key a \major&#10;	\clef &quot;bass&quot;&#10;	\time 2/4&#10;	\stemUp&#10;	cis,4-&gt;&#10;	\clef treble&#10;	&lt;cis&#039;&#039;&#039; cis&#039;&#039;&#039;&#039;&gt;8&#91; s |&#10;	\numericTimeSignature \time 4/4&#10;	bis&#93; s &lt;bis&#039;&#039; bis&#039;&#039;&#039;&gt;&#91; s d&#039;&#93; s &lt;d&#039;&#039;&#039; d&#039;&#039;&#039;&#039;&gt;&#91; s |&#10;	\partial 4&#10;	cis&#039;&#93; s&#10;	\bar &quot;&quot;&#10;}&#10;lh = {&#10;	\key a \major&#10;	\clef &quot;bass&quot;&#10;	\time 2/4&#10;	cis,4-&gt; s8&#10;	\stemDown&#10;	\change Staff=&quot;RH&quot; cis&#039;&#039;&#91; | \change Staff=&quot;LH&quot;&#10;	\numericTimeSignature \time 4/4&#10;	s8 &lt;fis,, fis,&gt;&#93; s&#10;	\change Staff=&quot;RH&quot; bis&#039;&#91; \change Staff=&quot;LH&quot;&#10;	s &lt;cis, cis&gt;&#93; s&#10;	\change Staff=&quot;RH&quot; d&#039;&#039;&#91; \change Staff=&quot;LH&quot;&#10;	\partial 4&#10;	s &lt;fis,, fis,&gt;&#93;&#10;	\bar &quot;&quot;&#10;}&#10;\score {&#10;	\new PianoStaff&#10;	&lt;&lt;&#10;		\new Staff = &quot;RH&quot; &lt;&lt; \rh &gt;&gt;&#10;		\new Staff = &quot;LH&quot; &lt;&lt; \lh &gt;&gt;&#10;	&gt;&gt;&#10;	\layout {}&#10;	\midi { \context { \Score tempoWholesPerMinute = #(ly:make-moment 132 4) } }&#10;}&#10;&#91;/score&#93;' id='sr-f6b31d13117c20d3fd196d058dd1b16b-code'>
<div id='sr-f6b31d13117c20d3fd196d058dd1b16b-div' style='position:relative; width:321px; height:179px; display:inline; overflow:hidden;'>
<div id='sr-f6b31d13117c20d3fd196d058dd1b16b-message' style='position:absolute; width:321px; height:179px; display:none; background:inherit; text-align:center;'>Music code copied to clipboard</div>
<p><img class='scorerender-image scorerender-clip' width="321" height="179" title='Click on image to copy music code to clipboard' alt='Music fragment in "lilypond" notation' src='http://me.abelcheung.org/wp-content/plugins/scorerender/misc/tint-image.php?img=sr-lilypond-f6b31d13117c20d3fd196d058dd1b16b.png&#038;color=F7F4EF' id='sr-f6b31d13117c20d3fd196d058dd1b16b' /></div>
<p>While I could anticipate Mup fans introducing lots of hacks or manual drawings to attempt working around the problem, it&#8217;s no cure. Changing paper size, and BOOM! All hacks and manual drawings would be broken then. Despite being placed in <a href="http://www.arkkra.com/doc/wishlist.html" target="_blank" class="liexternal">feature request list</a> (#280), Mup maintainer had not even attempted touching it, while Lilypond had this feature since history. The refusal (well, almost) of Unicode support also saddens me much, though I was well aware of the fact that with currently arcane and spaghetti structured code base it sounds immensely difficult to add Unicode support. Anyway, no cross-measure beaming means 3 straight years of abandoning the project, expecting it would never finish.</p>
<p>Yet the final blow comes recently. While checking out if Lilypond has any new feature, one particular line caught my eyes:</p>
<blockquote><p>Vertical staff spacing using a skyline algorithm</p></blockquote>
<p>It very much means an important blockade from using Lilypond was removed. Vertical distance between staffs are now automatically computed and adjusted. Though still maintaining my point of view as programmers&#8217; user-unfriendly solution to typesetting and as the one I dislike most, I actually start to see the potential of finishing the whole thing with Lilypond now, despite taking much longer time than needed using Mup. That&#8217;s a great disappointment, because my favorite one failed to do the job while another has progressed far enough to overcome the problem it had. Maybe the definition of love and hate should be refined after all&hellip;</p>
<h3>The point</h3>
<p>Nothing is perfect. Perhaps using Finale and Sibelius, the <em>de facto</em> standard, would mean less headache and less complaining, yet also means people can&#8217;t easily modify it (my typesetting is certainly lousy). The reason of my insist on using text instead of point-and-click program is mainly a preference on speed &mdash; I feel working much faster this way. But still, completely rejecting GUI programs could be my fault. The persistence on ignoring other tools is, in the end, a hindrance.</p>
<p>The development models are significantly different between Lilypond and Mup:</p>
<ul>
<li>Mup is developed and maintained by (purportedly) 2 persons. Despite the open source nature, it&#8217;s actually a shareware. There&#8217;s a mailing list for discussion, but it&#8217;s not public. There&#8217;s not much discussion about development too, I&#8217;d say it&#8217;s a pure user discussion and announcement list.</li>
<li>Lilypond is mainly developed by 2 persons too, though more helpers are willing to contribute, and development is more transparent, following free software paradigm.</li>
</ul>
<p>Such difference decides their fate. Mup is completely user-oriented, so people attracted to it are mostly users who want to get the work done. This spells the pros and cons: easy to use, less tweaking (well, the way for extension is to embed PostScript directly), the wait-for-me-to-feed-you style of feature development.</p>
<p>OTOH, Lilypond is much more programmer oriented (usage of scheme as script language, programming-like TeX syntax), so the ones it attracted are more programmer-like minded. Almost all balanced reviews (NOT those written by fanboys) regard it as one of the most difficult to learn but most flexible.</p>
<p>The (dis)advantages of various development models have been discussed to death; I&#8217;m not going to even think about it anymore. The lesson I&#8217;ve learnt is, try to learn other tools, even the disliked ones. It is entirely possible that the disliked tools help accomplishing the task.</p>
]]></content:encoded>
			<wfw:commentRss>http://me.abelcheung.org/2010/03/19/9-years-of-worthless-waiting-for-usable-music-typesetting-program/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>WordPress Private Post Access plugin updated</title>
		<link>http://me.abelcheung.org/2010/02/10/wordpress-private-post-access-plugin-updated/</link>
		<comments>http://me.abelcheung.org/2010/02/10/wordpress-private-post-access-plugin-updated/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 11:34:49 +0000</pubDate>
		<dc:creator>Abel</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress plugin]]></category>

		<guid isPermaLink="false">http://me.abelcheung.org/?p=731</guid>
		<description><![CDATA[Just made up my mind to push a new version (1.3.0) of the plugin, which can be <a href="http://code.google.com/p/wp-priv-post-access/" target="_blank" class="liexternal">downloaded from its official page</a> as usual. There are a few mysterious [......]<p class='read-more'><a href='http://me.abelcheung.org/2010/02/10/wordpress-private-post-access-plugin-updated/'>(Continue reading...)</a></p>]]></description>
			<content:encoded><![CDATA[<p><span class="drop">J</span>ust made up my mind to push a new version (1.3.0) of the plugin, which can be <a href="http://code.google.com/p/wp-priv-post-access/" target="_blank" class="liexternal">downloaded from its official page</a> as usual. There are a few mysterious oddities so far:</p>
<ul>
<li>An <a href="http://me.abelcheung.org/devel/show-private-posts-in-wordpress/comment-page-1/#comment-100777" class="liinternal">odd problem</a> which seemed to affect earlier WordPress 2.8.x versions is just gone, for unknown reason.</li>
<li>When trying to replace the category list retrieved from <code>get_terms()</code>, PHP simply segfaulted, at least on my machine. Failed to get any meaningful error message, nor can I deduce any reason so far.</li>
</ul>
<p>So for now I just settled in showing empty categories in sidebar widgets, which should work as an internim solution (categories containing ONLY private posts are not shown by default, as the public post count is zero). Of course, the side effect is that even genuinely empty categories are shown as well. I&#8217;ll see what can be done later.</p>
]]></content:encoded>
			<wfw:commentRss>http://me.abelcheung.org/2010/02/10/wordpress-private-post-access-plugin-updated/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Crappy GNOME trash</title>
		<link>http://me.abelcheung.org/2009/08/31/crappy-gnome-trash/</link>
		<comments>http://me.abelcheung.org/2009/08/31/crappy-gnome-trash/#comments</comments>
		<pubDate>Sun, 30 Aug 2009 20:22:57 +0000</pubDate>
		<dc:creator>Abel</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[buggy software]]></category>
		<category><![CDATA[critics]]></category>
		<category><![CDATA[GNOME]]></category>

		<guid isPermaLink="false">http://me.abelcheung.org/?p=725</guid>
		<description><![CDATA[<em>Even if a file with the same name and location gets trashed many times, each subsequent trashing must not overwrite a previous copy.</em>
So what is this h[......]<p class='read-more'><a href='http://me.abelcheung.org/2009/08/31/crappy-gnome-trash/'>(Continue reading...)</a></p>]]></description>
			<content:encoded><![CDATA[<blockquote><p><em>Even if a file with the same name and location gets trashed many times, each subsequent trashing must not overwrite a previous copy.</em></p></blockquote>
<p><span class="drop">S</span>o what is this holy shit called GNOME doing? Originally, I expected those FreeDesktop people still don&#8217;t get it after <em>the</em> other most widely used OS have done that 12 years ago (maybe even longer), but it looks like the wrong people have been blamed all along. So lucky it&#8217;s not written down till now.</p>
<p>Even <a href="http://www.ramendik.ru/docs/trashspec.html" target="_blank" class="liexternal">FreeDesktop Trash specification</a> has the statement stressed in italic letters, yet GNOME freetards in their infinite wisdom are not follow it! <em>Good job!</em> Looking at how GNOME had implemented previous trash can (which was just yet another directory &mdash; an excellent topic for jokes), I didn&#8217;t expect much would be done in foreseeable future though.</p>
]]></content:encoded>
			<wfw:commentRss>http://me.abelcheung.org/2009/08/31/crappy-gnome-trash/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>被搭訕</title>
		<link>http://me.abelcheung.org/2009/08/29/%e8%a2%ab%e6%90%ad%e8%a8%95/</link>
		<comments>http://me.abelcheung.org/2009/08/29/%e8%a2%ab%e6%90%ad%e8%a8%95/#comments</comments>
		<pubDate>Sat, 29 Aug 2009 07:17:59 +0000</pubDate>
		<dc:creator>Abel</dc:creator>
				<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://me.abelcheung.org/?p=724</guid>
		<description><![CDATA[昨天食早餐時，很罕有地，坐在對面位的師奶忽然攀談起來。也許是遇到這種事情的可能性太低，開始時還以為對方在自言自語，過一會才意會到是對我講說話。存在感較薄弱的我，有陌生人閒談家常的機會率平常是接近零的。對方年紀和我大概不相上下，很明顯地已有約六七個月身孕，BB 快要出世那種。一開始就是說大家樂的快餐不[......]<p class='read-more'><a href='http://me.abelcheung.org/2009/08/29/%e8%a2%ab%e6%90%ad%e8%a8%95/'>(Continue reading...)</a></p>]]></description>
			<content:encoded><![CDATA[<p><span class="drop">昨</span>天食早餐時，很罕有地，坐在對面位的師奶忽然攀談起來。也許是遇到這種事情的可能性太低，開始時還以為對方在自言自語，過一會才意會到是對我講說話。存在感較薄弱的我，有陌生人閒談家常的機會率平常是接近零的。對方年紀和我大概不相上下，很明顯地已有約六七個月身孕，BB 快要出世那種。一開始就是說大家樂的快餐不如某街市的食肆便宜，之後這樣那樣的，言談之間，談及自己在數年前來香港。但廣東話絕對是道地的，聽不出半點口音，除了是本來就住在廣東，或者是語言天才外，想不出有多少可能性。</p>
<p>其餘的時間，都接近是這位師奶的 solo performance：親戚的仔女如何被父母縱壞，菲傭好還是印傭好，諸如此類，都是生活上的鎖碎事。由於沒甚麼經驗，插不上嘴，唯有仔細聆聽。但本來日日如是、平凡悶蛋的早餐，變得有趣味多了。</p>
<p>香港人也許就是缺乏這種親和力。</p>
]]></content:encoded>
			<wfw:commentRss>http://me.abelcheung.org/2009/08/29/%e8%a2%ab%e6%90%ad%e8%a8%95/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yahoo Site Explorer SUCKS. Big time.</title>
		<link>http://me.abelcheung.org/2009/07/13/yahoo-site-explorer-sucks-big-time/</link>
		<comments>http://me.abelcheung.org/2009/07/13/yahoo-site-explorer-sucks-big-time/#comments</comments>
		<pubDate>Sun, 12 Jul 2009 20:08:43 +0000</pubDate>
		<dc:creator>Abel</dc:creator>
				<category><![CDATA[Site maintenance]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[search engine]]></category>
		<category><![CDATA[Yahoo]]></category>

		<guid isPermaLink="false">http://me.abelcheung.org/?p=716</guid>
		<description><![CDATA[<div class="sideblock alignright">(For those who don&#8217;t know about what &#8220;webmaster tool&#8221; is and what it does: webmaster tool allows site administrators to control how their sites are crawled by search engines. Please refer to <a href="http://www.digitalpurview.com/yahoo-webmaster-tools/" target="_blank" class="liexternal">this Digital Purview post</a> for a brief introduction.)</div>
<p><span class="drop">W</span>hile <a href="http://www.google.com/webmasters/tools/" target="_blank" class="liexternal">Google Webmaster tool</a> does its job well (even <a href="http://webmaster.live.com/" target="_blank" class="liexternal">Microsoft one</a> too), Yahoo Site Explorer (interesting that it&#8217;s not named Webmaster tool like the others) simply adds no value to webmasters except confusion, impatience and disappointment. The reason?</p>
<p>[......]</p><p class='read-more'><a href='http://me.abelcheung.org/2009/07/13/yahoo-site-explorer-sucks-big-time/'>(Continue reading...)</a></p>]]></description>
			<content:encoded><![CDATA[<div class="sideblock alignright">(For those who don&#8217;t know about what &#8220;webmaster tool&#8221; is and what it does: webmaster tool allows site administrators to control how their sites are crawled by search engines. Please refer to <a href="http://www.digitalpurview.com/yahoo-webmaster-tools/" target="_blank" class="liexternal">this Digital Purview post</a> for a brief introduction.)</div>
<p><span class="drop">W</span>hile <a href="http://www.google.com/webmasters/tools/" target="_blank" class="liexternal">Google Webmaster tool</a> does its job well (even <a href="http://webmaster.live.com/" target="_blank" class="liexternal">Microsoft one</a> too), Yahoo Site Explorer (interesting that it&#8217;s not named Webmaster tool like the others) simply adds no value to webmasters except confusion, impatience and disappointment. The reason?</p>
<p><span id="more-716"></span></p>
<ul>
<li>While Google and Microsoft one allows authentication of site using <code>META</code> tag, similar function by Yahoo simply fail. No idea, and no comprehensive error message. Yahoo just fails and tells you it would retry again later.</li>
<li>Once Yahoo fails to validate your site, what&#8217;s next? Revalidate immediately? NO! Even if you choose alternative method (uploading a file into web root folder), it would just indicate that validation will be pending some time soon. How long? No idea.</li>
<li>Therefore, for people impatient enough to demand immediate validation, one have to remove and readd the site, and revalidate afterwards using file upload method. No other choice.</li>
<li>Once validated, can I just revert to previous site content? OK for Google, not for Microsoft and Yahoo. In Yahoo it is indicated clearly:<br />
<blockquote><p>We will revalidate your site ownership by checking this file regularly.</p></blockquote>
<blockquote><p>We will revalidate your site ownership by checking this META tag regularly.</p></blockquote>
</li>
<li>Taiwan version of Site Explorer is equally stupid, one have to <em>stick an image on web page</em> for validation! Speechless. Can&#8217;t it just use some less intrusive method for validation?</li>
<li>Too bad that Yahoo doesn&#8217;t accept any sort of <a href="http://www.sitemaps.org/" target="_blank" class="liexternal">XML sitemap</a>.</li>
</ul>
<p>For the functionalities after validation &mdash; well, my opinion is, no one is perfect (a combination of all 3 as a single website management tool is most desirable). However, if I were to pick one, I <em>absolutely</em> would not pick Yahoo. So far the only thing worth mentioning is, Yahoo allows removal of selected URLs containing certain substrings or GET parameters.</p>
]]></content:encoded>
			<wfw:commentRss>http://me.abelcheung.org/2009/07/13/yahoo-site-explorer-sucks-big-time/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hiding WordPress version has no future</title>
		<link>http://me.abelcheung.org/2009/07/12/hiding-wordpress-version-has-no-future/</link>
		<comments>http://me.abelcheung.org/2009/07/12/hiding-wordpress-version-has-no-future/#comments</comments>
		<pubDate>Sat, 11 Jul 2009 16:33:34 +0000</pubDate>
		<dc:creator>Abel</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[web attack]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://me.abelcheung.org/?p=714</guid>
		<description><![CDATA[Yesterday I came across this <a href="http://bueltge.de/wordpress-version-verschleiern-plugin/602/" target="_blank" class="liexternal">&#8220;Replace WP-Version&#8221;</a> WordPress plugin (<a href="http://translate.google.com/translate?sl=de&#038;tl=en&#038;u=http%3A%2F%2Fbueltge.de%2Fwordpress-version-verschleiern-plugin%2F602%2F" target="_blank" class="liexternal">english translation</a>), which tries to mangle or simply hide WordPress v[......]<p class='read-more'><a href='http://me.abelcheung.org/2009/07/12/hiding-wordpress-version-has-no-future/'>(Continue reading...)</a></p>]]></description>
			<content:encoded><![CDATA[
<p><span class="drop">Y</span>esterday I came across this <a href="http://bueltge.de/wordpress-version-verschleiern-plugin/602/" target="_blank" class="liexternal">&#8220;Replace WP-Version&#8221;</a> WordPress plugin (<a href="http://translate.google.com/translate?sl=de&#038;tl=en&#038;u=http%3A%2F%2Fbueltge.de%2Fwordpress-version-verschleiern-plugin%2F602%2F" target="_blank" class="liexternal">english translation</a>), which tries to mangle or simply hide WordPress version declaration in feeds and web pages.</p>
<p>For example, such HTML is usually found in blog header:</p>
<pre class="brush: xml; gutter: false; light: true;">
&lt;meta name=&quot;generator&quot; content=&quot;WordPress 2.6.5&quot; /&gt;
</pre>
<p>Broadcasting version is generally believed to be a sore point in blog security &mdash; it invited crackers to determine easily which blog is exploitable, thus the existance of such plugins. It reminds me about a plugin I have written for myself before, for similar purpose. But on second thought, I didn&#8217;t publish and advertise it. Why?</p>
<h2>Version can be decided though other means</h2>
<p>Since recent WordPress releases (not very recent though), WordPress also emit versions in javascript links. Take my own blog for example:</p>
<pre class="brush: xml; gutter: false; light: true;">
&lt;script type='text/javascript' src='http://me.abelcheung.org/wp-includes/js/prototype.js?ver=1.6'&gt;&lt;/script&gt;
&lt;script type='text/javascript' src='http://me.abelcheung.org/wp-includes/js/scriptaculous/wp-scriptaculous.js?ver=1.8.0'&gt;&lt;/script&gt;
&lt;script type='text/javascript' src='http://me.abelcheung.org/wp-includes/js/scriptaculous/effects.js?ver=1.8.0'&gt;&lt;/script&gt;
&lt;script type='text/javascript' src='http://me.abelcheung.org/wp-includes/js/jquery/jquery.js?ver=1.2.6'&gt;&lt;/script&gt;
</pre>
<p>With javascript versioning, WordPress version can be approximately determined. Even worse, these declarations can&#8217;t be disabled. That means just hiding WordPress version is not effective anymore, regardless of other reasons.</p>
<h2>Exploits are generic enough to ignore any versioning</h2>
<p>While WordPress fanboys are <em><strong>retarded</strong></em> enough to declare any security measure as &#8220;obscurity&#8221;, this one is probably right. Version hiding is very likely defenceless against most exploits, which simply tries every possible attack method. This renders version hiding pointless.</p>
<h2>It affects functionality of other plugins</h2>
<p>Some other plugins do check WordPress version in order to behave differently. Take a look at the <a href="http://blogsecurity.net/wordpress/bs-wp-noversion#comment-6238" target="_blank" class="liexternal">comment</a> of bs-wp-noversion plugin (which is yet another version hiding plugin). WordPress rendered broken is a possibility if version is changed or hidden.</p>
]]></content:encoded>
			<wfw:commentRss>http://me.abelcheung.org/2009/07/12/hiding-wordpress-version-has-no-future/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>ssh 伺服器強化</title>
		<link>http://me.abelcheung.org/2009/06/25/ssh-%e4%bc%ba%e6%9c%8d%e5%99%a8%e5%bc%b7%e5%8c%96/</link>
		<comments>http://me.abelcheung.org/2009/06/25/ssh-%e4%bc%ba%e6%9c%8d%e5%99%a8%e5%bc%b7%e5%8c%96/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 17:48:10 +0000</pubDate>
		<dc:creator>Abel</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[security tools]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://me.abelcheung.org/?p=710</guid>
		<description><![CDATA[針對蠕蟲
任何有<strong>用心</strong>管理伺服器的管理員都會清楚，ssh 伺服器長年累月都會被全世界千千萬萬電腦使用不同的使用者名稱 / 密碼組合，不斷嘗試進入。如果沒有收緊密碼的品質，很易就被人在伺服器內玩個天翻地覆，不亦樂乎。固然制止的方法非常多，就好像我自己，以往是使用 <a href="http://deny[......]<p class='read-more'><a href='http://me.abelcheung.org/2009/06/25/ssh-%e4%bc%ba%e6%9c%8d%e5%99%a8%e5%bc%b7%e5%8c%96/'>(Continue reading...)</a></p>]]></description>
			<content:encoded><![CDATA[<h3>針對蠕蟲</h3>
<p><span class="drop">任</span>何有<strong>用心</strong>管理伺服器的管理員都會清楚，<abbr title="Secure Shell">ssh</abbr> 伺服器長年累月都會被全世界千千萬萬電腦使用不同的使用者名稱 / 密碼組合，不斷嘗試進入。如果沒有收緊密碼的品質，很易就被人在伺服器內玩個天翻地覆，不亦樂乎。固然制止的方法非常多，就好像我自己，以往是使用 <a href="http://denyhosts.sourceforge.net/" target="_blank" class="liexternal">denyhosts</a> 的；但最簡單又有效，應該是更改 port number。因為絕大多數蠕蟲其實都笨得要死，試名稱和密碼，往往只會找 port 22 來不斷試，只要改了 port，立即一片安寧。</p>
<p>不過改了 port，以後使用時是否每次都要用 <code class="cmd">ssh&nbsp;-p&nbsp;1234567</code> 那麼麻煩？其實不用那麼煩，只要改一下設定，以後就可一勞永逸。假設需要經常進入兩部不同的伺服器，一個 ssh 用 port 1234，另一個用 port 34567，可以在 <code>~/.ssh/config</code> 內加入：</p>
<pre class="brush: plain; light: true;">
Host myhost1
  Hostname blah.myexample.com
  Port 1234

Host myhost2
  Hostname foobar.example12345.info
  Port 34567
</pre>
<p>以後用 Linux / Unix 進入兩部主機只需要用 <code class="cmd">ssh&nbsp;myhost1</code> 和 <code class="cmd">ssh&nbsp;myhost2</code> 就可以，不用記 port。至於 Windows，雖然每個 ssh 程式 (例如 <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/" target="_blank" class="liexternal">putty</a>) 的設定介面有所不同，但都很輕易就可以改 port。而且這個方法連帶所有依賴 ssh 的服務都一併搞定，例如 <a href="http://subversion.tigris.org/" target="_blank" class="liexternal">subversion</a> 配合 ssh (svn+ssh://)，就不需要好像 subversion 手冊所教那樣用些<a href="http://svnbook.red-bean.com/en/1.0/ch06s03.html#svn-ch-6-sect-3.3" target="_blank" class="liexternal">又煩又容易忘記的途徑</a>處理。</p>
<h3>應付有心人</h3>
<p>對於人就沒有那麼輕鬆，很大程度上是因為可以進行 port scan，找出更改到哪個 port，然後繼續測試。規避一些 port scanner 經常掃描的 port，特別是 <a href="http://nmap.org/" target="_blank" class="liexternal">nmap</a>，是可以騙倒一些大笨蛋，但醒目一點的，即使是用防火牆防備 port scan，也只是權宜之計，花多點時間和耐性始終是找得出用哪個 port 的。<a href="http://en.wikipedia.org/wiki/Port_knocking" target="_blank" rel="nofollow" class="liwikipedia">port knocking</a> 好像未有足夠大眾認知， 而且老實說，我對它還是有點戒心。(如果它忽然發傻，那我以後要怎樣進入伺服器？) 所以，到最後加強密碼的質素始終是不二法門。</p>
<p>另外有個稍為麻煩的方法可以採用，就是用防火牆限定某些 IP range 才可進入，像自己用的 ISP、工作地點等等，不過這個 range 不可謂不大，為了它可能要加數十條規則也說不定，不容易做。</p>
<p>世上任何一部伺服器，只要連上互聯網，就有可能被攻擊，除非像人們所說般，關掉伺服器，鎖進夾萬，那才是最安全的。同時，這世上也從未出現過萬能的防御 (有的話，發明的人或許是這世上最有錢的人了)，暫時唯有 <a href="http://en.wikipedia.org/wiki/Defense_in_Depth_(computing)" target="_blank" rel="nofollow" class="liwikipedia">defence in depth</a>，將各式有用的防御組合起來，才是王道。就目前來看，改 port 加上防火牆是最節省資源的方式，雖然不表示防火牆容易設定。為節省腦汁，我嘗試過將<a href="http://me.abelcheung.org/2006/06/06/get-hong-kong-ip-addresses/" class="liinternal">全香港的 IP range</a> 都加入防火牆。能夠阻擋所有外國的攻擊已算不錯，但那些規則足足有數百條之譜！</p>
<p><small>2009-08-07: <a href="http://svn.haxx.se/tsvnusers/archive-2007-01/0272.shtml" target="_blank" class="liexternal">這篇 mailing list 的回應</a>提供了方法令在 Windows 之下用各種 subversion client 都可以接受 22 以外的 port。</small></p>
]]></content:encoded>
			<wfw:commentRss>http://me.abelcheung.org/2009/06/25/ssh-%e4%bc%ba%e6%9c%8d%e5%99%a8%e5%bc%b7%e5%8c%96/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Interesting Regular Expression Quiz</title>
		<link>http://me.abelcheung.org/2009/06/06/interesting-regular-expression-quiz/</link>
		<comments>http://me.abelcheung.org/2009/06/06/interesting-regular-expression-quiz/#comments</comments>
		<pubDate>Sat, 06 Jun 2009 14:46:03 +0000</pubDate>
		<dc:creator>Abel</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[regular expression]]></category>

		<guid isPermaLink="false">http://me.abelcheung.org/?p=709</guid>
		<description><![CDATA[This is solved. Actually quite a few people immediately figured it out in Twitter and Plurk etc.
Something is very wrong here. What happened? Is <code>sed</code> b[......]<p class='read-more'><a href='http://me.abelcheung.org/2009/06/06/interesting-regular-expression-quiz/'>(Continue reading...)</a></p>]]></description>
			<content:encoded><![CDATA[<div class="notification">This is solved. Actually quite a few people immediately figured it out in Twitter and Plurk etc.</div>
<p><span class="drop">S</span>omething is very wrong here. What happened? Is <code>sed</code> buggy?</p>
<p><br clear="all" /></p>
<pre class="brush: plain; highlight: [7,8,9]; light: true;">
$ cat xxx.csv
113.941112252,22.2889218875
113.941063733,22.288921817
113.941160771,22.2889219579

$ sed 's/,/e,/; s/$/n/' xxx.csv
n13.941112252e,22.2889218875
n13.941063733e,22.288921817
n13.941160771e,22.2889219579
</pre>
<p>If nobody can solve this mystery in this weekend, one more hint will be provided in the coming Tuesday.</p>
]]></content:encoded>
			<wfw:commentRss>http://me.abelcheung.org/2009/06/06/interesting-regular-expression-quiz/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>投訴 Google Maps 的人真不該</title>
		<link>http://me.abelcheung.org/2009/06/04/%e6%8a%95%e8%a8%b4-google-maps-%e7%9a%84%e4%ba%ba%e7%9c%9f%e4%b8%8d%e8%a9%b2/</link>
		<comments>http://me.abelcheung.org/2009/06/04/%e6%8a%95%e8%a8%b4-google-maps-%e7%9a%84%e4%ba%ba%e7%9c%9f%e4%b8%8d%e8%a9%b2/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 06:16:21 +0000</pubDate>
		<dc:creator>Abel</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Yahoo]]></category>

		<guid isPermaLink="false">http://me.abelcheung.org/?p=704</guid>
		<description><![CDATA[<p><span class="drop">一</span>直以來在網上都見到不少人投訴香港 <a href="http://maps.google.com/" target="_blank" class="liexternal">Google Maps</a> 的更新有多慢，資料如何不準確，這些人一定是未用過 <a href="http://maps.yahoo.com/" target="_blank" class="liexternal">Yahoo 那個地圖</a>。如果︰</p>
<p>[......]</p><p class='read-more'><a href='http://me.abelcheung.org/2009/06/04/%e6%8a%95%e8%a8%b4-google-maps-%e7%9a%84%e4%ba%ba%e7%9c%9f%e4%b8%8d%e8%a9%b2/'>(Continue reading...)</a></p>]]></description>
			<content:encoded><![CDATA[<p><span class="drop">一</span>直以來在網上都見到不少人投訴香港 <a href="http://maps.google.com/" target="_blank" class="liexternal">Google Maps</a> 的更新有多慢，資料如何不準確，這些人一定是未用過 <a href="http://maps.yahoo.com/" target="_blank" class="liexternal">Yahoo 那個地圖</a>。如果︰</p>
<p><span id="more-704"></span></p>
<p>中環渡輪碼頭外的是南中國海；</p>
<p><img src="http://me.abelcheung.org/wp-content/uploads/2009/06/yahoomap1.png" alt="Yahoo map, 中環渡輪碼頭" title="Yahoo map, 中環渡輪碼頭" width="461" height="350" class="alignnone size-full wp-image-705" /></p>
<p>九龍和香港之間一條隧道都沒有；</p>
<p><img src="http://me.abelcheung.org/wp-content/uploads/2009/06/yahoomap2.png" alt="Yahoo map, 維多利亞港" title="Yahoo map, 維多利亞港" width="434" height="318" class="alignnone size-full wp-image-706" /></p>
<p>彌敦道和旁邊的橫街是對等的存在；</p>
<p><img src="http://me.abelcheung.org/wp-content/uploads/2009/06/yahoomap3.png" alt="Yahoo map, 彌敦道" title="Yahoo map, 彌敦道" width="290" height="346" class="alignnone size-full wp-image-707" /></p>
<p>香港從來沒有一間稱為「城市大學」的建築；</p>
<p><img src="http://me.abelcheung.org/wp-content/uploads/2009/06/yahoomap4.png" alt="Yahoo map, 九龍塘站" title="Yahoo map, 九龍塘站" width="339" height="316" class="alignnone size-full wp-image-708" /></p>
<p>那麼還會不會這麼憤憤不平？就算要指出 Google Maps 的錯處，也不會像是 Google 負了大眾一樣的態度吧？固然 Google Maps 還有許多有待改善的地方，但它已經是全港僅有的兩個值得改善的地圖之一 (另一個要算是<a href="http://www.centamap.com/" target="_blank" class="liexternal">中原地圖</a>)。真是身在福中不知福！</p>
]]></content:encoded>
			<wfw:commentRss>http://me.abelcheung.org/2009/06/04/%e6%8a%95%e8%a8%b4-google-maps-%e7%9a%84%e4%ba%ba%e7%9c%9f%e4%b8%8d%e8%a9%b2/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
