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

<channel>
	<title>Huy Zing &#187; censorship</title>
	<atom:link href="http://huyzing.com/tag/censorship/feed/" rel="self" type="application/rss+xml" />
	<link>http://huyzing.com</link>
	<description></description>
	<lastBuildDate>Fri, 04 Dec 2009 06:23:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Auto Draft</title>
		<link>http://huyzing.com/?p=239</link>
		<comments>http://huyzing.com/?p=239#comments</comments>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<dc:creator>huy</dc:creator>
		
		<guid isPermaLink="false">http://huyzing.com/?p=239</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[]]></content:encoded>
			<wfw:commentRss>http://huyzing.com/?p=239/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Auto Draft</title>
		<link>http://huyzing.com/2011/06/02/237-revision/</link>
		<comments>http://huyzing.com/2011/06/02/237-revision/#comments</comments>
		<pubDate>Thu, 02 Jun 2011 13:05:45 +0000</pubDate>
		<dc:creator>huy</dc:creator>
		
		<guid isPermaLink="false">http://huyzing.com/2011/06/02/237-revision/</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[]]></content:encoded>
			<wfw:commentRss>http://huyzing.com/2011/06/02/237-revision/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Auto Draft</title>
		<link>http://huyzing.com/?p=236</link>
		<comments>http://huyzing.com/?p=236#comments</comments>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<dc:creator>huy</dc:creator>
		
		<guid isPermaLink="false">http://huyzing.com/?p=236</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[]]></content:encoded>
			<wfw:commentRss>http://huyzing.com/?p=236/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Auto Draft</title>
		<link>http://huyzing.com/?p=230</link>
		<comments>http://huyzing.com/?p=230#comments</comments>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<dc:creator>huy</dc:creator>
		
		<guid isPermaLink="false">http://huyzing.com/?p=230</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[]]></content:encoded>
			<wfw:commentRss>http://huyzing.com/?p=230/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Auto Draft</title>
		<link>http://huyzing.com/?p=229</link>
		<comments>http://huyzing.com/?p=229#comments</comments>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<dc:creator>huy</dc:creator>
		
		<guid isPermaLink="false">http://huyzing.com/?p=229</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[]]></content:encoded>
			<wfw:commentRss>http://huyzing.com/?p=229/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Auto Draft</title>
		<link>http://huyzing.com/?p=228</link>
		<comments>http://huyzing.com/?p=228#comments</comments>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<guid isPermaLink="false">http://huyzing.com/?p=228</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[]]></content:encoded>
			<wfw:commentRss>http://huyzing.com/?p=228/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Auto Draft</title>
		<link>http://huyzing.com/?p=227</link>
		<comments>http://huyzing.com/?p=227#comments</comments>
		<pubDate>Tue, 24 May 2011 14:25:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<guid isPermaLink="false">http://huyzing.com/2011/05/24/226-revision/</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[]]></content:encoded>
			<wfw:commentRss>http://huyzing.com/?p=227/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FAQ on Vietnam block of Facebook</title>
		<link>http://huyzing.com/2009/11/17/faq-on-vietnam-block-of-facebook/</link>
		<comments>http://huyzing.com/2009/11/17/faq-on-vietnam-block-of-facebook/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 08:16:21 +0000</pubDate>
		<dc:creator>huy</dc:creator>
				<category><![CDATA[Geek]]></category>
		<category><![CDATA[Vietnam]]></category>
		<category><![CDATA[censorship]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[syn-fbz]]></category>
		<category><![CDATA[syn-linkedin]]></category>

		<guid isPermaLink="false">http://huyzing.com/?p=183</guid>
		<description><![CDATA[Update Dec. 4, 2009: added Google public DNS servers. There is a lot of confusion about whether Facebook is in the process of being blocked right now. Here are my thoughts to try to clear up some of the misconceptions. In short, these are my claims: Yes, Facebook is being blocked by the internet service [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update Dec. 4, 2009</strong>: added Google public DNS servers.</p>
<p>There is a lot of confusion about whether <a href="http://en.wikipedia.org/wiki/Facebook">Facebook</a> is in the process of being blocked right now.  Here are my thoughts to try to clear up some of the misconceptions.</p>
<p>In short, these are my claims:  Yes, Facebook is being blocked by the internet service providers in Vietnam because of the authorities.  Yes, there are workarounds in order to access Facebook. No, that&#8217;s not enough.  Yes, this totally blows.</p>
<h3>What access problems is Facebook experiencing in Ho Chi Minh City recently?</h3>
<p>As <a href="http://en.wikipedia.org/w/index.php?title=Internet_censorship_in_Vietnam&amp;oldid=326301995#Social_networking">stated on wikipedia</a>:</p>
<blockquote><p>Starting around November 4, 2009, the major Internet Service Providers (ISPs) SCTV/VDC and Viettel blocked access to Facebook by removing www.facebook.com and apps.facebook.com from their DNS service for a time ranging from a few hours to a few days. Another major ISP FPT followed suit for a few hours on November 10, 2009. Rumors have designated these as tests in anticipation of an official censorship decree. Starting on November 16, 2009,FPT, Viettel, SCTV/VDC, and EVN all started blocking DNS requests for Facebook, in what many people believe to be a permanent ban.</p></blockquote>
<h3>How is this evidence of an official block and not just an accident or glitch?</h3>
<p>The ongoing Facebook block is not an accident. It is not due to technical unreliability. It is a surgical strike on the each of the major Internet Service Providers&#8217; (ISPs&#8217;) DNS service (which is a service to translate www.facebook.com and apps.facebook.com into addresses that computers can understand, e.g. 69.63.184.31).</p>
<p>The recent access problems are akin to having the Yellow Pages all of a sudden missing the entries for Highlands Coffee. It&#8217;s not as if someone spilled food all over your Yellow Pages and you have trouble reading it. The rest of your Yellow Pages is completely fine but suspiciously missing 2 major entries.  Moreover, there isn&#8217;t just one set of Yellow Pages. FPT, SCTV, Viettel all have their own Yellow Pages books and each of them are missing the same 2 entries.</p>
<p>The odds of the DNS omission being due to accident are thus close to nil. All this adds up to evidence of deliberate action.</p>
<h3>What other evidence is there of an impending official block?</h3>
<p>The actions from the ISPs speak for themselves, but there is no known concrete proof of an official decree to block Facebook yet.</p>
<p>A <a href="http://www.ireport.com/docs/DOC-328851">supposedly-official decree</a> demanding that the ISPs block Facebook was earlier leaked on the internet in September 2009, but its authenticity has not been confirmed.  There is a version of this <a href="http://img40.imageshack.us/img40/8764/daunay.jpg">document with a stamp and signature from a hospital</a>, but this version can be ignored as it has clearly been doctored (look at the bottom line where letters are chopped off, right where the original version of the decree is cut off).</p>
<p>A commercial customer of FPT talked to representatives who have unofficially stated that there is a pending decree banning Facebook which has not yet been publicly released.</p>
<h3>Why do you think it&#8217;s being blocked if some of my friends can still access Facebook?</h3>
<p>We are hearing reports that some people can still access Facebook, e.g. at universities like RMIT.</p>
<p>A block does not have to be complete to be real. And in any case, as I explain below, a partial block is all that&#8217;s needed to kill off the widespread use of Facebook.</p>
<h3>Why not just wait until there is an official decree instead of going nuts over this?</h3>
<p>An official decree may never become public.</p>
<p>And for some of us, waiting is not an option.  We need to anticipate whether we can rely on Facebook to communicate with groups or promote events in the future.  Any downtime affects the effectiveness of online marketing initiatives, organizational efforts, let alone being able to keep up with friends and family.</p>
<h3>What are motives for a Facebook block?</h3>
<p>As everyone can guess, political censorship and control.  But also, there are rumors that local competitors may be using their government connections to shut out the mighty giant Facebook.</p>
<h3>Are there workarounds to access Facebook?</h3>
<p>Yes, right now, you can use either of these workarounds:</p>
<ul style="list-style-type: disc;">
<li>Use the limited functionality of <a href="http://lite.facebook.com/">http://lite.facebook.com/</a>, which has not been blocked.</li>
<li>Configure your computer or router to use Google Public DNS or OpenDNS instead of your ISP&#8217;s default DNS service.
<ul style="list-style-type: circle;">
<li>Here are instructions on <a href="https://store.opendns.com/setup/">how to set up OpenDNS</a></li>
<li>Here are instructions on <a href="http://code.google.com/speed/public-dns/docs/using.html">how to set up Google Public DNS</a></li>
</ul>
</li>
<li>Hard-code some IP addresses for Facebook servers.
<ul style="list-style-type: circle;">
<li>Here are instructions on <a href="http://www.brangle.com/wordpress/2009/08/add-or-map-custom-hostnames-to-ip-address-without-dns-server/">how to edit a hosts file</a></li>
<li>Here are some example entries for <a href="http://armabloggin.com/2009/07/facebook-dns-block-fix/">IP addresses for Facebook</a>, but replace 69.63.178.11 with the newer 69.63.181.15
<ul style="list-style-type: hyphen;">
<li>Unfortunately, these IP addresses may be changed by Facebook in the future.</li>
</ul>
</li>
</ul>
</li>
<li>Use some of the freely available web proxies
<ul style="list-style-type: circle;">
<li>You can <a href="http://www.google.com/search?q=free+facebook+proxy">google for some of the free web proxies</a></li>
</ul>
</li>
<li>If you have access to a server overseas, you can use VPN or set up your own SOCKS proxy using ssh tunneling.
<ul style="list-style-type: circle;">
<li>Since this is for advanced computer users, I&#8217;m sure you can figure it out yourself</li>
</ul>
</li>
</ul>
<p>Of course, these workarounds may stop working in the future if the authorities or the ISPs want to tighten their block.  But there is a reasonable chance that they won&#8217;t go that far, for reasons I discuss below.</p>
<h3>Why aren&#8217;t they blocking the workarounds?</h3>
<p>Blocking some of the above workarounds is easier than others.  Certainly, throwing lite.facebook.com in with the rest would be simple.  But what about blocking OpenDNS or blocking Facebook by IP address?</p>
<p>It&#8217;s easier, quicker, and cheaper to block Facebook by DNS than to block Facebook or OpenDNS by IP address.  First, DNS requests are much less frequent than web content requests by nature of the data.  Second, DNS requests are cached at many different levels making them even less frequent.  Third, there are much fewer DNS entries for Facebook than there are IP addresses for Facebook to block.  Not only are there <a href="http://armabloggin.com/2009/07/facebook-dns-block-fix/">many Facebook domain names</a>, but each domain name such as www.facebook.com can actually map to hundreds of ever-changing servers around the world, which is a technique that big web sites use to distribute traffic and keep things going fast.</p>
<p>IP filtering could slow down internet traffic in Vietnam, which is not the case for DNS filtering.  It&#8217;s reasonable that ISPs would try to discourage IP blocks.</p>
<p>As for web proxies, there are just so many out there it would take quite a while.  And if you have your own proxy that you can VPN or ssh to, then that&#8217;s effectively impossible to block.</p>
<p>It&#8217;s still conceivable that the workarounds will stop working, but it will take some time.</p>
<h3>If there are workarounds, why worry?</h3>
<p>The workarounds I listed above, e.g. OpenDNS and proxies, help but only a little. Blocking a social network is not like blocking YouTube or some anti-government complaint website. We generally don&#8217;t get on Facebook just to access titillating information. We are on Facebook to connect with one another. As <a href="http://en.wikipedia.org/wiki/Metcalfe%27s_law">Metcalfe&#8217;s Law</a> states, &#8220;the value of a telecommunications network is proportional to the square of the number of connected users of the system.&#8221;</p>
<p>In order for a social network to have all its promised value, you need a majority of your friends and community on it, not only you. In order to effectively promote an event on Facebook, you need most of your audience on it. If you can&#8217;t ensure that everyone in your community, whether it&#8217;s locals or expats, can get on easily, then your community will eventually die off. Proxies and OpenDNS are not well known and not easy to use.  If 80% of your community don&#8217;t know how to use them and cannot access Facebook even if you can, you could still have lost 99% of the value of the social network.</p>
<p>And because of these <a href="http://en.wikipedia.org/wiki/Network_effect">network effects</a>, Facebook will get fewer and fewer users logging on, even if they know how to use workarounds.  Eventually, you may be all alone, and how fun is that?  In China, the number of Facebook users <a href="http://blogs.wsj.com/digits/2009/10/26/chinas-facebook-few-14000-and-falling/">dropped from a million to 14,000</a> in 3 months because of their ban.</p>
<p>So while DNS blocking is not effective in completely censoring information or censoring sites like YouTube, DNS blocking is highly effective in simply destroying the value of a social network like Facebook.</p>
<p>On the bright side, after Facebook gets so much less usage from Vietnam, there may not even be interest from the authorities to tighten their ban, which means workarounds would continue to work.  This may be a sufficient situation for those of us who are still interested in staying in touch with overseas communities.</p>
<h3>So what can we do?</h3>
<p>Well, as we all know, there is no comparable web site out there with the same functionality and power as Facebook. Most likely, local Vietnamese will go to a number of local Vietnamese-language competitors.</p>
<p>And expats may choose to go back to the inferior <a href="http://hi5.com/">Hi5</a>, <a href="http://orkut.com/">Orkut</a>, or god-forbid <a href="http://myspace.com/">MySpace</a>.  But I&#8217;m hoping that all expats in VN learn to use the access workarounds in order to maintain the value of the Facebook network.</p>
<h3>Where can we find more information?</h3>
<p>Here&#8217;s an AP story &#8220;<a href="http://news.aol.com/article/vietnam-internet-users-fear-facebook/770051">Vietnam Internet users fear Facebook blackout</a>&#8220;.</p>
<p>Lonely Planet has some interesting <a href="http://www.lonelyplanet.com/thorntree/message.jspa?messageID=16447787">backstory regarding software licenses</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://huyzing.com/2009/11/17/faq-on-vietnam-block-of-facebook/feed/</wfw:commentRss>
		<slash:comments>98</slash:comments>
		</item>
		<item>
		<title>iPhone SDK time bug for international users</title>
		<link>http://huyzing.com/2009/09/26/iphone-sdk-time-bug-for-international-users/</link>
		<comments>http://huyzing.com/2009/09/26/iphone-sdk-time-bug-for-international-users/#comments</comments>
		<pubDate>Sun, 27 Sep 2009 07:00:39 +0000</pubDate>
		<dc:creator>huy</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[from-MultiNC]]></category>

		<guid isPermaLink="false">http://multinc.com/?p=183</guid>
		<description><![CDATA[If your application is acting strange when your users are switching between 12-hour and 24-hour mode in their iPhone settings, you may be experiencing the same thing we are: an NSDateFormatter bug in the iPhone SDK 3.1 (or earlier).
MultiNC develops iPhone applications for a number of global markets, and sometimes we run into bugs unique [...]]]></description>
			<content:encoded><![CDATA[<p>If your application is acting strange when your users are switching between 12-hour and 24-hour mode in their iPhone settings, you may be experiencing the same thing we are: an NSDateFormatter bug in the iPhone SDK 3.1 (or earlier).</p>
<p>MultiNC develops iPhone applications for a number of global markets, and sometimes we run into bugs unique to globalized applications.  One application that we&#8217;re developing has France as primary market.  U.S. users very rarely change their settings from the usual 12-hour mode (AM/PM mode) to 24-hour mode.  However, in France it&#8217;s not rare for users to switch from the more common 24-hour mode to 12-hour mode.  And that&#8217;s when things start acting strange, even causing your application to crash.</p>
<p>Because of users&#8217; regional habits, developers of globalized applications are more likely to encounter this time bug than for US applications.</p>
<h2>Region format &amp; 24-hour mode setting</h2>
<p>First, a little background on the iPhone user interface.  When iPhone users change their region format between, say, &#8220;United States&#8221; and &#8220;France&#8221;, the users&#8217; &#8220;24-Hour Time&#8221; setting is automatically switched to the mode that is most prevalent in that region.  In France, that would set 24-Hour Time to &#8220;ON&#8221;, and in the U.S., that would set it to &#8220;OFF&#8221;.  The users can then manually override that setting and that&#8217;s where trouble starts.</p>
<h2>NSDateFormatter bug</h2>
<p>The pattern of this SDK bug was relatively tricky to determine because of the specific combination and sequence of user settings that would trigger it, but now it&#8217;s actually quite simple to explain.</p>
<p>The problem comes from NSDateFormatter somehow &#8220;getting stuck&#8221; in the 12 or 24-hour time mode that the user has manually selected.  So if a French user manually selects 12-hour mode,  and the application requested NSDateFormatter to output time with the 24-hour format &#8220;HHmm&#8221;, it would actually receive time in a 12-hour format, e.g. &#8220;01:00 PM&#8221;, as if the application had instead requested &#8220;hhmm aa&#8221;.  The reverse would happen if a US user manually selected 24-hour mode: outputting time with the 12-hour  format &#8220;hhmm aa&#8221; would actually get you time in the 24-hour format instead, e.g. &#8220;17:00&#8243;.</p>
<p>This bug turns especially nasty when your application is trying to parse time from a string, rather than outputing.  Similar to the above, the NSDateFormatter seems to be stuck in the time mode that the user has manually chosen and insists on reading time that way, regardless of the string format.  What you can end up with is an incomplete or invalid NSDate, which when later used can cause other parts of the application to crash, as the UIDatePicker did for us.</p>
<p>We are developing with the iPhone SDK version 3.1 beta, but we wouldn&#8217;t be surprised if it applied to all previous SDKs.</p>
<h2>Workaround</h2>
<p>Now that you know the source of the bug, a workaround is straightforward.  But to save you time until Apple fixes it, with our client <a href="http://www.fabernovel.com/">faberNovel</a>&#8217;s gracious permission, here&#8217;s our workaround when dealing in 24-hour time (dealing in 12-hour time would be very similar):</p>
<div class="wp_syntax">
<div class="code">
<pre class="objc" style="font-family:monospace;"><span style="color: #11740a; font-style: italic;">// Returns time string in 24-hour mode from the given NSDate</span>
<span style="color: #002200;">+</span><span style="color: #002200;">&#40;</span><span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>time24FromDate<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #400080;">NSDate</span> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>date withTimeZone<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #400080;">NSTimeZone</span> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>timeZone
<span style="color: #002200;">&#123;</span>
	<span style="color: #400080;">NSDateFormatter</span> <span style="color: #002200;">*</span>dateFormatter<span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSDateFormatter</span> alloc<span style="color: #002200;">&#93;</span> init<span style="color: #002200;">&#93;</span>;
	<span style="color: #002200;">&#91;</span>dateFormatter setDateFormat<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;HH:mm&quot;</span><span style="color: #002200;">&#93;</span>;
	<span style="color: #002200;">&#91;</span>dateFormatter setTimeZone<span style="color: #002200;">:</span>timeZone<span style="color: #002200;">&#93;</span>;
	<span style="color: #400080;">NSString</span><span style="color: #002200;">*</span> <span style="color: #a61390;">time</span> <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>dateFormatter stringFromDate<span style="color: #002200;">:</span>date<span style="color: #002200;">&#93;</span>;
	<span style="color: #002200;">&#91;</span>dateFormatter release<span style="color: #002200;">&#93;</span>;
&nbsp;
	<span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">time</span>.length &gt; <span style="color: #2400d9;">5</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span>
		<span style="color: #a61390;">NSRange</span> range;
		range.location <span style="color: #002200;">=</span> <span style="color: #2400d9;">3</span>;
		range.length <span style="color: #002200;">=</span> <span style="color: #2400d9;">2</span>;
		<span style="color: #a61390;">int</span> hour <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #a61390;">time</span> substringToIndex<span style="color: #002200;">:</span><span style="color: #2400d9;">2</span><span style="color: #002200;">&#93;</span> intValue<span style="color: #002200;">&#93;</span>;
		<span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>minute <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #a61390;">time</span> substringWithRange<span style="color: #002200;">:</span>range<span style="color: #002200;">&#93;</span>;
		range <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #a61390;">time</span> rangeOfString<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;AM&quot;</span><span style="color: #002200;">&#93;</span>;
		<span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span>range.length<span style="color: #002200;">==</span><span style="color: #2400d9;">0</span><span style="color: #002200;">&#41;</span>
			hour <span style="color: #002200;">+=</span> <span style="color: #2400d9;">12</span>;
		<span style="color: #a61390;">time</span> <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #400080;">NSString</span> stringWithFormat<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;%02d:%@&quot;</span>, hour, minute<span style="color: #002200;">&#93;</span>;
	<span style="color: #002200;">&#125;</span>
&nbsp;
	<span style="color: #a61390;">return</span> <span style="color: #a61390;">time</span>;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #11740a; font-style: italic;">// Returns a proper NSDate given a time string in 24-hour mode</span>
<span style="color: #002200;">+</span><span style="color: #002200;">&#40;</span><span style="color: #400080;">NSDate</span> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>dateFromTime24<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>time24String withTimeZone<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #400080;">NSTimeZone</span> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>timeZone
<span style="color: #002200;">&#123;</span>
	<span style="color: #a61390;">int</span> hour <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>time24String substringToIndex<span style="color: #002200;">:</span><span style="color: #2400d9;">2</span><span style="color: #002200;">&#93;</span> intValue<span style="color: #002200;">&#93;</span>;
	<span style="color: #a61390;">int</span> minute <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>time24String substringFromIndex<span style="color: #002200;">:</span><span style="color: #2400d9;">3</span><span style="color: #002200;">&#93;</span> intValue<span style="color: #002200;">&#93;</span>;
	<span style="color: #400080;">NSDateFormatter</span> <span style="color: #002200;">*</span>dateFormatter<span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSDateFormatter</span> alloc<span style="color: #002200;">&#93;</span> init<span style="color: #002200;">&#93;</span>;
	<span style="color: #002200;">&#91;</span>dateFormatter setTimeZone<span style="color: #002200;">:</span>timeZone<span style="color: #002200;">&#93;</span>;
&nbsp;
	<span style="color: #400080;">NSDate</span> <span style="color: #002200;">*</span>result;
	<span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span><span style="color: #002200;">&#91;</span>Util userSetTwelveHourMode<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span>
		<span style="color: #002200;">&#91;</span>dateFormatter setDateFormat<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;hh:mm aa&quot;</span><span style="color: #002200;">&#93;</span>;
		<span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span>hour &gt; <span style="color: #2400d9;">12</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span>
			result <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>dateFormatter dateFromString<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSString</span> stringWithFormat<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;%02d:%02d PM&quot;</span>, hour <span style="color: #002200;">-</span> <span style="color: #2400d9;">12</span>, minute<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;
		<span style="color: #002200;">&#125;</span> <span style="color: #a61390;">else</span> <span style="color: #002200;">&#123;</span>
			result <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>dateFormatter dateFromString<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSString</span> stringWithFormat<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;%02d:%02d AM&quot;</span>, hour, minute<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;
		<span style="color: #002200;">&#125;</span>
	<span style="color: #002200;">&#125;</span> <span style="color: #a61390;">else</span> <span style="color: #002200;">&#123;</span>
		<span style="color: #002200;">&#91;</span>dateFormatter setDateFormat<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;HH:mm&quot;</span><span style="color: #002200;">&#93;</span>;
		result <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>dateFormatter dateFromString<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSString</span> stringWithFormat<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;%02d:%02d&quot;</span>, hour, minute<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;
	<span style="color: #002200;">&#125;</span>
	<span style="color: #002200;">&#91;</span>dateFormatter release<span style="color: #002200;">&#93;</span>;
&nbsp;
	<span style="color: #a61390;">return</span> result;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #11740a; font-style: italic;">// Tests whether the user has set the 12-hour or 24-hour mode in their settings.</span>
<span style="color: #002200;">+</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">BOOL</span><span style="color: #002200;">&#41;</span>userSetTwelveHourMode
<span style="color: #002200;">&#123;</span>
	<span style="color: #400080;">NSDateFormatter</span> <span style="color: #002200;">*</span>testFormatter <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSDateFormatter</span> alloc<span style="color: #002200;">&#93;</span> init<span style="color: #002200;">&#93;</span>;
	<span style="color: #002200;">&#91;</span>testFormatter setTimeStyle<span style="color: #002200;">:</span>NSDateFormatterShortStyle<span style="color: #002200;">&#93;</span>;
	<span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>testTime <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>testFormatter stringFromDate<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSDate</span> date<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;
	<span style="color: #002200;">&#91;</span>testFormatter release<span style="color: #002200;">&#93;</span>;
	<span style="color: #a61390;">return</span> <span style="color: #002200;">&#91;</span>testTime hasSuffix<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;M&quot;</span><span style="color: #002200;">&#93;</span> || <span style="color: #002200;">&#91;</span>testTime hasSuffix<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;m&quot;</span><span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #11740a; font-style: italic;">// Converts a 24-hour time string to 12-hour time string</span>
<span style="color: #002200;">+</span><span style="color: #002200;">&#40;</span><span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>time12FromTime24<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>time24String
<span style="color: #002200;">&#123;</span>
	<span style="color: #400080;">NSDateFormatter</span> <span style="color: #002200;">*</span>testFormatter <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSDateFormatter</span> alloc<span style="color: #002200;">&#93;</span> init<span style="color: #002200;">&#93;</span>;
	<span style="color: #a61390;">int</span> hour <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>time24String substringToIndex<span style="color: #002200;">:</span><span style="color: #2400d9;">2</span><span style="color: #002200;">&#93;</span> intValue<span style="color: #002200;">&#93;</span>;
	<span style="color: #a61390;">int</span> minute <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>time24String substringFromIndex<span style="color: #002200;">:</span><span style="color: #2400d9;">3</span><span style="color: #002200;">&#93;</span> intValue<span style="color: #002200;">&#93;</span>;
&nbsp;
	<span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>result <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #400080;">NSString</span> stringWithFormat<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;%02d:%02d %@&quot;</span>, hour <span style="color: #002200;">%</span> <span style="color: #2400d9;">12</span>, minute, hour &gt; <span style="color: #2400d9;">12</span> ? <span style="color: #002200;">&#91;</span>testFormatter PMSymbol<span style="color: #002200;">&#93;</span> <span style="color: #002200;">:</span> <span style="color: #002200;">&#91;</span>testFormatter AMSymbol<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;
	<span style="color: #002200;">&#91;</span>testFormatter release<span style="color: #002200;">&#93;</span>;
	<span style="color: #a61390;">return</span> result;
<span style="color: #002200;">&#125;</span></pre>
</div>
</div>
<h3>References:</h3>
<ul>
<li>StackOverflow &#8211; <a href="http://stackoverflow.com/questions/143075/nsdateformatter-am-i-doing-something-wrong-or-is-this-a-bug">NSDateFormatter, am I doing something wrong or is this a bug?</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://huyzing.com/2009/09/26/iphone-sdk-time-bug-for-international-users/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Compatibility between the iPhone App Store and the LGPL</title>
		<link>http://huyzing.com/2009/08/24/compatibility-between-the-iphone-app-store-and-the-lgpl/</link>
		<comments>http://huyzing.com/2009/08/24/compatibility-between-the-iphone-app-store-and-the-lgpl/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 03:53:31 +0000</pubDate>
		<dc:creator>huy</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[App Store]]></category>
		<category><![CDATA[from-MultiNC]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iPhone dev]]></category>
		<category><![CDATA[LGPL]]></category>
		<category><![CDATA[licensing]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[syn-linkedin]]></category>

		<guid isPermaLink="false">http://multinc.com/?p=157</guid>
		<description><![CDATA[LGPL Conditions
If you&#8217;re developing an iPhone application that you intend to submit to Apple&#8217;s App Store and you want to make use of a third-party&#8217;s software library that happens to be licensed under the LGPL, you have a couple of choices according to the license requirements:

You open-source your app.  Specifically, you provide to your users [...]]]></description>
			<content:encoded><![CDATA[<h2>LGPL Conditions</h2>
If you're developing an iPhone application that you intend to submit to Apple's App Store and you want to make use of a third-party's software library that happens to be licensed under the <a href="http://www.gnu.org/licenses/lgpl.html">GNU Lesser General Public License (LGPL)</a>, you have a couple of choices according to the license requirements:
<ul>
	<li>You can open-source your app.  Specifically, you provide to your users the source code of your entire application under the LGPL or GPL.  That means for example all the .h and .m files.</li>
	<li><em>You can keep your app closed-source, but you provide to your users all the object code</em> of your  application necessary to re-link your application.  That means for example all the .o and .a files.  Most people forget that this option is in fact available to iPhone app developers.</li>
</ul>
Of course, if you modify the library itself, you have to provide these code changes in source form either way.
<h2>Dynamic/Shared Library</h2>
The above LGPL conditions can be thought to apply to the case when the LGPL library is statically linked.
<div>
<pre><span> </span></pre>
</div>
But outside of the world of Apple's App Store, the LGPL would normally give you another way to use LGPL code without releasing the source code or object code for your application: compiling your application with a run-time shared library (hence, allowing users to run your application with an updated library if they choose to).  The problem for us is that the Apple iPhone developer agreement doesn't allow the bundling of shared libraries.
<div>
<pre><span> </span></pre>
</div>
If you don't care about the App Store and want to release/sell your application through Ad Hoc Distribution or to jailbroken devices (e.g. via <a href="http://cydia.saurik.com/">Cydia</a>), you can actually link apps with a run-time shared library and thus satisfy the LGPL without providing source code or object code.
<h2>Static Library Exception</h2>
Some library developers are aware of these iPhone and LGPL incompatibilities and provide a "static library exception," loosening LGPL requirements for the iPhone platform.  For example, the cocos2d author intended to <a href="http://cocos2d-iphone.googlecode.com/svn/trunk/LICENSE">offer such an exception</a>: even though he neglected to distinguish between the source code and object code requirements of the LGPL, it's fairly clear he intended to relieve the app developer from having to provide source <em>or</em> object code even if they linked in the LGPL library <em>statically</em>.
<div>
<pre><span> </span></pre>
</div>
It's a good idea for you to consider contacting the author of the LGPL library you're interested in to offer a similar exception for the iPhone.  That way you don't have to worry about having to provide object code for your app.
<h2>Spirit of the LGPL</h2>
Whether you decide to release the object code for your app or take advantage of a "static library exception," the spirit of the LGPL is violated by the iPhone restrictions: it becomes very difficult for your app user to customize your app with a modified or updated version of LGPL library.
<div>
<pre><span> </span></pre>
</div>
Let's say you do release all the object code and all the utilities that your app requires to build a new app based on an improved LGPL library.  How can your users install the new binary?  They are faced with the following unhappy options:
<ul>
	<li>Jailbreak their iPhone to install any binary that they want</li>
	<li>Join the iPhone Developer Program for $99 a year to be able to legally distribute "Ad Hoc" the new app to up to 100 devices.</li>
</ul>
In other words, you may end up spending a lot of time distributing object code to satisfy the LGPL and protect the source code of your app, but the object code is very unlikely to get used anyway.
<div>
<pre><span> </span></pre>
</div>
In fact, even if Apple allowed apps to link with dynamic shared libraries, how could users even substitute the libraries without jailbreaking their iPhone?
<h4>References:</h4>
<ul>
	<li><a href="http://www.gnu.org/licenses/lgpl.html">GNU Lesser General Public License</a>, particularly section 4.d)</li>
	<li><a href="http://stackoverflow.com/questions/459833/which-open-source-licenses-are-compatible-with-the-iphone-and-app-store/1321681#1321681">StackOverflow - Which open source licenses are compatible with the iPhone and App Store?</a></li>
	<li><a href="http://www.nabble.com/iphone,-and-releasing-object-code-satisfies-LGPL-Re:-Static-building-and-bundling-of-SDL.-td21907721.html">Nabble - iphone, and releasing object code satisfies LGPL Re: Static building and bundling of SDL.</a></li>
	<li><a href="http://www.nabble.com/iPhone-SDK-%3C-%3E-SDL-License-td19983219.html">Nabble - iPhone SDK &lt;-&gt; SDL License</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://huyzing.com/2009/08/24/compatibility-between-the-iphone-app-store-and-the-lgpl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Launching a VirtualBox VM from the OS X Dock</title>
		<link>http://huyzing.com/2009/08/23/launching-a-virtualbox-vm-from-the-os-x-dock/</link>
		<comments>http://huyzing.com/2009/08/23/launching-a-virtualbox-vm-from-the-os-x-dock/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 04:00:17 +0000</pubDate>
		<dc:creator>huy</dc:creator>
				<category><![CDATA[Geek]]></category>
		<category><![CDATA[Automator]]></category>
		<category><![CDATA[Dock]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[VirtualBox]]></category>

		<guid isPermaLink="false">http://huyzing.com/?p=125</guid>
		<description><![CDATA[Here's how to use Automator to launch a specific VirtualBox virtual machine directly from the OS X Dock.  Optionally, copy the icon from an application to another.]]></description>
			<content:encoded><![CDATA[<p>I like to run Windows XP at all times in my OS X machine for access to essential software not available on the Mac, e.g.  the <a href="http://www.roboform.com/">Roboform</a> password manager and the <a href="http://www.babylon.com/">Babylon</a> dictionary and translation utility.  For that, I use Sun&#8217;s free <a href="http://www.virtualbox.org/">VirtualBox</a> virtualization product.</p>
<p>To quickly launch XP when I need it, I wanted a launch icon in my Dock.</p>
<p>To do that:</p>
<ol>
<li>First, know the name of the virtual machine you want to launch by invoking in Terminal:
<pre><a href="http://www.virtualbox.org/manual/UserManual.html#vboxmanage-list">VBoxManage list vms</a></pre>
</li>
<li>Run Automator, choose the &#8220;Run Shell Script&#8221; action, and type in the script:
<pre><a href="http://www.virtualbox.org/manual/UserManual.html#vboxmanage-startvm">VBoxManage startvm</a> "<em>THE_NAME_OF_VIRTUAL_MACHINE</em>"</pre>
<p><div id="attachment_126" class="wp-caption aligncenter" style="width: 583px"><img class="size-full wp-image-126" title="2009-08-24 Launching a VirtualBox VM from the OS X Dock - Automator Screenshot" src="http://huyzing.com/wp/wp-content/uploads/2009/08/2009-08-24-Launching-a-VirtualBox-VM-from-the-OS-X-Dock-Automator-Screenshot.png" alt="Creating a shell script in Automator" width="573" height="352" /><p class="wp-caption-text">Creating a shell script in Automator</p></div></li>
<li>Save the script into your /Applications folder (or create a /Applications/scripts folder for these kinds of scripts), e.g. as &#8220;Win XP VM&#8221;, making sure to save it as an &#8220;Application&#8221; instead of a &#8220;Workflow&#8221;.</li>
<li>Now find the script you just created in Finder and drag and drop it to the Dock.</li>
</ol>
<p>Optionally, you can change the icon of the application to be the same as VirtualBox (a downloaded XP icon would be even better):</p>
<ol>
<li> In Finder, select the VirtualBox application and press Command-I</li>
<li>Click the icon at the top-left and press Command-C to copy the icon</li>
<li>Now select the script that you created in Automator earlier and press Command-I</li>
<li>Click the icon at the top-left and press Command-V to replace the icon</li>
</ol>
<p>Sources:</p>
<ul>
<li><a href="http://stackoverflow.com/questions/281372/executing-shell-scripts-from-the-os-x-dock/281455#281455">StackOverflow: Executing Shell Scripts from the OS X Dock?</a></li>
<li><a href="http://www.virtualbox.org/manual/UserManual.html">Sun VirtualBox User Manual</a></li>
<li><a href="http://support.apple.com/kb/HT2493">Mac 101: Change Your Icons</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://huyzing.com/2009/08/23/launching-a-virtualbox-vm-from-the-os-x-dock/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>DiskAid – tool to transfer files to/from iPhone or iPod Touch</title>
		<link>http://huyzing.com/2009/05/18/diskaid-%e2%80%93-tool-to-transfer-files-tofrom-iphone-or-ipod-touch/</link>
		<comments>http://huyzing.com/2009/05/18/diskaid-%e2%80%93-tool-to-transfer-files-tofrom-iphone-or-ipod-touch/#comments</comments>
		<pubDate>Tue, 19 May 2009 03:31:32 +0000</pubDate>
		<dc:creator>huy</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[DiskAid]]></category>
		<category><![CDATA[from-MultiNC]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iPod Touch]]></category>

		<guid isPermaLink="false">http://multinc.com/?p=151</guid>
		<description><![CDATA[You can use the free DiskAid tool to transfer files between your computer and your iPhone or iPod Touch]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a useful and free tool for seeing the filesystem of your iPhone and iPod Touch once it&#8217;s connected to your PC or Mac via USB cable and transferring files: <a href="http://www.digidna.net/diskaid/">DiskAid</a></p>
<p>Before this will work, you may have to ensure the following:</p>
<p>In Windows, the &#8220;Apple Mobile Device&#8221; service must be running<br />
You should enter the Passcode on your iPhone or iPod Touch<br />
The device must be jailbroken if you want to see anything outside the Media folder, e.g. if you want to see the root folder.</p>
]]></content:encoded>
			<wfw:commentRss>http://huyzing.com/2009/05/18/diskaid-%e2%80%93-tool-to-transfer-files-tofrom-iphone-or-ipod-touch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;No to all&#8221; replace option during copying of files in Windows XP</title>
		<link>http://huyzing.com/2009/05/14/replace-option-no-to-all-during-copying-of-files-in-windows-xp/</link>
		<comments>http://huyzing.com/2009/05/14/replace-option-no-to-all-during-copying-of-files-in-windows-xp/#comments</comments>
		<pubDate>Thu, 14 May 2009 07:31:08 +0000</pubDate>
		<dc:creator>huy</dc:creator>
				<category><![CDATA[Geek]]></category>
		<category><![CDATA[undocumented]]></category>
		<category><![CDATA[Windows XP]]></category>

		<guid isPermaLink="false">http://huyzing.com/?p=89</guid>
		<description><![CDATA[In Windows XP, when faced with the Confirm File Replace dialog, you can choose "No to All" by holding the SHIFT key and clicking the "No" button]]></description>
			<content:encoded><![CDATA[<p>This is straight from the department of &#8220;I wish I had known this before so I wouldn&#8217;t have Carpal Tunnel Syndrome today.&#8221;</p>
<p>You know  how on Windows XP, you could copy a big directory tree from one directory/drive/machine and sometimes the copy doesn&#8217;t complete.  Maybe your Wi-Fi cut out during the large copy.  You&#8217;re left with the task of re-starting the entire copy operation.</p>
<p>Or perhaps you just want to do a copy of one set of files over another set of files but only care about creating new files, not updating changed files.</p>
<p><a href="http://lifehacker.com/379519/answer-no-to-all-when-copying-files"><img class="alignleft" title="Windows XP Confirm File Replace dialog" src="http://www.lifehacker.com/assets/resources/2008/04/no-to-all.png" alt="" width="275" height="212" /></a>Then you have surely faced the Confirm File Replace dialog numerous times because of all the existing files.  But are you going to click &#8220;No&#8221; every single motherf&#8217;in time?  In the past, I just clicked &#8220;Yes to all&#8221;&#8211;even if that was just a waste of the computer&#8217;s time, my own time wasn&#8217;t wasted and I could do something else like write poetry.</p>
<p>But actually, there is a hidden option &#8220;No to All&#8221;,  as explained by <a href="http://lifehacker.com/379519/answer-no-to-all-when-copying-files">LifeHacker</a>.  You just <strong>hold the SHIFT key and click the &#8220;No&#8221; button</strong> in the Confirm File Replace dialog.</p>
]]></content:encoded>
			<wfw:commentRss>http://huyzing.com/2009/05/14/replace-option-no-to-all-during-copying-of-files-in-windows-xp/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Upgrading Android Dev Phone to 1.5 (&#8220;cupcake&#8221;)</title>
		<link>http://huyzing.com/2009/05/09/updating-android-dev-phone-to-15/</link>
		<comments>http://huyzing.com/2009/05/09/updating-android-dev-phone-to-15/#comments</comments>
		<pubDate>Sat, 09 May 2009 19:44:02 +0000</pubDate>
		<dc:creator>huy</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[Geek]]></category>
		<category><![CDATA[Vietnam]]></category>
		<category><![CDATA[ADP1]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Cupcake]]></category>
		<category><![CDATA[G1]]></category>
		<category><![CDATA[GPhone]]></category>

		<guid isPermaLink="false">http://huyzing.com/?p=68</guid>
		<description><![CDATA[Ahead of the Android enthusiasts meeting in Saigon, I wanted to make sure that I didn&#8217;t show up with an embarrassingly-old 1.0 firmware on my Android Dev Phone.  Yeah, I haven&#8217;t done much beyond just use it as a regular user since I got it 4 months ago.  But no need to make it obvious [...]]]></description>
			<content:encoded><![CDATA[<p>Ahead of the <a href="http://www.tinhte.com/forum/showthread.php?t=196054">Android enthusiasts meeting</a> in Saigon, I wanted to make sure that I didn&#8217;t show up with an embarrassingly-old 1.0 firmware on my Android Dev Phone.  Yeah, I haven&#8217;t done much beyond just use it as a regular user since I got it 4 months ago.  But no need to make it obvious I&#8217;m an Android poseur.</p>
<p>So I needed to update to the latest firmware 1.5, a.k.a. &#8220;Cupcake&#8221;.</p>
<p>The <a href="http://www.htc.com/www/support/android/adp.html">official instructions </a>are at HTC Support but they were nicely <a href="http://cxu.yimudi.org/2009/04/28/android-upgrade-to-1.5.html">summarized</a> by some dude.  I&#8217;ve included his instructions with my changes in <span style="color: #ff0000;">red</span> (I didn&#8217;t get the minor problem he ran into):</p>
<blockquote>
<ol>
<li>From the <a href="http://www.htc.com/www/support/android/adp.html#s3">HTC support page</a>, download radio image <strong>ota-radio-2_22_19_26I.zip</strong> and recovery image <strong>signed-dream_devphone-ota-147201.zip</strong></li>
<li>make sure HTC Gphone is connected to your computer, and `adb devices` see your phone listed</li>
<li>adb push ota-radio-2_22_19_26I.zip /sdcard/update.zip</li>
<li>adb shell sync</li>
<li>shut down your GPhone. When preparing to restart, please press and hold &#8220;Home&#8221; then hit the Start (should be the same power off button aka the &#8220;Call End&#8221; button) button, waiting for the &#8220;!&#8221; icon to appear.</li>
<li>Press ALT + <span style="color: #ff0000;">l (this is a lowercase L, not a capital i or number 1)</span><span style="color: #ff0000;"> to display the console output</span></li>
<li>Press ALT + s  to install the update</li>
<li>Press HOME + BACK and write the install, and there will follow an automatic reboot</li>
<li>adb push signed-dream_devphone-ota-147201.zip /sdcard/update.zip</li>
<li>repeat 4 &#8211; 8</li>
</ol>
</blockquote>
<p>That worked pretty well, but it didn&#8217;t solve the syncing problem I&#8217;ve been having (my contacts having not been syncing to Google since I first got the phone.</p>
<p>Note that several applications have problems when upgrading from 1.0 to 1.5 and need to be updated, including ChompSMS, Power Manager, Toggle Settings, Task Manager for Root Users, System Monitor.</p>
<p>The new OS runs snappier, supports video recording mode and a on-screen soft keyboard, lists applications under Manage Applications much quicker.</p>
]]></content:encoded>
			<wfw:commentRss>http://huyzing.com/2009/05/09/updating-android-dev-phone-to-15/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SUMMARY: GTAC 2008 Keynote Address: The Future of Testing</title>
		<link>http://huyzing.com/2009/05/02/summary-gtac-2008-keynote-address-the-future-of-testing/</link>
		<comments>http://huyzing.com/2009/05/02/summary-gtac-2008-keynote-address-the-future-of-testing/#comments</comments>
		<pubDate>Sun, 03 May 2009 05:53:47 +0000</pubDate>
		<dc:creator>huy</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[GTAC]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://huyzing.com/wp/?p=18</guid>
		<description><![CDATA[The 2008 Google Test Automation Conference was keynoted by the entertaining speaker James Whittaker from Microsoft. Key takeaways from the Google Tech Talk video were: Insourcing → Outsourcing → Crowdsourcing →  Testsourcing Some companies are already doing crowdsourcing of testing: utest.com pays the internet community to find bugs in software. (Companies who want their products [...]]]></description>
			<content:encoded><![CDATA[<p>The 2008 Google Test Automation Conference was keynoted by the entertaining speaker <span>James Whittaker from Microsoft.</span></p>
<p><span>Key takeaways from the <a href="http://www.youtube.com/watch?v=Pug_5Tl2UxQ">Google Tech Talk video</a> were:</span></p>
<ul>
<li><span>Insourcing → Outsourcing </span><span>→ Crowdsourcing </span><span>→  <strong>Testsourcing</strong></span>
<ul>
<li><span>Some companies are already doing crowdsourcing of testing:</span>
<ul>
<li><a href="http://www.utest.com/">utest.com</a> pays the internet community to find bugs in software. (Companies who want their products tested credit their account with at least $2000, with which they pay for discovered bugs that they aprove.)</li>
</ul>
</li>
<li>The speaker believes that in the next phase of evolution, we&#8217;ll have &#8220;testsourcing&#8221; where vendors are providing tests themselves.</li>
</ul>
</li>
<li><span><strong>Virtualization</strong>:</span>
<ul>
<li><span>Virtual machines and their environments are going to be key for wrapping up and reproducing bugs as they happen.  They should run not only on testers&#8217; machines but also users&#8217; machines.</span></li>
<li><span>Market of the future: virtual test machines<br />
</span></li>
</ul>
</li>
<li><strong>Visualization</strong>:
<ul>
<li>Microsoft testers use a tool to visualize their codebase (see image below) and focus their testing
<ul>
<li><img class="size-full wp-image-20 alignnone" title="Microsoft's codebase visualization tool" src="http://huyzing.com/wp/wp-content/uploads/2009/05/msft-testing-snapshot.jpg" alt="Microsoft's codebase visualization tool" width="521" height="400" /></li>
<li>Size denotes lines of code</li>
<li>Darkness denotes complexity [can't hear what he mumbles there]</li>
<li>I wish I knew what this tool was</li>
</ul>
</li>
<li>Game testers use numerous GUI tools:
<ul>
<li>displays where they are in the application itself (in addition to the usual game screen) as they play the game</li>
<li>displays surrounding testable objects and allows them to teleport to them</li>
<li>displays objects that need to be tested because the code has changed</li>
<li>displays the degree of testing that has been done for each object</li>
</ul>
</li>
</ul>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://huyzing.com/2009/05/02/summary-gtac-2008-keynote-address-the-future-of-testing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SUMMARY: State of the Solid-State Drive world</title>
		<link>http://huyzing.com/2009/03/19/summary-state-of-the-solid-state-drive-world/</link>
		<comments>http://huyzing.com/2009/03/19/summary-state-of-the-solid-state-drive-world/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 16:13:41 +0000</pubDate>
		<dc:creator>huy</dc:creator>
				<category><![CDATA[Geek]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[SSD]]></category>

		<guid isPermaLink="false">http://huyzing.com/wp/?p=12</guid>
		<description><![CDATA[In a fit of flu-induced geekdom, I decided let myself read most of this mammoth 31-page AnandTech article, updating my quasi-nil knowledge about solid-state drives (SSD). Take-aways It was a damn long article so here are the key take-aways: SSDs are still maturing There are good and there are bad SSD drives. Flash memory in [...]]]></description>
			<content:encoded><![CDATA[<p>In a fit of flu-induced geekdom, I <span style="text-decoration: line-through;">decided</span> let myself read most of this mammoth 31-page <a href="http://www.anandtech.com/printarticle.aspx?i=3531">AnandTech article</a>, updating my quasi-nil knowledge about solid-state drives (SSD).</p>
<h2>Take-aways</h2>
<p>It was a damn long article so here are the key take-aways:</p>
<ul>
<li>SSDs are still maturing</li>
<li>There are good and there are bad SSD drives.</li>
<li>Flash memory in a standard SSD can be erased only about 10,000 times before it goes bad and stops storing data.</li>
<li>With SSDs, consumers expect low latency (good for booting and loading applications) rather than high bandwidth (good for storing lots of media files), something that some small manufacturers are only now starting to understand and optimize accordingly for.</li>
<li>As with hard-disk drives (HDD), write performance for SSDs degrades as the disk fills up, but for different reasons.  Because of the inherent need to sometimes erase and re-write large portions of data, an SSD will slow down over time.
<ul>
<li>You can &#8220;reset&#8221; most of the original performance of the SSD by doing what&#8217;s called a &#8220;secure erase&#8221; of the entire drive.  Not very convenient.</li>
<li>You can also avoid some of the long-term slow-down by partitioning your drive in such a way that it sacrifices some of the space.</li>
<li>Windows 7 will eventually support a TRIM command that can prolong but not perpetuate the time for performance to degrade.  However, this will require new SSD firmware, and thus potentially new SSD drives.  You may want to hold on before purchasing.</li>
</ul>
</li>
<li>Intel SSDs are producing the best and most expensive consumer SSDs, and today  OCZ may be ideal for the value consumer.</li>
</ul>
<h2>The power of online reviews</h2>
<p>Along with a recap of SSD peculiarities and performance comparisons of SSD drives now on the market, the article recounts how the author effectively forced a manufacturer (OCZ) to update its firmware to improve its latency even at the expense of more marketable bandwidth numbers.  This is  a good example of how one trusted popular online reviewer can have the power to not only make or break a product but sometimes have more say than a company&#8217;s engineering, marketing, and executive staff before the product even hits the market.</p>
]]></content:encoded>
			<wfw:commentRss>http://huyzing.com/2009/03/19/summary-state-of-the-solid-state-drive-world/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Developing iPhone Applications using Java may not be such a good idea</title>
		<link>http://huyzing.com/2009/03/19/developing-iphone-applications-using-java-may-not-be-such-a-good-idea/</link>
		<comments>http://huyzing.com/2009/03/19/developing-iphone-applications-using-java-may-not-be-such-a-good-idea/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 10:50:15 +0000</pubDate>
		<dc:creator>huy</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[from-MultiNC]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iPhone dev]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[XMLVM]]></category>

		<guid isPermaLink="false">http://multinc.com/wp/?p=131</guid>
		<description><![CDATA[Developing iPhone Applications without using Objective C
When the iPhone SDK came out in March 2008, mobile developers were very excited to be able to develop native applications for the increasingly popular device.  However, that excitement was partially tempered by some requirements of the platform, which for most meant learning how to program Objective C, a [...]]]></description>
			<content:encoded><![CDATA[<h2>Developing iPhone Applications without using Objective C</h2>
When the iPhone SDK came out in March 2008, mobile developers were very excited to be able to develop native applications for the increasingly popular device.  However, that excitement was partially tempered by some requirements of the platform, which for most meant learning how to program Objective C, a language that only Mac developers are familiar with.  Just as with iPod users, iPhone application developers do come from all walks of life–they’re not all Mac die-hards.
<div>
<pre><span> </span></pre>
</div>
As as result there have been several efforts to produce a framework or tool with which applications could be developed using more familiar languages. <a href="http://rhomobile.com/products/rhodes">Rhodes</a> does this for Ruby programmers. <a href="http://www.xmlvm.org/">XMLVM</a> does this for Java programmers.
<h2>XMLVM</h2>
I watched the <a href="http://www.youtube.com/watch?v=s8nMpi5-P-I">Google Tech Talk</a> about XMLVM, which goes into significant depth about the conversion process.  Essentially, the technology does cross-compilation from the compiled version of your Java application, in other words JVM bytecode instead of Java source code. Thus, the entire process of compiling an iPhone application would consist of Java source -&gt; JVM bytecode -&gt; Objective C source -&gt; native iPhone binary.  The speaker goes into detail with an example showing the conversion of JVM bytecode into Objective C source, which is easy to understand and can be educational.
<div><pre><span> </span></pre></div>
Opting for bytecode as source for XMLVM makes it easier to implement but produces bloated code.  Not only that, but the bytecode is converted not into native iPhone native code, but into Objective C source code.  Add to that that the conversion is done using XSLT, and you can guess how inefficient the process and the output will be.
<div><pre><span> </span></pre></div>
The speaker emphasizes that this is an academic project without abundant resources, with the implication that the code produced by this reference implementation is not expected to perform well for commercial purposes.  So while it’s interesting to see this idea in action, not even the speaker believes that this cross-compiler can be put to serious use yet, if ever.
<h3>Other languages for the XMLVM</h3>
Java is not the only source language that can benefit from XMLVM.  There is support for other input languages and output code.  See the <a href="http://www.xmlvm.org">website</a> for more information.
<h3>Enhancing the iPhone emulator with hardware data</h3>
One nice tool that the XMLVM team developed was a way to send device data to the desktop emulator, which naturally cannot emulate everything that the iPhone can do.  For example, you can use a real iPod Touch or iPhone to send accelerometer to the emulator.  The same could be envisioned for other functionality, e.g. GPS, light sensor, proximity sensor, etc.  I imagine this is so helpful for the development process that others must have implemented something like that as well.
<h2>Better to Develop in Objective-C</h2>
My opinion regarding these kinds of language-adapting frameworks or tools that allow developers to code in their familiar language is not very positive.  In general, I don’t think it’s a good idea to distance yourself from the target platform.  Problems include:
<ul>
	<li>Limited functionality</li>
	<li>Lower performance</li>
	<li>More complicated development process</li>
	<li>More source of bugs in your way (from not just the iPhone OS and SDK, but from the language adapter)</li>
	<li>Smaller community of developers, fewer development tools, less documentation</li>
</ul>
All these problems are multiplied when you’re dealing with a hot platform like the iPhone, where innovation comes fast along with bugs and the language adapter is always one or more steps behind on completeness, robustness, and performance optimization.  Do you really want to develop cool apps with only features that are “so last year”?  The fact that the iPhone platform and its evolution are so closed doesn’t help either.]]></content:encoded>
			<wfw:commentRss>http://huyzing.com/2009/03/19/developing-iphone-applications-using-java-may-not-be-such-a-good-idea/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>About Huy</title>
		<link>http://huyzing.com/about/</link>
		<comments>http://huyzing.com/about/#comments</comments>
		<pubDate>Thu, 02 Aug 2007 21:22:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[nothing clever to say, move along&#8230;]]></description>
			<content:encoded><![CDATA[<p>nothing clever to say, move along&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://huyzing.com/about/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

