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

<channel>
	<title>Code, Hacks and Other Nerdy Things</title>
	<atom:link href="http://spottedsun.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://spottedsun.com</link>
	<description></description>
	<lastBuildDate>Wed, 16 May 2012 04:48:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>CodeIgniter disallowed key characters</title>
		<link>http://spottedsun.com/codeigniter-disallowed-key-characters/</link>
		<comments>http://spottedsun.com/codeigniter-disallowed-key-characters/#comments</comments>
		<pubDate>Wed, 16 May 2012 04:47:00 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[pesky]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://spottedsun.com/?p=480</guid>
		<description><![CDATA[Yes. Disallowed Key Character, is a REALLY annoying error. It shows me absolutely NOTHING. When you&#8217;re developing, you ought to modify this file: system/core/Input.php Modify the following function: _clean_input_keys And just above exit('Disallowed Key Characters.'); Put in: echo "Error string: {$str}"; So now, if you get that PESKY error it&#8217;ll show you where it&#8217;s failing.]]></description>
			<content:encoded><![CDATA[<p>Yes. Disallowed Key Character, is a REALLY annoying error. It shows me absolutely NOTHING.</p>
<p>When you&#8217;re developing, you ought to modify this file:</p>
<pre>system/core/Input.php</pre>
<p>Modify the following function:</p>
<pre>_clean_input_keys</pre>
<p>And just above
<pre>exit('Disallowed Key Characters.');</pre>
<p>Put in:</p>
<pre>echo "Error string: {$str}";</pre>
<p>So now, if you get that PESKY error it&#8217;ll show you where it&#8217;s failing.</p>
]]></content:encoded>
			<wfw:commentRss>http://spottedsun.com/codeigniter-disallowed-key-characters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Will Social Kill Itself?</title>
		<link>http://spottedsun.com/will-social-kill-itself/</link>
		<comments>http://spottedsun.com/will-social-kill-itself/#comments</comments>
		<pubDate>Tue, 01 May 2012 23:20:08 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[meta]]></category>
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://spottedsun.com/?p=469</guid>
		<description><![CDATA[Following my last post about social, Will Google Kill Social Completely I&#8217;ve come to a new realisation: it&#8217;s going to die. Everyone and their dog is doing something in social these days. It&#8217;s a big market. I believe that it&#8217;ll get to the point where people feel enough is enough. They&#8217;ll get sick of it and [...]]]></description>
			<content:encoded><![CDATA[<p>Following my last post about social, <a href="http://spottedsun.com/will-google-kill-social-completely/">Will Google Kill Social Completely</a> I&#8217;ve come to a new realisation: it&#8217;s going to die.</p>
<p>Everyone and their dog is doing something in social these days. It&#8217;s a big market.</p>
<p>I believe that it&#8217;ll get to the point where people feel enough is enough. They&#8217;ll get sick of it and they will have their reasons for no longer thinking social is a big thing. It&#8217;ll probably be the painful realisation everything you&#8217;ve ever done is out there forever. Used to be when you made a real fool of yourself, you could start again with a new group of friends. That&#8217;s really no longer the case.</p>
<p>Think about all the kids that are on Facebook today, in 10 years they&#8217;ll all be getting into the professional industry and (hopefully) helping the planet go forth into the Future with a stride. However, if a simple search of their name is going to show everything they&#8217;ve ever done&#8230; how is anybody ever going to find a job? At least when most of us were young, and stupid we could actually learn and move on with our mistakes and not have it bought up every time at a job interview.</p>
<p>I really don&#8217;t think the social as we know it, is going to stay around very long.</p>
]]></content:encoded>
			<wfw:commentRss>http://spottedsun.com/will-social-kill-itself/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Loading multiple views in same controller (CodeIgniter)</title>
		<link>http://spottedsun.com/loading-multiple-views-in-same-controller-codeigniter/</link>
		<comments>http://spottedsun.com/loading-multiple-views-in-same-controller-codeigniter/#comments</comments>
		<pubDate>Tue, 01 May 2012 00:08:59 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Views]]></category>

		<guid isPermaLink="false">http://spottedsun.com/?p=467</guid>
		<description><![CDATA[If you&#8217;re trying to load more than one view in CodeIgniter, you may find it a bit weird. For example, if you&#8217;re going to load 3 views at the same time within the same function, that&#8217;ll be fine. However, what happens if another function within that same controller wants to load a view? It&#8217;s possible. [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re trying to load more than one view in CodeIgniter, you may find it a bit weird.</p>
<p>For example, if you&#8217;re going to load 3 views at the same time within the same function, that&#8217;ll be fine. However, what happens if another function within that same controller wants to load a view?</p>
<p>It&#8217;s possible. You just need to put a</p>
<pre>return false;</pre>
<p>on the previous function.</p>
<p>Let&#8217;s explain it by simply showing you the code:</p>
<pre class="brush: php; title: ; notranslate">
Class Something extends CI_Controller {
 public function __construct()
 {
  parent::__construct();
  $this-&gt;load-model('some_model');
 }

 public function step_one() {
  $this-&gt;load-&gt;view('some_view');
  return false;
 }

 public function step_two() {
  $this-&gt;load-view('some_view_more');
 }
</pre>
<p>Without the</p>
<pre>return false;</pre>
<p>part, then step_two view won&#8217;t load.</p>
<p>Hope that helps.</p>
]]></content:encoded>
			<wfw:commentRss>http://spottedsun.com/loading-multiple-views-in-same-controller-codeigniter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The next step in the web: from Markup Language to Data Objects</title>
		<link>http://spottedsun.com/the-next-step-in-the-web-from-markup-language-to-data-objects/</link>
		<comments>http://spottedsun.com/the-next-step-in-the-web-from-markup-language-to-data-objects/#comments</comments>
		<pubDate>Fri, 30 Mar 2012 01:41:41 +0000</pubDate>
		<dc:creator>Torleif</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[meta]]></category>
		<category><![CDATA[concept]]></category>
		<category><![CDATA[HTDO]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://spottedsun.com/?p=457</guid>
		<description><![CDATA[Ever since the web was born, it’s been constantly changing. It started off as a text based medium for academics. Now it’s a global media powerhouse, creating entire industries. Yet the foundation of the web hasn’t changed. HTML isn’t even a correct description now, as most of the data is media. Over the past few [...]]]></description>
			<content:encoded><![CDATA[<p>Ever since the web was born, it’s been constantly changing. It started off as a text based medium for academics. Now it’s a global media powerhouse, creating entire industries. Yet the foundation of the web hasn’t changed. HTML isn’t even a correct description now, as most of the data is media.</p>
<p>Over the past few years there’s been a shift in the information schemas of the web. The Data Object notation is becoming de facto; AJAX, config files and data storage are all adopting it. For example the newer nginx uses a JSON like config files, vs Apache’s older XML files. Some bloggers have even claimed XML is dead.</p>
<p>Applying this paradigm to webpages is the next logical step; HTML is still using an ugly dialect of SGML. Hyper Text Data Objects or (or HTDO) are better in many ways:</p>
<ul>
<li><strong>it’s more readable</strong></li>
<li><strong>can be built by objects.</strong> OOP guys will love this: build up the DOM server side using objects (though you can still spit HTDO out as a string). Imagine adding a class to your input tag object, and they all change!</li>
<li><strong>reflects the DOM better.</strong> Inline tags could be a simple string:string relationship, while block level elements could be arrays of other objects. There are a few exceptions, for example it’s handy having anchors as block level elements.</li>
</ul>
<p>Here’s a mockup of what it could look like:</p>
<pre class="brush: plain; title: ; notranslate">
{
        &quot;title&quot;:&quot;webpage&quot;,
        &quot;meta&quot;:&quot;charset:UTF-8&quot;,
        &quot;stylesheet&quot;:&quot;styles/style.css&quot;,
        &quot;content&quot;:
        {
                &quot;h1&quot;:&quot;welcome to my webpage&quot;,
                &quot;p&quot;:&quot;this is my content&quot;,
                &quot;a&quot;: {
                        &quot;href&quot;:&quot;/page2.htdo&quot;,
                        &quot;title&quot;:&quot;click me&quot;,
                        &quot;link&quot;:&quot;the next page&quot;
                }
        }
}
</pre>
<p>Because the DOM can be built both server &amp; client side, it would make for an interesting use of the _target anchor tag attribute. Imagine if you sent #selectorID as a tag, it sent with a header, and the server responded with only the HTML you needed? It would keep your URL intact but feel just as snappy as an AJAX request.</p>
<p>I’d love to see a DOM parser built as an extension in Firefox or Chrome for this experimental format. It might even fit in with Google’s “build a faster web” campaign.</p>
<p>There are a few disadvantages, for example &lt;em&gt;emphasis or bold&lt;/em&gt; tags are more cumbersome. Also putting ID &amp; classes on inline elements is a hairy problem if they&#8217;re strings only. Either you could wrap it in an id, have a CSS selector “string#IDname”:”string”, or have inline elements as arrays. For purity, I’d rather just warp the inline element.</p>
]]></content:encoded>
			<wfw:commentRss>http://spottedsun.com/the-next-step-in-the-web-from-markup-language-to-data-objects/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>django-registration activation error for Django 1.4</title>
		<link>http://spottedsun.com/django-registration-activation-error-for-django-1-4/</link>
		<comments>http://spottedsun.com/django-registration-activation-error-for-django-1-4/#comments</comments>
		<pubDate>Mon, 26 Mar 2012 02:18:51 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[django 1.4]]></category>
		<category><![CDATA[django-registration]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://spottedsun.com/?p=449</guid>
		<description><![CDATA[If you&#8217;re getting the following error when trying to activate an account using Django 1.4 and django-registration: can't compare offset-naive and offset-aware datetimes Then you need to update the source of django-registration manually. The error file will tell you exactly what file to edit. In this case we need to edit: registration/models.py the full path [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re getting the following error when trying to activate an account using Django 1.4 and django-registration:</p>
<pre><code>can't compare offset-naive and offset-aware datetimes</code></pre>
<p>Then you need to update the source of django-registration manually.</p>
<p>The error file will tell you exactly what file to edit. In this case we need to edit:</p>
<pre><code>registration/models.py</code></pre>
<p>the full path to my file was:</p>
<pre><code>/usr/local/lib/python2.6/dist-packages/registration/models.py</code></pre>
<p>The next step is to <a href="https://docs.djangoproject.com/en/1.4/topics/i18n/timezones/">import new timezone support</a>:</p>
<pre><code>from django.utils.timezone import utc</code></pre>
<p>Next go to the bottom of the file, and find:</p>
<pre><code>return self.activation_key == self.ACTIVATED or \
    (self.user.date_joined + expiration_date <= datetime.datetime.now())</code></pre>
<p>And replace with:</p>
<pre><code> return self.activation_key == self.ACTIVATED or \
    (self.user.date_joined + expiration_date <= datetime.datetime.utcnow().replace(tzinfo=utc)) </code></pre>
<p>That should work now!</p>
<p>This is only a hack. I'm not even sure if it's correct. So if you do come across this and you can do better, please let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://spottedsun.com/django-registration-activation-error-for-django-1-4/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Upgrading Django to 1.4</title>
		<link>http://spottedsun.com/upgrading-django-to-1-4/</link>
		<comments>http://spottedsun.com/upgrading-django-to-1-4/#comments</comments>
		<pubDate>Sun, 25 Mar 2012 02:11:47 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[django]]></category>
		<category><![CDATA[1.4]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[version]]></category>

		<guid isPermaLink="false">http://spottedsun.com/?p=442</guid>
		<description><![CDATA[As you should know, the Django team released has released version 1.4  My servers are running on Ubuntu, and to upgrade all I needed to do was use setup-tools: easy_install --upgrade django This will find Django 1.4 and upgrade your current version for you. To check what version you&#8217;re currently running: django-admin --version]]></description>
			<content:encoded><![CDATA[<p>As you should know, the Django team released has released <a href="https://www.djangoproject.com/weblog/2012/mar/23/14/" target="_blank">version 1.4 </a></p>
<p>My servers are running on Ubuntu, and to upgrade all I needed to do was use setup-tools:</p>
<pre><code>easy_install --upgrade django</code></pre>
<p>This will find Django 1.4 and upgrade your current version for you.</p>
<p>To check what version you&#8217;re currently running:</p>
<pre><code>django-admin --version</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://spottedsun.com/upgrading-django-to-1-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What&#8217;s that?</title>
		<link>http://spottedsun.com/videos/</link>
		<comments>http://spottedsun.com/videos/#comments</comments>
		<pubDate>Wed, 21 Mar 2012 21:05:11 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://spottedsun.com/?p=437</guid>
		<description><![CDATA[If you&#8217;re going to use a video to tell me about your website / startup, then please HAVE CAPTIONS I&#8217;m hearing impaired, and if I can&#8217;t understand what the hell is going on, I&#8217;ll leave and probably never return. It&#8217;s not just for hearing impaired people either, some people can&#8217;t hear so well (old peoples), [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re going to use a video to tell me about your website / startup, then please</p>
<h1>HAVE CAPTIONS</h1>
<p>I&#8217;m hearing impaired, and if I can&#8217;t understand what the hell is going on, I&#8217;ll leave and probably never return.</p>
<p>It&#8217;s not just for hearing impaired people either, some people can&#8217;t hear so well (old peoples), or they have no idea how to understand you because of your accent. Then there&#8217;s the non-native speakers.</p>
<p>Again: implement captions. It&#8217;s easily done via<a href=" http://www.universalsubtitles.org/en-gb/" target="_blank"> http://www.universalsubtitles.org/en-gb/</a> (Universal Subtitles)</p>
<p>/rant over</p>
]]></content:encoded>
			<wfw:commentRss>http://spottedsun.com/videos/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>PHP is Pro</title>
		<link>http://spottedsun.com/php-is-pro-2/</link>
		<comments>http://spottedsun.com/php-is-pro-2/#comments</comments>
		<pubDate>Tue, 28 Feb 2012 00:13:16 +0000</pubDate>
		<dc:creator>Torleif</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://spottedsun.com/?p=411</guid>
		<description><![CDATA[Few languages fit their purpose so well. From small four page sites, to large OOP based CMSs, to web apps, I&#8217;ve built it all and delivered on time. I have the reassurance that the site will perform in all conditions and will run on anything from a top of the line rack to a shoebox. [...]]]></description>
			<content:encoded><![CDATA[<p>Few languages fit their purpose so well. From small four page sites, to large OOP based CMSs, to web apps, I&#8217;ve built it all and delivered on time. I have the reassurance that the site will perform in all conditions and will run on anything from a top of the line rack to a shoebox.</p>
<p>In university my professor touted the abilities of PHP, claiming it can pump out thousands of pages per minute on a 486. Doubtful, I did just that. At the time the minimum specs of ASP.NET on Windows Server 2003 was 2gigs of ram.</p>
<p>If you don&#8217;t know what your client will be using, or how much your big your startup will get, PHP has your back. It will run on shared, virtual, standalone or disturbed servers. Very few languages offer such flexibility, and those who made the wrong choice paid for their actions dearly when their sites took off. Unless you&#8217;ve got a flock of geniuses (read:stackoverflow) it&#8217;s going to be hard.</p>
<p>If you&#8217;ve realised that your site would be better being event driven, or under a minimal LAMP, or any other unique config that occurs when scalability issues crop up, PHP offers flexibility. Switching from Apache to Nginx, lighttpd or hiphop means you&#8217;ll save on time and effort.</p>
<p>PHP has the best documentation by far, and a supportive community. The quirks with the language itself are minimal at best.</p>
<p>Yet despite this, /r/programming hates PHP with a passion. This doesn&#8217;t make to me as it&#8217;s a tool that does what it does well.</p>
<p>So Y U hate PHP?</p>
]]></content:encoded>
			<wfw:commentRss>http://spottedsun.com/php-is-pro-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>mod_rewrite isn&#8217;t working? 404?</title>
		<link>http://spottedsun.com/mod_rewrite-isnt-working-404/</link>
		<comments>http://spottedsun.com/mod_rewrite-isnt-working-404/#comments</comments>
		<pubDate>Sun, 12 Feb 2012 22:38:01 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://spottedsun.com/?p=404</guid>
		<description><![CDATA[Today when I was playing with the mod_rewrite that comes with Apache 2.2 my heart skipped a beat &#8211; it wouldn&#8217;t work! Then I realised that for mod_rewrite to work, and not to fall prone to a 404 page it needs: AllowOverride All in the vhosts file for your website. By default, it&#8217;s &#8216;AllowOverride None&#8217;.]]></description>
			<content:encoded><![CDATA[<p>Today when I was playing with the mod_rewrite that comes with Apache 2.2 my heart skipped a beat &#8211; it wouldn&#8217;t work!</p>
<p>Then I realised that for mod_rewrite to work, and not to fall prone to a 404 page it needs:</p>
<p><strong>AllowOverride All</strong></p>
<p>in the vhosts file for your website. By default, it&#8217;s &#8216;AllowOverride None&#8217;.</p>
]]></content:encoded>
			<wfw:commentRss>http://spottedsun.com/mod_rewrite-isnt-working-404/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why C/C++ Sucks</title>
		<link>http://spottedsun.com/why-cc-sucks/</link>
		<comments>http://spottedsun.com/why-cc-sucks/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 20:49:46 +0000</pubDate>
		<dc:creator>Torleif</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://spottedsun.com/?p=394</guid>
		<description><![CDATA[I wrote this post a while ago but didn’t submit it. With the current ycombinator topic of “Programming Is Borked”, now is a great time to submit it. The other day I did something I&#8217;ve done a thousand times before: I cloned a goodie from github tingling with anticipation of hacking, forking and fun. The [...]]]></description>
			<content:encoded><![CDATA[<p><em>I wrote this post a while ago but didn’t submit it. With the current <a href="http://news.ycombinator.com/">ycombinator</a> topic of “<a href="http://evincarofautumn.blogspot.com/2012/01/yep-programming-is-borked.html">Programming Is Borked</a>”, now is a great time to submit it.</em></p>
<p>The other day I did something I&#8217;ve done a thousand times before: I cloned a goodie from github tingling with anticipation of hacking, forking and fun. The code looked nice, cmake ran and then I hit compile.</p>
<p>My heart sank</p>
<p>Hundreds of lines of errors appeared.</p>
<p>Googling the error showed nothing, only snippets of a compiler flag there and a whisper of a linked file there. Changing things made the monster grow as I had forgotten the path home, deleting the project and making a new one didn&#8217;t help either.</p>
<p>I&#8217;ve done this before. Too many times. Most times I give up, and vow never to leave python again.</p>
<h2>Something needs to be fixed</h2>
<p>It&#8217;s 2012 and there&#8217;s still no standard build maker and the compiler is still dumber than a brick. It can&#8217;t find or suggest prerequisites, flags, or source files.</p>
<p>Doing this makes me feel like an idiot. Memorising library names and studying MSVC MSDN pages is superfluous in comparison to coding.</p>
<p>This in depth understanding that is required for pre c/c++ development is ridiculous. The prerequisite is so large social behaviour has to be pushed out the ears so all developers become autistic weirdoes scribbling linker errors on napkins in a cafes while mothers walk past and tell their kids not to make eye contact.</p>
<p>The last thing we should be doing is hunting down libraries and checking compiler flags. We could be writing code.</p>
]]></content:encoded>
			<wfw:commentRss>http://spottedsun.com/why-cc-sucks/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

