
<rss version="2.0">
	<channel>
		<title>Peter Compernolle .com</title>
		<link>http://petercompernolle.com/</link>
		<link href="../images/apple-touch-icon.png" rel="apple-touch-icon" type="image/png" />
		<link href="../images/favicon2.png" rel="icon" type="image/jpg" />
		<description>The Rants and Ravings of a Lowly Peon</description>
		<language>en</language>
			<item>
				<link>http://petercompernolle.com/2013/01/26/goodbye-my-code-hello-tumblrs</link>
				<title>New Blog Engine!</title>
				<author>Peter</author>
				<pubDate>Sat, 26 Jan 2013 17:40:26 -0600</pubDate>
				<description><![CDATA[<p>Hey everyone who reads this via RSS! I know you're few and far between, but I love you even more for that!<br /><br />

I decided recently to migrate my blog from a platform I wrote years ago to Tumblr. If you access this from the website, you'll already see my Tumblr-fed blog, but if you read it via RSS you'll need to subscribe to my new feed:<br /><br />

<a href="http://petercompernolle.com/blog/rss"">http://petercompernolle.com/blog/rss"</a>>petercompernolle.com/blog/rss<br /><br />

If you only want the geeky stuff, like Mac OS X related posts, code nerd posts, etc, then you can limit the feed using the tag "geek":<br /><br />

<a href="http://petercompernolle.com/blog/tagged/geek/rss">http://petercompernolle.com/blog/tagged/geek/rss</a><br /><br />

You're awesome! Happy Saturday!</p>]]></description>
			</item>			<item>
				<link>http://petercompernolle.com/2013/01/25/out-of-pages</link>
				<title>A New Venture: Out of Pages</title>
				<author>Peter</author>
				<pubDate>Fri, 25 Jan 2013 14:18:05 -0600</pubDate>
				<description><![CDATA[<p>About a month ago, <a href="http://thisisaok.com/">Laurel Hechanova</a> and I decided to start a little side project together. The problem we're attempting to solve: that horrible feeling you get when you realize your notebook is almost out of pages.<br /><br />

So we set about making a website that offers one service: notebook subscriptions.<br /><br />

It's simple:<br /><br />

<ol><li>Subscribe to a plan</li><br /><br />

<li>Enjoy your notebooks</li><br /><br />

<li>Notebooks arrive at your door as scheduled</li><br /><br />

<li>If you're running out of pages sooner, let us know and we'll send your notebooks right away</li></ol><br /><br />

The site is live and ready to go, so subscribe to your favorite notebook plan before you run out of pages!<br /><br />

<strong><a href="http://outofpages.com">outofpages.com</a></strong></p>]]></description>
			</item>			<item>
				<link>http://petercompernolle.com/2012/10/30/fibonacci-or-phi</link>
				<title>Fibonacci or Phi?</title>
				<author>Peter</author>
				<pubDate>Tue, 30 Oct 2012 10:35:05 -0500</pubDate>
				<description><![CDATA[<p>Last night, as Hurricane Sandy was growing ever more fierce, a friend of mine posted a satellite photo of the storm with a spiral laid out over it:<br /><br />

<a href="https://twitter.com/2cogitate/status/263068338186510337"><img src="https://pbs.twimg.com/media/A6abQoGCYAAeXuK.jpg" /></a><br /><br />

We've all seen this spiral before &mdash; in galaxies, sunflower seeds, snail shells, and, unfortunately for the universe, in the movie <a href="http://www.imdb.com/title/tt0382625/">The Davinci Code</a>. <br /><br />

In high school, I became obsessed with mathematics for one reason: the irrational number 1.618033..., also known "the golden ratio" or "the golden mean", and only within the last hundred years or so, the lower case Greek letter &phi; (phi, pronounced "fee"). The number has unbelievable properties, enough that I've been shunned from parties for talking about them, gotten into arguments about its merits as compared to the far lamer &pi; (pi). A single example of its mathematic beauty:<br /><br />

&phi; (phi) is defined by the solution of <i>x</i>^2 = <i>x</i> + 1, which means:<br /><br />

<ul><li>&phi; (phi) = 1.618033...</li><br /><br />

<li>&phi; (phi) ^ 2 = 2.618033...</li><br /><br />

<li>&phi; (phi) ^ -1 = 1 / &phi; (phi) = 0.618033...</li></ul><br /><br />

Another example was discovered by a guy named Roger Penrose. Called <a href="http://en.wikipedia.org/wiki/Penrose_tiling">Penrose Tiles (kites and darts)</a>, if you take two shapes, each with two sides of length 1 and two sides of length &phi; (phi) and piece them together infinitely, you will have a set of random patterns whose ratio of one shape to the other approaches this magical number &phi; (phi). I have this tattooed on my ankle.<br /><br />

Now that I've mentioned my tattoo, I should also note another neato pattern. If you take 1+1/(1+1/(1+1/(...))), this too will approach &phi; (phi) with the more values you add. If you were able to keep going on forever writing it this way, it would be equal to &phi; (phi) (because it's irrational). <a href="http://www.flickr.com/photos/virtualcourtney/433035152/">My friend's tattoo</a> is of this infinitely looping around her arm.<br /><br />

Meanwhile, there's a sequence of numbers commonly referred to as the Fibonacci sequence. The sequence is insanely simple: start with 0 and 1, and add any two consequtive numbers in the sequence to get the following. So, if you start with 0 and 1:</p><ul>	<li class="to-html-ul">		 0	</li>	<li class="to-html-ul">		 1	</li>	<li class="to-html-ul">		 0+1 = 1	</li>	<li class="to-html-ul">		 1+1 = 2	</li>	<li class="to-html-ul">		 1+2 = 3	</li>	<li class="to-html-ul">		 2+3 = 5	</li>	<li class="to-html-ul">		 3+5 = 8	</li>	<li class="to-html-ul">		 5+8 = 13	</li>	<li class="to-html-ul">		 8+13 = 21	</li></ul>
<p>...and so on. Let's focus for a little while on this sequence, keeping that magical number &phi; (phi) in our heads.<br /><br />

Let's take any number in the sequence and divide it by the previous number. If we start with 2, this new sequence looks something like 1, 2, 1.5, 1.66..., 1.6, 1.625, 1.615, and so on. You may notice that this sequence jumps around in the beginning, but slowly gets closer to &phi; (phi). In fact, that's <i>exactly</i> what happens. It gets remarkably close to 1.618033 remarkably quickly.<br /><br />

As much as I'm dying to, I won't go into just how awesome this sequence is. I'll just reiterate how closely related it is to &phi; (phi).<br /><br />

<hr /><br /><br />

Which brings us to last night, when I <a href="https://twitter.com/thelowlypeon/status/263071362036428800">tweeted</a> the above image with the caption "Fibonacci!". I was quite surprised to find that I got over 80 retweets plus a whole skew of thise quasi retweets. I was also surprised by how many people were correcting me on my "Fibonacci!" exclamation, suggesting instead that it was the "golden ratio" or the "golden mean".<br /><br />

So I took it upon myself to see if the image indeed depicts a golden ratio, meaning a ratio based solely on 1.618033..., or if it is more based on a Fibonacci spiral, which is comprised of adjacent squares of sizes in the Fibonacci sequence.<br /><br />

Let's look at the image again:<br /><br />

<a href="https://twitter.com/2cogitate/status/263068338186510337"><img src="https://pbs.twimg.com/media/A6abQoGCYAAeXuK.jpg" /></a><br /><br />

We can see right from the start that the sprial begins with only two squares. This suggests at first glance that this is a Fibonacci spiral, because a true golden spiral would <a href="http://en.wikipedia.org/wiki/Zeno's_paradoxes#The_dichotomy_paradox">have no beginning</a>. But, since the image is only 255px wide, we'll assume that was a constraint due to size.<br /><br />

So I pulled out the old <a href="http://www.pascal.com/software/freeruler/">ruler</a>, and the image, and did some measuring, pixel by pixel. Here's what I found:</p><ul>	<li class="to-html-ul">		 The first square in the sequence is 4x4	</li>	<li class="to-html-ul">		 The second square, too, is 4x4. So far, we're on track for a perfect Fibonacci spiral.	</li>	<li class="to-html-ul">		 For the third square, we know one side is 8 (because the two adjacent are each 4), and the other side is 9. Not exactly a square, probably due to compressing the image.	</li>	<li class="to-html-ul">		 The fourth square is 13x13	</li>	<li class="to-html-ul">		 The fifth is 22x23	</li>	<li class="to-html-ul">		 The sixth is 36x36	</li>	<li class="to-html-ul">		 The seventh is 58x59	</li>	<li class="to-html-ul">		 The eighth is 95x95	</li>	<li class="to-html-ul">		 The ninth looks like it was cropped, so we only have the first 8 to gather data from	</li></ul>
<p>If we make these into squares, we roughly get a sequence of 4, 4, 8, 13, 22, 36, 58, 95. <br /><br />

Let's analyze these numbers in the eye of the golden ratio:<br /><br />

<table><br /><br />

<tr><br /><br />

<th>Ratio (n+1)/n</th><br /><br />

<th>Irrational</th><br /><br />

<th>Difference from &phi; (phi)</th><br /><br />

</tr><br /><br />

<tr><td>4/4</td><td>1</td><td>0.618 (hey! that's also 1/phi!)</td></tr><br /><br />

<tr><td>8/4</td><td>2</td><td>-.832</td></tr><br /><br />

<tr><td>13/8</td><td>1.625</td><td>-.007</td></tr><br /><br />

<tr><td>22/13</td><td>1.692</td><td>-.074</td></tr><br /><br />

<tr><td>36/22</td><td>1.636</td><td>-.018</td></tr><br /><br />

<tr><td>58/36</td><td>1.611</td><td>.007</td></tr><br /><br />

<tr><td>95/58</td><td>1.638</td><td>-.02</td></tr><br /><br />

</table><br /><br />

The average difference per step: 0.225. Not bad. <br /><br />

And from that of Fibonacci:<br /><br />

<table><br /><br />

<tr><th>Ratio</th><th>Irrational</th><th>Fibonacci Ratio</th><th>Difference</th></tr><br /><br />

<tr><td>4/4</td><td>1</td><td>1</td><td>0</td></tr><br /><br />

<tr><td>8/4</td><td>2</td><td>2</td><td>0</td></tr><br /><br />

<tr><td>13/8</td><td>1.625</td><td>1.5</td><td>.125</td></tr><br /><br />

<tr><td>22/13</td><td>1.692</td><td>1.66...</td><td>.025</td></tr><br /><br />

<tr><td>36/22</td><td>1.636</td><td>1.6</td><td>.036</td></tr><br /><br />

<tr><td>58/36</td><td>1.611</td><td>1.625</td><td>-.014</td></tr><br /><br />

<tr><td>95/58</td><td>1.638</td><td>1.615</td><td>.023</td></tr><br /><br />

</table><br /><br />

The average distance per step: 0.0318. <br /><br />

<hr /><br /><br />

And so, in conclusion, the spiral depicted in that satellite image of Hurrican Sandy is slightly closer to that of a Fibonacci spiral than to that of a Golden Spiral.<br /><br />

QED.</p>]]></description>
			</item>			<item>
				<link>http://petercompernolle.com/2012/07/26/fixing-httpdconf-in-osx-mountainlion</link>
				<title>Fixing httpd.conf in Mountain Lion 10.8</title>
				<author>Peter</author>
				<pubDate>Thu, 26 Jul 2012 10:03:58 -0500</pubDate>
				<description><![CDATA[<p>I've been having some annoying issues with OS X 10.7 Lion, and I had hoped that upgrading to OS X 10.8 Mountain Lion, Apple's newest OS, released just yesterday, would fix some of the problems. Giving my history of upgrading my OS, I should have predicted that upgrading would a) not solve my issues, and b) cause a whole lot more of them.<br /><br />

Unlike my past upgrade woes, this was on the machine I use for development. Thus, this set me back a bit for my work, which is primarily web development. I could have used our development server, but the latency drives me nuts doing that. Anyway, upon upgrading, my localhost was broken. I got a 404 error at any and all of my local virtual hosts (eg <a href="http://localhost,">http://localhost,</a> http://mysite.localhost). <br /><br />

 <b>Goals / Requirements</b></p><ul>	<li class="to-html-ul">		 Get my Apache web server running again	</li>	<li class="to-html-ul">		 Get at least two virtual hosts configured, with one being an absolute priority	</li>	<li class="to-html-ul">		 Add a RewriteCond and RewriteRule to the configuration	</li></ul>
<p>The research on the interwebs was bleak, seeing as how the OS was released mere hours before I had the issue. I had downloaded Mountain Lion Server, the $20 upgrade for making server management easier (ha!) for my other machine, and decided to install it. I'd heard great things about the web management changes, and figured this could be an opportunity to easily set up several virtual hosts. If not, I figured, I have lots of backups of my Apache configuration file (/etc/apache2/httpd.conf). <br /><br />

After installing Server.app, sure enough, my localhost showed the default. I went through the absurdly simple steps to setup a virtual host (a "custom website"), knowing full well I'd have to do some tweaking later on (namely for the RewriteCond and RewriteRule, which I assumed Apple's ultra simplified UI would not leave room for). <br /><br />

After a bunch of nitpicky changes, I was able to make my "custom site" show up at <a href="http://mysite.localhost.">http://mysite.localhost.</a> I foolishly assumed it was because I had replaced the file at /etc/apache2/httpd.conf with my old one. Oddly, none of the other virtual hosts I had set up (<a href="http://myothersite.localhost)">http://myothersite.localhost)</a> worked &mdash; they all pointed to the default Apple site that tells you how great Server.app is.<br /><br />

And then several hours later, I figured it out. It's no longer stored at /etc/apache2/httpd.conf. For some reason, Apple has changed something that's worked for a long time, and instead created a whole bunch of files in /Library/Server/Web/Config/apache2/sites. There's a .conf file for anything on port 80, another .conf file for the site I created in Server.app, and a whole bunch of other backups made for every change I made in Server.app.<br /><br />

So I was able to get the RewriteRule and RewriteCond to work by modifying the file called 0000_any_80_mysite.localhost.conf.</p>]]></description>
			</item>			<item>
				<link>http://petercompernolle.com/2012/05/20/workspace</link>
				<title>Workspace</title>
				<author>Peter</author>
				<pubDate>Sun, 20 May 2012 09:29:09 -0500</pubDate>
				<description><![CDATA[<p>It's been just over a month since <a href="http://mikijohnson.com">Miki</a>, <a href="http://jacksonsolway.com">Jackson</a> and I took the plunge and founded <a href="http://dovetail.co">Dovetail</a>. <br /><br />

Much of the past month has been spent talking with potential users to understand the market better, having long discussions with white-boards and tea among the three of us, and exercising <a href="http://theleanstartup.com/">The Lean Startup</a>. And so it wasn't unreasonable that we worked from coffee shops, or alternating between my living room or theirs. <br /><br />

Although I spent a good amount of time this past month month actually <i>developing</i> the site, it feels like only recently that it's become my real job. And so it's become much more important for me to have a good work space. This, I believe, is for two reasons:</p><ol>	<li class="to-html-ol">		 Having one place to call an office means less time wasted &mdash; finding reliable wifi, transportation to a new place, getting up once an hour to buy a cup of coffee to justify being in a coffee shop	</li>	<li class="to-html-ol">		 Separating work and home means that my time working is vastly more efficient and productive, and my time at home isn't spent feeling guilty that I'm not working more. 	</li></ol>
<p>Deep down, for the month we worked nomadically, I think I knew both of these things. I found myself feeling stressed, but not because of anything specific, and I felt like I was always wasting time on a bus, or wasting money buying coffee for internet access. And perhaps more importantly, I was working long hours, but the hours I worked just bled into the hours I didn't, so days rarely <i>felt</i> productive and healthy.<br /><br />

Last week, after learning that we couldn't follow through with our previous plan for having common office space, we stumbled upon <a href="https://www.desktimeapp.com/">Desktime</a>, a well written, simple site for finding coworking space. After a mere few minutes on the site, we decided to check out one or two of the places. The first one gave us a day for free to check it out. We signed the next morning.<br /><br />

It's been four days now that we've had work space. I feel less stressed, more productive, and overall much healthier. I can mentally separate work and home, which makes me more efficient when working and happier when at home. The internet is fast and reliable. There's a kitchen. And I got some new toys &mdash; an Apple Cinema display, a DasKeyboard. <br /><br />

And perhaps best of all, the name "<a href="http://dovetail.co">Dovetail</a>" is really starting to get around here in the windy city, and now that we have a place we can call our office, it feels real.</p>]]></description>
			</item>			<item>
				<link>http://petercompernolle.com/2012/05/10/attack-of-the-killer-hair</link>
				<title>Attack of the Killer Hair, or: I need a haircut</title>
				<author>Peter</author>
				<pubDate>Thu, 10 May 2012 21:10:28 -0500</pubDate>
				<description><![CDATA[<p><img style="margin-right:20px;margin-bottom:20px;float:left;" src="http://media.petercompernolle.com/killer-hair.png" /> My hair has been getting kind of long. And apparently, in Houston, that's not good for at least two reasons.<br /><br />

<hr /><br /><br />

It's at the annoying length where if I wash it daily, it falls flat and gets in my eyes. So for the last couple of weeks, I've been on a once-every-three-or-four days washing schedule. It just so happened that washing day was last Saturday, and I just so happened to be at my parent's house for the night before leaving early the next morning to Houston to tie up some loose ends with my previous company. I figured I'd postpone my chore until I was in Houston, bored, with time to spare.<br /><br />

I stayed at a pretty crappy hotel near the factory because I'm generally cheap. I'd stayed there many times before, and it wasn't so bad, aside from being in a remote part of Houston where you can't walk anywhere.<br /><br />

After dinner with some friends, I retired early and decided it was time to wash my now-oily hair. But alas! No shampoo. I called the front desk, who informed me grumpily that there was no shampoo. Surprised, I asked again, and, even grumpier, he confirmed that there was indeed no shampoo. Okay, no big deal.<br /><br />

The next day after dinner I asked the front desk on my way upstairs. Still no shampoo. My face was now oily from the humidity of Houston and &mdash; yes &mdash; my week-dirty hair that was falling in my eyes. Being the geek I am, I <a href="http://twitter.com/#!/thelowlypeon/status/199712213303427072">tweeted my frustration</a>. Lo and behold, <a href="http://twitter.com/#!/IHGCare">@IHGCare</a> replied almost instantly, asking me to follow and DM the details. Pleased at the quick response, yet displeased at the request to follow them just to solve my problem, I decided to wait another day. <br /><br />

The next day I called the manager, and still no shampoo. I was getting a bit irritated, so I tweeted again. Still no dice. <br /><br />

Then, after a whopping <i>five nights</i>, they had shampoo. And boy did they make sure I got it. They gave me two bottles when I walked into the hotel, there were two waiting for me in the bathroom, and there was a hand-signed note, apologizing and offering 1,000 points, next to two more bottles. Great. I can wash my hair.<br /><br />

The next morning was check out. I walked toward the desk at 6am and handed them my key cards, and the woman asked if I got my shampoo. I could hear her buddy mumble "oh <i>this</i> is the guy?"<br /><br />

<hr /><br /><br />

Exhausted but feeling clean, I went to IAH for my return to the windy city. If the TSA makes me go through the back scatter machines, I opt out, and this morning was no exception. Some guy was groping me, and all the while another TSA agent was watching. When he was done he said thanks without making any eye contact, and walking away the other TSA agent, apparently his boss, scolded him for doing an incomplete search. Why was it incomplete, you ask? <br /><br />

"Did you check his hair?!" she yelled.<br /><br />

<hr /><br /><br />

So apparently my hair is shaggy enough now that it's got a reputation at the Holiday Inn in Houston, and the TSA thinks I could smuggle an explosive device in it.</p>]]></description>
			</item>			<item>
				<link>http://petercompernolle.com/2012/04/15/company-problem-solving</link>
				<title>Incentives for Solving Problems</title>
				<author>Peter</author>
				<pubDate>Sun, 15 Apr 2012 10:53:26 -0500</pubDate>
				<description><![CDATA[<p>I recently left my cushy corporate job of five years. It was a very difficult decision to make, and sudden, but in the end, it was a long time coming. And in the wake of my departure, I've been asked by people of varying levels of trust my reason for leaving. <br /><br />

My politically sensitive answer was about as empty as you may expect: I want to learn more, be challenged, and start down a different path. I understand this comes at a cost, and along with it a significant risk. But no one can argue with you if you say you want something that the company simply can't offer. <br /><br />

But to my friends, my answer has evolved with time spent away from the company. I couldn't quite explain the reason at first, so I used the excuses that seemed the most obvious and would avoid much further discussion: I want to leave Houston, I never intended to stay at this company so many years, I want to do more software development and less business intelligence. But time spent outside of the organization made things a bit clearer.<br /><br />

I should be clear: I made the decision to leave the <i>company</i> with confidence, but leaving my department, my friends, was extremely difficult. This company has grown immensely since I first came on. New departments were created out of thin air. There are so many confusing layers of mid management now that no one really knows who does what or why (or <i>if</i>, really). And yes, my department has doubled. I was the first with a computer degree, and now there are several. Whereas before everyone wore many hats, at the time of my departure everyone had a different focus. Yet we all knew well which task would be best solved by whom, and despite the pressure and the shortage of man-power, (most of) the people in the department worked the way everyone should: together. <br /><br />

While other departments interacted with us by requiring a several week project in mere days then shitting on us when we did our best, the twelve or so of our team recognized that we are all good people, with strengths and weaknesses, and are trying as hard as we can. And while, yes, there are some things none of us knows how to solve, pointing fingers is certainly <i>not</i> a solution to anyone's problem. <br /><br />

And so it brought tears to my eyes when I read a blurb in a job description at Chicago's <a href="https://www.braintreepayments.com/company/careers">BraintreePayments</a>: <br /><br />

<blockquote>"There's got to be a better way. Let's figure it out."</blockquote><br /><br />

The sheer brilliance of this simple comment is astonishing: it admits that perhaps we've already found <i>a</i> solution, but suggests that it's not ideal. It gives confidence to the reader by assuring him that he is capable of figuring out the better solution. And most importantly, it claims that the bet way to find the solution is <i>together</i>. <br /><br />

This strongly contrasts with the corporate culture at my previous company, where the "solution" was to delegate to someone else, take credit for their success, and point the finger for their failure. <br /><br />

Weeks later, after I've been happily busy starting a business with <a href="http://thisstartsnow.com/aboutus/">two great anti-finger-pointing people</a>, I came across a post on <a href="http://thefeature.net/post/20587150863/ceos-and-the-candle-problem">The Feature</a> (previously "Give me something to read") linking to an article on <a href="http://blogs.nature.com/a_mad_hemorrhage/2012/04/02/ceos-and-the-candle-problem">nature.com</a> about Karl Duncker's 1945 "Candle Problem". He found that people's ability to solve problems was actually <i>worsened</i> with financial incentive. (The article is fantastic. I recommend reading it in full.)<br /><br />

The problem itself here isn't important, but what is important is his conclusion that people's ability to <i>see</i> a solution is greatly impacted by the way it's presented. If you are asked to solve a Matlock-type problem using a candle, a box of matches, and tacks, your solution would be different if the same material was provided instead as a candle, matches, a box, and tacks. Further, your ability to see the solution is hindered by your incentive to solve it. In Duncker's example, financial incentive hurt people's ability to think creatively because they were so focused on eliminating the problem. At my previous company, people's ability to think creatively was hurt by a similar desire to eliminate the problem (to "get it off one's plate"), even if that just meant passing it off to someone else (which likely doesn't solve anything anyway).<br /><br />

And now, after a few weeks of working closely in a small team of great people, and after talking with several people working at smaller companies, my real reason for leaving my past company is clear to me: what's wrong with the company culture isn't <i>how</i> they solve problems &mdash; it is not a question of skill, knowledge, or ability &mdash; but <i>why</i> they solve them. At the company we've started, every problem we address is <i>our</i> problem. The three of us each have different skill sets, different strengths and weaknesses, so our roles are generally very clear. But every time we come across a problem, we all agree this problem <i>needs to be fixed</i>. To again quote Braintree, you need to be willing to take out the garbage even if you're a software engineer. Why? Because the garbage needs to be taken out. <br /><br />

In the end, what it comes down to is that companies are nothing more than a sum of its people. Our company is not a journalist, a photographer, and a computer geek. Our company is three people with different skills and experiences. There's got to be a better way, and we'll figure it out together.</p>]]></description>
			</item>			<item>
				<link>http://petercompernolle.com/2012/01/22/luhn</link>
				<title>Luhn Algorithm in Ruby</title>
				<author>Peter</author>
				<pubDate>Sun, 22 Jan 2012 18:02:49 -0600</pubDate>
				<description><![CDATA[<p>I was recently introduced to the <a href="http://en.wikipedia.org/wiki/Luhn_algorithm">Luhn algorithm</a>, a standardized checksum algorithm used widely today, most commonly to check if credit card numbers are valid. <br /><br />

The algorithm is quite simple for a human to use. Given a number of any size, starting from the right side:</p><ol>	<li class="to-html-ol">		 Double every second digit, and sum each digit of the result (eg 8 * 2 = 16, so the sum would be 1 + 6 = 7)	</li>	<li class="to-html-ol">		 Add this sum to the other digits	</li>	<li class="to-html-ol">		 If the total sum is divisible by ten (ie sum = 0 mod 10, the last digit is 0, sum % 10 = 0), then the number passed. Otherwise, it failed the checksum.	</li></ol>
<p>For example, consider the number 1234567890. Starting with the 0 at the end:</p><ol>	<li class="to-html-ol">		 9 <b>2=18, 1+8=9. 7</b>2=14, 1+4=5. 5 <b>2=10, 1+0=1. 3</b>2=6, 6=6. 1*2=2, 2=2. So the even places give us 9+5+1+6+2 = 23. 	</li>	<li class="to-html-ol">		 The remaining digits give us 2+4+6+8+0=20. 	</li>	<li class="to-html-ol">		 The sum of these two give us 43, which is not divisible by ten, so this fails the checksum.	</li></ol>
<p><hr /><br /><br />

Meanwhile, I've been playing around with <a href="http://ruby-doc.org/">Ruby</a>, and I wanted to implement this algorithm, generate lots of random numbers, and test if they pass the Luhn test. <br /><br />

Initially, I wrote a method to verify if a number is Luhn using the same logic that a human would follow. For each digit, starting at the index n.length-1, if the index is even, double the value and sum each digit in the result, and if it's an odd index, sum the value. When that's done, return s%10 == 0:<br /><br />

<img alt="Luhn 1 - Human logic" src="http://media.petercompernolle.com/luhn/luhn1.PNG" /><br /><br />

This works, but it sure isn't elegant. What a waste to go through each digit of the sum of the doubled even indexes. So I started to think in terms of efficiency, and thought perhaps storing a static array would be faster than calculating the results. Afterall, we're only talking about ten values!<br /><br />

So we store an array with the result given an index of the value. For example, if the digit is a five, we look at the fifth place, where a one is stored: <br /><br />

<img alt="Luhn 2a - even array" src="http://media.petercompernolle.com/luhn/luhn2a.PNG" /><br /><br />

Then, when iterating through the string, we only need to check if we're at an even index or odd, and either get a value from the array or return the value of the digit, then take the sum of each:<br /><br />

<img alt="Luhn 2b - using arrays" src="http://media.petercompernolle.com/luhn/luhn2b.PNG" /><br /><br />

This works too, but I'm still not satisfied. We have to write <code>n[n.length-i].chr.to_i way too many times to get the value of the digit (note: in Ruby 1.9, you don't need the .chr, but in Ruby 1.8, calling .to_i will return the ASCI value of the character, not the integer we want). Plus, using a static array seems lazy. <br /><br />

I was running yesterday when it hit me. And of course, in retrospect, it seems so obvious: if the value of an even index is greater than or equal to five, the sum is 1 + the remainder of the sum / 10. This is because the first digit of the sum is <i>always</i> 1 when the value is greater than or equal to 5. It can't be more, because we only go up to 9. Consider for values greater than or equal to five:</p><ul>	<li class="to-html-ul">		 5 * 2 = 10, 1 + 0 = 1, which is = 1 + ( 10 % 10 )	</li>	<li class="to-html-ul">		 6 * 2 = 12, 1 + 2 = 3, which is = 1 + ( 12 % 10 )	</li>	<li class="to-html-ul">		 7 * 2 = 14, 1 + 4 = 5, which is = 1 + ( 14 % 10 )	</li>	<li class="to-html-ul">		 8 * 2 = 16, 1 + 6 = 7, which is = 1 + ( 16 % 10 )	</li>	<li class="to-html-ul">		 9 * 2 = 18, 1 + 8 = 9, which is = 1 + ( 18 % 10 )	</li></ul>
<p>So this got me thinking like the Greeks two thousand years ago &mdash; let's try to find a generic formula to get the value. It shouldn't be too hard, right?<br /><br />

I mapped out the values for a given digit (n) if it's in an even index or odd. The odd indices are easy, of course: they are simply the value of the digit. The even seemed to follow such a simple pattern: start at zero and count the even numbers, then go back and count the odd numbers. For the first five places, this is just 2n, and for the latter five it's 2n-1. Hmm. Well, another way to write 2n-1 is n-(9-n), or n-9+n. Not useful. So how can we use some simple logic to make 2n-9 and n have the same forumla for a given set of inputs, when we know that number up to five (excl) are 2n, and after are 2n-9? The only difference is that trailing -9, so how can we make the 0-9 go away for smaller numbers? Well of course! Multiply it by zero in certain cases! And how can we determine which cases? The whole part of n/5!<br /><br />

<img alt="Luhn 3a - number theory" src="http://media.petercompernolle.com/luhn/luhn3a.PNG" /><br /><br />

Now we're getting somewhere! <br /><br />

<img alt="Luhn 3b - number theory implemented" src="http://media.petercompernolle.com/luhn/luhn3b.PNG" /><br /><br />

I'm still kind of new to Ruby, so it took me a while to find a way to conveniently iterate through an array, while still having access to both the index (to determine if it's an odd or even place) <i>and</i> the value. A post of <a href="http://ubuntuforums.org/showthread.php?t=523273">Ubuntu Forums</a> which claimed scanning the string is faster than splitting it. I gave it a shot, as well as a quick check to see if s, the sum, was set yet. It makes it slightly harder to read, but it doesn't seem fully necessary to have a whole line to set s to 0. Which leaves us with a three line algorithm (two if you pass the function a string instead of an int):<br /><br />

<img alt="Luhn 3c - cleaned up" src="http://media.petercompernolle.com/luhn/luhn_final.PNG" /><br /><br />

And there we have it. A conceptually simple Luhn algorithm implemented simply in Ruby. (Note: for verifying credit cards, the prefix must be of a certain format. You may have noticed that Visas always begin with a 4? Or Discover is always 6011?)<br /><br />

Source code available at <a href="">github</a>.</p>]]></description>
			</item>			<item>
				<link>http://petercompernolle.com/2011/12/17/UP-review</link>
				<title>The UP by Jawbone</title>
				<author>Peter</author>
				<pubDate>Fri, 16 Dec 2011 13:04:54 -0600</pubDate>
				<description><![CDATA[<p>I've been using my <a href="http://jawbone.com/up">UP by Jawbone</a> for just over a month now, and have been hesitant to write any sort of review until I had so much time to really use it. <br /><br />

In simplest terms, the UP is a super-accurate pedometer with a few other key features. Much like the <a href="http://www.fitbit.com/">fitbit</a>, the UP is a device you keep with you all the time, and it tracks your activity. What is special about the UP, though, are the new features it adds: a gentle alarm that wakes you only when you're in light sleep, a gentle reminder to get up and move around when you've been inactive for too long, and the ability to switch to your iPhone's GPS when you're doing something that can't be measured by motion, such as a bike ride. <br /><br />

The UP's data tracking functions fall into three categories:</p><ol>	<li class="to-html-ol">		 Move, which tracks your physical movement	</li>	<li class="to-html-ol">		 Sleep	</li>	<li class="to-html-ol">		 Eat, which attempts to track your diet and how you feel after eating certain things	</li></ol>
<p>And the peripheral functions include:</p><ol>	<li class="to-html-ol">		 Team, with which you can compete with other UP users to encourage each other to be healthier	</li>	<li class="to-html-ol">		 Challenges, which encourage you to reach certain goals, such as "Walk 10,000 steps every day" or "Sleep an extra hour every night"	</li>	<li class="to-html-ol">		 An alarm that waits until you're in light sleep to wake you up	</li>	<li class="to-html-ol">		 An activity alarm that reminds you not to sit still for too long	</li>	<li class="to-html-ol">		 An iPhone app to analyze your activity	</li></ol>
<p> <b>Move</b><br /><br />

After using it for over a month, and comparing the UP's data with that taken from my iPhone's GPS, I am truly amazed how accurate the pedometer function is. I've never really believed in pedometers because small changes in your stride can make such a drastic difference, but somehow, this can easily distinguish between steps I take and other motions, such as driving on a bumpy road. <br /><br />

(It seems to use vertical motion to sense steps, which means some activities, such as brushing your teeth, can look like "vigorous" activity. Though, unlike other users who expect this to be omniscient, I simply wear it on my left wrist, which keeps things pretty consistent.)<br /><br />

The ability to switch to your iPhone's GPS is, in my opinion, a brilliant solution to an obvious problem. I've been tracking activities, such as runs or bike rides or hikes, using my iPhone's GPS or my Garmin, for a few years now, but it only works well when outside &mdash; the UP combines the quality of both by using something I already have. To switch into GPS mode on the UP, you (somewhat unintuitively) tap a plus button on the main screen (to "add"?) a GPS workout. Like so many other apps, it brings up a screen with a timer, an odometer, and the ability to control whatever music you're listening to. The app, however, leaves much to be desired in terms of customization, so I still end up using <a href="http://itunes.apple.com/us/app/kinetic-gps/id369324269?mt=8">Kinetic</a> when I'm working out, and just have the UP app tracking GPS in the background. Until the app can notify me of my progress, send my track to <a href="http://www.runkeeper.com">Runkeeper</a>, and have a more functional UI, I won't be able to use only the UP app for activities like this.<br /><br />

I always figured any iOS app that used your GPS would have the same amount of accuracy, falsely assuming GPS was hardware only. But it turns out that using <i>only</i> the UP app to track my GPS activity yields some horribly innacurate tracks (note: for all images, I'm on the sidewalk, so my track should follow the road closely):<br /><br />

GPS tracks when using only the UP iOS app:<br /><br />

<a href="http://www.flickr.com/photos/pcompernolle/6521561891/sizes/l/in/photostream/"><img src="http://farm8.staticflickr.com/7023/6521561891_cebf3b0f20.jpg" /></a><br /><br />

GPS tracks when using the UP and Kinetic simultaneously (UP on left, Kinetic on right):<br /><br />

<a href="http://www.flickr.com/photos/pcompernolle/6521562245/in/photostream"><img src="http://farm8.staticflickr.com/7001/6521562245_98f5c86587.jpg" /></a> <a href="http://www.flickr.com/photos/pcompernolle/6521562473/in/photostream"><img src="http://farm8.staticflickr.com/7153/6521562473_cae8753beb.jpg" /></a><br /><br />

(Note that the "start" point for each is a bit different, because I have to hit start on different apps.)<br /><br />

 <b>Accuracy</b><br /><br />

I've seen many scathing reviews about the accuracy of the UP's activity tracking, and I'm not entirely sure I understand. As I noted above, even the best pedometer in the world can still only accurately measure your steps. The best GPS device can only accurately measure your geolocation. So I'd never expect something like an UP to be able to measure all of my activity with absolute accuracy. The benefit of the UP, in my opinion, is to measure your general activity levels, and give you an overview of how active you were on a daily basis. <a href="http://www.one37.net/blog/2011/12/13/the-jawbone-up-in-real-life.html ">Matt Alexander at one37</a> explains this perfectly:<br /><br />

<blockquote>The UP is a lightweight bracelet that reminds you to move around, it wakes you up in the morning, and it tracks your general activity levels. Sure it can't tell if I'm doing weights at the gym or if I'm running, but it knows how long I'm working out, how intense it is, and the context of that workout with regard to my day. I spent 45 minutes at the gym yesterday, but was far less mobile during the day than usual, and I had less sleep. That's enough actionable information for me, and has provided enough fuel for me to proactively consider my daily activity levels.</blockquote><br /><br />

 <b>Sleep</b><br /><br />

The sleep mode is one of the main reasons I got this. I've always been fascinated with sleep, and at last I have a reasonable way to track the quality of my sleep. For the last month (minus a week when the sleep data disappeared), I've been quite pleased with the sleep tracking. The UP considers seven hours to be enough sleep, which I don't, so I mentally change the scale a bit. (If you're listening, Jawbone, I'd love to be able to change the amount I call 100%. This goes for <i>Move</i> too!)<br /><br />

Based on your motion while sleeping (or perhaps even your pulse?), the UP can determine if you're in deep sleep or light sleep. And when you wake up (either by switching out of sleep mode or by taking 200 steps, in case you forget), it sums the amount of time in each. It somehow calculates your "sleep quality", which is perfect most of the time, but horribly wrong other times (but how can it really know I drank too much?). Last night, for example, I had 2:07 deep sleep, 5:23 light sleep, and I was awake for 24 minutes after the alarm went off and I didn't get out of bed. This amounted to sleep quality of 79. <br /><br />

As of now, the tools available to analyze this data are very weak: you need to find the time you slept and look at a graphic to see any data about it. It shows your deep sleep vs light sleep vs awake time in a very intuitive manner, but I'd like a function for comparing sleep on a given day with activity levels of the previous or following day. Wouldn't it be useful to see that you were far more active when you slept eight hours the night before? Or that you slept like a baby the night after a day of heavy exercise?<br /><br />

I'm confident these tools will be developed eventually, especially if Jawbone publishes an API for accessing the data. But until then, I'm using this data on a day-to-day basis.<br /><br />

 <b>Eat</b><br /><br />

The eating function, which attempts to track the food you eat and how you feel afterwards, is extremely lacking. So lacking, in fact, that I stopped using it after about a week. There is really no easy way to track this, but the UP found no solutions either: to track your food, you take a photo of your food before you eat it, possibly with a description, and then an hour later you receive a notification to rate how you feel &mdash; using smiley faces, frowny faces, etc. This is problematic for a number of reasons:</p><ol>	<li class="to-html-ol">		 What about snacks?	</li>	<li class="to-html-ol">		 What about meals with several dishes?	</li>	<li class="to-html-ol">		 My wife is Chinese, so we frequently eat many communal dishes, where I eat 90% of this dish and only 5% of that dish, but how can a photo demonstrate that?	</li>	<li class="to-html-ol">		 There's no way to post photos for meals you already ate	</li>	<li class="to-html-ol">		 It's very easy to forget to track this until later in the day, and there's no way to change the time stamp on the meal/photo	</li>	<li class="to-html-ol">		 There's far more involved in a meal that a photo simply can't capture	</li></ol>
<p>Many of the reviews I've read say they're hopeful for when this feature is improved, but I'm still not really sure how it could be. I'd like to track how many calories I've eaten, but that requires somehow putting that data in &mdash; which would make any meal a chore. <br /><br />

So until someone figures out a good way to track only relevant data, I'm considering this feature a lemon.<br /><br />

 <b>The Recall</b><br /><br />

Last week, I guess Jawbone got enough complaints that they decided to recall the product. They offered a no questions asked guarantee, providing a full refund for anyone, and even letting the refunders keep the UP. Much like Matt Alexander said in his aforementioned post, I think this was a poor business decision, and has made people see problems that they may not even have. I've had no problem with my UP that Jawbone hasn't been able to solve (though <a href="http://avalantern.com/thelowlypeon/blogs/2011/12/16/My-History-with-a-Jawbone-UP ">I have had some issues</a>). As a result, the UP is not available for sale at this time, and their website has only an option to notify you when it is back on the market.<br /><br />

 <b>General</b><br /><br />

My biggest complaint about the UP right now is that there's no way to access or share the data. And I don't mean sending today's activities to Twitter, though that wouldn't be a bad option. I mean sending or retrieving activities from already well-established services like <a href="http://www.runkeeper.com"?>runkeeper.com</a> &mdash; this would avoid the need to run two iOS apps on each run and try to keep them more or less in sync. I'm also already heavily invested in other services like this, so having yet another is a bit of a burden.<br /><br />

The iPhone app needs some work, but I'm confident it can only improve from here. As of now it's very unpolished and offers limited functionality. Again, I'm okay with this because the raw data is stored in the cloud, so all they need to do is improve the analytical tools to make the data more useful.<br /><br />

All told, I am very happy with my UP. It has already been successful in encouraging me to be more active, and has made me far more aware of how much of a turd I am when I just go to work and come home to watch TV. The sleep tracking is lots of fun, and quite useful. And the accuracy is just right for my use, despite several complaints by other users I've heard from.<br /><br />

I highly recommend UP by Jawbone. (Even if you can't buy one right now.)</p>]]></description>
			</item>			<item>
				<link>http://petercompernolle.com/2011/10/19/sprints-data-network</link>
				<title>iPhones and Sprint's Data Network</title>
				<author>Peter</author>
				<pubDate>Tue, 18 Oct 2011 11:10:04 -0500</pubDate>
				<description><![CDATA[<p>I recently left AT&T for Sprint. I listed my primary reasons for this in <a href="http://petercompernolle.com/2011/10/13/iphone4S-sprint-googlevoice">an article last week</a>, and I was fully aware that one of the costs of using Sprint was a slower data network. The things I read compared mostly the theoretical download speeds, claiming that AT&T could get up to 14Mbps, while Sprint could get somewhere around 3Mbps.<br /><br />

This is a tremendous difference &mdash; almost a fifth! &mdash; but 3Mbps is still not too shabby. Furthermore, this is the <i>theoretical</i> download speed. Using my iPhone 4 on AT&T, I compared speeds with a colleague who was using 3G on some Droid variant on Sprint. We both got about 3Mbps, though my upload speed on AT&T was much faster than his on Sprint. So although AT&T <i>could</i> be much faster, I figured, the actual rates is about the same.<br /><br />

I got my new iPhone 4S on Friday, at the same time as everyone else. I was on WiFi all of Friday, except for a few tests on speedtest.net to check it out. But on Saturday, I went for a bike ride into the middle of nowhere, and tried out Siri on the ride. Roughly half the times I tried, Siri responded that she couldn't get a network connection. I got a bit lost (I'm still new to Houston), and pulled up the Maps app. And the map wouldn't load.<br /><br />

When I got home the first thing I did was use the speedtest.net app on Sprint's 3G network. Repeatedly, I got about .1Mbps. <i>This is absurd</i>. To think of all the complaining people did about AT&T, and I was getting .1Mbps!<br /><br />

Later that day my wife wanted to go shopping, so I sat outside enjoying the weather, catching up on my RSS feeds. And sure enough, the data was so bad that not only did my battery die in a mere few hours (on CDMA, weak connections destroy your battery faster than GSM), but I couldn't even sync my RSS feeds. My wife called me, saying she was done shopping, and to use Find My Friends to locate her. But I couldn't even get a connection, despite my perfect four bars of reception.<br /><br />

It took me until last night to realize it, but Sprint's data speeds made me really depressed. Here I've got the latest and the greatest phone ever made, and I can't even do a Google search when I'm not at home. Why did I switch to Sprint? AT&T would have been blazing fast right now. I felt like I was back in China using China Mobile's GPRS network behind the great firewall (and even <i>that</i> was faster!).<br /><br />

This morning I tested it again, the same way when your tooth is sore you can't stop from tonguing it.<br /><br />

And voila. 1.4Mbps. Still not 3Mbps, or what my boss was getting at the same time on Verizon's network, but it was 14 times faster. <br /><br />

So come on, Sprint. I'm rooting for you. Apparently my emotional well being is relying on you too.</p>]]></description>
			</item>			<item>
				<link>http://petercompernolle.com/2011/10/17/the-solution-to-lion-server-upgrade</link>
				<title>A Solution to the Many Problems Posed by a Lion Server Upgrade</title>
				<author>Peter</author>
				<pubDate>Sun, 16 Oct 2011 18:14:58 -0500</pubDate>
				<description><![CDATA[<p>I've been running a Mac Mini server from my home as a central point for use by my family, who is spread around the world, a few tech-unsavvy friends who would prefer to have me set things up for them, and my friends who would prefer not to pay for services that generally require a bit of money. It is also a great way for my friends to share huge files with each other without worry. Since the time I bought it, it's been running Mac OS X Snow Leopard Server 10.6, which, at the time, was a big part of the cost of the Mac Mini Server.<br /><br />

Shortly after it was released, I decided to buy and install OS X Lion Server 10.7, an OS that was Apple's first to be released entirely through it's internet-based Mac App Store. And unlike its expensive predecessors, this release was a mere $50 (in addition to the OS, which I had already bought for my laptop, for $30). <br /><br />

I made <a href="http://petercompernolle.com/2011/07/29/backups">two good backups</a> of the server, notified any users who are still relatively active, and began the upgrade process. I had a <a href="http://petercompernolle.com/2011/07/24/remote-osx-lion-installation">hiccup or two</a> with the actual installation process, but the real nightmare came after the OS was installed in its entirety. All non-admin accounts disappeared, making the share points a mess, several services were completely removed, and a few others listed in my post, "<a href="http://petercompernolle.com/2011/07/25/issues-upgrading-to-osx-lion">Issues Upgrading to Lion</a>". After a few days of trying to correct the issues with brute force, I reluctantly <a href="http://petercompernolle.com/2011/07/29/backups">restored from my <i>second</i> backup</a>.<br /><br />

<hr /><br /><br />

In the months that followed, my server was always looming in my head. Security updates would not be addressed, new services could not be pushed out, and the steps required for upgrading would get bigger with each new update of Lion. Unlike the Windows ecosystem where people can successfully continue using an OS like XP for years and years, Mac OS updates are generally <i>always</i> a good idea.<br /><br />

And then last week Apple released the <a href="http://store.apple.com/us/browse/home/shop_iphone/family/iphone?afid=p219%7CGOUS&cid=AOS-US-KWG">iPhone 4S</a>, and one of the main selling points for iOS 5, the new mobile operating system on which the iPhone 4S ran, was <a href="http://www.apple.com/icloud/">iCloud</a>, Apple's solution to storing things in the cloud. Naturally, I wanted to have it.<br /><br />

But iCloud requires Lion 10.7.2 to be on <i>all</i> of your devices before even migrating from MobileMe or really committing to a new iCloud account, which meant I had no choice &mdash; I needed to update my server OS.<br /><br />

<hr /><br /><br />

I decided to take a different approach this time. Rather than making a bootable backup, a Time Machine backup, and hoping the upgrade process "just works", I decided to export <i>everything</i> from each respective service. I analyzed the services I really needed versus the things that were somewhat legacy or an experiment from when I first started playing with OS X Server. For me, that amounted to (roughly in order):</p><ul>	<li class="to-html-ul">		 Filesharing. This is the big one. On Snow Leopard Server, I used AFP, SMB, and FTP. AFP was without a doubt the most necessary, but several of my Windows friends used SMB, and FTP is a good universal-even-if-a-pain protocol for sharing files.	</li>	<li class="to-html-ul">		 VPN. This is very important as well, not only for me to access the network from anywhere, but also for several of my friends in China who use this to get around the internet censorship &mdash; the "Great Firewall" &mdash; in China.	</li>	<li class="to-html-ul">		 Various means of access for me, such as Screen Sharing (VNC) or SSH. These are easy to configure, and only I use them, so it would be no issue to set up from scratch if need be. 	</li>	<li class="to-html-ul">		 Time Machine. My wife and I use this machine for Time Machine backups of our other computers. This sort of fits in the filesharing, but is related also to user accounts and permissions. 	</li>	<li class="to-html-ul">		 iCal hosting. For events that require extra coordination, such as our wedding in China last year, I set up calendars for people to subscribe to. Sure, I could do this on MobileMe or Google Calendar or any other number of things, but I like doing it here.	</li></ul>
<p>And the things I previously had but realized I no longer need:</p><ul>	<li class="to-html-ul">		 Wiki. Seriously?	</li>	<li class="to-html-ul">		 Mail. Again, seriously? I've got so many freaking email addresses the last thing I need is to maintain another that is solely my responsibility.	</li>	<li class="to-html-ul">		 iChat. I can see how this is a great service for some, but I have enough ways to communicate with other users.	</li></ul>
<p>For everything in the first list, I exported all of the settings from Server Admin.app. The app makes it remarkably easy to export configuration files, which can later be imported. Using the upgrade guide Apple released, I also made several com.apple. ... .plist backups from the System Library.<br /><br />

And then I pressed go.<br /><br />

I had mostly the same errors as I did back in July, which surprised me, seeing as how they've already had a number of "bugfix" updates. And when the installation was complete, sure enough, the user accounts were gone, and half of the services were disabled. But rather than trying to correct all the problems at one time &mdash; say, by restoring files in System Library from my backup &mdash; I addressed each service as needed:<br /><br />

I reimported the user accounts from the exported list, as well as the groups, I removed any previous NAT port-mapping settings I had made with Snow Leopard on my Time Capsule router, verified the sharepoints, etc. <br /><br />

The only thing that gave me a bit of trouble was enabling the L2TP VPN, as Apple had disabled-by-default the less secure but more convenient and universal PPTP. After too long searching the web for reasons why <a href="http://canyouseeme.org">canyouseeme.org</a> couldn't see port 1701, L2TP's port, I found this little nugget on <a href="https://discussions.apple.com/message/16148196#16148196">Apple's Forums</a> from J15BIG suggesting it wasn't the port, but the devices connecting to it refusing the connection because I don't have an SSL certificate:<br /><br />

<blockquote>The issues I was having acutally had nothing to do with my ports, it was my SSL certificate. I didn't pay anyone for a certificate so I didn't have one setup. However, once I setup my server with a self signed certificate, and I added a profile to my phone that told the phone to trust the self signed certificate, the VPN worked flawless.</blockquote><br /><br />

And huzzah! That fixed it.<br /><br />

<hr /><br /><br />

And so, I learned quite a bit from the OS X Lion Server adventure. First, Apple is trying very hard to make the gap between Server & Client smaller. Second, Lion Server seems like it'd be perfect for a normal guy who decides one day he wants the benefits of a Server, but really sucks for people who had gone through the effort to configure everything they needed on Snow Leopard. And third, sometimes breaking a big problem into a bunch of small problems makes the whole process painless and educational.<br /><br />

I'm happy it's over.</p>]]></description>
			</item>			<item>
				<link>http://petercompernolle.com/2011/10/13/iphone4S-sprint-googlevoice</link>
				<title>How the Sprint iPhone Could Change My Life</title>
				<author>Peter</author>
				<pubDate>Wed, 12 Oct 2011 13:22:23 -0500</pubDate>
				<description><![CDATA[<p>My requests are simple: </p><ul>	<li class="to-html-ul">		 I need a phone that can work when I travel for reasonable rates (ie <i>not</i> $4/min)	</li>	<li class="to-html-ul">		 I want a way to send/receive text messages from multiple devices, including the web, while still being able to search all messages in one place (search is very important to me)	</li>	<li class="to-html-ul">		 If possible, I'd like to avoid getting into a contract, even if that means paying the subsidized price for a phone.	</li>	<li class="to-html-ul">		 And finally, of course, I want an iPhone.	</li></ul>
<p>For the last several years I've been able to satisfy these requirements using a complex system of unlocked iPhones, Google Voice, Skype, and a vast array of apps, depending on which one sucks the least. You can see more details in my previous post, <a href="http://petercompernolle.com/2010/11/22/international-roaming-with-skype-and-google-voice">International Roaming with Skype & Google Voice</a>, but essentially I used an unlocked iPhone with a local SIM card, and had Google Voice forward my calls to Skype, which then forwarded my calls to my iPhone wherever I was. This allowed me to manage my call forwarding, text messages, and phones through the web, and also made calls extremely cheap regardless of where I was. <br /><br />

As I mentioned in that post, the method works. I need to take an extra step when making calls, and sending a new contact a text message required a bit more time. But it worked.<br /><br />

Enter <a href="http://www.apple.com/iphone/built-in-apps/messages.html">iMessage on iOS 5</a>, a way to send messages for free to anyone with an iOS device. <br /><br />

Because my Google voice number is not my actual phone number, I'd have to register my iMessage with my email address. Everyone who knows me knows I'm an avid iPhone fan, so they'd expect to be able to send me free messages at my phone number, but this would cost them per-message rates. Furthermore, I'd have to remember whom to contact via iMessage, and whom to contact via Infinite SMS, my Google Voice SMS app of choice.<br /><br />

Well, this confuses things, but it would still work to use my email address and tell people to iMessage me through that. And for Google Voice, everything else remains status quo. Meh. What a drag.<br /><br />

But Sprint, I recently learned, is now <a href="http://www.google.com/googlevoice/sprint/">fully integrated with Google Voice</a>. This means that my Sprint phone number <i>will be my Google Voice number</i>. I can manage my messages online, and when I send messages through iMessage (or receive), it will be completely transparent. No more deciding which app to use. (Though my messages will be in two places, admittedly.) So this solves my Google Voice problem beautifully. I can integrate my Sprint account with Google Voice so I get the benefits without any of the headache.<br /><br />

And it gets better. <br /><br />

The Sprint iPhone 4Ss are GSM unlocked*. To be clear: the iPhones are still locked to Sprint, but when the Sprint network cannot be found, eg in China, I can use a local SIM card, thus avoiding the outrageous $4/min calls expensive text messages. <i>And</i>, because I can use Google Voice on the web, or iMessage through my iPhone, I can still use Google Voice to contact people back in the states without them even knowing the difference. Everyone wins!<br /><br />

So my wife and I switched to Sprint this morning, are saving a bundle of money, and can use Google Voice and iMessage for everything international, almost completely transparent. The only downside is that Sprint's 3G network is roughly a quarter of AT&T's on iPhone 4S (theoretical speed), but I'm on WiFi most of the time so that hardly matters.<br /><br />

*I had to contact Sprint <i>three</i> times to confirm this. All the articles I read about it referred only to <a href="http://www.macworld.com/article/162960/2011/10/how_international_is_the_iphone_4s_world_phone_.html">Jason Snell at MacWorld</a>, who provided no evidence. The Sprint customer service rep was very helpful and called Apple to confirm. My disclaimer: call Sprint yourself.</p>]]></description>
			</item>			<item>
				<link>http://petercompernolle.com/2011/07/29/backups</link>
				<title>And That's Why You Always Have TWO Backups [update]</title>
				<author>Peter</author>
				<pubDate>Sat, 30 Jul 2011 11:02:08 -0500</pubDate>
				<description><![CDATA[<p>And the restore from Time Machine worked perfectly! There were a few directories I had blocked from updates (mostly temporary video processing directories which are huge and constantly changing), but fortunately I could get those from my failed-to-boot bootable backup. Success! I'm back on Snow Leopard!</p>]]></description>
			</item>			<item>
				<link>http://petercompernolle.com/2011/07/29/backups</link>
				<title>And That's Why You Always Have TWO Backups</title>
				<author>Peter</author>
				<pubDate>Thu, 28 Jul 2011 21:23:19 -0500</pubDate>
				<description><![CDATA[<p>Once upon a time, there were three little computers. The three of them lived together in their happy little server farm, and they thought the world was just dandy. <br /><br />

The first little computer loved that he was so quick, and had so much memory, that he just ran processes all day long. He never wanted to stop and backup his system because he was simply too excited, and didn't want to waste his time.<br /><br />

The second little computer too loved thinking quickly, but he understood that if something happened, all of his memories of his happy little life would disappear. This little computer made incremental backups once an hour, which he kept, taking up precious space, for 24 hours, and one per day for a week, and once a week until his memory couldn't take it any longer. <br /><br />

The third little computer had slightly different values. His mommy computer told him that without his memories, he may even forget <i>how</i> to think. This wise little computer take incremental backups, just like his friend, but he also kept fully bootable backups, which he made twice a week, and stored them on a different drive. <br /><br />

One day, the three little computers were going about their normal routine, when a scary &mdash; fill in the blank here with virus, power surge, mistaken setting change, failed drive, OS upgrade, or thief, and let's just call him a wolf &mdash; came along and thought those computers looked mighty delicious. <br /><br />

He walked up to the first little computer and took one huff, and a puff, and he wiped that little bastard's drive without even trying. <br /><br />

That poor little guy had no place to go but to his friend's. But this wolf watched him run over there. The second computer was confident that the wolf would be no match for his time capsule, but alas, the wolf took a huff, and a puff, and when the second computer tried to restore his system, he got some strange looking error for any restore point he tried.<br /><br />

The two computers ran to their wise buddy. The wolf, at this point confident that no one has any solid backup system, took a huff, and a puff, and the time capsule backup failed. But then the smart computer used his off site fully bootable backup made by <a href="http://www.shirt-pocket.com/SuperDuper/SuperDuperDescription.html">SuperDuper!</a> and the system was bullet proof!<br /><br />

And so, my friends, may I remind you. Having a single backup does not always work. You may even go through the effort of making the backup, but if you don't test it, you have no idea.<br /><br />

I was like the third computer. I have incremental backups made via Time Machine, and I make twice weekly backups using SuperDuper!. <br /><br />

I recently installed OS X Lion on my Mac Mini server, and nearly every setting I tried was broken. I spent about a week trying to repair everything, but it seemed every problem I investigated exposed even more problems. Reluctantly, I decided to restore from a bootable backup I had made an hour before the upgrade. But when I attempted this restore, the OS said it couldn't mount the volume. So then I tried to restore from Time Capsule. And, well, at about 15% complete, the display lost signal. The drives are spinning, and the computer is certainly powered on, but I have no I/O. I'm very scared. We'll see how it goes.</p>]]></description>
			</item>			<item>
				<link>http://petercompernolle.com/2011/07/25/issues-upgrading-to-osx-lion</link>
				<title>Issues Upgrading to Lion</title>
				<author>Peter</author>
				<pubDate>Sun, 24 Jul 2011 11:57:19 -0500</pubDate>
				<description><![CDATA[<p>Aside from a mistake I made trying to <a href="http://petercompernolle.com/2011/07/24/remote-osx-lion-installation">upgrade the OS of a remote server</a>, there were a few problems with the upgrade. I've scoured the interwebs in search for people who have had &mdash; and hopefully resolved &mdash; similar problems; I've found several who have had similar problems, but the resolution for each was to restore a backup and wait until the bigs were ironed out. <br /><br />

After the upgrade, I was able to login using my admin account without issues. When checking out the new Server.app, which replaced Server Admin.app, I noticed that ALL user accounts and groups were gone. Poof. Vanished.<br /><br />

For those of you who don't know, user accounts -say, peter, for example &mdash; are actually stored as really long ID numbers. That way, you can change the name of the account, but you the ID is always the same. So you may login using your easy-to-remember account name, but the computer only knows you as that huge ID. <br /><br />

In other words, if I add back an account called peter, it may <i>appear</i> to be corrected, but all those permissions I defined for file sharing still refer to the <i>old</i> ID, not the new one. Thus, the account peter may as well be called kongyifan.<br /><br />

Because I really didn't want to restore from a backup, I checked through all the file shares and noticed that, really, no one stored anything anywhere except me. I guess you guys like reading my stuff and not really storing your own. Which is no problem by me. That made it far easier to restore without actually restoring. I moved a handful of files, mostly in the public directory, back and redefined the permissions. For an organization as small as this one, brute force is often the quickest way to do things &mdash; if this were a bigger organization, however, I'd be pretty upset with Apple, and would have been forced to restore from the backup I made just before the upgrade.<br /><br />

I'm finding a few other annoyances with OS X Lion Server that were no problem on Snow Leopard Server. Namely, I can't yet find a way to define who has what access to what services. For example, previously I was able to define exactly who had VPN access. Now I can either turn VPN on or off, and that's it. I'm not really okay with that and am searching for solutions. File permissions are more conducted in the OS than in the Server administration app, which I also don't much care for. I don't want to need to find files in the Finder and change the permissions by pressing cmd-i and manually changing it &mdash; nor do I want to run a whole bunch of unix commands to <code>chmod</code> or <code>chown</code>.<br /><br />

If I come across any other big changes, I'll be sure to post here. For now, I'm considering this both a good learning opportunity for myself, and also a good opportunity to clean up the good learning opportunities I had back in Snow Leopard. We'll see how it goes from here.</p>]]></description>
			</item>	</channel>
</rss>
