<?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>Christian Schenk&#187; fun</title>
	<atom:link href="http://www.christianschenk.org/blog/tag/fun/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.christianschenk.org</link>
	<description>Writing about my experiences with technology and all different kinds of projects and experiments</description>
	<lastBuildDate>Sun, 29 Aug 2010 09:08:16 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to pretend having an iPhone</title>
		<link>http://www.christianschenk.org/blog/howto-pretend-having-iphone/</link>
		<comments>http://www.christianschenk.org/blog/howto-pretend-having-iphone/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 06:15:24 +0000</pubDate>
		<dc:creator>Christian Schenk</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[pretend]]></category>
		<category><![CDATA[satire]]></category>

		<guid isPermaLink="false">http://www.christianschenk.org/?p=753</guid>
		<description><![CDATA[Quite some years after the iPhone was introduced it still seems that everybody wants to have one to send email messages. But what if you just can&#8217;t afford it? In this short post I would like to show how to setup your email client so it looks like you were sending these messages from your [...]]]></description>
			<content:encoded><![CDATA[<p>Quite some years after the iPhone was introduced it still seems that everybody wants to have one to send email messages. But what if you just can&#8217;t afford it? In this short post I would like to show how to setup your email client so it looks like you were sending these messages from your shiny iPhone. It&#8217;s easy, quick and fun.</p>
<p><span id="more-753"></span></p>
<h2>How to</h2>
<p>We&#8217;ll change your email signature in a way that tells people the message was sent using an iPhone. It doesn&#8217;t matter which email client you&#8217;re using: while Apple Mail is great, using Outlook will be okay as well.</p>
<p>Open your email client&#8217;s configuration menu, find the part that lets you change your signature and enter the following text into the input field:</p>

<div class="wp_syntax"><div class="code"><pre class="plain" style="font-family:monospace;">Sent from my iPhone</pre></div></div>

<p>Click on save and make sure that the signature will be used when writing new emails or replying to the ones from your friends.</p>
<p>Although you don&#8217;t really have an iPhone everybody will be impressed that you sent him/her a message with your cool gadget.</p>
<h2>Conclusion</h2>
<p>Sure, if the one you&#8217;re sending an email is a geek I bet he&#8217;ll find out that you didn&#8217;t really send the message with an iPhone in no time. Nevertheless, most people won&#8217;t be able to notice this but just think that you&#8217;re the proud owner of an iPhone.</p>
<p>Next up:</p>
<ul>
<li>How to pretend having an iPad.</li>
<li>How to avoid meeting people in real life so they don&#8217;t notice that you haven&#8217;t really got Apple&#8217;s latest hardware.</li>
<li>How to write silly posts on a <a href="/blog/review-27-imac-perfect-christmas-gift/">27&#8243; iMac</a>.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.christianschenk.org/blog/howto-pretend-having-iphone/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Friday the 13th with Joda Time</title>
		<link>http://www.christianschenk.org/blog/friday-13th-joda-time/</link>
		<comments>http://www.christianschenk.org/blog/friday-13th-joda-time/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 07:15:52 +0000</pubDate>
		<dc:creator>Christian Schenk</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[13th]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[friday]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[joda time]]></category>
		<category><![CDATA[time]]></category>

		<guid isPermaLink="false">http://www.christianschenk.org/?p=114</guid>
		<description><![CDATA[I&#8217;ve always wanted to try Joda Time and in this post I&#8217;d like to present some code that finds Friday the 13th dates. Wouldn&#8217;t it be interesting to know when the next Friday the 13th is or which year has got the most occurrences of this particular day?
The Eclipse project with the code for this [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve always wanted to try <a href="http://joda-time.sourceforge.net/">Joda Time</a> and in this post I&#8217;d like to present some code that finds <a href="http://en.wikipedia.org/wiki/Friday_the_13th">Friday the 13th</a> dates. Wouldn&#8217;t it be interesting to know when the next <em>Friday the 13th</em> is or which year has got the most occurrences of this particular day?</p>
<p>The Eclipse project with the code for this post can be downloaded as <a href="http://data.christianschenk.org/friday-13th-joda-time/JodaFriday13th.tar.gz">tar.gz</a> or <a href="http://data.christianschenk.org/friday-13th-joda-time/JodaFriday13th.zip">zip</a>. You can browse the code online <a href="http://data.christianschenk.org/friday-13th-joda-time/xref/">here</a>.</p>
<p><span id="more-114"></span></p>
<h2>The code</h2>
<p>Using Joda Time it&#8217;s super easy to iterate over the next days using the <code>plusDays</code> method of <code>DateTime</code>. Finding Friday the 13th dates is straight forward this way. Sure, we could optimize it but Joda Time seems to be really fast so there&#8217;s no need to do this.</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> List<span style="color: #339933;">&lt;</span>DateTime<span style="color: #339933;">&gt;</span> getNextNthFriday13th<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000066; font-weight: bold;">int</span> n<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">final</span> List<span style="color: #339933;">&lt;</span>DateTime<span style="color: #339933;">&gt;</span> fridays <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> ArrayList<span style="color: #339933;">&lt;</span>DateTime<span style="color: #339933;">&gt;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  DateTime dt <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> DateTime<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000066; font-weight: bold;">int</span> curN <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
  <span style="color: #000000; font-weight: bold;">while</span> <span style="color: #009900;">&#40;</span>curN <span style="color: #339933;">&lt;</span> n<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    dt <span style="color: #339933;">=</span> dt.<span style="color: #006633;">plusDays</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>dt.<span style="color: #006633;">getDayOfMonth</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #cc66cc;">13</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">continue</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>dt.<span style="color: #006633;">getDayOfWeek</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> DateTimeConstants.<span style="color: #006633;">FRIDAY</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">continue</span><span style="color: #339933;">;</span>
&nbsp;
    fridays.<span style="color: #006633;">add</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> DateTime<span style="color: #009900;">&#40;</span>dt.<span style="color: #006633;">toInstant</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    curN<span style="color: #339933;">++;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">return</span> fridays<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Finding the next year with the most Friday the 13th dates is simple too. Just get the next <em>n</em> occurrences of Friday the 13th and sort them by year to find the one with the highest amount. Another way to solve this is this: just search the next year that has got three Friday the 13th dates and you&#8217;re done. Have a look at the code of <a href="http://data.christianschenk.org/friday-13th-joda-time/xref/org/christianschenk/friday13th/Friday13th.html#62">this method</a> to see my quick solution.</p>
<h2>Conclusion</h2>
<p>It&#8217;s a real joy to use Joda Time because its API has got methods for a lot of use cases. Although I haven&#8217;t done any performance tests yet it seems to be lightning fast. I recommend that you should definitely have a look at it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.christianschenk.org/blog/friday-13th-joda-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
