<?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>Jeremy Fry</title>
	<atom:link href="http://www.jeremy-fry.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jeremy-fry.com</link>
	<description>Sir Web Developer</description>
	<lastBuildDate>Tue, 06 Mar 2012 20:13:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>CodeKit, Development Made Easy</title>
		<link>http://www.jeremy-fry.com/codekit-development-made-easy/</link>
		<comments>http://www.jeremy-fry.com/codekit-development-made-easy/#comments</comments>
		<pubDate>Tue, 06 Mar 2012 20:07:56 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Development Process]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[CodeKit]]></category>

		<guid isPermaLink="false">http://www.jeremy-fry.com/?p=200</guid>
		<description><![CDATA[If there is one thing that has always irked me about Javascript and PHP is that there is a complete lack of forced structure. This of course has it advantages to developer who are new to the world of PHP/Javascript/HTML &#8230; <a href="http://www.jeremy-fry.com/codekit-development-made-easy/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If there is one thing that has always irked me about Javascript and PHP is that there is a complete lack of forced structure. This of course has it advantages to developer who are new to the world of PHP/Javascript/HTML etc, making it easy to jump into a language and start learning quickly. But there are huge disadvantage that don&#8217;t even become apparent to someone with a background like mine (I started learning development on my own out of a PHP for Dummies book) until you start looking at a compiled language like Objective C. </p>
<p>What does any of that have to do with Codekit? Once you get use to the idea of being able to break your project up into resources that get imported and referenced as needed, it becomes a little daunting to think about the mess a large Javascript project can become. Unless you spend the time to properly organize yourself you&#8217;ll quickly be looking at a 1k+ line single Javascript file that becomes a headache to try an maintain. Or you&#8217;ll have a folder full of resource, and since Javascript isn&#8217;t compile, a ton of browser requests to go along with all those resources.</p>
<p>That&#8217;s really at the hear of what CodeKit does so well. What drew me into using CodeKit in the first place was the easy support for Less and Sass. What kept me using it rather than any other command line tool was it&#8217;s awesome support for Javascript includes. I&#8217;m able to organize all the javascript element for this website into nice and small files that are easy to maintain, but at the end of the process I&#8217;m only dealing with 1 request back to the server for my Javascript, and 1 request for my CSS. I structure my javascript on my personal machine like this:</p>
<pre>
site
|____resources
|       |___ trees.js
|       |___ leaves.js
|       |___ daycycle.js
|       |___ pikachoose.js
|       |___ fancybox.js
|____functions.js
</pre>
<p>Each of the files in the resource folder holds a separate part of my site&#8217;s functionality such as the leaves on the portfolio page or the shadows/trees that are drawn in the header. Each of these snippets of code are self contained, but more importantly only give me access to the tools I&#8217;ll be using (functions for drawing items like a tree) rather than execute the entire process. I rely on my functions.js file to handle all the logic behind calling these methods.</p>
<p>My functions.js file starts off with a <em>//@codekit-prepend &#8220;resources/trees.js&#8221;,&#8221;resources/leaves.js&#8221;,&#8221;resources/daycycle.js&#8221;;</em> After everything is pulled into the one file I then start my jQuery logic in a document ready call just like any other jQuery file, but all the functions I want to reference are now easily accessible with only 1 request made by the browser!</p>
<p>One little snafu I had that was cleared up by developer <a href="http://twitter.com/bdkjones" target="_blank">@bdkjones</a> was commenting out the CodeKit prepend statement. CodeKit does <strong>not</strong> remove this line, so unless you comment it out you&#8217;ll receive a syntax error when the browser attempts to load your Javascript. CodeKit pulls in the corresponding files and depending on your settings will also minify them reducing the server load even more.</p>
<p>I also apply this same type of organization to my CSS styles. Since the big hype right now is responsive design, stylesheets are starting to get larger and much more complex. I use the Less compiler in CodeKit to help ease this burden. I can take my 3 stylesheets and combine them down into one minified stylesheet. I keep the style broken out by screen size, fullsize.less for the standard styles, phone.less for lower resolution specific items, and print.less (still a work in progress) for printing.</p>
<p>Well CodeKit may not replace all the needs I have, it does make my day to day development a ton easier! If you haven&#8217;t check it out yet you can at <a href="http://incident57.com/codekit/">http://incident57.com/codekit/</a> for the next couple weeks until it officially launches in the App Store. It&#8217;s a free beta, but should be available for around $20 when it launches officially. I&#8217;m a tightwad when it comes to development tools, but this is $20 I will gladly spend as soon as I can.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeremy-fry.com/codekit-development-made-easy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Switch to OS X</title>
		<link>http://www.jeremy-fry.com/the-switch-to-os-x/</link>
		<comments>http://www.jeremy-fry.com/the-switch-to-os-x/#comments</comments>
		<pubDate>Sat, 11 Feb 2012 21:39:37 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[Development Process]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.jeremy-fry.com/?p=167</guid>
		<description><![CDATA[I&#8217;ve taken the big plunge that I never thought I would. Last weekend I sold my HP laptop and made the switch to a Macbook Pro. I&#8217;ve been using OS X at work for the last 3 years for development, &#8230; <a href="http://www.jeremy-fry.com/the-switch-to-os-x/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve taken the big plunge that I never thought I would. Last weekend I sold my HP laptop and made the switch to a Macbook Pro. I&#8217;ve been using OS X at work for the last 3 years for development, but when I get home in the evening I&#8217;ve been strictly a Windows guy. What made me want to make the leap from Redmond to Cupertino? iOS development which requires you to use OS X.<span id="more-167"></span></p>
<p>The change wasn&#8217;t too hard to make since I&#8217;ve been using OS X at work, but I had to find a replacement for all my Windows Dev tools. Here&#8217;s my list of tools I use in Windows and their OS X equivalent where they exists.</p>
<h4>MySql Client</h4>
<div class="wp-caption alignleft" style="width: 160px"><a href="http://www.navicat.com/en/products/navicat_mysql/mysql_overview.html"><img title="Navicat" src="http://www.jeremy-fry.com/wp-content/uploads/2012/02/Screen-Shot-2012-02-10-at-9.12.56-PM-150x150.png" alt="" width="150" height="150" /></a><p class="wp-caption-text">Navicat</p></div>
<p>This one was an easy switch. I&#8217;ve always been a fan of Navicat for Mysql, it has a very decent user interface. Navicat lets you save queries for easy access to data. The graphic interface makes navigating your databases and tables a breeze. There&#8217;s even a feature in the full version that lets you backup databases with the click of a button. The best feature? It&#8217;s available on Windows and OS X so there&#8217;s nothing to worry about when making the switch!</p>
<h4>Terminal &amp; SSH Client</h4>
<p><strong>Windows:</strong></p>
<p>For a long time I was using Putty for my SSH client. Well it certainly was adequate, it doesn&#8217;t feel anything like using the Linux or OS X terminal. Because of that I made the switch from Putty to Cygwin. Cygwin gives you Linux like terminal access on your Windows machine. SSHing into a remote machine is handled just like it is in Linux or OS X and there are a ton of great plugins to add even more functionality.</p>
<p><strong>Mac:</strong><br />
Now it&#8217;s tempting to just settle in and use the built in OS X Terminal app. Well the Terminal app works well without any short comings, iTerm2 takes it to a new level. iTerm2 adds in a ton of awesome features like split pane windows, searchable histories, paste history and autocomplete. Well none of these improvements make a huge difference by them selves, when added together they make a huge difference.</p>
<p>Another awesome feature of iTerm2 is the ability to use a code syntax theme. Well this may not seem like a huge feature at first, once you start using a syntax theme across all your programs it makes switching between editors (Coda to iTerm to xCode) less jarring.</p>
<h4>PHP, Javascript, and HTML</h4>
<p><strong>Windows:</strong></p>
<div class="wp-caption alignright" style="width: 160px"><a href="http://www.mpsoftware.dk/phpdesigner.php"><img title="PHP Designer" src="http://www.jeremy-fry.com/wp-content/uploads/2012/02/phpd8-main2-150x150.png" alt="" width="150" height="150" /></a><p class="wp-caption-text">PHP Designer</p></div>
<p><strong></strong>For PHP/Javascript I&#8217;ve been a big fan of phpDesigner 8. It has great auto completion capabilities that make coding in PHP a dream. It also has syntax support for Javascript, HTML, and CSS3. It will quickly highlight any syntax errors as you type. phpDesigner will also keep track of your custom classes and will add them into its auto complete library.</p>
<p><strong>Mac:</strong></p>
<div class="wp-caption alignright" style="width: 160px"><a href="http://www.panic.com/coda/"><img title="Coda" src="http://www.jeremy-fry.com/wp-content/uploads/2012/02/Screen-Shot-2012-02-10-at-8.57.55-PM-150x150.png" alt="" width="150" height="150" /></a><p class="wp-caption-text">Coda</p></div>
<p><strong></strong>Now if there is one area that I&#8217;m having trouble matching my Windows development tool, it would have to be a code editor. Currently I&#8217;m using Panic&#8217;s Coda to do development in OS X. Well it&#8217;s a beautiful editor with built in FTP and decent code completion, it&#8217;s severely lacking in other aspects. It has serious problems with syntax error detection. There&#8217;s some decent plugins out there that make up for some of Coda&#8217;s short comings.</p>
<h4>Development Effeciency</h4>
<p>There are a couple tools that I haven&#8217;t found an equivalent of for the other operating system. One of my favorite new tools is CodeKit by Brian Jones. Codekit takes all the manual work out of minifying and packing your Javscript and CSS files. It can watch a project directory and will easily pull in any changes and spit out a gorgeously minified version ready for uploading.</p>
<p>As if that wasn&#8217;t enough, CodeKit also lets you take your pick of CSS languages. I&#8217;ve been using LESS for my more recent projects, but you can also take your pick of SASS or Stylus which compile automatically. No need for any Ruby scripts or client side Javascript, CodeKit handles all of it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeremy-fry.com/the-switch-to-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Waiting for the DOM</title>
		<link>http://www.jeremy-fry.com/when-to-wait/</link>
		<comments>http://www.jeremy-fry.com/when-to-wait/#comments</comments>
		<pubDate>Mon, 04 Apr 2011 14:55:35 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[optimization]]></category>

		<guid isPermaLink="false">http://dev.jeremy-fry.com/?p=60</guid>
		<description><![CDATA[UPDATE 2012-02-01: Looks like Woot! caught the hint. Their javascript now fires before the page finishes loading. Should I place my Javascript in the footer or in the header is a question I&#8217;ve seen come under fire a lot lately. &#8230; <a href="http://www.jeremy-fry.com/when-to-wait/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE 2012-02-01:</strong> Looks like Woot! caught the hint. Their javascript now fires before the page finishes loading.</p>
<p>Should I place my Javascript in the footer or in the header is a question I&#8217;ve seen come under fire a lot lately. There are numerous blogs touting the advantages of moving <strong>all</strong> your Javascript to the footer. I haven&#8217;t seen any articles on why moving your Javascript to the footer, or wrapping all jQuery in a document ready is a bad call.</p>
<p>Moving your javascript down the page does have a lot of advantages. To use a common phrase: &#8220;Content is King.&#8221; <span id="more-60"></span>When a user visits your site the first thing they want to see is content! By pushing scripts to the bottom of the page you free up the browser retrieve and display content first. But there are some serious questions you should ask yourself before you move all your scripts to the footer.</p>
<p><strong>Does this Javascript have a profound impact on the users experience?</strong> Does your script dramatically change the way content is displayed or interacted with on your page? If it does, it is worth weighing the what is more important to your visitor. Take a look at <a title="Woot.com" href="http://woot.com" target="_blank">Woot.com</a> for example. They sell 1 product a day, so obviously the most important thing to their visitors is seeing what that one product is. If you click on the image as soon as it&#8217;s visible you get taken to the full size image on a new page. But what if you wait for the page to load? Now your presented with a slideshow of images showing the product from every angle.</p>
<p>This is a prime example of when not to move your scripts to the footer. When I visit Woot.com the first thing I do is click on this product image. If I click too early I&#8217;m punished for it and have to click back on my browser and wait patiently for the page to finish loading. Depending on what time you view Woot.com has a pretty dramatic effect on load times though. Which raises another question.</p>
<p><strong>Does my ad network have an effect on my scripts? </strong> It&#8217;s not that the whole page is loading terribly slow, it&#8217;s that sometimes the ad network is performing painfully slow. This means I get to wait for the ad network to respond before I can use the page the way it was meant to be used. Keep in mind that some ad networks load asynchronously and will not cause your page to hang, but there&#8217;s a lot of them that don&#8217;t. Be mindful of how your ad network delivers ads and adjust your scripts to give a better user experience.</p>
<p><strong>Should I user $(document).ready with my jQuery? </strong>Now that frameworks like jQuery and YUI are becoming excedingly common, it&#8217;s worth looking at how they are effect by script placement. The $(document).ready call with jQuery waits for the entire DOM to be present before running any scripts (this is different than waiting for the page to load). Let take another look at <a title="Woot.com" href="http://woot.com" target="_blank">Woot.com</a>. Their account/login buttons are shown by Javascript.</p>
<p>What I find interesting though, is that which div to display (login or account) is delayed until the DOM is loaded. The account button shown there is the only way to navigate to your account page, but once again you have to wait for the ad network to deliver ads before the rest of the DOM is loaded. If things are moving slowly that day, you have to wait up to 5 seconds to see something that is loaded and ready, but hidden from you!</p>
<p><strong>How can you fix this issues? </strong>Be careful about what you put in the footer and what you put in a DOM loaded function. If you have something user critical, don&#8217;t be afraid to toss in a script tag just after that element with whatever Javascript is needed to make it function correct.</p>
<p>Take advantage of <a title="Google Libraries" href="http://code.google.com/apis/libraries/" target="_blank">Google Libraries API</a>. Using a Google hosted version of jQuery (or other framework) gives the best chance that your visitor has a cached version, saving load times while keeping the script in the header. Also look at options of compressing or minifying your Javascript so it can live in your header but with a reduced file size.</p>
<p>Don&#8217;t use Javascript for critical functions on your site. Yeah I know it&#8217;s 2011 and Javascript is no longer thought of as an evil thing, but there are still people who chose to browse with Javascript disabled. Keep this in mind when developing and as yourself if you could achieve the same effect with CSS or some server side script.</p>
<p>There really isn&#8217;t a do this, or don&#8217;t do this answer in the end. You have to use your better judgement and remember that just because someone says you should do it, doesn&#8217;t mean it right. Always step back and try to look at thing from the visitors perspective. What am I here for? What do I want to do or see first? In the end you always want your average visitor to be happy, not the guy checking your source and looking for where you included your Javascript.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeremy-fry.com/when-to-wait/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

