<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Vance Lucas</title>
	
	<link>http://www.vancelucas.com</link>
	<description>Web Entrepreneur and Freelance PHP/Javascript Developer</description>
	<lastBuildDate>Thu, 17 Nov 2011 15:30:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/VanceLucas" /><feedburner:info uri="vancelucas" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Excessive Data Usage with iPhone 4S / iOS5</title>
		<link>http://feedproxy.google.com/~r/VanceLucas/~3/_GNR0Ja8JNg/</link>
		<comments>http://www.vancelucas.com/blog/excessive-data-usage-with-iphone-4s-ios5/#comments</comments>
		<pubDate>Wed, 16 Nov 2011 23:38:18 +0000</pubDate>
		<dc:creator>Vance Lucas</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[ios5]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://www.vancelucas.com/?p=818</guid>
		<description><![CDATA[Got a new iPhone 4S or recently upgraded your iPhone 4 or 3GS to IOS5 and noticing unusually high cellular data usage? Are you close to exceeding your data usage limit when you never have before? Have you already exceeded it? You are not alone. My wife recently traded in her old iPhone 3G for [...]]]></description>
			<content:encoded><![CDATA[<p>Got a new iPhone 4S or recently upgraded your iPhone 4 or 3GS to IOS5 and noticing unusually high cellular data usage? Are you close to exceeding your data usage limit when you never have before? Have you already exceeded it? You are <a href="http://forums.wireless.att.com/t5/Apple-iPhone/Insane-data-usage-with-the-new-iPhone-4s/td-p/2952781">not</a> <a href="https://discussions.apple.com/thread/3410990">alone</a>.</p>
<p>My wife recently traded in her old iPhone 3G for a shiny new iPhone 4S, and within 10 days had exceeded her 200MB AT&amp;T data plan limit when she has never exceeded it before. So what gives? It&#8217;s a new phone, and Siri does transmit voice data back to Apple&#8217;s servers, but could that really have caused the usage?</p>
<h3>Fixing The Data Usage Problem</h3>
<p>Turns out the problem is that Apple ships iOS5 with iCloud data syncing over cellular networks ON by default. This means all the documents and data stored on your phone for all the applications you have installed on your phone will be automatically uploaded to iCloud, decimating your puny cellular data plan you thought you&#8217;d never burn through.</p>
<p>If you are experiencing super high data usage on iOS5, just follow these steps:</p>
<ol>
<li>Navigate to: Settings -&gt; iCloud -&gt; Documents &amp; Data -&gt; Use Cellular</li>
<li>Turn it OFF</li>
<li>Fight with AT&amp;T (or other wireless carrier) about your excessive data usage charges</li>
</ol>
<div>Why Apple would ever think its a good default to sync data and documents for all your phone&#8217;s applications over a cellular network in the world of severely limited data plans and usage based billing is beyond me. This, and the <a href="https://discussions.apple.com/thread/3391947">widespread</a> <a href="http://gizmodo.com/5859278/the-iphone-4s-battery-problem-is-probably-not-because-of-faulty-hardware">battery</a> <a href="http://www.macworld.com/article/163200/2011/10/troubleshoot_iphone4s_battery.html">issues</a> with the iPhone 4S and iOS5 seem to indicate Apple didn&#8217;t do nearly enough field testing with the new phone or OS. Let&#8217;s home they learn from this in the future.</div>
<h3>Usage Before iPhone 4S</h3>
<p><a href="http://www.vancelucas.com/wp-content/uploads/2011/11/Screen-shot-2011-11-16-at-5.08.03-PM.png"><img class="alignnone size-full wp-image-821" title="Screen shot 2011-11-16 at 5.08.03 PM" src="http://www.vancelucas.com/wp-content/uploads/2011/11/Screen-shot-2011-11-16-at-5.08.03-PM.png" alt="" width="529" height="409" /></a></p>
<p>Some months have clearly higher data usage than others depending on how long we were away from home or what we did while we were out with out phones, but we were never in any real danger of going over the low 200MB limit before.</p>
<h3>Data Usage after 10 days with the iPhone 4S</h3>
<p><a href="http://www.vancelucas.com/wp-content/uploads/2011/11/Screen-shot-2011-11-16-at-5.09.04-PM.png"><img class="alignnone size-full wp-image-822" title="Screen shot 2011-11-16 at 5.09.04 PM" src="http://www.vancelucas.com/wp-content/uploads/2011/11/Screen-shot-2011-11-16-at-5.09.04-PM.png" alt="" width="283" height="170" /></a><br />
On the left (green) is my data usage with an Android device, Right (red) is my wife&#8217;s data usage this month with the new iPhone 4S.</p>
<p>My wife got a text alert for 65% data plan usage on Monday, and then one on Friday for 80%, and one the day after on Saturday saying she had gone over her limit (exceeding 100% of the plan) and that we would be billed an additional $15 by AT&amp;T for the overage.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vancelucas.com/blog/excessive-data-usage-with-iphone-4s-ios5/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		<feedburner:origLink>http://www.vancelucas.com/blog/excessive-data-usage-with-iphone-4s-ios5/</feedburner:origLink></item>
		<item>
		<title>How to add Photos to the iPhone Simulator</title>
		<link>http://feedproxy.google.com/~r/VanceLucas/~3/3ifAzqaD7f0/</link>
		<comments>http://www.vancelucas.com/blog/how-to-add-photos-to-the-iphone-simulator/#comments</comments>
		<pubDate>Fri, 16 Sep 2011 19:20:04 +0000</pubDate>
		<dc:creator>Vance Lucas</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[ios simulator]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[iphone simulator]]></category>
		<category><![CDATA[photos]]></category>

		<guid isPermaLink="false">http://www.vancelucas.com/?p=796</guid>
		<description><![CDATA[Building an app that needs to access the photo library but don&#8217;t have any photos in the iPhone simulator? No problem. Follow these simple steps to import photos into the iPhone Simulator: Open the iPhone Simulator Browse to the photo you want to put into the simulator (Finder or web browser) Click and drag the [...]]]></description>
			<content:encoded><![CDATA[<p>Building an app that needs to access the photo library but don&#8217;t have any photos in the iPhone simulator? No problem. Follow these simple steps to import photos into the iPhone Simulator:</p>
<ol>
<li>Open the iPhone Simulator</li>
<li>Browse to the photo you want to put into the simulator (Finder or web browser)</li>
<li>Click and drag the photo over the simulator window. A green &#8220;plus&#8221; icon should appear under your cursor with the simulator frame highlighted. Drop the photo.</li>
<li>Mobile Safari should open on the simulator to the location of the image you just dragged and dropped over it</li>
<ol>
<li>Note that if the image you dropped is linked in a webpage, it will open the link instead of the image URL.</li>
</ol>
<li>Click the mouse down over the image and hold it until a popup window appears.</li>
<li>Click &#8220;Save Image&#8221;</li>
</ol>
<div>The photo will now reside in the &#8220;Saved Photos&#8221; album on the iPhone Simulator. Rince and repeat as many times as you need to get all your photos in the album.</div>
]]></content:encoded>
			<wfw:commentRss>http://www.vancelucas.com/blog/how-to-add-photos-to-the-iphone-simulator/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.vancelucas.com/blog/how-to-add-photos-to-the-iphone-simulator/</feedburner:origLink></item>
		<item>
		<title>Easier Titanium XHR and AJAX Requests</title>
		<link>http://feedproxy.google.com/~r/VanceLucas/~3/wF0Lga3M_kM/</link>
		<comments>http://www.vancelucas.com/blog/easier-titanium-xhr-and-ajax-requests/#comments</comments>
		<pubDate>Thu, 15 Sep 2011 15:15:16 +0000</pubDate>
		<dc:creator>Vance Lucas</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Titanium]]></category>
		<category><![CDATA[mobile app]]></category>
		<category><![CDATA[titanium]]></category>

		<guid isPermaLink="false">http://www.vancelucas.com/?p=787</guid>
		<description><![CDATA[One question I see a lot on the Appcelerator Titanium Developer Q&#38;A is how to perform AJAX requests and/or work with APIs, etc. There is a built-in way to do this with the Ti.Network.HTTPClient module that is pretty easy, but it does have a few drawbacks and &#8220;gotchas&#8221;, like executing the &#8220;success&#8221; event for ANY [...]]]></description>
			<content:encoded><![CDATA[<p>One question I see a lot on the <a href="http://developer.appcelerator.com/questions">Appcelerator Titanium Developer Q&amp;A</a> is how to perform AJAX requests and/or work with APIs, etc. There is a built-in way to do this with the <a href="http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.Network.HTTPClient-object.html">Ti.Network.HTTPClient</a> module that is pretty easy, but it does have a few drawbacks and &#8220;gotchas&#8221;, like executing the &#8220;success&#8221; event for ANY returned status code &#8211; even 500 errors. Since working with APIs is so common with mobile apps, I made a wrapper function modeled after <a href="http://api.jquery.com/jQuery.ajax/">jQuery&#8217;s $.ajax method</a> that I use in all my apps. It shortens the syntax quite a bit and is much more familiar to those who are used to using jQuery.</p>
<p>The usage looks like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// Geocode input text location</span>
app.<span style="color: #660066;">utils</span>.<span style="color: #660066;">ajax</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
    url<span style="color: #339933;">:</span> <span style="color: #3366CC;">'http://maps.googleapis.com/maps/api/geocode/json?address='</span> <span style="color: #339933;">+</span> txtLocation.<span style="color: #660066;">value</span> <span style="color: #339933;">+</span><span style="color: #3366CC;">'&amp;region=us&amp;sensor=true'</span><span style="color: #339933;">,</span>
    method<span style="color: #339933;">:</span> <span style="color: #3366CC;">'get'</span><span style="color: #339933;">,</span>
    success<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>xhr<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #003366; font-weight: bold;">var</span> data <span style="color: #339933;">=</span> JSON.<span style="color: #660066;">parse</span><span style="color: #009900;">&#40;</span>xhr.<span style="color: #660066;">responseText</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        Ti.<span style="color: #660066;">API</span>.<span style="color: #660066;">info</span><span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;OK&quot;</span> <span style="color: #339933;">==</span> data.<span style="color: #000066;">status</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #003366; font-weight: bold;">var</span> res <span style="color: #339933;">=</span> data.<span style="color: #660066;">results</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>res<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Location: &quot;</span> <span style="color: #339933;">+</span> res.<span style="color: #660066;">geometry</span>.<span style="color: #660066;">location</span>.<span style="color: #660066;">lat</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">', '</span> <span style="color: #339933;">+</span> res.<span style="color: #660066;">geometry</span>.<span style="color: #660066;">location</span>.<span style="color: #660066;">lng</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
            <span style="color: #006600; font-style: italic;">// Do something with coordinates</span>
        <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
            Ti.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createAlertDialog</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
                title<span style="color: #339933;">:</span> <span style="color: #3366CC;">'Geocode Error'</span><span style="color: #339933;">,</span>
                message<span style="color: #339933;">:</span> <span style="color: #3366CC;">'Unable to geocode location input'</span>
            <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
    error<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>xhr<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        Ti.<span style="color: #660066;">UI</span>.<span style="color: #660066;">createAlertDialog</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
            title<span style="color: #339933;">:</span> <span style="color: #3366CC;">'Geocode Error'</span><span style="color: #339933;">,</span>
            message<span style="color: #339933;">:</span> <span style="color: #3366CC;">'No location matches found. Please try something else.'</span>
        <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>And the actual code for the utility function:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">/**
 * Application Utilities and Helper Methods
 **/</span>
<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>_app<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    _app.<span style="color: #660066;">utils</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">// AJAX method that mimmicks jQuery's</span>
    _app.<span style="color: #660066;">utils</span>.<span style="color: #660066;">ajax</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>_props<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
        <span style="color: #006600; font-style: italic;">// Merge with default props</span>
        <span style="color: #003366; font-weight: bold;">var</span> o <span style="color: #339933;">=</span> _app.<span style="color: #660066;">combine</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
            method<span style="color: #339933;">:</span> <span style="color: #3366CC;">'GET'</span><span style="color: #339933;">,</span>
            url<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">,</span>
            data<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">,</span>
            contentType<span style="color: #339933;">:</span> <span style="color: #3366CC;">'application/json'</span><span style="color: #339933;">,</span>
&nbsp;
            <span style="color: #006600; font-style: italic;">// Ti API Options</span>
            async<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span>
            autoEncodeUrl<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span>
&nbsp;
            <span style="color: #006600; font-style: italic;">// Callbacks</span>
            success<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">,</span>
            error<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">,</span>
            beforeSend<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">,</span>
            complete<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">null</span>
        <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> _props<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        Ti.<span style="color: #660066;">API</span>.<span style="color: #660066;">info</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;XHR &quot;</span> <span style="color: #339933;">+</span> o.<span style="color: #660066;">method</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;: <span style="color: #000099; font-weight: bold;">\n</span>'&quot;</span> <span style="color: #339933;">+</span> o.<span style="color: #660066;">url</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;'...&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #003366; font-weight: bold;">var</span> xhr <span style="color: #339933;">=</span> Ti.<span style="color: #660066;">Network</span>.<span style="color: #660066;">createHTTPClient</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
            autoEncodeUrl<span style="color: #339933;">:</span> o.<span style="color: #660066;">autoEncodeUrl</span><span style="color: #339933;">,</span>
            async<span style="color: #339933;">:</span> o.<span style="color: #660066;">async</span>
        <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #006600; font-style: italic;">// URL</span>
        xhr.<span style="color: #000066;">open</span><span style="color: #009900;">&#40;</span>o.<span style="color: #660066;">method</span><span style="color: #339933;">,</span> o.<span style="color: #660066;">url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #006600; font-style: italic;">// Request header</span>
        xhr.<span style="color: #660066;">setRequestHeader</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'Content-Type'</span><span style="color: #339933;">,</span> o.<span style="color: #660066;">contentType</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>o.<span style="color: #660066;">beforeSend</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            o.<span style="color: #660066;">beforeSend</span><span style="color: #009900;">&#40;</span>xhr<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #006600; font-style: italic;">// Errors</span>
        xhr.<span style="color: #660066;">setTimeout</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">10000</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        xhr.<span style="color: #000066;">onerror</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            Ti.<span style="color: #660066;">API</span>.<span style="color: #660066;">info</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'XHR &quot;onerror&quot; ['</span><span style="color: #339933;">+</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #000066;">status</span><span style="color: #339933;">+</span><span style="color: #3366CC;">']: '</span><span style="color: #339933;">+</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">responseText</span><span style="color: #339933;">+</span><span style="color: #3366CC;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">null</span> <span style="color: #339933;">!==</span> o.<span style="color: #660066;">error</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #000066; font-weight: bold;">return</span> o.<span style="color: #660066;">error</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #006600; font-style: italic;">// Success</span>
        xhr.<span style="color: #000066;">onload</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #006600; font-style: italic;">// Log</span>
            Ti.<span style="color: #660066;">API</span>.<span style="color: #660066;">info</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'XHR &quot;onload&quot; ['</span><span style="color: #339933;">+</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #000066;">status</span><span style="color: #339933;">+</span><span style="color: #3366CC;">']: '</span><span style="color: #339933;">+</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">responseText</span><span style="color: #339933;">+</span><span style="color: #3366CC;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #006600; font-style: italic;">// Success = 1xx or 2xx (3xx = redirect)</span>
            <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #000066;">status</span> <span style="color: #339933;">&lt;</span> <span style="color: #CC0000;">400</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #000066; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span>
                    <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">null</span> <span style="color: #339933;">!==</span> o.<span style="color: #660066;">success</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                        <span style="color: #000066; font-weight: bold;">return</span> o.<span style="color: #660066;">success</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    <span style="color: #009900;">&#125;</span>
                <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">catch</span><span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    Ti.<span style="color: #660066;">API</span>.<span style="color: #660066;">info</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'XHR success function threw Exception: '</span> <span style="color: #339933;">+</span> e <span style="color: #339933;">+</span> <span style="color: #3366CC;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    <span style="color: #000066; font-weight: bold;">return</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
            <span style="color: #006600; font-style: italic;">// Error = 4xx or 5xx</span>
            <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
                Ti.<span style="color: #660066;">API</span>.<span style="color: #660066;">info</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'XHR error ['</span><span style="color: #339933;">+</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #000066;">status</span><span style="color: #339933;">+</span><span style="color: #3366CC;">']: '</span><span style="color: #339933;">+</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">responseText</span><span style="color: #339933;">+</span><span style="color: #3366CC;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">null</span> <span style="color: #339933;">!==</span> o.<span style="color: #660066;">error</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    <span style="color: #000066; font-weight: bold;">return</span> o.<span style="color: #660066;">error</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #006600; font-style: italic;">// Send</span>
        <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>o.<span style="color: #660066;">data</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            Ti.<span style="color: #660066;">API</span>.<span style="color: #660066;">info</span><span style="color: #009900;">&#40;</span>o.<span style="color: #660066;">data</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            xhr.<span style="color: #660066;">setRequestHeader</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'Content-Type'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'application/x-www-form-urlencoded'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            xhr.<span style="color: #660066;">send</span><span style="color: #009900;">&#40;</span>o.<span style="color: #660066;">data</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
            xhr.<span style="color: #660066;">send</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #006600; font-style: italic;">// Completed</span>
        <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">null</span> <span style="color: #339933;">!==</span> o.<span style="color: #660066;">complete</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000066; font-weight: bold;">return</span> o.<span style="color: #660066;">complete</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">// And it does depend on this code below to combine object properties:</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">// Extend an object with the properties from another </span>
    <span style="color: #006600; font-style: italic;">// (thanks Dojo - http://docs.dojocampus.org/dojo/mixin)</span>
    <span style="color: #003366; font-weight: bold;">var</span> empty <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">function</span> mixin<span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/*Object*/</span> target<span style="color: #339933;">,</span> <span style="color: #009966; font-style: italic;">/*Object*/</span> source<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #003366; font-weight: bold;">var</span> <span style="color: #000066;">name</span><span style="color: #339933;">,</span> s<span style="color: #339933;">,</span> i<span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000066;">name</span> <span style="color: #000066; font-weight: bold;">in</span> source<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
            s <span style="color: #339933;">=</span> source<span style="color: #009900;">&#91;</span><span style="color: #000066;">name</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #009900;">&#40;</span><span style="color: #000066;">name</span> <span style="color: #000066; font-weight: bold;">in</span> target<span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #009900;">&#40;</span>target<span style="color: #009900;">&#91;</span><span style="color: #000066;">name</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">!==</span> s <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #009900;">&#40;</span><span style="color: #000066;">name</span> <span style="color: #000066; font-weight: bold;">in</span> empty<span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> empty<span style="color: #009900;">&#91;</span><span style="color: #000066;">name</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">!==</span> s<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                target<span style="color: #009900;">&#91;</span><span style="color: #000066;">name</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> s<span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #000066; font-weight: bold;">return</span> target<span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// Object</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
    _app.<span style="color: #660066;">mixin</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/*Object*/</span> obj<span style="color: #339933;">,</span> <span style="color: #009966; font-style: italic;">/*Object...*/</span> props<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>obj<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> obj <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
        <span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i<span style="color: #339933;">=</span><span style="color: #CC0000;">1</span><span style="color: #339933;">,</span> l<span style="color: #339933;">=</span>arguments.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">&lt;</span>l<span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
            mixin<span style="color: #009900;">&#40;</span>obj<span style="color: #339933;">,</span> arguments<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #000066; font-weight: bold;">return</span> obj<span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// Object</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">// Create a new object, combining the properties of the passed objects with the last arguments having</span>
    <span style="color: #006600; font-style: italic;">// priority over the first ones</span>
    _app.<span style="color: #660066;">combine</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/*Object*/</span> obj<span style="color: #339933;">,</span> <span style="color: #009966; font-style: italic;">/*Object...*/</span> props<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #003366; font-weight: bold;">var</span> newObj <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> l<span style="color: #339933;">=</span>arguments.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">&lt;</span>l<span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
            mixin<span style="color: #009900;">&#40;</span>newObj<span style="color: #339933;">,</span> arguments<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #000066; font-weight: bold;">return</span> newObj<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span>app<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>The particular organization of this utilities file assumes that your app structure follows the organization model shown in the <a href="https://github.com/appcelerator-titans/tweetanium">Tweetanium example app</a> (using the &#8216;app&#8217; namespace within a single window context), but is easy to adapt if you are not.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vancelucas.com/blog/easier-titanium-xhr-and-ajax-requests/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.vancelucas.com/blog/easier-titanium-xhr-and-ajax-requests/</feedburner:origLink></item>
		<item>
		<title>Count the Number of Object keys/properties in Node.js</title>
		<link>http://feedproxy.google.com/~r/VanceLucas/~3/eiQt-U-WUZA/</link>
		<comments>http://www.vancelucas.com/blog/count-the-number-of-object-keysproperties-in-node-js/#comments</comments>
		<pubDate>Mon, 25 Jul 2011 17:26:25 +0000</pubDate>
		<dc:creator>Vance Lucas</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Node.js]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[nodejs]]></category>

		<guid isPermaLink="false">http://www.vancelucas.com/?p=768</guid>
		<description><![CDATA[When using the excellent formidable library to handle file uploads, I needed to get a count of the number of files unloaded in a multi-part form. Javascript arrays have a .length property that you can use, but objects do not. I instinctively typed: 1 files.length Which returned undefined. So if there is no length property present, an [...]]]></description>
			<content:encoded><![CDATA[<p>When using the excellent <a href="https://github.com/felixge/node-formidable">formidable</a> library to handle file uploads, I needed to get a count of the number of files unloaded in a multi-part form. Javascript arrays have a <code>.length</code> property that you can use, but objects do not. I instinctively typed:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="js" style="font-family:monospace;">files.length</pre></td></tr></table></div>

<p>Which returned <code>undefined</code>. So if there is no length property present, an easy way to count the number of keys or properties of an object in ES5-compliant javascript environments like <a href="http://nodejs.org">Node.js</a> is to use the Object prototype directly:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="js" style="font-family:monospace;">Object.keys(files).length</pre></td></tr></table></div>

<p>A little more typing, but it is fast, efficient, and most importantly: already built-in.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vancelucas.com/blog/count-the-number-of-object-keysproperties-in-node-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.vancelucas.com/blog/count-the-number-of-object-keysproperties-in-node-js/</feedburner:origLink></item>
		<item>
		<title>php|tek 2011</title>
		<link>http://feedproxy.google.com/~r/VanceLucas/~3/YFA89oagPR0/</link>
		<comments>http://www.vancelucas.com/blog/php-tek-2011/#comments</comments>
		<pubDate>Mon, 27 Jun 2011 14:35:23 +0000</pubDate>
		<dc:creator>Vance Lucas</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Speaking Engagements]]></category>
		<category><![CDATA[Titanium]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[speaking]]></category>
		<category><![CDATA[titanium]]></category>

		<guid isPermaLink="false">http://www.vancelucas.com/?p=802</guid>
		<description><![CDATA[Chicago &#8211; May 24-27 php&#124;tek in Chicago was fun as always. It is the best PHP conference I have ever been to, which makes sense, given that it is focused solely on PHP and surrounding technologies. The best thing about the conference is the community feeling in general. You get a real sense that everyone [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; padding: 10px;"><a href="http://tek11.phparch.com/"><img src="http://www.vancelucas.com/wp-content/uploads/2011/05/tek11_SPEAKER_badge_150x150.png" alt="php|tek 2011 Speaker" /></a><br />Chicago &#8211; May 24-27</div>
<p>php|tek in Chicago was fun as always. It is the best PHP conference I have ever been to, which makes sense, given that it is focused solely on PHP and surrounding technologies. The best thing about the conference is the community feeling in general. You get a real sense that everyone there really cares about PHP and is heavily invested in it, which is good for moving the whole language and ecosystem forward.</p>
<p>I myself gave two talks &#8211; one about <a href="http://stackboxcms.com">Stackbox CMS</a>, a new CMS project I have been working on, and one about <a href="http://appcelerator.com">Apppcelerator Titanium Mobile</a> since I have been working with it a lot lately. The presentations are embedded below.<span id="more-802"></span></p>
<h3><a href="http://www.slideshare.net/vlucas/crossplatform-mobile-development-with-titanium" title="Cross-Platform Mobile Development with Titanium" target="_blank">Cross-Platform Mobile Development with Titanium</a></h3>
<div style="width:425px" id="__ss_7238077"><iframe src="http://www.slideshare.net/slideshow/embed_code/7238077" width="425" height="355" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></div>
<h3><a href="http://www.slideshare.net/vlucas/stackbox-cms-nextgeneration-content-management" title="Stackbox CMS: Next-Generation Content Management" target="_blank">Stackbox CMS: Next-Generation Content Management</a></h3>
<div style="width:425px" id="__ss_8153672"><iframe src="http://www.slideshare.net/slideshow/embed_code/8153672" width="425" height="355" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></div>
]]></content:encoded>
			<wfw:commentRss>http://www.vancelucas.com/blog/php-tek-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.vancelucas.com/blog/php-tek-2011/</feedburner:origLink></item>
		<item>
		<title>Android+iPhone SEO App</title>
		<link>http://feedproxy.google.com/~r/VanceLucas/~3/ISZN161AIE8/</link>
		<comments>http://www.vancelucas.com/blog/android-iphone-seo-app/#comments</comments>
		<pubDate>Wed, 13 Apr 2011 20:03:12 +0000</pubDate>
		<dc:creator>Vance Lucas</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Titanium]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[android seo app]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[iphone seo app]]></category>
		<category><![CDATA[mobile app]]></category>
		<category><![CDATA[sem]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[titanium]]></category>

		<guid isPermaLink="false">http://www.vancelucas.com/?p=745</guid>
		<description><![CDATA[I just released a new iPhone SEO app and Android SEO app called SEMTab SEO Pro. The basic idea is to keep a list of domains saved, and check SEO/SEM stats like Google PageRank (PR), backlinks, Alexa rank, etc. and Social share information from Twitter, Facebook, and Delicious. The first two pictures are of the iPhone app, [...]]]></description>
			<content:encoded><![CDATA[<p>I just released a new iPhone SEO app and Android SEO app called <a title="SEMTab SEO Pro - SEO+SEM Mobile App" href="http://semtab.com">SEMTab SEO Pro</a>. The basic idea is to keep a list of domains saved, and check SEO/SEM stats like Google PageRank (PR), backlinks, Alexa rank, etc. and Social share information from Twitter, Facebook, and Delicious.<span id="more-745"></span></p>
<p><a href="http://www.vancelucas.com/wp-content/uploads/2011/04/ss1-list.png"><img title="iPhone SEO App - Domain List" src="http://www.vancelucas.com/wp-content/uploads/2011/04/ss1-list-200x300.png" alt="iPhone SEO App - Domain List" width="200" height="300" /></a> <a href="http://www.vancelucas.com/wp-content/uploads/2011/04/ss2-web.png"><img class="alignnone size-full wp-image-749" title="iPhone SEO App - Web SEO Stats" src="http://www.vancelucas.com/wp-content/uploads/2011/04/ss2-web.png" alt="iPhone SEO App - Web SEO Stats" width="200" height="300" /></a> <a href="http://www.vancelucas.com/wp-content/uploads/2011/04/ss3-social1.png"><img class="alignnone size-medium wp-image-752" title="Android SEO App - Social URL Shares" src="http://www.vancelucas.com/wp-content/uploads/2011/04/ss3-social1-180x300.png" alt="" width="180" height="300" /></a></p>
<p>The first two pictures are of the iPhone app, and the last one is of the Android app. SEMTab SEO Pro was built with <a title="Appcelerator Titanium" href="http://appcelerator.com">Titanium</a> using all native cross-platform UI controls, so it builds both the iPhone and Android app from a single codebase and a single development effort.</p>
<p>The nice thing about SEMTab is that it makes extensive use of Titanium&#8217;s event system to fire off simultaneous asynchronous HTTP requests to the various web services and APIs to fetch data about the current domain you are checking. This prevents the application from locking up while fetching rank or share information, and it prevents the HTTP requests from stacking up in a queue and waiting for the ones in front of it to finish. The end result is a pretty slick &amp; simple SEO app that gets the results you want quickly, without feeling sluggish or unresponsive.</p>
<p>Check out <a href="http://semtab.com">SEMTab SEO Pro</a> in the <a href="http://itunes.apple.com/us/app/semtab-seo-pro/id427828181?mt=8&amp;ls=1">App Store</a> or the <a href="https://market.android.com/details?id=com.actridge.semtab.seopro">Android Market</a> when you get the chance — and don&#8217;t forget to leave some feedback with a rating.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vancelucas.com/blog/android-iphone-seo-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.vancelucas.com/blog/android-iphone-seo-app/</feedburner:origLink></item>
		<item>
		<title>Protected vs Private Scope: Arrogance, Fear, and Handcuffs</title>
		<link>http://feedproxy.google.com/~r/VanceLucas/~3/bwYsX7FDFdk/</link>
		<comments>http://www.vancelucas.com/blog/protected-vs-private-scope-arrogance-fear-and-handcuffs/#comments</comments>
		<pubDate>Mon, 04 Apr 2011 14:19:48 +0000</pubDate>
		<dc:creator>Vance Lucas</dc:creator>
				<category><![CDATA[Opinion]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[method scope]]></category>
		<category><![CDATA[oop]]></category>
		<category><![CDATA[private vs protected]]></category>

		<guid isPermaLink="false">http://www.vancelucas.com/?p=721</guid>
		<description><![CDATA[The age old private vs protected debate has been re-ignited in the PHP community recently following the decision of Doctrine2 and Symfony2 to make all class methods private until there is a very clear and proven reason to change them to protected or public. The intention is a good one &#8211; to ensure they are [...]]]></description>
			<content:encoded><![CDATA[<p>The age old private vs protected debate has been re-ignited in the PHP community recently following the decision of <a href="http://groups.google.com/group/symfony-devs/browse_thread/thread/58a0d015622c13cb">Doctrine2 and Symfony2 to make all class methods private</a> until there is a very clear and proven reason to change them to protected or public. The intention is a good one &#8211; to ensure they are providing a clear and stable API through intentional and known extension points that they can better test and support. Fabien (the creator of Symfony) points to this benefit in an <a href="http://fabien.potencier.org/article/47/pragmatism-over-theory-protected-vs-private">article of his own</a> explaining the thinking behind the decision. The primary started point of Fabien&#8217;s article and the driving thought behind this whole change and philosophy is (emphasis his):</p>
<blockquote><p><strong>Having a few well defined extension points force the developer to extend your library the right way instead of hacking your code.</strong></p></blockquote>
<p>The problem is that this kind of thinking is a slippery slope that kills the spirit of programming. It alienates the more pragmatic developers within communities. Telling other developers that you are going to force them to work with your code in some pre-determined &#8220;right way&#8221; is an incredibly arrogant statement to make.<span id="more-721"></span> Instead of letting the codebase grow organically and be modified or extended at will, you handcuff developers and send them a different message. Allow me to re-phrase it using my own words:</p>
<blockquote><p>I know the right way to use this code and I have thought of all the possible use cases. If you don&#8217;t agree, then you have to prove me wrong and wait until I either agree or figure out a better right way for you.</p></blockquote>
<p>This is the real message developers hear when internal code is private scope or marked with the final keyword &#8211; a message that they have arbitrarily limited power and ability to make changes where they need to. But it doesn&#8217;t stop there.</p>
<p>When you take the position that all methods should be private unless proven otherwise, you plant a seed of fear in the developers that use your code. Fear that whenever they may have to veer off the beaten path to meet a project requirement they won&#8217;t be able to. Fear that they might miss deadlines waiting for the &#8220;right way&#8221;  to enable the functionality they need. Fear that they might have to modify or hack the actual file or class they need to change the behavior of to achieve the functionality they want within the project deadline because they are not able to extend it.</p>
<p>Using private scope removes the fun from programming and kills the hacking spirit by creating fear through the knowledge that you will not have the ability to make changes anywhere in the codebase you need to when you need to. You are no longer in control of your own code. You were forced to submit to a <a href="http://blog.astrumfutura.com/2011/03/private-vs-protected-methods-the-debate-that-never-ends/">nanny state mentality</a> by sacrificing your freedoms to modify the code for the promise of future stability and safety. That&#8217;s not a fun place to be when you&#8217;re on the receiving end, and it&#8217;s not a policy I would ever consider enforcing with my own code. I sincerely hope this line of thinking does not proliferate within the PHP community and infect other projects.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vancelucas.com/blog/protected-vs-private-scope-arrogance-fear-and-handcuffs/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		<feedburner:origLink>http://www.vancelucas.com/blog/protected-vs-private-scope-arrogance-fear-and-handcuffs/</feedburner:origLink></item>
		<item>
		<title>Self Employed</title>
		<link>http://feedproxy.google.com/~r/VanceLucas/~3/wJDKTaQK_TA/</link>
		<comments>http://www.vancelucas.com/blog/self-employed/#comments</comments>
		<pubDate>Tue, 22 Mar 2011 15:55:51 +0000</pubDate>
		<dc:creator>Vance Lucas</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.vancelucas.com/?p=714</guid>
		<description><![CDATA[This post comes with a bit of a delay, as it is already three months into the year, but as of January 2011, I have been full time self-employed. I made the difficult decision to voluntarily leave an excellent job with Company52 at the beginning of the year to venture out on my own. Running my [...]]]></description>
			<content:encoded><![CDATA[<p>This post comes with a bit of a delay, as it is already three months into the year, but as of January 2011, I have been<span style="color: #ff0000;"> </span>full time self-employed. I made the difficult decision to voluntarily leave an excellent job with <a href="http://company52.com">Company52</a> at the beginning of the year to venture out on my own. Running <a href="http://actridge.com">my own company</a> with full-time focus has always been one of my dreams, and several side projects I have started and been involved with up until now have built up towards that goal.</p>
<p>There is a lot to consider in a decision like this, and I did not weigh it lightly. Somehow after running through all the options, now still seemed like the best time to take the leap. Here&#8217;s to a bright future in 2011 and beyond.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vancelucas.com/blog/self-employed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.vancelucas.com/blog/self-employed/</feedburner:origLink></item>
		<item>
		<title>MySQL Error: 1033 Incorrect information in file</title>
		<link>http://feedproxy.google.com/~r/VanceLucas/~3/rrkEg12gDEM/</link>
		<comments>http://www.vancelucas.com/blog/mysql-error-1033-incorrect-information-in-file/#comments</comments>
		<pubDate>Wed, 02 Mar 2011 20:52:27 +0000</pubDate>
		<dc:creator>Vance Lucas</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[mysql errors]]></category>

		<guid isPermaLink="false">http://www.vancelucas.com/?p=705</guid>
		<description><![CDATA[I recently encountered this error on Disposeamail &#8211; a free disposable email site of mine that uses MySQL heavily for storing all incoming mail through an email pipe script. I did a lot of researching, and basically, there are a few primary culprits I was able to identify that will hopefully save you some time. Check your [...]]]></description>
			<content:encoded><![CDATA[<p>I recently encountered this error on <a href="http://disposeamail.com">Disposeamail</a> &#8211; a free disposable email site of mine that uses MySQL heavily for storing all incoming mail through an email pipe script.</p>
<p>I did a lot of researching, and basically, there are a few primary culprits I was able to identify that will hopefully save you some time.</p>
<p><span id="more-705"></span></p>
<h3>Check your /tmp directory</h3>
<p>MySQL will produce this error sometimes when the temp directory is not writeable.</p>
<ol>
<li>Ensure that <strong>/tmp</strong> (and/or /var/tmp) has the <strong>correct permissions</strong> (777)</li>
<li>Check the <strong>my.cnf </strong>file and search for a <strong>tmpdir</strong>=/tmp flag. Ensure the value is pointing to the correct temp directory.</li>
<li>Ensure your <strong>/tmp directory is not full</strong></li>
</ol>
<h3>Check your my.cnf</h3>
<ol>
<li>If you <strong>made changes</strong> recently, <strong>revert them</strong> and restart MySQL (especially InnoDB Buffer Pool settings)</li>
<li><strong>Restore my.cnf.back</strong> is there is one</li>
<li>If you are using <strong>InnoDB tables</strong>, ensure the <strong>skip-innodb</strong> line in my.cnf is <strong>commented out</strong> or removed.</li>
</ol>
<h3>Clear InnoDB Log Files</h3>
<p>This step <strong>ONLY APPLIES IF THE ABOVE STEPS DID NOT WORK</strong>.</p>
<p>Read the <a href="http://dev.mysql.com/doc/refman/5.0/en/innodb-data-log-reconfiguration.html">MySQL Manual page on removing InnoDB log files</a> for a safer backup and restoration procedures. Basically, the steps are:</p>
<ol>
<li>Shut down MySQL</li>
<li><strong>Remove ib_logfile*</strong> files from the MySQL data directory (move them or rename them if you want to be safe)</li>
<li>Re-start MySQL</li>
</ol>
<p>My specific problem was that somehow the &#8220;skip-innodb&#8221; line got added back into my &#8220;my.cnf&#8221; file, so MySQL was expecting a different table format when loading data. I suspect this had something to do with my cPanel/WHM setup overwriting the file, but I&#8217;ll never know for sure.</p>
<p>Good Luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vancelucas.com/blog/mysql-error-1033-incorrect-information-in-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.vancelucas.com/blog/mysql-error-1033-incorrect-information-in-file/</feedburner:origLink></item>
		<item>
		<title>Listing Aliases Inside an Android Keystore File With Keytool</title>
		<link>http://feedproxy.google.com/~r/VanceLucas/~3/_ayd7rQzs0w/</link>
		<comments>http://www.vancelucas.com/blog/listing-aliases-inside-an-android-keystore-file-with-keytool/#comments</comments>
		<pubDate>Thu, 30 Dec 2010 04:00:56 +0000</pubDate>
		<dc:creator>Vance Lucas</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[android sdk]]></category>
		<category><![CDATA[keystore]]></category>
		<category><![CDATA[keystore alias]]></category>
		<category><![CDATA[keytool]]></category>

		<guid isPermaLink="false">http://www.vancelucas.com/?p=664</guid>
		<description><![CDATA[If you lose or forget your Android keystore file alias that is used to build APK files for distribution (like I did when trying to package Autoridge Lite for the Android Market), here is a quick and easy way to see them: Open a Terminal Window, Run This Command: 1 keytool -list -keystore /location/of/your/com.example.keystore Make [...]]]></description>
			<content:encoded><![CDATA[<p>If you lose or forget your Android keystore file alias that is used to build APK files for distribution (like I did when trying to package <a href="http://autoridge.com/mobile">Autoridge Lite</a> for the Android Market), here is a quick and easy way to see them:</p>
<ol>
<li>Open a Terminal Window, Run This Command:<br />
</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">keytool <span style="color: #660033;">-list</span> <span style="color: #660033;">-keystore</span> <span style="color: #000000; font-weight: bold;">/</span>location<span style="color: #000000; font-weight: bold;">/</span>of<span style="color: #000000; font-weight: bold;">/</span>your<span style="color: #000000; font-weight: bold;">/</span>com.example.keystore</pre></td></tr></table></div>

<p>Make sure &#8220;keytool&#8221; is either in your PATH, or &#8220;cd&#8221; into the &#8220;tools&#8221; directory where your Android SDK files are.</li>
<li>Enter your keystore password when prompted (you didn&#8217;t forget that too, did you? Did you?)</li>
<li>See results!</li>
</ol>
<p>You should see something like the picture below if you did everything right. The alias is circled in yellow. If you have multiple aliases in your keystore, they will all be listed, one per line.<br />
<span id="more-664"></span><br />
<a href="http://www.vancelucas.com/wp-content/uploads/2010/12/android-keystore-list-aliases.png"><img class="alignnone size-full wp-image-682" title="android-keystore-list-aliases" src="http://www.vancelucas.com/wp-content/uploads/2010/12/android-keystore-list-aliases.png" alt="Google Android List Keystore Aliases" width="777" height="261" /></a></p>
<p>And since you already forgot your keystore alias, I might as well remind you to put your keystore in a safe location so you don&#8217;t lose it. Remember &#8211; if you lose your keystore, you&#8217;re screwed. You won&#8217;t be able to release any updates for the apps you packaged with it. I put mine in my <a href="https://www.dropbox.com/referrals/NTEwNTczODY5">Dropbox</a> for safe keeping. It is synced to three of my personal computers and backed up to an external USB drive in addition to being stored remotely on the Dropbox servers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vancelucas.com/blog/listing-aliases-inside-an-android-keystore-file-with-keytool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.vancelucas.com/blog/listing-aliases-inside-an-android-keystore-file-with-keytool/</feedburner:origLink></item>
	</channel>
</rss>

