<?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>Kalen Johnson Web Developer</title>
	<atom:link href="http://kalenjohnson.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://kalenjohnson.com</link>
	<description></description>
	<lastBuildDate>Sat, 22 Nov 2014 06:23:00 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>Upgrading to Laravel Homestead 2.0 &#8211; and keep your box</title>
		<link>http://kalenjohnson.com/upgrading-to-laravel-homestead-2-0-and-keep-your-box/</link>
		<comments>http://kalenjohnson.com/upgrading-to-laravel-homestead-2-0-and-keep-your-box/#comments</comments>
		<pubDate>Sat, 22 Nov 2014 06:21:05 +0000</pubDate>
		<dc:creator><![CDATA[Kalen Johnson]]></dc:creator>
				<category><![CDATA[Homestead]]></category>
		<category><![CDATA[Laravel]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://kalenjohnson.com/?p=595</guid>
		<description><![CDATA[A friend in the San Diego PHP IRC room told me that Homestead 2.0 was &#8220;sort of&#8221; released the other day. I don&#8217;t know if it&#8217;s officially 2.0 yet, but it&#8217;s been updated on Packagist, and there are some new docs under &#8230; <br /><a href="http://kalenjohnson.com/upgrading-to-laravel-homestead-2-0-and-keep-your-box/">Read More &#187;</a>]]></description>
				<content:encoded><![CDATA[<p>A friend in the San Diego PHP IRC room told me that Homestead 2.0 was &#8220;sort of&#8221; released the other day. I don&#8217;t know if it&#8217;s officially 2.0 yet, but it&#8217;s been updated on Packagist, and there are some <a href="http://laravel.com/docs/master/homestead" target="_blank">new docs</a> under the &#8220;Dev&#8221; docs of Laravel, so why not?</p>
<p>There are some cool new features, like a global installation so that you can run homestead commands from anywhere. Genius! It&#8217;s always a bit of a hassle to have a terminal open to your VM folder if it&#8217;s not a part of the current project, and obviously you can use Homestead on multiple projects. The configuration file is also now outside the main repository, so you will be able to upgrade your Homestead installation without git stashing your Homestead.yaml file.</p>
<p>However, when I did the global Composer install, (and adding `~/.composer/vendor/bin` to my PATH), I noticed that `homestead up` was trying to create a new box, but was erroring out because there was already a box titled &#8220;homestead&#8221;. I also didn&#8217;t feel like removing the old box, since it had all my databases set up in all my projects. So what to do?</p>
<p>Fortunately, in a hidden .vagrant folder, there are two key files, `id` and `index_uuid`. If you did a `homestead up` and it failed, you will find these files in `~/.composer/vendor/laravel/homestead/.vagrant/machines/default/virtualbox`. Copy the two files over from your original Homestead&#8217;s installation, which would be something like `Homestead/.vagrant/machines/default/virtualbox`.</p>
<p>Doing that, you should be able to use the global `homestead` commands and continue on your merry way!</p>
]]></content:encoded>
			<wfw:commentRss>http://kalenjohnson.com/upgrading-to-laravel-homestead-2-0-and-keep-your-box/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Global Git ignored files</title>
		<link>http://kalenjohnson.com/global-git-ignored-files/</link>
		<comments>http://kalenjohnson.com/global-git-ignored-files/#comments</comments>
		<pubDate>Sun, 09 Nov 2014 07:46:12 +0000</pubDate>
		<dc:creator><![CDATA[Kalen Johnson]]></dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Version Control]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://kalenjohnson.com/?p=589</guid>
		<description><![CDATA[Working on multiple projects a month, and having them all in Git, I tend to add a lot of the same files to my .gitignore files. When working on my Macbook, it&#8217;s .DS_Store. I always add .idea to ignore the &#8230; <br /><a href="http://kalenjohnson.com/global-git-ignored-files/">Read More &#187;</a>]]></description>
				<content:encoded><![CDATA[<p>Working on multiple projects a month, and having them all in Git, I tend to add a lot of the same files to my .gitignore files. When working on my Macbook, it&#8217;s .DS_Store. I always add .idea to ignore the PHPStorm folder that&#8217;s created in every project.</p>
<p>However, at the times when I forget to add these files at the beginning of a project, it&#8217;s easy for them to be included accidentally. I just did this the other day, created a new <a href="https://github.com/roots/bedrock" target="_blank">Bedrock</a> project, opened it in PHPStorm to make a few edits. Ran git init from the command line, committed all files, and pushed up to Bitbucket. Then I saw that .idea folder in there. Drat.</p>
<p>So I got a crazy idea. Is there a way to globally ignore files in Git? I can&#8217;t think of any reason where you would want to commit a .DS_Store file. Turns out there is.</p>
<p>It&#8217;s super simple. Create a new .gitignore somewhere, probably ~/.gitignore, or in my case I have a <a href="https://github.com/kalenjohnson/System-Config-Files" target="_blank">system config Github project</a> so I can keep some settings across multiple computers. I added the .gitignore there. So far I&#8217;ve only added .DS_Store and .idea</p>
<p>Then type this command:</p>
<pre>git config &#8211;global core.excludesfile ~/.gitignore</pre>
<p>Easy peasy, and oh so good.</p>
<p><img class="aligncenter size-full wp-image-591" src="http://kalenjohnson.com/media/gif-happy-dance.gif" alt="gif-happy-dance" width="400" height="277" /></p>
]]></content:encoded>
			<wfw:commentRss>http://kalenjohnson.com/global-git-ignored-files/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>One year without a blog post&#8230;. wow</title>
		<link>http://kalenjohnson.com/one-year-without-a-blog-post-wow/</link>
		<comments>http://kalenjohnson.com/one-year-without-a-blog-post-wow/#comments</comments>
		<pubDate>Sun, 02 Nov 2014 22:01:30 +0000</pubDate>
		<dc:creator><![CDATA[Kalen Johnson]]></dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://kalenjohnson.com/?p=584</guid>
		<description><![CDATA[Yesterday I made my first blog post in nearly a year. Wow, how time flies. It&#8217;s pretty amazing to see what&#8217;s happened in the last year, how much I&#8217;ve learned, the projects I&#8217;ve worked on. I&#8217;d like to think I&#8217;m &#8230; <br /><a href="http://kalenjohnson.com/one-year-without-a-blog-post-wow/">Read More &#187;</a>]]></description>
				<content:encoded><![CDATA[<p>Yesterday I made my first blog post in nearly a year. Wow, how time flies. It&#8217;s pretty amazing to see what&#8217;s happened in the last year, how much I&#8217;ve learned, the projects I&#8217;ve worked on.</p>
<p>I&#8217;d like to think I&#8217;m going to get back into blogging. There are always things to talk about, things I learn I want to share. So I think I&#8217;ll try to set aside some time every day to do that. Other people seem to be able to get a quality blog post up every other day at least. So I ask, why not me?</p>
<p><img class="aligncenter size-full wp-image-586" src="http://kalenjohnson.com/media/slide_ask_why_not_me.jpg" alt="slide_ask_why_not_me" width="651" height="200" /></p>
]]></content:encoded>
			<wfw:commentRss>http://kalenjohnson.com/one-year-without-a-blog-post-wow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Never hack WordPress core&#8230; except?</title>
		<link>http://kalenjohnson.com/never-hack-wordpress-core-except-when/</link>
		<comments>http://kalenjohnson.com/never-hack-wordpress-core-except-when/#comments</comments>
		<pubDate>Sun, 02 Nov 2014 05:20:18 +0000</pubDate>
		<dc:creator><![CDATA[Kalen Johnson]]></dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://kalenjohnson.com/?p=569</guid>
		<description><![CDATA[We&#8217;re all good developers. We know never to touch core WordPress files, because on the next WordPress upgrade, those changes will disappear. We don&#8217;t want that, our clients don&#8217;t want that, future developer&#8217;s working on the site don&#8217;t want that. &#8230; <br /><a href="http://kalenjohnson.com/never-hack-wordpress-core-except-when/">Read More &#187;</a>]]></description>
				<content:encoded><![CDATA[<p>We&#8217;re all good developers. We know never to touch core WordPress files, because on the next WordPress upgrade, those changes will disappear. We don&#8217;t want that, our clients don&#8217;t want that, future developer&#8217;s working on the site don&#8217;t want that.</p>
<p>We all know that.</p>
<p>WordPress is set up with an extraordinary amount of hooks and filters so we don&#8217;t need to touch core files. But what about those times when you find something that you <em>CANNOT</em> do without hacking core? What should you do?</p>
<p>The vast majority of the time, you should figure out a new game plan. So far, I haven&#8217;t found anything where I need to permanently hack core files to accomplish something. But I was just in a situation where I found it extremely helpful for a site migration.</p>
<h1>The Story</h1>
<p>I was converting a large magazine / article type site from a custom CMS to WordPress. Article content was imported just fine via a .csv file and the <a href="https://wordpress.org/plugins/csv-importer/" target="_blank">CSV Importer plugin</a>. User import was also relatively straight forward in a similar fashion, using <a href="http://wordpress.org/extend/plugins/import-users-from-csv/" target="_blank">Import Users from CSV</a>. One thing I can&#8217;t stress enough is reading the FAQ&#8217;s, documentation, studying the examples, etc., of these plugins in order to understand how they work and how to get the most benefit out of them.</p>
<p>The issue came from trying to correctly connect posts to users/authors. The old author ID of each post could be imported with the post content, but that didn&#8217;t line up with the new user ID&#8217;s that were assigned to the imported users. I considered doing a comparison of the old user ID&#8217;s with the new ones, and then assigning it a new author ID. That sounded like a headache though, and I felt like doing this:</p>
<p><img class="aligncenter size-full wp-image-574" src="http://kalenjohnson.com/media/banghead.gif" alt="banghead" width="200" height="200" /></p>
<p>So I got to thinking. How can I import the old user&#8217;s with the same ID? That sounded like a good idea. That would make the post import super easy!</p>
<h1>The Plan</h1>
<p>So how would I be able to get the users imported correctly? Diving in to the <a href="http://wordpress.org/extend/plugins/import-users-from-csv/" target="_blank">Import Users from CSV plugin</a>, I found out a few things about how WordPress handles creating and modifying users. It was an interesting learning experience. The key was that I found out that <a href="http://codex.wordpress.org/Function_Reference/wp_create_user" target="_blank">wp_create_user</a> uses <a href="http://codex.wordpress.org/Function_Reference/wp_insert_user" target="_blank">wp_insert_user</a>. And that <a href="http://codex.wordpress.org/Function_Reference/wp_insert_user" target="_blank">wp_insert_user</a> can be used to replace users. Why is that important?</p>
<p>Users in the previous CMS had been deleted, so the ID&#8217;s were in order, but there were holes. For example, it would go from user ID 12 to user ID 20. Inserting users like this would create user ID 12, and then user ID 20 would become 13. And that&#8217;s not what I wanted. But with how <a href="http://codex.wordpress.org/Function_Reference/wp_insert_user" target="_blank">wp_insert_user</a> works, I could replace users according to ID. So with a little help from <a href="http://wp-cli.org/" target="_blank">wp-cli</a>, by using:</p>
<pre>wp user generate &#8211;count=650</pre>
<p>I was able to generate enough users to all be replaced. After the import, a quick search showed all users who had not been replaced, those &#8220;holes&#8221; in ID&#8217;s, and I deleted them. A pretty clean import.</p>
<p>All except for that username. I didn&#8217;t want the users to all be user_&lt;number&gt;, as that is how wp-cli generates fake users. That wasn&#8217;t how they were set up before, obviously. Now what to do?</p>
<h1>The Hack</h1>
<p>WordPress (for good reason) does not allow you to update a user login after it has been created. Not from the dashboard, and not from <a href="http://codex.wordpress.org/Function_Reference/wp_insert_user" target="_blank">wp_insert_user</a> either. What to do? Hack WordPress, of course!</p>
<p><a href="http://codex.wordpress.org/Function_Reference/wp_insert_user" target="_blank">wp_insert_user</a> first of all checks whether you are creating or updating a user. If it&#8217;s a new user, the user info is inserted into the database, and the user_login is added, or else the ID is used and the user_login is ignored. You can see this in the wp-includes/user.php file, from line 1820-1826, as of WordPress 4.0</p>
<p>Notice right above those lines though, on line 1817? An array is being created with user variables. Practically everything but user_login. So what if I added the &#8216;user_login&#8217; string? BAM! Mission complete.</p>
<p>I hacked core, but it was a simple update, and was only happening in my development environment, I didn&#8217;t load this installation of WordPress onto the production server. But the database was complete.</p>
<h1>Moral of the Story</h1>
<p>There&#8217;s a few things I took from this project, and some thoughts that were reinforced.</p>
<ol>
<li>Hack core. Just not permanently. If you have a specific goal to accomplish though, it&#8217;s a no brainer. I&#8217;m glad that I learned at the very beginning of my development career some good practices like not modifying vendor files, but that doesn&#8217;t mean you shouldn&#8217;t know what&#8217;s going on, and what your options are. Knowing how things work means knowing how you can fix issues, what you can work with, what you can break, all those good things. That brings me to point number 2.</li>
<li>Read source code. Know the application you&#8217;re using. It&#8217;s not as scary as you might think, if you don&#8217;t do it already. I know I didn&#8217;t for a long time, I just Googled and hoped for the best. That works, but reading what is <em><strong>ACTUALLY</strong></em> going on is the most helpful.</li>
</ol>
<p><img class="aligncenter size-full wp-image-579" src="http://kalenjohnson.com/media/IW8simF.gif" alt="IW8simF" width="320" height="240" /></p>
<p>&nbsp;</p>
<p>It&#8217;s true, my WordPress core hacking wasn&#8217;t a big deal. But it helped me accomplish a job. Read source code, know what&#8217;s going on, understand what&#8217;s happening behind the scenes, and you&#8217;ll be much better off for it.</p>
]]></content:encoded>
			<wfw:commentRss>http://kalenjohnson.com/never-hack-wordpress-core-except-when/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Box-Shadow and IE9 + IE10 peculiarities</title>
		<link>http://kalenjohnson.com/box-shadow-and-ie9-ie10-peculiarities/</link>
		<comments>http://kalenjohnson.com/box-shadow-and-ie9-ie10-peculiarities/#comments</comments>
		<pubDate>Thu, 14 Nov 2013 23:18:08 +0000</pubDate>
		<dc:creator><![CDATA[Kalen Johnson]]></dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[annoying]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Quick Tip]]></category>

		<guid isPermaLink="false">http://kalenjohnson.com/?p=555</guid>
		<description><![CDATA[I just got finished solving a bit of a frustrating issue. I had an inset box shadow on some elements of a new site. Chrome and Firefox, of course, displayed beautifully. I was using a bit of a trick to &#8230; <br /><a href="http://kalenjohnson.com/box-shadow-and-ie9-ie10-peculiarities/">Read More &#187;</a>]]></description>
				<content:encoded><![CDATA[<p>I just got finished solving a bit of a frustrating issue. I had an inset box shadow on some elements of a new site.</p>
<p>Chrome and Firefox, of course, displayed beautifully. I was using a bit of a trick to get an inset shadow on the top and bottom, but not the sides of a container, with CSS that looks something like this:</p>
<pre>.container { box-shadow: inset 0 -10px 20px -18px black, inset 0 10px 20px -18px black;</pre>
<p>With this, you can create a pretty nice effect. The issue was that IE9 and IE10 looked as if they were not applying the box shadow at all. Strange, I think, so I make sure IE is in standard mode, yep. I started turning other CSS parameters off, nothing helped. I found <a href="http://blog.mi-ernst.de/2013/04/06/ie9-ie10-css-shadow-not-rendered/" target="_blank">this</a> blog post about how</p>
<pre>border-collapse:collapse;</pre>
<p>will cause IE to not display a box-shadow. That wasn&#8217;t my issue though&#8230;.</p>
<p>So I tried making sure box-shadow was working at all in IE10. If I removed my code, did a simple 10px 10px 10px black, yep that worked. Alright, so there&#8217;s something wrong with my CSS rule&#8230; It&#8217;s valid, and it works in Chrome&#8230;.</p>
<p>Playing with the pixels showed me the issue. The rendering of the 4th pixel declaration refers to the shadow&#8217;s spread radius. Making this a negative along with moving the shadow up or down via the 2nd pixel declaration, you can have a box shadow that only appears on the top, or only the left, etc.</p>
<p>Internet Explorer does not render quite the same as Firefox and Chrome, however. What was happening was that the shadow was essentially hidden, not being rendered in the viewable space. Increasing the spread or moving the shadow caused it to be too dark and large in Chrome and Firefox. I settled on reworking it quite a bit:</p>
<pre>box-shadow: inset 0 5px 12px -5px #ccc, inset 0 -5px 12px -5px #ccc;</pre>
<p>This gives a similar effect but renders correctly in all browsers. Using a shade of gray that is much closer to the intended shadow color helps to reduce the need for spread of the shadow.</p>
<p>Cross-browser testing, I tells ya.</p>
]]></content:encoded>
			<wfw:commentRss>http://kalenjohnson.com/box-shadow-and-ie9-ie10-peculiarities/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Shared Hosting or set up a VPS?</title>
		<link>http://kalenjohnson.com/shared-hosting-or-set-up-a-vps/</link>
		<comments>http://kalenjohnson.com/shared-hosting-or-set-up-a-vps/#comments</comments>
		<pubDate>Tue, 29 Oct 2013 06:28:03 +0000</pubDate>
		<dc:creator><![CDATA[Kalen Johnson]]></dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Hosting]]></category>
		<category><![CDATA[VPS]]></category>

		<guid isPermaLink="false">http://kalenjohnson.com/?p=538</guid>
		<description><![CDATA[Many developers working on websites, building WordPress themes, or anything else that is more advanced than standard HTML and CSS static pages need to use PHP or another server-side language to get their sites to be more dynamic. With everything &#8230; <br /><a href="http://kalenjohnson.com/shared-hosting-or-set-up-a-vps/">Read More &#187;</a>]]></description>
				<content:encoded><![CDATA[<p>Many developers working on websites, building WordPress themes, or anything else that is more advanced than standard HTML and CSS static pages need to use PHP or another server-side language to get their sites to be more dynamic. With everything that goes into building and maintaining a website, you may be wondering why you would take all the extra time to also set up your own server as well.</p>
<p>Before I get into the benefits, if you are unsure of what a VPS, or virtual Private server is, let&#8217;s mention that. A VPS is a virtualized operating system, in this case, an entire Linux operating system that you would manage. This means that you would get an actual server, with a set amount of CPU cores, RAM, and hard drive space. This is not the same as a dedicated server, as you are still sharing a larger server with other virtualized operating systems, but in most respects, this is a full server that you can do practically anything with. And unless you sign up for a managed VPS, you generally get a fresh install of your choice of Linux distribution, and you would need to configure nearly everything from the ground up. That means setting up PHP, MySQL, and Apache or Nginx, or anything else you might want to run.</p>
<p>So why would you ever want to learn server administration when shared hosting basically takes care of that for you. It&#8217;s true, it is easy to install WordPress, Joomla, Drupal, and plenty of other popular CMS&#8217;s on shared hosting. It also takes much less configuration. I myself have set up plenty of WordPress sites on many different shared hosting accounts for various clients. But I have moved to a VPS, and recently got a client to move away from shared hosting and host with me. So what are the benefits? Well let me tell you:</p>
<ol>
<li><strong>Freedom</strong> &#8211; Have you ever wanted to use an updated version of PHP, but your host only has a version that is 4 years old? What about one of those fancy server caching programs? With shared hosting, you&#8217;re stuck with whatever they give you. With your own VPS, you can try out, test, and use practically any program and any version you wish. What about Nginx? I don&#8217;t know of very many shared hosts that offer Nginx over Apache.</li>
<li><strong>Security</strong> &#8211; it&#8217;s true that many of the better shared hosts are pretty secure. It&#8217;s also true that setting up your own VPS with security in mind will take more time, not just in the setup, but in research and time reading. After you have the know-how, the ability to SSH to your server, along with using SSH keys, port blocking, user management, and the list can go on, these can go a long way in adding to the security of your server.</li>
<li><strong>Performance</strong> &#8211; This needs to be examined before proclaiming it as absolute over shared hosting, but generally it would be true. With a VPS, you get a chunk of an actual server, and your virtualized OS is yours. CPU time is something that can be over shared, but generally, you know what you are getting, and generally, it will be faster and more flexible than what shared hosts offer. With shared hosting, you do not know how much RAM you have available, how much drive space is left, and generally you are at the mercy of everyone else sharing the server, with the hopes that their sites do not get much traffic or hog a lot of CPU time. On a VPS, you know what you have, you can monitor your resources, and you can find ways to make your server quicker.</li>
</ol>
<p>I could go on, but those are some of the key areas I enjoy from using a VPS. To be fair, I actually enjoy learning how Linux works and setting up servers, learning to do new things with it. I&#8217;m sort of strange like that.</p>
<p>Now let me give you an idea of the flexibility and speed that I have with a VPS that only costs me $40 a year. I recently set up a client&#8217;s site on my dev server, which runs Nginx behind Varnish cache (Varnish is not always on, but to test speed I have it set up). With Varnish correctly set up with WordPress, my client&#8217;s site was loading in around 800ms. We loaded his site on his shared hosting account, which was Yahoo (Biggest. Headache. Ever.) Yahoo was loading his site consistently at around 3-3.5 seconds. Yes, we are talking seconds, but I&#8217;m sure you will agree that page load times mean a lot on the web, and in instances where we are talking 3 to 4 times difference in speed, I call that a huge advantage.</p>
<p>I highly suggest trying out setting up your own server. It can be difficult to get started, but it&#8217;s rewarding, and will help you to continue growing in your developer skills. I won&#8217;t tell you it&#8217;s a walk in the park, it takes some patience, research, some trial and error, and most importantly, time. But you will be rewarded with faster, more secure sites, and more knowledge of how your website runs and should run.</p>
<p>I haven&#8217;t tried too many VPS hosts. I am currently with <a href="http://core.weloveservers.net/aff.php?aff=147" target="_blank&quot;">Weloveservers</a> (that is an affiliate link), and so far I am impressed. Their prices are very competitive, and performance so far is excellent. They only offer support via tickets in the control panel, but they respond very quickly, so I don&#8217;t mind the lack of phone support, (I don&#8217;t like waiting on hold anyways).</p>
<p>Other hosts I have seen high praise for are Linode, Server Grove, and Digital Ocean. I have tried Digital Ocean, and their VPS&#8217;s are snappy, no complaints there. </p>
<p>I will be getting a few tutorials up in the future about my experiences setting up my own servers, so stay tuned</p>
]]></content:encoded>
			<wfw:commentRss>http://kalenjohnson.com/shared-hosting-or-set-up-a-vps/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>An Email from the CEO of Godaddy</title>
		<link>http://kalenjohnson.com/an-email-from-the-ceo-of-godaddy/</link>
		<comments>http://kalenjohnson.com/an-email-from-the-ceo-of-godaddy/#comments</comments>
		<pubDate>Wed, 18 Sep 2013 06:22:26 +0000</pubDate>
		<dc:creator><![CDATA[Kalen Johnson]]></dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://kalenjohnson.com/?p=526</guid>
		<description><![CDATA[A few weeks ago, I received an email from Godaddy. Direct from the CEO, apparently, a certain Blake Irving. Was it actually from him? Not sure, it did have his picture and his signature at the end though, so that &#8230; <br /><a href="http://kalenjohnson.com/an-email-from-the-ceo-of-godaddy/">Read More &#187;</a>]]></description>
				<content:encoded><![CDATA[<p>A few weeks ago, I received an email from Godaddy. Direct from the CEO, apparently, a certain Blake Irving. Was it actually from him? Not sure, it did have his picture and his signature at the end though, so that seems pretty legit.</p>
<p>The email I received talked about being &#8216;courageous&#8217;. Mr. Irving was referring to his clients, and the courage it takes to build your own business and your own website. I think he was also referring to the courage it takes to host a website on their servers.</p>
<p>He continues on after that to talk about the improvements they&#8217;ve made to their website, streamlining everything, improvements to hosting, etc. Visiting their site today, I see they&#8217;ve made it more attractive, and they have Jean Claude Van Damme doing the splits as their first slide on the homepage slider. I can&#8217;t deny how awesome that is.</p>
<p>Unfortunately, claims about improved hosting and world-class customer service I cannot agree with. I decided to reply to Mr. Irving in his email he sent, and I explained to him why I do not recommend Godaddy, and went into a relatively long dialogue about my experience with their hosting service. Was it too long? I don&#8217;t think so, I doubt it took more than 5 minutes to read.</p>
<p>Without copying and pasting my experience I sent to him, I will abbreviate. Basically, I have had two clients with Godaddy hosting I developed WordPress sites with in the last 9 months. I use the <a href="http://roots.io" title="Roots theme" target="_blank">Roots theme</a> as a base, and it makes clever use of redirects to redirect calls to the theme, changing /wp-content/theme/my-theme/assets/ to simply /assets/. This includes the Javascript, Image, and CSS folders. It&#8217;s a simple Apache .htaccess redirect, one line really. It&#8217;s simple and standard stuff.</p>
<p>Anyways, the two clients I had that had new WordPress sites uploaded by myself, were working&#8230;. for a week. I swear, one week, both times. Then the redirects stop working, just like that. No rhyme or reason, other than they worked at first, and a week later, boom, 404&#8217;s on CSS, JS, and image files being loaded from the theme.</p>
<p>The first time it happened, I thought it was my fault, and I freaked out. The second time, I made the connection that it was the 2nd site hosted on Godaddy, and realized it was a redirect issue. So I made the mistake of calling customer support for help.</p>
<p>I can&#8217;t begin to tell you the mistake that was. The person I first talked to said there was an issue with the files not loading. Yes, I agreed, it was a redirect issue. He said nothing had been changed on the server, so it must be something I did. Ok, not a completely illogical conclusion, but I was pretty convinced it was the a redirect that was not loading correctly from the .htaccess file. I asked if he had much experience with .htaccess, he said no, so he got a higher-up tech to help.</p>
<p>This higher-up apparently had experience with WordPress, so she was going to help solve the issue. What she decided to do (I&#8217;m not being indiscriminate, it was stated by the support person it was a woman), she decided to start moving my WordPress installation around in an effort for the files to load correctly, along with modifying the database to get things working. I guess it was a mistake to have WordPress installed in it&#8217;s own folder.</p>
<p>Once she had moved it out of the wp directory, and it still didn&#8217;t work, she told the Godaddy support person that I have hardcoded links to my files in the theme (not even remotely true), and I should fix that. I watched via FTP as she moved around files. I thanked the support person kindly, and I&#8217;m not being sarcastic, for having his tech move my files around without my permission, break my site further, and hand it back to me. He apologized, and that was that.</p>
<p>I reinstalled WordPress and the site&#8217;s theme and database, unsure of exactly all of the &#8220;fixes&#8221; the tech had made. I then proceeded to removed the function that set up the redirects from the theme, and voila, the site loaded perfectly. It has been running fine since then. Just with the longer and un-hidden calls to /wp-content/themes/blah blah blah. No big deal really, but it also shouldn&#8217;t be an issue. And that is MY issue.</p>
<p>Ok, so that turned into another rant. In any case, Godaddy has server issues that they cannot or will not acknowledge. No other hosting company has had this issue. I don&#8217;t even get into how slow their shared or grid servers tend to run. Thus, I told Mr. Irving I don&#8217;t recommend Godaddy for hosting. I don&#8217;t exactly blame him for not responding to my email, after all, I don&#8217;t have hosting with them, and I only have two past clients that have hosting with them, I am a very small fry.</p>
<p>Still, the hundreds or even thousands of experiences of others online who can&#8217;t stand Godaddy are evidence. But I suppose, since their servers are overloaded with hundreds of websites per, that they aren&#8217;t exactly hurting for sales either. So, touchè Godaddy, you have sales, you don&#8217;t need me or my fancy Apache redirects.</p>
<p>PS. Searching for the Godaddy logo on Google, I understand why they get sales. Pretty girls do sell</p>
]]></content:encoded>
			<wfw:commentRss>http://kalenjohnson.com/an-email-from-the-ceo-of-godaddy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Customizing the Roots theme &#8211; Pure CSS and Sass/Compass</title>
		<link>http://kalenjohnson.com/customizing-roots-sass/</link>
		<comments>http://kalenjohnson.com/customizing-roots-sass/#comments</comments>
		<pubDate>Sun, 25 Aug 2013 19:16:18 +0000</pubDate>
		<dc:creator><![CDATA[Kalen Johnson]]></dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Grunt.js]]></category>
		<category><![CDATA[Helpful]]></category>
		<category><![CDATA[Pure CSS]]></category>
		<category><![CDATA[Roots Theme]]></category>
		<category><![CDATA[Yahoo!]]></category>

		<guid isPermaLink="false">http://kalenjohnson.com/?p=501</guid>
		<description><![CDATA[Update 12/30/2013:Roots will now have a maintained version using SASS and Bootstrap. The below walkthrough is still beneficial if you would like to get some more context on swapping LESS or SASS and how a Gruntfile works, but if you&#8217;d &#8230; <br /><a href="http://kalenjohnson.com/customizing-roots-sass/">Read More &#187;</a>]]></description>
				<content:encoded><![CDATA[<p><strong>Update 12/30/2013:<br /></strong>Roots will now have a maintained version using SASS and Bootstrap. The below walkthrough is still beneficial if you would like to get some more context on swapping LESS or SASS and how a Gruntfile works, but if you&#8217;d like to jump straight in, find the new branch here: <a href="https://github.com/roots/roots-sass" target="_blank">https://github.com/roots/roots-sass</a></p>
<p>
<hr />
<p>I&#8217;m starting a new project this week. I&#8217;ve used <a href="http://roots.io/">Roots</a> on quite a few projects now, and enjoy working with it immensely. I also enjoy <a href="http://getbootstrap.com/">Twitter Bootstrap</a>, but in working with it, I&#8217;ve found that it is rather heavy, and when I am handed a completely custom site to develop, I tend to do more overwriting of Bootstrap styling than necessary. So this next project, being that it is also completely custom in design, I wanted to use something much lighter than Bootstrap but still full featured.</p>
<p>Before I continue, I would like to point out that Ben Word and his friends are making impressive strides with Roots. Bootstrap is actually very customizable now, you can work with the LESS files and include or exclude large parts of the Bootstrap framework, and along with using Grunt.js, your css and javascript will be minified and concatenated as well. Pretty handy, and makes for a lean and mean website.</p>
<p>If you&#8217;re not yet familiar with how Roots works, or if you&#8217;re not using Grunt.js to handle this stuff, then you should probably visit the newly opened <a href="http://roots.io/">roots.io</a> site and read up on how to utilize <a href="http://roots.io/using-grunt-for-wordpress-theme-development/">Grunt.js</a>, it&#8217;ll change your life, for reals.</p>
<p>Now, in my particular case, I want to try using a lighter CSS framework, (I love trying out new things), so I&#8217;ll be utilizing <a href="http://purecss.io/">Pure CSS</a> by some of the good folks over at Yahoo. As you can see, the entire framework is only 4.3kb after being minified and gzipped, not too shabby. I also enjoy working with <a href="http://sass-lang.com/">SASS</a> and <a href="http://compass-style.org/">Compass</a> more than LESS, so I&#8217;ll be clearing out Bootstrap and any LESS files and setting up my own SASS files.</p>
<p>Ok, with all of that background set up, let&#8217;s get to the actual tutorial section.</p>
<h2>Setting up the theme</h2>
<p>First thing I did was set up a new local WP installation. I used <a href="http://yeoman.io/">Yeoman</a> and <a href="http://wesleytodd.com/2013/5/yeopress-a-yeoman-generator-for-wordpress.html">Wesley Todd&#8217;s WordPress Generator</a> to do this, but you can do it the old fashioned way as well. What you will want to do next is get the most current Roots theme installed. Either download it from their website or use Git. If you have Git installed, then you can grab it like so:</p>
<pre>git clone git://github.com/retlehs/roots.git</pre>
<p>You can either do this in the wp-content/themes folder, or you can create a symbolic link to it if you are like me and want to keep your themes in their respective working folders (I have all of my work on a separate hard drive in my desktop PC). Now Git is set up and the theme installed, I&#8217;m going to start customizing it a bit.</p>
<p>First thing I did was copy the contents of the app.less file to an app.scss file. So in the theme folder, in assets/less I opened the app.less file, copied the contents of that, and created a new folder in assets called &#8220;sass&#8221;, and created a new file app.scss and pasted in the contents. I also commented out &#8220;@import &#8220;bootstrap/bootstrap.less&#8221;;&#8221; at the top, since I won&#8217;t be using Bootstrap.</p>
<h2>Setting up Pure CSS</h2>
<p>Second, I want to download Pure CSS. There are a lot of options to download it, including Git and Bower. Since this was my first time installing it, I wanted to see how the creators set it up. So, following their <a href="https://github.com/yui/pure">Github</a> page instructions, I cloned the repo in my css folder and set it up with npm and grunt. I used the default commands:</p>
<pre>$ git clone git@github.com:yui/pure.git<br />$ cd pure<br />$ npm install<br />$ grunt</pre>
<p>Now I have a &#8220;pure&#8221; folder in my css folder, and the pure folder has a build that contains all the css. So it&#8217;s ready to go, but I&#8217;ll probably want this included with my main Grunt configuration.  So I open up the Grunt.js file included with Pure, and&#8230;. it&#8217;s over 400 lines long. Hmm&#8230;. ok, perhaps we can skip including ALL of this. For the moment, I&#8217;ll include the generated CSS files and call it a day.</p>
<h2>Removing Bootstrap</h2>
<p>I went into the main Gruntfile.js that is included with the Roots theme, and I commented out the sections that contained Bootstrap specific content. I commented out all .js files under &#8220;uglify&#8221; in the bootstrap folder, as well as the entire &#8220;less&#8221; section under &#8220;watch&#8221;.</p>
<h2>Adding SASS/Compass</h2>
<p>Finally, back near the top of the file, I changed the &#8220;recess&#8221; section, in &#8220;files&#8221;, I changed the line &#8216;assets/less/app.less&#8217; to &#8216;assets/sass/app.scss&#8217;. This is obviously completely optional, depending on the pre-processor you&#8217;d like to use.</p>
<p>After doing this, you can run grunt to make sure everything is working. Remember to type &#8220;npm install&#8221; in the root of the theme if you haven&#8217;t done so yet to get Grunt all initialized. In my case, I ran &#8220;grunt&#8221; and received an error. It was in the &#8220;recess:dist&#8221; task, an Object has no method &#8216;toCSS&#8217;. Right, we need to set up Compass correctly.</p>
<p>If you don&#8217;t have Compass for Grunt already, you can install it:</p>
<pre>npm install grunt-contrib-compass</pre>
<p>Then we have to fix our Gruntfile.js a bit. grunt-recess is actually for LESS, so that won&#8217;t work very well with our SASS/Compass file. I comment out the entire &#8220;recess&#8221; code block, as well as the &#8220;grunt.loadNpmTasks(&#8216;grunt-recess&#8217;);&#8221; from the &#8220;Load Tasks&#8221; section, near the bottom of the file, and finally commented out &#8220;recess&#8221; from the &#8220;Register tasks&#8221; section. Then I add &#8220;grunt.loadNpmTasks(&#8216;grunt-contrib-compass&#8217;);&#8221; to the tasks list, and &#8220;compass&#8221; to the registerTask function.</p>
<p>Now, following the instructions for <a href="https://github.com/gruntjs/grunt-contrib-compass">Grunt Compass</a>, I copy over the Compass section of the initConfig and configure it to my settings:</p>
<pre>compass: {<br />  dist: {<br />    options: {<br />      sassDir: &#8216;assets/sass&#8217;,<br />      cssDir: &#8216;assets/css&#8217;,<br />      environment: &#8216;production&#8217;,<br />      relativeAssets: true<br />    }<br />  }<br />},</pre>
<p>This is basically working, except for two issues: There is an issue at the bottom of the SCSS file, the Media Query section contains some LESS variables, and these are undefined. For the moment, I comment those out. The second issue is that LESS was being compiled to a file called main.min.css, while SASS is compiling to app.css. I thought of creating a &#8216;main.min.scss&#8217; file, and importing the &#8216;app.scss&#8217; file, but that wouldn&#8217;t include Pure. So, instead, I will make use of <a href="https://github.com/gruntjs/grunt-contrib-cssmin">grunt-contrib-cssmin</a></p>
<p>After installing it if you don&#8217;t have it already, add &#8220;grunt.loadNpmTasks(&#8216;grunt-contrib-cssmin&#8217;);&#8221; to the tasks, and add &#8216;cssmin&#8217; to the registered tasks, then I added this under my compass config:</p>
<pre>cssmin: {<br />  combine: {<br />    files: {<br />      &#8216;assets/css/main.min.css': [<br />        &#8216;assets/css/pure/build/pure-min.css&#8217;,<br />        &#8216;assets/css/app.css&#8217;<br />      ]<br />    }<br />  }<br />},</pre>
<p>And now I can run Grunt successfully, with Pure CSS being loaded first, and my SASS/Compass file afterwords. We&#8217;re basically ready to go, other than changing some classes in the template files from Bootstrap to Pure classes.</p>
<p>One final thing we can do is fix the &#8220;watch&#8221; command, so when you type &#8220;grunt watch&#8221;, grunt will watch your SASS/Compass files, and compile and concatenate them after any changes. I added this code after the &#8220;js&#8221; block in the &#8220;watch&#8221; code block:</p>
<pre>sass: {<br />  files: [<br />    &#8216;assets/sass/*.sass&#8217;,<br />    &#8216;assets/sass/*.scss&#8217;<br />  ],<br />  tasks: [&#8216;compass&#8217;, &#8216;cssmin&#8217;, &#8216;version&#8217;]<br />}</pre>
<p>This should be a decent base to start from. It was actually quite a bit of work&#8230; I may just fork Roots or see if I can add a branch that will stay updated with Roots updates but use SASS and Pure. I have a feeling I will be using this again in the future.</p>
<p>Well that&#8217;s all for now, it turned out to be a little long, but hopefully beneficial to some. Let me know if I can improve it or if you&#8217;d do something differently. I&#8217;m relatively new to Grunt as well so I&#8217;m sure that improvements can be made, and I should also update the &#8220;package.json&#8221; file to include the new npm packages.</p>
]]></content:encoded>
			<wfw:commentRss>http://kalenjohnson.com/customizing-roots-sass/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Why we use a Framework or Content Management System</title>
		<link>http://kalenjohnson.com/why-we-use-a-framework-or-content-management-system/</link>
		<comments>http://kalenjohnson.com/why-we-use-a-framework-or-content-management-system/#comments</comments>
		<pubDate>Mon, 19 Aug 2013 21:45:10 +0000</pubDate>
		<dc:creator><![CDATA[Kalen Johnson]]></dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[CMS]]></category>
		<category><![CDATA[Content Management System]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://kalenjohnson.com/?p=497</guid>
		<description><![CDATA[After spending some time this past week updating an older website which used plain old HTML and PHP, no CMS, I can safely say that I will never develop another site without some type of framework or Content Management System &#8230; <br /><a href="http://kalenjohnson.com/why-we-use-a-framework-or-content-management-system/">Read More &#187;</a>]]></description>
				<content:encoded><![CDATA[<p>After spending some time this past week updating an older website which used plain old HTML and PHP, no CMS, I can safely say that I will never develop another site without some type of framework or Content Management System in place.</p>
<p>Why do we do this as web developers? Why put so much extra code in place for a simple website?</p>
<p>Because going back to a website without any CMS means that every page needs to be edited individually. Adding a script to the header or footer? Yeah, copy and paste that throughout the site if the header and footer isn&#8217;t shared. Normally on older sites it&#8217;s not. Even if PHP was used.</p>
<p>It&#8217;s also true that a bad developer can butcher and completely misuse a CMS so all the benefits of it are shattered. But hey&#8230; best we can do is work with what we have. I know that I try my best to implement best practices.</p>
<p>Anyways&#8230; my advice for today is: if you haven&#8217;t used a CMS or framework before (which means you are probably doing your sites in straight HTML and CSS), that&#8217;s fine, but by all means&#8230; get on it. Yes, you&#8217;ll need to learn some PHP, but not necessarily all that much. And trust me&#8230; it&#8217;s worth it. Sooooo worth it.</p>
]]></content:encoded>
			<wfw:commentRss>http://kalenjohnson.com/why-we-use-a-framework-or-content-management-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Arch and the Pi &#8211; PHPMyAdmin Installation &#8211; Simple?</title>
		<link>http://kalenjohnson.com/arch-and-the-pi-phpmyadmin-installation-simple/</link>
		<comments>http://kalenjohnson.com/arch-and-the-pi-phpmyadmin-installation-simple/#comments</comments>
		<pubDate>Tue, 06 Aug 2013 17:14:33 +0000</pubDate>
		<dc:creator><![CDATA[Kalen Johnson]]></dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Raspberry Pi]]></category>
		<category><![CDATA[Arch Linux]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[not so simple]]></category>

		<guid isPermaLink="false">http://kalenjohnson.com/?p=491</guid>
		<description><![CDATA[*WARNING*, this post actually is a bit more of a rant than anything else. Alright, so I embarked on setting up PHPMyAdmin on Arch last night. On Debian/Ubuntu, it&#8217;s apt-get install phpmyadmin, and normally after installation, you can log in &#8230; <br /><a href="http://kalenjohnson.com/arch-and-the-pi-phpmyadmin-installation-simple/">Read More &#187;</a>]]></description>
				<content:encoded><![CDATA[<p>*WARNING*, this post actually is a bit more of a rant than anything else.</p>
<p>Alright, so I embarked on setting up PHPMyAdmin on Arch last night. On Debian/Ubuntu, it&#8217;s <code>apt-get install phpmyadmin</code>, and normally after installation, you can log in at http://kalenjohnson.com/phpmyadmin, right?</p>
<p>Of course, the Arch way is &#8220;simple&#8221;, and by simple, they mean unconfigured and unlinked. Don&#8217;t get me wrong, I completely understand what &#8220;Simple&#8221; means to Arch, and I like it and the idea. It does tend to mean learning everything though. How to install, configure, and set up every. piece. of. software. installed. And sometimes it seems like there are added steps not included in the original installation. Take this for example:</p>
<p>Arch Linux&#8217; version of phpMyAdmin includes an .htaccess file. After I had followed the wiki, copied config files over from the phpMyAdmin installation, I was getting the a &#8220;Permission Denied&#8221; page when trying to load phpmyadmin in the browser. At first I thought it was a root folder permission issue, but I wasn&#8217;t about to go messing with folder permissions. Then I find the .htaccess file in <code>/usr/share/webapps/phpMyAdmin</code> simply has &#8220;deny from all&#8221;. The wiki page does say to change this, but my question is, why is it there in the first place? It doesn&#8217;t seem like a security issue if you change it <i>during</i> setup.</p>
<p>I don&#8217;t know, I&#8217;m starting to wonder about ol&#8217; Arch. Yes, you definitely get to know your system, and build it from scratch. But when you have to do simple mundane things like this for no apparent reason, I begin to second guess. Other distro&#8217;s at least do their best to have things set up when you install a program so that you don&#8217;t have to copy around config files and change code unnecessarily.</p>
<p>*shrug*, I guess this post was more of a rant than anything else.</p>
]]></content:encoded>
			<wfw:commentRss>http://kalenjohnson.com/arch-and-the-pi-phpmyadmin-installation-simple/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
