<?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/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>Wes Bos</title>
	<atom:link href="https://wesbos.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://wesbos.com</link>
	<description>Designer, Developer &#38; Entrepreneur making the web an awesome place.</description>
	<lastBuildDate>Thu, 12 Dec 2019 20:07:38 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.3.2</generator>
	<item>
		<title>Uses</title>
		<link>https://wesbos.com/uses/</link>
				<comments>https://wesbos.com/uses/#comments</comments>
				<pubDate>Thu, 12 Dec 2019 17:56:00 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3740</guid>
				<description><![CDATA[Everyday I get a few emails asking about the specifics of some piece of software or hardware I use. I change up things fairly often, so this page will serve as a living document and a place to point curious &#8230; <a href="https://wesbos.com/uses/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>Everyday I get a few emails asking about the specifics of some piece of software or hardware I use.</p>
<p>I change up things fairly often, so this page will serve as a living document and a place to point curious developers to when I get asked.</p>
<p>If there is something missing leave a comment below or ask in my <a href="https://github.com/wesbos/ama">AMA</a> — happy to chat and help you figure out your own situation.</p>
<h3>Editor + Terminal</h3>
<ul>
<li><a href="https://code.visualstudio.com/">Visual Studio Code</a> is my current editor which I switched to in September 2017 after years of Sublime Text.</li>
<li><a href="http://SublimeText.com/3dev">Sublime Text</a> V3 beta is used in most of my video tutorials — I write more about my setup in <a href="http://SublimeTextBook.com">my book</a>.</li>
<li>I created a theme called Cobalt2 for <a href="https://marketplace.visualstudio.com/items?itemName=wesbos.theme-cobalt2">VS Code</a>, <a href="https://packagecontrol.io/packages/Theme%20-%20Cobalt2">Sublime Text</a> and <a href="https://github.com/wesbos/Cobalt2-iterm">iTerm2</a> v3 which I use.</li>
<li>I&#8217;m currently using <a href="http://www.typography.com/fonts/operator/overview/">Operator Mono</a> for a font. Yes I paid the $200 for it. Before that I used <a href="http://www.levien.com/type/myfonts/inconsolata.html">Inconsolata</a> for many years.</li>
<li>I use Operator Mono in VS Code and Hyper Term</li>
<li>I&#8217;m currently switching between Firefox Developer and Chrome Canary as my main browser</li>
<li>The cursive font you see is just the italic weight of Operator Mono. Your theme must have italics in it for it to work &#8211; my Cobalt2 uses italics heavily.</li>
<li>I currently use <a href="https://hyper.is/">Hyper</a> for my terminal, but many of my videos show me using iTerm2.</li>
<li>For Sublime Text, The JavaScript suggestions you see in my videos is called <a href="https://packagecontrol.io/packages/JavaScript%20Completions">JavaScript Completions</a> &#8211; you might have to play with the settings to get it to not popup some of the node completions. For VS Code, there are no plugins needed to get this.</li>
<li>You can see most of my config files (.eslint, VS Code settings) over at my <a href="https://github.com/wesbos/dotfiles">Dot Files repo</a> but please don&#8217;t just take these settings carte blanche &#8211; they work for me but might not be the best</li>
</ul>
<h3>Desktop Apps</h3>
<ul>
<li>I use <a href="https://smilesoftware.com/textexpander">Text Expander</a> for canned responses and for most of my code snippets</li>
<li>I&#8217;m a huge <a href="https://www.alfredapp.com/">Alfred</a> fan and have many <a href="http://wes.io/fY7q">workflows</a>.</li>
<li>I use <a href="https://culturedcode.com/things/">Things App</a> with a <a href="http://gettingthingsdone.com/">GTD mindset</a> for managing my tasks.</li>
<li>I design almost entirely in <a href="https://www.sketchapp.com/">Sketch</a></li>
<li>I backup with 2 time machines local HDDs, <a href="http://dropbox.com">Dropbox</a> for most files, and <a href="https://secure.backblaze.com/r/008x60">BackBlaze</a> for my entire hard drive.</li>
<li>The cool Emoji picker you see me use in my videos is <a href="http://matthewpalmer.net/rocket/">Rocket</a></li>
</ul>
<h3>Recording</h3>
<ul>
<li>I use <a href="https://www.telestream.net/screenflow/">ScreenFlow</a> to record and edit my screencasts</li>
<li>I wrote about my <a href="http://wesbos.com/animated-gif-workflow/">animated gif workflow here</a></li>
<li>My mic is a <a href="http://www.amazon.com/gp/product/B000SOYOTQ/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B000SOYOTQ&amp;linkCode=as2&amp;tag=webo080-20&amp;linkId=YH6ZR6GSGBI2JOJF">Heil PR40</a> on a <a href="http://www.amazon.com/gp/product/B000SZVZ74/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B000SZVZ74&amp;linkCode=as2&amp;tag=webo080-20&amp;linkId=HJ6K3KRLOL5XJJSC">PL2T boom arm</a>. Many of my videos were recorded on the cheaper but still amazing <a href="http://www.amazon.com/gp/product/B0006H92QK/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B0006H92QK&amp;linkCode=as2&amp;tag=webo080-20&amp;linkId=PHY64E6Y43GHI55T">AT2020</a></li>
<li>I use a <a href="http://www.amazon.com/gp/product/B004LWH79A/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B004LWH79A&amp;linkCode=as2&amp;tag=webo080-20&amp;linkId=E3KFCLCQIXXLC7W4">DBX286s</a> to do almost all my audio compression and processing as a I record and pipe it into my computer with a <a href="http://www.amazon.com/gp/product/B005OZE9SA/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B005OZE9SA&amp;linkCode=as2&amp;tag=webo080-20&amp;linkId=ELZASVHMTR6ZTNYL">Focusrite 2i2</a></li>
<li>My webcam is a <a href="https://www.amazon.com/gp/product/B006JH8T3S/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&amp;tag=webo080-20&amp;camp=1789&amp;creative=9325&amp;linkCode=as2&amp;creativeASIN=B006JH8T3S&amp;linkId=65a64ee5dd16f2fa18faf2f2d33d0538">Logitech HD Pro c920</a></li>
<li>All this gear is pretty demanding, so I use an <span style="text-decoration: line-through;"><a href="https://www.amazon.com/gp/product/B00VDVCQ84/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B00VDVCQ84&amp;linkCode=as2&amp;tag=webo080-20&amp;linkId=d8d1e7a3e461ab7921373dbc07dfbe38">Anker 7/3 port USB 3.0 hub</a> DIED <img src="https://s.w.org/images/core/emoji/12.0.0-1/72x72/1f635.png" alt="😵" class="wp-smiley" style="height: 1em; max-height: 1em;" /></span> <a href="http://amzn.to/2kVaDCz">Amazon Basics 10 Port USB Hub</a> to make it all work at once while only having to plug in a single cable.</li>
</ul>
<h3>Desk Setup</h3>
<ul>
<li>My main monitor is a 32&#8243; 4k <a href="https://amzn.to/2SYuX8G">LG 32ud59</a></li>
<li>To my right I run a vertical 27&#8243; 4k <a href="http://www.amazon.com/gp/product/B00PC9HFO8/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B00PC9HFO8&amp;linkCode=as2&amp;tag=webo080-20&amp;linkId=5VCVP6ZUPF5GLCUJ">Dell 4k P2715Q</a> and an open loaded macbook pro nested on a <a href="http://www.amazon.com/gp/product/B000OOYECC/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B000OOYECC&amp;linkCode=as2&amp;tag=webo080-20&amp;linkId=XWDACWNC2JWRF3DQ">Rain mStand</a></li>
<li>I sit on a <a href="http://www.amazon.com/gp/product/B000LTAO8S/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B000LTAO8S&amp;linkCode=as2&amp;tag=webo080-20&amp;linkId=6G4M6ZR4CYKT3TM5">polished aluminum Herman Miller aeron</a></li>
<li>My desk is an <a href="http://www.ikea.com/ca/en/catalog/products/20274961/">8 foot oak butcher block countertop</a> on legs</li>
<li>Here is a <a href="https://twitter.com/wesbos/status/1060643936140738560">photo of my setup</a></li>
<li>Everything — Monitors, Ethernet, Hard Drives, Webcam, and Power — is plugged in via a single USB cable and piped into my <a href="https://amzn.to/2D9Jnx0">Caldigit TS3 Plus</a> &#8211; This is a pretty sweet setup!</li>
<li>I currently use a 2019 16&#8243; MacBook Pro 2.3 GHz 8-Core Intel Core i9 with 32gb memory</li>
<li>My last laptop was a 2017 15&#8243; MacBook Pro 3.1GHz i7 with 16gb memory</li>
</ul>
<h3>Other Gear</h3>
<ul>
<li>After a lengthy search for the perfect backpack for both traveling and schlepping gear around the city I bought the <a href="http://amzn.to/2kHB4kc">Peak Design Everyday Backpack 30L</a> and it&#8217;s incredible (and very expensive <img src="https://s.w.org/images/core/emoji/12.0.0-1/72x72/1f611.png" alt="😑" class="wp-smiley" style="height: 1em; max-height: 1em;" />).</li>
</ul>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/uses/feed/</wfw:commentRss>
		<slash:comments>118</slash:comments>
							</item>
		<item>
		<title>Beginner JavaScript</title>
		<link>https://wesbos.com/beginner-javascript/</link>
				<comments>https://wesbos.com/beginner-javascript/#respond</comments>
				<pubDate>Wed, 04 Dec 2019 17:00:12 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">https://wesbos.com/?p=4156</guid>
				<description><![CDATA[It&#8217;s here! I&#8217;m incredible proud to announce Beginner JavaScript — a fun, exercise heavy approach to learning Modern JavaScript from scratch. This is a course I&#8217;ve worked on for over a year, and I&#8217;ve been dreaming of how to make &#8230; <a href="https://wesbos.com/beginner-javascript/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[
<figure class="wp-block-gallery columns-1 is-cropped"><ul class="blocks-gallery-grid"><li class="blocks-gallery-item"><figure><img src="https://wesbos.com/wp-content/uploads/2019/12/BJS-Social-Share-650x431.png" alt="" data-id="4158" data-full-url="https://wesbos.com/wp-content/uploads/2019/12/BJS-Social-Share.png" data-link="https://wesbos.com/?attachment_id=4158" class="wp-image-4158" srcset="https://wesbos.com/wp-content/uploads/2019/12/BJS-Social-Share-650x431.png 650w, https://wesbos.com/wp-content/uploads/2019/12/BJS-Social-Share-300x200.png 300w, https://wesbos.com/wp-content/uploads/2019/12/BJS-Social-Share-768x509.png 768w, https://wesbos.com/wp-content/uploads/2019/12/BJS-Social-Share.png 1200w" sizes="(max-width: 650px) 100vw, 650px" /></figure></li></ul></figure>



<p>It&#8217;s here! I&#8217;m incredible proud to announce Beginner JavaScript — a fun, exercise heavy approach to learning Modern JavaScript from scratch. This is a course I&#8217;ve worked on for over a year, and I&#8217;ve been dreaming of how to make the best introduction to JavaScript for years now. </p>



<p>A rock solid understanding of JavaScript is essential for success, no matter which framework you use. <strong>This course will give you that.</strong></p>



<p>JavaScript is hard to learn. Frustration, abandonment and
 rage quits all stem from trying to use something when we don&#8217;t 
understand how things work.</p>



<p>Being able to make your ideas is a super power. Invest in a solid base and you&#8217;ll slam dunk anything that comes your way.</p>



<p>Go on over to <a href="https://BeginnerJavaScript.com">BeginnerJavaScript.com</a> and grab the course yourself. Enjoy!</p>



<p></p>



<p></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/beginner-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
		<item>
		<title>Flying a DJI Tello Drone with React and Node.js</title>
		<link>https://wesbos.com/drone-javascript/</link>
				<comments>https://wesbos.com/drone-javascript/#comments</comments>
				<pubDate>Fri, 07 Dec 2018 16:02:49 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">https://wesbos.com/?p=4132</guid>
				<description><![CDATA[Hey Folks! Kind of a fun one here today. I wrote some JavaScript to fly a DJI Drone. IBM is giving away 2,000 DJI Tello drones as part of a challenge and I made this video to help them promote &#8230; <a href="https://wesbos.com/drone-javascript/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>Hey Folks! Kind of a fun one here today. I wrote some JavaScript to fly a DJI Drone.</p>
<p>IBM is giving away 2,000 DJI Tello drones as part of a challenge and I made this video to help them promote it. This is the fun kind of stuff that originally got me excited about programming so I&#8217;d encourage you to try this out!</p>
<ul>
<li>Enter the giveaway at <a href="https://developer.ibm.com/contest/?cm_mmc=ibmdev-_-drone-_-youtube-_-wesbos">https://developer.ibm.com/contest</a> (US/ Canada Only — sorry!)</li>
<li>More details about the challenge at <a href="https://developer.ibm.com/blogs/2018/11/12/win-a-drone-program-a-drone-change-the-world/">https://developer.ibm.com/blogs/2018/11/12/win-a-drone-program-a-drone-change-the-world/</a></li>
</ul>
<p>All the code is available here: <a href="https://github.com/wesbos/javascript-drones">https://github.com/wesbos/javascript-drones</a> along with a list of software and hardware used.</p>
<p><iframe class='youtube-player' type='text/html' width='640' height='360' src='https://www.youtube.com/embed/JzFvGf7Ywkk?version=3&#038;rel=1&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' allowfullscreen='true' style='border:0;'></iframe></p>
<p><iframe class='youtube-player' type='text/html' width='640' height='360' src='https://www.youtube.com/embed/ozMwRq-IT2w?version=3&#038;rel=1&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' allowfullscreen='true' style='border:0;'></iframe></p>
<p>Enjoy!</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/drone-javascript/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
							</item>
		<item>
		<title>React&#8217;s New Context API Explained</title>
		<link>https://wesbos.com/react-context/</link>
				<comments>https://wesbos.com/react-context/#comments</comments>
				<pubDate>Tue, 13 Mar 2018 15:35:48 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=4103</guid>
				<description><![CDATA[Hey Folks! React 16.3 has a new Context API which makes accessing data and functions anywhere in your application a snap. If you ever find yourself passing data down via props 4-5 levels deep, context might be what you are &#8230; <a href="https://wesbos.com/react-context/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>Hey Folks! React 16.3 has a new Context API which makes accessing data and functions anywhere in your application a snap. If you ever find yourself passing data down via props 4-5 levels deep, context might be what you are looking for.</p>
<p>Enjoy!</p>
<p><iframe class='youtube-player' type='text/html' width='640' height='360' src='https://www.youtube.com/embed/XLJN4JfniH4?version=3&#038;rel=1&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' allowfullscreen='true' style='border:0;'></iframe></p>
<p>Code Examples available at https://github.com/wesbos/React-Context</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/react-context/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
							</item>
		<item>
		<title>React for Beginners Re-Recorded (again!)</title>
		<link>https://wesbos.com/react-for-beginners-re-recorded-again/</link>
				<comments>https://wesbos.com/react-for-beginners-re-recorded-again/#comments</comments>
				<pubDate>Wed, 28 Feb 2018 15:40:28 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=4094</guid>
				<description><![CDATA[Well well well! Today I am excited to announce that my React for Beginners course has been totally updated and re-recorded. The front end development landscape sure does change quickly and this is the third time I&#8217;ve re-recorded it to &#8230; <a href="https://wesbos.com/react-for-beginners-re-recorded-again/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>Well well well! Today I am excited to announce that my <a href="https://reactforbeginners.com">React for Beginners</a> course has been totally updated and re-recorded.</p>
<p>The front end development landscape sure does change quickly and this is the third time I&#8217;ve re-recorded it to keep the course up-to-date with the latest in API changes and industry best practices.</p>
<p>I initially launched this course in November 2015, and since then over 18,000 people have come along and learned React with me.</p>
<p><strong>This is totally free update to everyone who has purchase the course. When you buy a course with me you don&#8217;t have to worry about the tech going out of date <img src="https://s.w.org/images/core/emoji/12.0.0-1/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /> </strong></p>
<h3>What has changed?!!?!</h3>
<p>In short &#8211; if you have already taken the course and feel comfortable with React, you likely won&#8217;t need to re-take it. We still build the same real-time Catch of the Day Fish Market application. The core concepts of React haven&#8217;t changed, but the syntax and many of the supporting packages have. If you feel like you need a re-fresher on React, or are still working through learning it, I&#8217;d say go ahead and take it again.</p>
<p>The course is using React 16.3-Alpha, which should be 16.3 stable once it&#8217;s released. Here are some notes on what has changed since the last re-record:</p>
<ul>
<li>Use React 16.3</li>
<li>Move to external PropTypes Package as React.PropTypes has been deprecated</li>
<li>Add a few examples on shaping propTypes</li>
<li>Use React&#8217;s new Refs API, remove function refs. Function refs aren&#8217;t going anywhere, but this new API us much easier to understand</li>
<li>Remove all use of constructors and super() &#8211; use class properties instead</li>
<li>Better explain binding, use of <code>this</code> and what component instances are</li>
<li>Upgrade to React Router 4 Final API — the last version used a beta version of React Router used <code>&lt;Match&gt;</code> and stable finally used <code>&lt;Route&gt;</code> so it was just a rename of some variables</li>
<li>Moved from <code>react-addons-css-transition-group</code> to <code>react-transition-group</code> for the super cool UI animations. Upgraded from 1.x to 2.x. </li>
<li>Use official Firebase package for Authentication as re-base is now only for data binding</li>
<li>Move promise based code to async/await</li>
<li>Show how to return multiple elements with React.Fragment</li>
<li>Added a destructuring example for stateless functional components </li>
<li>Updated the Zeit Now Deployment video</li>
<li>Added a video on deploying to Netlify </li>
</ul>
<h3>Advanced React</h3>
<p>I&#8217;ve spend the last 3 weeks working on this re-record and now it&#8217;s time to focus my attention back on the Full Stack Advanced React and GraphQL course I&#8217;be been cooking up for the past bit. We&#8217;re going to touch on all kind of new, exciting and advanced concepts that are changing the way we build web app. Right now the app we are going to build is an online store with a real credit card checkout, cart and orders. The stack is currently GraphQL, Apollo, Express, Prisma, React, Styled Components and friends.</p>
<p>I&#8217;m really excited for this one!</p>
<h3>Sale</h3>
<p>To celebrate I&#8217;ve put all my courses on sale! In addition to <a href="https://reactforbeginners.com">React For Beginners</a>,  check out my recently updated to include ES7 and ES8, <a href="https://ES6.io">ES6 for Everyone</a> and my <a href="https://LearnNode.com">Learn Node</a> which uses 100% async+await and builds a really cool Express+MongoDB application.</p>
<h3>Thanks</h3>
<p>Thanks everyone &#8211; your support means the world to me &#8211; I can&#8217;t believe that I get to do this for a job!  Until next time <img src="https://s.w.org/images/core/emoji/12.0.0-1/72x72/1f618.png" alt="😘" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>PS you should:</p>
<ul>
<li>Listen to my web development podcast — <a href="https://Syntax.fm">Syntax.fm</a></li>
<li><a href="https://instagram.com/wesbos">Follow me on Instagram</a> for a mix of web development, BBQ and kids. </li>
</ul>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/react-for-beginners-re-recorded-again/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
							</item>
		<item>
		<title>Announcing my CSS Grid Course</title>
		<link>https://wesbos.com/announcing-my-css-grid-course/</link>
				<comments>https://wesbos.com/announcing-my-css-grid-course/#comments</comments>
				<pubDate>Fri, 19 Jan 2018 18:34:40 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=4087</guid>
				<description><![CDATA[It&#8217;s Here! The past few months I&#8217;ve been working hard on my latest course on CSS Grid, and today I&#8217;m happy to announce it&#8217;s available! CSS Grid is a brand new layout system in CSS and it will blow your &#8230; <a href="https://wesbos.com/announcing-my-css-grid-course/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p><img class="size-large wp-image-4088" src="https://wesbos.com/wp-content/uploads/2018/01/GRID-social-share-650x366.png" alt="" width="640" height="360" srcset="https://wesbos.com/wp-content/uploads/2018/01/GRID-social-share-650x366.png 650w, https://wesbos.com/wp-content/uploads/2018/01/GRID-social-share-300x169.png 300w, https://wesbos.com/wp-content/uploads/2018/01/GRID-social-share-768x432.png 768w, https://wesbos.com/wp-content/uploads/2018/01/GRID-social-share.png 1920w" sizes="(max-width: 640px) 100vw, 640px" /><br />
It&#8217;s Here! The past few months I&#8217;ve been working hard on my latest course on CSS Grid, and today I&#8217;m happy to announce it&#8217;s available!</p>
<p>CSS Grid is a brand new layout system in CSS and it will blow your mind! It&#8217;s not a framework or library &#8211; it&#8217;s part of CSS and is going to totally change the way we build layouts for the better.</p>
<p>The course is 25 videos, about 4 hours long and 100% free.</p>
<p>We start off with the fundamentals of CSS Grid and finish off with a number of real-world coding examples. If you are convinced already, grab it at <a href="https://CSSGrid.io">CSSGrid.io</a>.</p>
<h3>Thanks To Firefox!</h3>
<p>A huge thanks to Firefox who has sponsored my time to create this course and offer it up for free — they are the reason I&#8217;m able to offer this course up without any cost.</p>
<p>Firefox packs some of the best dev tools and in particular their CSS Grid Dev tools make understanding, debugging and visualizing complex grid layouts a snap.</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/announcing-my-css-grid-course/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
							</item>
		<item>
		<title>Announcing Learn Node!</title>
		<link>https://wesbos.com/learn-node/</link>
				<comments>https://wesbos.com/learn-node/#comments</comments>
				<pubDate>Wed, 10 May 2017 14:24:23 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[NodeJS]]></category>
		<category><![CDATA[Video Series]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=4033</guid>
				<description><![CDATA[It&#8217;s finally here! I&#8217;m super excited to announce my latest course &#8211; Learn Node. The last 5 months of my life have been spent creating this server side course and it&#8217;s honestly one of the best things I&#8217;ve ever made. &#8230; <a href="https://wesbos.com/learn-node/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>It&#8217;s finally here! I&#8217;m super excited to announce my latest course &#8211; <a href="https://LearnNode.com?utm_source=wesboscom&amp;utm_medium=blog&amp;utm_campaign=launchpost">Learn Node</a>.</p>
<p><a href="https://LearnNode.com?utm_source=wesboscom&amp;utm_medium=blog&amp;utm_campaign=launchpost"><img src="https://getdrip.s3.amazonaws.com/uploads/image_upload/image/69572/embeddable_25262a7f-5471-4dbb-8e88-c4d64a41f218.jpg" alt="Image" /></a></p>
<p>The last 5 months of my life have been spent creating this server side course and it&#8217;s honestly <em>one of the best things I&#8217;ve ever made</em>. I know a lot of you have been waiting patiently (and some not so patiently <img src="https://s.w.org/images/core/emoji/12.0.0-1/72x72/1f602.png" alt="😂" class="wp-smiley" style="height: 1em; max-height: 1em;" />) so grab it now at the launch price over at <a href="https://LearnNode.com?utm_source=wesboscom&amp;utm_medium=blog&amp;utm_campaign=launchpost">LearnNode.com</a></p>
<p>Learn Node is my latest premium training course in which we learn to build full stack web apps with Node.js, Express, MongoDB, Passport JS and a few other friends. This is an extremely in depth course that covers everything from the core concepts to user accounts and authentication to image uploading + resizing and all the way through to deploying live to the web.</p>
<p>If you want to up your JavaScript game and further your career while having fun building an application in Node.js, this course is you for.</p>
<h2>Now That&#8217;s Delicious!</h2>
<p><img src="https://getdrip.s3.amazonaws.com/uploads/image_upload/image/69574/f9c4858c-c7da-4fcd-9336-2007421bc4cb.gif" alt="Image" /></p>
<p>Together we will build <strong>&#8220;Now That&#8217;s Delicious!&#8221;</strong>, a full stack restaurant application which users can search, geolocate, review and curate their favourite restaurants from around the world.</p>
<p>The application has three main models — <strong>Users, Stores and Reviews</strong> — all of which are relational. It is designed to hit upon many of today&#8217;s application needs such as user authentication, database storage, Ajax REST API, file upload and image resizing.</p>
<p>I&#8217;ve also added a bunch of new team licenses and snazzy new dashboard for distributing licenses. Forward this email to your boss and let them know they should grab it now.</p>
<h2>Can you help?</h2>
<p>It&#8217;s been 10 months since I&#8217;ve launched a paid course (ES6 for Everyone) and about that long since I went full time on creating free + premium courses.</p>
<p>With this now being my primary income, it would mean the world to me if you could share my Learn Node course with a friend, co-worker or slack room.</p>
<p><a href="https://twitter.com/home?status=Learn%20Node%20is%20a%20new%20course%20from%20%40wesbos%20on%20Node.js,%20Express,%20MongoDB%20and%20friends.%20Check%20it%20out!%20%E2%86%92%20https%3A//LearnNode.com">Tweet </a>, <a href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2FLearnNode.com">Facebook Share</a> or send a friend to LearnNode.com</p>
<p><strong>Thank you and enjoy the course — see you on slack!</strong></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/learn-node/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
							</item>
		<item>
		<title>The Breakout Email Management System</title>
		<link>https://wesbos.com/breakout-email/</link>
				<comments>https://wesbos.com/breakout-email/#comments</comments>
				<pubDate>Mon, 27 Feb 2017 16:47:51 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[The Business of Web Dev]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3996</guid>
				<description><![CDATA[The Breakout Email Management System An email management system for overwhelmed creatives who want to get back to work. This is a collection of my thoughts over the last year of trying to solve my email overload problem. I&#8217;ve certainly &#8230; <a href="https://wesbos.com/breakout-email/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p><img src="https://wesbos.com/wp-content/uploads/2017/02/breakout.jpg" alt="" /></p>
<h1>The Breakout Email Management System</h1>
<p>An email management system for overwhelmed creatives who want to get back to work.</p>
<p>This is a collection of my thoughts over the last year of trying to solve my email overload problem. I&#8217;ve certainly not fixed my email problem &#8211; you might be reading this while you wait for a reply from me <img src="https://s.w.org/images/core/emoji/12.0.0-1/72x72/1f602.png" alt="😂" class="wp-smiley" style="height: 1em; max-height: 1em;" />. The key here is that my stress from email has significantly dropped after implementing these techniques.</p>
<p>The Breakout system is about going deep to the root of email overload and fixing communication problems at their source. It&#8217;s about putting in place the processes and forming the habits that will fix your email overload and free up your time to focus on your work and flourish creatively.</p>
<p>While tools are an important part of Breakout, they aren&#8217;t the focus. No tool, email client or iPhone app is going to save you if you can&#8217;t first break through to the underlying issues at hand &#8211; why do you get so much email in the first place, and why are you so bad at dealing with it?</p>
<h2>Decide</h2>
<p>The core of breakout is that you likely don&#8217;t have an email problem, but a <em>decision problem</em>. It&#8217;s human nature to avoid having to make decisions or to defer to a better time &#8211; a time when you think you can make a better choice, a time when you are less busy, any time but now.</p>
<p>You have hundreds of emails sitting in your inbox that need a decision from you. You open them, read it, and close it down. &quot;I&#8217;ll deal with that later&quot;.</p>
<p>Soon this piles up and becomes a back and forth of &quot;Sorry for the late reply&#8230;&quot; emails.</p>
<p>When you open an email, you need to decide immediately how to deal with it and get it out of your inbox. The rest of these steps are going to provide a few different ways to deal with your emails so that you can get it off your plate and get back to work.</p>
<h2>Kill it at the Source</h2>
<p>Whenever an email comes into your inbox, ask yourself &quot;Can I stop getting this type of email? Why am I receiving it? How can I not get this email in the future?&quot;.</p>
<p>Do customers keep requesting amendments to their receipt?  Build something so they can do it themselves!</p>
<p>Are you receiving questions about a product or service that you provide? You are probably doing a poor job communicating on your website. That is an opportunity to fix and clarify your website&#8217;s copy. If you get the same email more than three times, stop and fix it at the source because something is broken and your email is just the dumping ground for the broken glass.</p>
<h2>Your inbox isn&#8217;t the world&#8217;s todo list</h2>
<p>Your inbox is not a todo application and you should not treat it as one. If an email contains a task that you must do, transfer it out of your inbox into a proper todo application or project management tool.</p>
<p>This follows David Allen&#8217;s <em>Getting Things Done</em> fairly closely. The mantra is get it out of your head and into the system. The same goes for tasks in your inbox &#8211; if you get them out of your inbox and properly categorized into your todo application, you both lighten your cognitive load and ensure that you will not forget about this task.</p>
<p>I personally keep a todo application with &quot;areas of focus&quot; &#8211; each area could be a specific project, a list of things to do around the house, little tweaks I need to make on a site, or links I should tweet. Then at the beginning of every day or so, I&#8217;ll review these areas and pull a few tasks into my &quot;today&quot; — these are the things and the order in which I will complete them.</p>
<p>My GTD workflow goes a little beyond the scope of email, but this is exactly how I deal with tasks that show up in my inbox. I&#8217;ll try and deal with tasks right away, but if I am unable, I&#8217;ll stick both that task and any relevant information, including the link to the original email into an area of focus.</p>
<p>Clear inbox, clear mind. Get back to making things.</p>
<h2>Filter</h2>
<p>Newsletters and transactional email add visual clutter to your inbox. Trim down notifications from applications by turning them off or creating a filter where you can cleanly sweep them all from your inbox.</p>
<p>Here is an example of a filter and tag I use so I can delete everything at once.</p>
<p>Matches: from:(notifications@basecamp.com OR no-reply@slack.com OR notifications@github.com OR noreply@github.com OR do-not-reply@trello.com OR member@paypal.ca OR service@intl.paypal.com OR *@asana.com OR noreply@md.getsentry.com OR calendar-notification@google.com OR emailnotification@interealty.net OR noreply@youtube.com)</p>
<p>Another one to filter out of office replies from long chains or email blasts in every single language. This is pretty specific to my own use case, but you get the idea. Figure out what works for you and implement it.</p>
<p>Matches: (&quot;Automatische Antwort&quot; OR &quot;Automatic reply&quot; OR &quot;AutoReply&quot; OR &quot;Out of Office&quot; OR &quot;Xesc Duran&quot; OR &quot;Abwesend&quot; OR &quot;Absence&quot; OR &quot;Absence du bureau&quot; OR &quot;À l&#8217;extérieur du bureau&quot; OR &quot;Réponse automatique&quot; OR &quot;Abwesenheitsnotiz&quot; OR &quot;Resposta automática&quot; OR &quot;Automaattinen vastaus&quot; OR &quot;Automatisch antwoord&quot; OR &quot;Afwezig&quot; OR &quot;Afwezigheid&quot; OR &quot;Niet aanwezig&quot; OR &quot;Poza zasięgiem&quot; OR &quot;Na wakacjach&quot; OR &quot;Poza biurem&quot; OR &quot;Automatyczna odpowiedź&quot; OR &quot;Z dala od komputera&quot; OR &quot;Αυτόματη απάντηση&quot; OR &quot;Εκτός γραφείου&quot; OR &quot;na dovolenké&quot; OR &quot;mimo kancelárie&quot; OR &quot;automatická odpověď&quot; OR &quot;Autosvar&quot; OR &quot;Fora do escritório&quot; OR &quot;na dovolené&quot; OR &quot;mimo kancelář&quot;)</p>
<h2>co-workers, clients and newsletters</h2>
<p>co-workers and clients who email with problems and questions can be trained.  Email likely isn&#8217;t the best spot &#8211; tickets can be created in bug trackers, responses and file uploads can be logged in project management software.</p>
<p>Aggressively unsubscribe from newsletters that mean very little to you. These are just adding noise to your inbox. If something worthwhile is happening, you&#8217;ll hear about. Gmail tabs does a great job at filtering things into their own tabs.</p>
<h2>Automate &amp; Expand</h2>
<p>Tech support should be directed to our slack channel. Obscure programming questions get sent to stack overflow. Questions about my text editor, theme or what type of toilet paper I use get sent to <a href="https://wesbos.com/uses">wesbos.com/uses</a>. Advice and &quot;please motivate me&quot; requests get sent to my <a href="https://github.com/wesbos/ama">AMA</a>.</p>
<p>All of these redirects can seem brash and cold &#8211; I don&#8217;t like that part of it. So &#8211; I&#8217;ll use Text Expander for common emails &#8211; it helps me seem more human.</p>
<p>One reason we abandon emails in our inbox is that we simply don&#8217;t have the time it takes to write a meaningful or empathetic email back to someone. A short, terse response may come off worse than no response at all.</p>
<p>So, how does a busy person instill empathy into our emails? How do we give people the time of day when we really don&#8217;t have it for ourselves? For me, many of my emails start off with a nice text expander base.</p>
<p>Text Expander will auto populate common things like the sender&#8217;s name, a random greeting and the base for the email. From there I can take 30 seconds to personalize the email a little more and answer any questions that the snippet didn&#8217;t cover.</p>
<p>For me it&#8217;s not so much that Text Expander cuts down on typing, it&#8217;s the fact that it cuts down on thinking how to reply to an email.</p>
<h2>Keep Commonly used info at your fingertips</h2>
<p>I&#8217;ll also keep things like phone numbers, airline mile numbers, house addresses, postal codes and any other commonly asked for info in snippets. It&#8217;s a quick way to bring up info you forget, or hate to type over and over.</p>
<p>For sensitive information like banking details, I keep them just a password away in LastPass so I can quickly copy/paste.</p>
<h2>Dictate it!</h2>
<p>I&#8217;m at the spot where I can think and speak much faster than I can type. Recently voice dictation, or speech-to-text, has gotten really good and we are now able to just speak our thoughts and have the computer type them up for us.</p>
<p><img src="http://wes.io/jKS5/content" alt="" /></p>
<p>For an email that is an easy response but requires 3 or 4 paragraphs — &quot;What do you think of ____&quot; &#8211; I&#8217;ll usually turn on dictation and speak my response. Every few sentences I&#8217;ll pause and fix any errors and keep going. An added benefit to this is that your emails come off more casual and conversational.</p>
<p>The biggest barrier to this is that it&#8217;s uncomfortable or weird to do when people around. I don&#8217;t have a solution for you other than that you should get over that, because if you were talking into a phone it would be totally normal for you.</p>
<h2>Use Video Responses</h2>
<p>The breakout email system is not just about the email that you receive, it&#8217;s also about the email that you send out. How do we send out quality replies while not burning up our day?</p>
<p>While rare, sometimes an email contains a list of questions that text isn&#8217;t a good medium for. Rather than try and respond to each one at a time, I&#8217;ll just flip on my camera and talk through them to the camera. This allows me to both respond faster, and more importantly to deliver my free thoughts along with the tone that I intended.</p>
<p>This is also really helpful when trying to resolve a problem or provide feedback on a visual design, flip on a screen recorder and show the problem in 20 seconds rather than 5 minutes of email no one will bother to read.<br />
I use <a href="http://my.cl.ly/r/0O0c442O0w1Z0n3W">Cloudapp</a> in my OSX menu bar as it&#8217;s really fast and there is no exporting step &#8211; it&#8217;s like screenshots for video .</p>
<h2>Should you Defer?</h2>
<p>Deferring email should be a last resort. If you need to reply to an email but you are waiting on another party, defer it. This means you clear it out of your inbox and have it come back at another time. Boomerang and inbox for Gmail do this.</p>
<p>I&#8217;m not crazy about getting to inbox zero, but I do find if I defer things too long, they get lost in my inbox.</p>
<h2>Batch Process</h2>
<p>Many people recommend closing their email and only opening it up a few times. While this is ideal, many of us aren&#8217;t able to have that level of absenteeism.</p>
<p>For me, I have my email open all day long, but I only batch process it once or twice per day. This allows me to quickly jump on important and time sensitive emails quickly, but leave everything else for a couple times a day.</p>
<p>I use the Gmail labs extension <code>send and archive</code> so emails are out of my inbox as soon as I reply. Then I use <code>auto advance</code> so it puts another email on my plate as soon as that last one is sent &#8211; there isn&#8217;t a chance to escape when it drops another email on your lap!</p>
<p><img src="http://wes.io/jKVG/content" alt="" /></p>
<p>Remember that your job is likely not to reply to email — focus on doing your job and don&#8217;t worry about those emails building up in your inbox.</p>
<h2>Stop Emailing Yourself</h2>
<p>I often see people emailing themselves things because they don&#8217;t want to forget it. They often congregate with tab monsters who have 10,000 articles they want to read open in idle tabs.</p>
<p>Stop emailing things to yourself. There are unlimited number of solutions to fix whatever it is that you are trying to move or remember.</p>
<ul>
<li>TODO items go in your todo app</li>
<li>Phone numbers and emails go in your address book</li>
<li>Reminders go in your calendar with an alert</li>
<li>Bookmarks go in your browser, Evernote or Pinterest.</li>
<li>Files go in Dropbox, Google Drive or Air drop.</li>
</ul>
<h2>That&#8217;s it</h2>
<p>Try and implement this stuff &#8211; you&#8217;ll have to work at it but I bet it will help you out.</p>
<p>Comment below if you have thoughts or ideas on your own workflow.</p>
<p>If you found a spelling mistake you can correct it <a href="https://github.com/wesbos/es6-articles/blob/master/breakout-email.md">here</a>.</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/breakout-email/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
							</item>
		<item>
		<title>Announcing JavaScript30 — A Free 30 day Vanilla JS Coding Challenge</title>
		<link>https://wesbos.com/javascript30/</link>
				<comments>https://wesbos.com/javascript30/#comments</comments>
				<pubDate>Wed, 14 Dec 2016 15:33:18 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3975</guid>
				<description><![CDATA[You have probably heard on Twitter or got an email from me. I just launched JavaScript30 &#8211; my latest free course. It has absolutely blown up &#8211; over 45,000 people have signed up in less than a week and the &#8230; <a href="https://wesbos.com/javascript30/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p><a href="https://JavaScript30.com"><img src="https://wesbos.com/wp-content/uploads/2016/12/JS3-social-share.png" alt="js3-social-share" /></a></p>
<p>You have probably heard on <a href="https://twitter.com/wesbos">Twitter</a> or got an email from me. I just launched JavaScript30 &#8211; my latest free course. It has absolutely blown up &#8211; over 45,000 people have signed up in less than a week and the feedback has been overwhelmingly positive.</p>
<p>So, you&#8217;ve done a few courses and read a few books but still don&#8217;t feel great about your relationship with JavaScript.</p>
<p>How do you get better?</p>
<p>Build things. Lots of things. Build 1,000 things. Keep it up and don&#8217;t stop. Seriously.</p>
<p>This has always been my advice. Just put in the work and you will get better.</p>
<p>But Wes, what should I build? I have no ideas! Please don&#8217;t make me do another todo app.</p>
<p>Ideas, Eh? I&#8217;ve got lots! This is <a href="https://JavaScript30.com">JavaScript30</a> — let&#8217;s build 30 things together.</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/javascript30/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
							</item>
		<item>
		<title>A Dead Simple intro to Destructuring JavaScript Objects</title>
		<link>https://wesbos.com/destructuring-objects/</link>
				<comments>https://wesbos.com/destructuring-objects/#comments</comments>
				<pubDate>Tue, 15 Nov 2016 13:24:27 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[ES6]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3925</guid>
				<description><![CDATA[Destructuring is a huge part of ES6. If you want to learn all about the different parts of destructuring check out my ES6.io video tutorials or read some of the other articles on this blog. This post is a dead &#8230; <a href="https://wesbos.com/destructuring-objects/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>Destructuring is a huge part of ES6. If you want to learn all about the different parts of destructuring check out my <a href="https://ES6.io">ES6.io</a> video tutorials or read some of the <a href="http://wesbos.com/destructuring-default-values/">other articles</a> on <a href="http://wesbos.com/destructuring-renaming/">this blog</a>. This post is a dead simple introduction to what destructuring actually is .</p>
<p>Along with arrow functions, let, and const, <strong>destructuring</strong> is probably something you&#8217;re going to be using every single day. I find it to be extremely useful whether I&#8217;m writing client side or Node.</p>
<p>What does destructuring mean? It&#8217;s a JavaScript expression that allows us to extract data from arrays, objects, maps and sets — which we&#8217;re going to learn more about in a future <a href="https://ES6.io">ES6.io</a> video —into their own variable. It allows us to extract properties from an object or items from an array, multiple at a time.</p>
<p>Let&#8217;s take a look at what problem JavaScript destructuring really solves. Sometimes you need top level variables like so:</p>
<pre><code class="language-js">const person = {
  first: 'Wes',
  last: 'Bos',
  country: 'Canada',
  city: 'Hamilton',
  twitter: '@wesbos'
};
const first = person.first;
const last = person.last;</code></pre>
<p>You get the point. You&#8217;ve got this pretty much repetitive code over and over again, where you need to make a variable from something that is inside of an object or inside of an array. What we could do instead of creating multiple variables, we destructure them in a single line like so:</p>
<pre><code>const { first, last } = person;</code></pre>
<p>Curly bracket on the left of the equals sign?! That is not a block. That is not an object. It&#8217;s the new destructuring syntax.</p>
<p>The above code says, give me a variable called <strong>first</strong>, a variable called <strong>last</strong>, and take it from the <code>person</code> object. We&#8217;re taking the <code>first</code> property and the <code>last</code> property and putting them into two new variables that will be scoped to the parent block (or window!).</p>
<pre><code class="language-js">console.log(first); // Wes
console.log(last); // Bos</code></pre>
<p>Similarly, if I also wanted twitter, I would just add twitter into that, and I would get a third top level variable inside of my actual scope <code>const { first, last, twitter } = person;</code></p>
<p>That&#8217;s really handy in many use cases. This is just one nested level, but for example, in React.js often you want to use destructuring because the data is so deeply nested in props or state.</p>
<p>Let&#8217;s say we have some deeply nested data like we might get back from a JSON api:</p>
<pre><code class="language-js">const wes = {
  first: 'Wes',
  last: 'Bos',
  links: {
    social: {
      twitter: 'https://twitter.com/wesbos',
      facebook: 'https://facebook.com/wesbos.developer',
    },
    web: {
      blog: 'https://wesbos.com'
    }
  }
};</code></pre>
<p>I want to be able to pull out <strong>Twitter</strong> and <strong>Facebook</strong> URLs here. I could do this like it&#8217;s 1994 and we&#8217;re all running around with walkmans:</p>
<pre><code class="language-js">const twitter = wes.links.social.twitter;
const facebook = wes.links.social.facebook;
// Annoying!</code></pre>
<p>We can use destructuring to do it one better!</p>
<pre><code class="language-js">const { twitter, facebook } = wes.links.social;
console.log(twitter, facebook); // logs the 2 variables </code></pre>
<p>Notice how we destructure <code>wes.links.social</code> and not just <code>wes</code>? That is important because we are destructuring a few levels deep.</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/destructuring-objects/feed/</wfw:commentRss>
		<slash:comments>55</slash:comments>
							</item>
		<item>
		<title>Rename &#038; Destructure Variables in ES6</title>
		<link>https://wesbos.com/destructuring-renaming/</link>
				<comments>https://wesbos.com/destructuring-renaming/#comments</comments>
				<pubDate>Tue, 15 Nov 2016 13:19:18 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[ES6]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3931</guid>
				<description><![CDATA[Last post we took a look at an intro to destructuring. Let&#8217;s take a look at another use case which would be renaming your variables. Sometimes data comes back in some odd names, and you might not necessarily want to &#8230; <a href="https://wesbos.com/destructuring-renaming/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>Last post we took a look at <a href="http://wesbos.com/destructuring-objects/">an intro to destructuring</a>. Let&#8217;s take a look at another use case which would be renaming your variables. Sometimes data comes back in some odd names, and you might not necessarily want to use a property key as the end variable name. Maybe you don&#8217;t like that variable name or it&#8217;s already taken in your scope.</p>
<pre><code class="language-js">const twitter = 'twitter.com';
const wes = {
  first: 'Wes',
  last: 'Bos',
  links: {
    social: {
      twitter: 'https://twitter.com/wesbos',
      facebook: 'https://facebook.com/wesbos.developer',
    },
    web: {
      blog: 'https://wesbos.com'
    }
  }
};</code></pre>
<p>For example here, I already used twitter as a variable. I can&#8217;t use it again, but I&#8217;m stuck, because this object gives me twitter as a key and this object gives me twitter as a key. What you can do is you can rename them as you destructure them.</p>
<p>So &#8211; I want the <code>twitter</code> property, but I want to call it <code>tweet</code>. I want the <code>facebook</code> property, but I want to call it <code>fb</code>.</p>
<pre><code>const { twitter: tweet, facebook: fb } = wes.links.social;</code></pre>
<p>The above code will pull the <code>wes.links.social.twitter</code> into a variable called <code>tweet</code> and similarly for <code>facebook</code>.</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/destructuring-renaming/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
							</item>
		<item>
		<title>Setting Default Values with JavaScript&#8217;s Destructuring</title>
		<link>https://wesbos.com/destructuring-default-values/</link>
				<comments>https://wesbos.com/destructuring-default-values/#comments</comments>
				<pubDate>Tue, 15 Nov 2016 08:22:43 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[ES6]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3934</guid>
				<description><![CDATA[There&#8217;s one last thing we need to know about destructuring objects, and that is the ability to set defaults. This one&#8217;s a little bit confusing, so bear with me here and we&#8217;re going to circle back for another example later &#8230; <a href="https://wesbos.com/destructuring-default-values/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>There&#8217;s one last thing we need to know about destructuring objects, and that is the ability to set defaults. This one&#8217;s a little bit confusing, so bear with me here and we&#8217;re going to circle back for another example later on in a couple of videos over at <a href="https://ES6.io">ES6.io</a>.</p>
<p>When you destructure an object, what happens if that value isn&#8217;t there?</p>
<pre><code class="language-js">const settings = {
    speed: 150
}
const { speed, width } = settings; 
console.log(width);</code></pre>
<p>What is width? It&#8217;s <code>undefined</code> because we create the variable, but it&#8217;s not able to be set to anything.</p>
<p>With destructuring we can set defaults, or <em>fallback values</em> so that if an item is not in the object (or Array, Map, or Set) it will fall back to what you have set at the default.</p>
<p>This syntax is a little hard to read:</p>
<pre><code class="language-js">const settings = {
    speed: 150
}
const { speed = 750, width = 500 } = settings;
console.log(speed); // 150 - comes from settings object
console.log(width); // 500 - fallback to default</code></pre>
<p>Now if the <code>speed</code> or <code>width</code> properties don&#8217;t exist on our <code>settings</code> object, they fallback to <code>750</code> and <code>500</code> respectively.</p>
<h2>Careful: null and undefined</h2>
<p>One thing to note here is that this isn&#8217;t 100% the same as this old trick used to fallback when <code>settings.speed</code> is not set:</p>
<pre><code class="language-js">const mySpeed = 0;
const speed = mySpeed || 760; 
console.log(speed); // 760!</code></pre>
<p>Why? Because ES6 destructuring default values only kick in if the value is undefined. null, false and 0 are all still values!</p>
<pre><code class="language-js">const { dogName = 'snickers' } = { dogName: undefined }
console.log(dogName) // what will it be? 'snickers'!

const { dogName = 'snickers' } = { dogName: null }
console.log(dogName) // what will it be? null!

const { dogName = 'snickers' } = { dogName: false }
console.log(dogName) // what will it be? false!

const { dogName = 'snickers' } = { dogName: 0 }
console.log(dogName) // what will it be? 0!</code></pre>
<h3>Combining with Destructuring Renaming</h3>
<p>In my last post we learned that we can destrucutre and rename varaibles at the same time with something like this:</p>
<pre><code class="language-js">const person = {
  first: 'Wes',
  last: 'Bos',
};

const { first: firstName } = person;
console.log(firstName); // Wes</code></pre>
<p>We can also set defaults in the same go. Hold onto your head because this syntax is going to get funky!</p>
<pre><code class="language-js">const person = { first: 'Wes', last: 'Bos' };
const { middle: middleName = 'Super Rad' } = person;
console.log(middleName); // 'Super Rad'</code></pre>
<p>Woah &#8211; let&#8217;s step through that one!</p>
<ol>
<li>First we create a new const var called <code>middleName</code>.</li>
<li>Next we look for <code>person.middle</code>. If there was a <code>person.middle</code> property, it would be put into the <code>middleName</code> variable.</li>
<li>There isn&#8217;t a <code>middle</code> property on our <code>person</code> object, so we fall back to the default of <code>Super Rad</code>. </li>
</ol>
<p>Cool! Make sure to check out <a href="https://ES6.io">ES6.io</a> for more like this!</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/destructuring-default-values/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
							</item>
		<item>
		<title>4 New String Methods in ES6 that you should know</title>
		<link>https://wesbos.com/new-es6-string-methods/</link>
				<comments>https://wesbos.com/new-es6-string-methods/#comments</comments>
				<pubDate>Mon, 14 Nov 2016 20:10:10 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[ES6]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3917</guid>
				<description><![CDATA[The String type in ES6 has come with four new methods that are really handy, help us write a little bit more readable code, as well as reduce our reliance on using regular expressions, or RegExp, for certain things. .startsWith() &#8230; <a href="https://wesbos.com/new-es6-string-methods/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>The String type in ES6 has come with <strong>four new methods</strong> that are really handy, help us write a little bit more readable code, as well as reduce our reliance on using regular expressions, or RegExp, for certain things.</p>
<h3>.startsWith() and .endsWith()</h3>
<p>So I have a <code>const</code> variable named <code>course</code>, which has the value of <code>RFB1</code>, this stands for React for Beginners.</p>
<pre><code>const course = 'RFB1';</code></pre>
<p>Sometimes I have <code>RFB1</code> which is the starter package, <code>RFB2</code> which is the master package, <code>RFB3</code> which is the team package. I don&#8217;t really care too much about that in certain cases, I just want to know if <code>course</code> starts with <code>RFB</code>, and not something like <code>STPU</code>, which is Sublime Text Power User or <code>ES6</code>, which is this series.</p>
<p>Here, <code>RFB</code> means React for Beginners, I need to know if the string starts with it. We can use the console to check this out by typing <code>course.startsWith('RFB')</code>, it will return <code>true</code>, because obviously it does start with it.</p>
<p>If I did <code>rfb</code>, in lowercase letters, it says, <code>false</code>, because there is no way to make this case insensitive. If you do need case sensitivity you must still use a Regular Expression.</p>
<p>One other thing that <code>.startsWith()</code>  will do is it&#8217;ll allow you to skip a certain number of characters and start looking at a set point.</p>
<pre><code>const flightNumber = '20-AC2018-jz';</code></pre>
<p>This flight number here, I want to see if it starts with <code>AC</code>. Over in the console, I&#8217;m going to type <code>flightNumber.startsWith('AC')</code>. It&#8217;s false, because the variable starts with <code>20-</code>. This also happens if we have SKU numbers, and they start with a bunch of junk and then it gets to actually what we want.</p>
<p>What you can do is you can use <code>flightNumber.startsWith('AC', 3);</code>, which says start after three characters. That is returning <code>true</code>, because it ignores the first three and then starts at AC and checks against that.</p>
<p><code>EndsWith</code> works fairly similar. Here is an example where we have <code>jz</code> at the end of the <code>flightNumber</code>, and I want to know if it&#8217;s an Air Canada Jazz flight. We can say <code>flightNumber.endsWith('jz')</code>, which will be <code>true</code>, obviously, because it ends with it.</p>
<p>There&#8217;s another option that we can pass <code>.endsWith()</code>, and I&#8217;m going to use an account number variable as an example here:</p>
<pre><code>const accountNumber = '825242631RT0001';</code></pre>
<p>In Canada we have business numbers that are nine digits long. They&#8217;re always nine digits long, and that is your actual business number.</p>
<p>Then you have a tax number, which is RT0001, or RT0002. You also might have RP0001 for your first employee, RP0002 for your second employee, and so on. We also have RC for your corporate taxes. Often you need to know, is this number a tax number or is this number a corporate tax number, or is this a payroll number? Is it <strong>RC</strong>, or <strong>RP</strong>, or <strong>RT</strong>?</p>
<p>I need to check if this number, which ends with RT, and I want to ignore this right here. What you can do is you can tell the account number to just take a certain number of characters, and ignore the rest.</p>
<p>Just like with our <code>flightNumber</code>, we can use the console to put in <code>accountNumber.endsWith('RT')</code>, which will be false. What I can tell it, though, is only take the first 11 numbers, by using <code>accountNumber.endsWith('RT', 11);</code> which will be <code>true</code>.</p>
<p>Essentially you&#8217;re just going to take the first 11 numbers of <code>accountNumber</code>, ignore the rest, and then see if it ends in RT or whatever else it might be.</p>
<h3>.includes()</h3>
<p>Then next up we have <code>.includes()</code> which will just check if that string is anywhere in it. If I wanted to see if my flight number includes the letters AC, then I could use <code>flightNumber.includes('AC')</code>, which is <code>true</code>.</p>
<p>Again, it is not case sensitive so you cannot use lower case letters here.</p>
<p><code>.includes()</code> checks to see if your string has something in it. As a bit of an aside, it was originally supposed to be called <code>.contains()</code>, but it got changed to includes because of some conflicts with the MooTool libraries and the way that they modified the prototype.</p>
<h3>.repeat() and String Padding</h3>
<p>Next up we have make, model and colour here:</p>
<pre><code class="language-js">const make = 'BMW';
const model = 'x5';
const colour = 'Royal Blue';</code></pre>
<p>I&#8217;m going to show you where that would be useful for using <code>.repeat()</code>, which allows you to take a string, and repeat it. You can just call <code>.repeat()</code> and it&#8217;s going to repeat that string over and over and over again.</p>
<p>Where is that useful? Sometimes we have some words here. I&#8217;m going to take my <code>BMW</code>, <code>x5</code> and <code>royal blue</code>, and if I wanted to display the variables in a terminal or something, but I want to right align them. How would that work? I&#8217;d have to just put a whole bunch of padding in, depending on how long this was and how much space will be used, kind of like this:</p>
<pre><code class="language-js">                 BMW
                  x5
          Royal Blue</code></pre>
<p>What we can do, instead of hitting the space bar each time, we can use a left pad function, and you can use <code>.repeat()</code>to code a nice little left padding function.</p>
<p>Here we can <code>return</code> a string, and we need to then pad it with however many characters we need. We&#8217;ll take a space and repeat it 10 times.</p>
<pre><code class="language-js">leftPad = function(str, length = 10){
    return `${' '.repeat(length)}${str}`;
}

console.log(leftPad(make));   // '          BMW'
console.log(leftPad(model));  // '          x5'
console.log(leftPad(colour)); // '          Royal Blue'</code></pre>
<p>However, if we want it right aligned, we&#8217;ll need to subtract however many characters are in the string, so we subtract <code>str.length</code> here before we return the actual string itself in <code>${str}</code>;</p>
<pre><code class="language-js">leftPad = function(str, length = 20){
    return `${' '.repeat(Math.max(length - str.length,0))}${str}`;
}</code></pre>
<p>I can take make, model, and color, put them in here. It&#8217;s going to console.log each one of them out. I&#8217;m going to leave out the length because we&#8217;re going to default it to 20, and it should just pass in the make, model, and color.</p>
<pre><code class="language-js">console.log(leftPad(make));   // '                 BMW'
console.log(leftPad(model));  // '                  x5'
console.log(leftPad(colour)); // '          Royal Blue'</code></pre>
<p>There we go. See how all these are perfectly right aligned? BMW X5 in royal blue, whereas all of this is however much padding we actually need. That&#8217;s a nice little use for repeat.</p>
<h3>Very Important</h3>
<p>Another little funny one that you can do is, we can take an ES6 template string, and inside of that let&#8217;s do a statement where we take a string and multiply it:</p>
<pre><code>${'woof' * 5}</code></pre>
<p>What happens when you take a string and multiply it by a number? You get <code>NaN</code>. Let&#8217;s call repeat on that 10 times, and then tack on &#8216;Batman!&#8217;.</p>
<pre><code>`${'woof' * 5}`.repeat(10) + " Batman!";</code></pre>
<p>Those are some four new functions. Put them in your back pocket, and hopefully you&#8217;ll get to use them soon!</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/new-es6-string-methods/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
							</item>
		<item>
		<title>How to Sanitize Data with ES6 Template Strings</title>
		<link>https://wesbos.com/sanitize-html-es6-template-strings/</link>
				<comments>https://wesbos.com/sanitize-html-es6-template-strings/#comments</comments>
				<pubDate>Mon, 14 Nov 2016 19:52:44 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[ES6]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3912</guid>
				<description><![CDATA[These last few examples we&#8217;ve been creating HTML and inserting it right into the DOM. If you have any sort of security background and you&#8217;re probably screaming, &#34;Wes, you must sanitize that data before you put it into the DOM!!!&#34; &#8230; <a href="https://wesbos.com/sanitize-html-es6-template-strings/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>These last <a href="https://wesbos.com/template-strings-html/">few</a> <a href="http://wesbos.com/tagged-template-literals/">examples</a> we&#8217;ve been creating HTML and inserting it right into the DOM. If you have any sort of security background and you&#8217;re probably screaming, <em><strong>&quot;Wes, you must sanitize that data before you put it into the DOM!!!&quot;</strong></em></p>
<h3>A Quick primer on XSS</h3>
<p>If you don&#8217;t know what that means, essentially when you get data from a user, or whenever you&#8217;re displaying data from an untrusted (or even what you think is trusted) source, you must make sure that the user isn&#8217;t doing any <em>Sneaky Pete</em> stuff on you, and trying to maybe insert an iFrame, or an image, or to do an XSS attack.</p>
<p>Here I&#8217;ve got an example:</p>
<pre><code class="language-js">const first = 'Wes';
const aboutMe = `I love to do evil &lt;img src="http://unsplash.it/100/100?random" onload="alert('you got hacked');" /&gt;`;

const html = `
    &lt;h3&gt;${first}&lt;/h3&gt;
    &lt;p&gt;${aboutMe}&lt;/p&gt;
`;

const bio = document.querySelector('.bio');
bio.innerHTML = html;</code></pre>
<p>Let&#8217;s assume I took this first name in the about me. I got that from a database, an API or something sort of data source where the user had this saved in their database.</p>
<p>They set their bio to be, &quot;I love to do evil,&quot; and they inserted an image from Unsplash, which is allowed. You can insert an image into your bio, no problem, but they do the <strong>Sneaky Pete</strong> thing here by inserting an <code>onload=alert('you got hacked');</code>, so when this image loads, it runs some JavaScript.</p>
<p>That is a huge problem. You cannot let your users run JavaScript on your page because then they could drain your bank account, or delete your app, or post spam, or really anything! Imagine if you let someone run JavaScript on Facebook. You could have people unfriending everyone, or you could look at all of their messages, or send nasty messages on their behalf.</p>
<p>Here I&#8217;ve taken the about me and I&#8217;ve just popped it into HTML and then I&#8217;ve set it into our bio:</p>
<pre><code class="language-js">const first = 'Wes';
const aboutMe = `I love to do evil &lt;img src="http://unsplash.it/100/100?random" onload="alert('you got hacked');" /&gt;`;

const html = `
    &lt;h3&gt;${first}&lt;/h3&gt;
    &lt;p&gt;${aboutMe}&lt;/p&gt;
    `;

const bio = document.querySelector('.bio');
bio.innerHTML = html;</code></pre>
<p>I&#8217;m taking it, carte blanche, putting it into the DOM, I refresh, and I get this message, &quot;You got hacked.&quot; That is what&#8217;s called an XSS, cross site scripting, where we let someone else run JavaScript on our page. That&#8217;s really dangerous.</p>
<h3>Sanitizing your HTML</h3>
<p>The solution to this is to sanitize your HTML. This is another place where you could use the tag template. In creating all this HTML here, I have all kinds of inputs from a user. But before I put it into my HTML, it&#8217;s probably a good idea to run it through a sanitizer, so our HTML will look something like this:</p>
<pre><code class="language-html">&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/dompurify.0.8.2/purify.min.js"&gt;&lt;/script&gt;
&lt;script&gt;
const first = 'Wes';
const aboutMe = `I love to do evil &lt;img src="http://unsplash.it/100/100?random" onload="alert('you got hacked');" /&gt;`;

const html = `
    &lt;h3&gt;${first}&lt;/h3&gt;
    &lt;p&gt;${aboutMe}&lt;/p&gt;
    `;

const bio = document.querySelector('.bio');
bio.innerHTML = html;
&lt;/script&gt;</code></pre>
<p>I&#8217;ve loaded it in this library called <a href="https://github.com/cure53/DOMPurify">DOMPurify</a>. It&#8217;s a pretty good library that we use to sanitize. You can have all kinds of options in here in terms of what tags are allowed and aren&#8217;t allowed. There are all kinds of sanitize libraries here.</p>
<p>You could make a sanitized tag template and use this library inside of it. I&#8217;m going to show you how to do that now:</p>
<pre><code class="language-js">function sanitize(strings, ...values) {
    return strings.reduce((prev, next, i) =&gt; `${prev}${next}${values[i]} || ''}`);
}
const first = 'Wes';
const aboutMe = sanitize`I love to do evil &lt;img src="http://unsplash.it/100/100?random" onload="alert('you got hacked');" /&gt;`;

const html = `
    &lt;h3&gt;${first}&lt;/h3&gt;
    &lt;p&gt;${aboutMe}&lt;/p&gt;
    `;

const bio = document.querySelector('.bio');
bio.innerHTML = html;</code></pre>
<p>So we have a <code>reduce</code> function, which takes in a function and what we start with, an arrow function, which we&#8217;ll use the first iteration, <code>prev</code>, our current iteration, <code>next</code>, and <code>i</code> for index. So we&#8217;re just going to return a string that tacks all of those things together. We&#8217;ve got <code>prev</code>. We&#8217;ve got the <code>next</code>. We&#8217;ve got <code>values</code>, which is <code>i</code> or nothing.</p>
<p>We still have, &quot;you got hacked&quot; because we&#8217;re not finished yet.</p>
<pre><code class="language-js">function sanitize(strings, ...values) {
    const dirty = strings.reduce((prev, next, i) =&gt; `${prev}${next}${values[i]} || ''}`);
}
const first = 'Wes';
const aboutMe = sanitize`I love to do evil &lt;img src="http://unsplash.it/100/100?random" onload="alert('you got hacked');" /&gt;`;

const html = `
    &lt;h3&gt;${first}&lt;/h3&gt;
    &lt;p&gt;${aboutMe}&lt;/p&gt;
    `;

const bio = document.querySelector('.bio');
bio.innerHTML = html;</code></pre>
<p>But instead, what we can do is add a new <code>const</code> called <code>dirty</code>, because our string is dirty because it still has it&#8217;s <code>onload</code>, or iFrames, or any of the other nasty stuff people are trying to do.</p>
<p>Now we&#8217;ll use our library that we loaded, and it&#8217;s called with <code>DOMPurify.sanitize</code>. We&#8217;ll sanitize the dirty HTML:</p>
<pre><code class="language-js">function sanitize(strings, ...values) {
    const dirty = strings.reduce((prev, next, i) =&gt; `${prev}${next}${values[i]} || ''}`, '');
    return DomPurify.sanitize(dirty);
}
const first = 'Wes';
const aboutMe = sanitize`I love to do evil &lt;img src="http://unsplash.it/100/100?random" onload="alert('you got hacked');" /&gt;`;

const html = `
    &lt;h3&gt;${first}&lt;/h3&gt;
    &lt;p&gt;${aboutMe}&lt;/p&gt;
`;

const bio = document.querySelector('.bio');
bio.innerHTML = html;</code></pre>
<p>Now when you refresh, you can see see that the <code>onload</code> has been stripped out, along with any other nasty stuff!</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/sanitize-html-es6-template-strings/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
							</item>
		<item>
		<title>Tagged Template Literals</title>
		<link>https://wesbos.com/tagged-template-literals/</link>
				<comments>https://wesbos.com/tagged-template-literals/#comments</comments>
				<pubDate>Tue, 25 Oct 2016 14:04:22 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[ES6]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3890</guid>
				<description><![CDATA[One feature that comes along with template literals, or template strings, is the ability to tag them. That means is that we can run a template string through a function, and rather than have the browser immediately assign that value &#8230; <a href="https://wesbos.com/tagged-template-literals/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>One feature that comes along with template literals, or template strings, is the ability to <strong>tag</strong> them.</p>
<p>That means is that we can run a template string through a function, and rather than have the browser immediately assign that value to a variable, we can have control over how this actual string is made.</p>
<p>I&#8217;m going to show you some examples of when that would actually be useful but first, let&#8217;s look at the mechanics of it and how it all comes together.</p>
<p>The way the tag template works is you simply make a function, and you take the name of the function that you want to run against the string, and you just put the name right in front of the template:</p>
<pre><code class="language-js">function highlight() {
    // do something
}

const name = 'Snickers';
const age = '100';
const sentence = highlight`My dog's name is ${name} and he is ${age} years old`;
console.log(sentence)</code></pre>
<p>This tags it with a function name. What will happen is the browser will run this function, it will provide it with all the information about the string, all the pieces that the person typed, as well as the variables that get passed in. Whatever we return from this function is what <code>sentence</code> actually is going to be.</p>
<p>It acts like a step in between. Before this function actually gets put into <code>sentence</code>, we have the ability to modify it in any given way. Let&#8217;s take a look at <code>highlight</code> here:</p>
<pre><code class="language-js">function highlight() {
    return 'cool';
}</code></pre>
<p>If I just use <code>return 'cool'</code> that is going to take in this entire string as an argument, but then just return the word &quot;cool.&quot; Now we see <code>cool</code> in console.</p>
<pre><code class="language-js">const sentence = highlight`My dog's name is ${name} and he is ${age} years old`;
console.log(sentence); // 'cool'</code></pre>
<p>Obviously, that&#8217;s not what we want to do,but this function will take in a few arguments so we can create the string ourselves:</p>
<p>First, we get an array of all the string peices:</p>
<ol>
<li>My dog&#8217;s name is</li>
<li>and he is</li>
<li>years old</li>
</ol>
<p>After the array of all the strings, the subsequent arguments will be the values that are being interpolated.</p>
<p>In this case, we&#8217;re passing <code>name</code> and <code>age</code>.</p>
<pre><code class="language-js">function highlight(strings, name, age) {
    return 'cool';
}</code></pre>
<p>Now, we could do this. It passes a name and passes an age, but if you don&#8217;t know exactly how many values someone is passing, there&#8217;s no way for you to really scale it. You could say <code>Arg1</code>, <code>Arg2</code>, go through all the way to <code>Arg100</code>, just in case there are a hundred arguments, but that&#8217;s no way to live your life, right?</p>
<p>For this, We can use ES6 rest operator, which is three dots. We&#8217;re going to go into that a lot more in a future video, but know for now, if we do <code>... values</code>, what it&#8217;s going to do is take the <em>rest</em> of the values that are passed to that argument, and put them into an array for us.</p>
<pre><code class="language-js">function highlight(strings, ...values) {
    return 'cool';
}</code></pre>
<p>What&#8217;s <code>strings</code>? <code>Strings</code> is an array of three things:</p>
<ul>
<li><code>"My dog's name is "</code></li>
<li><code>"and he is "</code> </li>
<li><code>"years old "</code> </li>
</ul>
<p>As you can see, it breaks up the string into the biggest pieces it can until a variable interrupts it.</p>
<p>We&#8217;ve got <code>"My dog's name is"</code> then it pops in a variable, <code>"and he is "</code>, that&#8217;s the second item in the strings array, and then, <code>"years old "</code>, which are the three strings that don&#8217;t get changed.</p>
<p>The other things we get is an array of <code>values</code>, which we passed in two values here. We get <code>"Snickers"</code> and <code>"100"</code> which are the values that I passed in.</p>
<p>So &#8211; the whole point of the tagged template is so that we can create the string ourselves. Let&#8217;s move along to creating it!</p>
<pre><code class="language-js">function highlight() {
   let str = ''; 
}

const name = 'Snickers';
const age = '100';
const sentence = highlight`My dog's name is ${name} and he is ${age} years old`;
console.log(sentence)</code></pre>
<p>I&#8217;m using <code>let</code> here. Why? Because we&#8217;re going to be appending more strings on to this actual string. If I used <code>const</code>, I wouldn&#8217;t be able to tack onto it.</p>
<p>Then, we want to loop over this first strings array here, tack on <code>My dog's name is</code>, and then the first value, <code>and he is</code> and the second value, and then <code>years old</code> and then third value, but in this case, we don&#8217;t have a third value.</p>
<p>You can use whatever loop or logic you prefer inside of this function. You could even use a <code>map</code> and then <code>join</code> it together. I&#8217;m going to use <code>forEach</code> in my example:</p>
<pre><code class="language-js">function highlight() {
   let str = '';
   strings.forEach((string, i) =&gt; {
       str += string + values[i];
   });
   return str;
}

const name = 'Snickers';
const age = '100';
const sentence = highlight`My dog's name is ${name} and he is ${age} years old`;
console.log(sentence)</code></pre>
<p>That&#8217;s going to say, &quot;Give me the first value from the strings and the first value from our values array and tack them on.&quot;</p>
<p>We&#8217;re going to hit a little bit of an error here. If we <code>return str</code>, the string that we&#8217;ve been tacking things onto, we should now see <code>"My dog's name is Snickers and he is 100 years oldundefined."</code></p>
<p>First of all, remember, that&#8217;s because the <code>strings</code> array is always going to be one larger than the <code>values</code> array. When we hit that last one, it&#8217;s only going to be a string and there&#8217;s going to be no value to tack on the end. You could check if values of <code>[i]</code> is <code>undefined</code> and, if it is, then don&#8217;t put it on.</p>
<p>A little trick you can do here, is you can use your values of I or just a blank string:</p>
<pre><code class="language-js">function highlight() {
   let str = '';
   strings.forEach((string, i) =&gt; {
       str += string + (values[i] || '');
   });
   return str;
}</code></pre>
<p>That will adjust if there is no value, it will just return a blank string there.</p>
<h3>Tagged Template Usecases</h3>
<p>What can we actually do with this? Well, we could change this so any value that gets passed in gets wrapped in a <code>&lt;span&gt;</code> and we can use CSS to highlight it.</p>
<p>You maybe want to show your user which pieces of the string were variables or which pieces of the string that they passed in, maybe it&#8217;s their user name or a total for an order. In our case, we just want to highlight the name and the actual age.</p>
<pre><code class="language-js">function highlight() {
   let str = '';
   strings.forEach((string, i) =&gt; {
       str += `${string} &lt;span class='hl'&gt;${values[i] || ''}&lt;/span&gt;`;
   });
   return str;
}</code></pre>
<p>Now with our <code>&lt;span&gt;</code>, let&#8217;s see what our sentence looks like here. There we go. We&#8217;ve got a span with a class of <code>hl</code> wrapped around every single possible one.</p>
<pre><code class="language-html">&lt;style&gt;
.hl {
background: #ffc600
}
&lt;/style&gt;</code></pre>
<p>Then, we can add it to our document instead of using the console:</p>
<pre><code>document.body.innerHTML = sentence;</code></pre>
<p>Once you do that, you&#8217;ll see that the values being highlighted. You can go ahead and add a <code>contenteditable</code> to our <code>&lt;span&gt;</code> so that if the user didn&#8217;t like it, they can change the value they actually wanted. Maybe they didn&#8217;t like that Snickers is a hundred years old, so they could change that value as well. It&#8217;s kind of a fun way to do it.</p>
<h3>Bring it in, Team</h3>
<p>There are much more complicated use cases for that and there are many more in-depth use cases for that, but that is the main idea behind these template tag templates. If you have a string, you pass in the regular string that you want, and then you get all the pieces.</p>
<p>It&#8217;s up to you to craft it together and to return some sort of modified data. In our case, we&#8217;re wrapping it in a <code>&lt;span&gt;</code>, but you may want to format it or do some <code>if</code> statement and conditional work on all the values.</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/tagged-template-literals/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
							</item>
		<item>
		<title>Easy Creation of HTML with JavaScript&#8217;s Template Strings</title>
		<link>https://wesbos.com/template-strings-html/</link>
				<comments>https://wesbos.com/template-strings-html/#comments</comments>
				<pubDate>Tue, 18 Oct 2016 12:30:32 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[ES6]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3857</guid>
				<description><![CDATA[Another feature of template literals or template strings is the ability have multi-line strings without any funny business. Previously with regular string we would have escape the new lines like so: var text = "hello there, \ how are you &#8230; <a href="https://wesbos.com/template-strings-html/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>Another feature of <em>template literals</em> or template strings is the ability have multi-line strings without any funny business.</p>
<p>Previously with regular string we would have escape the new lines like so:</p>
<pre><code class="language-js">var text = "hello there, \
 how are you + \
  ";</code></pre>
<p>That gets to be quite a task, to be able to do that. In ES6, we can now use template strings. I like to use these multiline strings when I&#8217;m creating HTML markup as a string. You can use backticks here, and use the object properties as variables. These look familiar because they&#8217;re in the same format as I&#8217;ve been using in some of the previous posts. Let&#8217;s define an object and I can show you what I mean:</p>
<pre><code class="language-js">const person = {
    name: 'Wes',
    job: 'Web Developer',
    city: 'Hamilton',
    bio: 'Wes is a really cool guy that loves to teach web development!'
}

// And then create our markup:
const markup = `
 &lt;div class="person"&gt;
    &lt;h2&gt;
        ${person.name}
    &lt;/h2&gt;
    &lt;p class="location"&gt;${person.location}&lt;/p&gt;
    &lt;p class="bio"&gt;${person.bio}&lt;/p&gt;
 &lt;/div&gt;
`;</code></pre>
<p>You can see how this is so much nicer to look at. You <em>will</em> get the whitespace included in the string, but since we&#8217;re just creating HTML markup, it doesn&#8217;t really matter.</p>
<p>Now, I can take this string and go ahead and dump it into an existing element in an HTML page. Just for sake of an example, you can use a blank page where the only existing element that we have on the page is the <code>document.body</code>, and then we can set our <code>markup</code> variable as the <code>inner.HTML</code>:</p>
<pre><code class="language-js">const markup = `
 &lt;div class="person"&gt;
    &lt;h2&gt;
        ${person.name}
    &lt;/h2&gt;
    &lt;p class="location"&gt;${person.location}&lt;/p&gt;
    &lt;p class="bio"&gt;${person.bio}&lt;/p&gt;
 &lt;/div&gt;
`;

document.body.innerHTML = markup;</code></pre>
<p>You could also use <code>document.createElement</code> to create an element, set the <code>inner.HTML</code>, and then append that to the body, whatever you like, which is the same with markup.</p>
<p>When we refresh the page you see &quot;Wes, web developer, Hamilton, really cool guy,&quot; and so on, all on their own individual lines.</p>
<p>If you inspect that, you&#8217;ll see it&#8217;s all been processed as proper HTML without having to do any <code>document.createElement</code>.</p>
<p>If you <code>console.log</code> the markup just to show you that the new lines are there. You can see that all of the new lines, all of the tabs and the spaces are included as part of that string.</p>
<p><strong>Note:</strong> &#8211; It&#8217;s important to note that any time you are creating HTML and the data comes from the user, we need to escape that data. Much more on this in future post but for now let&#8217;s assume this data is clean.</p>
<h2>Looping with Template Strings</h2>
<p>Another amazing feature of template strings is that you can nest them inside of each other. What if I have an array of <code>dogs</code> and I want to loop over and get myself a list item for each one?</p>
<pre><code class="language-js">const dogs = [
    { name: 'Snickers', age: 2 },
    { name: 'Hugo', age: 8 },
    { name: 'Sunny', age: 1 }
];</code></pre>
<p>Let&#8217;s use a template string, and create an unordered list with the class of <code>dogs</code>, and inside of that I want a list item for each one. But I can&#8217;t, I can&#8217;t just do something like <code>${dogs[0].name}</code> because that would be cheating and that&#8217;s not really scalable. So how would I loop over every single one?</p>
<p>We can nest template strings right inside of it. How do we do that? Let&#8217;s take a look here:</p>
<pre><code class="language-js">const markup = `
&lt;ul class="dogs"&gt;
    ${dogs.map(dog =&gt; `&lt;li&gt;${dog.name} is ${dog.age * 7}&lt;/li&gt;`)}
&lt;/ul&gt;
`;</code></pre>
<p>Here we are using a template string inside of a template string, so we&#8217;re going to return a list item, inside of that actual list item we are going to use <code>${dog.name}</code> and we&#8217;re going to say how old they are in dog years, which is <code>${dog.age *7}</code>.</p>
<p>Now we&#8217;ve got all this markup here. Let&#8217;s use <code>console.log</code>, and see where we&#8217;re at. You should see:</p>
<pre><code class="language-html">&lt;ul class="dogs"&gt;
    &lt;li&gt;Snickers is 14&lt;/li&gt;,&lt;li&gt;Hugo is 56&lt;/li&gt;,&lt;li&gt;Sunny is 7&lt;/li&gt;
&lt;/ul&gt;</code></pre>
<p>But we have that comma in there, so how do you get rid of that? We know that <code>map</code> will return an array, so we can simply just use <code>join</code> and an empty string, which will join it without the commas:</p>
<pre><code class="language-js">const markup = `
&lt;ul class="dogs"&gt;
    ${dogs.map(dog =&gt; &lt;li&gt;${dog.name} is ${dog.age * 7}&lt;/li&gt;`).join('')}
&lt;/ul&gt;
`;</code></pre>
<p>If you want to test this, you can use <code>document.body.innerHTML = markup</code> to put it right onto the page for us.</p>
<p>Again, you could do this on their own lines if you prefer to do each on their own lines and indent it, which is just much more maintainable:</p>
<pre><code class="language-js">const markup = `
&lt;ul class="dogs"&gt;
    ${dogs.map(dog =&gt; 
            `&lt;li&gt;${dog.name}
            is 
            ${dog.age * 7}
            &lt;/li&gt;`
     ).join('')}
 &lt;/ul&gt;
`;</code></pre>
<h3>Conditional If Statements with Template Strings</h3>
<p>Let&#8217;s look at an example where we need an <code>if</code> statement inside of our template string. This is taken straight from how you do <code>if</code> statements inside of a React render template, and that is with a ternary operator.</p>
<p>Here I&#8217;ve got a song, some data with a name and an artist:</p>
<pre><code class="language-js">const song = {
    name: 'Dying to live',
    artist: 'Tupac',
    featuring: 'Biggie Smalls'
};</code></pre>
<p>We always have a <code>name</code> of the song and the <code>artist</code> of the song, but sometimes we&#8217;ve got a <code>featuring</code> artist. If there is a <code>featuring</code>, we need to include it in our markup so we can add it to our <code>document.body.innerHTML</code> like this:</p>
<pre><code class="language-js">const markup = `
    &lt;div class="song"&gt;
        &lt;p&gt;
            ${song.name} - ${song.artist}
            (Featuring ${song.featuring})
        &lt;/p&gt;
    &lt;/div&gt;
`;

document.body.innerHTML = markup;</code></pre>
<p>If you load that, you&#8217;ll see `Dying to Live &#8211; Tupac (Featuring Biggie Smalls).</p>
<p>That works, but what if we delete <code>Biggie Smalls</code>, we get  `(Featuring undefined).</p>
<p>If it&#8217;s not there, we don&#8217;t want the parentheses or the word &quot;Featuring,&quot; or anything there. A way we can get around that is by using a <strong>ternary operator</strong>. Our ternary operator will say if &quot;this&quot; then &quot;that&quot;, otherwise nothing:</p>
<pre><code class="language-js">const markup = `
    &lt;div class="song"&gt;
        &lt;p&gt;
            ${song.name} - ${song.artist}
            ${song.featuring ? `(Featuring ${song.featuring})` : ''}
        &lt;/p&gt;
    &lt;/div&gt;
`;

document.body.innerHTML = markup;</code></pre>
<p>Using the ternary operator, we can use that to add any featured artist if there is one, otherwise it will just use a blank string, which will remove the featured artist brackets.</p>
<p>There we have it &#8211; a nice little way to do an if statement right inside template strings.</p>
<h3>Template Strings Render Functions</h3>
<p>The first few examples were pretty simple, but what happens when your data starts to get a little bit complex?</p>
<p>With nesting inside of nesting, inside of nesting, it starts to get a little bit hairy and harder to maintain your code. What I like to do is create what I call a <strong>render function</strong>. I&#8217;ve sort of taken that from React, where we create separate components that will handle different complex data and different components in our markup.</p>
<pre><code class="language-js">const beer = {
    name: 'Belgian Wit',
    brewery: `Steam Whistle Brewery`,
    keywords: ['pale', 'cloudy', 'spiced', 'crisp']
};

const markup = `
&lt;div class="beer"&gt;
    &lt;h2&gt;${beer.name}&lt;/h2&gt;
    &lt;p class="brewery"&gt;${beer.brewery}&lt;/p&gt;
&lt;/div&gt;
`;

document.body.innerHTML = markup;</code></pre>
<p>Just like you&#8217;d expect, in your HTML you&#8217;ll get the beer name and the beer brewery, and that&#8217;s all wrapped appropriately in <code>&lt;h2&gt;</code> and a <code>&lt;p&gt;</code> tags, and it&#8217;s looking pretty good. But what if I want to implement our array of keywords that&#8217;s nested inside of the actual <code>beer</code> object? I could just go ahead and do <code>map</code> right on one line, but I&#8217;d rather kick it off to a separate function, which I&#8217;ll call <code>renderKeywords</code>:</p>
<pre><code class="language-js">const beer = {
    name: 'Belgian Wit',
    brewery: `Steam Whistle Brewery`,
    keywords: ['pale', 'cloudy', 'spiced', 'crisp']
};

function renderKeywords(keywords) {
    return `
    &lt;ul&gt;
        ${keywords.map(keyword =&gt; `&lt;li&gt;${keyword}&lt;/li&gt;`)}
    &lt;/ul&gt;
    `;
}

const markup = `
&lt;div class="beer"&gt;
    &lt;h2&gt;${beer.name}&lt;/h2&gt;
    &lt;p class="brewery"&gt;${beer.brewery}&lt;/p&gt;
    ${renderKeywords(beer.keywords).join('')}
&lt;/div&gt;
`;

document.body.innerHTML = markup;</code></pre>
<p>You can see that our function an unordered list, and then uses the map function to fill in the keywords from our array as list items. It&#8217;s going to give us the keyword, and that is going to return, again, another template string that has the key word inside of it. We&#8217;re also using the <code>join</code> function to make sure that our keywords don&#8217;t include the commas from the array.</p>
<p>Now this function should just be able to pass it off. It&#8217;s only one line, and it should be able to create the unordered list, and the list item, any other HTML that we need to have created inside of this.</p>
<p>If you take a look at our HTML you&#8217;ve got your unordered list with all of the list items inside, and you can see that any time you need to render out a unordered list of keywords, whether it&#8217;s tied to this particular beer or not, it can simply just use <code>renderKeywords</code> to get the markup it needs.</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/template-strings-html/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
							</item>
		<item>
		<title>An Intro to Template Strings</title>
		<link>https://wesbos.com/javascript-template-strings/</link>
				<comments>https://wesbos.com/javascript-template-strings/#comments</comments>
				<pubDate>Mon, 17 Oct 2016 17:44:21 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[ES6]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3847</guid>
				<description><![CDATA[In JavaScript, when you want to put a variable inside of a string, it&#8217;s a pain in the ass because you have to stop your string, concatenate on the variable, and then open your string again and keep going. var &#8230; <a href="https://wesbos.com/javascript-template-strings/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>In JavaScript, when you want to put a variable inside of a string, it&#8217;s a pain in the ass because you have to stop your string, concatenate on the variable, and then open your string again and keep going.</p>
<pre><code class="language-javascript">var name = 'Snickers';
var age = 2;
var sentence = 'My dog ' + name + ' is ' + age * 7 + ' years old.';
</code></pre>
<p>Most other programming languages have the ability to just drop your variables right inside of a string and interpolate it, but until now JavaScript hasn&#8217;t had this.</p>
<p>What ends up happening is you forget one of your closing quotes, and you get an error and it tells you it&#8217;s on line 3. You say &#8220;Of course it&#8217;s on line 3, but I don&#8217;t know where it is!&#8221;</p>
<p>We can fix all of that with what&#8217;s called <strong>template strings</strong>, or <strong>template literals</strong> in ES6. In JavaScript we have double quotes and single quotes to make a string. Now we have a third way to make a string, and that is with back-ticks, which I&#8217;ve been using in most of my examples so far.</p>
<p>Let&#8217;s take the above code.  How do we convert it to ES6 template strings? We switch to using back ticks and then use the <code>${}</code> syntax inside those strings!</p>
<pre><code class="language-javascript">const name = 'Snickers';
const age = 2;
const sentence = `My dog ${name} is ${age * 7} years old.'`;
console.log(sentence);
</code></pre>
<p>That is going to pop in, or <em>interpolate</em>, the <code>name</code> and <code>age</code> variables that we previously had set there by using $, curly brackets and the variable name.</p>
<p>You can also run JavaScript straight away inside of these curly brackets, too. You can add in a variable, you can run a function, you can run any JavaScript inside of the curly brackets — including more template strings, but we will talk more about that later.</p>
<p>I&#8217;m calculating the age in dog years right inside of <code>sentence</code> by using <code>${age * 7}</code>, so our <code>console.log</code>  will just show a regular sentence, <code>My dog Snickers is 14 years old.</code></p>
<p>That&#8217;s a very basic overview of template strings. However there&#8217;s quite a bit more that we can do with them. It can be very handy other than just being able to stick variables inside of it — see you in the next one!</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/javascript-template-strings/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
							</item>
		<item>
		<title>React For Beginners Updated and Re-Recorded!</title>
		<link>https://wesbos.com/react-for-beginners-updated-and-re-recorded/</link>
				<comments>https://wesbos.com/react-for-beginners-updated-and-re-recorded/#comments</comments>
				<pubDate>Wed, 28 Sep 2016 14:07:31 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3842</guid>
				<description><![CDATA[Hey Folks &#8211; I totally updated and re-recored every single video on my React for Beginners series. Just under a year ago I launched ReactForBeginners.com — I wanted it to be an accessible, easy to understand and fun introduction to &#8230; <a href="https://wesbos.com/react-for-beginners-updated-and-re-recorded/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p><img src="https://reactforbeginners.com/images/facebook-share.png" alt="" /></p>
<p>Hey Folks &#8211; I totally updated and re-recored every single video on my <a href="https://ReactForBeginners.com">React for Beginners series</a>.</p>
<p>Just under a year ago I launched <a href="https://ReactForBeginners.com">ReactForBeginners.com</a> — I wanted it to be an accessible, easy to understand and fun introduction to building React applications and website components.</p>
<p>Since then I&#8217;ve had 6,317 developers, designers and even a few marketing folk take the course with me. The feedback has been amazing and the series has continued to be the de facto course where people go to learn React.</p>
<p>React has matured a lot in the past year. The core library has deprecated many things, React Router has seen 5 major version bumps, and ES6 has exploded in popularity. Because of all this, I&#8217;ve spent the last month re-recording and updating the entire series.</p>
<p>This is a free update for anyone who has bought the course in the past. Simply head on over to your <a href="https://ReactForBeginners.com/account">account</a> to stream or download the new videos.</p>
<p>To anyone new to the course, it&#8217;s <a href="https://ReactForBeginners.com">on sale to celebrate the re-launch</a>. As an added bonus, the next 167 people who use the code <strong>JAVASCRIPTMOVESFAST</strong> will get an additional $10 off.</p>
<p><img src="https://i.imgur.com/Kl8WO76.gif" alt="" /></p>
<h2>What Changed?</h2>
<ol>
<li>Switched the build system from gulp and browserify to the much easier to use webpack + create-react-app.</li>
<li>The initial tutorial used React.createClass() and then refactored to ES6 Classes. Since ES6 is much more popular now, I&#8217;ve switched to using ES6 classes right away. Of course I have my <a href="https://ES6.io">ES6.io course</a> if you need any extra help there but I make sure to explain classes for anyone new. I&#8217;ve also added in lots of content to understand method binding and property initializers.</li>
<li>Remove use of deprecated linkState, switch to explicitly using value= state and onChange= events</li>
<li>Remove all mixin use as React will eventually deprecate mixins.</li>
<li>Introduce linting with ESLint</li>
<li>upgrade to React Router 4 and it&#8217;s totally new API</li>
<li>Remove use of @autobind decorator</li>
<li>Upgrade to babel 6</li>
<li>Show how to build and package the application for production</li>
<li>Add in 3 deployment videos </li>
<li>Removed string refs in favour of function refs as React will likely deprecate string refs in the future</li>
<li>Use stateless components when possible and explain when you would use one</li>
<li>Remove spreading of &#8230;this.props, only pass what is needed to child components</li>
<li>Upgraded to the new Firebase 3.0</li>
</ol>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/react-for-beginners-updated-and-re-recorded/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
							</item>
		<item>
		<title>JavaScript Default Function Arguments</title>
		<link>https://wesbos.com/javascript-default-function-arguments/</link>
				<comments>https://wesbos.com/javascript-default-function-arguments/#comments</comments>
				<pubDate>Sun, 11 Sep 2016 12:38:35 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[ES6]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3832</guid>
				<description><![CDATA[Default function arguments in JavaScript are here. This is one of those features that&#8217;s going to make your life much easier, and make your code much more readable and maintainable. Let&#8217;s say we have a function called calculateBill which is &#8230; <a href="https://wesbos.com/javascript-default-function-arguments/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>Default function arguments in JavaScript are here. This is one of those features that&#8217;s going to make your life much easier, and make your code much more readable and maintainable.</p>
<p>Let&#8217;s say we have a function called <code>calculateBill</code> which is going to take in three things: the <code>total</code> cost of your meal, how much <code>tax</code> we need to pay, and then how much you would like to <code>tip</code> your waiter:</p>
<pre><code class="language-javascript">function calculateBill(total, tax, tip) {
    return total + (total * tax) + (total * tip);
}
</code></pre>
<p>From that, we can return the total amount of hte bill.</p>
<p>Then we&#8217;ll make a new variable called <code>totalBill</code>, and we&#8217;ll use our new function, to figure out how much all of that costs.</p>
<pre><code class="language-javascript">function calculateBill(total, tax, tip) {
    return total + (total * tax) + (total * tip);
}

const totalBill = calculateBill(100, 0.13, 0.15);
console.log(totalBill);
</code></pre>
<p>On a $100 meal, with 13% tax and a 15% tip, the console will tells us <code>128</code>, or $128.</p>
<p>What happens if we want to automatically assume 13% tax rate, and we want to assume a 15% tip rate?</p>
<p>What we could do is just pass in our $100 meal and get our result. If we omit <code>tax</code> and <code>tip</code> — <code>calculateBill(100)</code> our function returns us <code>NaN</code>, or &#8220;not a number&#8221;. That&#8217;s because we&#8217;re trying to do math against things that aren&#8217;t passed in.</p>
<pre><code class="language-javascript">function calculateBill(total, tax, tip) {
    console.log(tax);
    return total + (total * tax) + (total * tip);
}

const totalBill = calculateBill(100);
console.log(totalBill);
</code></pre>
<p>If you use <code>console.log</code> to show the value of <code>tax</code> or <code>tip</code>, you&#8217;ll see that they show up as <code>undefined</code>.</p>
<p>What we would normally do is we would add an <code>if</code> loop:</p>
<pre><code class="language-javascript">function calculateBill(total, tax, tip) {
    if(tax === undefined) {
        tax = 0.13;
    }
    if(tip === undefined) {
        tip = 0.15;
        }
    return total + (total * tax) + (total * tip);
}

const totalBill = calculateBill(100);
console.log(totalBill);
</code></pre>
<p>It works fine there, but there&#8217;s a whole lot of code that we added.</p>
<p>You might be saying, &#8220;Yeah, you can do this, tax equals tax,&#8221; or you can do this little trick here where you can say it equals itself.</p>
<pre><code class="language-javascript">function calculateBill(total, tax, tip) {
    tax = tax || 0.13;
    tip = tip || 0.15;
    return total + (total * tax) + (total * tip);
}

const totalBill = calculateBill(100);
console.log(totalBill);
</code></pre>
<p>I don&#8217;t mind that, but it can be a little bit hard on your team to have to read it. If you&#8217;ve got four or five different arguments coming in, then you&#8217;ve got to do all this crazy code at the top.</p>
<p>Another thing to note is the <code>||</code> trick will fallback to the default if you pass in <code>0</code>, <code>null</code>, <code>false</code> or any other falsy value. Not exactly what you want when you are trying to tip $0!</p>
<p>So let&#8217;s just do without that entirely. What we can do now in ES6 is just simply set it when we define our function, and those things will be assumed.</p>
<pre><code class="language-javascript">function calculateBill(total, tax = 0.13, tip = 0.15) {      
    return total + (total * tax) + (total * tip);
}

const totalBill = calculateBill(100);
console.log(totalBill);
</code></pre>
<p>If nothing is passed in for that one, then the defaults are going to go ahead. There we&#8217;re good to go.</p>
<p>What else we can do?</p>
<p>What if I wanted to pass only the total amount, as well as the tip amount, because I&#8217;m a big tipper. Let&#8217;s say I&#8217;m tipping 25% here, and the tax rate isn&#8217;t going to change because I&#8217;m still in Ontario.</p>
<p>However, if I just leave the tax empty, we&#8217;ll get a syntax error, like I would here:</p>
<pre><code class="language-javascript">function calculateBill(total, tax = 0.13, tip = 0.15) {      
    return total + (total * tax) + (total * tip);
}

const totalBill = calculateBill(100, , 0.25);
console.log(totalBill);
</code></pre>
<p>How do you leave a hole in here?</p>
<p>Well, what does this essentially check for? It checks for tax being passed <code>undefined</code> so you can just explicitly pass <code>undefined</code>:</p>
<pre><code class="language-javascript">function calculateBill(total, tax = 0.13, tip = 0.15) {      
    return total + (total * tax) + (total * tip);
}

const totalBill = calculateBill(100, undefined, 0.25);
console.log(totalBill);
</code></pre>
<p>The function is going to say, &#8220;Oh, no one passed any tax.&#8221; our default 13% and then the big tip is going to kick in here, and we get <code>138</code>, or $138.</p>
<p>I&#8217;ve got another example similar to this one where this is order dependent, and when we hit destructuring, I&#8217;m going to show you how do you use an object in destructuring, so that you could pass this in any order, as well as have default arguments. But more on that later.</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/javascript-default-function-arguments/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
							</item>
		<item>
		<title>JavaScript Arrow Functions and this scoping</title>
		<link>https://wesbos.com/arrow-functions-this-javascript/</link>
				<comments>https://wesbos.com/arrow-functions-this-javascript/#comments</comments>
				<pubDate>Sat, 10 Sep 2016 14:12:33 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[ES6]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3831</guid>
				<description><![CDATA[We&#8217;ve learned about the concise syntax of arrow functions. We&#8217;ve learned about the implicit return of arrow functions. The last thing we&#8217;re going to learn about and probably the most important is that the fact that this keyword does not &#8230; <a href="https://wesbos.com/arrow-functions-this-javascript/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>We&#8217;ve learned about the concise syntax of arrow functions. We&#8217;ve learned about the implicit return of arrow functions. The last thing we&#8217;re going to learn about and probably the most important is that the fact that <code>this</code> keyword <strong>does not get rebound</strong>.</p>
<p>What does that mean? Let&#8217;s show an example as to when you might run into this. This is a pretty visual one so you might be better off watching the corresponding <a href="https://ES6.io">ES6.io</a> video. We will be creating this:</p>
<p><p class='codepen'  data-height='400' data-theme-id='dark' data-slug-hash='KgpNjJ' data-default-tab='css,result' data-animations='run' data-editable='' data-embed-version='2'>
See the Pen <a href='http://codepen.io/wesbos/pen/KgpNjJ/'>Arrow Functions and `this`. — ES6.io</a> by Wes Bos (<a href='http://codepen.io/wesbos'>@wesbos</a>) on <a href='http://codepen.io'>CodePen</a>.dark</p>
<script async src="//codepen.io/assets/embed/ei.js"></script></p>
<p>What I have here is I&#8217;ve got this <code>div</code> with the class of <code>box</code> right here.</p>
<pre><code class="language-markup">&lt;div class="wrap"&gt;
    &lt;div class="box"&gt;
        &lt;h2&gt;Wes Bos&lt;/h2&gt;
        &lt;p class="social"&gt;@wesbos&lt;/p&gt;
    &lt;/div&gt;
&lt;/div&gt;
</code></pre>
<p>When you click that box what&#8217;s going to happen is a two-stage animation. You click it, and it grows. Then it animates in the <code>h2</code>, and the <code>social</code> paragraph, from the left and from the right.</p>
<p>With the source files, you can try this out in your browser&#8217;s element inspector. First add a class of <code>opening</code> to the <code>div</code>:</p>
<pre><code class="language-markup">&lt;div class="wrap"&gt;
    &lt;div class="box opening"&gt;
        &lt;h2&gt;Wes Bos&lt;/h2&gt;
        &lt;p class="social"&gt;@wesbos&lt;/p&gt;
    &lt;/div&gt;
&lt;/div&gt;
</code></pre>
<p>What that does it actually grows it.</p>
<p>Then if you add a class of <code>open()</code> to it, that will bring in the text.</p>
<pre><code class="language-markup">&lt;div class="wrap"&gt;
    &lt;div class="box opening open"&gt;
        &lt;h2&gt;Wes Bos&lt;/h2&gt;
        &lt;p class="social"&gt;@wesbos&lt;/p&gt;
    &lt;/div&gt;
&lt;/div&gt;
</code></pre>
<p>It&#8217;s always on the <code>&lt;div class="box"&gt;</code>, adding <code>opening</code>, and then after a couple of seconds I have a class of <code>open</code> being added to it.</p>
<p>I&#8217;ve given you all of the CSS that comes along with it. Nothing too exciting here, and that&#8217;s a whole another course together.</p>
<p>Essentially the way it works is when it has a class of <code>opening</code> I just change the width and the height. Then, when it has a class of <code>open</code>, I bring all of the text in. Then I&#8217;ve got transitions on everything so it goes has some funky effects.</p>
<p>If you open it in the browser and click it, though, you&#8217;ll see that nothing works.</p>
<p>We need to select that element. So in the <code>&lt;script&gt;</code> tags, we&#8217;re going to use <code>const</code>, just because we won&#8217;t want the reference to the box to change.</p>
<pre><code class="language-javascript">const box = document.querySelector('.box');
console.log(box);
</code></pre>
<p>If you run that, you can see that the <code>box</code> is logged to the console.</p>
<p>Here we are going to type a regular function, and include a <code>console.log</code> so we can take a look at what&#8217;s happening:</p>
<pre><code class="language-javascript">const box = document.querySelector('.box');
box.addEventListener('click', function() {
    console.log(this);    
});
</code></pre>
<p>It logs <code>this</code> as the same as <code>box</code>. The way you can think about this is you look at what got called <code>addEventListener</code>, and you look at the thing to the left of it, <code>box</code>. What&#8217;s <code>box</code>? That&#8217;s the <code>div</code> with the class of <code>box</code> that we have.</p>
<p>That&#8217;s good. But, if you swap this out with an arrow function here, watch what happens:</p>
<pre><code class="language-javascript">const box = document.querySelector('.box');
box.addEventListener('click', () =&gt; {
    console.log(this);    
});
</code></pre>
<p>We get <code>Window</code>. Why do we get <code>Window</code> here?</p>
<p>That&#8217;s because when you use an arrow function, the value of <code>this</code> is <strong>not rebound</strong> inside of that function. It is just inherited form whatever the parent scope is.</p>
<p>What&#8217;s the parent scope of this? It&#8217;s <code>Window</code>, as in the browser window.</p>
<p>If you use your console here and type <code>this</code>, you&#8217;ll see that <code>this</code> is equal to <code>Window</code>, because it&#8217;s not being bound to anything. It ends up by the window.</p>
<p>You don&#8217;t just want to go willy-nilly using arrow functions everywhere, because it&#8217;s just less to type. You need to know what the benefits and the drawbacks of them are. In this case I don&#8217;t want an arrow function, because I need the keyword to reference the actual box that got clicked. That would be even more important if I had a whole bunch of them.</p>
<p>We can&#8217;t use an arrow function there. I&#8217;m going to bring that back to regular function.</p>
<pre><code class="language-javascript">const box = document.querySelector('.box');
box.addEventListener('click', function() {
    console.log(this);    
});
</code></pre>
<p>That&#8217;s what we want. You generally want these functions for your top level ones. Then inside of that, we&#8217;re going to replace <code>console.log</code> with:</p>
<pre><code class="language-javascript">const box = document.querySelector('.box');
box.addEventListener('click', function() {
    this.classList.toggle('opening');    
});
</code></pre>
<p>Let&#8217;s see how that works. The box should animate itself in and out, in and out. If it does that, good.</p>
<p>After maybe 500 milliseconds or so, I want to also toggle <code>open</code>, because that&#8217;s the final stage. Remember, it&#8217;s a two-stage animation here.</p>
<p>I think we&#8217;ll use a timeout for that:</p>
<pre><code class="language-javascript">const box = document.querySelector('.box');
box.addEventListener('click', function() {
    this.classList.toggle('opening');
    setTimeout(function() {
       this.classList.toggle('open'); 
    });
});
</code></pre>
<p>OK, so does that work? No.</p>
<p>Our console says <code>Uncaught type error cannot read property toggle of undefined</code>. That&#8217;s weird. How do I debug that?</p>
<p>Let&#8217;s take a look using <code>console.log</code> to help us out:</p>
<pre><code class="language-javascript">const box = document.querySelector('.box');
box.addEventListener('click', function() {
    this.classList.toggle('opening');
    setTimeout(function() {
       console.log(this.classList);
       this.classList.toggle('open'); 
    });
});
</code></pre>
<p>If we run that, we see that <code>this.classList</code> comes back as <code>undefined</code>. It&#8217;s nothing. Why is there no <code>classList</code> on the box?</p>
<p>Let&#8217;s take another look, this time we&#8217;ll just <code>console.log(this)</code> to get a little deeper:</p>
<pre><code class="language-javascript">const box = document.querySelector('.box');
box.addEventListener('click', function() {
    this.classList.toggle('opening');
    setTimeout(function() {
       console.log(this);
       this.classList.toggle('open'); 
    });
});
</code></pre>
<p>We&#8217;ll see that it&#8217;s targeting <code>Window</code>. Why&#8217;s that?</p>
<p>If <code>this</code> inside the <code>opening</code> toggle function here was equal to <code>box</code>, why the heck is it not equal to <code>box</code> for the open function?</p>
<p>That&#8217;s because we&#8217;ve entered a new function, and <code>this</code> inside the function has <strong>not been bound</strong> to anything, which means that, if it&#8217;s not bound to anything, it&#8217;s going to be equal to the window. That&#8217;s a pain in the ass.</p>
<p>A lot of people would solve this by adding a <code>self</code> variable and use it to trigger the class <code>open</code> like this:</p>
<pre><code class="language-javascript">const box = document.querySelector('.box');
box.addEventListener('click', function() {
    var self = this;
    this.classList.toggle('opening');
    setTimeout(function() {
       console.log(this);
       self.classList.toggle('open'); 
    });
});
</code></pre>
<p>That&#8217;s works, but not the greatest, because we have this weird or some of you like to say <code>var that = this;</code> and etc.</p>
<p>Fortunately, we don&#8217;t need to do that anymore if I bring that back to this. What we need to do is just simply make it an arrow function:</p>
<pre><code class="language-javascript">const box = document.querySelector('.box');
box.addEventListener('click', function() {
    this.classList.toggle('opening');
    setTimeout(() =&gt; {
       console.log(this);
       this.classList.toggle('open'); 
    });
});
</code></pre>
<p>Why? Because when you have an arrow function, <strong>it does not change the value</strong> of <code>this</code>. It inherits the value of this from the <strong>parent</strong>. We don&#8217;t have to worry about the scope changing or anything like that.</p>
<p>We can just go ahead and keep working using this as if it was scoped to this actual function here, just great.</p>
<pre><code class="language-javascript">const box = document.querySelector('.box');
box.addEventListener('click', function() {
    this.classList.toggle('opening');
    setTimeout(() =&gt; {
       console.log(this);
       this.classList.toggle('open'); 
    }, 500);
});
</code></pre>
<p>We should probably put 500 milliseconds in here.</p>
<p>So let&#8217;s run that, and click it again and it closes. That&#8217;s a little bit funky. I&#8217;m going to fix this to be a little bit nicer.</p>
<p>None of this has anything to do with arrow functions. If you&#8217;re interested in seeing how I might figure this out, you can stay on with me.</p>
<p>The problem with this right here is that when you toggle an <code>open</code>, it adds a class of <code>opening</code>, then after 500 milliseconds it adds a class of <code>open</code>. When you close it down, you want it to be the opposite.</p>
<p>The way I would probably solve this is to first make two variables.</p>
<pre><code class="language-javascript">const box = document.querySelector('.box');
box.addEventListener('click', function() {
    let first = 'opening';
    let second ='open';
    this.classList.toggle(first);
    setTimeout(() =&gt; {
       console.log(this);
       this.classList.toggle(second); 
    }, 500);
});
</code></pre>
<p>I&#8217;m just using variables so we still have this problem.</p>
<p>Let&#8217;s add an <code>if</code> statement to switch our variables around. This is going to look forward into our destructuring exercise, but as little hot tip. If we want to switch two variables with ES6 you can simply put them in an array:</p>
<pre><code class="language-javascript">const box = document.querySelector('.box');
box.addEventListener('click', function() {
    let first = 'opening';
    let second = 'open';

    if (this.classList.contains(first)) {
        [first, second] = [second, first];
    }
    this.classList.toggle(first);
    setTimeout(() =&gt; {
       console.log(this);
       this.classList.toggle(second); 
    }, 500);
});
</code></pre>
<p>Because we&#8217;ve switched the variables, we should be able to get this to animate in the correct way.</p>
<p>Check this out. Click it open, click it closed, and you have a fun little animation that we&#8217;ve made there.</p>
<p>The big takeaway here is that we can use an arrow function for things inside of a normal function and it&#8217;s going to inherit the value of <code>this</code>.</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/arrow-functions-this-javascript/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
							</item>
		<item>
		<title>When Not to use an Arrow Function</title>
		<link>https://wesbos.com/arrow-function-no-no/</link>
				<comments>https://wesbos.com/arrow-function-no-no/#comments</comments>
				<pubDate>Sat, 10 Sep 2016 08:38:37 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[ES6]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3833</guid>
				<description><![CDATA[Before you start going absolutely bananas on using arrow functions everywhere, we need to chat. Arrow functions don&#8217;t replace regular functions. Just like Flexbox and floats, pixels and rems and anything else new that comes along, the older thing still &#8230; <a href="https://wesbos.com/arrow-function-no-no/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>Before you start going absolutely bananas on using arrow functions everywhere, we need to chat. <strong>Arrow functions don&#8217;t replace regular functions</strong>. Just like Flexbox and floats, pixels and rems and anything else new that comes along, the older thing still retains lots of utility because it works differently than the new thing.</p>
<p>We talked about the benefits of ES6 Arrow Functions in earlier videos and blog posts but let&#8217;s go through a couple examples of when you probably <em>don&#8217;t want an arrow function</em>. All of these are just going to boil down to not having the keyword <code>this</code>, but they are also different use cases that you&#8217;d run into.</p>
<h3>#1 — click handlers</h3>
<p>First of all, I&#8217;ve got this big button that says &#8216;Push me&#8217;:</p>
<pre><code class="language-markup">&lt;style&gt;
button {font-size: 100px; }
.on {background: #ffc600;}
&lt;/style&gt;

&lt;button id="pushy"&gt;Push me&lt;/button&gt;
</code></pre>
<p>When someone pushes or clicks that button, I want to toggle the class of <code>on</code> which should turn it yellow. When someone clicks that button, I&#8217;m going to run this following function:</p>
<pre><code class="language-javascript">const button = document.querySelector('#pushy');
button.addEventListener('click', () =&gt; {
    this.classList.toggle('on');
});
</code></pre>
<p>But if we click it, we get an error in the console: <code>TypeError, cannot read property 'toggle' of undefined</code></p>
<p>What does that mean? Well, if we remember from earlier, it&#8217;s the browser&#8217;s <code>window</code> attribute, right? We can use <code>console.log</code> to confirm it:</p>
<pre><code class="language-javascript">const button = document.querySelector('#pushy');
button.addEventListener('click', () =&gt; {
    console.log(this); // Window!
    this.classList.toggle('on');
});
</code></pre>
<p>Remember: we talked about that if you use an arrow function, the keyword <code>this</code> is not bound to that element. If we use a regular function, the keyword <code>this</code> will be bound to the element we clicked!</p>
<pre><code class="language-javascript">const button = document.querySelector('#pushy');
button.addEventListener('click', function() {
    console.log(this);
    this.classList.toggle('on');
});
</code></pre>
<p>In the console, <code>this</code> is now our button, and our big yellow button is actually working. The sames rules apply with jQuery, Google Maps or any other DOM Library you are using.</p>
<h3>#2: Object Methods</h3>
<p>Now, let&#8217;s take a look at this next one, when you need a method to bind to an object.</p>
<pre><code class="language-javascript">const person = {
    points: 23,
    score: () =&gt; {
        this.points++;
    }
}
</code></pre>
<p>We have our method called <code>score</code>, and whenever we call <code>person.score</code>, it should add one to our <code>points</code>, which is currently 23.</p>
<p>If we run <code>person.score();</code> a few times, we should be at 26 or something.</p>
<p>But if I call <code>person</code>, <code>points</code> is still at 23. Why?</p>
<p>Because it&#8217;s trying to add points to the window! Remember, when using an arrow function <code>this</code> is not bound to anything and it just inherits it from the parent scope which in this case is the window.</p>
<p>So let&#8217;s do the same thing with an OG function:</p>
<pre><code class="language-javascript">const person = {
    points: 23,
    score: function()  {
        this.points++;
    }
}
</code></pre>
<p>There we go. That will actually work, because that&#8217;s a full on function, and not an arrow function.</p>
<h3>3: Prototype Methods</h3>
<p>As our third example, we&#8217;ll talk about when you need to add a prototype method.</p>
<pre><code class="language-javascript">class Car {
    constructor(make, colour) {
        this.make = make;
        this.colour = colour;
    }
}
</code></pre>
<p>Here, I&#8217;ve got a <code>class</code>. We haven&#8217;t learned about classes yet, but just know that this is a way for us to make new cars.</p>
<p>I have a <code>class</code> constructor where, when you call <code>new Car</code> we pass it the type of <code>Car</code>, as well as the <code>colour</code> of the <code>Car</code>.</p>
<p>I can say <code>beemer</code> is a <code>BMW</code> that is <code>blue</code>, and the <code>subie</code> is a <code>Subaru</code> that is <code>white</code>:</p>
<pre><code class="language-javascript">const beemer = new Car('BMW', 'blue');
const subie = new Car('Subaru', 'white');
</code></pre>
<p>Let&#8217;s go ahead and look at them by calling them in the console, you&#8217;ll see that <code>subie</code> comes back as <code>Car {make: "Subaru", colour: "white"}</code>, and <code>beemer</code> will come back as <code>Car {make: "BMW", colour: "blue"}</code>, which is what we&#8217;d expect.</p>
<p>Now, after the fact, I added on this prototype method:</p>
<pre><code class="language-javascript">Car.prototype.summarize = () =&gt; {
    return `This car is a ${this.make} in the colour ${this.colour}`;  
};
</code></pre>
<p>&#8230;and what that allows us to do is that, even after these things have been created, we can add methods onto all of them. So our <code>Car.prototype.summarize</code> method is set, so let&#8217;s type into the console: <code>subie.summarize</code>.</p>
<p>If you&#8217;re using Chrome&#8217;s console, you&#8217;ll see that it auto-completes the method, because it&#8217;s available to you. Even though we added it after we created the <code>Car</code>, because I added it to the <code>prototype</code>, it&#8217;s available in every object that has been created from there.</p>
<p>What this <code>prototype</code> does is it returns <code>this.make</code> which is the make that we passed in, and <code>this.color</code> in a sentence.</p>
<p>However, with our example, <code>this.car</code> is <code>undefined</code> and the <code>colour</code> is <code>undefined</code>. Why is that?</p>
<p>It&#8217;s because we try to be cool. We try to be a bit of a hot shot here by using an arrow function. Again, why don&#8217;t we use an arrow function here? Because we explicitly need the keyword <code>this</code> so you have to use a regular function:</p>
<pre><code class="language-javascript">Car.prototype.summarize = function() {
    return `This car is a ${this.make} in the colour ${this.colour}`;  
};
</code></pre>
<p>Now, if we call <code>subie.summarize</code>, it says it&#8217;s a white Subaru, and <code>beemer.summarize</code>, we get BMW in blue.</p>
<p>Again, you must use a regular function for that.</p>
<h3>4: When you need an arguments Object</h3>
<p>For our last example, this is a little bit different:</p>
<pre><code class="language-javascript">const orderChildren = () =&gt; {
    const children = Array.from(arguments);
    return children.map((child, i) =&gt; {
        return `${child} was child #${i + 1}`;
    })
    console.log(arguments);
}
</code></pre>
<p>It doesn&#8217;t have to do with the keyword &#8220;this,&#8221; but we don&#8217;t have access to the <code>arguments</code> object when you use an arrow function.</p>
<p>This is helpful for when you want to run a function like <code>orderChildren</code> here, which can take unlimited arguments.</p>
<p>It might take one, it might take 100. It&#8217;s going to just say &#8220;This child was born #1&#8221;, or whichever.</p>
<p>For an example, let&#8217;s type into the console <code>orderChildren('jill', 'wes', 'jenna')</code>, which passes in <code>jill</code> as our first argument, <code>wes</code>, as our second, and <code>jenna</code> as our third. When you run it, you&#8217;ll get an error: <code>ReferenceError, arguments is not defined</code>.</p>
<p>this is because <code>arguments</code> is a keyword that we have in our <code>orderChildren</code> that&#8217;s going to give us an <code>Array</code> or array-ish value of everything that was passed in.</p>
<p>However, you do not get the <code>arguments</code> object if you use an arrow function. When you use a regular function, which is going to give us the actual content that we need.</p>
<pre><code class="language-javascript">const orderChildren = function() {
    const children = Array.from(arguments);
    return children.map((child, i) =&gt; {
        return `${child} was child #${i + 1}`;
    })
    console.log(arguments);
}
</code></pre>
<p><strong>Note:</strong> Another fix for this is to use a <code>...rest</code> param to collect all the arguments into an array. We will learn all about that in the rest videos and blog posts!</p>
<p>Again, to go through all those really quickly. Make sure that you aren&#8217;t just using arrow functions willy-nilly. In general, if you do not need the <code>arguments</code> object or you do not need <code>this</code>, or you know that you will not need it in the future, then you can feel free to go ahead and use an arrow function on everything else.</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/arrow-function-no-no/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
							</item>
		<item>
		<title>More Arrow Function Examples</title>
		<link>https://wesbos.com/arrow-function-examples/</link>
				<comments>https://wesbos.com/arrow-function-examples/#respond</comments>
				<pubDate>Fri, 09 Sep 2016 13:00:28 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[ES6]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3830</guid>
				<description><![CDATA[Let&#8217;s look at a couple more JavaScript arrow function examples. This is something that comes up often where I&#8217;m building an application, and I don&#8217;t necessary have the data in the right format that I need. I&#8217;m building a website &#8230; <a href="https://wesbos.com/arrow-function-examples/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>Let&#8217;s look at a couple more JavaScript arrow function examples.</p>
<p>This is something that comes up often where I&#8217;m building an application, and I don&#8217;t necessary have the data in the right format that I need.</p>
<p>I&#8217;m building a website for a bunch of racers, where the winners have been supplied to me in an array of strings in the order that they placed, and then they also gave me a variable, which includes the race that they won.</p>
<pre><code class="language-javascript">const race = '100m Dash';
const winners = ['Hunter Gath', 'Singa Song', 'Imda Bos'];
</code></pre>
<p>So Hunter Gath came in first, Singa Song came in second, and Imda Bos came in third.</p>
<p>Ideally for me, I would have an object with <code>name</code>, with the name of the racer, <code>place</code> with the place that they came in, and we can use the race variable to say what they won. Something like this:</p>
<pre><code class="language-javascript">{
    name: 'Wes Bos',
    place: 1,
    race: race
}
</code></pre>
<p>How would we do that? Well, we can actually use <code>.map()</code> again for that. By the way, <code>map</code> is not the only function that arrow functions work with. Arrow functions work with anything, and they&#8217;re particularly useful in these callback situations.</p>
<pre><code class="language-javascript">const win = winners.map((winner, i) =&gt; {name: winner, race: race, place: i})
</code></pre>
<p>We&#8217;re going to loop over each winner and return an object for each of the winners here. Our function passes two arguments, the <code>winner</code> string and <code>i</code>, for our index, and we&#8217;re going to return our <code>name</code>, <code>race</code>, and <code>place</code> that the person came in.</p>
<h3>Arrow Function Implicit Return an Object Literal</h3>
<p>That should work, where we&#8217;ve got this object here, but it doesn&#8217;t work, it throws a syntax error: <code>Unexpected token :</code></p>
<p>What&#8217;s wrong here? Well, earlier we told you that if you take the curly brackets off it&#8217;s an implicit <code>return</code>. How do you implicit <code>return</code>curly brackets when you mean for it to be an <strong>object literal</strong>, not the actual function block?</p>
<p>What we can do is, you just put parentheses around the object literal so that the arrow function knows it&#8217;s an object and <em>not</em> a a function block.</p>
<pre><code class="language-javascript">const win = winners.map((winner, i) =&gt; ({name: winner, race: race, place: i + 1}));
</code></pre>
<p>These parentheses show that you&#8217;re actually going to return an object literal, and these curly brackets aren&#8217;t for the actual function block. So <code>name</code> is <code>winner</code>, <code>race</code> is the <code>race</code> variable we have, and <code>place</code> is going to be set to <code>i + 1</code>, our index, plus one so that we aren&#8217;t zero-based.</p>
<h3>Viewing our Data</h3>
<p>Now we&#8217;ll take a look at our data.</p>
<p><img src="https://wesbos.com/wp-content/uploads/2016/09/ss-2016-09-07-at-10.50.42-AM.png" alt="" /></p>
<p>A little hot tip, you refresh. You can type <code>win</code> in the console to see all your objects, but then you got to do all this work on opening them up. What you can actually do is use <code>console.table(win)</code> and you get a sweet-looking table that will show you all the information.</p>
<p>Then the other thing, we haven&#8217;t learned about this yet, but <code>race: race</code> in our object looks a little bit redundant. A new feature of ES6 is you can just use <code>race</code>,  which is the same thing as saying, <code>race: race</code> Just say the variable <code>race</code> and the property name <code>race</code> is all named <code>race</code>. It&#8217;s going to do it just for us.</p>
<pre><code class="language-javascript">const win = winners.map((winner, i) =&gt; ({name: winner, race, place: i + 1}))
</code></pre>
<p>There we go, so that&#8217;s an example of doing an implicit return with an object literal.</p>
<h3>Arrow Function Filtering Example</h3>
<p>There&#8217;s another example here where we poll the people in the room for ages.</p>
<pre><code class="language-javascript">const ages = [23, 62, 45, 234, 2, 62, 234, 62, 34];
</code></pre>
<p>We want to filter this list for people who are older than 60 years old. Normally you&#8217;d do something like:</p>
<pre><code class="language-javascript">const old = ages.filter(age =&gt; if(age &gt; 60))...
</code></pre>
<p>Since we can pass it a condition that goes to true or false, and filter will return if it&#8217;s true and it won&#8217;t return if it&#8217;s false, we can just say, &#8220;Age is greater or equal to 60.&#8221;</p>
<pre><code class="language-javascript">const old = ages.filter(age =&gt; age &gt;= 60);
</code></pre>
<p>That looks like a bit funky because you got an arrow and a greater than, but what that will do is, if the age is greater or equal to 60, it will return <code>true</code> and thus be put into the <code>old</code> array.</p>
<p>That age is going to be put back into this new old array, and we can use <code>console.log(old)</code> to return our filtered array.</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/arrow-function-examples/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
		<item>
		<title>JavaScript Arrow Functions Introduction</title>
		<link>https://wesbos.com/arrow-functions/</link>
				<comments>https://wesbos.com/arrow-functions/#comments</comments>
				<pubDate>Thu, 08 Sep 2016 13:38:27 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[ES6]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3829</guid>
				<description><![CDATA[ES6 has introduced arrow functions which have three main benefits. First, they have a concise syntax. Secondly, they have implicit returns, which allows us to write these nifty one-liners. Thirdly, they don&#8217;t rebind the value of this when you use &#8230; <a href="https://wesbos.com/arrow-functions/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>ES6 has introduced arrow functions which have three main benefits. First, they have a <em>concise</em> syntax. Secondly, they have <em>implicit returns</em>, which allows us to write these nifty one-liners.</p>
<p>Thirdly, <em>they don&#8217;t rebind the value of <strong>this</strong></em> when you use a arrow function inside of another function, which is really helpful for when you&#8217;re doing things like click handlers and whatnot.</p>
<p>We&#8217;re going to take a look at a whole bunch of examples as well as we&#8217;re going to be using arrow functions all over the place in the <a href="https://ES6.io">ES6.io course</a>.</p>
<p>I&#8217;ve got an array of names:</p>
<pre><code class="language-javascript">const names = ['Wes', 'Kait', 'Lux'];
</code></pre>
<p>I want to add <code>'Bos'</code> to the end of all three of these.</p>
<p>Normally, you&#8217;d do something like this:</p>
<pre><code class="language-javascript">const fullNames = names.map(function(name){
  return `${name} Bos`;
});

console.log(fullNames); // Wes Bos, Kait Bos, Lux Bos
</code></pre>
<p>We&#8217;re going to use <strong>backticks</strong> here, which is our template strings. Don&#8217;t worry exactly about what that is, if you&#8217;re not sure just yet. We have a whole chapter on that coming up.</p>
<p>Anyway, It&#8217;s going to give me Wes Bos, Kait Bos, Lux Bos in the entire array. It took this array, transformed it into whatever the item was, plus the name &#8220;Bos&#8221; on the end.</p>
<p>That makes sense to me, but this isn&#8217;t an arrow function. Let&#8217;s take a look at how we could rewrite that.</p>
<h3>Turn it into an Arrow Function</h3>
<p>The first thing you do with an arrow function is, you simply delete the keyword <code>function</code> and add in what&#8217;s called a fat arrow. It looks like this: <code>=&gt;</code></p>
<pre><code class="language-javascript">const fullNames2 = names.map((name) =&gt; {
 return `${name} Bos`;
});

console.log(fullNames2); // Wes Bos, Kait Bos, Lux Bos
</code></pre>
<p>If you&#8217;ve come from other programming languages, you might have seen that before, but in JavaScript it&#8217;s the first time we&#8217;re seeing a fat arrow.</p>
<p>It&#8217;ll do exactly the same thing as <code>function</code>. If you <code>console.log</code> it, there should be no surprises there. We get the exact same thing.</p>
<h3>Removing Parens With Single Params</h3>
<p>We can go even further with it where, if you only have <em>one parameter</em> you can take out the parentheses:</p>
<pre><code class="language-javascript">const fullNames3 = names.map(name =&gt; {
 return `${name} Bos`;
});

console.log(fullNames3); // Wes Bos, Kait Bos, Lux Bos
</code></pre>
<p>That&#8217;s a bit of a stylistic choice. Some prefer the parenthesis regardless if you have one or more. In many callback fucntions (like our map function) it&#8217;s nice to leave them out for a very clean syntax.</p>
<h3>Arrow Function Implicit Return</h3>
<p>What else could I do with this? I can use what&#8217;s called an <strong>implicit return</strong>.</p>
<p>Hold on — what&#8217;s a <em>explicit</em> <code>return</code>?</p>
<p>That&#8217;s when you explicitly write <code>return</code> for what you want to <code>return</code>. But a lot of these callback functions that we write in JavaScript are just one-liners, where we <em>just return something immediately</em> in one line. We don&#8217;t need a whole bunch of lines.</p>
<p>**So &#8211; if the only purpose of your arrow function is to return something, there is no need for the <code>return</code> keyword. **</p>
<p>Our three line function with an explicit return is now a single line function with an <strong>implicit return</strong>.</p>
<pre><code class="language-javascript">const fullNames4 = names.map(name =&gt; `${name} bos`);

console.log(fullNames4);  // Wes Bos, Kait Bos, Lux Bos
</code></pre>
<p>We did three things here:</p>
<ol>
<li>delete the return</li>
<li>put it up on all of one line</li>
<li>delete the curly brackets</li>
</ol>
<p>When you delete your curly brackets, it&#8217;s going to be an implicit return, which means we do not need to specify that we are returning <code>${name} bos</code>.</p>
<p>It will just assume that we&#8217;re doing so, and you can <code>console.log</code> it to see the same thing again.</p>
<h3>No Arguments with Arrow Functions</h3>
<p>Then finally, if you have no arguments at all &#8212; in our above examples obviously we need an argument &#8212; but if no arguments at all, you need to pass some empty parenthesis there.</p>
<p>Maybe we&#8217;ll just return <code>Cool Bos</code>, and they&#8217;ll all be Cool Bos at the end.</p>
<pre><code class="language-javascript">const fullNames5 = names.map(() =&gt; `Cool Bos`);

console.log(fullNames5); // Cool Bos, Cool Bos, Cool Bos
</code></pre>
<p>Another pattern you may see is developers using an underscore <code>_</code> in place of <code>()</code>:</p>
<pre><code class="language-javascript">names.map(_ =&gt; `Cool Bos`);
</code></pre>
<p>We call this a <em>throwaway variable</em> because we&#8217;re actually creating a variable called <code>_</code> but not using it. It&#8217;s important to note that the <code>_</code> <strong>does not have any significance at all</strong>. I could use any variable name here, we just throw it away.</p>
<pre><code class="language-javascript">names.map(x =&gt; `Cool Bos`);
names.map(WESBOS =&gt; `Cool Bos`);
names.map(_ya___Yayayayay =&gt; `Cool Bos`);
names.map(do_yaget_the_point =&gt; `Cool Bos`);
</code></pre>
<p>Personally I prefer to use <code>() =&gt;</code> over <code>_ =&gt;</code> when there are no params but I&#8217;ll let you make that decision on your own.</p>
<h3>Arrow Functions are Always Anonymous Functions</h3>
<p>Another thing we need to know about arrow functions, at least right now, they may change this in future versions of JavaScript, is that arrow functions are always anonymous functions.</p>
<p>What is an anonymous function? Actually what&#8217;s a named function?</p>
<p>A named function is something like this:</p>
<pre><code class="language-javascript">function sayMyName(name) {
  alert(`Hello ${name}`);
}
</code></pre>
<p>The benefit to using a named function is that if you have a stack trace, which means if you have an error and you want to figure out, where did this go wrong, sometimes a line number as to where it happened isn&#8217;t very helpful, so you need to know actually the name of the function that it got called in.</p>
<p>If you use an arrow function, <strong>you cannot name them</strong>. None of our arrow functions have a name.</p>
<p>You can, however, put them in a variable. If I were to say something like this, and pass it a name, and create a function declaration that way.</p>
<pre><code class="language-javascript">const sayMyName = (name) =&gt; {alert(`Hello ${name}!`)}

sayMyName('Wes');
</code></pre>
<p>The thing we need to know about that is it is an anonymous function and it will not give us very good stack traces. However, if you&#8217;re not too concerned with that, then you can absolutely go ahead.</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/arrow-functions/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
							</item>
		<item>
		<title>Is var Dead? What should I use?</title>
		<link>https://wesbos.com/is-var-dead/</link>
				<comments>https://wesbos.com/is-var-dead/#comments</comments>
				<pubDate>Wed, 07 Sep 2016 15:39:24 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[ES6]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3828</guid>
				<description><![CDATA[We&#8217;ve learned about let and const — what they do, and how they&#8217;re scoped. We also know when they can be reassigned and when they cannot, but there&#8217;s a question: What Should I actually use? That&#8217;s a bit of a &#8230; <a href="https://wesbos.com/is-var-dead/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>We&#8217;ve learned about <code>let</code> and <code>const</code> — what they do, and how they&#8217;re scoped. We also know when they can be reassigned and when they cannot, but there&#8217;s a question: What Should I actually use?</p>
<p>That&#8217;s a bit of a hot topic in the community right now, because some people prefer to still use <code>var</code>. Some people are saying, &#8220;var is dead!&#8221; Some say, &#8220;Use <code>let</code>.&#8221; while others always use <code>const</code>.</p>
<p><code>var</code> isn&#8217;t dead &#8211; it still does what it always has done — it&#8217;s <a href="http://wesbos.com/javascript-scoping/">function scoped</a> and <a href="http://wesbos.com/let-vs-const/">you can reassign or re-bind it</a>. You may very well continue to choose it. There isn&#8217;t a <em>right</em> answer here, just opinions. Check them out and make your own decisions.</p>
<p>I&#8217;m just going to go over two of the leading opinions here. These are both done by some very, very smart people in the JavaScript scene, so I&#8217;ll let you pick your own.</p>
<p><a href="https://mathiasbynens.be/notes/es6-const">This one, by Mathias Bynens, is how I do it</a>. He says that &#8220;<code>const</code> is not about immutability where you can change the properties.&#8221;</p>
<p>Later on in the article he talks about <code>let</code> vs. <code>const</code>&#8230;</p>
<blockquote>
<ul>
<li>Use <code>const</code> by default </li>
<li>Use <code>let</code> only if rebinding is needed. </li>
<li><code>var</code> should not be ever used in ES6.</li>
</ul>
</blockquote>
<p>Whenever you make a variable, assume it&#8217;s <code>const</code>.  Only use <code>let</code> if you need to update the value of the variable. You can use <code>const</code> to keep it the same value.</p>
<p><a href="http://blog.getify.com/constantly-confusing-const/">Another popular opinion here is from Kyle Simpson</a>, and he also writes a whole bunch of awesome JavaScript books.</p>
<blockquote>
<ul>
<li>Use <code>var</code> for top-level variables that are shared across many (especially larger) scopes. </li>
<li>Use <code>let</code> for localized variables in smaller scopes.</li>
<li>Refactor <code>let</code> to <code>const</code> only after some code has to be written, and you&#8217;re reasonably sure that you&#8217;ve got a case where there shouldn&#8217;t be variable reassignment.</li>
</ul>
</blockquote>
<p>He says, basically, Use <code>var</code> to share larger scopes so you can put them inside of your function, and use <code>let</code> in smaller scopes. If you realize later that you need to update a value, you&#8217;d have to go back and make it a <code>let</code> instead of a <code>const</code>. If you use <code>let</code>, it&#8217;s easier to go back and refactor them to <code>const</code>.</p>
<p>Both of those are very valid opinions. I&#8217;ll let you make your own choice on that, but through <a href="https://es6.io">the ES6.io series</a>, I&#8217;ll be using <code>const</code> by default, <code>let</code> whenever I need to reassign a variable, and stay away from <code>var</code> entirely.</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/is-var-dead/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
							</item>
		<item>
		<title>Temporal Dead Zone ☠️</title>
		<link>https://wesbos.com/temporal-dead-zone/</link>
				<comments>https://wesbos.com/temporal-dead-zone/#comments</comments>
				<pubDate>Thu, 01 Sep 2016 13:12:46 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[ES6]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3816</guid>
				<description><![CDATA[Let&#8217;s talk real quick about the Temporal Dead Zone. This is a bit of a boring topic, so I&#8217;m going to try and make it at least a little fun for you. This is something that you probably won&#8217;t come &#8230; <a href="https://wesbos.com/temporal-dead-zone/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>Let&#8217;s talk real quick about the <strong>Temporal Dead Zone</strong>. This is a bit of a boring topic, so I&#8217;m going to try and make it at least a little fun for you.</p>
<p>This is something that you probably won&#8217;t come across too often, but it&#8217;s helpful to know in case someone ever slings it out in an interview. You&#8217;d be able to talk them about it. First of all, I call it the temporal dad zone, which is kind of fun.</p>
<pre><code class="language-javascript">var pizza = 'Deep Dish &#x1f355;&#x1f355;&#x1f355;';
console.log(pizza);
</code></pre>
<p>What happens when you try and log <code>pizza</code> to the console after it&#8217;s been created? You&#8217;ll see that we actually get to see <code>'Deep Dish &#x1f355;&#x1f355;&#x1f355;'</code>.</p>
<p>No big issue there.</p>
<p>What if I try to run <code>console.log</code> before creating it?</p>
<pre><code class="language-javascript">console.log(pizza);
var pizza = 'Deep Dish &#x1f355;&#x1f355;&#x1f355;';
</code></pre>
<p>Are we going to get:</p>
<ul>
<li><code>Undefined</code> </li>
<li>An error saying <code>pizza</code> is not defined yet</li>
<li>Are we actually going to see <code>'Deep Dish &#x1f355;&#x1f355;&#x1f355;'</code> </li>
</ul>
<p>We get <code>undefined</code>.  Why?</p>
<p>Because with <code>var</code> variables, you can only access them as they are defined. Before they are defined, you cannot access the actual value of them, but <strong>you can access the fact that the variable has been created before</strong>.</p>
<p>However, if I change that to <code>const</code> or <code>let</code>, you&#8217;ll now see that <code>pizza</code> is not defined at all. That&#8217;s an actual error, and that will <strong>break your code</strong>.</p>
<p>That is called the <strong>temporal dead zone</strong>, where you cannot access a variable before it is defined.</p>
<p>They mean that this is the temporal dead zone between <code>console.log</code> and a <code>let</code> or <code>const</code> variable, because you cannot access those kinds of variables before they&#8217;re created.</p>
<p>That&#8217;s all you need to know. Put that in your back pocket, because you&#8217;ll need it someday!</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/temporal-dead-zone/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
							</item>
		<item>
		<title>ES6 Block Scope is The new IIFE</title>
		<link>https://wesbos.com/es6-block-scope-iife/</link>
				<comments>https://wesbos.com/es6-block-scope-iife/#comments</comments>
				<pubDate>Thu, 01 Sep 2016 02:20:16 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[ES6]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3810</guid>
				<description><![CDATA[You can probably see where let and const are going to be useful: if you need to scope something to a block, or if you want to make a variable that cannot be changed by accident or on purpose. Let&#8217;s &#8230; <a href="https://wesbos.com/es6-block-scope-iife/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>You can probably see where <code>let</code> and <code>const</code> are going to be useful: <strong>if you need to scope something to a block</strong>, or <strong>if you want to make a variable that cannot be changed</strong> by accident or on purpose.</p>
<p>Let&#8217;s take a look at a couple of more examples of when it might be useful.</p>
<p>The first one is replacing the <strong>Immediately-Invoked Function Expression</strong>, or <strong>IIFE</strong>. I&#8217;m not sure if you&#8217;ve ever heard of this before, but it was coined by <a href="(http://benalman.com/news/2010/11/immediately-invoked-function-expression/)">Ben Allman back in 2010</a>.</p>
<p>An IIFE function runs itself immediately, and it creates a scope where nothing is going to leak into the parent scope. In our case, nothing is going to leak into the global scope of the window.</p>
<p>If I have a <code>var</code> variable: <code>var name = 'wes'</code></p>
<p>You can call that in the console, and that&#8217;s fine here. However, the window already has a <code>name</code> attribute, which is needed when you have a window opening up a another window.</p>
<p>That could something that some third-party JavaScript relies on in order for it to run, or maybe another script is using a variable called <code>name</code> and you accidentally overwrite that. It can get a little bit messy.</p>
<p>The way the IIFE fixes that is that the function runs immediately and you put your variables inside of that:</p>
<pre><code class="language-javascript">(function() {
var name = 'wes';
})();
</code></pre>
<p>These variables are now scoped to the IIFE function, and because <code>var</code> variables are function-scoped, they are not available in the global scope.</p>
<p>If you try to call <code>name</code> in the console now, it&#8217;s not undefined, it&#8217;s blank because, like I mentioned, it&#8217;s just blank because that is a property that lives on the window natively in JavaScript.</p>
<p>If I needed to access our function&#8217;s <code>name</code>, obviously, I&#8217;d have to do a <code>console.log</code> inside of the IIFE function, but the important thing is that it&#8217;s no longer leaking into the global scope.</p>
<p>With <code>let</code> and <code>const</code> variables, we don&#8217;t need a function for our variables to be scoped to that.</p>
<p>Why? Because <code>let</code> and <code>const</code> use <strong>block scope</strong>.</p>
<p>Let&#8217;s start over with a <code>const</code> instead of a <code>var</code></p>
<pre><code class="language-javascript">const name = 'wes';
</code></pre>
<p>If we call this in the console, we&#8217;ll see <code>'wes'</code>, but if we wrap it in curly brackets:</p>
<pre><code class="language-javascript">{
const name = 'wes';
}

</code></pre>
<p>Our <code>const</code> is going to be scoped to that block. If you try to call <code>name</code> in the console, we&#8217;ll get the window&#8217;s <code>name</code>, which is blank. But if we add a <code>console.log</code> to our block:</p>
<pre><code class="language-javascript">{
const name = 'wes';
console.log(name);
}

</code></pre>
<p>&#8230;we&#8217;ll get <code>wes</code> in the console. You don&#8217;t the IIFE stuff anymore. You&#8217;re using <code>let</code> and <code>const</code> because they are going to be scoped to that block.</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/es6-block-scope-iife/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
							</item>
		<item>
		<title>Quick Tip: Use let with for Loops in JavaScript</title>
		<link>https://wesbos.com/for-of-es6/</link>
				<comments>https://wesbos.com/for-of-es6/#comments</comments>
				<pubDate>Wed, 31 Aug 2016 15:59:54 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[ES6]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3814</guid>
				<description><![CDATA[The other problem using let and const will fix is with our for loop. This is something that you probably have all run into with your regular for loop, like one that will count from zero to nine: for(var i &#8230; <a href="https://wesbos.com/for-of-es6/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>The other problem using <code>let</code> and <code>const</code> will fix is with our <code>for</code> loop.</p>
<p>This is something that you probably have all run into with your regular <code>for</code> loop, like one that will count from zero to nine:</p>
<pre><code class="language-javascript">for(var i = 0; i &lt; 10; i++) {
  console.log(i);
}
</code></pre>
<p>Problems that arise here are two things:</p>
<p><strong>First</strong> of all, if I type <code>i</code> into the console, it returns <code>10</code>. We have this global variable that has leaked into the window, or into a parent scope, which is not something we necessarily want. It&#8217;s just a placeholder value that we need to work inside of this loop.</p>
<p><strong>Second</strong> of all, maybe you had something that&#8217;s going to run after some bit of time, an AJAX request, or, for this case, I going to mark it up with a <code>setTimeout()</code> and that function is going to run after one second:</p>
<pre><code class="language-javascript">for(var i = 0; i &lt; 10; i++) {
  console.log(i);
  setTimeout(function() {
    console.log('The number is ' + i);
  },1000);
}
</code></pre>
<p>If we run this, all of them are 10. The reason that we have that is because, <code>console.log(i)</code>  will run immediately and reference whatever <code>i</code> is. That runs immediately at <code>console.log</code> itself.</p>
<p>However, after one second, this entire loop has already gone through every iteration that it needs to and the variable <code>i</code> here is being overwritten every single time.</p>
<p>The problem with that is that by the time the first <code>setTimeout()</code> runs, <code>i</code> is already at 10, and we don&#8217;t have any way to reference it.</p>
<p>If you had an AJAX request where you are looping through a few of them, there isn&#8217;t any way without an IFFE to reference what the <code>i</code> variable was when it ran, not what it currently is after the loop.</p>
<p>One quick way we can fix that is if we just change <code>var</code> to <code>let</code>:</p>
<pre><code class="language-javascript">for(let i = 0; i &lt; 10; i++) {
 console.log(i);
 setTimeout(function() {
   console.log('The number is ' + i);
 },1000);
}
</code></pre>
<p>What do we know about <code>let</code>? It&#8217;s block-scoped. We have curly brackets in the <code>for</code> loop. If you run it now, after a second we&#8217;ll log zero through nine. We&#8217;re not getting 10, 10 times. We getting it as it was declared each and every time.</p>
<p>As a note, you couldn&#8217;t use a <code>const</code> for this because it needs to overwrite itself, and you can&#8217;t assign the same variable twice. When we use <code>let</code>, it&#8217;s going to scope <code>i</code> to our curly brackets.</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/for-of-es6/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
							</item>
		<item>
		<title>ES6 let VS const variables</title>
		<link>https://wesbos.com/let-vs-const/</link>
				<comments>https://wesbos.com/let-vs-const/#comments</comments>
				<pubDate>Tue, 30 Aug 2016 20:10:51 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[ES6]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3806</guid>
				<description><![CDATA[In the last post we learned all about how scoping works with JavaScript let, const and var variables. We now know that var is function scope, and now we know that let and const are block scope, which means any &#8230; <a href="https://wesbos.com/let-vs-const/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>In the last post we learned all about how scoping works with <a href="http://wesbos.com/javascript-scoping/">JavaScript let, const and var variables</a>.</p>
<p>We now know that <code>var</code> is <strong>function scope</strong>, and now we know that <code>let</code> and <code>const</code> are <strong>block scope</strong>, which means any time you&#8217;ve got a set of curly brackets you have block scope.</p>
<p>Now, we need to know <strong>you can only declare a variable inside of its scope once</strong>.</p>
<pre><code class="language-javascript">const key = 'abc123';
let points = 50;
let winner = false;
</code></pre>
<p>If I try to update points by re-declaring the let variable:</p>
<pre><code class="language-javascript">let points = 60;
</code></pre>
<p>The browser says <strong>points has already been declared</strong>.</p>
<p>However, with <code>var</code>, it will just go ahead and declare the variable, which can cause a lot of bugs, because you might accidentally use the same variable twice.</p>
<p>You <em>can</em> <strong>update</strong> a <code>let</code> variable, and we&#8217;ll take a look more at <code>let</code> and <code>const</code> but you <em>cannot</em> redeclare it twice in the same scope.</p>
<p>Now, what if I had this?</p>
<pre><code class="language-javascript">const key = 'abc123';
let points = 50;
let winner = false;

if(points &gt; 40) {
   let winner = true
}
</code></pre>
<p>If we type in the console, <code>winner</code> will come back as <code>false</code>. We can add a <code>Console.log</code> line to prove that it runs, but why is <code>winner</code> still <code>false</code>, if we set <code>winner</code> to be <code>true</code>?</p>
<p>The important thing here is that these two <code>winner</code> variables are actually <strong>two separate variables</strong>. They have the same name, but they are both <strong>scoped</strong> differently:</p>
<ul>
<li><code>let winner = false</code> outside of the if loop is scoped to the window.</li>
<li><code>let winner = true</code> inside the if loop is scoped to the block.</li>
</ul>
<p>If I change our <code>let winner</code> to be <code>var winner</code>, they&#8217;ll come back as <code>true</code>, because it&#8217;s not inside of a function, it&#8217;s not scoped to it, whereas a <code>let</code> variable is.</p>
<p>The other thing we need to know about it is that the difference between <code>let</code> and <code>const</code> is that <code>const</code> variables <strong>cannot be updated</strong>.</p>
<p><code>let</code> variables are made to be updated. I may say:</p>
<pre><code class="language-javascript">const key = 'abc123';
let points = 50;
let winner = false;

points = 60;
</code></pre>
<p>..and that will work just fine.</p>
<p>However, I&#8217;ve got that <code>key</code> variable, maybe something that you do not want to ever change, we can use a <code>const</code>, which stands for <strong>constant</strong>.</p>
<pre><code class="language-javascript">const key = 'abc123';
</code></pre>
<p>If I try to update it like so:</p>
<pre><code class="language-javascript">const key = 'abc123';
let points = 50;
let winner = false;

key = abc1234;
</code></pre>
<p>That won&#8217;t work because you cannot update a <code>const</code> variable, whereas you can update a <code>let</code> variable.</p>
<p>We&#8217;re going to go more into examples of these and you&#8217;re going to understand which one to use as we go through, but that&#8217;s really all we need to know about it for now.</p>
<p>One other quick thing is that sometimes people think that <code>const</code> means it&#8217;s <strong>immutable</strong>, which means that if I have an object&#8230;</p>
<pre><code class="language-javascript">const person = {
 name: 'Wes',
 age: 28
}
</code></pre>
<p>&#8230;and if I try to update something in the <code>const</code> object by typing <code>person = { name: 'Wesley' }</code> it won&#8217;t allow me to do that.</p>
<p>However, the properties of a <code>const</code> variable <em>can</em> change. That&#8217;s because the entire object is not immutable. It just can&#8217;t be reassigned entirely.</p>
<p>The way I like to think about it with an object is that the person is me. I&#8217;m not going to ever change, my entire life, but attributes about me are going to change.</p>
<p>Maybe my age, my hair color, where I live — things about me — are going to change. That&#8217;s fine, as long as the object that is assigned to Wes is always the exact same object, I can go ahead and set a new age:</p>
<pre><code class="language-javascript">const person = {
  name: 'Wes',
  age: 28
}

person.age = 29
</code></pre>
<p>That will work just fine, but I cannot ever wipe out the entire variable.</p>
<p>If you do need to freeze everything, we have something called <code>Object.freeze</code>. It&#8217;s actually not part of ES6, <a href="https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze">but you can take a look at it on MDN</a>.</p>
<p>So we can use it on our object:</p>
<pre><code class="language-javascript">const wes = Object.freeze(person);
</code></pre>
<p>If I try to update <code>Wes.age = 30</code>, it will still say <code>28</code> <img src="https://s.w.org/images/core/emoji/12.0.0-1/72x72/1f44c.png" alt="👌" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/let-vs-const/feed/</wfw:commentRss>
		<slash:comments>49</slash:comments>
							</item>
		<item>
		<title>How let and const are scoped in JavaScript</title>
		<link>https://wesbos.com/javascript-scoping/</link>
				<comments>https://wesbos.com/javascript-scoping/#comments</comments>
				<pubDate>Tue, 30 Aug 2016 17:35:56 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[ES6]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3800</guid>
				<description><![CDATA[There are a couple new ways to declare variables in ES6 that help us out with scoping. We can declare variables with var, which we&#8217;ve always used, but now we can use let and const to declare variables too. These &#8230; <a href="https://wesbos.com/javascript-scoping/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>There are a couple new ways to declare variables in ES6 that help us out with scoping. We can declare variables with <code>var</code>, which we&#8217;ve always used, but now we can use <code>let</code> and <code>const</code><br />
to declare variables too.</p>
<p>These two have some attributes about them which are going to be helpful for us in creating variables but let&#8217;s do a quick review to show you  how <code>var</code>, <code>let</code>, and <code>const</code> are different.</p>
<p>Firstly, <code>var</code> variables can be <strong>redefined</strong> or <strong>updated</strong>. Let&#8217;s use console.log to show the width which we can update the width to be 200, and then we&#8217;ll console log the width again.</p>
<pre><code class="language-javascript">var width = 100;
console.log(width); // 100
width = 200;
console.log(width); // 200
</code></pre>
<p>If you run this in your browser, you&#8217;ll see we get 100, 200, which isn&#8217;t a big deal. We&#8217;re able to update them. You can also put a <code>var</code> in front of line 3 if you were to accidentally redeclare the variable. If you do, it won&#8217;t do anything. It will work as you&#8217;d expect, but it won&#8217;t yell at you for creating the same variable name twice in the same scope because <code>var</code> variables can be <strong>updated</strong> or <strong>redefined</strong>.</p>
<p>We also need to remember how <code>var</code> variables are scoped. <strong>Scoping</strong> essentially means, &#8220;Where are these variables available to me?&#8221; In the case of <code>var</code> variables, they&#8217;re <strong>function scope</strong>, which means that they are only available inside the function that they are created in. However, if they are not declared in a function, then they are <strong>globally scoped</strong>, and they&#8217;re available in the whole window.</p>
<p>If I created a function and put my var width inside of it, and console logged the width, and then I were to run it? Is that going to work?</p>
<pre><code class="language-javascript">function setWidth() {
  var width = 100;
  console.log(width);
}
setWidth();
</code></pre>
<p>Of course, it&#8217;s going to work because this width is available inside of this function.</p>
<p>But if I also tried to console log the width after I&#8217;ve set the width like this?</p>
<pre><code class="language-javascript">function setWidth() {
  var width = 100;
  console.log(width);
}
setWidth();
console.log(width); // error, width is not defined
</code></pre>
<p>It won&#8217;t work. Why won&#8217;t it work? Because <strong><code>width</code> is only scoped to that function</strong>. It is a local variable to our setWidth function. It is not available outside the confines. Think of the curly brackets as gates, or function jail, and our <code>var</code> variables are in there.</p>
<p>That&#8217;s important for us to know. If you do want to globally scope width, we need to declare it outside the function like so, and update it inside the function:</p>
<pre><code class="language-javascript">var width;
function setWidth() {
  width = 100;
  console.log(width);
}
setWidth();
console.log(width);
</code></pre>
<p>Generally, it&#8217;s probably not what you want to do. You want to keep your variables inside of your function. If you need something outside of a function, you want to return it and store that in a variable. That&#8217;s something that we need to know about function scoping. But I&#8217;m going to show you a use case where function scoping sort of comes back and bites us.</p>
<p>Let&#8217;s say we have an age variable and we have an if statement. We want to create a number of dog years. If they are greater than 12, let&#8217;s calculate their ages in dog years and show &#8220;You are (however many) dog years old&#8221; in the console if they&#8217;re older than 12.</p>
<pre><code class="language-javascript">var age = 100;
if(age &gt; 12) {
  var dogYears = age * 7;
  console.log(`You are ${dogYears} dog years old!`);
}

</code></pre>
<p>Just as an aside, you can see I&#8217;m using back ticks in this example, but I&#8217;m going to tell you all about this in the &#8220;Template Strings&#8221; section.</p>
<p>The one thing that is a little bit strange here is that <code>var dogYears</code> is just a temporary variable, and I just needed this real quick in order to calculate something and then stick it into a <code>console.log</code> or stick it into a string or whatever. If you go to your browser console and call <code>dogYears</code>, you&#8217;ll see that it&#8217;s leaked outside of the if statement and it is now a global variable that lives on <code>window</code>, which isn&#8217;t really what we want.</p>
<p>Even though this was a temporary variable that I only needed inside of one if statement, because <code>var</code> variables are <strong>function scoped</strong> and remember, there&#8217;s no function here, it&#8217;s going to be <strong>globally scoped</strong>. It&#8217;s scoped to the entire window, which is a little bit of a pain here. That is one of the benefits to using <code>let</code> and <code>const</code>. Instead of being scoped to the function, it is <strong>block scoped</strong>, which is something new.</p>
<p>What is a block? Here is a great example:</p>
<pre><code class="language-javascript">// ...
if(age &gt; 12) {
  var dogYears = age * 7;
  console.log(`You are ${dogYears} dog years old!`);
}

// ...
</code></pre>
<p>Any time that you see <strong>{ curly brackets }</strong>, that&#8217;s a block. Functions are also blocks, <code>let</code> and <code>const</code> are still going to be scoped to a function, but if inside of that function or if inside of some other element that you have, <strong>it will be scoped to the closest set of curly brackets</strong>.</p>
<p>If I now take this dog years here and change it to <code>let</code>&#8230;</p>
<pre><code class="language-javascript">var age = 100;
if(age &gt; 12) {
  let dogYears = age * 7;
  console.log(`You are ${dogYears} dog years old!`);
}
console.log(dogYears); // error because it's scoped only to the above block

</code></pre>
<p>&#8230;and I refresh, everything works as we would want. However, if you call <code>dogYears</code> in the browser console, it says, &#8220;Dog years is not defined.&#8221; Why? Because I declared it as a <strong><code>let</code> variable</strong>. It is only declared inside of a block scope, now, not a global scope like <code>var</code>, a block scope, and that temporary variable has not leaked out of the block.</p>
<p>You can also use <code>const</code> and get the same results, which is what we will talk about in the <a href="https://es6.io">ES6.io</a> video.</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/javascript-scoping/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
							</item>
		<item>
		<title>ES6 for Everyone!</title>
		<link>https://wesbos.com/es6-for-everyone/</link>
				<comments>https://wesbos.com/es6-for-everyone/#comments</comments>
				<pubDate>Tue, 19 Jul 2016 16:35:34 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3792</guid>
				<description><![CDATA[The last few months I&#8217;ve been hustling away at my next JavaScript course &#8211; ES6 for everyone. Today I&#8217;m super excited to launch it! ES6.io ES6 for Everyone is a premium training course to strengthen your core JavaScript skills and &#8230; <a href="https://wesbos.com/es6-for-everyone/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p><a href="https://es6.io" rel="attachment wp-att-3793"><img src="https://wesbos.com/wp-content/uploads/2016/07/es6-facebook-share-650x309.png" alt="es6-facebook-share" width="640" height="304" class="size-large wp-image-3793" srcset="https://wesbos.com/wp-content/uploads/2016/07/es6-facebook-share-650x309.png 650w, https://wesbos.com/wp-content/uploads/2016/07/es6-facebook-share-300x143.png 300w, https://wesbos.com/wp-content/uploads/2016/07/es6-facebook-share-768x365.png 768w, https://wesbos.com/wp-content/uploads/2016/07/es6-facebook-share.png 1127w" sizes="(max-width: 640px) 100vw, 640px" /></a></p>
<p>The last few months I&#8217;ve been hustling away at my next JavaScript course &#8211; ES6 for everyone. Today I&#8217;m super excited to launch it! <a href="https://ES6.io">ES6.io</a></p>
<p><a href="https://ES6.io">ES6 for Everyone</a> is a premium training course to strengthen your core JavaScript skills and master all that ES6 has to offer. ES6 is a major update to JavaScript that includes dozens of new features. With a focus on simplicity and readability, this course is an efficient way to find out what is new in JavaScript and most importantly when and how you should use it.</p>
<p>Join me for a fun and approachable look at all ES6 has to offer — boost your skills and further your career.</p>
<p><iframe class='youtube-player' type='text/html' width='640' height='360' src='https://www.youtube.com/embed/Pji4BcJD4TA?version=3&#038;rel=1&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' allowfullscreen='true' style='border:0;'></iframe></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/es6-for-everyone/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
							</item>
		<item>
		<title>Announcing Learn Redux</title>
		<link>https://wesbos.com/learn-redux/</link>
				<comments>https://wesbos.com/learn-redux/#comments</comments>
				<pubDate>Fri, 10 Jun 2016 17:18:10 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3785</guid>
				<description><![CDATA[I&#8217;m super excited to announce my latest course Learn Redux. Redux is a way to manage your state in your React (and other JavaScript) applications. I&#8217;ve had over 5,000 people take my React For Beginners and this is the answer &#8230; <a href="https://wesbos.com/learn-redux/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p><img src="https://wesbos.com/wp-content/uploads/2016/06/share-650x366.png" alt="share" width="640" height="360" class="alignleft size-large wp-image-3786" srcset="https://wesbos.com/wp-content/uploads/2016/06/share-650x366.png 650w, https://wesbos.com/wp-content/uploads/2016/06/share-300x169.png 300w, https://wesbos.com/wp-content/uploads/2016/06/share-768x433.png 768w, https://wesbos.com/wp-content/uploads/2016/06/share.png 1635w" sizes="(max-width: 640px) 100vw, 640px" /></p>
<p>I&#8217;m super excited to announce my latest course Learn Redux.</p>
<p>Redux is a way to manage your state in your React (and other JavaScript) applications. I&#8217;ve had over 5,000 people take my <a href="https://ReactForBeginners.com">React For Beginners</a> and this is the answer to &#8220;What should I learn next?!&#8221;.</p>
<p>It&#8217;s 20 videos at just over 2.5 hours of content &#8211; easily doable in an afternoon. The videos are totally free and you can thank <a href="http://getsentry.com">Sentry</a> for sponsoring my time to create them.</p>
<p>Grab them at <a href="https://LearnRedux.com">LearnRedux.com</a> today!</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/learn-redux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
							</item>
		<item>
		<title>The Best Flexbox Resources</title>
		<link>https://wesbos.com/flexbox-resources/</link>
				<comments>https://wesbos.com/flexbox-resources/#comments</comments>
				<pubDate>Thu, 14 Apr 2016 14:19:42 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3772</guid>
				<description><![CDATA[Flexbox is unbelieveable &#8211; it&#8217;s not only making complex layouts easier to build, it&#8217;s starting to push the limits of what we can do in the browser and in turn makes us better designers. Yeah it&#8217;s a bit hard to &#8230; <a href="https://wesbos.com/flexbox-resources/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p><img src="https://wesbos.com/wp-content/uploads/2016/04/flexbox-resources-650x366.png" alt="flexbox-resources" style="width: 100%; margin: 0;" /></p>
<p>Flexbox is unbelieveable &#8211; it&#8217;s not only making complex layouts easier to build, it&#8217;s starting to push the limits of what we can do in the browser and in turn makes us better designers.</p>
<p>Yeah it&#8217;s a bit hard to learn. Yeah there are bugs. Yeah the API is funky. Quit your belly achin&#8217; — spend an afternoon learning flexbox and that will all melt away.</p>
<p>With the demise of IE9 for most developers, everyone is learning flexbox! With that, we have seen some fantastic Flexbox resources popup. Here are the best ones to update your skillset and get some practice.</p>
<p><a href="https://chriswrightdesign.com/experiments/">Chris Wright has some great experiments</a> and has done a ton of research into how to best use Flexbox.</p>
<p><a href="http://Flexbox.io">What The Flexbox?! — Flexbox.io</a> is a quick, free 20 video course aimed at getting you to drop your float knowledge and understand the fundamentals of Flexbox.</p>
<p><a href="https://github.com/philipwalton/flexbugs">Flexbugs</a> is a Github repo full of the weird cross browser bugs that you may hit accompanied with solutions on how to solve them.</p>
<p><a href="http://kyusuf.com/post/almost-complete-guide-to-flexbox-without-flexbox">Almost complete guide to flexbox (without flexbox)</a>  is a cheatsheet-esque guide that offers backwards compatible alternatives to flexbox properties.</p>
<p><a href="https://css-tricks.com/snippets/css/a-guide-to-flexbox/">CSS-Tricks Flexbox Reference</a> is a must bookmark for anyone needing a quick visual reference on each of the flexbox properties.</p>
<p><a href="https://flexbox.webflow.com/">Webflow Builder</a> is a great tool that will help you build Flexbox layouts.</p>
<p><a href="http://flexboxfroggy.com/">Flexbox Froggy</a> is a really fun game aimed at teaching you flexbox. It helps with the question &#8220;How do I get this to go there?!&#8221;.</p>
<p><a href="http://flexboxin5.com/">Flexbox in 5</a> is a quick tutorial that steps you through high level flexbox understanding.</p>
<p><a href="https://www.flexboxgame.com/">Flexbox Game</a> is another fun game that will help you sharpen your flexbox skills.</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/flexbox-resources/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
							</item>
		<item>
		<title>How do :nth-child() and nth-of-type really work?</title>
		<link>https://wesbos.com/nth-child/</link>
				<comments>https://wesbos.com/nth-child/#comments</comments>
				<pubDate>Mon, 11 Apr 2016 14:53:27 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3756</guid>
				<description><![CDATA[I get this question a lot so I thought I&#8217;d make a quick video. When you have a list of items, nth-child() and nth-of-type may not do exactly what you think they do. Check this quick video for some clarity. &#8230; <a href="https://wesbos.com/nth-child/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>I get this question a lot so I thought I&#8217;d make a quick video.</p>
<p>When you have a list of items, <code>nth-child()</code> and <code>nth-of-type</code> may not do exactly what you think they do.</p>
<p>Check this quick video for some clarity. Enjoy!</p>
<p><iframe class='youtube-player' type='text/html' width='640' height='360' src='https://www.youtube.com/embed/KIIktcWu6hc?version=3&#038;rel=1&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' allowfullscreen='true' style='border:0;'></iframe></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/nth-child/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
							</item>
		<item>
		<title>15 Slack Tips in 5 Minutes</title>
		<link>https://wesbos.com/slack-tips/</link>
				<comments>https://wesbos.com/slack-tips/#respond</comments>
				<pubDate>Wed, 06 Apr 2016 13:17:59 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Workflow + Tooling]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3753</guid>
				<description><![CDATA[I&#8217;m finding many new devs are joining Slack channels and they aren&#8217;t 100% sure on how do things like post code snippets, format text or edit a previous reply. A quick crash course in how to use Slack &#8211; 15 &#8230; <a href="https://wesbos.com/slack-tips/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>I&#8217;m finding many new devs are joining Slack channels and they aren&#8217;t 100% sure on how do things like post code snippets, format text or edit a previous reply.</p>
<p>A quick crash course in how to use Slack &#8211; 15 tips in 5 minutes. I&#8217;m sure you&#8217;ll find something you didn&#8217;t know about!</p>
<p><iframe class='youtube-player' type='text/html' width='640' height='360' src='https://www.youtube.com/embed/gvJAcElFMUU?version=3&#038;rel=1&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' allowfullscreen='true' style='border:0;'></iframe></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/slack-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
		<item>
		<title>Mastering Markdown Mini Series</title>
		<link>https://wesbos.com/mastering-markdown/</link>
				<comments>https://wesbos.com/mastering-markdown/#respond</comments>
				<pubDate>Fri, 18 Mar 2016 13:18:15 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Workflow + Tooling]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3733</guid>
				<description><![CDATA[Markdown is my favourite way to write everything from training material to github responses and it&#8217;s ubiquitous enough that we are able to write markdown on most major platforms. Markdown is a very simple language and can be easily mastered &#8230; <a href="https://wesbos.com/mastering-markdown/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p><a href="http://masteringmarkdown.com" rel="attachment wp-att-3734"><img src="https://wesbos.com/wp-content/uploads/2016/03/share@1x-650x366.png" alt="Mastering Markdown" width="640" height="360" /></a></p>
<p>Markdown is my favourite way to write everything from training material to github responses and it&#8217;s ubiquitous enough that we are able to write markdown on most major platforms.</p>
<p>Markdown is a very simple language and can be easily mastered in under an hour. I made this quick 34 minute mini course for anyone who is looking to learn markdown for the first time, or fill in any gaps along the way, or just see my personal process and workflow when I write markdown.</p>
<p>Enjoy! <a href="http://masteringmarkdown.com">MasteringMarkdown.com</a></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/mastering-markdown/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
		<item>
		<title>🔥 Git Hot Tips</title>
		<link>https://wesbos.com/git-hot-tips/</link>
				<comments>https://wesbos.com/git-hot-tips/#comments</comments>
				<pubDate>Thu, 10 Mar 2016 14:10:14 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Workflow + Tooling]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3727</guid>
				<description><![CDATA[Don&#8217;t you just love little tips that make you say &#8220;How did I not know that?!&#8221;? Small incremental improvements are the way that you inch towards mastery of a topic. Every day I learn little things about web development that &#8230; <a href="https://wesbos.com/git-hot-tips/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>Don&#8217;t you just love little tips that make you say &#8220;How did I not know that?!&#8221;?</p>
<p>Small incremental improvements are the way that you inch towards mastery of a topic. Every day I learn little things about web development that as a whole make me much better at my job.</p>
<p>This is a list of git tips — you may know a few of them but I bet there are a few nuggets that will help you improve your workflow 1, 5 or 10%.</p>
<p>A big thanks to everyone who <a href="https://twitter.com/wesbos/status/707384498372136960">shared their tips on twitter</a>.</p>
<h2><code>git add -p</code></h2>
<p>Rather than <code>git add</code> everything or individual files, this <code>-p</code> will allow you to step through each change, or <code>hunk</code>, and decide if you&#8217;d like to commit it. This is really handy if you have made two different changes to the same file and want to commit them separately.</p>
<h2><code>git log -5 --pretty --oneline</code></h2>
<p>View your last 5 latest commits each on their own line.</p>
<p><a href="https://twitter.com/luclemo/status/707385039856791552"><img src="https://s.w.org/images/core/emoji/12.0.0-1/72x72/1f35f.png" alt="🍟" class="wp-smiley" style="height: 1em; max-height: 1em;" /> @luclemo</a></p>
<h2><code>git shortlog -sn</code></h2>
<p>Quickly get a list of contributors and see how many commits each person has.</p>
<p><a href="https://twitter.com/csswizardry/status/707573651449757696"><img src="https://s.w.org/images/core/emoji/12.0.0-1/72x72/1f44f.png" alt="👏" class="wp-smiley" style="height: 1em; max-height: 1em;" /> @csswizardry</a></p>
<h2><code>git log --all --graph --decorate --oneline --simplify-by-decoration</code></h2>
<p>This one is the best &#8211; you need to see what it does visually:</p>
<blockquote class="twitter-tweet" data-conversation="none" data-lang="en">
<p lang="en" dir="ltr"><a href="https://twitter.com/wesbos">@wesbos</a> Pretty branch status in your CLI ➜ git log &#8211;all &#8211;graph &#8211;decorate &#8211;oneline &#8211;simplify-by-decoration <a href="https://t.co/6gtVmvLVXC">pic.twitter.com/6gtVmvLVXC</a></p>
<p>&mdash; Tommy Hodgins (@innovati) <a href="https://twitter.com/innovati/status/707385937219743744">March 9, 2016</a></p></blockquote>
<p><script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script></p>
<p>You&#8217;ll never remember this one so put it in your ~/.gitconfig file under <code>[alias]</code></p>
<pre><code class="bash">wow = log --all --graph --decorate --oneline --simplify-by-decoration
</code></pre>
<p><a href="https://twitter.com/innovati/status/707385937219743744"><img src="https://s.w.org/images/core/emoji/12.0.0-1/72x72/1f62e.png" alt="😮" class="wp-smiley" style="height: 1em; max-height: 1em;" /> @innovati</a> and <a href="https://twitter.com/winstonswchow/status/707385447383769090"><img src="https://s.w.org/images/core/emoji/12.0.0-1/72x72/1f64c.png" alt="🙌" class="wp-smiley" style="height: 1em; max-height: 1em;" /> @winstonswchow</a></p>
<h2><code>git checkout pr/123</code></h2>
<p>Quickly check out a remote for pull request review. You&#8217;ll need to <a href="https://gist.github.com/piscisaureus/3342247">set it up like this</a>.</p>
<p><a href="https://twitter.com/linclark/status/707386094896087040"><img src="https://s.w.org/images/core/emoji/12.0.0-1/72x72/1f918.png" alt="🤘" class="wp-smiley" style="height: 1em; max-height: 1em;" /> @linclark</a></p>
<h2><code>git diff --shortstat "@{0 day ago}"</code></h2>
<p>See how many lines of code you have written today.</p>
<p><a href="https://twitter.com/innovati/status/707386314530930689"><img src="https://s.w.org/images/core/emoji/12.0.0-1/72x72/1f483.png" alt="💃" class="wp-smiley" style="height: 1em; max-height: 1em;" /> @innovati</a></p>
<h2><code>git checkout -</code></h2>
<p>It&#8217;s like the jump button on your TV remote &#8211; jump back to to your last branch.</p>
<p><img src="https://s.w.org/images/core/emoji/12.0.0-1/72x72/1f486.png" alt="💆" class="wp-smiley" style="height: 1em; max-height: 1em;" /> @everyone</p>
<h2><code>git reset --soft HEAD~3</code></h2>
<p>A soft reset will keep your changes but allow you to &#8220;uncommit&#8221; something.</p>
<p>Instead of doing a squash, Dan prefers to dial back HEAD any number of commits and then add &amp; commit everything into a single commit.</p>
<p><a href="https://twitter.com/dan_abramov/status/707532388809756672"><img src="https://s.w.org/images/core/emoji/12.0.0-1/72x72/1f1f7-1f1fa.png" alt="🇷🇺" class="wp-smiley" style="height: 1em; max-height: 1em;" /> @dan_abramov</a></p>
<h2><code>git reflog</code></h2>
<p>David says it best — &#8220;Don&#8217;t worry, it&#8217;s probably saved somewhere&#8221;. Git reflog allows you to see every step you have made with git allowing you to retract and reinstate your steps.</p>
<p><a href="https://twitter.com/davidnormo/status/707538222813941760"><img src="https://s.w.org/images/core/emoji/12.0.0-1/72x72/1f631.png" alt="😱" class="wp-smiley" style="height: 1em; max-height: 1em;" /> @davidnormo</a></p>
<h2><code>git stash, then git stash pop</code></h2>
<p>Stash let&#8217;s you squirrel away unstaged changes, do some work, and then apply those changes back on.</p>
<p><code>git stash</code> will stash those changes and put them into your list — I like to think of this as an array of changes. Now to get them back you can <code>git stash apply</code> but what Sam is suggesting here is that you use <code>git stash pop</code> instead which will also bring back your changes, but it removes them from your stash &#8220;array&#8221;.<br />
ok<br />
<a href="https://twitter.com/sambreed/status/707406334774222848"><img src="https://s.w.org/images/core/emoji/12.0.0-1/72x72/1f3cd.png" alt="🏍" class="wp-smiley" style="height: 1em; max-height: 1em;" /> @sambreed</a></p>
<h2><code>git log -S puppy</code></h2>
<p>Search the commit history for the word puppy and display matching commits.</p>
<p><a href="https://twitter.com/chrisrockwell/status/707427601153966080"><img src="https://s.w.org/images/core/emoji/12.0.0-1/72x72/1f680.png" alt="🚀" class="wp-smiley" style="height: 1em; max-height: 1em;" /> @chrisrockwell</a></p>
<h2><code>git latest = for-each-ref --count=30 --sort=-committerdate refs/heads/ --format='%(</code>refname:short)&#8217;</h2>
<p>Allows you to view your latest branchces &#8211; this is helpful for when your branch names are based on bug IDs that you have a hard time remembering.</p>
<p><a href="https://twitter.com/wesbos/status/692012780598112256"><img src="https://s.w.org/images/core/emoji/12.0.0-1/72x72/1f525.png" alt="🔥" class="wp-smiley" style="height: 1em; max-height: 1em;" /> @wesbos</a></p>
<h2><code>git config --global help.autocorrect -1</code></h2>
<p>Mistype or misspell a git command? Immediately re-run the correct command. You can use <code>-1</code> to <code>1000</code> to wait a full second before the command is re-run.</p>
<p><a href="https://twitter.com/wesbos/status/701864888818208768"><img src="https://s.w.org/images/core/emoji/12.0.0-1/72x72/1f525.png" alt="🔥" class="wp-smiley" style="height: 1em; max-height: 1em;" /> @wesbos</a></p>
<h2><code>git commit --amend</code></h2>
<p>Great for squashing staged files into your last commit.</p>
<p><a href="https://twitter.com/carlosperez/status/707566143305752576"><img src="https://s.w.org/images/core/emoji/12.0.0-1/72x72/1f419.png" alt="🐙" class="wp-smiley" style="height: 1em; max-height: 1em;" /> @carlosperez</a></p>
<h2><code>git cherry-pick [hash]</code></h2>
<p>As long as the commit has been fetched somewhere, you can cherry pick that code in your own branch without having to merge the entire thing.</p>
<p><a href="https://twitter.com/jonalvarezz/status/707398488825466881"><img src="https://s.w.org/images/core/emoji/12.0.0-1/72x72/1f433.png" alt="🐳" class="wp-smiley" style="height: 1em; max-height: 1em;" /> @jonalvarezz</a></p>
<h2><code>git remote update --prune</code></h2>
<p>Remove local branches that have been deleted from your remote (like GitHub). You can always run <code>git remote prune origin --dry-run</code> to see what will be deleted before going all in.</p>
<p><a href="https://twitter.com/mourawaldson/status/707795546317197312"><img src="https://s.w.org/images/core/emoji/12.0.0-1/72x72/1f349.png" alt="🍉" class="wp-smiley" style="height: 1em; max-height: 1em;" /> @mourawaldson</a></p>
<h2><code>git rebase -i HEAD~4</code></h2>
<p>Interactive rebase allows you to pick and choose which commits you can pick, squash, reword, edit, or fixup</p>
<p><a href="https://twitter.com/Stephn_R/status/707387775100784641"><img src="https://s.w.org/images/core/emoji/12.0.0-1/72x72/1f60e.png" alt="😎" class="wp-smiley" style="height: 1em; max-height: 1em;" /> @Stephn_R</a></p>
<h2><code>More?</code></h2>
<p>Post yours in the comment below!</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/git-hot-tips/feed/</wfw:commentRss>
		<slash:comments>43</slash:comments>
							</item>
		<item>
		<title>My Animated GIF Workflow 🔥</title>
		<link>https://wesbos.com/animated-gif-workflow/</link>
				<comments>https://wesbos.com/animated-gif-workflow/#comments</comments>
				<pubDate>Thu, 18 Feb 2016 18:00:21 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3716</guid>
				<description><![CDATA[I&#8217;m often asked how I create the Animated Gifs that I post on Twitter. I&#8217;ve done a lot of testing of different tools and I&#8217;ve settled on two things: Cloudapp for quick single shot gifs Screenflow for recording and editing &#8230; <a href="https://wesbos.com/animated-gif-workflow/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>I&#8217;m often asked how I create the Animated Gifs that I post on <a href="https://twitter.com/wesbos/media">Twitter</a>.</p>
<p>I&#8217;ve done a lot of testing of different tools and I&#8217;ve settled on two things:</p>
<ol>
<li><a href="https://www.getcloudapp.com/">Cloudapp</a> for quick single shot gifs</li>
<li><a href="https://www.telestream.net/screenflow/">Screenflow</a> for recording and editing + <a href="https://github.com/vvo/gifify">Node Gifify</a> for longer ones. </li>
</ol>
<p>Here is a quick video detailing my workflow for top quality and fast GIFs.</p>
<p><iframe class='youtube-player' type='text/html' width='640' height='360' src='https://www.youtube.com/embed/6FULr_gqw8I?version=3&#038;rel=1&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' allowfullscreen='true' style='border:0;'></iframe></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/animated-gif-workflow/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
							</item>
		<item>
		<title>CSS Highlight on Hover Animation</title>
		<link>https://wesbos.com/css-highlight-animation/</link>
				<comments>https://wesbos.com/css-highlight-animation/#comments</comments>
				<pubDate>Wed, 20 Jan 2016 17:30:40 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML5]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3701</guid>
				<description><![CDATA[I saw this great little highlight hover animation on Web Designer Depot the other day and I wondered how it worked. Turns out it&#8217;s just a few lines of CSS along with some background-position and gradient tricks. Check the video &#8230; <a href="https://wesbos.com/css-highlight-animation/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p><img src="https://wesbos.com/wp-content/uploads/2016/01/highlight-hover.gif" alt="highlight-hover" width="633" height="344" class="aligncenter size-full wp-image-3702" /></p>
<p>I saw this great little highlight hover animation on Web Designer Depot the other day and I wondered how it worked. Turns out it&#8217;s just a few lines of CSS along with some background-position and gradient tricks.</p>
<p>Check the video for a quick explanation on how it works. Enjoy!</p>
<p><p class='codepen'  data-height='268' data-theme-id='5332' data-slug-hash='yepexZ' data-default-tab='result' data-animations='run' data-editable='' data-embed-version='2'>
See the Pen <a href='http://codepen.io/wesbos/pen/yepexZ/'>yepexZ</a> by Wes Bos (<a href='http://codepen.io/wesbos'>@wesbos</a>) on <a href='http://codepen.io'>CodePen</a>.5332</p>
<script async src="//codepen.io/assets/embed/ei.js"></script></p>
<p><iframe class='youtube-player' type='text/html' width='640' height='360' src='https://www.youtube.com/embed/qii-5ZpLLYY?version=3&#038;rel=1&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' allowfullscreen='true' style='border:0;'></iframe></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/css-highlight-animation/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
							</item>
		<item>
		<title>An Intro To Using npm and ES6 Modules for Front End Development</title>
		<link>https://wesbos.com/javascript-modules/</link>
				<comments>https://wesbos.com/javascript-modules/#comments</comments>
				<pubDate>Mon, 14 Dec 2015 18:00:47 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3678</guid>
				<description><![CDATA[A big thanks to bitHound for sponsoring my time to research and write this article. Check out their service, which provides continuous analysis and quality checks for both your front and back end JavaScript and its dependencies. The JavaScript landscape &#8230; <a href="https://wesbos.com/javascript-modules/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>A big thanks to <a href="https://bitHound.io">bitHound</a> for sponsoring my time to research and write this article. Check out their service, which provides continuous analysis and quality checks for both your front and back end JavaScript and its dependencies.</p>
<hr>
<p>The JavaScript landscape is changing quickly and along with it the way that we work with dependencies in our websites and applications.</p>
<p>This post is for developers who are currently loading in their JavaScript via multiple script tags and finding that dependency management is becoming a little cumbersome as their webpages or applications start to grow.</p>
<p>For a deep dive into everything the spec has to offer, as well as some great comparisons to CommonJS and AMD, check out Axel Rauschmayer&#8217;s <a href="http://exploringjs.com/">Exploring ES6 book</a>, particularly chapter 17.</p>
<h2>What are JavaScript Modules?</h2>
<p>JavaScript modules allow us to chunk our code into separate files inside our project or to use open source modules that we can install via <a href="https://www.npmjs.com/"><code>npm</code></a>.  Writing your code in modules helps with organization, maintenance, testing, and most importantly, dependency management.</p>
<p>When we write JavaScript, it&#8217;s ideal if we can make modules that do one thing and one thing well. This separation allows us to pull in various modules only when we need them. Modules represent the core principle behind <code>npm</code> — when we need specific functionality, we can install the modules we need and load them into our application.</p>
<p>As time goes on, we&#8217;re seeing fewer large frameworks that do everything under the sun while seeing more <strong>small modules that do one thing and one thing well</strong>.</p>
<p>For example, many of us learned jQuery. It included methods for doing absolutely everything from CSS manipulation to ajax calls. Now, many of us are migrating to libraries like React where often we need to pull in additional packages to perform tasks like ajax or routing.</p>
<p>This article will take a look at using <code>npm</code> and ES6 Modules. There are other registries (e.g. <a href="http://bower.io/">Bower</a>) and other module loaders (e.g. <a href="https://nodejs.org/docs/latest/api/modules.html">CommonJS</a> and <a href="http://requirejs.org/docs/whyamd.html">AMD</a>), but there are plenty of articles already on those topics.</p>
<p>Whether you are doing Node or front end development, I believe that ES6 modules and <code>npm</code> are the way forward. If you look at any of the popular open source projects today, such as <a href="https://facebook.github.io/react/">React</a> or <a href="https://lodash.com/">lodash</a>, you&#8217;ll see they have also adopted ES6 modules + <code>npm</code>.</p>
<h3>Current workflow</h3>
<p>Many workflows for JavaScript look like this:</p>
<ol>
<li>Find a plugin or library that you want and download it from GitHub</li>
<li>Load it into your website via a script tag</li>
<li>Access it via a global variable or as a jQuery plugin</li>
</ol>
<p>This type of workflow has worked fairly well for years, but not without its issues:</p>
<ol>
<li>Updates to the plugins have to be done manually — it&#8217;s hard to know when there are critical bug fixes or new functionality available.</li>
<li>Messy source control history — all dependencies need to be checked into source control and unpleasantness can result when libraries are updated.</li>
<li>Little to no dependency management — many scripts duplicate functionality but could easily share that functionality via a small module.</li>
<li>Pollution and possible collisions within the global name space. </li>
</ol>
<p>The idea of writing JavaScript modules isn&#8217;t new, but with the arrival of ES6 and the industry settling on <code>npm</code> as the preferred package manager for JavaScript, we&#8217;re starting to see many devs migrate away from the above workflow and standardizing on using ES6 and <code>npm</code>.</p>
<h3>Hold on. <code>npm</code>? Isn&#8217;t that for Node?</h3>
<p>Many moons ago, <code>npm</code> began as the package manager for Node.js, but it has since evolved to become the package manager for JavaScript and front end dev in general. Nowadays, we can cut the whole song and dance for installing libraries down to 2 steps:</p>
<ol>
<li>Install our dependency from <code>npm</code>, e.g.:  <code>npm install lodash --save</code></li>
<li>Import it into the file where we need that dependency, e.g.:</li>
</ol>
<pre><code class="language-javascript">import _ from 'lodash';
</code></pre>
<p>There&#8217;s a lot more that goes into setting this workflow up, as well as plenty to learn about <strong>importing</strong> and <strong>exporting</strong> from modules, so let&#8217;s dive into that.</p>
<h2>The idea behind Modules</h2>
<p>Instead of just loading everything into the global namespace, we use <code>import</code> and <code>export</code> statements to share things (variables, functions, data, anything&#8230;) between files. Each module will import the dependencies that it needs and export anything that should be made import-able by other files.</p>
<p>Getting everything working in current browsers requires a bundle step. We&#8217;ll talk about that later in this article, but for now let&#8217;s focus on the core ideas behind JavaScript Modules.</p>
<h2>Creating your own Modules</h2>
<p>Let&#8217;s say we are building an online store app and we need a file to hold all of our helper functions. We can create a module called <code>helpers.js</code> that contains a number of handy helper functions — <code>formatPrice(price)</code>, <code>addTax(price)</code> and <code>discountPrice(price, percentage)</code>, as well as some variables about the online store itself.</p>
<p>Our <code>helpers.js</code> file would look like this:</p>
<pre><code class="language-javascript">const taxRate = 0.13;

const couponCodes = ['BLACKFRIDAY', 'FREESHIP', 'HOHOHO'];

function formatPrice(price) {
    // .. do some formatting
    return formattedPrice;
}

function addTax(price) {
    return price * (1 + taxRate);
}

function discountPrice(price, percentage) {
    return price * (1 - percentage);
}
</code></pre>
<p>Now, each file can have its own local functions and variables, and unless they are explicitly exported, they won&#8217;t ever bleed into the scope of any other files. In the above example, we might not need <code>taxRate</code> to be available to other modules, but it&#8217;s a variable we need internally within this module.</p>
<p>How do we make the functions and variables above available to other modules? <strong>We need to export them</strong>. There are two kinds of exports in ES6 &#8211; named exports and a single default export. Since we need to make multiple functions and the <code>couponCodes</code> variable available, we will used named exports. More on this in a second.</p>
<p>The simplest and most straightforward way to export something from a module is to simply stick the <code>export</code> keyword in front, like so:</p>
<pre><code class="language-javascript">const taxRate = 0.13;

export const couponCodes = ['BLACKFRIDAY', 'FREESHIP', 'HOHOHO'];

export function formatPrice(price) {
    // .. do some formatting
    return formattedPrice;
}

//  ... 
</code></pre>
<p>We can also export them after the fact:</p>
<pre><code class="language-javascript">export couponCodes;
export formatPrice;
export addTax;
export discountPrice;
</code></pre>
<p>Or all at once:</p>
<pre><code class="language-javascript">export { couponCodes, formatPrice, addTax, discountPrice };
</code></pre>
<p>There are a handful of other ways use export, make sure to check the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export">MDN Docs</a> if you run into a situation where these aren&#8217;t working for you.</p>
<h2>Default export</h2>
<p>As mentioned before, there are two ways that you can export from a module — named or default. Above were examples of <strong>named exports</strong>. In order to import these exports into another module, we must know the names of the variables/functions we wish to import — examples of this coming in a second. The benefit of using named exports is that you can export multiple items from a single module.</p>
<p>The other type of export is the default export. Use named exports when your module needs to export multiple variables/functions, and use a default export when your module only needs to export one variable/function. While you can use both default exports and named exports within a single module, I&#8217;d advise you to pick only one style per module.</p>
<p>Examples of default exports may be a single <code>StorePicker</code> React Component or an array of data. For example, if we have the following array of data that we need to make available to other components, we can use <code>export default</code> to export it.</p>
<pre><code class="language-javascript">// people.js
const fullNames = ['Drew Minns', 'Heather Payne', 'Kristen Spencer', 'Wes Bos', 'Ryan Christiani'];

const firstNames = fullNames.map(name =&gt; name.split(' ').shift());

export default firstNames; // ["Drew", "Heather", "Kristen", "Wes", "Ryan"]
</code></pre>
<p>Just like above, you can append the <code>export default</code> in front of a function you wish to export as well:</p>
<pre><code class="language-javascript">export default function yell(name) { return `HEY ${name.toUpperCase()}!!` }
</code></pre>
<h2>Importing your own modules</h2>
<p>Now that we have separated our code into little modules and exported pieces that we need, we can go ahead an import parts or all of those modules into other parts of our application.</p>
<p>To import modules that are part of our codebase, we use an <code>import</code> statement and then point to a file&#8217;s location relative to the current module — just like you are used to in any HTML src path or CSS background image. You&#8217;ll notice that we leave off the <code>.js</code> extension as it&#8217;s not required.</p>
<p>It&#8217;s important to note that we don&#8217;t import modules once and have them available to the entire application as globals. Whenever one of your modules has a dependency on another module — say our above code needed a lodash method — we <em>must</em> <code>import</code> it into that module. If we require the same lodash function in 5 of our modules, then we import it 5 times. This helps keep a sane scope as well as makes our modules very portable and reusable.</p>
<h3>Importing named exports</h3>
<p>The first thing we exported was our helpers module. Remember we used <strong>named exports</strong> here, so we can import them in a number of ways:</p>
<pre><code class="language-javascript">// import everything as methods or properties of an object
import * as h from './helpers';
// and then use them
const displayTotal = h.formatPrice(5000);


// Or import everything into the module scope:
import * from './helpers';
const displayTotal = addTax(1000);
// I'd recommend against this style because it's less explicit
// and could lead to code that's harder to maintain


// or cherry pick only the things you need:
import { couponCodes, discountPrice } from './helpers';
const discount = discountPrice(500, 0.33);
</code></pre>
<h3>Importing default exports</h3>
<p>If you recall, we also exported an array of first names from <code>people.js</code>, since this was the only thing that needed to be exported from that module.</p>
<p>Default exports can be imported as any name — it&#8217;s not necessary to know the name of the variable, function, or class that was exported.</p>
<pre><code class="language-javascript">import firstNames from './people';
// or
import names from './people';
// or
import elephants from './people';
// these will all import the array of first names

// you can also get the default export like so:
import * as stuff from './people'
const theNames = stuff.default
</code></pre>
<h2>Importing modules from <code>npm</code></h2>
<p>Many of the modules we will use come from <code>npm</code>. Whether we need a full library like jQuery, a few utility functions from lodash, or something to perform Ajax requests like the superagent library, we can use <code>npm</code> to install them.</p>
<pre><code>npm install jquery --save
npm install lodash --save
npm install superagent --save
// or all in one go:
npm i jquery lodash superagent -S
</code></pre>
<p>Once these packages are in our <code>node_modules/</code> directory, we can import them into our code. By default, Babel transpiles ES6 import statements to CommonJS. Therefore, by using a bundler that understands this module syntax (like webpack or browserify) you can leverage the <code>node_modules/</code> directory. So our import statements only need to include the name of the Node module. Other bundlers may require a plugin or configuration to pull from your <code>node_modules/</code> folder.</p>
<pre><code class="language-javascript">// import entire library or plugin
import $ from 'jquery'; 
// and then go ahead and use them as we wish:
$('.cta').on('click',function() {
    alert('Ya clicked it!');
});
</code></pre>
<p>The above code works because jQuery is exported as a CommonJS module, and Babel transpiles our ES6 import statement to work with jQuery&#8217;s CommonJS export.</p>
<p>Let&#8217;s try it again with superagent. As jQuery, superagent exports the entire library as a <strong>default export</strong> using CommonJS, so we can import it with whatever variable name we like — it&#8217;s common to call it <code>request</code>.</p>
<pre><code class="language-javascript">// import the module into ours
import request from 'superagent';
// then use it!
request
    .get('https://api.github.com/users/wesbos')
    .end(function(err, res){
        console.log(res.body);
    });
</code></pre>
<h3>Importing Pieces or Cherry Picking</h3>
<p>One of my favorite things about ES6 modules is that many libraries allow you to cherry-pick just the pieces you want. lodash is a fantastic utility library filled with dozens of helpful JavaScript methods.</p>
<p>We can load the entire library into the <code>_</code> variable since lodash exports the entire library as a the main module export (again, Babel transpiles our import to treat it as if lodash is using <strong>export default</strong>):</p>
<pre><code class="language-javascript">// import the entire library in the _ variable
import _ from 'lodash';
const dogs = [
  { 'name': 'snickers', 'age': 2, breed : 'King Charles'},
  { 'name': 'prudence', 'age': 5, breed : 'Poodle'}
];

_.findWhere(dogs, { 'breed': 'King Charles' }); // snickers object
</code></pre>
<p>However, often you will want just one or two lodash methods instead of the entire library. Since lodash has exported every single one of its methods as a module itself, we can cherry-pick just the parts we want! This is made possible again because of how Babel transpiles your import statement.</p>
<pre><code class="language-javascript">import { throttle } from 'lodash';
$('.click-me').on('click', throttle(function() {
  console.count('ouch!');
}, 1000));
</code></pre>
<h2>Making sure modules are up-to-date</h2>
<p>Some resistance to the whole &#8220;small modules&#8221; way of coding is that it&#8217;s easy to end up with a dozen or more dependencies from <code>npm</code> that all interact with each other.</p>
<p>The JavaScript ecosystem is moving very quickly right now, and keeping your dependencies up to date can be a headache. Knowing when both your own code and your dependencies have bugs, security flaws, or just general code smells isn&#8217;t as easy as it used to be. We need to know if anything in our project is insecure, deprecated, outdated, or unused.</p>
<p>To solve this, bitHound offers a fantastic service that will constantly monitor your code and let you know when there is anything wrong with your dependencies, as well as provide an overall score of how well your repo is doing. <a href="http://bitHound.io">Find out how yours stacks up</a>, it&#8217;s free for all your open source projects.</p>
<p>bitHound integrates with GitHub and BitBucket and has also rolled out automatic commit analysis which will notify bitHound of changes to your repository&#8217;s branches. When your dependencies are out of date, you&#8217;ll be pinged in Slack or HipChat or get an email detailing everything.</p>
<p><img src="https://wesbos.com/wp-content/uploads/2015/12/wesbos.png" alt="" /></p>
<p>bitHound also has branch status on Pull Requests &#8211;  set up pass/fail criteria and bitHound will post the status right to GitHub or Bitbucket.</p>
<p>Another tool that works well with bitHound is called <a href="https://www.npmjs.com/package/npm-check-updates">npm-check-updates</a>. Install globally on your development machine with <code>npm install npm-check-updates -g</code> and then run <code>ncu</code>. To quickly check if your packages have any available updates. If they do, you can run <code>ncu --upgradeAll</code> to automatically update all packages in your package.json. Make sure to run a <code>npm install</code> after doing this to fetch the latest code from NPM.</p>
<h2>The Bundle Process</h2>
<p>Because the browser doesn&#8217;t understand ES6 modules just yet, we need tools to make them work today. A JavaScript bundler takes in our Modules and compiles them into a single JavaScript file or multiple bundles for different parts of your application.</p>
<p>Eventually we won&#8217;t need to run a bundler on our code and <a href="https://http2.github.io/">HTTP/2</a> will request all <code>import</code> statements in one payload.</p>
<p>There are a few popular bundlers, most of which use Babel as a dependency to transpile your ES6 modules to CommmonJS.</p>
<ul>
<li><a href="http://browserify.org/">Browserify</a> was initially created to allow node-style commmonjs requires in the browser. It also allows for ES6 modules. </li>
<li><a href="https://webpack.github.io/">webpack</a> is popular in the React community. It also handles many module formats, not just ES6.</li>
<li><a href="https://github.com/rollup/rollup">Rollup</a> is built for ES6, but seems to have trouble with sourcemaps — I&#8217;d check on this one in a few months. </li>
<li><a href="http://jspm.io/">JSPM</a> sits on top of <code>npm</code> and <a href="https://github.com/systemjs/systemjs">SystemJS</a>.</li>
<li><a href="http://ember-cli.com/">Ember CLI</a> is an easy-breezy command line tool similar to webpack for users of Ember. It uses Broccoli under the hood.</li>
</ul>
<p>Which one should you use? Whichever works best for you. I&#8217;m a big fan of Browserify for the ease of getting started and webpack for many of its React integrations. The beauty of writing ES6 modules is that you aren&#8217;t writing Browserify or webpack modules — you can switch your bundler at any time. There are a lot of opinions out there on what to use, so do a quick search and you&#8217;ll find plenty of arguments for each tool.</p>
<p>If you are already running tasks via gulp, Grunt, or <code>npm</code> tasks for your existing JavaScript and CSS, integrating Modules into your workflow is <a href="https://github.com/wesbos/React-For-Beginners-Starter-Files/blob/master/01%20-%20Introduction%20-%20Start%20Here/gulpfile.js#L58-L99">fairly simple</a>.</p>
<p>There are many different ways to implement a bundler — you can run it as part of your gulp task, via your webpack config, as an <code>npm</code> script, or straight from the command line.</p>
<p>I&#8217;ve <a href="https://github.com/wesbos/javascript-modules">created a repo</a> detailing how to use webpack and Browserify along with some sample modules for you to play with.</p>
<h3>Importing code that isn&#8217;t a module</h3>
<p>If you are working on moving your codebase over to modules but aren&#8217;t able to do it all in one shot, you can simply just <code>import "filename"</code> and it will load and run the code from that file. This isn&#8217;t exactly ES6, but it&#8217;s a feature of your bundler.</p>
<p>This concept is no different than running concatenation on multiple <code>.js</code> files except that the code you import will be scoped to the importing module.</p>
<h3>Code that requires a global variable</h3>
<p>Some libraries, such as jQuery plugins, don&#8217;t fit well into the JavaScript Modules system. The entire jQuery plugin ecosystem assumes that there is a global variable called <code>window.jQuery</code> that each plugin can tack itself onto. However, we just learned that <strong>there are no globals with ES6 modules</strong>. Everything is scoped to the module itself unless you explicitly set something on the window.</p>
<p>To solve this, first ask yourself if you really need that plugin or if it&#8217;s something you could code on your own. Much of the JavaScript plugin ecosystem is being rewritten to exclude the jQuery dependency and to be made available as standalone JavaScript Modules.</p>
<p>If not, you will need to look to your build process to help solve this problem. Browserify has <a href="https://github.com/thlorenz/browserify-shim">Browserify Shim</a> and <a href="https://webpack.github.io/docs/shimming-modules.html">webpack</a> has some documentation on it.</p>
<h2>Gotchas</h2>
<p>When exporting a function, do not include a semicolon at the end of the function. Most bundlers will still allow the extra semicolon, but it&#8217;s a good practice to keep it off your function declarations so you don&#8217;t have an unexpected behavior when switching bundlers.</p>
<pre><code class="language-javascript">// Wrong:
export function yell(name) { return `HEY ${name}`; };
// Right:
export function yell(name) { return `HEY ${name}`; }
</code></pre>
<h2>Further Reading</h2>
<p>Hopefully this was a nice introduction to using <code>npm</code> and ES6 Modules. There is a lot more to learn and in my opinion the best way to learn is to start using them in your next project. Here are some fantastic resources to help you along the way:</p>
<ul>
<li><a href="http://exploringjs.com/">Exploring ES6 book</a></li>
<li><a href="https://github.com/ModuleLoader/es6-module-loader/wiki/Brief-Overview-of-ES6-Module-syntax">Brief Overview of ES6 Module syntax</a></li>
<li><a href="https://github.com/lukehoban/es6features#readme">ES6 Features</a></li>
<li><a href="https://github.com/rollup/rollup/wiki/ES6-modules">ES6 Modules on Rollup&#8217;s Wiki</a></li>
<li><a href="http://blog.namangoel.com/browserify-vs-webpack-js-drama">Browserify vs webpack hot drama</a></li>
<li><a href="http://www.2ality.com/2015/04/webpack-es6.html">webpack &amp; ES6</a></li>
<li><a href="http://slides.com/kentcdodds/es6-workshop">ES6 features &amp; webpack workshop</a> (complete with <a href="https://github.com/kentcdodds/es6-workshop">repo</a> and video recordings: <a href="https://youtu.be/aeY6ctvsurs">ES6 features</a> <a href="https://youtu.be/a96r7Tjf0Ps">Migrating with Webpack</a>)</li>
</ul>
<h2>Thanks + Updates</h2>
<p>A huge thanks to <a href="https://github.com/smargh">Stephen Margheim</a>, <a href="http://kentcdodds.com/">Kent C. Dodds</a>, <a href="http://mikechen.io/">Mike Chen</a>, <a href="https://github.com/rivertam">Ben Berman</a>, and <a href="https://about.me/jpoo90">Juan Pablo Osorio Ospina</a> for reviewing and providing excellent feedback on this article.</p>
<p>If you have any suggestions, code samples, technical updates or clarifications you would like to add to this, please send on over a <a href="https://github.com/wesbos/javascript-modules">pull request</a>.</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/javascript-modules/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
							</item>
		<item>
		<title>Matt Mullenweg to WordPress Community: &#8220;Learn JavaScript, Deeply&#8221;. Here are some resources for doing that.</title>
		<link>https://wesbos.com/learn-javascript/</link>
				<comments>https://wesbos.com/learn-javascript/#comments</comments>
				<pubDate>Mon, 07 Dec 2015 19:48:26 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Other]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3666</guid>
				<description><![CDATA[A few weeks back, the WordPress community was abuzz when Automattic announced Calypso — the new WordPress admin interface build with Node and React. This weekend Matt Mullenweg, the creator of WordPress, spoke about JavaScript in his yearly keynote &#8220;The &#8230; <a href="https://wesbos.com/learn-javascript/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>A few weeks back, the WordPress community was abuzz when Automattic announced Calypso — the new WordPress admin interface build with Node and React.</p>
<p>This weekend Matt Mullenweg, the creator of WordPress, spoke about JavaScript in his yearly keynote &#8220;The State of Word&#8221;. In it, he gave the WordPress community homework — to <strong>Learn JavaScript, Deeply</strong>. To go out and make 2016 the year that you finally take those steps into getting comfortable with JavaScript.</p>
<p><iframe class='youtube-player' type='text/html' width='640' height='360' src='https://www.youtube.com/embed/KrZx4IY1IgU?version=3&#038;rel=1&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' allowfullscreen='true' style='border:0;'></iframe></p>
<p>To see Matt acknowledge this shift in the tech stack has me really excited and it confirms that JavaScript is exploding, and regardless of what you use to build your websites, JavaScript must be a major part of it.</p>
<blockquote><p>
  Take Every Opportunity to really beef up your JavaScript Chops — Mall Mullenweg, Creator of WordPress
</p></blockquote>
<p>That said, I know there are many developers in the WordPress community who have been just getting by stringing together themes, jQuery plugins and Stack Overflow answers. There are many developers who feel burned, who feel it&#8217;s too hard to learn or just something they can get by without. There will always be varying degrees of JavaScript involvement in your sites, but the one constant is that the types of sites and the interactive interfaces that you make with WordPress are happening more in the browser and are requiring some level of JavaScript knowledge to get going.</p>
<p>So — how do you learn JavaScript? My answer is always this: Build things, build things, build things!</p>
<p>And while this is a simple answer to give, and is one you will get from many experienced developers. It&#8217;s frustrating to hear, because:</p>
<ol>
<li>You aren&#8217;t sure what you should build — either from lack of ideas, or that you aren&#8217;t 100% sure what you are capable of</li>
<li>You need at least some fundamentals before you can get started!</li>
</ol>
<p>My answer is still to find a project that you are excited about, and invested in and see it through to completion. Along the way you are going to need some resources that will help you out. I&#8217;m compiling a list of resources here. This will be a living list — if you have something that has helped you, or something you have created and would like it added, please leave a comment below and I&#8217;ll get it added to the site.</p>
<p>Go forth and learn JavaScript. Will it be hard? Yes! Is everyone else smarter than you and maybe JS just isn&#8217;t for you? No! JavaScript doesn&#8217;t have a learning curve, it&#8217;s more like learning mountains. It&#8217;s hard, but push through it with nothing but hustle and repetition and you&#8217;ll get it, trust me, I&#8217;ve seen this with hundreds of students at <a href="http://HackerYou.com">HackerYou</a>.</p>
<h3>Video</h3>
<ul>
<li>My own <a href="https://ReactForBeginners.com">React For Beginners</a> video series is a great starter for anyone who is already comfortable working with jQuery or simple JavaScript. Use code WORDPRESS for $10 off. </li>
<li><a href="http://egghead.io">EggHead.io</a></li>
<li><a href="https://www.youtube.com/channel/UCO1cgjhGzsSYb1rsB4bFe4Q">FunFunFunctional</a></li>
<li><a href="https://www.youtube.com/user/LevelUpTuts">LevelUpTuts</a></li>
<li><a href="http://teamtreehouse.com">Treehouse</a></li>
<li><a href="http://FrontendMasters.com">FrontendMasters.com</a></li>
<li><a href="https://www.safaribooksonline.com/">Safari</a></li>
<li><a href="https://www.youtube.com/watch?v=Bv_5Zv5c-Ts">Javascript: Understanding the Weird Parts</a></li>
<li><a href="https://sub.watchmecode.net/">Watch Me Code</a></li>
</ul>
<h3>In Person</h3>
<p>These are pretty localized &#8211; so search in your local area for a coding school &#8211; most should have full time, evening and weekend classes.</p>
<ul>
<li><a href="http://HackerYou.com">HackerYou</a></li>
<li><a href="http://nodeschool.io/chapters.html">NodeSchool</a> </li>
<li><a href="http://LadiesLearningCode.com">Ladies Learning Code</a></li>
</ul>
<h3>Books</h3>
<p>There are tons and tons of book roundups &#8211; here are a few:</p>
<ul>
<li><a href="http://eloquentjavascript.net/">Eloquent JavaScript</a></li>
<li><a href="http://speakingjs.com/">Speaking JS</a></li>
<li><a href="http://exploringjs.com/">Exploring ES6</a></li>
<li><a href="http://www.javascriptbook.com/">JavaScript + jQuery</a></li>
<li><a href="http://addyosmani.com/resources/essentialjsdesignpatterns/book/">JS Patterns</a></li>
<li><a href="https://github.com/getify/You-Dont-Know-JS/blob/master/README.md#you-dont-know-js-book-series">You Don&#8217;t Know JS</a></li>
<li><a href="http://jsbooks.revolunet.com/">JS Books</a></li>
<li><a href="https://github.com/wesbos/ama/issues/61">Best Books AMA</a></li>
</ul>
<h3>Editor Based Code Alongs</h3>
<ul>
<li><a href="http://freecodecamp.com">FreeCodeCamp.com</a></li>
<li><a href="http://CodeSchool.com">CodeSchool</a></li>
</ul>
<h3>Podcasts</h3>
<ul>
<li><a href="http://nodeup.com/">Nodeup</a></li>
<li><a href="https://devchat.tv/js-jabber/">JS Jabber</a></li>
<li><a href="http://javascriptair.com/">Javascript Air</a></li>
<li><a href="https://angularair.com/">Angular Air</a></li>
<li><a href="http://shoptalkshow.com/">Shop Talk Show</a></li>
</ul>
<h3>Read Other people&#8217;s code</h3>
<ul>
<li><a href="http://Codepen.io">CodePen.io</a></li>
</ul>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/learn-javascript/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
							</item>
		<item>
		<title>Introducing React For Beginners</title>
		<link>https://wesbos.com/introducing-react-for-beginners/</link>
				<comments>https://wesbos.com/introducing-react-for-beginners/#comments</comments>
				<pubDate>Tue, 24 Nov 2015 21:44:53 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3657</guid>
				<description><![CDATA[I&#8217;m super excited to announce React For Beginners &#8211; my new premium step-by-step training course to get you building real world React.js + Firebase apps and website components. You probably can&#8217;t stop hearing about React as of late and that &#8230; <a href="https://wesbos.com/introducing-react-for-beginners/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p><img src="https://reactforbeginners.com/images/RFB2.png" alt="" /></p>
<p>I&#8217;m super excited to announce <a href="https://reactforbeginners.com/">React For Beginners</a> &#8211; my new premium step-by-step training course to get you building real world React.js + Firebase apps and website components. You probably can&#8217;t stop hearing about React as of late and that is because it makes building interactive interfaces both really fun and easy.</p>
<p>This is my second premium product after my <a href="https://SublimeTextBook.com">Sublime Text Book</a> and many who have taken the free <a href="http://Flexbox.io">Flexbox.io</a> and <a href="http://CommandLinePowerUser.com">CommandLinePowerUser.com</a> courses are now learning react.</p>
<p>This course has only been out for 3 weeks and over 2,300 other devs have already joined me in learning React.js! If you are interested in leveling up your JavaScript skills and learning React, head on over to <a href="https://ReactForBeginners.com">ReactForBeginners.com</a> and take at what it all covers.</p>
<p>Enjoy!</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/introducing-react-for-beginners/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
							</item>
		<item>
		<title>Clearing the air: Is WordPress being rewritten in Node.js and React?</title>
		<link>https://wesbos.com/wordpress-calypso-react/</link>
				<comments>https://wesbos.com/wordpress-calypso-react/#comments</comments>
				<pubDate>Tue, 24 Nov 2015 15:24:50 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3645</guid>
				<description><![CDATA[What&#8217;s up with WordPress and JavaScript? Are they ditching PHP and moving to JavaScript? Yesterday Automattic (the company behind WordPress) announced Calypso, a new admin interface for anyone using a WordPress website. As a JavaScript developer, I was excited to &#8230; <a href="https://wesbos.com/wordpress-calypso-react/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>What&#8217;s up with WordPress and JavaScript? Are they ditching PHP and moving to JavaScript?</p>
<p>Yesterday Automattic (the company behind WordPress) announced <a href="https://developer.wordpress.com/2015/11/23/the-story-behind-the-new-wordpress-com/">Calypso</a>, a new admin interface for anyone using a WordPress website.</p>
<p>As a JavaScript developer, I was excited to hear that it was built entirely in JavaScript. I was even more excited to hear that it was built in React, because I&#8217;m a huge WordPress fan <em>and</em> I just launched <a href="http://ReactForBeginners.com">React For Beginners</a> — my two worlds are colliding!</p>
<p>It seems like there is a lot of misinformation in the community. Let&#8217;s clear this up and understand what it means for us as Web Developers.</p>
<blockquote class="twitter-tweet" data-cards="hidden" lang="en">
<p lang="en" dir="ltr">WordPress just moved to Node.js. <a href="https://t.co/5oV5m7scM1">https://t.co/5oV5m7scM1</a></p>
<p>&mdash; Mikeal Rogers (@mikeal) <a href="https://twitter.com/mikeal/status/668889464563875840">November 23, 2015</a></p></blockquote>
<h2>WordPress is not being rewritten in Node.js</h2>
<p><em>Relax</em>. WordPress is written in PHP, but the Calypso admin interface for WordPress is written with popular front end tools like React and Lodash.</p>
<p>This is part of a popular trend &#8211; use your server to just give us raw JSON data, and then build your application entirely in JavaScript to consume that JSON data. WordPress essentially becomes an API which you can pull and push data from. This decoupling of the view and the backend logic has let the developers of WordPress move much faster because they don&#8217;t have 12 years of PHP view logic dragging them down.</p>
<h2>What about WordPress is Node.js?</h2>
<p>So, why are we seeing tweets about Node.js? Well, almost all front-end tooling is built in Node.js. Calypso is built with popular node tools like WebPack, Babel, Jade, Uglify, Hot Loader, Marked and over <a href="https://github.com/Automattic/wp-calypso/blob/master/package.json">100 other modules</a>.</p>
<p>This is how the front end space is evolving and frankly I&#8217;m glad to see WordPress start using them because its one space we don&#8217;t see a lot of people using these tools.</p>
<h2>Isn&#8217;t it just for WordPress.com accounts? What about self hosted? Plugins? Custom post types?</h2>
<p>Calypso is an editor and an RSS reader for WordPress.com sites. You can, however, use it to manage your self-hosted WordPress account. Once you enable Automattic&#8217;s JetPack plugin, you can manage your content with Calypso.</p>
<p>I went ahead and built a copy locally to try it out.</p>
<p><img src="https://wesbos.com/wp-content/uploads/2015/11/ss-2015-11-24-at-9.57.54-AM.png" alt="WordPress Calypso React App" class="aligncenter size-full wp-image-3660" srcset="https://wesbos.com/wp-content/uploads/2015/11/ss-2015-11-24-at-9.57.54-AM.png 2204w, https://wesbos.com/wp-content/uploads/2015/11/ss-2015-11-24-at-9.57.54-AM-300x175.png 300w, https://wesbos.com/wp-content/uploads/2015/11/ss-2015-11-24-at-9.57.54-AM-650x379.png 650w" sizes="(max-width: 2204px) 100vw, 2204px" /></p>
<p>Right now, you can only manage, Pages, Posts, Themes, Menus, Plugins and a few settings. Everything you need to manage a blog.</p>
<p>What is missing is an interface for custom fields, custom post types and any custom interface that a plugin would expose. This is a deal killer for most devs as we aren&#8217;t using WordPress just as a blog, but I can only assume this will be coming.</p>
<h2>What does this mean for me as a WordPress Dev?</h2>
<p>Right now? Nothing. But this is thunder in the distance as to what is to come in the WordPress.</p>
<p>Much of a theme writing I do is already in JavaScript &#8211; I often use WordPress as just an API to get data out of, and then use frameworks like Angular, React, Google Maps or jQuery to display that data. I&#8217;m not building an entire website in a JavaScript framework, but much of the interactive view layer of these sites is moving into JavaScript frameworks.</p>
<p>Our trusty PHP template files aren&#8217;t going anywhere anytime soon, but I&#8217;ll bet you dollars to donuts you&#8217;ll be writing a lot more JavaScript in your WordPress sites in the years to come.</p>
<h2>It&#8217;s all about the experience</h2>
<p>Since Calypso is open source, I&#8217;m curious to see what will come next. I can imagine developers like Elliot Condon from Advanced Custom Fields and the folks at Web Dev Studios are excited about this. This means we can build much more flexible plugin and admin interfaces which will in turn make clients extremely happy.</p>
<p>There is a reason why things like Squarespace are becoming popular — the interface for creating a beautiful website is a breeze and WordPress is now _react_ing in a huge way.</p>
<h2>Start learning JavaScript</h2>
<p>So as a WordPress builder, don&#8217;t rush to this, but don&#8217;t write it off &#8211; keep an eye on it.</p>
<p>For many this is going to be the last straw with JavaScript. Plugins and STack Overflow questions can get you pretty far, but the front end dev landscape is changing, it&#8217;s hard to ignore all that has happened with JavaScript in the last few years.</p>
<p>If you aren&#8217;t super comfortable with JavaScript, it would be a great time to start learning. It&#8217;s a little hard at first, but you can do it, no problem. I&#8217;ve seen hundreds of my students at <a href="http://hackeryou.com">HackerYou</a> do it, and I know you can too.</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/wordpress-calypso-react/feed/</wfw:commentRss>
		<slash:comments>36</slash:comments>
							</item>
		<item>
		<title>🎥 Modern Workflow &#038; Tooling Talk</title>
		<link>https://wesbos.com/modern-javascript-workflow-tooling/</link>
				<comments>https://wesbos.com/modern-javascript-workflow-tooling/#comments</comments>
				<pubDate>Tue, 17 Nov 2015 15:23:54 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3632</guid>
				<description><![CDATA[Last month I had the privilege of heading out to the Netherlands for Fronteers conference. In addition to some training the day before the conf, I did a talk on Modern Workflow + Tooling. In this talk, I review a &#8230; <a href="https://wesbos.com/modern-javascript-workflow-tooling/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p><img src="https://wesbos.com/wp-content/uploads/2015/11/ss-2015-11-17-at-10.18.05-AM.png" alt="Wes Bos at  Fronteers Conference 2015 " width="1678" height="990" class="aligncenter size-full wp-image-3633" srcset="https://wesbos.com/wp-content/uploads/2015/11/ss-2015-11-17-at-10.18.05-AM.png 1678w, https://wesbos.com/wp-content/uploads/2015/11/ss-2015-11-17-at-10.18.05-AM-300x177.png 300w, https://wesbos.com/wp-content/uploads/2015/11/ss-2015-11-17-at-10.18.05-AM-650x383.png 650w" sizes="(max-width: 1678px) 100vw, 1678px" /></p>
<p>Last month I had the privilege of heading out to the Netherlands for Fronteers conference. In addition to some training the day before the conf, I did a talk on Modern Workflow + Tooling.</p>
<p>In this talk, I review a handful of tools that every front end developer should know about. From image compression with Gulp or Grunt to JavaScript Modules and using NPM as a package manager.</p>
<p>Follow along with <a href="http://wesbos.github.io/Modern-Workflow-and-Tooling-Talk/">the slides here</a>.</p>
<p>A big thanks to the crew at Fronteers &#8211; this was a extremely well put together conference. Enjoy!</p>
<div class="embed-vimeo" style="text-align: center;"><iframe src="https://player.vimeo.com/video/145138873" width="640" height="360" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></div>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/modern-javascript-workflow-tooling/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
							</item>
		<item>
		<title>Emmet expansions and className in React JSX</title>
		<link>https://wesbos.com/emmet-react-jsx-sublime/</link>
				<comments>https://wesbos.com/emmet-react-jsx-sublime/#comments</comments>
				<pubDate>Mon, 16 Nov 2015 19:36:20 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Sublime Text]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3628</guid>
				<description><![CDATA[Since I wrote Sublime Text Power User and recently released React for Beginners &#8211; one of the questions I get most often is how do I use Emmet shortcuts right inside of my JSX? There are lots of tricks out &#8230; <a href="https://wesbos.com/emmet-react-jsx-sublime/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>Since I wrote <a href="https://SublimeTextBook.com">Sublime Text Power User</a> and recently released <a href="https://ReactForBeginners.com">React for Beginners</a> &#8211; one of the questions I get most often is how do I use Emmet shortcuts right inside of my JSX?</p>
<p>There are lots of tricks out there, but this is the proper way to get everything setup without any hacks.</p>
<p><iframe class='youtube-player' type='text/html' width='640' height='360' src='https://www.youtube.com/embed/JTHM077EHbI?version=3&#038;rel=1&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' allowfullscreen='true' style='border:0;'></iframe></p>
<p>Grab the snippet code from <a href="https://gist.github.com/wesbos/2bb4a6998635df97c748">https://gist.github.com/wesbos/2bb4a6998635df97c748</a></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/emmet-react-jsx-sublime/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
							</item>
		<item>
		<title>Understanding ES6 Arrow Functions for jQuery Developers</title>
		<link>https://wesbos.com/javascript-arrow-functions/</link>
				<comments>https://wesbos.com/javascript-arrow-functions/#comments</comments>
				<pubDate>Mon, 19 Oct 2015 18:39:22 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3624</guid>
				<description><![CDATA[Arrow functions are a really handy new part of the ES6 JavaScript spec. Along with shorter, more concise syntax one of the benefits is that is handles the keyword this a little differently. More specifically, it doesn&#8217;t change the binding &#8230; <a href="https://wesbos.com/javascript-arrow-functions/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>Arrow functions are a really handy new part of the ES6 JavaScript spec.</p>
<p>Along with shorter, more concise syntax one of the benefits is that is handles the keyword <code>this</code> a little differently. More specifically, it doesn&#8217;t change the binding of <code>this</code> when you enter into a new function that was declared with an arrow.</p>
<p>So, while you&#8217;ll use this in any of your JavaScript, here is a problem we have all run into with jQuery events, and how you can fix it with ES6 arrow functions.</p>
<pre><code class="language-javascript">    // Go from this code:
    $('.cta').on('click',function() {
      var that = this;
      setTimeout(function() {
        $(that).toggleClass('on');
      }, 1000)
    });

    // To this code:
    $('.cta').on('click',function() {
      setTimeout(()=&gt; {
        $(this).toggleClass('on');
      }, 1000)
    });
</code></pre>
<p><iframe class='youtube-player' type='text/html' width='640' height='360' src='https://www.youtube.com/embed/6aETKj5-SKg?version=3&#038;rel=1&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' allowfullscreen='true' style='border:0;'></iframe></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/javascript-arrow-functions/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
							</item>
		<item>
		<title>How do you get the most out of a tech conference?</title>
		<link>https://wesbos.com/get-the-most-out-of-conferences/</link>
				<comments>https://wesbos.com/get-the-most-out-of-conferences/#comments</comments>
				<pubDate>Wed, 14 Oct 2015 17:32:38 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[The Business of Web Dev]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3614</guid>
				<description><![CDATA[I&#8217;ve been to a ton of conferences, as a speaker, a trainer and an attendee. Most of the conferences in our industry are top notch &#8211; I&#8217;ve been inspired, I&#8217;ve learned and I&#8217;ve created many fantastic friendships. Conferences can be &#8230; <a href="https://wesbos.com/get-the-most-out-of-conferences/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p><img src="https://wesbos.com/wp-content/uploads/2015/10/21468088723_62f0ddfcaa_k.jpg" alt="21468088723_62f0ddfcaa_k" width="2048" height="1152" class="aligncenter size-full wp-image-3621" srcset="https://wesbos.com/wp-content/uploads/2015/10/21468088723_62f0ddfcaa_k.jpg 2048w, https://wesbos.com/wp-content/uploads/2015/10/21468088723_62f0ddfcaa_k-300x169.jpg 300w, https://wesbos.com/wp-content/uploads/2015/10/21468088723_62f0ddfcaa_k-650x366.jpg 650w" sizes="(max-width: 2048px) 100vw, 2048px" /></p>
<p>I&#8217;ve been to a ton of conferences, as a speaker, a trainer and an attendee. Most of the conferences in our industry are top notch &#8211; I&#8217;ve been inspired, I&#8217;ve learned and I&#8217;ve created many fantastic friendships.</p>
<p>Conferences can be expensive, so when you do go to one, make sure you make the most of it. Here are a few things I&#8217;ve learned that you can use to maximize your learning and meet some of the best people in our industry.</p>
<h3>Get on Twitter a few days before</h3>
<p>Buzz around the event starts to grow and you can often start to familiarize yourself with others going to the event. Read up on anyone who you would like to specifically meet so you have something to talk about. I often get &#8220;Hey — thanks for your flexbox/sublime text/whatever tutorial &#8211; it really helped me.&#8221; and its such an easy way for both of us to launch into a comfortable conversation.</p>
<h3>Grab lunch with Speakers</h3>
<p>If you live in the area of the conference &#8211; <strong>see if any of the speakers want to grab lunch or dinner</strong> the day before the conference.  More often than not, the speakers are in a foreign city corralled in their hotel room.  They are going to order room service anyways, so you might as well extend the gesture and see if they want to grab a bite to eat. I&#8217;ve made many friendships and have gotten some of the best consulting work of my career this way.</p>
<h3>Meet everyone!</h3>
<p>Many conference talks are streamed online, so why even attend? A huge part of a conference is in the people that you will meet &#8211; for many this is the primary reason of attending.</p>
<p>I often find that people come off a little sour, or aggressive, online and upon meeting them in person they are the kindest people I&#8217;ve ever met. If you are intimidated by some of these larger figures in our space, just remember they are regular people and are probably as shy as you are — here are a few tips on how to do that&#8230;</p>
<h3>Stay off your phone during breaks and meals!</h3>
<p>This is probably the hardest thing and I catch myself pretending to look at my phone all the time. It&#8217;s awkward, but bite your tongue and say Hi to someone else who is milling around. Most people at conferences don&#8217;t know anyone, we&#8217;re all in the same place.</p>
<h3>Go to the conference parties <img src="https://s.w.org/images/core/emoji/12.0.0-1/72x72/1f389.png" alt="🎉" class="wp-smiley" style="height: 1em; max-height: 1em;" /></h3>
<p>Good conferences make sure the music is low/off and there are non-alcoholic drinks available for anyone who doesn&#8217;t drink. This is a fantastic opportunity to meet <em>tons</em> of other developers in a short amount of time.</p>
<h3>This goes for speakers as well <img src="https://s.w.org/images/core/emoji/12.0.0-1/72x72/1f610.png" alt="😐" class="wp-smiley" style="height: 1em; max-height: 1em;" /></h3>
<p>Sometimes we see little posses of speakers do their own thing and it bums me out. As silly as it may seem, many of the attendees really look up to you are dying you meet you.</p>
<h3>Wear your name badge with style</h3>
<p>You might think it&#8217;s lame, but it&#8217;s the best way to have people remember your name or even make the connection to your twitter account. Some name badges have a habit of flipping over &#8211; make sure yours is pointing the right way because everyone sneaks a peak at your name when you join a group.</p>
<h3>Ask good questions</h3>
<p>What do you do doesn&#8217;t cut it &#8211; we&#8217;re all devs. What are you working on? What was your favourite talk? What did you think of Ember? Ask questions that will open up the conversation.</p>
<blockquote><p>
  These are some of the smartest people in our industry &#8211; imagine what would happen if everyone met each other?!
</p></blockquote>
<h3>Sit with random people for lunch <img src="https://s.w.org/images/core/emoji/12.0.0-1/72x72/1f354.png" alt="🍔" class="wp-smiley" style="height: 1em; max-height: 1em;" /></h3>
<p>Is this spot taken — do you mind if I sit here? The answer is always &#8220;No &#8211; it&#8217;s all yours! I&#8217;m ____ &#8211; nice to meet you!&#8221;</p>
<h3>Invite others to lunch</h3>
<p>If you are going out for lunch, put out a call on twitter for anyone to join you. There is nothing more sad than seeing a McDonalds full of people wearing their conference lanyards sitting by themselves.</p>
<p>I&#8217;ll always be the poutine pied piper at conferences here in Toronto.</p>
<blockquote class="twitter-tweet" width="550">
<p lang="en" dir="ltr">Taking <a href="https://twitter.com/hashtag/jQueryTO?src=hash">#jQueryTO</a> to smokes poutine <a href="http://t.co/t0Rlw63dwN">pic.twitter.com/t0Rlw63dwN</a></p>
<p>&mdash; Wes Bos (@wesbos) <a href="https://twitter.com/wesbos/status/308279991265800192">March 3, 2013</a></p></blockquote>
<p><script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script></p>
<h3>Lunch Topic Tables</h3>
<p>Sometimes conferences will have <strong>lunch topic tables</strong> dedicated towards certain topics &#8211; jump into one of those or even organize your own the week before by tweeting. This always goes over well.</p>
<h3>Practice your break away.</h3>
<p>After a while conversations grow stale and it&#8217;s time to meet new people. Getting trapped is easy, mastering your out is key. As Jerry Seinfeld would say there is no better way to dismiss someone by saying &#8220;it was so nice to meet you&#8221;.</p>
<h3>Jump into conversations</h3>
<p>If there is someone you would like to meet or a group you would like to join, just jump in with a &#8220;Hey I heard you talking about React &#8211; I hope you don&#8217;t mind if I jump in.&#8221; When there is a <em>small</em> lull, do the rounds of &#8220;Hey &#8211; I don&#8217;t think we have met, have we?&#8221;. Often when I do this, I find out that at least half the circle doesn&#8217;t know each other and it&#8217;s a chance for everyone to meet each other.</p>
<p>On the flip side, if you sense someone lurking at the side of your conversation, pause your conversation, <strong>be a human</strong> and say Hi!</p>
<h3>Ask who should I meet?</h3>
<p>I think this one is from Tim Ferris, but I&#8217;ve found many successfully have used it. When you are breaking away from a conversation &#8211; just ask them who you should meet next. It&#8217;s an easy in when you can walk up to someone and say &#8220;Hey &#8211; Sarah said we should meet &#8211; just wanted to say hi!&#8221;.</p>
<h3>Say Hi to the speakers</h3>
<p>They aren&#8217;t rock stars and more often than not they don&#8217;t know anyone and are a ball or nerves on top of that because of their talk the next day. It&#8217;s so easy to ask about their talk.  I know I love to get asked about my talk because it gives me a chance to dry run some of the ideas and I often pick up valuable insights from the questions/responses I get.</p>
<h3>Take notes / visual sketches</h3>
<p>I don&#8217;t do this, but I know many find it a fantastic way to pay attention. Report back to your team or write a post summing up the conference. The best way to solidify something to yourself is to explain it to others.</p>
<p>Here are some great examples from #fronteers15</p>
<ul>
<li><a href="http://www.tomhartwig.nl/blog/fronteers-conference-2015-takeaways/">http://www.tomhartwig.nl/blog/fronteers-conference-2015-takeaways/</a></li>
<li><a href="https://yatil.net/tag/fronteers15/">https://yatil.net/tag/fronteers15/</a></li>
<li><a href="https://workflowy.com/s/ZBjd1Tuexh">https://workflowy.com/s/ZBjd1Tuexh</a></li>
<li><a href="https://gist.github.com/scottjehl/34094c444aa5e798726c">https://gist.github.com/scottjehl/34094c444aa5e798726c</a></li>
</ul>
<h3>Watch Twitter</h3>
<p>All events will have a hashtag where you can follow along with the chatter. This is a great opportunity to get more context for the talk as well as find &amp; follow some really great people in the industry.</p>
<h3><a href="https://twitter.com/mchaste/status/654301045942812672">Be as open minded as possible</a></h3>
<p>Check any preconceptions at the door. I could link you to 2013 JSConf where everyone was bashing this stupid idea for a JS framework called React. Conferences are about new ideas and changing the way we work — give everything a chance before going all negative nancy on the talk.</p>
<h3><a href="https://twitter.com/jeroenheijmans/status/654304019901489152">Choose at least one thing to put into practice <em>immediately</em> afterwards.</a></h3>
<p>I&#8217;m always jacked up on some sort of technology after a conference. Choose something that you can immediately put into practice and keep that momentum going!</p>
<h3><a href="https://twitter.com/antoniwan/status/654332586806919168">Plan ahead!</a></h3>
<p>A schedule will keep you focused on the important talks/events &#8211; especially if there are multiple tracks going on at once.</p>
<h3>Read the code of conduct.</h3>
<p>Most conferences will have a <a href="http://confcodeofconduct.com/">code of conduct</a>. Read it and treat everyone with respect.</p>
<h3>Say thank you to the organizers</h3>
<p>Running a conference is often a thankless job that takes months and months of work. The organizers are often volunteers and are doing it for the industry. A written note or even an email goes a long way.</p>
<h3>Watch Twitter for a few days after</h3>
<p>There is a steady stream of links, tweets, conversations and slide decks the few days following the conference. It&#8217;s a great time to tweet at speakers telling them how much you enjoyed their talk as well as find your new friends that you met at the conference on twitter.</p>
<h3>Make the most of it!</h3>
<p>Hopefully you learned a few new tips that will make your next conference even more enjoyable. We have an amazing community filled with some of the best people I&#8217;ve never met &#8211; make sure to make the most of it!</p>
<p>Big thanks to <a href="https://twitter.com/peterpeerdeman">Peter Peerdeman</a> for the photos used in this post!</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/get-the-most-out-of-conferences/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
							</item>
		<item>
		<title>Fixing a poor Google Page Speed Score</title>
		<link>https://wesbos.com/wordpress-page-speed/</link>
				<comments>https://wesbos.com/wordpress-page-speed/#comments</comments>
				<pubDate>Wed, 26 Aug 2015 18:40:02 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3606</guid>
				<description><![CDATA[Google Page Speed Insights gives your site a score for speed an useablilty, and while I had a great score for useability, my score for speed was a pathetic 51/100. My site is WordPress, and because of the plugin ecosystem &#8230; <a href="https://wesbos.com/wordpress-page-speed/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p><a href="https://developers.google.com/speed/pagespeed/insights">Google Page Speed Insights</a> gives your site a score for speed an useablilty, and while I had a great score for useability, my score for speed was a pathetic <strong>51/100</strong>. My site is WordPress, and because of the plugin ecosystem inserts many blocking assets into your head, WordPress often gets flack for being slow.</p>
<p>So &#8211; armed with an hours worth of time, I set out to fix my own website while recording my progress. I&#8217;m far from a performance specialist, but hopefully this shows you that making your sites fast is a relatively simple task that can pay off huge for your users.</p>
<p>I mention a few WordPress/Apache specific things in this video, but the tips should apply to any site/server config.</p>
<p><iframe class='youtube-player' type='text/html' width='640' height='360' src='https://www.youtube.com/embed/BfKf7KCmfRY?version=3&#038;rel=1&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' allowfullscreen='true' style='border:0;'></iframe></p>
<p>Links:</p>
<ul>
<li><a href="https://wordpress.org/plugins/zencache/">ZenCache</a></li>
<li><a href="https://kraken.io/">Kraken</a> and <a href="https://wordpress.org/plugins/kraken-image-optimizer/">Kraken WordPress Plugin</a></li>
</ul>
<p><code>.htaccess</code> config:</p>
<pre><code class="xml"># 1 Week
Header set Cache-Control "max-age=604800, public, must-revalidate"

&lt;IfModule deflate_module&gt;
  &lt;IfModule filter_module&gt;
    AddOutputFilterByType DEFLATE text/plain text/html
    AddOutputFilterByType DEFLATE text/xml application/xml application/xhtml+xml application/xml-dtd
    AddOutputFilterByType DEFLATE application/rdf+xml application/rss+xml application/atom+xml image/svg+xml
    AddOutputFilterByType DEFLATE text/css text/javascript application/javascript application/x-javascript
    AddOutputFilterByType DEFLATE font/otf font/opentype application/font-otf application/x-font-otf
    AddOutputFilterByType DEFLATE font/ttf font/truetype application/font-ttf application/x-font-ttf
  &lt;/IfModule&gt;
&lt;/IfModule&gt;
</code></pre>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/wordpress-page-speed/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
							</item>
		<item>
		<title>How to comment in React JSX</title>
		<link>https://wesbos.com/react-jsx-comments/</link>
				<comments>https://wesbos.com/react-jsx-comments/#comments</comments>
				<pubDate>Tue, 25 Aug 2015 17:11:35 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Sublime Text]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3600</guid>
				<description><![CDATA[How do you comment in JSX? Regular JavaScript comments in JSX get parsed as Text and show up in your app. Comments in JSX are weird and when searching for information, it&#8217;s hard to find a straightforward answer. So here &#8230; <a href="https://wesbos.com/react-jsx-comments/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>How do you comment in JSX? Regular JavaScript comments in JSX get parsed as Text and show up in your app.</p>
<p>Comments in JSX are weird and when searching for information, it&#8217;s hard to find a straightforward answer. So here it is:</p>
<p>You can&#8217;t just use HTML comments inside of JSX because it thinks they are real DOM Nodes:</p>
<pre><code class="language-javascript">render() {
  return (
    &lt;div&gt;
      &lt;!-- This doesn't work! --&gt;
    &lt;/div&gt;
  )
}
</code></pre>
<p>You&#8217;ll need to use JavaScript comments inside of<br />
You <em>can</em> use regular <code>/* Block Comments */</code>, but they need to be wrapped in curly braces:</p>
<pre><code class="language-javascript">{/* A JSX comment */}
</code></pre>
<p>Same goes for multiline comments:</p>
<pre><code class="language-javascript">{/* 
  Multi
  line
  comment
*/}  
</code></pre>
<p>Kind of a pain, but React devs has stated they do not plan to add regular JS commenting to JSX.</p>
<p>If you use Sublime Text, I&#8217;ve created a little snippet so you can just type <code>jc</code> + <code>TAB</code> to get a quick comment. <a href="http://wes.io/cmCC">Download it here</a>. To install, <code>Preferences</code> → <code>Browse Packages</code> → Put snippet in <code>User</code> folder.</p>
<p>I&#8217;m still on a hunt for a for a fix to get the comment shortcut working &#8211; or even a small package that would toggle them on and off. If anyone is a interesting in working on this (and knows Python) &#8211; let me know!</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/react-jsx-comments/feed/</wfw:commentRss>
		<slash:comments>53</slash:comments>
							</item>
		<item>
		<title>Highlight CSS colours in Sublime Text</title>
		<link>https://wesbos.com/highlight-css-colours-in-sublime-text/</link>
				<comments>https://wesbos.com/highlight-css-colours-in-sublime-text/#comments</comments>
				<pubDate>Fri, 21 Aug 2015 15:14:10 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Sublime Text]]></category>
		<category><![CDATA[Workflow + Tooling]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3587</guid>
				<description><![CDATA[In What The Flexbox, one of the biggest questions I&#8217;ve received is &#8220;how do you get your colours to show up in Sublime Text like that&#8221;? I&#8217;ve answered it maybe 20 times now. The trick is getting them to show &#8230; <a href="https://wesbos.com/highlight-css-colours-in-sublime-text/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>In <a href="http://flexbox.io">What The Flexbox</a>, one of the biggest questions I&#8217;ve received is <strong>&#8220;how do you get your colours to show up in Sublime Text like that&#8221;</strong>?</p>
<p>I&#8217;ve answered it maybe 20 times now. The trick is getting them to show up all the time, instead of just when you click a color. This is one of my favourite packages because it works in CSS, Stylus, Sass and Less! Here is a quick 101. Watch the video or read the text below:</p>
<p><iframe class='youtube-player' type='text/html' width='640' height='360' src='https://www.youtube.com/embed/255Rs-qCPVY?version=3&#038;rel=1&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' allowfullscreen='true' style='border:0;'></iframe></p>
<p><strong>First</strong>, install the <a href="https://packagecontrol.io/packages/Color%20Highlighter">Color Highlighter package</a> from Package Control</p>
<p><strong>Next</strong>, restart Sublime Text.</p>
<p><strong>Then</strong>, in Preferences → Package Settings → Color Highlighter → Settings &#8211; User</p>
<p>Use the &#8220;filled&#8221; setting to make them show all the time.</p>
<pre><code class="language-javascript">{
"ha_style": "filled"
}
</code></pre>
<p><strong>Enjoy! You can also grab my <a href="https://sublimetextbook.com/?utm_source=colorhighlighter&amp;utm_medium=banner&amp;utm_campaign=product">Sublime Text Book</a> and use WESBOS for $10 off.</strong></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/highlight-css-colours-in-sublime-text/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
							</item>
		<item>
		<title>Announcing What The FlexBox?!</title>
		<link>https://wesbos.com/flexbox-video-tutorials/</link>
				<comments>https://wesbos.com/flexbox-video-tutorials/#comments</comments>
				<pubDate>Wed, 29 Jul 2015 12:48:16 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Video Series]]></category>
		<category><![CDATA[Workflow + Tooling]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3572</guid>
				<description><![CDATA[Hey everyone &#8211; I&#8217;m super excited to announce that I&#8217;ve released my third big video series. It&#8217;s called What The FlexBox?! &#8211; a simple, free 20 video series aimed at getting you to master CSS Flexbox. I created this because &#8230; <a href="https://wesbos.com/flexbox-video-tutorials/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p><img src="https://wesbos.com/wp-content/uploads/2015/07/ss-2015-07-28-at-2.45.04-PM.png" alt="ss 2015-07-28 at 2.45.04 PM" width="986" height="465" class="aligncenter size-full wp-image-3573" srcset="https://wesbos.com/wp-content/uploads/2015/07/ss-2015-07-28-at-2.45.04-PM.png 986w, https://wesbos.com/wp-content/uploads/2015/07/ss-2015-07-28-at-2.45.04-PM-300x141.png 300w, https://wesbos.com/wp-content/uploads/2015/07/ss-2015-07-28-at-2.45.04-PM-650x307.png 650w" sizes="(max-width: 986px) 100vw, 986px" /></p>
<p>Hey everyone &#8211; I&#8217;m super excited to announce that I&#8217;ve released my third big video series. It&#8217;s called What The FlexBox?! &#8211; a simple, free 20 video series aimed at getting you to master CSS Flexbox.</p>
<p>I created this because while Flexbox is one of the best things to come to CSS layouts in years, it&#8217;s a bit hard to initially learn. These 20 videos are short and focused on a single topic each &#8211; pick and choose which topics you need clarity on. The last 7 videos are all code-alongs where we will build some really great layouts with CSS Flexbox.</p>
<p>Grab them at <a href="http://Flexbox.io">Flexbox.io</a>. Enjoy and let me know what you think!</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/flexbox-video-tutorials/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
							</item>
		<item>
		<title>$12 JavaScript Shirts + Giveaway</title>
		<link>https://wesbos.com/javascript-shirts/</link>
				<comments>https://wesbos.com/javascript-shirts/#comments</comments>
				<pubDate>Mon, 20 Jul 2015 02:51:33 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3554</guid>
				<description><![CDATA[Update: The teespring is now over! Thanks to everyone who purchased a shirt, hoodie or tank. All 10 winners have been picked and emailed about shirt arrangements. Enjoy! I love JavaScript and I love shirts! Do you? If you do, &#8230; <a href="https://wesbos.com/javascript-shirts/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p><strong>Update:</strong> The teespring is now over! Thanks to everyone who purchased a shirt, hoodie or tank. All 10 winners have been picked and emailed about shirt arrangements. Enjoy!</p>
<p>I love JavaScript and I love shirts! Do you? If you do, then you should get a <a href="http://teespring.com/javascript-shirts">JavaScript Shirt, Tank or Hoodie</a> in blue or black on TeeSpring. I&#8217;ve set the campaign to $12 per shirt, which means that there is <em>no profit being made here</em> &#8211; it&#8217;s just an effort to get JS devs some really great shirts!</p>
<p><img class="aligncenter size-full wp-image-3559" src="https://wesbos.com/wp-content/uploads/2015/07/people-js-shirts.jpg" alt="people-js-shirts" width="642" height="271" srcset="https://wesbos.com/wp-content/uploads/2015/07/people-js-shirts.jpg 642w, https://wesbos.com/wp-content/uploads/2015/07/people-js-shirts-300x127.jpg 300w" sizes="(max-width: 642px) 100vw, 642px" /></p>
<p>Available in high quality American Apparel, these shirts are screen printed and are the top quality — no iron ons here. I&#8217;ve ordered from Teespring many times and I&#8217;ve always been very happy with the product. <del datetime="2015-07-20T14:09:27+00:00">The campaign needs to sell</del> We have already sold the 15 needed, so <a href="http://teespring.com/javascript-shirts">grab yours today</a> and you for sure get it!</p>
<h3><a href="http://wesbos.com/giveaways/javascript-shirt-giveaway/">Tshirt Giveaway!</a></h3>
<p>In an effort to get the word out &#8211; I&#8217;ll be giving away 10 shirts! Simply <a href="http://wesbos.com/giveaways/javascript-shirt-giveaway/">Enter Here →</a> and you&#8217;ll be notified if you have won a shirt. You may pick any shirt available and it will be mailed anywhere in the world. Good luck!</p>
<h3>FAQ</h3>
<h4>Did you make the JS Logo?</h4>
<p>No, but it&#8217;s a <a href="https://github.com/voodootikigod/logo.js">community project</a> licensed under MIT so you are welcome to print it on your own stuff as well!</p>
<h4>What if I buy a shirt, and then win?</h4>
<p>If you win and have already bought one, I&#8217;ll make sure you get a refund so you don&#8217;t have to pay for one!</p>
<h4>Can I get one in ${color} || ${garmentType} || ${design}</h4>
<p>I&#8217;ve made a handful of different options available that should suit most tastes &#8211; if you aren&#8217;t fond of the design or shirt types, I&#8217;d love to hear what you would like best, but this time around it&#8217;s all I&#8217;m offering</p>
<h4>Why are they so cheap?</h4>
<p>I&#8217;m not looking to make any money off selling these shirts. I know developers love t-shirts and stickers, and after a <a href="http://wesbos.com/dev-stickers/">successful sticker giveaway</a>, I thought I&#8217;d try my hand at doing a few shirts as well!</p>
<h4>I have a question about Sizing, Shipping, Prices</h4>
<p>Please contact TeeSpring directly for those questions.</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/javascript-shirts/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
							</item>
		<item>
		<title>From MailChimp to Sendy &#8211; how I saved $2,400/year on my email list</title>
		<link>https://wesbos.com/mailchimp-to-sendy/</link>
				<comments>https://wesbos.com/mailchimp-to-sendy/#comments</comments>
				<pubDate>Sat, 11 Jul 2015 19:23:10 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3548</guid>
				<description><![CDATA[**** UPDATE: In Sendy 3 they have added list segmentation! **** I absolutely love MailChimp but as my email list starts to grow, I&#8217;m finding the monthly payment too expensive. With a list of my size, I was paying about $2500 &#8230; <a href="https://wesbos.com/mailchimp-to-sendy/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>**** <em><strong>UPDATE: </strong></em><strong>In Sendy 3 they have added list segmentation! ****</strong></p>
<p><img class="aligncenter size-full wp-image-3550" src="https://wesbos.com/wp-content/uploads/2015/07/mailchimp-to-sendy1.png" alt="mailchimp-to-sendy" width="500" height="300" srcset="https://wesbos.com/wp-content/uploads/2015/07/mailchimp-to-sendy1.png 500w, https://wesbos.com/wp-content/uploads/2015/07/mailchimp-to-sendy1-300x180.png 300w" sizes="(max-width: 500px) 100vw, 500px" /></p>
<p>I absolutely love MailChimp but as my email list starts to grow, I&#8217;m finding the monthly payment too expensive. With a list of my size, I was paying about $2500 per year. Since I don&#8217;t send out a regular or weekly email, I was pretty much paying $200+ a month to hold onto email addresses.</p>
<p>After a listen to <a href="https://blog.codepen.io/2015/05/06/40-newsletters/">this codepen radio podcast</a> on how they use a transactional email provider to send their emails, I went looking for other solutions.</p>
<p>This is when I stumbled upon <a href="http://wes.io/bvN7">Sendy</a> &#8211; a self-hosted PHP-based solution that is just the right amount of work to replace my MailChimp needs all together. It works by hooking into Amazon&#8217;s SES (or another transactional email provider like SendGrid or Madrill via SMTP) to send your emails out. You pay $65 once for Sendy and then $1 per 10,000 emails sent via SES.</p>
<p>So &#8211; I decided to give it a shot. It&#8217;s far from a perfect replacement for a heavy MailChimp user, but for someone who is somewhat technical and knows a little bit about email, it&#8217;s totally worth putting a few hours into getting it setup.</p>
<h3>Setup</h3>
<p>Sendy isn&#8217;t a service &#8211; it&#8217;s just a codebase that you run yourself on your own server &#8211; kind of like running your own WordPress. You&#8217;ll need your own PHP server for this &#8211; I run mine on a <a href="http://wes.io/bvcH">cheap Bluehost</a> account.</p>
<p>The setup was really easy, just like WordPress you put your username, password and database info into a config file.Then, they have little popups telling you what to do next and how to get Amazon SES setup. The only snag I hit was setting up a cron task to check for emails to send every 5 mins, It wasn&#8217;t in the instructions but <a href="https://www.easycron.com/cron-job-tutorials/how-to-set-up-cron-job-for-sendy">this page</a> details how to do it on most hosts with cpanel.</p>
<h3>List Size</h3>
<p>Your server doesn&#8217;t actually do the sending of the email &#8211; it pings the SES API and let&#8217;s amazon send the email. This is crucial for your emails actually showing up in users inbox rather than getting marked as spam.</p>
<p>By default amazon gives you 200 emails per day for free. You have to request more sending space &#8211; I asked for 20,000 / day and they gave me 50,000. If you have a need for more than that, Amazon will increase it once you have proven you have a low bounce + spam reporting rate. I&#8217;ve heard it needs to be less than 1% which should be easy to hit if you are following all email newsletter best practices.</p>
<h3>Editing the code</h3>
<p>Another good/bad things about this is that you can edit the code. There were a few spots where I wanted to customize the dashboard with a daily tally of signups &#8211; this was easy enough to do by cracking open the codebase and making a few changes myself. The code is pretty simple, but feels crufty.</p>
<h3>API Endpoints</h3>
<p>When replacing MailChimp, I had to swap out all my ajax endpoints from hitting MailChimp to my own. Sendy has an API to do this, but it doesn&#8217;t support JSON, JSONP or CORS in addition to just spitting out a plaintext response. This is a problem if you want to use JavaScript to hit the API endpoint. A quick fix of adding <code>header("Access-Control-Allow-Origin: *");</code> at the top of the subscribe php file fixed this and allowed me to do cross-domain API calls.</p>
<h3>Backups</h3>
<p>The last, and probably most important thing is that there is no service making sure your data is safe from server crashes. If your database goes missing or gets corrupt, you are pooched. There are many ways to do automated backups of a database, I&#8217;ve opted for a pretty simple <a href="http://www.backup2mail.com/">email script</a> that dumps the database and emails it to me daily. In my email I&#8217;ve got a rule that automatically archives them.</p>
<h3>Segmentation</h3>
<p>One feature that Sendy is missing is the ability to segment your list. If you want to email just male users who live in Canada and have bought 2+ items, you have to export your list, do a little excel magic, and import those subscribers into a new list. Not the end of the world, but definitely a feature I&#8217;d like to see.</p>
<h3>Final Thoughts</h3>
<p>As you can see, it&#8217;s not a 1:1 replacement of MailChimp, but if you look at your needs, Sendy might be a really nice option. I&#8217;ve put probably about 2 hours of work into getting it running and it&#8217;s been running without a hitch for 3+ months. I&#8217;d definitely recommend it!</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/mailchimp-to-sendy/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
							</item>
		<item>
		<title>Dev Sticker Pack! $2</title>
		<link>https://wesbos.com/dev-stickers/</link>
				<comments>https://wesbos.com/dev-stickers/#comments</comments>
				<pubDate>Tue, 23 Jun 2015 21:13:41 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3521</guid>
				<description><![CDATA[Hey there &#8211; in an effort to promote a few of my projects, I got a whole bunch of stickers made! I&#8217;ve been handing them out like candy locally, but many have asked if I could mail you a few. &#8230; <a href="https://wesbos.com/dev-stickers/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p><img class="aligncenter size-large wp-image-3523" style="width:100%;" src="https://wesbos.com/wp-content/uploads/2015/06/stickers-650x650.jpg" alt="stickers" srcset="https://wesbos.com/wp-content/uploads/2015/06/stickers-650x650.jpg 650w, https://wesbos.com/wp-content/uploads/2015/06/stickers-150x150.jpg 150w, https://wesbos.com/wp-content/uploads/2015/06/stickers-300x300.jpg 300w, https://wesbos.com/wp-content/uploads/2015/06/stickers-180x180.jpg 180w" sizes="(max-width: 650px) 100vw, 650px" /><br />
Hey there &#8211; in an effort to promote a few of my projects, I got a whole bunch of stickers made! I&#8217;ve been handing them out like candy locally, but many have asked if I could mail you a few.</p>
<p>For $2, you will get a 5 sticker pack &#8211; that will help cover the cost of shipping and the PayPal Fees. Will ship anywhere in the world.</p>
<p>The stickers are:</p>
<ul>
<li><a href="http://commandlinepoweruser.com"><strong>Command Line Power User</strong></a> — my free video series on ZSH, Z + related tooling.</li>
<li><a href="https://sublimetextbook.com/"><strong>Sublime Text Power User</strong></a> Badge &#8211; my book + video series on mastering Sublime Text</li>
<li><strong> Good At Gulp</strong> &#8211; an upcoming book + video series I&#8217;m working on</li>
<li><strong>Gulp Logo</strong> &#8211; only 100 of these left!</li>
<li><strong>What The FlexBox</strong> &#8211; an upcoming video series on FlexBox</li>
</ul>
<p>Interested? I have enough stickers for about 150 packs. Fill out the form below and I&#8217;ll throw them in the mail for you. By signing up, I&#8217;ll send you an email when I launch new video or book tutorials.</p>
<p><strong>Sorry Folks &#8211; I&#8217;ve given them all away. Make sure to follow me on twitter or like my FB page &#8211; I&#8217;ll give away some more once I&#8217;ve got them printed! </strong></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/dev-stickers/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
							</item>
		<item>
		<title>On being overwhelmed with our fast paced industry</title>
		<link>https://wesbos.com/overwhelmed-with-web-development/</link>
				<comments>https://wesbos.com/overwhelmed-with-web-development/#comments</comments>
				<pubDate>Tue, 26 May 2015 14:43:44 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Workflow + Tooling]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3500</guid>
				<description><![CDATA[Web tooling is changing at an extremely rapid pace right now and there is a sense of exhaustion, being overwhelmed and anxiety of becoming out of date. &#8220;Why is this stuff moving so fast?&#8221; cry the developers. JavaScript var is &#8230; <a href="https://wesbos.com/overwhelmed-with-web-development/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>Web tooling is changing at an extremely rapid pace right now and there is a sense of exhaustion, being overwhelmed and anxiety of becoming out of date. &#8220;Why is this stuff moving so fast?&#8221; cry the developers.</p>
<p><img src="https://wesbos.com/wp-content/uploads/2015/05/Artboard-1-650x356.png" alt="Artboard 1" width="640" height="351" class="aligncenter size-large wp-image-3503" srcset="https://wesbos.com/wp-content/uploads/2015/05/Artboard-1-650x356.png 650w, https://wesbos.com/wp-content/uploads/2015/05/Artboard-1-300x164.png 300w, https://wesbos.com/wp-content/uploads/2015/05/Artboard-1.png 784w" sizes="(max-width: 640px) 100vw, 640px" /></p>
<p>JavaScript <code>var</code> is <a href="https://twitter.com/wesbos/status/599310841331077120">dead</a>? We should use ES2015 <code>let</code> and <code>const</code> now?</p>
<p>CSS is getting variables, nesting, scoping and custom selectors. Preprocessors like Sass and Stylus are dead, long live <a href="https://github.com/postcss/postcss">PostCSS</a>.</p>
<p>Just learned Grunt? Oh you should use Gulp &#8211; wait no, Webpack.</p>
<p>Still laying out your sites using floats like a sucker? Flexbox is here!</p>
<p>Just built a project using protocol relative <code>//</code> &#8211; that&#8217;s <a href="http://www.paulirish.com/2010/the-protocol-relative-url/">an anti-pattern</a> now. Oh and jQuery <code>.hide()</code> is <a href="https://github.com/jquery/jquery.com/issues/88">bad for performance</a>, so cut that out.</p>
<p>Finally dipping your toes in Angular? Oh, it&#8217;s totally <a href="http://www.intridea.com/blog/2015/3/24/angularjs-2-0-crazy-like-a-fox">changing in 2.0</a>. Wait, shouldn&#8217;t you be using React? Haven&#8217;t you heard of Aurelia or JSBlocks?</p>
<p>Whenever a new framework, tool or technique comes out, I hear more groans than celebrations.</p>
<blockquote><p>
  How are we supposed to get any work done when everything keeps changing?
</p></blockquote>
<h3>It&#8217;s going to keep changing</h3>
<p>It&#8217;s human nature to resist change, and it&#8217;s kind of a hard pill to swallow for some. Working on the web means that things change really quickly. We&#8217;re never to to settle on a technology stack and hang it out &#8211; we will always see innovation, people pushing the envelope on both what is possible and the best way to get things done.</p>
<blockquote class="twitter-tweet" lang="en">
<p lang="en" dir="ltr">. <a href="https://twitter.com/wesbos">@wesbos</a> the web is just one big Agile process. There is no big reveal. We just keep iterating.</p>
<p>&mdash; Micah Godbolt (@micahgodbolt) <a href="https://twitter.com/micahgodbolt/status/603190108766937088">May 26, 2015</a></p></blockquote>
<h3>It&#8217;s not really changing that fast</h3>
<p>What you see on twitter, HackerNews and in your newsletters isn&#8217;t necessarily what everyone is using. Companies make multi-year investments in technology and will stick to their stack for quite some time. So as much as you think that everyone scraps their current setup for a shiny new framework every 6 months, it isn&#8217;t the case at all.</p>
<p>Would you guess that Spotify is built with LESS? Or TweetDeck is highly reliant on jQuery. Yuck, right? No &#8211; those were the technologies that were evaluated at the time. There are better options now, but it&#8217;s not causing their app to crash or business to fail.</p>
<h3>Wait it out and Evaluate</h3>
<p>Am I going to drop my JavaScript framework for JSBlocks today? No way! Am I going to keep my ear to the ground and see how people like it? Absolutely. We have all been burned by picking up technologies when they are too early, and it&#8217;s important to watch out for that.</p>
<p>At JSConf two years ago, I was there when Facebook introduced React.js and they got <strong>laughed off the stage</strong> because they thought the idea of markup in your JS was ridiculous. Now I&#8217;m starting to swap my beloved Angular.js out for React.js. I waited for the community as a whole to test and embrace it. It&#8217;s at a point now where enough people I trust are using it, not because it&#8217;s new and cool, but because it&#8217;s the right tool for the job.</p>
<p>I sure am glad that facebook decided to put out React.js and push how we think about these frameworks. We had Angular and Backbone at the time, and many would have said we had enough frameworks.</p>
<p>Same goes for PostCSS &#8211; it&#8217;s a pretty new idea to ditch your Sass for PostCSS and CSS Next. Should you do today? Probably not. Should you keep your ears open and see if momentum for transpiled CSS picks up? <strong>Yes yes yes.</strong></p>
<h3>Just Build Websites</h3>
<blockquote><p>
  Making stuff is how you get better, so just build websites.
</p></blockquote>
<p>In the wise words of Chris Coyier, <em><a href="http://justbuildwebsites.com/">just build websites</a></em>. Don&#8217;t get me wrong, what you use to build them is really, really important, but it&#8217;s even more important to actually be continually building things and improving on your skill. That is how you get better, just <a href="https://vimeo.com/85040589">do a lot of work</a>.</p>
<p>As you get better, these new frameworks and tools become way less daunting and the anxiety caused by things moving too fast will subside because you know that you can easily pick it up in a day or two.</p>
<h3>So how?</h3>
<p>So &#8211; to sum this up. Things are always going to change and that is fantastic news for our industry. You won&#8217;t become obsolete overnight if you keep your ear to the ground, honestly evaluate new technology and never stop building stuff. Here are a few tips:</p>
<h4>Newsletters</h4>
<p>Subscribe to weekly newsletters that give you a high level overview of what is new. <a href="https://cooperpress.com/">Peter Cooper</a> runs some of the best ones around. Take 5 minutes a week to read over the list &#8211; no need to click through to every link but keep tabs on what you keep hearing over and over. Chances are that if you hear about something every week, it&#8217;s starting to gain traction.</p>
<h4>Side Projects</h4>
<p>ABC &#8211; always be coding. If your work doesn&#8217;t allow you to try new things as frequently as you like, have a side project that you are invested in. You can use this to try out new tech you otherwise might not be able to.</p>
<h4>One New thing</h4>
<p>If you do regularly start new projects, make it a point to try one new thing in every project. It might just be trying Flexbox on a smaller part of a site, but you are making progress.</p>
<h4>Self Improvement</h4>
<p>There is a wealth of information out there and you should take advantage of it. Whether it&#8217;s taking a class at something like <a href="http://hackeryou.com">HackerYou</a>, watching some free tutorial videos (like <a href="http://CommandLinePowerUser.com">http://CommandLinePowerUser.com</a>), or reading a book from someone in the industry (hint: <a href="https://SublimeTextBook.com">https://SublimeTextBook.com</a>), you should make a point to dedicate a few hours every week to self-improvement. You picked this industry, so it&#8217;s your responsibility to keep up.</p>
<h3>That&#8217;s it, That&#8217;s all</h3>
<p>TLDR; Yes our industry moves quickly, but that is because it&#8217;s getting better and better. If you are always iterating on your skillset in small ways, you will be just fine &#8211; don&#8217;t worry <img src="https://s.w.org/images/core/emoji/12.0.0-1/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p><a href="https://sublimetextbook.com/?utm_source=overwhelmed&#038;utm_medium=banner&#038;utm_campaign=product"><img src="https://sublimetextbook.com/images/facebook-share2.png"></a></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/overwhelmed-with-web-development/feed/</wfw:commentRss>
		<slash:comments>38</slash:comments>
							</item>
		<item>
		<title>CSS object-fit is background-size:cover; for video!</title>
		<link>https://wesbos.com/css-object-fit/</link>
				<comments>https://wesbos.com/css-object-fit/#comments</comments>
				<pubDate>Mon, 13 Apr 2015 20:05:04 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3484</guid>
				<description><![CDATA[Have you ever wished you could use background-size:cover; on regular elements? Well, it turns out you can with a CSS property called object-fit &#8211; and with the recent release of FireFox 36, we can start to use it in our &#8230; <a href="https://wesbos.com/css-object-fit/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>Have you ever wished you could use <code>background-size:cover;</code> on regular elements? Well, it turns out you can with a CSS property called <code>object-fit</code> &#8211; and with the recent release of FireFox 36, we can start to use it in our designs as we have <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit#Browser_compatibility">really good browser support</a> for it.</p>
<p data-height="487" data-theme-id="5332" data-slug-hash="YPmyxy" data-default-tab="result" data-user="wesbos" class='codepen'>See the Pen <a href='http://codepen.io/wesbos/pen/YPmyxy/'>Object Fit for Videos</a> by Wes Bos (<a href='http://codepen.io/wesbos'>@wesbos</a>) on <a href='http://codepen.io'>CodePen</a>.</p>
<p><script async src="//assets.codepen.io/assets/embed/ei.js"></script></p>
<p>It&#8217;s a popular design trend to have videos and images span the entire width and height of an element. Problems arise when it comes to the media&#8217;s ratio &#8211; they never quite fit perfectly width and height wise &#8211; especially with dynamic content and responsive viewports.</p>
<p>Enter object-fit. It&#8217;s a new CSS3 property that we can use to stretch embedded media (videos and images) across the entire parent, while still maintaining the aspect ratio. No JavaScript required!</p>
<p>How does it work? It&#8217;s pretty easy &#8211; first you start with a container that has a defined width and a height on it &#8211; for our purposes I&#8217;m using viewport units so get a perfect 100% width and height of the screen. Then on the video or image itself, we use <code>object-fit: cover;</code>.  You&#8217;ll now see the video span across the entire element &#8211; it&#8217;s cropped either at the left/right or the top/bottom to ensure full coverage.</p>
<p>We can also use <code>object-fit:contain;</code>, which is the same as <code>background-size:cover;</code>, it won&#8217;t crop the video but rather show ensure the entire video is always visible. There are a few more values <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit">available</a>, but these are the most likely use cases when trying to replicate <code>background-size:cover;</code> with a video.</p>
<p>Check out the demo &#8211; <a href="http://codepen.io/wesbos/full/YPmyxy/">http://codepen.io/wesbos/full/YPmyxy/</a> or view the code below. Enjoy!</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/css-object-fit/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
							</item>
		<item>
		<title>Command Line Power User</title>
		<link>https://wesbos.com/command-line-video-tutorials/</link>
				<comments>https://wesbos.com/command-line-video-tutorials/#comments</comments>
				<pubDate>Thu, 02 Apr 2015 18:21:38 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Workflow + Tooling]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3478</guid>
				<description><![CDATA[Today I&#8217;m excited to announce my latest project &#8211; CommandLinePowerUser.com. It&#8217;s a free 11 video series for web developers on learning a modern command line workflow with ZSH, Z and related tools. I created this video series after a successful &#8230; <a href="https://wesbos.com/command-line-video-tutorials/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p><img src="https://wesbos.com/wp-content/uploads/2015/04/ss-2015-04-02-at-2.20.32-PM-650x425.png" alt="ss 2015-04-02 at 2.20.32 PM" width="640" height="418" class="aligncenter size-large wp-image-3480" srcset="https://wesbos.com/wp-content/uploads/2015/04/ss-2015-04-02-at-2.20.32-PM-650x425.png 650w, https://wesbos.com/wp-content/uploads/2015/04/ss-2015-04-02-at-2.20.32-PM-300x196.png 300w, https://wesbos.com/wp-content/uploads/2015/04/ss-2015-04-02-at-2.20.32-PM.png 1434w" sizes="(max-width: 640px) 100vw, 640px" /><br />
Today I&#8217;m excited to announce my latest project &#8211; <a href="http://CommandLinePowerUser.com">CommandLinePowerUser.com</a>. It&#8217;s a free 11 video series for web developers on learning a modern command line workflow with ZSH, Z and related tools.</p>
<p>I created this video series after a successful launch of my <a href="https://SublimeTextBook.com">Sublime Text Book + Video Series</a>. The terminal is the perfect companion to Sublime Text, and as web developers I find we are spending more and more time in the command line with tools such as Git, Gulp, Grunt, Bower and so on. The command line is daunting at first, but hopefully with these videos you will find tips, tricks and a comfort in working in terminal.</p>
<p>Head on over to <a href="http://CommandLinePowerUser.com">CommandLinePowerUser.com</a> and grab the videos!</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/command-line-video-tutorials/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
							</item>
		<item>
		<title>Speed Learning — How I consume and comprehend media at 2x</title>
		<link>https://wesbos.com/speed-learning/</link>
				<comments>https://wesbos.com/speed-learning/#comments</comments>
				<pubDate>Mon, 09 Mar 2015 23:24:34 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3457</guid>
				<description><![CDATA[I was joking with some friends the other day that I rarely read books. While this is technically true, I do consume a ton of audiobooks, conference talks, video tutorials, podcasts and blog posts. It&#8217;s what keeps me growing as &#8230; <a href="https://wesbos.com/speed-learning/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>I was joking with some friends the other day that I rarely <em>read</em> books. While this is technically true, I do consume a ton of audiobooks, conference talks, video tutorials, podcasts and blog posts. It&#8217;s what keeps me growing as a developer and entrepreneur. With informational resources, it&#8217;s easy to find them piling up. We all have a list of tutorials we would like to watch, blog posts we should read and audiobooks we would love to listen to, if we <em>only had the time</em>, right?</p>
<p>Over the past 6 months I&#8217;ve been teaching myself to <em>speed learn</em>. That is, consume this information as fast as possible while maintaining or increasing my comprehension of the material.</p>
<h3>Learning from the Blind Community</h3>
<p>Now before you write this off as &#8220;not for you&#8221; because you don&#8217;t like to listen to sped up voices that resemble a chipmunk, let&#8217;s take a quick look at the blind and #a11y community. A few years ago at the Snow Mobile conference, I saw <a href="https://twitter.com/kevinrj">Kevin Jones</a>, who is blind, demonstrate how he uses his iPhone without seeing it.</p>
<blockquote><p>
  In addition, experienced users often like to speed up the reading rate to 300 words per minute or more, which is more than the inexperienced listener can easily understand.
</p></blockquote>
<p>— &lt;http://webaim.org/techniques/screenreader/&gt;</p>
<p>While the entire presentation was eye opening, the one thing that stood out to me was the speed at which the iPhone was speaking back to him. All the attendees were blown away at the speed, to which Kevin said &#8220;Oh, I&#8217;ve <em>slowed it down for you</em>&#8220;. It turns out that many blind users have trained themselves to comprehend insanely sped-up voices in order to make up for not being able to visually read the text and navigate around their devices.</p>
<h3>Learning to Speed Learn</h3>
<p>So &#8211; this is what brought me to speed learning. The process is fairly simple &#8211; you need to ease into it. I started listening to content at 1.25x. At first it may seem a little fast, but after a few hours it becomes the norm. Going back to 1x now seems like slow motion. After a few months of gradual bumps I&#8217;m now at anywhere from 1.75x to 2.3x depending on the type of media (more on this in a second).</p>
<p>On average, podcasts, conference talks and video tutorials are spoken at around 150 WPM. Professional audiobooks are usually a little less. I speak at 145wpm in this <a href="https://www.youtube.com/watch?v=CBQGl6zokMs">Animate.css tutorial</a>. With a little training, you can easily listen to this video at 2x and above if Youtube allowed for it. I find this technique especially helpful for long YouTube tutorial where you find yourself jumping ahead to the parts actually want.</p>
<p>I asked Kevin about how fast his screen reader runs at. He told me &#8220;Usually around 400 450 wpm but it can go up to 700&#8221;. Note that the regular human reads at 250wpm and speaks around 125! He noted that he also uses this for learning material &#8211; for fiction he slows it down for enjoyment.</p>
<p>I don&#8217;t have to really explain why this is ideal, but I&#8217;ll state it for the sake of saying it straight up:</p>
<blockquote><p>
  Consume 2x the amount of content, learn twice as much in the same amount of time!
</p></blockquote>
<p>So, check out that <a href="https://www.youtube.com/watch?v=CBQGl6zokMs">Animate.css tutorial</a> and try to watch it in 1.25x &#8211; can you handle it?</p>
<p>Each persons voice is different. I find that I can listen to Seth Godin&#8217;s audiobooks easily at 2.5x but quick talking Renee Richee starts to get a little chip-munky around 1.75x.</p>
<h2>Tools</h2>
<p>So, what do you use to listen to sped up media? It&#8217;s important to have good tools for playing this back as poor ones will result in your audio or video skipping or jumping.</p>
<h3>Podcasts</h3>
<p>Most podcatchers will include a speed up function, but I&#8217;ve been <em>in love</em> with Marco Arment&#8217;s <a href="https://overcast.fm/">Overcast</a> for the iPhone. Not only does it have the ability to speed up podcasts, but it has <em>Smart Speed</em> which analyzes the track and removes pauses and gaps in talk shows. I can easily listen to a podcast at 2x and with Smart Speed turned on, I sometimes see the track jump to 2.3x with the gaps taken out.</p>
<p><img class="aligncenter size-full wp-image-3465" src="https://wesbos.com/wp-content/uploads/2015/03/speed.png" alt="speed" srcset="https://wesbos.com/wp-content/uploads/2015/03/speed.png 554w, https://wesbos.com/wp-content/uploads/2015/03/speed-300x227.png 300w" sizes="(max-width: 554px) 100vw, 554px" /></p>
<h3>Video Tutorials</h3>
<p>The YouTube player has speeding up to 2x built in but I prefer to watch my tutorials with VLC. I use the <code>youtube-dl</code> command line tool to download my youtube videos for offline viewing and then use VLC to speed them up. VLC is the best piece of software I&#8217;ve found for listening to and watching media so far.</p>
<p><img src="http://wes.io/a8ia/content" alt="" /></p>
<h3>Blog Posts &amp; eBooks</h3>
<p>While this is still new to me, I&#8217;m playing with the OSX screen reader in Safari &amp; iBooks to read the text back to me as I read the text on the screen. I find this helps me keep a good pace and focused on the text.</p>
<p><img class="aligncenter size-full wp-image-3466" src="https://wesbos.com/wp-content/uploads/2015/03/ss-2015-03-09-at-7.31.05-PM.png" alt="ss 2015-03-09 at 7.31.05 PM" srcset="https://wesbos.com/wp-content/uploads/2015/03/ss-2015-03-09-at-7.31.05-PM.png 1346w, https://wesbos.com/wp-content/uploads/2015/03/ss-2015-03-09-at-7.31.05-PM-300x76.png 300w, https://wesbos.com/wp-content/uploads/2015/03/ss-2015-03-09-at-7.31.05-PM-650x164.png 650w" sizes="(max-width: 1346px) 100vw, 1346px" /></p>
<h3>Audiobooks</h3>
<p>Most of my audiobooks come from Audible, so I use their built in functionality which works great and goes all the way to 3x. I&#8217;m not at 3x yet, but we can dream!</p>
<h3>Headphones</h3>
<p>One thing I&#8217;ve found is that limiting distraction is important for speed learning. At the gym I&#8217;ll use regular Apple earbuds, but while taking a walk or sitting on the train I use a pair of <a href="http://wes.io/a8DV">Bose QC25</a> noise canceling headphones. They aren&#8217;t cheap but well worth the investment if you are really into speed learning.</p>
<h3>Other</h3>
<p>What do you use? I&#8217;m always open to suggestions on how to improve my speed learning. Comment below or tweet me <a href="http://twitter.com/wesbos">@wesbos</a></p>
<p>I&#8217;m really not the first person to uncover the benefits of speed learning, but I&#8217;ve found this technique super helpful and many of my students at <a href="http://hackeryou.com">HackerYou</a> have started to train themselves as well. Anyone can do this.</p>
<p>There is a great [post on Quora] (http://www.quora.com/How-much-longer-does-it-take-to-listen-to-an-audiobook-than-it-does-to-read-the-equivalent-paper-or-eBookabout the actual stats behind this and I couldn&#8217;t agree more.</p>
<p>If you like efficiency and use Sublime Text, check out my book + video series <a href="https://SublimeTextBook.com/?utm_source=blog&amp;utm_medium=link&amp;utm_campaign=speed">Sublime Text Power User</a>. Use code <strong>WESBOS</strong> for $10 off!</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/speed-learning/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
							</item>
		<item>
		<title>Sublime Text Clipboard Copy/Paste History</title>
		<link>https://wesbos.com/sublime-text-clipboard-history/</link>
				<comments>https://wesbos.com/sublime-text-clipboard-history/#comments</comments>
				<pubDate>Wed, 19 Nov 2014 16:37:24 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Sublime Text]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3357</guid>
				<description><![CDATA[This is a little known secret of Sublime Text &#8211; the ability to have multiple items in your clipboard history and access them with the keyboard. To access the clipboard history, simply hit ⌘ + K, ⌘ + V &#8211; &#8230; <a href="https://wesbos.com/sublime-text-clipboard-history/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>This is a little known secret of Sublime Text &#8211; the ability to have multiple items in your clipboard history and access them with the keyboard.</p>
<p>To access the clipboard history, simply hit <code>⌘</code> + <code>K</code>, <code>⌘</code> + <code>V</code> &#8211; so just add the <code>⌘</code> + <code>K</code> infront of your regular paste shortcut. Windows users swap out <code>⌘</code> with <code>Ctrl</code>.</p>
<p>Watch the video for a quick tutorial on how to use it with your workflow:</p>
<p><iframe class='youtube-player' type='text/html' width='640' height='360' src='https://www.youtube.com/embed/IaddB_GQ4Ps?version=3&#038;rel=1&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' allowfullscreen='true' style='border:0;'></iframe></p>
<p>Like this tip? Check out my book + video series for tons more!</p>
<p><a href="https://sublimetextbook.com/?utm_source=clipboard&#038;utm_medium=banner&#038;utm_campaign=product"><img src="https://sublimetextbook.com/images/facebook-share2.png"></a></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/sublime-text-clipboard-history/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
							</item>
		<item>
		<title>Easy JavaScript text-to-speech with google translate</title>
		<link>https://wesbos.com/javascript-text-to-speech/</link>
				<comments>https://wesbos.com/javascript-text-to-speech/#comments</comments>
				<pubDate>Mon, 17 Nov 2014 20:25:45 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3353</guid>
				<description><![CDATA[Hey everyone &#8211; a little trick here today with the HTML5 audio element and the Google translate API. Turns out you can use this query string to dynamically create an audio element. We can then encode our text, pop that &#8230; <a href="https://wesbos.com/javascript-text-to-speech/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>Hey everyone &#8211; a little trick here today with the HTML5 audio element and the Google translate API.</p>
<p>Turns out you can use <a href="https://translate.google.com/translate_tts?ie=UTF-8&#038;q=hi%20this%20is%20wes&#038;tl=en" target="_blank">this query string</a> to dynamically create an audio element. We can then encode our text, pop that url into an audio element and play it with a few lines of JavaScript.</p>
<p>It&#8217;s worth noting that this isn&#8217;t the real way to do text to speech, but its a very simple, cross browser solution that can help you out in a pinch.</p>
<p>Here is a quick video detailing how it works &#8211; I&#8217;d love to see what you all do with this.</p>
<p><iframe class='youtube-player' type='text/html' width='640' height='360' src='https://www.youtube.com/embed/DOtkNxmg9QY?version=3&#038;rel=1&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' allowfullscreen='true' style='border:0;'></iframe></p>
<p><a href="https://sublimetextbook.com/?utm_source=texttospeech&#038;utm_medium=banner&#038;utm_campaign=product"><img src="https://sublimetextbook.com/images/facebook-share2.png"></a></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/javascript-text-to-speech/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
				<enclosure url="https://translate.google.com/translate_tts" length="0" type="" />
			</item>
		<item>
		<title>cobalt2: a theme for Sublime Text</title>
		<link>https://wesbos.com/cobalt2-theme-sublime-text-2/</link>
				<comments>https://wesbos.com/cobalt2-theme-sublime-text-2/#comments</comments>
				<pubDate>Fri, 31 Oct 2014 16:53:05 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Sublime Text]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=620</guid>
				<description><![CDATA[Update: November 2014 &#8211; these theme has received a major UI upgrade for new Sublime Features and editor tweaks. I love text editor colour schemes. I&#8217;ve tried dozens of them over the years but always found myself coming back to &#8230; <a href="https://wesbos.com/cobalt2-theme-sublime-text-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>Update: November 2014 &#8211; these theme has received a major UI upgrade for new Sublime Features and editor tweaks.</p>
<p>I love text editor colour schemes. I&#8217;ve tried dozens of them over the years but always found myself coming back to trusty old cobalt. I liked this theme quite a but but I didn&#8217;t <em>love</em> it. So, over the years I&#8217;ve tweaked and tuned cobalt into a theme that I am very happy with. Its easy on the eyes, works well across many languages and takes note of those little UI elements like the caret, searches and bracket matching.</p>
<p>I have had quite a few friends use my theme and they seem to be sticking with it. So, I&#8217;ve decided to release it to the masses. To download it, head on over to the <a href="https://github.com/wesbos/cobalt2" target="_blank">github repo.</a> As always, would love to hear any feedback you may have <img src="https://s.w.org/images/core/emoji/12.0.0-1/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>Quick aside: I wrote a <a href="https://sublimetextbook.com" title="Sublime Text Book">book on sublime text</a> which comes along with a video series. If you like my themes and blog posts on Sublime Text, you will love this!</p>
<p><a href="https://sublimetextbook.com/?utm_source=cobalt2&#038;utm_medium=banner&#038;utm_campaign=product"><img src="https://sublimetextbook.com/images/facebook-share2.png"></a></p>
<p>#cobalt2<br />
A Sublime Text theme based on our old blue friend cobalt.</p>
<p>A refined colour scheme that is easy on the eyes and takes small UI elements into account. Includes full sublime theme (sidebar, search, tabs, etc&#8230;) as well as support for SublimeLinter, git diffing and a growing number of plugins.</p>
<p>See below for examples. <a href="http://wesbos.com/cobalt2-theme-sublime-text-2/">Read more at http://wesbos.com/cobalt2-theme-sublime-text-2/</a></p>
<h2>Installation</h2>
<h3>With Package Control</h3>
<ol>
<li>Open package control <code>tools</code> → <code>Command Palette</code> and type <code>Install Package</code></li>
<li>Search for Cobalt2 and hit enter</li>
<li>Lastly, open <code>Preferences</code> → <code>Settings - User</code>. Add the following two lines:</li>
</ol>
<pre><code>"color_scheme": "Packages/Theme - Cobalt2/cobalt2.tmTheme",
"theme": "Cobalt2.sublime-theme",
</code></pre>
<p>If these are the last two lines of your settings file, make sure to omit the trailing <code>,</code></p>
<h2>Screenshots</h2>
<p><img src="http://wes.io/YIjn/content" alt="" /></p>
<h3>Sidebar Icons</h3>
<p><img src="http://wes.io/YIjh/content" alt="" /></p>
<h3>Dirty Tab and Selected Tab</h3>
<p><img src="http://wes.io/YIZx/content" alt="" /></p>
<h3>Indentation Guides — Guide, Stacked Guide and Active Guide</h3>
<p>Use <code>"indent_guide_options": ["draw_normal", "draw_active"]</code> for this</p>
<h3>GitGutter Support</h3>
<p><img src="http://wes.io/YIu3/content" alt="" /></p>
<h3>Autocomplete</h3>
<p><img src="http://wes.io/YItl/content" alt="" /></p>
<h3>Command Palette</h3>
<p><img src="http://wes.io/YIpV/content" alt="" /></p>
<h3>GoTo Anything</h3>
<p><img src="http://wes.io/YIhm/content" alt="" /></p>
<h3>Tabs, Spaces and Comments</h3>
<p><img src="http://wes.io/YIho/content" alt="" /></p>
<h3>Folding Lines</h3>
<p><img src="http://wes.io/YImN/content" alt="" /></p>
<h3>Searches</h3>
<p><img src="http://wes.io/YIj0/content" alt="" /></p>
<h3>Highlighted Line</h3>
<p><img src="http://wes.io/YIpZ/content" alt="" /></p>
<h3>JavaScript</h3>
<p><img src="http://wes.io/Lwc6/content" alt="" /></p>
<h3>CSS</h3>
<p><img src="http://wes.io/YIqI/content" alt="" /></p>
<h3>PHP</h3>
<p><img src="http://wes.io/YIa5/content" alt="" /></p>
<h3>Ruby</h3>
<p><img src="http://wes.io/YIpO/content" alt="" /></p>
<h3>Python</h3>
<p><img src="http://wes.io/YIuH/content" alt="" /></p>
<h3>Markdown</h3>
<p><img src="http://wes.io/YJMN/content" alt="" /></p>
<h2>Contributing</h2>
<p>While cobalt2 covers all languages, I write mostly JavaScript and CSS so I welcome any additions for other languages.</p>
<h3>Thanks</h3>
<p>Some icons from <a href="https://github.com/buymeasoda/soda-theme/">Soda Theme by Ian Hill</a></p>
<p><a href="https://twitter.com/idpro">Kyle Knight</a> for pushing cobalt2 past the code screen and styling the entire editor.</p>
<p>Seti UI Atom theme for the sidebar icons</p>
<h2>Official Colours</h2>
<p>Yellow: #ffc600<br />
Blue: #193549<br />
Dusty Blue 35434d<br />
Dark Blue: #15232D</p>
<h3>You may also like:</h3>
<p>Cobalt2 Theme for iTerm <a href="https://github.com/wesbos/Cobalt2-iterm">https://github.com/wesbos/Cobalt2-iterm</a></p>
<p><a href="https://SublimeTextBook.com">Sublime Text Power User Book</a></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/cobalt2-theme-sublime-text-2/feed/</wfw:commentRss>
		<slash:comments>77</slash:comments>
							</item>
		<item>
		<title>Sublime Text Power User Book &#8211; now available!</title>
		<link>https://wesbos.com/sublime-text-book/</link>
				<comments>https://wesbos.com/sublime-text-book/#comments</comments>
				<pubDate>Tue, 07 Oct 2014 17:50:54 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Sublime Text]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3290</guid>
				<description><![CDATA[After over a year of writing, I&#8217;ve launched my book and video series on Sublime Text! The idea for this book was spurred on after a few blog posts on Sublime Text — my readers loved the tips and were &#8230; <a href="https://wesbos.com/sublime-text-book/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>After over a year of writing, I&#8217;ve launched my book and video series on Sublime Text!</p>
<p>The idea for this book was spurred on after a few blog posts on Sublime Text — my readers loved the tips and were always asking for more!</p>
<p>Wait no longer &#8211; the 25 chapter book and 20 video package is now available! This book is going to really help you become a better and more productive developer. Head on over to <a href="http://SublimeTextBook.com">SublimeTextBook.com</a> to see what it&#8217;s all about!</p>
<p><a href="https://sublimetextbook.com/?utm_source=booklaunch&#038;utm_medium=banner&#038;utm_campaign=product"><img src="https://sublimetextbook.com/images/facebook-share2.png"></a></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/sublime-text-book/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
							</item>
		<item>
		<title>Live edit Sass with Takana and instantly view changes (really)</title>
		<link>https://wesbos.com/live-edit-sass-takana/</link>
				<comments>https://wesbos.com/live-edit-sass-takana/#comments</comments>
				<pubDate>Tue, 30 Sep 2014 16:58:35 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Sublime Text]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3250</guid>
				<description><![CDATA[A few days ago there was a buzz about a new Sublime Text package called Takana which claimed to do live editing of Sass. As someone who works on fairly large Sass projects, I was skeptical but decided to give &#8230; <a href="https://wesbos.com/live-edit-sass-takana/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>A few days ago there was a buzz about a new Sublime Text package called <a href="http://usetakana.com/">Takana</a> which claimed to do live editing of Sass. As someone who works on fairly large Sass projects, I was skeptical but decided to give it a short.</p>
<p>Wow, it is fast.</p>
<p>Takana is built upon the blazing fast C/C++ libsass and works in parity with Sublime Text to listen to any changes in your code (not just a save).</p>
<p>This is huge for those who work with Sass and Sublime Text in their workflow. Here is a video exploring how to install and get up and running with some HTML, Sass and the Bourbon library.</p>
<p><iframe class='youtube-player' type='text/html' width='640' height='360' src='https://www.youtube.com/embed/iMUwUP9q3Bs?version=3&#038;rel=1&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;hd=1&#038;wmode=transparent' allowfullscreen='true' style='border:0;'></iframe></p>
<p><a href="https://sublimetextbook.com/?utm_source=takana&#038;utm_medium=banner&#038;utm_campaign=product"><img src="https://sublimetextbook.com/images/facebook-share2.png"></a></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/live-edit-sass-takana/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
							</item>
		<item>
		<title>Let&#8217;s talk about phone numbers on mobile sites</title>
		<link>https://wesbos.com/lets-talk-about-phone-numbers-on-mobile-sites/</link>
				<comments>https://wesbos.com/lets-talk-about-phone-numbers-on-mobile-sites/#comments</comments>
				<pubDate>Wed, 17 Sep 2014 16:36:21 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[HTML5]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3232</guid>
				<description><![CDATA[We need to have a talk about phone numbers on our mobile sites. This is such a small change, but when left out, it causes a major inconvenience for your users. I&#8217;m talking about when phone numbers on a website &#8230; <a href="https://wesbos.com/lets-talk-about-phone-numbers-on-mobile-sites/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>We need to have a talk about phone numbers on our mobile sites. This is such a small change, but when left out, it causes a major inconvenience for your users.</p>
<p><img src="https://wesbos.com/wp-content/uploads/2014/09/iphone-tel.gif"></p>
<p>I&#8217;m talking about when phone numbers on a website aren&#8217;t tapable. Often the HTML is so that mobile operating systems cannot select the phone number alone and you are forced to remember/recite or write down the actual number.</p>
<p>So, when you put a phone number on a website, don&#8217;t just use any old element, use a link with the <code>tel</code> protocol.</p>
<p>So, you links look like this:</p>
<pre><code>&lt;a href="tel:+14168342343"&gt;416-834-2343&lt;/a&gt;
</code></pre>
<p>You can put whatever you want inside the link &#8211; just like normal links!</p>
<pre><code>&lt;a href="tel:+14168342343"&gt;Call me Maybe? &lt;img src="hehe.gif"&gt;&lt;/a&gt;
</code></pre>
<p>This is better for your users, better for business owners and better for the site&#8217;s SEO. Win-win-win.</p>
<p>That&#8217;s all, please help me in spreading this best practice by sharing this article.</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/lets-talk-about-phone-numbers-on-mobile-sites/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
							</item>
		<item>
		<title>use &#215; HTML entity for close buttons rather than the letter X for a perfectly angled ×</title>
		<link>https://wesbos.com/times-html-entity-close-button/</link>
				<comments>https://wesbos.com/times-html-entity-close-button/#comments</comments>
				<pubDate>Mon, 18 Aug 2014 14:28:37 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[HTML5]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3205</guid>
				<description><![CDATA[I posted this simple tip to twitter and it was instantly popular with developers from all around the world. It&#8217;s a small improvement that makes a big visual difference in your applications. ××× Protip: use &#38;times; HTML entity for close &#8230; <a href="https://wesbos.com/times-html-entity-close-button/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>I posted this simple tip to twitter and it was instantly popular with developers from all around the world. It&#8217;s a small improvement that makes a big visual difference in your applications.</p>
<blockquote class="twitter-tweet" lang="en"><p>××× Protip: use &amp;times; HTML entity for close buttons rather than the letter X for a perfectly angled × <a href="http://t.co/1dgqhzxgQY">pic.twitter.com/1dgqhzxgQY</a></p>
<p>&mdash; Wes Bos (@wesbos) <a href="https://twitter.com/wesbos/statuses/499245255703949312">August 12, 2014</a></p></blockquote>
<p>Since a tweet is only 140 characters, I thought I would expand on best practices a little bit in a post.</p>
<h3>Using UTF-8</h3>
<p>A few mentioned that you can just go ahead and use the unicode × instead of the HTML entity <code>&amp;times;</code>. As long as your document is setup for UTF-8, go ahead. I personally rather use the HTML entity <code>&amp;times;</code> because I can remember and type that, whereas <code>×</code> needs to be copy and pasted from a blog post like this.</p>
<h3>Accessibility</h3>
<p>If a visually impaired user uses a screenreader like JAWS to access your website, this will read <strong>multiplication</strong>  to them. So, it is <em>very important</em> that you use proper aria attributes. Something like this will work great:</p>
<pre><code>&lt;a href="#" aria-label="Close Account Info Modal Box"&gt;&amp;times;&lt;/a&gt;
</code></pre>
<p>or better yet:</p>
<pre><code>&lt;button aria-label="Close Account Info Modal Box"&gt;&amp;times;&lt;/button&gt;
</code></pre>
<h3>Other Appropriate Characters</h3>
<p>A few more mentioned that it would be better to use <code>&amp;#x274C;</code> and <code>&amp;#x274E;</code> as they are real × characters rather than just the multiplication sign. While these are great, they are 1) Not supported on many systems. I&#8217;m on osx 10.9.4 and Chrome Canary and they are just boxes. &#x274C; &#x274E; 2) twitter and the iPhone swap them out with goofy looking emojis.</p>
<p>So unfortunately, not a good solution just yet.</p>
<blockquote class="twitter-tweet" lang="en">
<p><a href="https://twitter.com/wesbos">@wesbos</a> wouldn&#39;t ❌ (&amp;<a href="https://twitter.com/hashtag/x274C?src=hash">#x274C</a>😉 or ❎ (&amp;<a href="https://twitter.com/hashtag/x274E?src=hash">#x274E</a>😉 be better since they are just &quot;cross marks&quot;, not &quot;multiplication signs&quot;?</p>
<p>&mdash; SelenIT (@SelenIT2) <a href="https://twitter.com/SelenIT2/statuses/499321739411996672">August 12, 2014</a></p></blockquote>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/times-html-entity-close-button/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
							</item>
		<item>
		<title>Top 11 Programming Fonts for your Text Editor and Terminal</title>
		<link>https://wesbos.com/programming-fonts/</link>
				<comments>https://wesbos.com/programming-fonts/#comments</comments>
				<pubDate>Mon, 21 Jul 2014 18:34:18 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Sublime Text]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3166</guid>
				<description><![CDATA[Choosing a font to use in your editor is a very important step in your workflow that many developers don&#8217;t think twice about. Small things like the difference between 0 vs o or l vs 1 and large things like &#8230; <a href="https://wesbos.com/programming-fonts/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>Choosing a font to use in your editor is a very important step in your workflow that many developers don&#8217;t think twice about. Small things like the difference between <code>0</code> vs <code>o</code> or <code>l</code> vs <code>1</code> and large things like the readability of the font is key to your productivity and strain on your eyes.</p>
<p>If you are still using the default that came with your editor, it might be worth checking out a few below and see how you like coding with each of them.</p>
<p>Since talking about text editor configuration is a huge interest of mine, This list has been compiled over the last year talking to developers at meetups and on twitter. So while the list isn&#8217;t totally complete, It&#8217;s a great reflection of what developers are using these days.</p>
<h3>Consolas</h3>
<p><img src="https://wesbos.com/wp-content/uploads/2014/07/consolas.png" alt="" /></p>
<h3><a href="http://www.fontspace.com/m-fonts/m-2m">M+2m</a></h3>
<p><img src="https://wesbos.com/wp-content/uploads/2014/07/m2+m.png" alt="" /></p>
<h3><a href="http://levien.com/type/myfonts/inconsolata.html">inconsolata</a></h3>
<p><img src="https://wesbos.com/wp-content/uploads/2014/07/incolsolata.png" alt="" /></p>
<h3>Menlo (sublime default)</h3>
<p><img src="https://wesbos.com/wp-content/uploads/2014/07/menlo.png" alt="" /></p>
<h3><a href="https://github.com/todylu/monaco.ttf">Monaco</a></h3>
<p><img src="https://wesbos.com/wp-content/uploads/2014/07/monaco.png" alt="" /></p>
<h3><a href="http://font.ubuntu.com/">Ubuntu Mono</a></h3>
<p><img src="https://wesbos.com/wp-content/uploads/2014/07/ubuntumono.png" alt="" /></p>
<h3><a href="http://store1.adobe.com/cfusion/store/html/index.cfm?event=displayFontPackage&amp;code=1960">Adobe Source Code Pro</a></h3>
<p><img src="https://wesbos.com/wp-content/uploads/2014/07/sourcecodepro.png" alt="" /></p>
<h3><a href="http://www.marksimonson.com/fonts/view/anonymous-pro">ANONYMOUS PRO</a></h3>
<p><img src="https://wesbos.com/wp-content/uploads/2014/07/anonymouspro.png" alt="" /></p>
<h3><a href="http://dejavu-fonts.org/wiki/Main_Page">Dejavu Sans Mono</a></h3>
<p><img src="https://wesbos.com/wp-content/uploads/2014/07/dejavusansmono.png" alt="" /></p>
<h3><a href="http://www.fontsquirrel.com/fonts/Envy-Code-R">Envy Code R</a></h3>
<p><img src="https://wesbos.com/wp-content/uploads/2014/07/envy.png" alt="" /></p>
<h3><a href="https://pcaro.es/p/hermit/">Hermit</a></h3>
<p><img src="https://wesbos.com/wp-content/uploads/2014/07/hermit.png" alt="" /></p>
<p>Have a favourite that isn&#8217;t listed? Comment below or <a href="http://twitter.com/wesbos">tweet at me</a> and I&#8217;ll add it to the list.</p>
<p><a href="https://sublimetextbook.com/?utm_source=fonts&#038;utm_medium=banner&#038;utm_campaign=product"><img src="https://sublimetextbook.com/images/facebook-share2.png"></a></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/programming-fonts/feed/</wfw:commentRss>
		<slash:comments>68</slash:comments>
							</item>
		<item>
		<title>Remap your Caps Lock key to be more Useful!</title>
		<link>https://wesbos.com/remap-capslock-osx/</link>
				<comments>https://wesbos.com/remap-capslock-osx/#comments</comments>
				<pubDate>Fri, 18 Jul 2014 16:30:01 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Sublime Text]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3153</guid>
				<description><![CDATA[I&#8217;m a big keyboard shortcut user. After a while you may find that you are running out of easy keyboard shortcuts. One little trick that many developers do is to remap their capslock key to something a little more useful. &#8230; <a href="https://wesbos.com/remap-capslock-osx/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>I&#8217;m a big keyboard shortcut user. After a while you may find that you are running out of easy keyboard shortcuts.</p>
<p>One little trick that many developers do is to remap their capslock key to something a little more useful.</p>
<p>In my case, I remapped my capslock key to open up the Divvy window manager.</p>
<p>Whatever you use it for is up to you, but don&#8217;t just let a perfectly good key sit dormant! Watch the 5 min video below or follow the instructions. Happy keyboarding!</p>
<p><iframe class='youtube-player' type='text/html' width='640' height='360' src='https://www.youtube.com/embed/hkga5p8nDHM?version=3&#038;rel=1&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' allowfullscreen='true' style='border:0;'></iframe></p>
<h3>Disable the Capslock key</h3>
<p>First thing you&#8217;ll need to do is open <code>System Preferences</code> → <code>Keyboard</code> → Then click the <code>Modifier Keys</code> button in the lower right.</p>
<p>Set your capslock key to <strong>No Action</strong> and repeat for every keyboard you have attached in the &#8220;Select Keyboard&#8221; dropdown. If you are on a laptop with an external keyboard you&#8217;ll need to do this twice.</p>
<p><img src="https://wesbos.com/wp-content/uploads/2014/07/ss-2014-07-18-at-11.08.45-AM.png" alt="ss 2014-07-18 at 11.08.45 AM" width="668" height="598" class="aligncenter size-full wp-image-3155" srcset="https://wesbos.com/wp-content/uploads/2014/07/ss-2014-07-18-at-11.08.45-AM.png 668w, https://wesbos.com/wp-content/uploads/2014/07/ss-2014-07-18-at-11.08.45-AM-300x268.png 300w, https://wesbos.com/wp-content/uploads/2014/07/ss-2014-07-18-at-11.08.45-AM-650x581.png 650w" sizes="(max-width: 668px) 100vw, 668px" /></p>
<h3>Remap the Key</h3>
<p>Now that Caps Lock is disabled, we need to remap it to another key. When you press a key, the OS sends a KeyCode to the program letting them know what key was pressed. I made a little site to help you with this in JavaScript: <a href="http://keycode.info">http://keycode.info</a>.</p>
<p>To do this, we need to use a program called <a href="https://pqrs.org/osx/karabiner/seil.html.en" target="_blank">Seil</a> (previously PCKeyboardHack). Download, install and open it.</p>
<p>Check the first box that says <strong>&#8220;Change Caps Lock&#8221;</strong> and set the keycode to be one that you do not use and ideally a key that you do not have. A popular choice here is 80, which maps to F19. Unless you have a huge keyboard, you probably do not have an F19 key.</p>
<p>Now when you press your Caps Lock key, they system will interpret this as a press of the F19!</p>
<p>Now you get to choose which program you want to map Caps Lock to. I chose Divvy:</p>
<p><img src="https://wesbos.com/wp-content/uploads/2014/07/ss-2014-07-18-at-11.15.13-AM.png" alt="ss 2014-07-18 at 11.15.13 AM" width="380" height="335" class="aligncenter size-full wp-image-3156" srcset="https://wesbos.com/wp-content/uploads/2014/07/ss-2014-07-18-at-11.15.13-AM.png 380w, https://wesbos.com/wp-content/uploads/2014/07/ss-2014-07-18-at-11.15.13-AM-300x264.png 300w" sizes="(max-width: 380px) 100vw, 380px" /></p>
<p>It works with any program that accepts a hot key including Alfred and Slate.</p>
<p><a href="https://sublimetextbook.com/?utm_source=remapcaps&#038;utm_medium=banner&#038;utm_campaign=product"><img src="https://sublimetextbook.com/images/facebook-share2.png"></a></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/remap-capslock-osx/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
							</item>
		<item>
		<title>Painless IE Testing with Virtual Box and Modern.ie</title>
		<link>https://wesbos.com/ie-testing-virtual-box/</link>
				<comments>https://wesbos.com/ie-testing-virtual-box/#comments</comments>
				<pubDate>Mon, 14 Jul 2014 19:27:13 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML5]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3145</guid>
				<description><![CDATA[Testing on other browsers can be a pain, especially if you are on a Mac and need to test on the many versions of Internet Explorer. Microsoft gets this and has made the process extremely simple. I&#8217;ve seen a few &#8230; <a href="https://wesbos.com/ie-testing-virtual-box/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>Testing on other browsers can be a pain, especially if you are on a Mac and need to test on the many versions of Internet Explorer.</p>
<p>Microsoft gets this and has made the process extremely simple. I&#8217;ve seen a few guides on how to get up and running with virtual images of Windows, but none of them cover the entire process from start to finish.</p>
<p>So, if you are new to cross browser testing, or just have never had a chance to get your environment setup perfectly, here is a short 11 minute video on how to do just that.</p>
<p><iframe class='youtube-player' type='text/html' width='640' height='360' src='https://www.youtube.com/embed/NIauwnXqQr8?version=3&#038;rel=1&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' allowfullscreen='true' style='border:0;'></iframe></p>
<p>Links mentioned in this video:</p>
<p><a href="https://modern.ie/en-us/virtualization-tools">https://modern.ie/en-us/virtualization-tools</a></p>
<p><a href="https://www.virtualbox.org/wiki/Downloads">https://www.virtualbox.org/wiki/Downloads</a></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/ie-testing-virtual-box/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
							</item>
		<item>
		<title>Enable Keyboard Tabbing to OSX dialog boxes</title>
		<link>https://wesbos.com/osx-dialog-boxes-keyboard-tab/</link>
				<comments>https://wesbos.com/osx-dialog-boxes-keyboard-tab/#comments</comments>
				<pubDate>Mon, 07 Jul 2014 16:18:14 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Sublime Text]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3128</guid>
				<description><![CDATA[Quick 1 minute tip for enabling keyboard tabbing on OSX. Never use that mouse to click &#8220;Dont&#8217; Save&#8221; again. To enable, Open System Preferences &#62;&#62; Keyboard &#62;&#62; Shortcuts tab and then click the All Controls radio button at the bottom.]]></description>
								<content:encoded><![CDATA[<p style="text-align:center"><img class="aligncenter size-full wp-image-3130" src="https://wesbos.com/wp-content/uploads/2014/07/osx-dialog-boxes-gif.gif" alt="osx-dialog-boxes-gif" width="452" height="154" /></p>
<p>Quick 1 minute tip for enabling keyboard tabbing on OSX. Never use that mouse to click &#8220;Dont&#8217; Save&#8221; again.</p>
<p>To enable, Open <code>System Preferences</code> &gt;&gt; <code>Keyboard</code> &gt;&gt; <code>Shortcuts tab</code> and then click the <code>All Controls</code> radio button at the bottom.</p>
<p><img class="aligncenter size-full wp-image-3132" src="https://wesbos.com/wp-content/uploads/2014/07/ss-2014-07-07-at-12.15.32-PM.png" alt="ss 2014-07-07 at 12.15.32 PM" width="616" height="125" srcset="https://wesbos.com/wp-content/uploads/2014/07/ss-2014-07-07-at-12.15.32-PM.png 616w, https://wesbos.com/wp-content/uploads/2014/07/ss-2014-07-07-at-12.15.32-PM-300x60.png 300w" sizes="(max-width: 616px) 100vw, 616px" /></p>
<p><iframe class='youtube-player' type='text/html' width='640' height='360' src='https://www.youtube.com/embed/OJls6ERjUUU?version=3&#038;rel=1&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;hd=1&#038;wmode=transparent' allowfullscreen='true' style='border:0;'></iframe></p>
<p><a href="https://sublimetextbook.com/?utm_source=osxtabbing&#038;utm_medium=banner&#038;utm_campaign=product"><img src="https://sublimetextbook.com/images/facebook-share2.png"></a></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/osx-dialog-boxes-keyboard-tab/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
							</item>
		<item>
		<title>Value Bumping in Sublime Text with Emmet ↑ ↓</title>
		<link>https://wesbos.com/increment-values-sublime-text-emmet/</link>
				<comments>https://wesbos.com/increment-values-sublime-text-emmet/#comments</comments>
				<pubDate>Sat, 05 Jul 2014 06:01:39 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Sublime Text]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=3120</guid>
				<description><![CDATA[One of my favourite things about Sublime Text is the Emmet package. Most people know it for the code completions, but it also has a handful of helpful utilities. One of those is the ability to increment / decrement values &#8230; <a href="https://wesbos.com/increment-values-sublime-text-emmet/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>One of my favourite things about Sublime Text is the Emmet package. Most people know it for the code completions, but it also has a handful of helpful utilities.</p>
<p>One of those is the ability to increment / decrement values in CSS by 0.1, 1, and 10 &#8211; just like you probably already do in dev tools.</p>
<p><img src="https://wesbos.com/wp-content/uploads/2014/07/incementdecrement.gif" alt="incement:decrement" class="aligncenter size-medium wp-image-3121" /></p>
<p>Take 1 minute to watch this video on how to use it, save yourself many minutes in the future!</p>
<p><iframe class='youtube-player' type='text/html' width='640' height='360' src='https://www.youtube.com/embed/3X5gkXAe9nY?version=3&#038;rel=1&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' allowfullscreen='true' style='border:0;'></iframe></p>
<p>That&#8217;s it! Next time Git requires you to edit a file or commit message, Sublime Text will pop open!</p>
<p><a href="https://sublimetextbook.com/?utm_source=valuebumping&#038;utm_medium=banner&#038;utm_campaign=product"><img src="https://sublimetextbook.com/images/facebook-share2.png"></a></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/increment-values-sublime-text-emmet/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
							</item>
		<item>
		<title>Using Animate.css and jQuery for easy Web Animation</title>
		<link>https://wesbos.com/animate-css-and-jquery/</link>
				<comments>https://wesbos.com/animate-css-and-jquery/#comments</comments>
				<pubDate>Thu, 05 Jun 2014 22:10:48 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=2833</guid>
				<description><![CDATA[Animate.css &#160;is a fantastic little library of Animations that takes the&#160;messy keyframing out of web animations. While they can definitely be abused, short and subtle animations are a great way of adding&#160;feedback and interaction to your website or web app. &#8230; <a href="https://wesbos.com/animate-css-and-jquery/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p><a href="http://daneden.github.io/animate.css/" target="_blank">Animate.css </a>&nbsp;is a fantastic little library of Animations that takes the&nbsp;messy keyframing out of web animations. While they can definitely be abused, short and subtle animations are a great way of adding&nbsp;feedback and interaction to your website or web app.</p>
<p>While you can get&nbsp;away with just using the CSS classes, you will most likely want to apply these animations on command with JavaScript. This short tutorial will show you how to get setup with animate.css, use it properly&nbsp;with jQuery and listen for the <code>animationend</code> event to take the classes off.</p>
<p>Hope you enjoy, please leave any questions or comments below!</p>
<p><iframe class='youtube-player' type='text/html' width='640' height='360' src='https://www.youtube.com/embed/CBQGl6zokMs?version=3&#038;rel=1&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' allowfullscreen='true' style='border:0;'></iframe></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/animate-css-and-jquery/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
							</item>
		<item>
		<title>Fixing toggle comment on script tags  in Sublime Text</title>
		<link>https://wesbos.com/fix-sublime-text-toggle-comment/</link>
				<comments>https://wesbos.com/fix-sublime-text-toggle-comment/#comments</comments>
				<pubDate>Sun, 01 Jun 2014 19:26:18 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Sublime Text]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=2794</guid>
				<description><![CDATA[Toggling comments in Sublime Text is broken and it&#8217;s time you fix it. If you work with HTML/JavaScript you have probably run into this while using the ⌘ + / comment toggle. Sublime Text thinks it is JavaScript, so it &#8230; <a href="https://wesbos.com/fix-sublime-text-toggle-comment/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>Toggling comments in Sublime Text is broken and it&#8217;s time you fix it. If you work with HTML/JavaScript you have probably run into this while using the ⌘ + / comment toggle.</p>
<p><img src="https://wesbos.com/wp-content/uploads/2014/06/broken-toggle.gif" alt="broken-toggle" class="aligncenter size-medium wp-image-2797" ></p>
<p>Sublime Text thinks it is JavaScript, so it uses a JavaScript comment! The problem is that the script tag is acutally HTML, so we need to use an HTML comment to comment it out. We want something like this:</p>
<p><code>&lt;!-- &lt;script src="jquery.js"&gt;&lt;/script&gt; --&gt;</code></p>
<p>The underlying problem is inside the HTML syntax file and it is actually an easy fix.</p>
<p>We need to edit the <code>HTML.tmLanguage</code> file that is located in <code>preferences</code> →  <code>browse packages</code> → <code>HTML</code>.</p>
<p>Open it up and look for a line that looks like the following. It should be around line 286.</p>
<p><code>&lt;string&gt;(?:^\s+)?(&amp;lt;)((?i:script))\b(?![^&amp;gt;]*/&amp;gt;)&lt;/string&gt;</code></p>
<p>Replace it with this:</p>
<p><code>&lt;string&gt;(?:^\s+)?(&amp;lt;)((?i:script))\b(?![^&amp;gt;]*/&amp;gt;)(?!.*&amp;lt;/script&amp;gt;)&lt;/string&gt;</code></p>
<p>Save. You should now be able to properly toggle comment out script tags in Sublime Text!</p>
<p><a href="https://sublimetextbook.com/?utm_source=scripttoggle&#038;utm_medium=banner&#038;utm_campaign=product"><img src="https://sublimetextbook.com/images/facebook-share2.png"></a></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/fix-sublime-text-toggle-comment/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
							</item>
		<item>
		<title>Sublime Text subl command line access on windows</title>
		<link>https://wesbos.com/subl-on-windows/</link>
				<comments>https://wesbos.com/subl-on-windows/#comments</comments>
				<pubDate>Sun, 01 Jun 2014 18:36:55 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Sublime Text]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=2790</guid>
				<description><![CDATA[If you are a terminal or command line power user, you often want to open in from Sublime Text right from the cmd line. Often something like this: subl style.css On OSX and Linux, we have the subl command that &#8230; <a href="https://wesbos.com/subl-on-windows/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>If you are a terminal or command line power user, you often want to open in from Sublime Text right from the cmd line. Often something like this:</p>
<p><code>subl style.css</code></p>
<p>On OSX and Linux, we have the subl command that comes with Sublime Text, to install it you can follow the <a href="https://www.sublimetext.com/docs/2/osx_command_line.html" target="_blank">instructions here</a>.</p>
<p>However, on windows we need to do it a little different by creating something called a doskey.</p>
<p>So, if you wish to use the <code>subl</code> command to open files and folders from the command line in windows, you can use the following:</p>
<p><code>doskey subl="C:\Program Files\Sublime Text 2\sublime_text.exe" $*</code></p>
<p>Paste the above into your command line prompt and this will make the <code>subl</code> command available to you.</p>
<p>If you are using Sublime Text 3, use the following instead:</p>
<p><code>doskey subl="C:\Program Files\Sublime Text\sublime_text.exe" $*</code></p>
<p><a href="https://sublimetextbook.com/?utm_source=windowssubl&#038;utm_medium=banner&#038;utm_campaign=product"><img src="https://sublimetextbook.com/images/facebook-share2.png"></a></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/subl-on-windows/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
							</item>
		<item>
		<title>Migrate WordPress like a Pro</title>
		<link>https://wesbos.com/migrate-wordpress/</link>
				<comments>https://wesbos.com/migrate-wordpress/#comments</comments>
				<pubDate>Fri, 30 May 2014 16:25:08 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=2764</guid>
				<description><![CDATA[When it comes time to migrate wordpress, it isn&#8217;t all that easy. You have a number of things to move over including your database, your images, your themes and your plugins. I&#8217;ve been teaching WordPress for years and by far &#8230; <a href="https://wesbos.com/migrate-wordpress/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>When it comes time to migrate wordpress, it isn&#8217;t all that easy. You have a number of things to move over including your database, your images, your themes and your plugins.</p>
<p>I&#8217;ve been teaching WordPress for years and by far the most common question I get is &#8220;How do I get my website online?&#8221;</p>
<p>Well, I&#8217;ve put everything I know into an in depth tutorial on how to migrate your site. This might take a little while the first time, but as you do it a few times, this becoming a pretty quick process.</p>
<p>I recommend using BlueHost for hosting WordPress as it is very affordable, the support is amazing, and they are professionals at hosting WordPress. Here is my link for a discounted rate: <a href="http://wesbos.com/bluehost">http://wesbos.com/bluehost</a> &#8211; if you sign up from this link you&#8217;ll get a discounted rate and I&#8217;ll get a small affiliate fee.</p>
<p><iframe class='youtube-player' type='text/html' width='640' height='360' src='https://www.youtube.com/embed/gk6_lW9INos?version=3&#038;rel=1&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' allowfullscreen='true' style='border:0;'></iframe></p>
<p>Hope you enjoy!</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/migrate-wordpress/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
							</item>
		<item>
		<title>Introducing KeyCode.info &#8211; Easy JavaScript Event Keycodes</title>
		<link>https://wesbos.com/javascript-event-keycodes/</link>
				<comments>https://wesbos.com/javascript-event-keycodes/#respond</comments>
				<pubDate>Thu, 29 May 2014 14:11:53 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=2748</guid>
				<description><![CDATA[In JavaScript or jQuery you often need to find out which key was pressed. Unfortunately, we don&#8217;t have it as easy as comparing it against a string like &#8220;esc&#8221; or &#8220;space bar&#8221;. Each key on the keyboard is associated with &#8230; <a href="https://wesbos.com/javascript-event-keycodes/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>In JavaScript or jQuery you often need to find out which key was pressed. Unfortunately, we don&#8217;t have it as easy as comparing it against a string like &#8220;esc&#8221; or &#8220;space bar&#8221;.<br />
Each key on the keyboard is associated with a number, or what we call a keyCode and it is accessed on the event object.</p>
<p>When I do keycode listening, I always scrounge the net for the appropriate keycode to check for. No more! I&#8217;ve made <a href="http://keycode.info" title="JavaScript Event KeyCodes" target="_blank">keycode.info</a> which does one thing well: tells you the asociated keycode and key when you tap any key on your keyboard.</p>
<p>Simple and easy. Hope you find it useful. <a href="http://keycode.info" target="_blank">Head on over</a> or make it better on <a href="https://github.com/wesbos/keycodes" target="_blank">github</a>.</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/javascript-event-keycodes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
		<item>
		<title>HST and Selling Digital Goods Online</title>
		<link>https://wesbos.com/hst-and-online-digital-products/</link>
				<comments>https://wesbos.com/hst-and-online-digital-products/#comments</comments>
				<pubDate>Tue, 27 May 2014 20:09:07 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[The Business of Web Dev]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=2741</guid>
				<description><![CDATA[I&#8217;m preparing to sell my e-book on Sublime Text very soon. Part of that is building the online checkout module. I was hoping to just use a simple solution where I only needed to ask buyers for a credit card &#8230; <a href="https://wesbos.com/hst-and-online-digital-products/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>I&#8217;m preparing to sell my e-book on Sublime Text very soon. Part of that is building the online checkout module.</p>
<p>I was hoping to just use a simple solution where I only needed to ask buyers for a credit card and their email address. Since it&#8217;s an online download / virutal product, I didn&#8217;t think I needed to collect addresses from users.</p>
<p>So, as I&#8217;m setting this up, I was wondering about HST. With regular goods and services, you charge Canadians the destination HST/GST rate. I bill Ontario customers 13% HST, Alberta Customers 5% GST and out-of-country customers 0%. But how does this work when you are selling something online and planning not to collect addresses? Whoever buys the e-book might be from Ontario, they might be from somewhere else in Canada or they might be from outside the country.</p>
<p>So, I called up the CRA and asked them what to do in this situation. Lucky for me I was able to get a tech-savvy person on the other end that was extremely competent in his job. Because the good will be usable in Canada (Canadian can read the book), I will need to follow regular HST charging practices. So, I would need to collect the home address of every single person who buys my book. Arg.</p>
<p>So my next question was:</p>
<h3>Can I just ask them if they live in Canada or not?</h3>
<p>No. Asking someone isn&#8217;t enough proof of where they live. It won&#8217;t hold up in an audit.</p>
<p>Well, then..</p>
<h3>Can I use IP address detection to see if they live in Canada or not?</h3>
<p>No, because users can spoof an IP. Still not good enough&#8230;</p>
<h3>So what are my other options if I don&#8217;t want to collect addresses?</h3>
<p>If I really don&#8217;t want to collect billing information from everyone who buys the book, I would have to charge <em>Canada&#8217;s highest possible tax rate</em> to every single customer, regardless of if they live in Canada or not. This is the 15% tax rate of Nova Scotia.</p>
<h3>Better safe than sorry</h3>
<p>So, it looks like I&#8217;ll have to collect the addresses and charge the customer&#8217;s provinces HST/GST rate. Out of country customers will pay nothing in taxes.</p>
<p>Not the solution I wanted to hear, but I&#8217;m glad to find this out now rather than down the road.</p>
<p>Hope this answers a few questions!</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/hst-and-online-digital-products/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
							</item>
		<item>
		<title>Associate Sublime Text with Git</title>
		<link>https://wesbos.com/git-messages-sublime-text/</link>
				<comments>https://wesbos.com/git-messages-sublime-text/#comments</comments>
				<pubDate>Mon, 12 May 2014 16:09:48 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Sublime Text]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=2722</guid>
				<description><![CDATA[By default, git uses Vim as the editor for commit/rebase messages. This can be somewhat limiting if you aren&#8217;t comfortable with using Vim, especially if you need to move around lines of code. Luckily it&#8217;s easy to switch over to &#8230; <a href="https://wesbos.com/git-messages-sublime-text/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>By default, git uses Vim as the editor for commit/rebase messages. This can be somewhat limiting if you aren&#8217;t comfortable with using Vim, especially if you need to move around lines of code.</p>
<p>Luckily it&#8217;s easy to switch over to using Sublime Text as the editor for your messages. When git needs you to input and save a message. It will simply open up Sublime Text and prompt you with the file that needs editing. Once you save and close the file, git will continue on with what it needs to do.</p>
<h3>Install subl</h3>
<p>First thing we need to do is to make Sublime accessible via the command line. Chances are you might already have this installed, but if you haven&#8217;t, you can follow the <a href="http://www.sublimetext.com/docs/3/osx_command_line.html" target="_blank">instructions here</a>. If you are still on Sublime Text 2 &#8211; follow <a href="http://www.sublimetext.com/docs/2/osx_command_line.html" target="_blank">these instead</a>.</p>
<h3>Set git to use</h3>
<p>Next, open up your Terminal or command line and paste the following:</p>
<pre><code>git config --global core.editor "subl -n -w"
</code></pre>
<p>That&#8217;s it! Next time Git requires you to edit a file or commit message, Sublime Text will pop open!</p>
<p><a href="https://sublimetextbook.com/?utm_source=stgit&#038;utm_medium=banner&#038;utm_campaign=product"><img src="https://sublimetextbook.com/images/facebook-share2.png"></a></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/git-messages-sublime-text/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
							</item>
		<item>
		<title>View CSS Colours in Sublime Text with GutterColor</title>
		<link>https://wesbos.com/css-gutter-color-sublime-text/</link>
				<comments>https://wesbos.com/css-gutter-color-sublime-text/#comments</comments>
				<pubDate>Sun, 16 Mar 2014 17:14:57 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Sublime Text]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=1447</guid>
				<description><![CDATA[At my jQueryTO talk I showed a new Sublime Text Package called GutterColor that allows you to view your CSS colours in your gutter. Amazing! It works with plain CSS, SASS, Stylus or LESS. If you are any sort of &#8230; <a href="https://wesbos.com/css-gutter-color-sublime-text/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>At my <a href="https://wesbos.github.io/Sublime-Text-Power-User-Talk">jQueryTO talk</a> I showed a new Sublime Text Package called GutterColor that allows you to view your CSS colours in your gutter.</p>
<p><img src="http://wesbos.github.io/Sublime-Text-Power-User-Talk/images/gutter-colour.gif" alt="" /></p>
<p>Amazing! It works with plain CSS, SASS, Stylus or LESS. If you are any sort of front end developer, you probably want this right away! Unfortunately the install process is a little klunky as it relies on a lower-level program called ImageMagick to be installed on your computer. It&#8217;s easy to do, just requires a handful of steps to get up and running.</p>
<p><strong>TL;DR</strong>: brew or port install ImageMagick and set the path of your convert script in your GutterColor prefs.</p>
<h2>Installing ImageMagick on OSX</h2>
<p>So, we need ImageMagic to be installed on our computer. The easiest way to do this is with a package manager for your mac. If you already have homebrew or macports installed, you can simply type one of the following into your terminal:</p>
<p>brew install imagemagick</p>
<p>or</p>
<p>sudo port install ImageMagick</p>
<p>No idea what brew or macports is? You&#8217;ll need to install that first before you can install ImageMagick. I recommend using <a href="http://brew.sh/">HomeBrew</a>. Simply open your terminal window (found in applications → Utilities → Terminal) and paste the following code in and hit enter:</p>
<p>ruby -e &#8220;$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)&#8221;</p>
<p>That will ask you for your computer&#8217;s password and then take a few minutes to install homebrew.</p>
<p>Once that is complete, copy and paste this into your terminal as well:</p>
<p>brew install imagemagick</p>
<p>This will also take a few minutes to install, grab a coffee!</p>
<p>Finally, type the following into your terminal</p>
<p>which convert</p>
<p>This will return the location of your imagemagick <code>convert</code> script. Remember this. Skip the windows part and jump down to <strong>Setting up Sublime Text</strong></p>
<p><img src="http://wes.io/URX1/content" alt="" /></p>
<h2>Installing on Windows</h2>
<p>Head on over to the <a href="http://www.imagemagick.org/script/binary-releases.php#windows">ImageMagick website</a> and download/install the option that works with your computer. If you download the wrong version, no worries, just try another version.</p>
<p>When installing, take note on the install path. You will need it later.</p>
<p><img src="http://wes.io/USqq/content" alt="" /></p>
<p>Once you have that installed, check if it worked by opening up the command prompt (start-&gt;cmd) and type <code>convert</code>. You should see a few hundred lines scroll across your screen.</p>
<p>Now, you need to find the path that it was installed to. Open windows exporer and find where it was installed to. This is probably something like <code>c:/Program Files/ImageMagick-6.x.x.x</code> We want to find the <code>convert.exe</code> file as below:</p>
<p><img src="http://wes.io/URu9/convert" alt="" /></p>
<h3>Setting up Sublime Text</h3>
<p>First we need to go ahead and install the GutterColor package. You can do this via Package Control (Tools → Command Palette → Type install → Search for GutterColor and hit enter).</p>
<p>As of right now, this package requires you to tell SublimeText where the <code>convert</code> script lives on your computer. Go to <code>Sublime Text</code> → <code>Preferences</code> → <code>Package Settings</code> → <code>GutterColor</code> → <code>Preferences - User</code> and paste the following code in there. Make sure to swap out the path if your <code>which convert</code> command returned something different.</p>
<p>{<br />
&#8220;convert_path&#8221; : &#8220;/usr/local/bin/convert&#8221;<br />
}</p>
<p>In my experience, sublime required a few restarts before it started to work totally. If you see red squares in your gutter, it&#8217;s helpful to look in the Sublime Console (view → Show Console) to see if you can make sense of the errors.</p>
<p><a href="https://sublimetextbook.com/?utm_source=guttercolor&#038;utm_medium=banner&#038;utm_campaign=product"><img src="https://sublimetextbook.com/images/facebook-share2.png"></a></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/css-gutter-color-sublime-text/feed/</wfw:commentRss>
		<slash:comments>79</slash:comments>
							</item>
		<item>
		<title>Life as a Freelancer — Notes and Video Recording</title>
		<link>https://wesbos.com/life-as-a-freelancer/</link>
				<comments>https://wesbos.com/life-as-a-freelancer/#comments</comments>
				<pubDate>Fri, 15 Nov 2013 19:01:59 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[The Business of Web Dev]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=1026</guid>
				<description><![CDATA[Three things I love are coding, teaching and running a business. I&#8217;m fortunate enough to do all three for a living. Doing so I get a ton of questions about my lifestyle. What is it like? How do you get &#8230; <a href="https://wesbos.com/life-as-a-freelancer/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>Three things I love are coding, teaching and running a business. I&#8217;m fortunate enough to do all three for a living. Doing so I get a ton of questions about my lifestyle. What is it like? How do you get work? How much do you charge? What are the challenges? Do you wear pants during the day?</p>
<p>Learning to code is one thing, but running a successful business as a freelancer is an entirely separate skill. So, rather than reply to email after email, I decided that we would hold an informal Q&amp;A night at <a href="http://hackeryou.com/" target="_blank" rel="noopener">HackerYou</a> to answer all your questions! If this if of interest, you may want to <a href="http://hackeryou.com/courses/front-end-bootcamp/" target="_blank" rel="noopener">join us at HackerYou</a> where I teach everything from HTML, CSS, Responsive Design, JavaScript and WordPress to the real skills you need to start getting paying clients and running the business.</p>
<p>Below is a 2 hour video recording of our Q&amp;A night as well as a summary write. Big thanks to <a href="http://heatherpayne.ca/">Heather Payne</a> for taking the notes below and distilling my thoughts into short, concise paragraphs!</p>
<p><iframe class='youtube-player' type='text/html' width='640' height='360' src='https://www.youtube.com/embed/hsTs_l5N2Sk?version=3&#038;rel=1&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' allowfullscreen='true' style='border:0;'></iframe></p>
<p><span id="more-1026"></span></p>
<h3>How do you work out a competitive price for a bid without selling yourself for too little or pricing yourself out of a job?</h3>
<p>When you’re a freelancer, you almost always have to submit a quote. It includes the scope of the project (what you’re going to do as well as what you’re not going to do), as well as a price.</p>
<p>People often think that the client is going to select your quote based only on the number. Often, this causes freelancers to price too low. However, it’s not the case. Price is definitely a thing, but clients have budgets and have money to spend. You can charge more, but you have to make people comfortable with spending the money on you.</p>
<p>When people receive quotes, they want to be sold. Yes, they want to see examples and yes they want to see a price. But they also want to feel comfortable with the provider they’ve chosen. Rather than just sending an email, send a nice-looking PDF. Avoid jargon &#8211; know your audience. The client might not know what a responsive website is, but they will understand that their website is going to look great on their iPhone.</p>
<p>Rather than focusing on the money, focus on the presentation and really selling the client on selecting you.</p>
<h3>Should you charge by project or per hour?</h3>
<p>Wes prefers to charge per project. He spends a lot of time building tools, learning, researching so that he can do a better job faster. If he were to charge by the hour, he would make less for being more efficient, which doesn’t seem fair. He recommends defining projects very clearly and giving a flat rate. If you’re fast, you can get the project done in less time and that’s called being a good business person.</p>
<p>In cases where the project scope isn’t well defined, Wes charges by the hour. For example, if someone emails him and says that their site is totally messed up and they need someone to fix it, Wes will quote an hourly rate and provide a maximum amount.</p>
<p>Also, when you are hired to join a team (e.g. to work on a project with an existing team) you’ll likely charge by the hour to day.</p>
<h3>Have clients ever asked you to give them a better deal? What do you do?</h3>
<p>Wes usually doesn’t budge. Unless you really need the money and have extra capacity, it’s usually not a good idea. Often, if you’re firm on your price, the client will say okay and will go with your price.</p>
<p>Wes on the Shit Economy</p>
<p>Shit clients get shit developers and they all work in a terrible economy where no one gets paid enough and the work suffers. If you work hard at your skills, you’ll be delivering great quality and clients that are willing to pay are usually much better clients.</p>
<h3>How do you pick up your leads?</h3>
<p>When people start freelancing, they go to Craigslist or eLance or 99Designs. Wes calls this a “bid to the bottom”. Usually, the client is looking for the lowest quote. It’s no way to make a living, so Wes recommends staying away from these sites.</p>
<p>As a rule of thumb, anytime someone posts a freelance job, it’s not going to be worth it. There are going to be too many bids and too many low bids.</p>
<p>Back in the day, Wes got started by going to Tweetups and was able to meet everyone in the tech scene very quickly. But even today, going to tech events or agency events is a great way to get started. Meeting agency folks can be super useful because they don’t usually touch projects less than $10-$20K and often look to pass those smaller projects off to freelancers.</p>
<p>Wes also recommends being visible. Stopping by events, volunteering at Ladies Learning Code events, etc. Take opportunities to talk to people and showcase yourself as an expert. Wes recommends blogging. He doesn’t blog super often, but he has a few really good posts about coding on his blog. Also, when new features come out, he’ll experiment with them and blog about it. He put four hours into two blog posts and each of those posts have gotten him $10-20K worth of work, even implementing exactly what he had blogged about. Blog about things that you’d be happy to implement for clients.</p>
<p>Finally, reach out to people &#8211; everyone &#8211; by email and let them know that you’ve started a business. You never know who might need something later down the line.</p>
<p>Facebook is also a great tool for telling people you know about what you’re doing now. For example, when Wes posts about teaching HTML &amp; CSS, people see it and tell their friends about it.</p>
<p>Wes gets a lot of clients via referrals.</p>
<p>Become known as the expert. Every time someone comes up to you and says, “Oh, I didn’t know you make websites!” that’s a huge failure on your part. Make sure everyone knows what you do. Plant that seed .</p>
<h3>Should you work for free?</h3>
<p>Do it for a reason, and only when it will be awesome advertising for you. Free work is not always beneficial.</p>
<p>It is in some ways better to say no to doing free work and just have that time to build up your skills, rather than doing work for free if it’s not going to help you.</p>
<h3>How do you organize your workflows so that work doesn’t take over your whole life?</h3>
<p>Being a freelancer is tough because it can take over your whole life. You might work from home, which makes it even harder to separate work and life. As a freelancer, you need to have discipline. You need to get up and start your day at a reasonable time, and also cut yourself off at the end of the day and continue on with your life. Otherwise, it can be too stressful.</p>
<p>Wes recommends getting dressed and sitting down at a desk. If you can, have an office with a door on it, where you only go if you’re working. When Wes’s wife first started working from home she started doing laundry during the day and Wes was like, “no!”</p>
<p>There is flexibility, of course, but you should use it with caution.</p>
<p>Wes has an iPhone and has a thing called “notification mode” that he turns on at 10 pm which stops beeps from coming through.</p>
<h3>What about holidays?</h3>
<p>Wes and his wife have a general policy that they work on holidays, because clients generally are not working. Then, he displaces that holiday later on and takes another day off, such as the Monday after a holiday. Usually clients are too busy on that first Monday back after a holiday anyway that they won’t be emailing you.</p>
<p>As for vacations &#8211; if you’re a web developer, things can happen. Sites can crash, stores can go down. Wes just makes sure that he always has his laptop and can deal with things as needed. Other freelancers, such as graphic designers, may not have the same thing (since their work can’t go down).</p>
<h3>What are the biggest challenges you face as a freelancer?</h3>
<p>The biggest challenge is email. As a freelancer, you’re probably dealing with a few clients at a time, and you may have clients who email a lot. Wes has to spend a good part of his day coding. When Wes wakes up, he puts his phone on his bed so he doesn’t hear the phone or hear any vibrations. He’ll come back to it after a few hours, deal with emails for a bit, and then get back into coding in the afternoon.</p>
<p>Wes has also “trained” his clients to not spew email and collect their thoughts before reaching out. He did this by taking the four emails a client sent by 4 pm and copying and pasting them into one email and replying to everything at once. Eventually, clients get it.</p>
<p>The other hard part is finding time to run the business. Managing finances, doing the books, going to the bank, etc. On the last Friday of every month, Wes inputs all of his receipts, cuts himself a paycheque, etc.</p>
<h3>Do you have an accountant?</h3>
<p>Invoicing, billing and logging expenses are things that Wes does himself. He uses FreshBooks for that. Wes also mentioned that Wave Accounting is a great tool for small businesses that have employees.</p>
<p>Wes has an accountant for taxes. He has a good relationship with him and calls him up when he has questions. Having an accountant can help with business planning as well.</p>
<h3>How do you find an accountant and how much do they cost?</h3>
<p>Get referrals. Most of your clients will be through referrals, so you should use referrals to find your service providers.</p>
<p>When you run a business, you have to have both a personal and a company tax return done. It was about $700 for Wes last year.</p>
<p>Don’t got to H&amp;R block &#8211; get personalized service.</p>
<h3>Are you operating as a corporation or a sole proprietorship?</h3>
<p>When Wes first started, he ran a sole proprietorship. Any dollar earned by you as a sole proprietorship is considered by the government to be like personal income.</p>
<p>Now, Wes and his wife Kait are 50/50 shareholders in a corporation. When you’re a corporation, reporting and accounting is more complicated. You also have options as to how you pay yourself. For example, each person can withdraw $30K in dividends at the corporate tax rate. Beyond that $30K, you have to be taxed like an employee (which means a higher tax rate).</p>
<h3>What tools do you use to increase your productivity?</h3>
<p>Wes is always looking for ways to run his business better and develop more effectively. Here are some of Wes’s favourite tools:</p>
<p>FreshBooks &#8211; <a href="https://bostype.freshbooks.com/refer/www">http://freshbooks.com</a><br />
Things (a to-do app) &#8211;<a href="http://culturedcode.com/things/">http://culturedcode.com/things/</a><br />
Trello &#8211; <a href="http://trello.com">http://trello.com</a><br />
Backing up your data &#8211; use <a href="http://dropbox.com">DropBox</a>  and Wes uses BackBlaze &#8211;<a href="http://backblaze.com/partner/af5320" target="_blank" rel="noopener"> http://www.backblaze.com/</a><br />
Alfred &#8211; <a href="http://www.alfredapp.com/" target="_blank" rel="noopener">http://www.alfredapp.com/</a><br />
Skype with a nice headset (Wes uses a Microsoft LX3000) or get a good long-distance plan</p>
<p>Anytime you find yourself doing something that doesn’t feel efficient, find a better way. Because the more efficient you are, the more money you make, the more time you have off, the better everything is.</p>
<p>A note about Trello and project management &#8211; once you’re working on a larger project with multiple people, email can become too much. Wes recommends a project management application at this point.</p>
<h3>What about legal?</h3>
<p>Wes has never spoken to a lawyer. He suggests getting a contract and using very clear quotes &#8211; it should be night and day as to what’s included and what not included.</p>
<h3>Do you need startup capital to get started freelancing?</h3>
<p>No, nothing really. Register your business for $60, get a laptop and a pair of pants. You are off to the races.</p>
<h3>How can you ensure you get paid by your clients?</h3>
<p>Make the payment terms very clear up front. Wes says 50% is required up front. At that point, the client is invested. The second 50% is due before launch &#8211; so, it will be on a staging server and he wants to be paid before it goes live or before they receive the files.</p>
<p>Big companies can be slow. In those cases, pick up the phone and call. Often, email won’t work but a phone call can.</p>
<p>Sometimes you have to be a little aggressive to make sure you get paid. You probably will be ripped off a few times and when they happens, you have to look at it as a lesson and move on.</p>
<h3>How do you deal with hosting, domain names, etc.?</h3>
<p>Wes requires that the client buys their domain and hosting themselves. This is because if the website ever goes down, if their email goes down, etc. they’re going to call you and it’s going to be horrible. This also means that their website is very portable &#8211; they can work with another developer anytime.</p>
<h3>What do you do when things break?</h3>
<p>If something breaks because of something Wes has done, he’ll fix it for free. If anything else breaks, he’ll charge his hourly rate.</p>
<h3>Do you charge for maintaining client websites?</h3>
<p>Yes, he usually charges, but sometimes Wes will make small changes or fixes for free.</p>
<h3>Do you have health insurance?</h3>
<p>Yes, Wes has health insurance. Before Kait quit her job, Wes was on her insurance. When she quit, Wes and Kait both got insurance. It’s $160 per month for the two of them and it’s one of the higher packages. That plus life insurance, same occupation disability insurance and critical illness insurance is about $1200 a year for Wes.</p>
<p>Same occupation disability means that you’ll get paid if you can no longer do your same occupation (even if you can do other jobs).</p>
<h3>What do you do if a client site gets hacked?</h3>
<p>There are a few options here. Sometimes a client will have their own team for maintenance. You may want to put together a maintenance package, or decide that you’ll maintain the site for a year and then after that you’ll charge them. Just think about it and put it in your quote.</p>
<p>With tools like WordPress and Squarespace being so available to business owners, where do you see freelance development headed?</p>
<p>You need to specialize. Don’t be the person who can do everything, ever. Wes decided a while ago to focus on WordPress, and then a few years later he decided to focus on JavaScript.</p>
<h3>Do you work with any international clients?</h3>
<p>Yes! When you work with international clients, you can charge them in their native dollar and then convert it back to Canadian. You get a $46 premium on a $1000 project right now. <img src="https://s.w.org/images/core/emoji/12.0.0-1/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>Note that you don’t have to charge tax to American clients (or clients from other countries). In Canada, you charge a client’s native tax rate (e.g. for clients in Alberta, you charge 5%).</p>
<h3>When you’re a great freelancer, you must get lots of job offers. How do you vet them?</h3>
<p>You have to decide if you have what it takes to freelance. If you don’t, or if you don’t like it, you might decide to take one of those job offers. But for Wes, he makes a lot of money and has fun freelancing, so it would be hard to lure him away.</p>
<p>He blogged about his experience interviewing with Google and got lots of awesome gig leads and also 30 job offers. Just an example of how blogging can lead to major benefits.</p>
<h3>Do you work from the client’s office?</h3>
<p>Rarely. Some people do, Wes doesn’t like it. Sometimes he’ll go and meet the client, especially if they have a development team. Wes prefers to work from home, alone.</p>
<h3>Do you have any partnerships?</h3>
<p>Every now and then Wes will work with someone else, such as graphic designers. Be clear about the reporting and payment structure. Who talks to who? Who pays the bill at the end of the day?</p>
<h3>What are ways to increase your income potential other than client work?</h3>
<p>Wes teaches! He’s also writing a book on Sublime Text, his preferred text editor. He has a sign up on his website for people who want to hear from him when the book launches. He has 2300 people signed up at the moment, and he’s going to sell the book for $40.</p>
<h3>What is the social life for a freelancer?</h3>
<p>Wes works beside his wife &#8211; they’re beside each other 80-90% of the time. But Wes also has IRC open all the time. He uses that as his social interaction on a daily basis. If you need more than that, you can consider a co-working space for a couple hundred bucks a month.</p>
<h3>How much should you charge per hour?</h3>
<p>A beginner web developer or beginner graphic designer should be charging $50-$60 per hour. Even if this seems like a lot, keep in mind that not all of your time is billable. And you also have costs &#8211; internet, rent, hosting, online tools. On a good day, Wes will get 4-8 hours billable.</p>
<h3>How do you say no?</h3>
<p>Sometimes a project will not be worth your time, or not be appealing, or not be a fit for you. You can either tell them that you don’t have the time right now, or that you’re not interested, or that it’s not up your alley. People appreciate when you’re direct. If you really don’t have the skills, don’t say no, though. You’ll learn fastest when a project is a reach and you have a deadline.</p>
<h3>Do you ever pitch potential clients?</h3>
<p>When Wes got started, he made a list of 150 potential clients and approached people about doing their sites and got really busy, really quickly. So yes, it’s a good strategy.</p>
<p>When approaching clients, don’t let them tell you what they want. Ask them what they need, who their clients are, what the experience should be like, and then put together a story of how you’re going to give them something that is customized for them.</p>
<p>Wes doesn’t have a lot of experience cold calling clients anymore, but thinks it’s an opportunity.</p>
<h3>Do you ever sell things like analytics?</h3>
<p>Yes, think of extras that you can sell your clients. A few years ago, making sites responsive was a great way of doing this. Today, maybe it’s analytics. This is a great way of adding an extra 20-30% to your bill.</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/life-as-a-freelancer/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
							</item>
		<item>
		<title>CSS Flexbox Video Series: widths, heights and Layout — Learn CSS3 Flexbox — 3/6</title>
		<link>https://wesbos.com/flexbox-widths-heights-and-layout-css/</link>
				<comments>https://wesbos.com/flexbox-widths-heights-and-layout-css/#comments</comments>
				<pubDate>Thu, 14 Nov 2013 18:51:23 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Video Series]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=1013</guid>
				<description><![CDATA[Third video looking at how we can use width and height with flexbox to create layouts. Series Links: Introduction &#038; Basics — Part 1 CSS Flexbox Video Series: Flexbox order, re-ordering columns and rows — Part 2 CSS Flexbox Video &#8230; <a href="https://wesbos.com/flexbox-widths-heights-and-layout-css/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>Third video looking at how we can use width and height with flexbox to create layouts.</p>
<p><iframe class='youtube-player' type='text/html' width='640' height='360' src='https://www.youtube.com/embed/KCZdKnP5PHo?version=3&#038;rel=1&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' allowfullscreen='true' style='border:0;'></iframe></p>
<h3>Series Links:</h3>
<p><a href="http://wesbos.com/flexbox-basics/">Introduction &#038; Basics — Part 1</a><br />
<a href="http://wesbos.com/css-flexbox-order-reordering-columns/">CSS Flexbox Video Series: Flexbox order, re-ordering columns and rows — Part 2</a><br />
<a href="http://wesbos.com/flexbox-widths-heights-and-layout-css/">CSS Flexbox Video Series: widths, heights and Layout — Learn CSS3 Flexbox — Part 3</a></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/flexbox-widths-heights-and-layout-css/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
							</item>
		<item>
		<title>CSS Flexbox Video Series: Flexbox order, re-ordering columns and rows — 2/6</title>
		<link>https://wesbos.com/css-flexbox-order-reordering-columns/</link>
				<comments>https://wesbos.com/css-flexbox-order-reordering-columns/#respond</comments>
				<pubDate>Thu, 14 Nov 2013 18:23:57 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Video Series]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=1009</guid>
				<description><![CDATA[The second instalment of the CSS3 FlexBox video series. This video will show you how to use order, re-ordering and columns to achieve an extremely flexible layout without re-ordering any of your HTML. Series Links: Introduction &#038; Basics — Part &#8230; <a href="https://wesbos.com/css-flexbox-order-reordering-columns/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>The second instalment of the CSS3 FlexBox video series. This video will show you how to use order, re-ordering and columns to achieve an extremely flexible layout without re-ordering any of your HTML.</p>
<p><iframe class='youtube-player' type='text/html' width='640' height='360' src='https://www.youtube.com/embed/0i7Xb22zzQM?version=3&#038;rel=1&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' allowfullscreen='true' style='border:0;'></iframe></p>
<h3>Series Links:</h3>
<p><a href="http://wesbos.com/flexbox-basics/">Introduction &#038; Basics — Part 1</a><br />
<a href="http://wesbos.com/css-flexbox-order-reordering-columns/">CSS Flexbox Video Series: Flexbox order, re-ordering columns and rows — Part 2</a><br />
<a href="http://wesbos.com/flexbox-widths-heights-and-layout-css/">CSS Flexbox Video Series: widths, heights and Layout — Learn CSS3 Flexbox — Part 3</a></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/css-flexbox-order-reordering-columns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
		<item>
		<title>CSS Flexbox Video Series: Introduction &#038; Basics — 1/6</title>
		<link>https://wesbos.com/flexbox-basics/</link>
				<comments>https://wesbos.com/flexbox-basics/#comments</comments>
				<pubDate>Thu, 17 Oct 2013 19:55:16 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Video Series]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=991</guid>
				<description><![CDATA[Update: While these videos are still a fantastic intro to flexbox, I&#8217;m working on a much more in depth, free video series called What The Flexbox &#8211; will be out in a few weeks! In the mean time check out &#8230; <a href="https://wesbos.com/flexbox-basics/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p><img src="https://wesbos.com/wp-content/uploads/2013/10/ss-2015-06-24-at-2.03.04-PM-300x201.png" style="margin-left:0; margin-right:0;" class="alignleft size-medium wp-image-3544" srcset="https://wesbos.com/wp-content/uploads/2013/10/ss-2015-06-24-at-2.03.04-PM-300x200.png 300w, https://wesbos.com/wp-content/uploads/2013/10/ss-2015-06-24-at-2.03.04-PM-650x435.png 650w, https://wesbos.com/wp-content/uploads/2013/10/ss-2015-06-24-at-2.03.04-PM.png 702w" sizes="(max-width: 300px) 100vw, 300px" /><strong>Update:</strong> While these videos are still a fantastic intro to flexbox, I&#8217;m working on a much more in depth, <strong>free</strong> video series called What The Flexbox &#8211; will be out in a few weeks! In the mean time check out my free <a href="http://CommandLinePowerUser.com" target="_blank">Command Line Power User</a> video series as well!</p>
<form class="sendy" action="http://bostype.com/sendy/subscribe" method="POST">
<h3>Tell me when it launches!</h3>
<p><input name="email" required="" type="email" placeholder="Enter Your Email" /><input name="list" type="hidden" value="Ct7zsQu3UIBOKuXcvE583Q" /><input name="boolean" type="hidden" value="true" /><br />
<input type="submit" value="Let me know, Wes!" /></form>
<p>Flexbox is a new part of CSS3 that allows us to create super flexible layouts without having to deal with floats, margin centering hacks, variable height bugs, vertical centering hacks and any number of layout challenges you face when creating a website or application.</p>
<p>With the rise of Responsive Design, web developers everywhere feel the pain of trying to create ultra-flexible layouts with traditional CSS tools. With flexbox, we can create a container with children that expand, contract and scale to fit in the best possible way. Columns, rows, scaling, equalized heights, re-ordering and directions have never been easier with flexbox.</p>
<p>Flexbox is a very new idea and it can be really hard to wrap your head around how it works, and when you should be using it. To add insult to injury, there are two implementations of flexbox in the wild and every browser vendor does it just a little differently.</p>
<p>This leaves us with a <strong>MESS</strong> of code that will leave even seasoned CSS developers running back to warm familiar arms of floats, clearfixes and JavaScript hacks.</p>
<pre class="brush:css">.flexWrapper {
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-box-direction: normal;
-moz-box-direction: normal;
-webkit-box-orient: vertical;
-moz-box-orient: vertical;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
-webkit-flex-wrap: nowrap;
-ms-flex-wrap: nowrap;
flex-wrap: nowrap;
-webkit-box-pack: start;
-moz-box-pack: start;
-webkit-justify-content: flex-start;
-ms-flex-pack: start;
justify-content: flex-start;
-webkit-align-content: stretch;
-ms-flex-line-pack: stretch;
align-content: stretch;
-webkit-box-align: start;
-moz-box-align: start;
-webkit-align-items: flex-start;
-ms-flex-align: start;
align-items: flex-start;
height: 100%;
}</pre>
<p>This video series will simplify things, discover the ins and outs of flexbox, how it works as well as how to back-port flexbox to work with older implementations, devices and browsers.</p>
<p>Here is video #1 introducing the video series as well as the very basics of what flexbox is and how we can use it. I will be updating my blog over the next few weeks with the rest of the videos, each diving into a different part of flexbox.</p>
<p><iframe class='youtube-player' type='text/html' width='640' height='360' src='https://www.youtube.com/embed/sewV3LsmoXI?version=3&#038;rel=1&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' allowfullscreen='true' style='border:0;'></iframe></p>
<h3>Series Links:</h3>
<p><a href="http://wesbos.com/flexbox-basics/">Introduction &amp; Basics — Part 1</a><br />
<a href="http://wesbos.com/css-flexbox-order-reordering-columns/">CSS Flexbox Video Series: Flexbox order, re-ordering columns and rows — Part 2</a><br />
<a href="http://wesbos.com/flexbox-widths-heights-and-layout-css/">CSS Flexbox Video Series: widths, heights and Layout — Learn CSS3 Flexbox — Part 3</a></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/flexbox-basics/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
							</item>
		<item>
		<title>Proper go to end of line with Sublime Text</title>
		<link>https://wesbos.com/sublime-text-end-of-line-wrap/</link>
				<comments>https://wesbos.com/sublime-text-end-of-line-wrap/#comments</comments>
				<pubDate>Wed, 31 Jul 2013 15:30:01 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Sublime Text]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=928</guid>
				<description><![CDATA[When working with wrapped lines in Sublime Text, the default go to End of line doesn&#8217;t work as expected. When you hit &#160;cmd +&#160;→ it will bring you to the end of the visual line, something you rarely want when &#8230; <a href="https://wesbos.com/sublime-text-end-of-line-wrap/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>When working with wrapped lines in Sublime Text, the default go to End of line doesn&#8217;t work as expected. When you hit &nbsp;<code>cmd</code> +&nbsp;<code>→</code> it will bring you to the end of the visual line, something you rarely want when working with wrapped lines:</p>
<p><img alt="" src="https://wesbos.com/wp-content/uploads/2013/07/ss-2013-07-31-at-11.19.26-AM.png" width="539" height="314" /></p>
<p>Watch the video and read below on a quick fix to this problem.</p>
<p><iframe class='youtube-player' type='text/html' width='640' height='360' src='https://www.youtube.com/embed/ngTMcHFDuQ8?version=3&#038;rel=1&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;hd=1&#038;wmode=transparent' allowfullscreen='true' style='border:0;'></iframe></p>
<p><span id="more-928"></span></p>
<p>The solution to this is to overwrite the default key bindings and set it to move to <strong>hardeol</strong> rather than just <strong>eol</strong>.</p>
<p>Place the following keyboard shortcuts in your key bindings file located at <code>Preferences</code> → <code>Key Bindings - User</code>. The first two control the jump to end and beginning of line while the second two do the same, but while selecting the text.</p>
<p>You may want to update the key bindings based on your own preference.</p>
<pre>
// Fix End of line
,{ "keys": ["super+right"], "command": "move_to", "args": {"to": "hardeol", "extend": false} }
// Fix Beginning of line
,{ "keys": ["super+left"], "command": "move_to", "args": {"to": "hardbol", "extend": false} }
// Fix end of line + select
,{ "keys": ["super+shift+right"], "command": "move_to", "args": {"to": "hardeol", "extend": true} }
// Fix beginning of line + select
,{ "keys": ["super+shift+left"], "command": "move_to", "args": {"to": "hardbol", "extend": true} }

</pre>
<p><a href="https://sublimetextbook.com/?utm_source=eol&#038;utm_medium=banner&#038;utm_campaign=product"><img src="https://sublimetextbook.com/images/facebook-share2.png"></a></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/sublime-text-end-of-line-wrap/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
							</item>
		<item>
		<title>Sublime Text indentation guide lines</title>
		<link>https://wesbos.com/sublime-text-indentation-guide-lines/</link>
				<comments>https://wesbos.com/sublime-text-indentation-guide-lines/#comments</comments>
				<pubDate>Wed, 24 Jul 2013 20:19:23 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Sublime Text]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=909</guid>
				<description><![CDATA[Quick little tip today for Sublime Text and everyone who works with indentation based languages like Python, CoffeeScript, Jade or those who are very diligent with their indentation practices. Watch the video or read the text after the break. By &#8230; <a href="https://wesbos.com/sublime-text-indentation-guide-lines/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>Quick little tip today for Sublime Text and everyone who works with indentation based languages like Python, CoffeeScript, Jade or those who are very diligent with their indentation practices. Watch the video or read the text after the break.</p>
<p><iframe class='youtube-player' type='text/html' width='640' height='360' src='https://www.youtube.com/embed/T4kZMjC3jEo?version=3&#038;rel=1&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;hd=1&#038;wmode=transparent' allowfullscreen='true' style='border:0;'></iframe><br />
<span id="more-909"></span></p>
<p>By default, Sublime text will give you indentation guide lines that are all the same colour. This is helpful but can become a little confusing when you get 4-5 levels deep. A class example I always find myself is below. Is the <code>.getting</code> div inside <code>.row</code> or is it a sibling?</p>
<p><img src="https://wesbos.com/wp-content/uploads/2013/07/ss-2013-07-24-at-4.02.52-PM.png" /></p>
<p>Well, an easy fix to this is to turn on <strong>&#8220;draw_active&#8221;</strong> setting for <strong>&#8220;indent_guide_options&#8221;:</strong></p>
<p>By Default, sublime already has <strong>&#8220;draw_normal&#8221;</strong> turn on for you, but we need to set it again so we do not overwrite it. You can put the code below in <code>Preferences</code> → <code>Settings - User</code>:</p>
<pre>   "indent_guide_options":
    [
        "draw_normal",
        "draw_active"
    ],</pre>
<p>This will turn on highlighting of the active indentation guide as well as the stacked, or parent, indentation guides.</p>
<p>Right away, I&#8217;m able to visually see that <code>.getting</code> is nested inside <code>.row</code></p>
<p><img src="https://wesbos.com/wp-content/uploads/2013/07/ss-2013-07-24-at-4.08.26-PM.png" /></p>
<p>The colour of the guides completely depends on the theme you are using. You are able to style the default guide, the active guide and the stacked guide. I&#8217;ve updated my theme <a href="https://github.com/wesbos/cobalt2/" target="_blank">Cobalt2</a> to use blue, yellow and light blue respectively.</p>
<p>Like this trick? My book is almost ready. Sign up below and I&#8217;ll let you know when it is ready!</p>
<p><a href="https://sublimetextbook.com/?utm_source=indentationguides&#038;utm_medium=banner&#038;utm_campaign=product"><img src="https://sublimetextbook.com/images/facebook-share2.png"></a></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/sublime-text-indentation-guide-lines/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
							</item>
		<item>
		<title>Can I use ST3 yet? Migrating to Sublime Text 3</title>
		<link>https://wesbos.com/migrating-to-sublime-text-3/</link>
				<comments>https://wesbos.com/migrating-to-sublime-text-3/#comments</comments>
				<pubDate>Mon, 08 Jul 2013 23:08:54 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Sublime Text]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=887</guid>
				<description><![CDATA[So, can I move to Sublime Text 3 yet?  I&#8217;ve had this question asked quite a few times over the past month so I thought I would write up a quick post on my answer: probably. Since my last &#8220;First Look&#8221; &#8230; <a href="https://wesbos.com/migrating-to-sublime-text-3/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p><strong>So, can I move to Sublime Text 3 yet? </strong></p>
<p>I&#8217;ve had this question asked quite a few times over the past month so I thought I would write up a quick post on my answer: <strong>probably.</strong></p>
<p>Since my last <a href="http://wesbos.com/sublime-text-3-first-look/" target="_blank">&#8220;First Look&#8221;</a> post on Sublime Text 3, 5 months have past and a lot has changed. Updates have been flying out, producing a faster and more stable Sublime Text 3.  Since then the beta has been opened to the public, so if you are still checking Sublime out, you can give ST3 a shot.</p>
<p><span id="more-887"></span></p>
<p><strong>Themes</strong></p>
<p>All themes, including my <a href="http://github.com/wesbos/cobalt2/">Cobalt2</a>, work flawlessly from ST2 to ST3. No worries here!</p>
<p><strong>Package Control, Plugins and Packages</strong></p>
<p>The reason we all didn&#8217;t switch to ST3 the day it was released is because we had to wait for packages to be updated to Python 3.</p>
<p>In my experience, most of my packages have been migrated over, enough that I&#8217;m comftable using ST3 as my daily driver. If you are wondering about a certain fringe package, check the community wiki to see if it is supported in ST3. <a href="https://github.com/wbond/sublime_package_control/wiki/Sublime-Text-3-Compatible-Packages">https://github.com/wbond/sublime_package_control/wiki/Sublime-Text-3-Compatible-Packages</a></p>
<p>Package control is the lifeline of all Sublime Text plugins and packages. Will Bond has been working hard to adapt package control to work both on ST2 and ST3. Installing Package control for ST3 is a little tricky, and migrating your old packages over can be a pain. I fiddled with it a few times and have come up with a quick method to do so.</p>
<p>I recommend you spend 9 mins watching the video but TLDR:</p>
<p>1) Use git to install the python3 branch of Package Control. Step by step instructions <a href="http://wbond.net/sublime_packages/package_control/installation#ST3" target="_blank">available here</a>.<br />
2) Move over all your folders in <strong>Sublime Text 2/Packages/ </strong>to <strong>Sublime Text 3/Packages/ </strong>except two: <code>Default</code> and <code>Package Control</code></p>
<p>Here is a quick video on the easiest way to do so:</p>
<p><iframe class='youtube-player' type='text/html' width='640' height='360' src='https://www.youtube.com/embed/Nsp6HxULU1Q?version=3&#038;rel=1&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' allowfullscreen='true' style='border:0;'></iframe></p>
<p><strong>Terminal subl command</strong></p>
<p>If you are a heavy terminal user you will also need to switch over your terminal command to now open files in Sublime Text 3.</p>
<p>First delete the old one: <code>sudo rm  /bin/subl</code></p>
<p>Then create the new one: <code>sudo ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /bin/subl</code></p>
<p><strong>Sublime Text Book</strong></p>
<p>I am still working on my Sublime Text Power User book and making excellent progress. I want to thank everyone who has emailed me asking about a launch date, I expect everything to be out in the next month or two. If you are interested, sign up below and I&#8217;ll be sure to let you know when it launches!</p>
<p><a href="https://sublimetextbook.com/?utm_source=st3migration&#038;utm_medium=banner&#038;utm_campaign=product"><img src="https://sublimetextbook.com/images/facebook-share2.png"></a></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/migrating-to-sublime-text-3/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
							</item>
		<item>
		<title>Learn Sublime Text line bubbling in 2 minutes ☰</title>
		<link>https://wesbos.com/learn-sublime-text-line-bubbling-in-2-minutes/</link>
				<comments>https://wesbos.com/learn-sublime-text-line-bubbling-in-2-minutes/#comments</comments>
				<pubDate>Tue, 12 Mar 2013 03:13:47 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Sublime Text]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=777</guid>
				<description><![CDATA[As I’ve been writing the Sublime Text Power User book over the last few months, I’ve had some interesting conversations around favourite features of ST. The one feature that I constantly surprise people with is called line bubbling &#8211; moving &#8230; <a href="https://wesbos.com/learn-sublime-text-line-bubbling-in-2-minutes/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>As I’ve been writing the Sublime Text Power User book over the last few months, I’ve had some interesting conversations around favourite features of ST. The one feature that I constantly surprise people with is called line bubbling &#8211; moving lines of code up and down a document without cutting and pasting them.</p>
<p><img class="size-full wp-image-778" alt="linebubble.mov" src="https://wesbos.com/wp-content/uploads/2013/03/linebubble.mov.gif" /></p>
<p>It’s an extremely simple feature but will save you lots of time and potentially lost code.</p>
<p>Let’s take this list as a very basic example. This list could be any block of code that you want to move up or down &#8211; they are only numbered as a visual.<br />
<img class="aligncenter size-medium wp-image-783" alt="ss 2013-03-11 at 11.14.30 PM" src="https://wesbos.com/wp-content/uploads/2013/03/ss-2013-03-11-at-11.14.30-PM-300x189.png" width="300" height="189" srcset="https://wesbos.com/wp-content/uploads/2013/03/ss-2013-03-11-at-11.14.30-PM-300x189.png 300w, https://wesbos.com/wp-content/uploads/2013/03/ss-2013-03-11-at-11.14.30-PM-650x411.png 650w, https://wesbos.com/wp-content/uploads/2013/03/ss-2013-03-11-at-11.14.30-PM.png 665w" sizes="(max-width: 300px) 100vw, 300px" /><br />
How do we move them up and down to end up in the correct order? We could cut and paste, but line bubbling is much faster.</p>
<p>In Sublime Text, hold down <code>⌘</code> + <code>control</code> (<code>CTRL</code> + <code>SHIFT</code> on Windows) and use your <strong>↑ up</strong>* and <strong>↓ down</strong> arrow keys to move the lines around. This works for single and multiple lines.</p>
<p>Check out the video for a visual:</p>
<p><iframe class='youtube-player' type='text/html' width='640' height='360' src='https://www.youtube.com/embed/AXbCm3ymDzM?version=3&#038;rel=1&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;hd=1&#038;wmode=transparent' allowfullscreen='true' style='border:0;'></iframe></p>
<p><a href="https://sublimetextbook.com/?utm_source=linebubble&#038;utm_medium=banner&#038;utm_campaign=product"><img src="https://sublimetextbook.com/images/facebook-share2.png"></a></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/learn-sublime-text-line-bubbling-in-2-minutes/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
							</item>
		<item>
		<title>Sublime Text 3: First Look</title>
		<link>https://wesbos.com/sublime-text-3-first-look/</link>
				<comments>https://wesbos.com/sublime-text-3-first-look/#comments</comments>
				<pubDate>Tue, 29 Jan 2013 18:51:41 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Sublime Text]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=748</guid>
				<description><![CDATA[I woke up to a real treat this morning: Sublime Text 3! Sublime Text development has always moved at an incredible pace and now just a few months after 2.0 was released, 3.0 peaks around the corner. ST3 isn&#8217;t at &#8230; <a href="https://wesbos.com/sublime-text-3-first-look/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>I woke up to a real treat this morning: Sublime Text 3! Sublime Text development has always moved at an incredible pace and now just a few months after 2.0 was released, 3.0 peaks around the corner. ST3 isn&#8217;t at the point where it can be your daily editor &#8211; you will still be using ST2 for some time &#8211; but its exciting to take a look at what ST3 has in store for us!</p>
<p>ST3 is only available to registered ST2 owners, you will be reqired to input your license key upon launch. If you forget where you put your license key, go to <code>Preferences → Browse Packages</code> and then open the <code>settings</code> folder and look for <code>License.sublime_license</code></p>
<p><img alt="" src="http://wes.io/MWo1/content" /></p>
<h3>What&#8217;s new</h3>
<p>You can read all the new features over at the <a href="http://www.sublimetext.com/blog/articles/sublime-text-3-beta" target="_blank">Sublime Blog</a>, here are the main features along with some explanation and commentary.</p>
<h4>It&#8217;s even faster!</h4>
<p>Sublime has always been a blazing fast editor and Jon Skinner has outdone himself with this. The editor starts and opens up my last project in less than a second. On OSX the icon doesn&#8217;t even reach the top of the bounce before it has loaded.</p>
<h4>Python 3.3 &amp; Packages API</h4>
<p>Sublime has now switched to Python 3.3. If you aren&#8217;t familar, Python is the programming language that Sublime Text uses to expose it&#8217;s API. It is how we get all those great packages. Python 3.3 has been out for a while, but many developers have been dragging their heels in upgrading as many of the packages haven&#8217;t been ported over. I&#8217;m not a Python developer, but according to the <a href="https://python3wos.appspot.com/" target="_blank">Python Wall of Superpowers</a> things are looking better lately.</p>
<p>The downside to this is that most Sublime Text packages will need to be ported to ST2/Python 3.3. The author of Sublime Text says porting to the new API involve minimal work.</p>
<p>Sublime Text package manager doesn&#8217;t work yet, but the author <a href="https://twitter.com/wbond" target="_blank">Will Bond</a> says work is already underway. Will also has a number of popular packages so I would watch his <a href="https://github.com/wbond/" target="_blank">github</a>, <a href="https://twitter.com/wbond" target="_blank">twitter</a> and <a href="http://wbond.net/sublime_packages" target="_blank">site</a> for his experiences with porting everything over.</p>
<p><strong>UPDATE: </strong>Will Bond has updated package manage to work with Sublime Text 3. See his <a href="http://wesbos.com/sublime-text-3-first-look/#comment-1511">commend below</a>.</p>
<h4>Pane Management</h4>
<p>Previously sublime text only allowed you to split your editor into 1-3 columns, 1-3 rows or a grid of 4. This has changed in Sublime Text 3 which exposes controls for splitting panes indefinitely.</p>
<p>I played around with the commands and keyboard shortcuts for a bit but I will be sticking with <a href="https://github.com/SublimeText/Origami" target="_blank">Origami</a> to manage my panes as I find the commands for moving files splitting panes to be more natural.</p>
<h4>Symbol Indexing</h4>
<p><img alt="" src="http://wes.io/MWQc/content" /><br />
ST3 introduces project wide Goto Symbol and Goto Definition. Previously Goto symbol fuzzy search only worked when you specifically noted which file you wanted to look in. In the example above I&#8217;m able to see everywhere the post_render function is called in Octopress. This is a really big step up for Sublime that may have a few IDE-lovers jumping ship.</p>
<h3>Themes and colour schemes</h3>
<p>The UI of Sublime hasn&#8217;t changed at all other than a few animations when hiding/showing the sidebar. I&#8217;ve tested ST3 with my <a href="https://github.com/wesbos/cobalt2/" target="_blank">Cobalt2 theme and color scheme</a> and I&#8217;m happy to report that everything worked flawlessly.</p>
<h3>Prices</h3>
<p>Sublime text 3 will go for $70 or a $30 upgrade from ST2 ($15 if you purchased it recently, so don&#8217;t hold off buying ST2).  Money extremely well spent.</p>
<h3>Wishlist</h3>
<p>This is just the beginning of ST3 and I&#8217;m excited to see what it has in store for the future. A few things that are on my wishlist:</p>
<ul>
<li><span style="line-height: 13px;">Full blown terminal integration</span></li>
<li>Binary file display  &#8211; One thing Coda does really well. If I click an image, I&#8217;m able to preview it and get its dimensions.</li>
<li>Find/Replace Macros &#8211; being able to record a find/replace and play it back or run with arguments would be very handy.</li>
<li>Sidebar icons &#8211; Sublime excells in its simple interface but having icons for folders/filetypes is something that has always been on my list</li>
<li><strong>What is yours? </strong>&#8211; Post in the comments what you hope Sublime Text 3 will bring</li>
</ul>
<p><a href="https://sublimetextbook.com/?utm_source=st3firstlook&#038;utm_medium=banner&#038;utm_campaign=product"><img src="https://sublimetextbook.com/images/facebook-share2.png"></a></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/sublime-text-3-first-look/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
							</item>
		<item>
		<title>How to test localhost from any device on your network</title>
		<link>https://wesbos.com/localhost-mobile-device-testing/</link>
				<comments>https://wesbos.com/localhost-mobile-device-testing/#comments</comments>
				<pubDate>Fri, 25 Jan 2013 17:55:48 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Mobile]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=718</guid>
				<description><![CDATA[If you do any sort of web development locally you have probably run into at least one of the following problems: I can&#8217;t access my local sites/apps on my mobile devices I can&#8217;t access localhost inside of my virtual machines &#8230; <a href="https://wesbos.com/localhost-mobile-device-testing/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>If you do any sort of web development locally you have probably run into at least one of the following problems:</p>
<ol>
<li>I can&#8217;t access my local sites/apps on my mobile devices</li>
<li>I can&#8217;t access localhost inside of my virtual machines</li>
<li>My teammates can&#8217;t access my local site to view it</li>
<li>I need to test IE6 on my Toshiba crapbook</li>
</ol>
<p>Pushing your site to a server isn&#8217;t ideal, especially when you are debugging a problem and have a longer deploy process.</p>
<p>I develop everything locally and have to test my sites/apps on a variety of mobile devices as well as a few different installs of windows which I run on Virtual Box. This is how I run a single development domain that is available to every device on my wireless network as well as on my laptop, regardless of the wifi network I&#8217;m on.</p>
<p><span id="more-718"></span></p>
<h3>My Setup</h3>
<p><img class="size-large wp-image-743 alignleft" src="https://wesbos.com/wp-content/uploads/2013/01/photo-2-650x487.jpg" alt="photo (2)" width="640" height="479" /></p>
<p>Before we get started, I should say that is works for any programming language that runs a local server. My setup looks something like this:</p>
<p>http://test.com is my domain that I map everything to. I can access test.com on any device on my network. It obviously not the real test.com, but as you will see it resolves to <strong>localhost. </strong>This domain could be anything &#8211; some devs like to run something like http://wes.dev/ but I find using a .com works better as sometimes browsers think I&#8217;m searching for wes.dev instead of going to wes.dev.</p>
<p>I run MAMP to serve up both my static files and my static files. I usually have mamp serving up my entire web devleopment folder so I can easily just surf to something like http://test.com/demos/webrtc-demo/ on any device. This is most common for me, so I run this on the default web traffic port 80. If you don&#8217;t do PHP development, I reccomend using pythons simplehttpserver as MAMP or WAMP are a pain to get up and running properly.</p>
<p>I run node.js apps on various ports. Express apps run on port 3000 by default so I just need to surf to http://test.com:3000 on any device.</p>
<p>I also have clients who have ruby and python/app engine backends. I usually run these on ports that are easy to remember like 8888. I keep these ports unique for each app so my browser history know the difference between http://test.com:8888 and http://test.com:9000</p>
<p><strong>Just use an IP! What about  localtunnel?! </strong></p>
<p>I posted on twitter that I was writing this article and I got quite a few people asking why I didn&#8217;t just use an IP address or localtunnel. Using an IP isn&#8217;t ideal because many times applications I run depend on having a consistent domain name. With many CMS systems such as WordPress, I can&#8217;t really develop on localhost  and then view the site on 192.168.1.32. I use a few browser plugins that send my current site to my devie and having the exact same domain name is key here.</p>
<p>Services like <a href="http://progrium.com/localtunnel/">localtunnel</a> and <a href="http://pagekite.net/">PageKit</a> are fantastic for quickly exposing your localhost and are invaluable when working on a remote team. However, we still run into the problem of  having different domains for your machine vs the device. So, you may still require these services and thats great, it just doesn&#8217;t replace what we are trying to do here.</p>
<h3>Local Setup &#8211; edit your hosts file</h3>
<p>This is the easy part. We want to edit a file on our computer called the <strong>hosts file.  </strong>This file tells your computer to resolve <strong>names </strong>to <strong>IP Addresses. </strong>So, anytime your computer requests a name &#8211; say test.com &#8211; it will check the <strong>hosts file</strong> to see if there is an IP it should resolve to.  Otherwise it carries on with its business and tries to load the web page.</p>
<p>Your hosts file is just a text file so you don&#8217;t need any special program.  Just open up the following file:</p>
<p><strong>OSX: </strong>open terminal (applications → utilities → terminal) and type <code>sudo open /etc/hosts</code>. You will be asked to enter your password and then the file will open up in your text editor of choice.<br />
<strong>Windows:</strong> Start → Run → paste <code>notepad c:\windows\system32\drivers\etc\hosts</code> into the box.</p>
<p>Now we just need to map a domain to localhost. We use the IP address <strong>127.0.0.1</strong> because that is the IP for your computer&#8217;s localhost.</p>
<p>Go ahead and pop the following line anywhere in your hosts file:</p>
<p><strong>127.0.0.1 test.com</strong></p>
<p>Give it a save (you may be asked to enter your password)</p>
<p><img class="aligncenter size-large wp-image-741" src="https://wesbos.com/wp-content/uploads/2013/01/ss-2013-01-25-at-12.45.17-PM-650x114.png" alt="ss 2013-01-25 at 12.45.17 PM" width="640" height="112" srcset="https://wesbos.com/wp-content/uploads/2013/01/ss-2013-01-25-at-12.45.17-PM-650x114.png 650w, https://wesbos.com/wp-content/uploads/2013/01/ss-2013-01-25-at-12.45.17-PM-300x52.png 300w, https://wesbos.com/wp-content/uploads/2013/01/ss-2013-01-25-at-12.45.17-PM.png 665w" sizes="(max-width: 640px) 100vw, 640px" /></p>
<p>You can map <strong>any domain name </strong>to an alternate IP address. So, if you wanted to play a prank on a co-worker or block your wife from pinterest, you could easily tell it to resolve to any other IP. This is how those &#8216;self control&#8217; apps work as well.</p>
<h1>Map Pinterest to google.com</h1>
<p>74.125.224.72 pinterest.com</p>
<h1>Disable facebook.com</h1>
<p>0.0.0.0 facebook.com</p>
<p>Now when you visit http://test.com you should see your localhost instead on whatever used to be on test.com. If you don&#8217;t see it, you can flush your DNS cache:</p>
<p>OSX Paste the following into terminal <code>sudo killall -HUP mDNSResponder</code><br />
Windows: Start → run → cmd (right click, run as admin): <code>ipconfig /flushdns</code></p>
<h3>Router Level Setup</h3>
<p>The above has set you up for a local domain resolution of test.com &#8211; but what about when you want to visit test.com on another device? I have at least 20 different devices/vms to test and some of them, like the iPhone, don&#8217;t even allow you to edit the hosts file!</p>
<p>The answer is setting up a similar resolution, but at the router level. We will tell the router to resolve all requests for test.com to the IP address of your computer. When I first set out to do this, I thought I had to do some serious hacking &#8211; I was telneting into my router and trying to edit my hosts file. Turns out, it is a lot easier than I thought. This part could vary depending on your router &#8211; I run a custom firmware on my router called <a href="http://www.dd-wrt.ca/site/index">dd-wrt</a>  and there are a few others available like <a href="http://www.polarcloud.com/tomato">Tomato</a> and <a href="https://freewrt.org/">FreeWRT</a>. If you have any sort of dlink or linksys router, you are probably able to run a custom firmware &#8211; check into it.</p>
<p>The piece of the puzzle that we need on your router is called <strong>DNSmasq.</strong> If you are running a router with vanilla firmware, you will have to take a look and see if it supports DNSmasq or some other version DNS masking. Please share in the comments if you know of a way for a specific router.</p>
<p>First thing we need to do is grab our computers <strong>local </strong>IP address. You can get this by going back into terminal/cmdline and typing <code>ipconfig</code> (<code>ifconfig</code> on mac). and looking for something that looks like 192.168.x.x. If your computer changes IP addresses frequently you may need to set a static IP for your home network, I&#8217;ve run this setup for over a year, event reformatting my mbp once and I&#8217;ve never had to set a static IP. <a href="http://www.howtogeek.com/howto/22161/how-to-set-up-a-static-ip-in-mac-os-x/" target="_blank" rel="noopener">[osx guide]</a> <a href="http://blog.mclaughlinsoftware.com/2009/11/26/windows-7-static-ip/" target="_blank" rel="noopener">[windows guide]</a></p>
<p>With your computer&#8217;s IP handy, Go ahead and log into your router (usually 192.168.1.1 unless you have changed it) and look around for <strong>DNSmasq.</strong> in DD-WRT its located under <strong>services.</strong> Then you simply need to type the following into the box and make sure your settings line up with mine:</p>
<p><code>address=/test.com/192.168.124.110</code></p>
<p><img class="aligncenter size-full wp-image-737" src="https://wesbos.com/wp-content/uploads/2013/01/ss-2013-01-25-at-12.14.45-PM.png" alt="ss 2013-01-25 at 12.14.45 PM" width="626" height="202" srcset="https://wesbos.com/wp-content/uploads/2013/01/ss-2013-01-25-at-12.14.45-PM.png 626w, https://wesbos.com/wp-content/uploads/2013/01/ss-2013-01-25-at-12.14.45-PM-300x96.png 300w" sizes="(max-width: 626px) 100vw, 626px" /></p>
<p>Save your settings and you are ready to start testing your devices on your local network! I&#8217;ve been running this setup for about a year now and I&#8217;m really happy with it &#8211; would love to hear any other tips/tools you use that might make this easier to the average Joe. Good luck!</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/localhost-mobile-device-testing/feed/</wfw:commentRss>
		<slash:comments>39</slash:comments>
							</item>
		<item>
		<title>Korean 27&#8243; Apple IPS Displays and a Macbook Pro: Everything you need to know</title>
		<link>https://wesbos.com/korean-27-monitor-macbook-pro/</link>
				<comments>https://wesbos.com/korean-27-monitor-macbook-pro/#comments</comments>
				<pubDate>Mon, 14 Jan 2013 19:00:37 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=689</guid>
				<description><![CDATA[If you haven&#8217;t heard, there are beautiful 27&#8243; IPS monitors coming out of Korea that use the same panels as the Apple Thunderbolt display. Turns out that Apple buys its panels from LG and any panels that aren&#8217;t absolutely perfect &#8230; <a href="https://wesbos.com/korean-27-monitor-macbook-pro/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p><img class="aligncenter size-large wp-image-699" alt="photo" src="https://wesbos.com/wp-content/uploads/2013/01/photo-650x487.jpg" srcset="https://wesbos.com/wp-content/uploads/2013/01/photo-650x487.jpg 650w, https://wesbos.com/wp-content/uploads/2013/01/photo-300x225.jpg 300w" sizes="(max-width: 650px) 100vw, 650px" />If you haven&#8217;t heard, there are beautiful 27&#8243; IPS monitors coming out of Korea that use the same panels as the Apple Thunderbolt display. Turns out that Apple buys its panels from LG and any panels that aren&#8217;t absolutely perfect get rejected. Enterprising companies in Korea are then buying these panels and putting them into their own monitor housing. You don&#8217;t get the apple looks, nor the docking ports at the back, but at $300-400, these monitors are attractive to many who just want a high quality panel without the $1000+tax price tag an Apple display. This isn&#8217;t a $300 best buy special with a 1080 resolution, its a serious monitor pushing out 2560&#215;1440.</p>
<p>Before we go any further, if you are on team $1000 apple thunderbolt display. We get it, apple displays are perfect &nbsp;and worth every penny to you. Pretty much everyone would kill for a thunderbolt display. This is my story how I got the exact same quality display for half the price.</p>
<p>There are <a href="http://techreport.com/review/23291/those-27-inch-ips-displays-from-korea-are-for-real" target="_blank">tons</a> and <a href="http://www.codinghorror.com/blog/2012/07/the-ips-lcd-revolution.html" target="_blank">tons</a>&nbsp;of articles that will catch you up to speed on these monitors, I suggest you read them if you want to know more. Here is the short and skinny:</p>
<ol>
<li>There are many different brands that package the same panel and the prices vary. Some have poor build quality (including the circuitry) and other have really nice stands. The three big names are Yamakasi Catleap, Achieva Shimian and&nbsp;&nbsp;Crossover. Do your research by reading the forums &#8211; there are literally thousands of pages of &nbsp;information on this.</li>
<li>Most of these monitors are sold on ebay. Monoprice recenrly started to sell their own brand. I bought mine off a seller called &#8216;Dream Seller&#8217; who shipped it free from Korea in a shocking 3 days.</li>
<li>You run the risk of getting a few dead pixels or back light bleeding. I paid an extra ~$25 for a pixel perfect version and I have zero dead pixels and no backlight bleed. Many buyers risk the dead pixels and end up with perfect displays, others have a few dead pixels.</li>
<li>These are barebones as it gets, DVI only and no on screen display.</li>
</ol>
<p>I bought a Crossover Q27 LED because it has the best build quality with a metal bezel and stand. I replaced the stand with a monoprice arm because I found it less bulky. If you are considering the&nbsp;Crossover Q27 LED and have neck problems, go for the&nbsp;Crossover Q27 LED<strong>-P&nbsp;</strong>which has a stand that allows for pivoting and moving up/down.</p>
<p><img class="aligncenter size-large wp-image-698" alt="photo_3" src="https://wesbos.com/wp-content/uploads/2013/01/photo_3-650x487.jpg" srcset="https://wesbos.com/wp-content/uploads/2013/01/photo_3-650x487.jpg 650w, https://wesbos.com/wp-content/uploads/2013/01/photo_3-300x225.jpg 300w" sizes="(max-width: 650px) 100vw, 650px" /></p>
<h3>Running it on a Macbook Pro</h3>
<p>Most of the forum posters are serious gamers so I found I had to do quite a bit of research about running it on my Macbook Pro. The biggest takeaway is that these monitors require a&nbsp;<strong>dual link dvi</strong> cable to hook it up. Those $10 mini display port / thunderbolt&nbsp;→ DVI connectors won&#8217;t work here. Because the resolution is so high, we can&#8217;t simply just convert the signal from our macbook to DVI like we do with other monitors &#8211; this is what we call <strong>passive conversion.&nbsp;</strong>As I understand it, we need an <strong>Active converter&nbsp;</strong>that will take the output from the macbook pro and kick it up to&nbsp;&nbsp;2560&#215;1440.</p>
<p><img class="aligncenter size-full wp-image-692" alt="DV019_Jpg_Regular_501043" src="https://wesbos.com/wp-content/uploads/2013/01/DV019_Jpg_Regular_501043.jpg" srcset="https://wesbos.com/wp-content/uploads/2013/01/DV019_Jpg_Regular_501043.jpg 290w, https://wesbos.com/wp-content/uploads/2013/01/DV019_Jpg_Regular_501043-150x150.jpg 150w, https://wesbos.com/wp-content/uploads/2013/01/DV019_Jpg_Regular_501043-180x180.jpg 180w" sizes="(max-width: 290px) 100vw, 290px" /></p>
<p>The above is Apple&#8217;s version, and it doesn&#8217;t come cheap at around $150. There are other companies including StarTech and Monoprice that put out cheaper, and&nbsp;supposedly&nbsp;better, adaptors for around $100-120. No cheap, so keep this in mind when factoring in the price of the monitor. These adaptors require a USB port, which is purely for power. The apple one gives you a passthrough so you don&#8217;t lose a precious port. I plugged mine into a powered hub and it works fine.</p>
<p>I&#8217;m running this on a mid 2010 macbook pro. It&#8217;s important to note here that even if you have a newer model with thunderbolt, you still need to buy this adaptor. I found a cheap one on Craigslist.</p>
<h3>Power</h3>
<p>This is another thing to pay serious attention to. Most of the monitors come with Korean power bricks which operate at 110-240V. North America runs on 120v, so I was safely inside that voltage. The only thing I needed to do was swap the korean plug for a north american on. Its the same plug as printers/scanners/monitors use, so I could just unplug the korean wall plug version and swap it out with mine.</p>
<p>If you live in a european country that runs on 250V &#8211; you need to make sure you buy a proper power pick. Do not fry your monitor!</p>
<h3>Calibration</h3>
<p>Out of the box, the colour was almost bang on and I only had to do a little bit of calibration. These&nbsp;monitors&nbsp;only come with two buttons: brightness UP and brightness DOWN. No problem here though, OSX comes with a very nice colour calibration wizzard which allowed me to make everything look 1:1 to my macbook pro.</p>
<p><strong>Warranty</strong></p>
<p>There isn&#8217;t much of a warranty with these things past the&nbsp;initial&nbsp;delivery, this is one of the major downsides. There is no Apple store appointments for these monitors. Luckily, I was able to pop my ebay listing # into <a href="http://www.squaretrade.com/">SquareTrade</a>&nbsp;and they sold me a 3 year warranty for $50. Totally worth the peace of mind.</p>
<p>Overall Prices</p>
<p>Monitor $380</p>
<p>Display port to Dual link DVI Converter&nbsp;$60 (craigslist)</p>
<p>Monoprice Monitor Arm &#8211; $20 off craigslist</p>
<p>Duty &#8211; $60 (I was one of the only instances I could find online where poeple got nailed by customs. Oh well, oh Canada).</p>
<p><strong>Total: $520 taxes in</strong></p>
<p>Hope this was helpful and saves you hours of searching. In the picture above, I&#8217;m also using a USB to DVI converter from displaylink to run the third display.</p>
<p>&nbsp;</p>
<p><a href="https://wesbos.com/wp-content/uploads/2013/01/photo_2-e1358189928992.jpg"><img class=" wp-image-697 alignleft" alt="photo_2" src="https://wesbos.com/wp-content/uploads/2013/01/photo_2-e1358189928992-650x866.jpg" srcset="https://wesbos.com/wp-content/uploads/2013/01/photo_2-e1358189928992-650x866.jpg 650w, https://wesbos.com/wp-content/uploads/2013/01/photo_2-e1358189928992-225x300.jpg 225w" sizes="(max-width: 650px) 100vw, 650px" /></a><a href="https://wesbos.com/wp-content/uploads/2013/01/photo_1.jpg"><img class="size-medium wp-image-696" alt="photo_1" src="https://wesbos.com/wp-content/uploads/2013/01/photo_1-300x225.jpg" srcset="https://wesbos.com/wp-content/uploads/2013/01/photo_1-300x225.jpg 300w, https://wesbos.com/wp-content/uploads/2013/01/photo_1-650x487.jpg 650w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p>Please leave any tips or questions in the commends below.</p>
<style>.entry-utility {clear:both;}</style>
<div id="mc_embed_signup2">
<form class="validate" id="mc-embedded-subscribe-form" action="http://wesbos.us1.list-manage.com/subscribe/post?u=b18fd2807ed1a9249c7ea8961&amp;id=20fbc2c1a5" method="post" name="mc-embedded-subscribe-form" novalidate="" target="_blank">
<h4>Let me know when this book launches</h4>
<p>Enter your email address below and I’ll give you a hoot when its ready plus a discount code for being so great!</p>
<p><input class="email" id="mce-EMAIL" type="email" name="EMAIL" placeholder="email address" required="" value="" /><input class="button" id="mc-embedded-subscribe" type="submit" name="subscribe" value="Go!" /></p>
</form>
</div>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/korean-27-monitor-macbook-pro/feed/</wfw:commentRss>
		<slash:comments>54</slash:comments>
							</item>
		<item>
		<title>5 more Sublime Text tweaks &#038; tips</title>
		<link>https://wesbos.com/5-sublime-text-tweaks-tips/</link>
				<comments>https://wesbos.com/5-sublime-text-tweaks-tips/#comments</comments>
				<pubDate>Mon, 14 Jan 2013 04:09:51 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Sublime Text]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=678</guid>
				<description><![CDATA[I&#8217;m working hard on my Sublime Text Book and have received fantastic response for everything so far &#8211; very motivating. The last post was so well received that I&#8217;ve decided to post a few more of my favourite tips. 1. &#8230; <a href="https://wesbos.com/5-sublime-text-tweaks-tips/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>I&#8217;m working hard on my Sublime Text Book and have received fantastic response for everything so far &#8211; very motivating. The <a href="http://wesbos.com/sublime-text-5-visual-tweaks/" target="_blank">last post</a> was so well received that I&#8217;ve decided to post a few more of my favourite tips.</p>
<h3>1. Save on focus lost</h3>
<p>Chronic ⌘+S’er? This tip is particularly helpful when working with CSS/LESS/SASS and switching between your editor and browser. Instead of saving on every tiny little change, tell Sublime to automatically save your files when you tab away from the editor.</p>
<p>I find this is super handy when working with extensions like Live Reload or compiled languages like coffeescript that watch for file saves. Put this in your settings file at <code>Preferences</code> → <code>Settings - User</code></p>
<pre class="brush:js">"save_on_focus_lost": true</pre>
<p>If you work with other watch scripts that break and restart a process upon save (like supervisor or forever), this might not be ideal for you. No problem, only enable it for the languages you want &#8211; simply place the above setting in /Packages/User/[syntax].sublime-settings. For example, I put the above in <code>CSS.sublime-settings</code> and <code>LESS.sublime-settings</code></p>
<h3>2. Paste and Indent</h3>
<p>One of the best tricks I’ve ever learned in Sublime Text is <strong>paste and indent</strong>. If you have ever pulled a piece of code off the Internet and pasted it into your application, you’ll no doubt feel the pain of having it paste in all weird and have to go in and fix it.</p>
<p>Easy fix to this, instead of pressing the normal <code>cmd</code> + <code>v</code> to paste, simply switch to using <code>cmd</code> + <code>shift</code> + <code>v</code> to paste. This will automatically indent your code block.</p>
<p>Like that one? I loved it so I remapped my key combos to paste and indent by default on <code>cmd</code> + <code>v</code></p>
<p>Paste this little snippet into your key bindings file located at <code>Preferences</code> → <code>Key Bindings - User</code></p>
<pre class="brush:js">{ "keys": ["super+v"], "command": "paste_and_indent" },
{ "keys": ["super+shift+v"], "command": "paste" }</pre>
<h3>3. Reindent Keyboard shortcut</h3>
<p>Now, if for some reason you end up with either a block of code or an entire file filled with hard to ready, messy, poorly indented code, reindent is your best friend.</p>
<p>To automatically re-indent your code, simply select the code you want to indent and then from the menu <code>Edit</code> → <code>Line</code> → <code>Reindent</code></p>
<p>Sublime doesn’t ship a keyboard shortcut for this. No problem, let’s make our own. Pop this little snippet into the <code>Preferences</code> → <code>Key Bindings - User</code> file.</p>
<pre class="brush:js">{ "keys": ["super+shift+r"],  "command": "reindent" }</pre>
<h3>4. Highlight Modified Tab</h3>
<p>When making a change in sublime text, by default it changes the <strong>×</strong> to a circle of the same colour.</p>
<figure><img alt="" src="http://wes.io/M9aj/content" /></figure>
<p>Make it a little more obvious when you haven’t saved changes to a document by turning on the following:</p>
<pre class="brush:js">"highlight_modified_tabs": true</pre>
<figure><img alt="" src="http://wes.io/M9p8/contet" /></figure>
<p>The exact styling of your modified tabs will vary depending on your theme. It looks fantastic with my <a href="wesbos.com/cobalt2-theme-sublime-text-2/">cobalt2 theme for Sublime Text</a></p>
<p>I’m an instructor at <a href="http://hackeryou.com/courses/#intro-to-web-development">HackerYou</a> where we use Sublime Text extensively. This is a small, yet common, problem that we run into. Making it visually obvious cuts down on mistakes like this.</p>
<h3>5. Proper Fullscreen for Mac Users</h3>
<p>This one is only for those running Sublime Text on Mac OSX 10.7 or 10.8 with multiple monitors. You have probably realized that apple has really dropped the ball when using fullscreen, rendering the rest of multiple monitors into nothing but a linen backdrop.</p>
<p>If you like to code fullscreen yet still use your other monitors, go ahead and add the following to your preferences file:</p>
<pre class="brush:js">"use_simple_full_screen": true</pre>
<p>You’ll have to restart Sublime Text for this one.</p>
<h3>More?</h3>
<p>I’ve got plenty more tips as well as in-depth guides on the rest of Sublime Text in my book. If you have a must-use tip or commends on any of the above, please feel free to leave a comment!</p>
<p><a href="https:/SublimeTextBook.com"><img src="https://sublimetextbook.com/images/facebook-share2.png"></a></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/5-sublime-text-tweaks-tips/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
							</item>
		<item>
		<title>5 great visual tweaks for Sublime Text</title>
		<link>https://wesbos.com/sublime-text-5-visual-tweaks/</link>
				<comments>https://wesbos.com/sublime-text-5-visual-tweaks/#comments</comments>
				<pubDate>Tue, 08 Jan 2013 16:38:46 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Sublime Text]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=637</guid>
				<description><![CDATA[I love tweaking Sublime Text. There are hundreds of settings you can change and I&#8217;ve blogged about a few of them before. Here are five visual changes you can use to make your text editor just right. You should place &#8230; <a href="https://wesbos.com/sublime-text-5-visual-tweaks/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>I love tweaking Sublime Text. There are hundreds of settings you can change and I&#8217;ve blogged about a few of them before.</p>
<p>Here are five visual changes you can use to make your text editor <em>just right</em>. You should place these items inside your User settings file which can be located at <code>preferences</code> → <code>Settings - User</code></p>
<h3>1. Change the caret style</h3>
<p>Who thought a caret could be sexy? Change your caret style to phase and it will fade in and out rather than blink.</p>
<pre class="brush:js">"caret_style": "phase"</pre>
<p>Other available options include &#8220;smooth&#8221;, &#8220;phase&#8221;, &#8220;blink&#8221;, &#8220;wide&#8221; and &#8220;solid&#8221;. I&#8217;ve been fond of &#8220;wide&#8221; which doesn&#8217;t blink and is clearly visible for screenshots in my new book.</p>
<h3>2. Highlight current Line</h3>
<p>This is one thing I wish Sublime Text enabled by default. Highlighting the current line is a subtle visual cue when jumping back and forth between a browser and code.</p>
<p>This is also super handy when you are dealing with long lines of code/text and you want to quickly know if the current line is wrapped or not.</p>
<pre class="brush:js">"highlight_line": true</pre>
<p><img class="aligncenter size-medium wp-image-641" src="https://wesbos.com/wp-content/uploads/2013/01/ss-2013-01-08-at-11.21.30-AM.png" alt="ss 2013-01-08 at 11.21.30 AM" srcset="https://wesbos.com/wp-content/uploads/2013/01/ss-2013-01-08-at-11.21.30-AM.png 563w, https://wesbos.com/wp-content/uploads/2013/01/ss-2013-01-08-at-11.21.30-AM-300x141.png 300w" sizes="(max-width: 563px) 100vw, 563px" /></p>
<h3>3. Increase the line height</h3>
<p>This trick adds just two pixels to each line, but increases the readability of code so much better. Might not be for everyone but I really enjoy this one.</p>
<pre class="brush:js"> "line_padding_bottom": 1,
  "line_padding_top": 1</pre>
<h3>4. Show Code folding arrows</h3>
<p><a href="http://wesbos.com/sublime-text-code-folding/">Code Folding in Sublime Text</a> is really great but I&#8217;ve noticed most people don&#8217;t use it as much as they do in editors because the arrows aren&#8217;t visible until you hover over the gutter.</p>
<p>Make them always visible and get folding!</p>
<pre class="brush:js">"fade_fold_buttons": false</pre>
<p><img class="aligncenter size-full wp-image-642" src="https://wesbos.com/wp-content/uploads/2013/01/ss-2013-01-08-at-11.27.27-AM.png" alt="ss 2013-01-08 at 11.27.27 AM" width="239" height="114" /></p>
<h3>5. Bold Folder Labels</h3>
<p>One of the downsides to Sublime Text is that the sidebar isn&#8217;t as strong as other editors. One visual cue that helps me out is bolding folders. This helps me quickly identify what is a folder and what is a file.</p>
<pre class="brush:js">"bold_folder_labels": true</pre>
<p><img class="aligncenter size-full wp-image-643" src="https://wesbos.com/wp-content/uploads/2013/01/ss-2013-01-08-at-11.28.45-AM.png" alt="ss 2013-01-08 at 11.28.45 AM" width="215" height="284" /></p>
<h3>More&#8230;</h3>
<p><a href="https://sublimetextbook.com/?utm_source=5tips&#038;utm_medium=banner&#038;utm_campaign=product"><img src="https://sublimetextbook.com/images/facebook-share2.png"></a></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/sublime-text-5-visual-tweaks/feed/</wfw:commentRss>
		<slash:comments>85</slash:comments>
							</item>
		<item>
		<title>Everything I wish I knew running a sole proprietorship business</title>
		<link>https://wesbos.com/sole-proprietorship-ontario/</link>
				<comments>https://wesbos.com/sole-proprietorship-ontario/#comments</comments>
				<pubDate>Tue, 01 Jan 2013 23:02:08 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[The Business of Web Dev]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=599</guid>
				<description><![CDATA[Hey you! Yeah you! I&#8217;m talking to you! Don&#8217;t email me with your questions. Please! Read below Update: This post is extremely popular and the comments are a wealth of information &#8211; make sure to read them. Please remember that &#8230; <a href="https://wesbos.com/sole-proprietorship-ontario/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p><strong>Hey you!</strong></p>
<p><strong>Yeah you!</strong></p>
<p><strong>I&#8217;m talking to you!</strong></p>
<p><strong>Don&#8217;t email me with your questions.</strong></p>
<p><strong>Please! </strong></p>
<p><strong>Read below</strong></p>
<p><strong>Update: This post is extremely popular and the comments are a wealth of information &#8211; make sure to read them. Please remember that these are just my experiences &#8211; I&#8217;m not a tax lawyer and and I cannot consult on your situation &#8211; so please do not call or email me with your questions. You should talk to an accountant, a book keeper or a tax lawyer. Or just call the CRA, they are pretty nice and have the answers your questions. Again, please don&#8217;t email me! </strong></p>
<p>The new year marks the beginning of a new fiscal year for many businesses so I thought I would share a few things I have picked up over the past few years. I&#8217;ve run my web consulting business as a proprietorship the past three years and have picked up quite a few nuggets of useful information along the way. These things seem simple and almost laughable now, but as a greenhorn I wish I had known these before I started.</p>
<p>These tips are best if you are thinking about running a sole proprietorship (a business that is owned and run by a single person) in Canada but are helpful for other outside of the country.</p>
<h3>Hire a good Accountant</h3>
<p>I&#8217;m putting this one first because its by far the most important thing you should do when starting a business. My first year I paid someone $50 to do my taxes and I really got what I paid for. I had my taxes reassessed three times and had to pay the government more each time. The second year around I paid around $700 for the fantastic services of <a href="http://www.waterfordta.com/" target="_blank">Waterford Tax &amp; Advisory</a>&nbsp;who did an amazing job straightening everything out and giving me some fantastic advice which saved me tons in the long run. A good accountant will always be around to answer questions and give you advice. You can&#8217;t afford to use a cheap accountant, trust me.</p>
<h3>Ditch excel, use <a href="http://www.shareasale.com/r.cfm?B=963929&#038;U=976068&#038;M=52946&#038;urllink=" target="_blank">Freshbooks</a></h3>
<p>This is a no-brainer for taking care of estimates, expenses and invoicing clients. At $33 a month, this is one of the more expensive services I subscribe to, but it is worth every penny. At the end of the year I&#8217;m able to export a few reports and send them off to my accountant &#8211; no dealing with spreadsheets. My clients love Freshbooks too &#8211; I often get compliments on both how easy it is to manage invoices and how professional my invoices look like.</p>
<h3>Understand taxes &#8211; Personal and HST</h3>
<p>Starting a business, you are probably coming from &nbsp;a job where all your taxes are taken care of and at the end of the year, you get a nice little return from the government. Not so when you are on your own, take the time to educate yourself on what sort of taxes you need to pay in your area.</p>
<p><strong>Personal Income Taxes:&nbsp;</strong>Running a sole proprietorship in Canada means you get taxed at the same rates as everyone else who isn&#8217;t self-employed. There are both provincial and federal tax rates that vary depending on how much income you bring in. You can run your numbers for both at the <a href="http://www.cra-arc.gc.ca/tx/ndvdls/fq/txrts-eng.html" target="_blank">CRA website</a>.</p>
<p><strong>HST:&nbsp;</strong>I run my business in Ontario, and I need to charge all my clients who live in Ontario 13% HST &#8211; your province or state will have something similar setup. If you are making more than <strong>$30,000&nbsp;a year &nbsp;</strong>you will need to register for a HST number and start collecting.</p>
<p>So, the biggest lesson learned here is&nbsp;<strong>you need to pay a ton of taxes.</strong>&nbsp;As soon as you get a cheque, you should cut out anywhere from <strong>35-50%&nbsp;</strong>(13% HST, 22-37% income tax) &nbsp;&#8211; depending on how high your taxable income is &#8211; and placing it in another account to pay the tax man at the end of the year.</p>
<h3>Keep every receipt and expense everything</h3>
<p>The best thing you can do to reduce how hard you get hit by taxes is to expense every single dollar you pay to run your business. Again, this may seem like easy stuff to some, but its worth noting how this stuff works.</p>
<p>You only get taxed on <strong>net income</strong>, not gross income. So, if you get paid $1,000 for a project, but spent $200 on hosting for it, you will only be taxed on $800.</p>
<p>So, think of every little thing you use to run your business. Buying a new laptop, conference tickets + flights, printer ink, online subscriptions, software licenses&#8230; It all adds up quickly and can really help you reduce your taxable income.</p>
<p>As a business, you also don&#8217;t have to pay HST. So any receipt you have that includes 13% HST, you will get that back from the government when you pay your taxes.</p>
<p><strong>Max out your RRSP</strong></p>
<p>This is a good tip for anyone around tax time. Up until the end of February, you can contribute to the previous years RRSP. Anything you contribute to your RRSP is not taxed, so you can treat it as a huge expense. The amount you con contribute depends on your previous years income, but it could be as much as around $20,000. In Canada, this money is meant to only be taken out at retirement, but there is a special clause that lets you cash it out, without penalty, when you buy your first house.</p>
<h3>Health Insurance is cheap</h3>
<p>My wife recently <a href="kaitbos.com/i-quit/" target="_blank">quit her job</a> to work independently beside me. While we are super happy with that decision, we lost the perk of health benefits. In Canada residents&nbsp;are covered for the big stuff like surgeries and doctors appointments, but not things like medicine, dental work and eyeglasses. Insurance plans are surprisingly affordable, starting at $60 for basic coverage. Kait and I went for pretty good dental, eye and prescription coverage and it was around $160/month.</p>
<p>One other thing, we shopped around on the net for insurance and we didn&#8217;t find any good rates, only after getting in touch with a broker did we find out its much cheaper to have a human do it for you.</p>
<h3>Incorporate to save $$</h3>
<h1>Coming full circle to having a good <span style="color: #222222;">accountant</span>, mine suggested that once you start earning decent income or are working in an arrangement like Kait and I are, it would make sense to ditch the sole proprietorship and incorporate as a business. Its more expensive to incorporate a business (~$500 vs $60) and its a more work to get up and running, but its well worth the tax savings in long run. I&#8217;m only beginning to explore this world but I&#8217;ll be sure to follow up with a post after a few months.</h1>
<h3>That&#8217;s it</h3>
<p>TL;DR : Hire a good accountant and explore every possible way that you can reduce your taxable income. Starting to run your own business can be confusing so hopefully these tips can help you.</p>
<p><strong>Update</strong>: Check <a href="http://wesbos.com/sole-proprietorship-ontario/#comment-951">this comment</a> for a lot more useful tips, thanks Martin</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/sole-proprietorship-ontario/feed/</wfw:commentRss>
		<slash:comments>368</slash:comments>
							</item>
		<item>
		<title>Remote Debugging with Chrome for Android [video + tut]</title>
		<link>https://wesbos.com/remote-debugging-mobile-chrome-android/</link>
				<comments>https://wesbos.com/remote-debugging-mobile-chrome-android/#comments</comments>
				<pubDate>Mon, 13 Feb 2012 14:32:21 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=522</guid>
				<description><![CDATA[Be sure to Follow @wesbos on twitter for more like this 🙂 Earlier this week Chrome for Android was finally announced and web developers everywhere celebrated. Not only did we have one of the best browsers now on our phones, &#8230; <a href="https://wesbos.com/remote-debugging-mobile-chrome-android/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>Be sure to <a href="http://twitter.com/wesbos" target="_blank">Follow @wesbos on twitter</a> for more like this <img src="https://s.w.org/images/core/emoji/12.0.0-1/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /> </p>
<p>Earlier this week Chrome for Android was finally announced and web developers everywhere celebrated. Not only did we have one of the best browsers now on our phones, but we had access to remote debugging, which we have been waiting for and talking about <em>forever</em>.</p>
<p>Remote debugging allows a developer to use the browsers developer tools from a desktop computer while inspecting and manipulating the website on the mobile device &#8211; all in real time! This means you no longer have to use alert boxes to debug a problem that only reproduces on the phone.</p>
<p>So, while there have been a <a href="http://phonegap.github.com/weinre/" target="_blank">few</a> <a href="http://www.opera.com/dragonfly/documentation/remote/" target="_blank">earlier</a> <a href="http://devblog.blackberry.com/2011/06/debugging-blackberry-web-apps/" target="_blank">implementations</a> of something similar, Chrome for android brings us the rock solid experience that we have been waiting for. Without further ado, here is a quick tutorial on how to get remote debugging up and running.</p>
<p>Update: I&#8217;d like to specifically point out that Opera Mobile has has this functionality for quite some time now and you&#8217;re able to do it without USB or a SDK (<a href="http://twitter.com/#!/miketaylr" target="_blank">miketaylr</a> had an awesome presentation on it at jQuer conf). So, develop in whatever browser you prefer and use both these tools when you&#8217;re debugging that specific mobile browser.<br />
<span id="more-522"></span></p>
<h3>What you&#8217;ll need</h3>
<ol>
<li>An android phone that runs Ice Cream Sandwhich</li>
<li>Google Chrome beta from the Android Market</li>
<li>A USB to plug in your phone </li>
<li>The <a title="Android SDK with Remote Debugging" href="http://developer.android.com/sdk" target="_blank">Android SDK </a>if you haven&#8217;t already installed it.</li>
</ol>
<p><iframe class='youtube-player' type='text/html' width='640' height='360' src='https://www.youtube.com/embed/n_7Wyj6DciY?version=3&#038;rel=1&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' allowfullscreen='true' style='border:0;'></iframe></p>
<h3>Installing the Android SDK</h3>
<p>This step is really quick because you either already have the android SDK installed or if you need to install it, we just need a tiny little part of it &#8211; nothing related to the native android development. These instructions are for OSX but they are very similar to Windows, the one differnce being that Windows users must install the <a href="http://developer.android.com/sdk/win-usb.html" target="_blank">USB Driver</a>. Go ahead and download the SDK, unzip it, and put the entire <code>android-sdk-macosx</code> folder somewhere other than your downloads folder. I reccomend keeping it in in <code>/Developer/android-sdk-macosx/</code>. Double click <code>android</code> file and the Android SDK manager will open up. Uncheck everything except the &#8220;Android SDK Platform-tools&#8221; and click &#8220;Install 1 Package&#8221;</p>
<p><img src="https://wesbos.com/wp-content/uploads/2012/02/Screen-Shot-2012-02-11-at-11.30.02-AM3-650x464.png" alt="" title="Screen Shot 2012-02-11 at 11.30.02 AM" width="640" height="456" class="aligncenter size-large wp-image-533" srcset="https://wesbos.com/wp-content/uploads/2012/02/Screen-Shot-2012-02-11-at-11.30.02-AM3-650x464.png 650w, https://wesbos.com/wp-content/uploads/2012/02/Screen-Shot-2012-02-11-at-11.30.02-AM3-300x214.png 300w, https://wesbos.com/wp-content/uploads/2012/02/Screen-Shot-2012-02-11-at-11.30.02-AM3.png 700w" sizes="(max-width: 640px) 100vw, 640px" /></p>
<p>You&#8217;ll also probably want to add the <code>/platform tools/</code> to your $PATH so you can access the <code>adb</code> command from any folder rather than just in the platform tools folder. Run the following command  from your terminal.</p>
<p><code>export PATH=$PATH:/Developer/android-sdk-macosx/platform-tools</code></p>
<h3>Preparing your phone</h3>
<p>There are two things you need to enable to make remote debugging. Plug your phone in via USB and set the following two options.</p>
<ol>
<li>Check the box for <code>Settings</code> &rarr; <code>Developer options</code> &#038;rarrl <code>USB debugging</code></li>
<li>Open Chrome on your phone &rarr; <code>Settings</code> &rarr; <code>Developer Tools</code> &rarr; <code>check Enable USB Web debugging</code></li>
</ol>
<h3>Starting the remote debugging!</h3>
<p>Now that we have everything in place and our phone is plugged in, we can start the remote debugging server. Fire open your terminal and type the following command and hit enter:</p>
<p><code>adb forward tcp:9222 localabstract:chrome_devtools_remote</code></p>
<p>Occasionally I&#8217;ll either get no response or a &#8220;device not found&#8221; error. I&#8217;ve found that running the command <code>adb kill-server</code> and then the code above resurrects the situation.</p>
<p><img src="https://wesbos.com/wp-content/uploads/2012/02/Screen-Shot-2012-02-11-at-12.07.17-PM.png" alt="" title="adb forward tcp:9222 localabstract:chrome_devtools_remote" width="562" height="170" class="aligncenter size-full wp-image-538" srcset="https://wesbos.com/wp-content/uploads/2012/02/Screen-Shot-2012-02-11-at-12.07.17-PM.png 562w, https://wesbos.com/wp-content/uploads/2012/02/Screen-Shot-2012-02-11-at-12.07.17-PM-300x90.png 300w" sizes="(max-width: 562px) 100vw, 562px" /></p>
<p>Now browse to <a href="http://localhost:9222" target="_blank">http://localhost:9222</a> on your desktop version of chrome and you will see a list of currently open tabs on your phone, clicking one of them will reveal the Chrome dev tools interface that you&#8217;re used to. Instead of having the window above the tools, its on your phone!</p>
<p><img src="https://wesbos.com/wp-content/uploads/2012/02/Screen-Shot-2012-02-11-at-12.39.28-PM-650x373.png" alt="" title="Chrome Remote Debugging" width="640" height="367" class="aligncenter size-large wp-image-540" srcset="https://wesbos.com/wp-content/uploads/2012/02/Screen-Shot-2012-02-11-at-12.39.28-PM-650x373.png 650w, https://wesbos.com/wp-content/uploads/2012/02/Screen-Shot-2012-02-11-at-12.39.28-PM-300x172.png 300w, https://wesbos.com/wp-content/uploads/2012/02/Screen-Shot-2012-02-11-at-12.39.28-PM.png 785w" sizes="(max-width: 640px) 100vw, 640px" /></p>
<p>You can use it just as if you were using your regular dev tools. Go ahead change the CSS background colour or send an alert over the console.</p>
<p><img src="https://wesbos.com/wp-content/uploads/2012/02/Screen-Shot-2012-02-11-at-12.44.50-PM-300x284.png" alt="" title="Remote Debugging Alert" width="300" height="284" class="alignleft size-medium wp-image-541" srcset="https://wesbos.com/wp-content/uploads/2012/02/Screen-Shot-2012-02-11-at-12.44.50-PM-300x284.png 300w, https://wesbos.com/wp-content/uploads/2012/02/Screen-Shot-2012-02-11-at-12.44.50-PM.png 400w" sizes="(max-width: 300px) 100vw, 300px" /><br />
<img src="https://wesbos.com/wp-content/uploads/2012/02/Screenshot_2012-02-11-12-54-40-180x300.png" alt="" title="Screenshot_2012-02-11-12-54-40" width="180" height="300" class="alignright size-medium wp-image-542" srcset="https://wesbos.com/wp-content/uploads/2012/02/Screenshot_2012-02-11-12-54-40-180x300.png 180w, https://wesbos.com/wp-content/uploads/2012/02/Screenshot_2012-02-11-12-54-40.png 480w" sizes="(max-width: 180px) 100vw, 180px" /></p>
<div class="clear"></div>
<h3>Thats all folks!</h3>
<p>Thats all, its an incredible useful tool that we have all been looking forward to. Now we wait with baited breath for Safari on IOS to turn on remote debugging.</p>
<p>If you liked this tutorial, be sure to give me a <a href="http://twitter.com/wesbos" target="_blank">follow on twitter</a> <img src="https://s.w.org/images/core/emoji/12.0.0-1/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /> </p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/remote-debugging-mobile-chrome-android/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
							</item>
		<item>
		<title>What I learned interviewing with Google</title>
		<link>https://wesbos.com/interviewing-with-google/</link>
				<comments>https://wesbos.com/interviewing-with-google/#comments</comments>
				<pubDate>Thu, 09 Feb 2012 05:29:59 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=508</guid>
				<description><![CDATA[Over the last few weeks I&#8217;ve been interviewing with Google for a job doing primarily JavaScript development. I didn&#8217;t end up getting the job but I thought I would share the process of interviewing for Google as it was both &#8230; <a href="https://wesbos.com/interviewing-with-google/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>Over the last few weeks I&#8217;ve been interviewing with Google for a job doing primarily JavaScript development. I didn&#8217;t end up getting the job but I thought I would share the process of interviewing for Google as it was both very exciting and a humbling experience. I can&#8217;t reveal everything as I&#8217;m under a few NDAs. I&#8217;m not going to mention the products or teams that I was interviewing for but you may be able to guess.</p>
<p>For those that don&#8217;t know me, I&#8217;m an independent developer/designer. A majority of my work falls into the four categories of JavaScript development, WordPress development, HTML5/CSS3 or UI/UX design. I absolutely love running my own show and it would take quite a bit to get me to switch out.</p>
<p><strong>In the beginning</strong></p>
<p>So, a few months ago I had a Google employee ask me if I was interested in joining their team. As I said, I&#8217;m super happy with what I&#8217;m doing at the moment but I didn&#8217;t want to turn down the chance to interview or even work for Google. I happily passed along my resume and that was the end of that for about 5-6 months.<br />
<span id="more-508"></span><br />
Cut to about 3 weeks ago, I received an email from a Google recruiter asking if I was interested in a software engineer job down in Boston. I told her I was and we arranged a phone interview.</p>
<p>At this point I was really excited because it&#8217;s always been a bit of a dream of mine to work for Google but I have always assumed two things:</p>
<ul>
<li>Google only hires those with an educational background in Computer Science</li>
<li>Google only hires people with a well versed background in many programming languages.</li>
</ul>
<p>I went to school for Information Technology Management at Ryerson University where I graduated with a bComm. My schooling was more about development methodologies, project management, systems analysis and other high level IT skills combined with way too much math and management approaches. I took one course on development which gave me an excellent primer to C and Unix but it was far from what those in Computer science learn. I&#8217;ve been coding since I can remember and have just picked up my chops along the way mainly focusing on PHP development and the last few years, JavaScript.</p>
<p>So, needless to say I wasn&#8217;t as well versed in some algorithms and big O as someone who spent 4 years in Comp Sci but I have a pretty good handle on the languages I do know.</p>
<p><strong>The First Interview</strong></p>
<p>The first interview was over the phone with a Google HR rep. It was a fairly quick 20 minute interview where I talked about what sort of projects I liked to work on, what languages were my favourite and my background in both employment and schooling. I also told her I&#8217;d be willing to move down to Boston but would love a spot at their Waterloo office (which is about a 1.5 hour drive from Toronto). She told me they primarily hire strong C++ and Java developers, something which I have very little experience with. After I talked about how much I enjoyed front end development, she said that I would be a good fit for a spot in their Waterloo office.</p>
<p>We arranged to do two interviews in one day in about a week and a half. The HR rep sent over an email with some guidelines and things to brush up on which included comp sci 101 things such as sorting algos, hash tables, binary trees and so on. I was familiar with a few things on the list, but I definitely had to do a lot of reading in the week and a half before my interview.</p>
<p><strong>Meeting with Google engineers and coding on a whiteboard</strong></p>
<p>After a few late, panicked nights and handfuls of really fun JavaScript problems from my good friend <a href="http://darcyclarke.me" target="_blank" rel="noopener noreferrer">Darcy Clarke</a> who did his best to prepare me, I was ready for my two interviews with the engineers.</p>
<p>My first interview was with a mobile developer and it lasted around an hour. He started off discussing different types of sorts, explaining what algorithms would be more performant, which situations I would use a specific algorithm and a whole smattering of comp sci terminology which I had to explain. I tripped over quite a few of these and felt pretty embarrassed. After that we moved onto talking about JavaScript performance, I wish I could say more here but not revealing the questions asked was a large part of the NDA. After that we moved into talking about design for mobile devices. After this and the JavaScript questions I started to feel pretty good about it. We ended the interview with a 25 minute coding question that had to do with efficiently sorting arrays. I had never coded on a whiteboard before and I felt like I made a few stupid mistakes.</p>
<p>Next up was another mobile developer from another product that they work on in the Google Waterloo office. We started off talking JavaScript performance again and then jumped right into the coding problem on the whiteboard. I was pretty nervous at this point in time and I made a few more silly mistakes that I wouldn&#8217;t have done in a proper IDE. We finished the interview talking about some HTML5 video stuff I was working on and talked a little bit about typed javascript compression.</p>
<p>I left after that feeling that I totally slam dunked parts of the interview and bombed other parts.</p>
<p><strong>Whew, its over.</strong></p>
<p>A few days later I got a call from the HR person at Google and she told me in the nicest way possible that I wasn&#8217;t a fit for the position. She said she would keep me in mind for future positions, which is nice whether they meant it or not <img src="https://s.w.org/images/core/emoji/12.0.0-1/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>Coming out of this I&#8217;m not particularly bummed out, it was a fantastic experience to interview with Google, I&#8217;m honoured they had me come in and interview; its something I never would have thought would happen to me. I still have a really awesome job where I work on some really awesome projects and I have an incredible drive to keep learning more about web development. To sum it up what I learned in a few points:</p>
<ol>
<li>Comp sci problems are a ton of fun to solve in JavaScript. I practiced a lot with Nicholas Zakas&#8217; <a href="http://www.nczonline.net/blog/tag/computer-science/" target="_blank" rel="noopener noreferrer">computer science in JavaScript </a> posts.</li>
<li>Even if you aren&#8217;t a leet C++ or Java dev, Google still takes interest</li>
<li>Learning another language helps you become a more rounded developer. This experience hasn&#8217;t made me want to go back to writing C but I may take interest in another language that isn&#8217;t as forgiving as JavaScript.</li>
<li>Coding Chops &gt; Comp Sci degree</li>
<li>A Comp Sci degree is very helpful when trying to explain Hash tables, Vectors and Big O</li>
<li>Always be hustlin&#8217; A few years ago I would have never have thought I would be interviewing at google just 9 months fresh out of school. Anything can happen.</li>
</ol>
<p>&nbsp;</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/interviewing-with-google/feed/</wfw:commentRss>
		<slash:comments>49</slash:comments>
							</item>
		<item>
		<title>HTML5 Shirt Giveaway!</title>
		<link>https://wesbos.com/html5-shirt-giveaway/</link>
				<comments>https://wesbos.com/html5-shirt-giveaway/#comments</comments>
				<pubDate>Thu, 05 Jan 2012 16:36:13 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[HTML5]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=471</guid>
				<description><![CDATA[Happy New Year! I hope everyone had an awesome holidays. To celebrate, I&#8217;m going to be giving away 5 of these kickass HTML5 shirts that the folks at Microsoft have kindly provided. These aren&#8217;t your regular HTML5 shirts, they come &#8230; <a href="https://wesbos.com/html5-shirt-giveaway/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>Happy New Year! I hope everyone had an awesome holidays. To celebrate, I&#8217;m going to be giving away 5 of these kickass HTML5 shirts that the folks at Microsoft have kindly provided.</p>
<p>These aren&#8217;t your regular HTML5 shirts, they come from Canada so naturally they involve a polar bear, a beaver and a moose.</p>
<p><img class="aligncenter size-full wp-image-472" title="html53" src="https://wesbos.com/wp-content/uploads/2012/01/html53.png" alt="" width="650" height="400" srcset="https://wesbos.com/wp-content/uploads/2012/01/html53.png 650w, https://wesbos.com/wp-content/uploads/2012/01/html53-300x184.png 300w" sizes="(max-width: 650px) 100vw, 650px" /><img class="aligncenter size-full wp-image-474" title="html2" src="https://wesbos.com/wp-content/uploads/2012/01/html21.png" alt="" width="650" height="400" srcset="https://wesbos.com/wp-content/uploads/2012/01/html21.png 650w, https://wesbos.com/wp-content/uploads/2012/01/html21-300x184.png 300w" sizes="(max-width: 650px) 100vw, 650px" /></p>
<p><strong>How To Enter</strong></p>
<p>To enter, simply sent out a tweet with the hashtag #HTML5shirt and a link to this post.</p>
<p>&#8220;Win a #HTML5shirt from @wesbos http://wesbos.com/html5-shirt-giveaway&#8221;</p>
<p><a href="https://twitter.com/share" class="twitter-share-button" data-url="http://wesbos.com/html5-shirt-giveaway/" data-text="Win a #HTML5shirt from @wesbos" data-size="large" data-related="wesbos">Tweet</a></p>
<p>I will be giving them away to 5 random tweeters and using <a href="http://twittertwitterchickendinner.com" target="_blank">twittertwitterchickendinner.com</a> to pick the winners. I&#8217;ll ship you the shirt anywhere in the world. I have them in most sizes but is first come first serve.</p>
<p>Thats it, good luck and if you so please, follow me on twitter for more on HTML5. <a href="https://twitter.com/wesbos" class="twitter-follow-button" data-show-count="false">Follow @wesbos</a></p>
<p><strong>Update: Winners!</strong><br />
First off, thanks to everyone who entered the draw, having almost 2,000 enter is pretty nuts! I&#8217;ll have to find a way I can do this again because you guys love your free shirts <img src="https://s.w.org/images/core/emoji/12.0.0-1/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>Drumroll please&#8230; The Winners are: </p>
<p>@steno, @sheppy, @csixty4, @oscargodson and @PatridgeDev</p>
<p>Congrats! Contact me wes@wesbos.com within 24 hours with a mailing address and shirt size to claim you prize.</p>
<p>Thanks again everyone, I have some really cool HTML5 stuff coming down the pipe so stay tuned!</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/html5-shirt-giveaway/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
							</item>
		<item>
		<title>Upcoming Talks and Workshops!</title>
		<link>https://wesbos.com/upcoming-talks-and-workshops/</link>
				<comments>https://wesbos.com/upcoming-talks-and-workshops/#comments</comments>
				<pubDate>Thu, 10 Nov 2011 00:46:49 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[devto]]></category>
		<category><![CDATA[ladies learning code]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=464</guid>
				<description><![CDATA[This November I have two development related talks coming up and I thought I would take a second to formally invite you! The first is an all day workshop on WordPress development which is being done with the great folks &#8230; <a href="https://wesbos.com/upcoming-talks-and-workshops/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>This November I have two development related talks coming up and I thought I would take a second to formally invite you!</p>
<p>The first is an all day workshop on WordPress development which is being done with the great folks at <a href="http://ladieslearningcode.com/" target="_blank">Ladies Learning Code</a>. If you haven&#8217;t heard yet, LLC is an awesome initiative started by a few<a href="http://ladieslearningcode.com/about/" target="_blank"> Toronto ladies</a> with the purpose of creating a comfortable environment where women can learn basic web development skills. I will be leading the upcoming WordPress workshop where I will take you from installing WordPress to making your very own theme. The workshop is on Saturday, November 26 and costs $40. The first round of tickets sold out in a heart beat, so be sure to <a href="http://ladieslearningcodenov26.eventbrite.com/" target="_blank">sign up for the second round </a>if you&#8217;re interested!</p>
<p>The second is quick talk on HTML5 Canvas at the <a href="http://devto.ca/" target="_blank">#devTo</a> meetup. This event is held once a month and is open to anyone who is interested in chatting about development. I&#8217;ve been to the last few meetups and I&#8217;ve found them pretty awesome. There a good mix of designers, developers (of all languages) and industry folk which always allows for good conversation (the free pizza and beer aren&#8217;t bad either!). I&#8217;ll be doing a quick introduction to the HTML5 Canvas element, what it is, what we can do with it, how to work with it as well as showing a few examples of stuff I&#8217;ve done with it. Canvas really is one of the most exciting parts of HTML5 so I&#8217;m looking forward to sharing what I&#8217;ve done so far. This event is always super popular and has already sold out, so get on the <a href="http://atendy.com/event/240747" target="_blank">wait list</a> and cross your fingers!</p>
<p>Thats all for now, hope to see you at one of the upcoming events!</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/upcoming-talks-and-workshops/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
							</item>
		<item>
		<title>Hide iOS5 Newsstand Icon on the iPhone</title>
		<link>https://wesbos.com/hide-newsstand-icon-iphone/</link>
				<comments>https://wesbos.com/hide-newsstand-icon-iphone/#comments</comments>
				<pubDate>Thu, 13 Oct 2011 20:09:47 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=453</guid>
				<description><![CDATA[Many people, myself included, were annoyed that you aren&#8217;t able to put the new Newsstand Icon in a folder. Well a quick little hack I found today lets you do just that! Turns out you can trick iOS5 by creating &#8230; <a href="https://wesbos.com/hide-newsstand-icon-iphone/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>Many people, myself included, were annoyed that you aren&#8217;t able to put the new Newsstand Icon in a folder. Well a quick little <a href="http://thecodingmassacre.wordpress.com/2011/10/13/newsstand-folder-no-jailbreak-ios-5/" target="_blank">hack</a> I found today lets you do just that! Turns out you can trick iOS5 by creating a folder with other icons and then quickly drag it into that folder.</p>
<p>This doesn&#8217;t require you to jail break, but it does take a quick finger! Watch this video to see how to do it:</p>
<p><iframe class='youtube-player' type='text/html' width='640' height='360' src='https://www.youtube.com/embed/mSM1_gzi4yI?version=3&#038;rel=1&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;hd=1&#038;wmode=transparent' allowfullscreen='true' style='border:0;'></iframe></p>
<h3>Note</h3>
<p>This should only be done if you are no using newsstand. Trying to launch newsstand from within a folder crashes springboard!</h3>
<p>Cool eh? Follow me on <a href="http://twitter.com/wesbos">Twitter</a> for more like this <img src="https://s.w.org/images/core/emoji/12.0.0-1/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /> </p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/hide-newsstand-icon-iphone/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
							</item>
		<item>
		<title>Code Folding in Sublime Text</title>
		<link>https://wesbos.com/sublime-text-code-folding/</link>
				<comments>https://wesbos.com/sublime-text-code-folding/#comments</comments>
				<pubDate>Tue, 04 Oct 2011 03:20:08 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Sublime Text]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=437</guid>
				<description><![CDATA[To continue on with my string of blog posts on Sublime Text, I&#8217;m going to show you a short but handy feature that was just pushed to the stable build. Code Folding! Unfortunately, collapsing of code in sublime text isn&#8217;t &#8230; <a href="https://wesbos.com/sublime-text-code-folding/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>To continue on with my string of blog posts on Sublime Text, I&#8217;m going to show you a short but handy feature that was just pushed to the stable build. Code Folding!</p>
<p>Unfortunately, collapsing of code in sublime text isn&#8217;t exactly the same as textmate, so you dont get the little arrows in the sidebar. The code is also folded into a single character which makes it easy to delete an entire block of folded code without noticing you have done so. This is the first iteration of code folding in sublime text 2, so I&#8217;m sure it will only get better. With those cautions in mind lets take a look at how to work code folding in Sublime.<br />
<span id="more-437"></span></p>
<p><iframe class='youtube-player' type='text/html' width='640' height='360' src='https://www.youtube.com/embed/80UUPMUAP-g?version=3&#038;rel=1&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;hd=1&#038;wmode=transparent' allowfullscreen='true' style='border:0;'></iframe></p>
<h3>Practice Code</h3>
<p>Code folding works in all languages. I&#8217;ve created a small snippet of JavaScript which we can use to practice. Copy and paste this into Sublime and set the document mode as JavaScript.</p>
<pre class="brush:js">var obj = {
    myStr: "Hello",
    myFunc : function() {
        console.log("hello");
        $('.someDiv').animate({height: 500}, function(){}
            // trigger the callback
            console.log('Done');
        });
    },
    myFunc2 : function() {
        return "Just another Level 2 function";
    },
    myNum : function() {
        return "Level 2 function";
    }
}</pre>
<h3>Folding Selected Text</h3>
<p>This is probably what you came here looking for. you want to select a few lines of text and fold them out of the way. Easy!</p>
<p>Select the text you want to fold and hit <code> Command + Option + [</code>. You&#8217;ll now see you have a little icon indicating you have folded some code.</p>
<p><img class="alignleft size-full wp-image-423" title="Screen Shot 2011-10-03 at 5.32.13 PM" src="https://wesbos.com/wp-content/uploads/2011/10/Screen-Shot-2011-10-03-at-5.32.13-PM.png" alt="" width="244" height="124" /></p>
<p>To unfold your code, hit the opposite <code> Command + Option + ]</code>.</p>
<p><strong>*Note:  Windows users, substitute command and option for CTRL + SHIFT</strong></p>
<h3>Block level code folding is where its at!</h3>
<p>Selecting the code you want to fold can be a pain. If you maintain nice, clean indenting within your document, you&#8217;ll be able to quickly fold and unfold several levels of code in just a few key strokes.</p>
<p>To fold a block, place your cursor anywhere within the block you want to fold. For our example, lets place it in the myFunc function. Now you just hit the folding keys to collapse that block.<br />
<code> Command + Option + [</code></p>
<p><img class="aligncenter size-full wp-image-424" title="Sublime Text Block Code Folding" src="https://wesbos.com/wp-content/uploads/2011/10/Screen-Shot-2011-10-03-at-5.37.27-PM.png" alt="" width="432" height="245" srcset="https://wesbos.com/wp-content/uploads/2011/10/Screen-Shot-2011-10-03-at-5.37.27-PM.png 432w, https://wesbos.com/wp-content/uploads/2011/10/Screen-Shot-2011-10-03-at-5.37.27-PM-300x170.png 300w" sizes="(max-width: 432px) 100vw, 432px" /></p>
<h3>Fold Multiple blocks at once</h3>
<p>Another handy feature of Sublime Text 2 code folding is being able to fold all blocks that are indented with a certain level. For this example, I want to fold all the and just see the the properties/functions of <code>obj</code>.</p>
<p>The keyboard shortcut for this is a little different. We need to hold down <code>Command</code> and then tap <code>k</code>.<br />
While you are still holding down <code>Command</code> tap the level of code block you want to fold. In this case 2.</p>
<p>Confused? <code>CMD + K, CMD + 2</code></p>
<p>We now see that everything beyond 2nd level blocks are hidden. To unfold everything again, we do the same thing but with 0.</p>
<p><code>CMD + K, CMD + 0</code></p>
<h3>Folding Tag attributes</h3>
<p><img class="alignright size-full wp-image-427" title="Sublime Text Attribute Folding" src="https://wesbos.com/wp-content/uploads/2011/10/Screen-Shot-2011-10-03-at-5.50.54-PM.png" alt="" width="275" height="378" srcset="https://wesbos.com/wp-content/uploads/2011/10/Screen-Shot-2011-10-03-at-5.50.54-PM.png 275w, https://wesbos.com/wp-content/uploads/2011/10/Screen-Shot-2011-10-03-at-5.50.54-PM-218x300.png 218w" sizes="(max-width: 275px) 100vw, 275px" />When working with an HTML document that is heavy on attributes, it can be helpful to hide everything but the element type. This is extremely useful when working with something like jQuery UI that have long class names, titles, data, and aria attribues. Now, this one is all or nothing, so you can&#8217;t hide them case-by-case.</p>
<p>To hide:<br />
<code>CMD + K, CMD + T</code></p>
<p>To show again:<br />
<code>CMD + K, CMD + 0</code></p>
<p></p>
<h4>You&#8217;re now a cold folding master</h4>
<p>Do each of these folding steps a few times to get the hang of it and you will find it very useful in your day to day development.</p>
<p>Let me know if you have any questions. If you like this stuff please <a href="http://twitter.com/wesbos">Follow Me on Twitter</a>.</p>
<p><a href="https://sublimetextbook.com/?utm_source=codefolding&#038;utm_medium=banner&#038;utm_campaign=product"><img src="https://sublimetextbook.com/images/facebook-share2.png"></a></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/sublime-text-code-folding/feed/</wfw:commentRss>
		<slash:comments>35</slash:comments>
							</item>
		<item>
		<title>Sublime Text 2 Build System Scripts: CoffeeScript &#038; Node</title>
		<link>https://wesbos.com/sublime-text-build-scripts/</link>
				<comments>https://wesbos.com/sublime-text-build-scripts/#comments</comments>
				<pubDate>Thu, 29 Sep 2011 00:32:48 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[NodeJS]]></category>
		<category><![CDATA[Other]]></category>
		<category><![CDATA[Sublime Text]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=408</guid>
				<description><![CDATA[A really great feature of Sublime Text 2 is the ability to create your own build scripts. A build script is helpful when you are writing in a language that needs to be compiled or executed from terminal / command &#8230; <a href="https://wesbos.com/sublime-text-build-scripts/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>A really great feature of <a href="http://www.sublimetext.com/2" target="blank">Sublime Text 2</a> is the ability to create your own build scripts. A build script is helpful when you are writing in a language that needs to be compiled or executed from terminal / command line. I personally use build scripts to compile the current file into CoffeeScript as well as run the current file in Node JS.</p>
<p>Watch the tutorial or continue reading to learn how to make Sublime Text 2 build scripts.<br />
<span id="more-408"></span><br />
<iframe class='youtube-player' type='text/html' width='640' height='360' src='https://www.youtube.com/embed/iejQvQF-vZo?version=3&#038;rel=1&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;hd=1&#038;wmode=transparent' allowfullscreen='true' style='border:0;'></iframe></p>
<h3>Creating a Build Script</h3>
<p>To get started, go to <code>Tools->Build System -> New Build System... </code> and you will be presented with the boilerplate for a build script.</p>
<p>We have four lines to feed into our <code>.sublime-build</code> file:</p>
<ul>
<li><strong>cmd</strong> is an array of commends that will be run.
<li>
<li><strong>selector</strong> is an optional way to scope the build script to a specific filetype</li>
<li><strong>path</strong> is where the command is to be executed. Because sublime executes it in the python console, we need to specify where on our system the compliler we want to use lies.</li>
<li><strong>file_regex</strong> specifies where the error lines are and what to be returned.</li>
</ul>
<p>For a complete list of all the variables available within a build script, check the <a href="http://sublimetext.info/docs/en/reference/build_systems.html" target="_blank">variable reference</a>.</p>
<h3>CoffeeScript Build Script</h3>
<p>So, to create our CoffeeScript build file, we simply fill in the following three lines. Keep in mind that with the Node.js coffeescript compiler we would normally execute something similar to this in the terminal:</p>
<p><code>coffee -c /path/to/file.coffee</code></p>
<pre class="brush:js">
{
    "cmd": ["coffee","-c", "$file"],
    "selector" : "source.coffee",
    "path" : "/usr/local/bin"
}
</pre>
<p>Save your file in your user packages folder and restart Sublime Text. On OSX its located at:<br />
<code> ~/Library/Application Support/Sublime Text 2/Packages/User</code></p>
<p>Now every time we hit <strong>CMD + B</strong> our coffeescript file will be compiled with the build script. If you want to watch the file for changes after the first compile, simply switch the first line to <code>"cmd": ["coffee","-wc", "$file"],</code>. If anyone is using my <a href="https://github.com/wesbos/coffeescript-growl" target="_blank">CoffeeScript-Growl plugin</a>, change your first line to <code>"cmd": ["coffee", "-r", "coffeescript-growl", "-wc", "$file"],</code> to get growl notifications.</p>
<h3>Node.js Files</h3>
<p>Another use for Sublime Text build scripts is launching the nodejs file you are currently working on. Our build script now looks something like this:</p>
<pre class="brush:js">
{
    "cmd": ["node", "$file"],
    "selector" : "source.js",
    "path" : "/usr/local/bin"
}
</pre>
<h3>Thats is!</h3>
<p>Pretty simple, eh? There is a lot of room for expanding these builds and making them do a lot of the manual work for you. If you have anything to add, please post it in the comments and I&#8217;ll be sure to add it to the post.</p>
<p>As always be sure to <a href="http://www.twitter.com" target="_blank">Follow me on Twitter</a></p>
<p><a href="https://sublimetextbook.com/?utm_source=buildsystems&#038;utm_medium=banner&#038;utm_campaign=product"><img src="https://sublimetextbook.com/images/facebook-share2.png"></a></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/sublime-text-build-scripts/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
							</item>
		<item>
		<title>JavaScript Face Detection + Canvas + Video = HTML5 Glasses!</title>
		<link>https://wesbos.com/html5-video-face-detection-canvas-javascript/</link>
				<comments>https://wesbos.com/html5-video-face-detection-canvas-javascript/#comments</comments>
				<pubDate>Tue, 27 Sep 2011 02:50:19 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=388</guid>
				<description><![CDATA[This morning I saw this link on youtube which was a little mashup of some HTML5 technologies. I thought it would be funny if I could do the same, but with goofy pair of glasses. I&#8217;ve also been itching to &#8230; <a href="https://wesbos.com/html5-video-face-detection-canvas-javascript/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>This morning I saw <a href="http://www.youtube.com/watch?v=EBxDyr--HIY" target="_blank">this</a> link on youtube which was a little mashup of some HTML5 technologies. I thought it would be funny if I could do the same, but with goofy pair of glasses. I&#8217;ve also been itching to put the <a title="JavaScript Face Detection" href="https://github.com/liuliu/ccv" target="_blank">CCV</a> JavaScript Face Detection library to use. This library shows a few examples on static images, but after a quick look at the code, it shows that the underlying element to the script is a canvas element. So instead of running it on a single image, I am running it on a feed of frames coming from an HTML5 video element.</p>
<p>I&#8217;ll go into the technical details further on in the post, but here is a demo as well as a youtube video showing the effect as it can be a little sluggish on older machines. Currently tested and working in Google Chrome 14 and Firefox 6.0. <span id="more-388"></span></p>
<p><a href="http://wesbos.com/demos/html5-face-detection/" target="_blank">Try the Demo</a>   |  <a href="https://github.com/wesbos/HTML5-Face-Detection" target="_blank">Download the Source</a></p>
<p><iframe class='youtube-player' type='text/html' width='640' height='360' src='https://www.youtube.com/embed/YYES9Qd094o?version=3&#038;rel=1&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;hd=1&#038;wmode=transparent' allowfullscreen='true' style='border:0;'></iframe></p>
<h3>Setting up our document</h3>
<p>To get started, we dont really need that much. Only two of the files from the CCV Library are required are <a title="CCV.JS Face Detection" href="https://github.com/liuliu/ccv/blob/stable/js/ccv.js" target="_blank">CCV.js</a> which does the acutal detection of the the face, and <a href="https://github.com/liuliu/ccv/blob/stable/js/face.js" target="_blank">face.js</a> which holds the data for what faces look like. We will also need an empty canvas element, a HTML5 video element with .MP4 and .OGG encoded files  (I used <a href="http://www.mirovideoconverter.com/" target="_blank">Miro</a> to convert mine), and a blank scripts.js file. Things will look like this when we are setup:</p>
<pre class="brush:xml">&lt;!DOCTYPE html&gt;&lt;html&gt;&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
&lt;title&gt;HTML5 Face Detection&lt;/title&gt;
&lt;link rel="stylesheet" href="style.css"/&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div class="wrapper"&gt;
	&lt;h1&gt;HTML5 GLASSES&lt;/h1&gt;
	&lt;p&gt;Created by &lt;a href="http://twitter.com/wesbos" target="_blank"&gt;Wes Bos&lt;/a&gt;. See full details &lt;a href=""&gt;here.&lt;/a&gt;&lt;/p&gt;
	&lt;!-- Our Main Video Element --&gt;
	&lt;video height="426" width="640" controls="false"&gt;
		&lt;source src="videos/wes4.ogg" /&gt;
		&lt;source src="videos/wes4.mp4" /&gt;
	&lt;/video&gt;

	&lt;!-- Out Canvas Element for output --&gt;
	&lt;canvas id="output"  height="426" width="640" &gt;&lt;/canvas&gt;

	&lt;!-- div to track progress --&gt;
	&lt;div id="elapsed_time"&gt;Press play for HTML5 Glasses!&lt;/div&gt;
&lt;/div&gt;
&lt;script type="text/javascript" src="scripts/ccv.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="scripts/face.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="scripts/scripts.js"&gt;&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>&nbsp;</p>
<h3>Let&#8217;s write some JavaScript!</h3>
<p>The core of this application is just a single function called <code>html5glasses()</code> that runs every 200 miliseconds. The function grabs the current frame from the window, spits it onto the canvas and then lets the CCV JS library detect the face. When it  returns the data we loop through each of the found faces and and apply the silly glasses.</p>
<p>I should note that this isn&#8217;t the fastest thing in the world, and it is blocking. In the CCV examples, they provide a web worker example so we could do this asynchronously, but in my tests it was significantly slower. This is new technology and will only get better. On my computer I see a new frame about every 300 miliseconds, or 3 times a second.</p>
<h3>Setup the JavaScript Variables</h3>
<p>I&#8217;ve commented these inline.</p>
<pre class="brush:js">
var		
		// Store the first HTML5 video element in the document
		video = document.querySelector('video'),
		// We use this to time how long things are taking. Not that important..
		time_dump = document.getElementById("elapsed_time"),
		// Create a new image that will be our goofy glasses
		glasses = new Image(),
		// Store the canvas so we can write to it
		canvas = document.getElementById("output"),
		// Get the canvas 2d Context
		ctx = canvas.getContext("2d");
		// Finally set the source of our new glasses img element
		glasses.src = "i/glasses.png";
</pre>
<h3>Create our main html5glasses() function</h3>
<p>This is where all the magic happens. Read through each line and realize what is happening. Pay specific attenton to the <code>ccv.detect_objects()</code> function.</p>
<pre class="brush:js">
function html5glasses() {
	// Start the clock 
	var elapsed_time = (new Date()).getTime();

	// Draw the video to canvas
	ctx.drawImage(video, 0, 0, video.width, video.height, 0, 0, canvas.width, canvas.height);

	// use the face detection library to find the face
	var comp = ccv.detect_objects({ "canvas" : (ccv.pre(canvas)),
									"cascade" : cascade,
									"interval" : 5,
									"min_neighbors" : 1 });

	// Stop the clock
	time_dump.innerHTML = "Process time : " + ((new Date()).getTime() - elapsed_time).toString() + "ms";

	// Draw glasses on everyone!
	for (var i = 0; i < comp.length; i++) {
		ctx.drawImage(glasses, comp[i].x, comp[i].y,comp[i].width, comp[i].height);
	}
}
</pre>
<h3>Finally, trigger it!</h3>
<p>We trigger the detection when the video element is played and stop it when it reaches the end. </p>
<pre class="brush:js">
/* Events */ 

video.addEventListener('play', function() {
	vidInterval = setInterval(html5glasses,200); 
});

video.addEventListener('ended', function() {
	clearInterval(vidInterval);
	time_dump.innerHTML = "finished";
});
</pre>
<h3> Pretty cool, eh? </h3>
<p>I'm just getting into CCV, but the library can be extended to recognize much more than just faces. If you take at look at the github repo, they have examples for detecting all kinds of things.</p>
<h3>What else?</h3>
<p>Next time I'm in the mood for a little hack, I'll try and hook this up to a flash webcam app or <a href="http://mozillalabs.com/rainbow/" target="_blank">Mozilla's Rainbow</a> to stream the data right from the device itself, giving us realtime funny glasses!</p>
<p>Let me know if you have any ideas or questions. I'm <a href="http://twitter.com/wesbos" target="_blank">@wesbos on twitter</a> and have hosted the source on Git Hub</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/html5-video-face-detection-canvas-javascript/feed/</wfw:commentRss>
		<slash:comments>58</slash:comments>
							</item>
		<item>
		<title>5 Helpful Tips for moving to Sublime Text 2</title>
		<link>https://wesbos.com/sublime-text-2-tips/</link>
				<comments>https://wesbos.com/sublime-text-2-tips/#comments</comments>
				<pubDate>Thu, 22 Sep 2011 20:54:03 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Sublime Text]]></category>
		<category><![CDATA[sublime]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=359</guid>
				<description><![CDATA[I&#8217;m a long time Coda user. A few months ago I, like everyone else, decided to switch over to vim. I really liked Vim but just couldn&#8217;t get the hang of it for whatever reason. After shamefully crawling back to &#8230; <a href="https://wesbos.com/sublime-text-2-tips/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>I&#8217;m a long time <a href="http://www.panic.com/coda/" target="_blank">Coda</a> user. A few months ago I, like everyone else, decided to switch over to vim. I really liked Vim but just couldn&#8217;t get the hang of it for whatever reason. After shamefully crawling back to Coda, I found myself realizing that Coda fell short in a few areas. It was then I decided to give Sublime Text 2 a shot as it had been touted as the sucessor to Text Mate.  Its taken me a few weeks to get used to, but I can happily say I&#8217;m a Sublime Text 2 user now. Here are a few tips that make switching over easier.</p>
<p><span id="more-359"></span></p>
<h2>1. Install the command line utility</h2>
<p><img class="aligncenter size-full wp-image-364" title="Sublime Text 2 Command Line Utility" src="https://wesbos.com/wp-content/uploads/2011/09/Screen-Shot-2011-09-22-at-4.00.21-PM.png" alt="Sublime Text 2 Command Line Utility" width="634" height="440" srcset="https://wesbos.com/wp-content/uploads/2011/09/Screen-Shot-2011-09-22-at-4.00.21-PM.png 634w, https://wesbos.com/wp-content/uploads/2011/09/Screen-Shot-2011-09-22-at-4.00.21-PM-300x208.png 300w" sizes="(max-width: 634px) 100vw, 634px" /></p>
<p>If you do a lot of work in bash, its helpful to open up a file or entire folder in your editor right from the command line.</p>
<p><strong>To Install:</strong><br />
Run the following line in your terminal.<br />
<code>sudo ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" /bin/subl</code><br />
This will then give you access to the bash command <strong>subl</strong> with a number of arguments.</p>
<p>The most basic usage is to open the current folder in Sublime Text 2. Simply Type <code>subl .</code></p>
<p><code>subl -ab tutorial.html </code> opens the file tutorial.html in the current window but keeps terminal in focus. This is handy if you need to traverse a few directories and cherry pick a number of files to be opened.</p>
<p><strong>Arguments</strong>:<br />
&#8211;project : Load the given project<br />
&#8211;command : Run the given command<br />
-n or &#8211;new-window:  Open a new window<br />
-a or &#8211;add:         Add folders to the current window<br />
-w or &#8211;wait:        Wait for the files to be closed before returning<br />
-b or &#8211;background:  Don&#8217;t activate the application<br />
-s or &#8211;stay:        Keep the application activated after closing the file<br />
-h or &#8211;help:        Show help (this message) and exit<br />
-v or &#8211;version:     Show version and exit</p>
<p>&nbsp;</p>
<h2>2. Open files in current sublime text window</h2>
<p>This was one of the biggest annoyances for me when switching over from coda. Whenever I would drag a file into the sublime dock icon it would open a brand new instance of sublime when I just wanted to view it along with the rest of my files. Turns out this is a super simple fix.</p>
<p>Hit<code>Command + Shift + P</code> to bring up the sublime launcher type <strong>&#8220;user global settings</strong> and hit enter. This file is similar to a .vimrc file and holds all of your custom settings. This file wont be written over when you upgrade like <strong>default global settings</strong>. Once you have this file open, add the following line:</p>
<p><code>"open_files_in_new_window": false</code></p>
<p>&nbsp;</p>
<h2>3. Get Code Hinting in Sublime Text 2</h2>
<p><img class="alignleft size-full wp-image-368" title="Sublime Text 2 Code Hinting" src="https://wesbos.com/wp-content/uploads/2011/09/Screen-Shot-2011-09-22-at-4.21.45-PM.png" alt="Sublime Text 2 Code Hinting" width="289" height="159" />One feature that Coda has just&nbsp;slam dunked&nbsp;is their code hinting. I rarely ever have to type entire key words. A solution for getting code completion working in Sublime Text is to install SublimeCodeIntel, a port of the Komodo editor code &nbsp;completion engine. It isn&#8217;t perfect,&nbsp;particularly&nbsp;in CSS file, but its pretty good and gets the job done. &nbsp;<a title="Sublime Code Completion" href="https://github.com/Kronuz/SublimeCodeIntel" target="_blank">Download the repo here </a> and drop it into your packages folder at<code> ~/Library/Applications/Sublime Text 2/Packages</code></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h2>4. Upload with Transmit shortcut</h2>
<p>If you are working on a code n&#8217; upload project you need to be able to edit a file and quickly FTP it up to your server. Since sublime doesn&#8217;t have this built in like Coda does, you&#8217;ll need to use the Transmit FTP client.</p>
<p>First, set up your project folders in transmit.</p>
<p>Next, install <a href="https://github.com/jeffturcotte/sublime_transmit_docksend" target="_blank">Sublime Transmit Docksend</a>, The way this package works is by simulating a docksend (drag and drop a linked local file) to transmit when a key combination is pressed.</p>
<p>Finally, when editing a local file that is linked up in transmit, hit<code>Command + Shift + U</code> and the file will upload. If you are editing /js/scripts.js locally, the file will be uploaded to /js/scripts.js on your server in split second.</p>
<h2>5. Create your own snippets!</h2>
<p>Its a given that you should have already installed <a title="Zen Coding for Sublime Text" href="http://code.google.com/p/zen-coding/" target="_blank">Zen Coding</a>, but there are always snippets that are developer specific that you use on a daily basis. For me, I use<code>j + tab&nbsp;</code> to expand into a jQuery selector <code>$(' ');</code> To setup your own snippets, go to tools->New Snippet. The XML markup is fairly straightforward so I wont go into it. Just plop your code inbetween <code><!--[CDATA[</code--></code> and <code>]]&gt;</code>. You can even set areas to tab through the snippet as well as defaults.</p>
<p>Here a basic snippet using the letter j as the tab trigger. When I tab, the cursor will be place inside the jQuery selector, tab again and I&#8217;m outside the selector ready to call a method on it.</p>
<pre class="brush:xml">&lt;snippet&gt;
    &lt;content&gt;&lt;![CDATA[\$('${1}')${2};]]&gt;&lt;/content&gt;
    &lt;tabTrigger&gt;j&lt;/tabTrigger&gt;
&lt;/snippet&gt;</pre>
<h3>Thats is!</h3>
<p>There is a lot more to Sublime Text 2 and many cool new features such as code folding and Vim support are currently in development. I will go into many more features in coming blog posts. Want to know how to do something? Just ask in the comments below! Be sure to also <a href="http://twitter.com/wesbos">Follow me on Twitter</a>.</p>
<p><a href="https:/SublimeTextBook.com"><img src="https://sublimetextbook.com/images/facebook-share2.png"></a></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/sublime-text-2-tips/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
							</item>
		<item>
		<title>Customizing the WordPress TinyMCE Editor for your clients</title>
		<link>https://wesbos.com/custom-wordpress-tinymce-wysiwyg-classes/</link>
				<comments>https://wesbos.com/custom-wordpress-tinymce-wysiwyg-classes/#comments</comments>
				<pubDate>Wed, 17 Aug 2011 03:21:32 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=342</guid>
				<description><![CDATA[We have all been there. You finish up the most beautiful design with perfectly picked colours, font sizes and page style and pass it off to the client. A few days later you check back at the site and they have happily splattered underlined &#8230; <a href="https://wesbos.com/custom-wordpress-tinymce-wysiwyg-classes/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>We have all been there. You finish up the most beautiful design with perfectly picked colours, font sizes and page style and pass it off to the client. A few days later you check back at the site and they have happily splattered underlined neon green h1 tags with inline styles. Why why why? Because the WordPress WYSIWYG editor is hard to use and by default it temps you with a basic colour pallet and basic h1-h6 tags.<br />
<span id="more-342"></span><br />
Not to worry! With a few lines of code we can remove the harmful parts of TinyMCE and supply a few useful features! Pop open your theme&#8217;s functions.php file and create a basic function and hook like this:</p>
<pre class="brush:php">function make_mce_awesome( $init ) {
	// our Options will go here..
	return $init;
}

add_filter('tiny_mce_before_init', 'make_mce_awesome');</pre>
<h3>Only allow certain block level elements</h3>
<p>Out of the box WordPress has a bunch of elements which you can use to style your text. Chances are your client doesnt need most of them. Also, they certainly do not need access to h1 and h2 elements as they should be already coded into your theme.</p>
<pre class="brush:php">
$init['theme_advanced_blockformats'] = 'h3,h4,h5,h6,p';
</pre>
<h3>Remove Unnecessary Buttons</h3>
<p>This is totally up to you, but I like to remove the underline as its ugly, the spellchecker as this is now built into most browsers and the WordPress Help button. You can find the names of all the buttons by opening up dev tools and looking at the title attribute of each button.</p>
<pre class="brush:php">
	$init['theme_advanced_disable'] = 'underline,spellchecker,wp_help';
</pre>
<h3>Create a custom Colour Pallet based on the themes colours.</h3>
<p>Changes are the default colours in WordPress arent the same as your theme&#8217;s colours. Feed in a comma separated list of hex colours and you&#8217;re off the the races!</p>
<pre class="brush:php">
	$init['theme_advanced_text_colors'] = '0f3156,636466,0486d3';
</pre>
<h3>Add Custom Classes to mirror your CSS</h3>
<p>When you want to move past your basic heading and paragraph tags, it can be helpful to append custom classes to your elements from within TinyMCE. First you want to enable the style select drop down: </p>
<pre class="brush:php">
	$init['theme_advanced_buttons2_add'] = 'styleselect';
</pre>
<p>Then you can specify a list of labels and associated CSS classes. </p>
<pre class="brush:php">
$init['theme_advanced_styles'] = "bigTitle=bigTitle;Call To Action Button=ctaButton,Rounded Corners=rounded";
</pre>
<p>Our Final function looks like this:</p>
<pre class="brush:php">
function make_mce_awesome( $init ) {
	$init['theme_advanced_blockformats'] = 'h2,h3,h4,p';
	$init['theme_advanced_disable'] = 'underline,spellchecker,wp_help';
	$init['theme_advanced_text_colors'] = '0f3156,636466,0486d3';
	$init['theme_advanced_buttons2_add'] = 'styleselect';
   	$init['theme_advanced_styles'] = "bigTitle=bigTitle;Call To Action Button=ctaButton,Rounded Corners=rounded";
	return $init;
}

add_filter('tiny_mce_before_init', 'make_mce_awesome');
</pre>
<h3>Style the editor on the backend</h3>
<p>Your theme&#8217;s styles should mirror on the backend. You can add in a custom stylesheet for the backend with the following line. This is helpful for getting an accurate idea of what size/colour/alignment your page will have.</p>
<pre class="brush:php">
	add_editor_style('editor-style.css');
</pre>
<p>I found that passing in editor-style.css (which should be found in the root of your theme) busted any cache that add_editor_style() was giving me. </p>
<h3>Have more tips? </h3>
<p>I would love to hear them! Leave them in the comments below and I&#8217;ll update this list as we go along.</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/custom-wordpress-tinymce-wysiwyg-classes/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
							</item>
		<item>
		<title>Realtime HTML5 Canvas Drawing with WebSockets, Node.JS &#038; Socket.io</title>
		<link>https://wesbos.com/html5-canvas-websockets-nodejs/</link>
				<comments>https://wesbos.com/html5-canvas-websockets-nodejs/#comments</comments>
				<pubDate>Tue, 16 Aug 2011 03:46:34 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[NodeJS]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=320</guid>
				<description><![CDATA[Web sockets and Canvas are two really cool features that are currently being implemented into browsers. This tutorial will give you a short rundown of how they both work as well as create a realtime drawing canvas that is powered &#8230; <a href="https://wesbos.com/html5-canvas-websockets-nodejs/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>Web sockets and Canvas are two really cool features that are currently being implemented into browsers. This tutorial will give you a short rundown of how they both work as well as create a realtime drawing canvas that is powered by Node.js and web sockets. For simplicity&#8217;s sake, I&#8217;ll be writing all the code in coffeescript. If you prefer regular &#8216;ol JavaScript, take a look at the corresponding .js files. I&#8217;ve also left out the CSS for the same reason.</p>
<ul>
<li><a href="https://github.com/wesbos/websocket-canvas-draw" target="_blank">Download the code on GitHub</a> </li>
<li><a href="http://twitter.com/wesbos">Follow @wesbos on Twitter</a></li>
</ul>
<h3>Quick Screencast detailing tutorial</h3>
<p><iframe class='youtube-player' type='text/html' width='640' height='360' src='https://www.youtube.com/embed/n7wQsLu_k00?version=3&#038;rel=1&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' allowfullscreen='true' style='border:0;'></iframe></p>
<h3>Cross Device / Browser compatibility </h3>
<p><iframe class='youtube-player' type='text/html' width='640' height='360' src='https://www.youtube.com/embed/oI9AahO9vDY?version=3&#038;rel=1&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' allowfullscreen='true' style='border:0;'></iframe></p>
<h3>Server Side</h3>
<p>The first thing we need to do is create a web socket server. For this we will be using <a href="http://nodejs.org/" target="_blank">Node.js</a> and the module <a href="http://socket.io" target="_blank">Socket.io</a>. Socket.io makes its super easy to get a web socket server up and running. It even provides a flash fallback for browsers that don&#8217;t support native web sockets. In this tutorial we will only be working with browsers that support the canvas element.</p>
<p>If you don&#8217;t have Socket.io installed yet, make sure you do so by typing <code>npm install socket.io</code> into your terminal.</p>
<p>For now, lets just set up the web socket server. Create your <code>server.coffee</code> file with the following configuration. </p>
<pre class="brush:js">
io = require('socket.io').listen(4000)
io.sockets.on 'connection', (socket) ->
</pre>
<p>Compile your coffeescript and hop back into your terminal and type <code>node server.js</code>. You now have a web socket server running on port 4000.<br />
<img src="http://cl.ly/9F2H/Screen_Shot_2011-08-12_at_7.35.45_PM.png" alt="" /></p>
<p>If you go to localhost:4000 you&#8217;ll see the following:</p>
<p><img src="http://cl.ly/9Ez4/Screen_Shot_2011-08-12_at_7.36.08_PM.png" alt="" /></p>
<h3>Client Side</h3>
<p>First, lets quickly get our <code>index.html</code> file up and running. In addition to some bare bones markup, I&#8217;m also including jQuery, our Socket.io JS file which is now being served up from our server, a jQuery plugin for drag events, and our own scripts.js file which will hold all the magic.</p>
<pre class="brush:plain">&lt;!DOCTYPE HTML&gt;
&lt;html&gt;
&lt;head&gt;
	&lt;meta charset="UTF-8"&gt;
	&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"&gt;&lt;/script&gt;
	&lt;script type="text/javascript" src="js/jquery.event.drag-2.0.js"&gt;&lt;/script&gt;
	&lt;script src="http://localhost:4000/socket.io/socket.io.js"&gt;&lt;/script&gt;
	&lt;script type="text/javascript" src="scripts.js"&gt;&lt;/script&gt;
	&lt;link rel="stylesheet" href="style.css" /&gt;

	&lt;title&gt;HTML5 Canvas + Node.JS Socket.io&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
	&lt;article&gt;&lt;!-- our canvas will be inserted here--&gt;&lt;/article&gt;


	&lt;!-- Scripts required --&gt;
	&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"&gt;&lt;/script&gt;
	&lt;script type="text/javascript" src="js/jquery.event.drag-2.0.js"&gt;&lt;/script&gt;
	&lt;script src="http://localhost:4000/socket.io/socket.io.js"&gt;&lt;/script&gt;
	&lt;script type="text/javascript" src="scripts.js"&gt;&lt;/script&gt;
&lt;/body&gt;</pre>
<p>Now that we have our server up and running, we can write some code which will draw to the canvas. Create a new file called <code>scripts.coffee</code>.  All of the following code happens within the App.init() method which we will trigger on the jQuery document ready. </p>
<h4>Create our Canvas Element</h4>
<pre class="brush:js">
# setup our application with its own namespace 
App = {}

###
	Init 
###
App.init = -> 
	App.canvas = document.createElement 'canvas' #create the canvas element 
	App.canvas.height = 400
	App.canvas.width = 800  #size it up
	document.getElementsByTagName('article')[0].appendChild(App.canvas) #append it into the DOM 

	App.ctx = App.canvas.getContext("2d") # Store the context 

	# set some preferences for our line drawing.
	App.ctx.fillStyle = "solid" 		
	App.ctx.strokeStyle = "#bada55"		
	App.ctx.lineWidth = 5				
	App.ctx.lineCap = "round"

	# Draw Function
	App.draw = (x,y,type) ->
		if type is "dragstart"
			App.ctx.beginPath()
			App.ctx.moveTo(x,y)
		else if type is "drag"
			App.ctx.lineTo(x,y)
			App.ctx.stroke()
		else
			App.ctx.closePath()
	return
</pre>
<h4>Draw to canvas function</h4>
<p>Since drawing to canvas involves beginning, moving and closing paths, i&#8217;ve create a short little function that hooks into the jQuery dragstart and drag events.</p>
<pre class="brush:js">
# Draw Function
App.draw = (x,y,type) ->
	if type is "dragstart"
		App.ctx.beginPath()
		App.ctx.moveTo(x,y)
	else if type is "drag"
		App.ctx.lineTo(x,y)
		App.ctx.stroke()
	else
		App.ctx.closePath()
return
</pre>
<h4>Setup our client side web socket</h4>
<p>Since we included our file at <code>http://localhost:4000/socket.io/socket.io.js</code> we are able to create an object which we can send our data over. With just a few lines, we create our App.socket object and bind to any incoming web socket events called &#8216;draw&#8217;. We will go over this more soon. </p>
<pre class="brush:js">
# Sockets!
App.socket = io.connect('http://localhost:4000')

App.socket.on 'draw', (data) ->
	App.draw(data.x,data.y,data.type)
</pre>
<h4>Canvas Drawing Event</h4>
<p>This is where things gets exciting. Now we want to bind a few events to our canvas element. The way this works is when someone draws on the canvas, we immediately use our draw() function to draw to the current canvas as well as send the x and y ordinates over the web socket with socket.io&#8217;s <code>emit</code>. In just a bit we will take a look at the server side part of this event and see how the server sends out this data to all open windows.</p>
<pre class="brush:js">
###
	Draw Events
###
$('canvas').live 'drag dragstart dragend', (e) ->
	type = e.handleObj.type
	offset = $(this).offset()
	
	e.offsetX = e.layerX - offset.left
	e.offsetY = e.layerY - offset.top
	x = e.offsetX 
	y = e.offsetY
	App.draw(x,y,type)
	App.socket.emit('drawClick', { x : x, y : y, type : type})
	return
</pre>
<h3>Jump back to server side</h3>
<p>Now that we know we are sending the x, y and type of event over the web socket, we need to do something with that on our server. What we want to do, is take that data and send it back out to everyone else that has a browser open.</p>
<p>Our updated server.coffee file now looks like this. We first wait for a connection event, then wait for a &#8216;drawClick&#8217; event to be sent by a browser. When that happens we take the data and send it out to everyone else with a browser open. THe server side script we wrote earlier will then paint the canvas.</p>
<pre class="brush:js">
io = require('socket.io').listen(4000)

io.sockets.on 'connection', (socket) ->
	socket.on 'drawClick', (data) ->
		socket.broadcast.emit 'draw',{ x : data.x, y : data.y, type: data.type}
		return
	return
</pre>
<p>You&#8217;ll now need to restart your web socket server as we have made changes to it. Hit control-c to kill it, and node type <code>node server.js</code> to restart it.</p>
<h3>Get Drawing!</h3>
<p>One you fully understand how this all works, open your index.html file in any web browser that supports web sockets and canvas (at the time of writing Chrome, Firefox, Safari, Opera and IE9). Check <a href="http://caniuse.com/#search=canvas" target="_blank">http://caniuse.com/#search=canvas</a> for more support info.</p>
<h4>Limitations</h4>
<p>As this is a very basic demo, there are a few limitations which can easily be solved with a little more code. Currently the canvas only supports one person drawing at a time, if two or more are drawing, the canvas will be painted sporadically. Also, there is definitely a lot of room to add tools such as brushes, colours, erasers and PNG export. If there is interest, I&#8217;ll expand this tutorial series to cover them.</p>
<p>If you&#8217;re interested in getting this up and running in the real world and off of your localhost, I was able to get mine running on <a href="http://aws.amazon.com/ec2/" target="_blank">Amazons free micro instance of EC2</a> although this involves installing Node and NPM all over again. Also note you should run your server on port 80 rather than 4000.</p>
<p>Please feel free to download, hack, complain, fork or contribute to the project on <a href="https://github.com/wesbos/websocket-canvas-draw">my github account.</a> </p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/html5-canvas-websockets-nodejs/feed/</wfw:commentRss>
		<slash:comments>57</slash:comments>
							</item>
		<item>
		<title>Growl notifications for the Node.js CoffeeScript complier</title>
		<link>https://wesbos.com/growl-notifications-coffeescript-nodejs/</link>
				<comments>https://wesbos.com/growl-notifications-coffeescript-nodejs/#comments</comments>
				<pubDate>Tue, 19 Jul 2011 15:47:53 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[NodeJS]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=311</guid>
				<description><![CDATA[Two things I&#8217;ve been working with lately have been Node.js and CoffeeScript. If you haven&#8217;t heard of either, Node.js is server side javascript and CoffeeScript is a ruby/python like langage that compiles down to regular javascript. The way I develop &#8230; <a href="https://wesbos.com/growl-notifications-coffeescript-nodejs/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>Two things I&#8217;ve been working with lately have been <a href="http://nodejs.org">Node.js</a> and <a href="http://jashkenas.github.com/coffee-script/">CoffeeScript</a>. If you haven&#8217;t heard of either, Node.js is server side javascript and CoffeeScript is a ruby/python like langage that compiles down to regular javascript.</p>
<p>The way I develop my CoffeeScript is by using the Node.js compiler to watch my `scripts.coffee` for any changes and compile it into normal JavaScript every time I save my file. The process is instant, but I need to watch my terminal window to see if there were any compiling errors. As you can imagine, this can get fairly annoying especially if you aren&#8217;t on dual monitors.</p>
<p>So, my solution was to write a Node.js module that would send a growl notification to the user when the compile was finished. I made use of the <a href="http://growl.info/extras.php#growlnotify">growlnotify</a> command line plugin for OSX.</p>
<p><img src="http://f.cl.ly/items/2t1H2r0i0u3x0k2Z1E2v/Screen%20shot%202011-07-19%20at%201.34.40%20AM.png" alt="" /></p>
<p>To use, you need to first install <a href="http://growl.info/extras.php#growlnotify">growlnotify</a>.</p>
<p>Then use NPM to install the package `npm install coffeescript-growl`</p>
<p>Finally, require (with -r or &#8211;require) the module when you compile your script. I like to use something like this:</p>
<p>`coffee -r coffeescript-growl &#8211;watch &#8211;compile ~/sites/my_project/scripts.coffee`</p>
<p>Thats it! If you have any suggestions or fixes, please<a title="CoffeeScript Growl" href="https://github.com/wesbos/coffeescript-growl" target="_blank"> fork me on github </a> and <a href="https://twitter.com/#!/wesbos">follow me on twitter.</a></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/growl-notifications-coffeescript-nodejs/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
							</item>
		<item>
		<title>Get All Angry Birds Levels in Chrome HTML5 Version with a quick hack</title>
		<link>https://wesbos.com/all-levels-html5-angry-birds/</link>
				<comments>https://wesbos.com/all-levels-html5-angry-birds/#comments</comments>
				<pubDate>Wed, 11 May 2011 19:11:07 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=280</guid>
				<description><![CDATA[Just about an hour ago Rovio and Chrome released Angry Birds for Chrome. As a JavaScript / HTML5 guy, I quickly jumped into the code to see how things worked. I was quickly able to find a hack that gave &#8230; <a href="https://wesbos.com/all-levels-html5-angry-birds/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>Just about an hour ago Rovio and Chrome released <a href="http://chrome.angrybirds.com/?version=hd" target="_blank">Angry Birds for Chrome</a>. As a JavaScript / HTML5 guy, I quickly jumped into the code to see how things worked.</p>
<p>I was quickly able to find a hack that gave me access to all the levels, even the special Chrome levels!  So to  get access to all levels in Chrome Angry Birds, just copy and paste the following line into your browser&#8217;s address bar.</p>
<p><span id="more-280"></span></p>
<pre class="brush:js">javascript: var i = 0; while (i&lt;=69) { localStorage.setItem('level_star_'+i,'3'); i++; } window.location.reload();</pre>
<p>To set all levels to locked, simply copy and paste this into your address bar:</p>
<pre class="brush:js">javascript: var i = 1; while (i&lt;=69) { localStorage.setItem('level_star_'+i,'-1'); i++; } window.location.reload();</pre>
<h3>How?</h3>
<p>In the talk Rovio did at Google IO, they mentioned they were using HTML5&#8217;s LocalStorage. If you open up Web Inspector in chrome, you&#8217;ll see they are keeping track of your score and stars with localstorage. Lucky for us, that means we can use <a href="https://developer.mozilla.org/en/DOM/Storage#localStorage" target="_blank">setItem(</a>) set all 70 levels to 3 and get access to them all.</p>
<p>If you like this kind of stuff, be sure to <a href="http://twitter.com/wesbos" target="_blank">follow me on twitter</a> for more :).</p>
<p>&nbsp;</p>
<p><a href="https://wesbos.com/wp-content/uploads/2011/05/Screen-shot-2011-05-11-at-3.08.52-PM.png"><img class="aligncenter size-medium wp-image-283" title="Screen shot 2011-05-11 at 3.09.21 PM" src="https://wesbos.com/wp-content/uploads/2011/05/Screen-shot-2011-05-11-at-3.09.21-PM-300x225.png" alt="" width="300" height="225" srcset="https://wesbos.com/wp-content/uploads/2011/05/Screen-shot-2011-05-11-at-3.09.21-PM-300x225.png 300w, https://wesbos.com/wp-content/uploads/2011/05/Screen-shot-2011-05-11-at-3.09.21-PM.png 737w" sizes="(max-width: 300px) 100vw, 300px" /></a><img class="aligncenter size-medium wp-image-282" title="Screen shot 2011-05-11 at 3.08.52 PM" src="https://wesbos.com/wp-content/uploads/2011/05/Screen-shot-2011-05-11-at-3.08.52-PM-300x225.png" alt="" width="300" height="225" srcset="https://wesbos.com/wp-content/uploads/2011/05/Screen-shot-2011-05-11-at-3.08.52-PM-300x225.png 300w, https://wesbos.com/wp-content/uploads/2011/05/Screen-shot-2011-05-11-at-3.08.52-PM.png 750w" sizes="(max-width: 300px) 100vw, 300px" /></p>
<p>&nbsp;</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/all-levels-html5-angry-birds/feed/</wfw:commentRss>
		<slash:comments>189</slash:comments>
							</item>
		<item>
		<title>Dropbox your MAMP MySQL Databases</title>
		<link>https://wesbos.com/dropbox-your-mamp-mysql-databases/</link>
				<comments>https://wesbos.com/dropbox-your-mamp-mysql-databases/#comments</comments>
				<pubDate>Mon, 04 Apr 2011 18:04:35 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[mamp]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[phpmyadmin]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=271</guid>
				<description><![CDATA[I&#8217;m a backup fanatic and not having a few backups of files makes me uneasy. Today I had a little scare where I couldn&#8217;t find a few of my databases when viewing PHPmyAdmin through MAMP. Turns out sometimes MAMP likes &#8230; <a href="https://wesbos.com/dropbox-your-mamp-mysql-databases/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>I&#8217;m a backup fanatic and not having a few backups of files makes me uneasy. Today I had a little scare where I couldn&#8217;t find a few of my databases when viewing PHPmyAdmin through MAMP. Turns out sometimes MAMP likes to sometimes grab the databases from the MAMP Pro location and sometimes the MAMP location.</p>
<p>So, I decided it was time to figure out how to automatically backup my databases. The problem is that my MySQL databases are not in the same folder as my Dropbox folder.</p>
<p>The answer to this is very simple! First, if you haven&#8217;t already, <a target="_blank" href="http://db.tt/87Zmy6yJ">sign up for dropbox</a>. Then we just need to create a simple symlink that will allow the databases to be stored in their location and still be backed up to the DropBox folder.</p>
<p><span id="more-271"></span>First, figure out where MAMP stores your databases. If you are on good old MAMP, they will be located at /Applications/MAMP/db/ and if you are on MAMP Pro, they are located at /Library/Application Support/appsolute/MAMP PRO/db/mysql/</p>
<p>Next, pop open terminal so we can create our symlink. We will be using the link folders command (ln) and the -s argument to specify that its a symbolic link.</p>
<pre class="brush:shell">ln -s  /Applications/MAMP/db/ ~/Dropbox/symlinks/db</pre>
<p>If your dropbox folder is different, make sure to change the last argument. Other than that, you&#8217;re setup. No more database loss nightmares!</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/dropbox-your-mamp-mysql-databases/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
							</item>
		<item>
		<title>List WordPress Posts by Category</title>
		<link>https://wesbos.com/wordpress-list-posts-by-category/</link>
				<comments>https://wesbos.com/wordpress-list-posts-by-category/#comments</comments>
				<pubDate>Tue, 29 Mar 2011 18:21:05 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[custom templates]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[the_loop]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=259</guid>
				<description><![CDATA[I saw on twitter that John Gardner was looking for a way to loop through his WordPress categories and then display all posts that belonged to that category below it.  I thought it was a great question / problem to &#8230; <a href="https://wesbos.com/wordpress-list-posts-by-category/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>I saw on twitter that <a href="http://twitter.com/j_gardner/status/52762151860965376#">John Gardner</a> was looking for a way to loop through his WordPress categories and then display all posts that belonged to that category below it.  I thought it was a great question / problem to solve so I did a quick tutorial on how to do so.</p>
<p><span id="more-259"></span></p>
<p><iframe class='youtube-player' type='text/html' width='640' height='360' src='https://www.youtube.com/embed/tiLKGPhUEpM?version=3&#038;rel=0&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;hd=1&#038;wmode=transparent' allowfullscreen='true' style='border:0;'></iframe></p>
<p>Make sure to view video in HD <img src="https://s.w.org/images/core/emoji/12.0.0-1/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>First thing you need to do is setup a new page with a custom page template. It can be as simple as below but may vary depending on your theme structure. I&#8217;m using the default WordPress 2010 theme.</p>
<pre class="brush:php">&lt;?php
/* template name: Posts by Category! */
get_header(); ?&gt;
		&lt;div id="container"&gt;
			&lt;div id="content" role="main"&gt;
			&lt;/div&gt;&lt;!-- #content --&gt;
		&lt;/div&gt;&lt;!-- #container --&gt;
&lt;?php get_sidebar(); ?&gt;
&lt;?php get_footer(); ?&gt;</pre>
<p>Then We need to get all of our categories into a variable called $cats. Once they are setup, we&#8217;ll just loop through the categories, setup a new WordPress loop for each of them, and echo out the information needed.</p>
<p>Here is the final code, I&#8217;ve commended each line as needed.</p>
<pre class="brush:php">&lt;?php
/* template name: Posts by Category! */
get_header(); ?&gt;

		&lt;div id="container"&gt;
			&lt;div id="content" role="main"&gt;

			&lt;?php
			// get all the categories from the database
			$cats = get_categories(); 

				// loop through the categries
				foreach ($cats as $cat) {
					// setup the cateogory ID
					$cat_id= $cat-&gt;term_id;
					// Make a header for the cateogry
					echo "&lt;h2&gt;".$cat-&gt;name."&lt;/h2&gt;";
					// create a custom wordpress query
					query_posts("cat=$cat_id&amp;posts_per_page=100");
					// start the wordpress loop!
					if (have_posts()) : while (have_posts()) : the_post(); ?&gt;

						&lt;?php // create our link now that the post is setup ?&gt;
						&lt;a href="&lt;?php the_permalink();?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;
						&lt;?php echo '&lt;hr/&gt;'; ?&gt;

					&lt;?php endwhile; endif; // done our wordpress loop. Will start again for each category ?&gt;
				&lt;?php } // done the foreach statement ?&gt;

			&lt;/div&gt;&lt;!-- #content --&gt;
		&lt;/div&gt;&lt;!-- #container --&gt;

&lt;?php get_sidebar(); ?&gt;
&lt;?php get_footer(); ?&gt;</pre>
<p>Thats it! You can obviously customize this to your own likings. I suggest you check out and read <a href="http://codex.wordpress.org/The_Loop">The Loop</a> and <a href="http://codex.wordpress.org/Function_Reference/query_posts">query_posts()</a>.</p>
<p>Please leave any questions or commend below!</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/wordpress-list-posts-by-category/feed/</wfw:commentRss>
		<slash:comments>108</slash:comments>
							</item>
		<item>
		<title>Defeat the New York Times Paywall with 2 lines of CSS (or a Chrome Extension)</title>
		<link>https://wesbos.com/remove-new-york-times-paywall-css/</link>
				<comments>https://wesbos.com/remove-new-york-times-paywall-css/#comments</comments>
				<pubDate>Wed, 23 Mar 2011 17:04:19 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=230</guid>
				<description><![CDATA[If you haven&#8217;t heard, the New York Times has implemented a paywall where you can only view 20 articles a month. After that they throw an overlay on top of the content so you can&#8217;t view it. Since they still &#8230; <a href="https://wesbos.com/remove-new-york-times-paywall-css/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>If you haven&#8217;t heard, the New York Times has implemented a paywall where you can only view 20 articles a month. After that they throw an overlay on top of the content so you can&#8217;t view it.</p>
<p>Since they still want to be indexed by search engines, they don&#8217;t bother to hide the content once you have reached your 20 max. Two simple lines of CSS will hide this. I&#8217;ve also made it into a <a href="https://chrome.google.com/extensions/detail/medmifohjnpmbkjbodbckhlgofiffgpm">Chrome Extension</a><br />
<span id="more-230"></span></p>
<p><strong>Update: </strong>Just want to be clear that this is not about the NYT business model or getting stuff for free. If you want  to view the NYT, pay for it. This also isn&#8217;t a hack or a security intrusion, its simply hiding a div that is overlaying the content. The same results can be achieved by disabling javascript or selecting &#8220;no style&#8221; in your favorite browser. This is simply a tutorial on how to style the content of a page to your liking.</p>
<p><strong>Update 2: </strong>Looks like New York Times have updated their CSS classes from #gatewayCreative to #gatewayUnit in an effort to thwart cheaters.  I will not be updating the extension as this wasn&#8217;t intended to get around the wall for free but rather to expose how hilarious their pay wall security was. I think that point has been made, feel free to fork this plugin.</p>
<p><strong>Update 3: </strong>Now Google has taken down the extension. Not sure why, may have been for using the NYT logo, may be more serious. Either way, it was fun while it lasted <img src="https://s.w.org/images/core/emoji/12.0.0-1/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-268" title="Screen shot 2011-03-29 at 2.33.59 PM" src="https://wesbos.com/wp-content/uploads/2011/03/Screen-shot-2011-03-29-at-2.33.59-PM.png" alt="" width="658" height="130" srcset="https://wesbos.com/wp-content/uploads/2011/03/Screen-shot-2011-03-29-at-2.33.59-PM.png 731w, https://wesbos.com/wp-content/uploads/2011/03/Screen-shot-2011-03-29-at-2.33.59-PM-300x59.png 300w" sizes="(max-width: 658px) 100vw, 658px" /></p>
<h3><strong>Video</strong></h3>
<p><iframe class='youtube-player' type='text/html' width='640' height='360' src='https://www.youtube.com/embed/qxM-Cu9OLJI?version=3&#038;rel=0&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;hd=1&#038;wmode=transparent' allowfullscreen='true' style='border:0;'></iframe></p>
<h3>Code</h3>
<pre class="brush:css">#overlay, #gatewayCreative { display: none !important; visibility: hidden !important; }
body { 	overflow: scroll !important; }</pre>
<p>Then create a manifest.json file to register the Google Chrome Extension</p>
<pre class="brush:js">{
	"name" : "New York Times Paywall Smasher",
	"version"  : "1.0",
	"description" : "Disables the New York Times Paywall",
	"browser_actions" : {
		"icons" : {
			"128" : "icon128.png",
			"48" : "icon48.png",
			"16" : "icon16.png"
		}
	},
	"content_scripts" : [{
		"matches": ["http://www.nytimes.com/*"],
		"css" : ["nyt.css"]
 	}]
}</pre>
<p>Load the chrome extension into developer view and say goodbye to the paywall (at least until they implement something that isn&#8217;t defeated with display: none). <a href="https://chrome.google.com/extensions/detail/medmifohjnpmbkjbodbckhlgofiffgpm"> Install Chrome Extension.</a></p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/remove-new-york-times-paywall-css/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
							</item>
		<item>
		<title>Run two versions of Firefox on Mac OSX</title>
		<link>https://wesbos.com/run-two-versions-of-firefox-on-mac-osx/</link>
				<comments>https://wesbos.com/run-two-versions-of-firefox-on-mac-osx/#comments</comments>
				<pubDate>Wed, 23 Mar 2011 06:56:58 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[firefox]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=222</guid>
				<description><![CDATA[Yesterday Firefox 4.0 was released and web developers everywhere celebrated a really great browser.  The browser comes packed with a super fast JavaScript engine called JägerMonkey. Now don&#8217;t get too excited just yet! We still need to keep that old version of &#8230; <a href="https://wesbos.com/run-two-versions-of-firefox-on-mac-osx/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>Yesterday Firefox 4.0 was released and web developers everywhere celebrated a really great browser.  The browser comes packed with a super fast JavaScript engine called JägerMonkey. Now don&#8217;t get too excited just yet! We still need to keep that old version of Firefox around for testing; we can&#8217;t assume everyone has upgraded to Firefox 4. So, to run both Firefox 3.6 and Firefox 4.0 on the same machine, just follow these simple steps:<span id="more-222"></span></p>
<ol>
<li>Open up your Applications folder and find your old version of Firefox</li>
<li>Right click-&gt; get info.</li>
<li>Rename to &#8220;Firefox36.app&#8221;</li>
<li>Download Firefox 4.0 and install as normal</li>
<li>Celebrate that you now have 1 more browser to test in!</li>
</ol>
<p>Really simple! If someone knows how to do this on the Windows and Linux side, I would love to hear how.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/run-two-versions-of-firefox-on-mac-osx/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
							</item>
		<item>
		<title>Import Large MySQL Databases into PHPMyAdmin with BigDump.php</title>
		<link>https://wesbos.com/import-large-mysql-database-bigdump-php/</link>
				<comments>https://wesbos.com/import-large-mysql-database-bigdump-php/#comments</comments>
				<pubDate>Tue, 22 Mar 2011 18:17:33 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[phpmyadmin]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=211</guid>
				<description><![CDATA[When migrating a site that has been around for a while, I often run into the problem where my MySQL Database is just too large to import via the web interface of PHPMyAdmin. Often times its to a server that &#8230; <a href="https://wesbos.com/import-large-mysql-database-bigdump-php/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>When migrating a site that has been around for a while, I often run into the problem where my MySQL Database is just too large to import via the web interface of PHPMyAdmin. Often times its to a server that doesn&#8217;t allow remote access to their databases. What is a poor dev to do?<span id="more-211"></span></p>
<h3>Take a big dump</h3>
<p>Although this script has been around for almost 9 years, its still an essential tool for every developers toolbox. <a href="http://www.ozerov.de/bigdump.php" target="_blank">Big Dump</a> staggers the database import so your server does not timeout. Here is a quick tutorial on how to use Big Dump.</p>
<h3>Video</h3>
<p><iframe class='youtube-player' type='text/html' width='640' height='360' src='https://www.youtube.com/embed/2JEkLMKAUZc?version=3&#038;rel=0&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;hd=1&#038;wmode=transparent' allowfullscreen='true' style='border:0;'></iframe></p>
<h3>Instructions</h3>
<ol>
<li>Download the latest version of Big Dump <a href="http://www.ozerov.de/bigdump.zip" target="_blank">here</a>.</li>
<li>Open up bigdump.php and configure: Server, database name, username, password, and the file name.</li>
<li>Upload both your SQL file and bigdump.php to your server</li>
<li>Browse to bigdump.php and click import</li>
</ol>
<p>Thats it! Wait a few minutes and you will see a confirmation screen similar to the one below. Make sure to delete bigdump.php off your server when you are finished.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-214" title="BigDump PHPmyadmin" src="https://wesbos.com/wp-content/uploads/2011/03/Screen-shot-2011-03-22-at-2.09.25-PM.png" alt="" width="557" height="321" srcset="https://wesbos.com/wp-content/uploads/2011/03/Screen-shot-2011-03-22-at-2.09.25-PM.png 796w, https://wesbos.com/wp-content/uploads/2011/03/Screen-shot-2011-03-22-at-2.09.25-PM-300x172.png 300w" sizes="(max-width: 557px) 100vw, 557px" /></p>
<p>&nbsp;</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/import-large-mysql-database-bigdump-php/feed/</wfw:commentRss>
		<slash:comments>65</slash:comments>
							</item>
		<item>
		<title>Reset a WordPress Admin Password (Video and Guide)</title>
		<link>https://wesbos.com/reset-a-wordpress-admin-password/</link>
				<comments>https://wesbos.com/reset-a-wordpress-admin-password/#respond</comments>
				<pubDate>Mon, 21 Mar 2011 19:58:17 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=189</guid>
				<description><![CDATA[Had someone ask me today how to reset a password for a user (Admin or other) on a WordPress account. Its acutally very easy to do, so here is a quick guide! 1. Log into your host&#8217;s backend and find &#8230; <a href="https://wesbos.com/reset-a-wordpress-admin-password/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>Had someone ask me today how to reset a password for a user (Admin or other) on a WordPress account. Its acutally very easy to do, so here is a quick guide!<span id="more-189"></span></p>
<p><iframe class='youtube-player' type='text/html' width='640' height='360' src='https://www.youtube.com/embed/39IiTnNhgyY?version=3&#038;rel=0&#038;fs=1&#038;autohide=2&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;hd=1&#038;wmode=transparent' allowfullscreen='true' style='border:0;'></iframe></p>
<p><span style="font-size: 15px; font-weight: bold;">1. Log into your host&#8217;s backend and find the spot to edit your databases</span></p>
<p>If you are unsure of which database is your WordPress install. Open up your FTP client and browse to /wp-config.php. This file will contain your database name as well as the username and password of it.</p>
<p><img class="aligncenter size-full wp-image-191" title="Screen shot 2011-03-21 at 3.38.40 PM" src="https://wesbos.com/wp-content/uploads/2011/03/Screen-shot-2011-03-21-at-3.38.40-PM.png" alt="" width="442" height="149" srcset="https://wesbos.com/wp-content/uploads/2011/03/Screen-shot-2011-03-21-at-3.38.40-PM.png 442w, https://wesbos.com/wp-content/uploads/2011/03/Screen-shot-2011-03-21-at-3.38.40-PM-300x101.png 300w" sizes="(max-width: 442px) 100vw, 442px" /></p>
<h3>2.  Login to your database and you will be presented with PHPMyAdmin.</h3>
<p>On the side, you will see a list of  tables. Click the one that says &#8220;wp_users&#8221;. Once that loads, click the &#8220;Browse&#8221; tab.</p>
<h3>3. Edit the specified WordPress User</h3>
<p>You should now see a list of users in your WordPress install. Click the pencil icon to edit the user you wish to reset the password for.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-192" title="Screen shot 2011-03-21 at 3.44.29 PM" src="https://wesbos.com/wp-content/uploads/2011/03/Screen-shot-2011-03-21-at-3.44.29-PM.png" alt="" width="584" height="262" srcset="https://wesbos.com/wp-content/uploads/2011/03/Screen-shot-2011-03-21-at-3.44.29-PM.png 730w, https://wesbos.com/wp-content/uploads/2011/03/Screen-shot-2011-03-21-at-3.44.29-PM-300x134.png 300w" sizes="(max-width: 584px) 100vw, 584px" /></p>
<h3>4.  Set the new password</h3>
<p>Finally, delete the data from the &#8220;user_pass&#8221; field, enter in a new password, and select MD5 from the dropdown to the left of it. When done, click go.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-193" title="Screen shot 2011-03-21 at 3.47.37 PM" src="https://wesbos.com/wp-content/uploads/2011/03/Screen-shot-2011-03-21-at-3.47.37-PM.png" alt="" width="586" height="112" srcset="https://wesbos.com/wp-content/uploads/2011/03/Screen-shot-2011-03-21-at-3.47.37-PM.png 733w, https://wesbos.com/wp-content/uploads/2011/03/Screen-shot-2011-03-21-at-3.47.37-PM-300x57.png 300w" sizes="(max-width: 586px) 100vw, 586px" /></p>
<h3>5. You&#8217;re done! Log in as normal with your new password</h3>
<p style="text-align: left;">&nbsp;</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/reset-a-wordpress-admin-password/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
		<item>
		<title>Burstn and Google Maps Mashup &#8211; Photo Map!</title>
		<link>https://wesbos.com/burstn-google-maps-photos-mashup/</link>
				<comments>https://wesbos.com/burstn-google-maps-photos-mashup/#respond</comments>
				<pubDate>Mon, 21 Mar 2011 18:44:57 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[Burstn]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[google-maps]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=157</guid>
				<description><![CDATA[Every now and then I like to play with the API of a social networking site. Burstn is an photo sharing website that allows users to quick snap photos and upload them to their website. Lucky for me, their API &#8230; <a href="https://wesbos.com/burstn-google-maps-photos-mashup/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>Every now and then I like to play with the API of a social networking site. <a href="http://burstn.com">Burstn</a> is an photo sharing website that allows users to quick snap photos and upload them to their website. Lucky for me, their API is fairly wide open, allows to easy calling, and returns a super nice JSON response. My idea is to ping the <a href="http://groups.google.com/group/burstn/web/api-documentation">Burstn API</a> for a timeline of public photos, parse the JSON response, and plot them on a Google Map based on their Lat and Long positions.  Sound fun? Lets go!<span id="more-157"></span></p>
<p><a href="http://wesbos.com/demos/burstn-map">View Demo</a> <a href="http://wesbos.com/demos/burstn-map.zip">Download Files</a></p>
<h3>Setting up</h3>
<p>You&#8217;ll need three files: index.html, wb.js, and style.css. The bulk of our content will go into wb.js as we are loading everything in via JavaScript.Your index.html file should look like this:</p>
<pre class="brush:php">&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
  &lt;meta http-equiv="content-type" content="text/html; charset=UTF-8" /&gt;
  &lt;title&gt;Google Maps Burstn Mashup&lt;/title&gt;
  &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="http://maps.google.com/maps/api/js?sensor=false"    type="text/javascript"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="wb.js" &gt;&lt;/script&gt;
  &lt;link rel="stylesheet" href="style.css" /&gt;
&lt;/head&gt;
&lt;body&gt;
  &lt;div id="map" style="width: 100%; height: 100%; position: absolute;"&gt;&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p><span style="font-size: 15px; font-weight: bold;">Getting the data from Burstn API</span></p>
<p>Pulling the data from Burstn couldn&#8217;t be easier. A quick look at their documentation shows that we need to make a GET request to http://api.burstn.com/1/timeline/global. Since we want to load quite a few photos, we are going to set our limit to 400. We also need to append &amp;callback=? to the end of our url so we can get around the &#8220;Origin null is not allowed by Access-Control-Allow-Origin.&#8221; browser security.</p>
<p>Using jQuery&#8217;s AJAX method, we pull in the JSON data as so:</p>
<pre class="brush:js">	$.getJSON('http://api.burstn.com/1/timeline/global?limit=400&amp;callback=?', function(data) {
		console.log(data);
	});</pre>
<p>Now if we take a look at our console. we&#8217;ll see an object that was returned that looks like this:</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-176" title="Screen shot 2011-03-21 at 2.23.34 PM" src="https://wesbos.com/wp-content/uploads/2011/03/Screen-shot-2011-03-21-at-2.23.34-PM.png" alt="" width="586" height="317" srcset="https://wesbos.com/wp-content/uploads/2011/03/Screen-shot-2011-03-21-at-2.23.34-PM.png 732w, https://wesbos.com/wp-content/uploads/2011/03/Screen-shot-2011-03-21-at-2.23.34-PM-300x162.png 300w" sizes="(max-width: 586px) 100vw, 586px" /></p>
<p>This is all the data we need to start plotting it on our map. Using the Google Maps JavaScript 3.0 API, we will now modify the code above to be able to plot these pictures on a map.</p>
<h3>First, setup your scripts file to populate with a map</h3>
<pre class="brush:js">// check that the document is ready
$(function() {
	// setup a few vars
	var marker, i; 

	// setup our map
	 var map = new google.maps.Map(document.getElementById('map'), {
      zoom: 3,
      center: new google.maps.LatLng(43, 20),
      mapTypeId: google.maps.MapTypeId.ROADMAP
    });

    // setup the info window (the popup bubble that display the info
    var infowindow = new google.maps.InfoWindow();</pre>
<h3>Next, Pull in data from Burstn and plot on mapa</h3>
<p>You&#8217;ll see in this chunk of code that we use jQuery&#8217;s $.each() to loop over each of the results, check for a latitude coordinate, and then plot it on the map.</p>
<pre class="brush:js">	$.getJSON('http://api.burstn.com/1/timeline/global?limit=400&amp;callback=?', function(data) {
		console.log(data);
		$.each(data['body']['data'], function(i,v) {
			// setup some variables
			var coords = data['body']['data'][i]['coordinates'],
				imgsrc = data['body']['data'][i]['image'],
				caption = data['body']['data'][i]['caption'];

				 // setup the image markers
				var image = new google.maps.MarkerImage(imgsrc['square'],
					new google.maps.Size(20, 32),
					new google.maps.Point(0, 32)
				);

				// check if this image has a lat set, if not, we skip it.
				if (coords.latitude) { 

					marker = new google.maps.Marker({
						position: new google.maps.LatLng(coords.latitude, coords.longitude),
						icon : image,
						map: map
					});

					google.maps.event.addListener(marker, 'click', (function(marker, i) {
						return function() {
							infowindow.setContent('&lt;div class="picture"&gt; &lt;span class="title"&gt;'+caption+'&lt;/span&gt;&lt;img src="'+imgsrc['medium']+'" alt="" /&gt;&lt;/div&gt;');
							infowindow.open(map, marker);
						}
					})(marker, i));

				} // end if

			});
	});
});</pre>
<h3>Thats it! Just add some style</h3>
<p>Thats it! Just add a quick dash of style to make things look good and we are off to the races.</p>
<pre class="brush:css">#map {
	overflow: hidden;
}
.picture {
	background: yellow;
	overflow: hidden;
	position: relative;
	}

	.picture span {
		position: absolute;
		width: 100%;
		bottom: 0;
		padding: 4px;
		background: #000;
		color: #fff;
		font-size: 12px;
		font-family: Arial;}

	.picture img {
		height: 400px;}</pre>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/burstn-google-maps-photos-mashup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
		<item>
		<title>Using jQuery, JSON and Google&#8217;s Visualization Geo API Together</title>
		<link>https://wesbos.com/jquery-json-google-visualization-api/</link>
				<comments>https://wesbos.com/jquery-json-google-visualization-api/#comments</comments>
				<pubDate>Thu, 17 Mar 2011 03:44:23 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[JSON]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=147</guid>
				<description><![CDATA[Was helping someone out in the jQuery IRC channel today and they were having some trouble with a JSON api that they were using. To simply put it they wanted to: Load a JSON file via Ajax Parse the results &#8230; <a href="https://wesbos.com/jquery-json-google-visualization-api/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>Was helping someone out in the jQuery IRC channel today and they were having some trouble with a JSON api that they were using. To simply put it they wanted to:</p>
<ol>
<li>Load a JSON file via Ajax</li>
<li>Parse the results</li>
<li>Pass it to <a href="http://code.google.com/apis/ajax/playground/?type=visualization#geo_map" target="_blank">Google&#8217;s Visualization</a> into a data table</li>
<li>Create a map based on that data.</li>
</ol>
<p>Now the example given is great, however it doesn&#8217;t jive well when you want to add in a friendly library like jQuery. So here is how we fixed it:<span id="more-147"></span></p>
<h3>The JSON Data in regiontop10.json</h3>
<pre class="brush:js">[
    {
        "DisplayName": "United States",
        "Name": "US",
        "population": 307006550
    },
    {
        "DisplayName": "Canada",
        "Name": "CA",
        "population": 33739900
    },
    {
        "DisplayName": "United Kingdom",
        "Name": "GB",
        "population": 61838154
    },
    {
        "DisplayName": "Mexico",
        "Name": "MX",
        "population": 107431225
    }
]</pre>
<p>Then we just needed load the data from this file and create the map. Comments on how this code works are inline.</p>
<pre class="brush:js">    google.load('visualization', '1', {packages: ['geomap']});

    $(function() {
    		// when document loads, grab the json
			$.getJSON('regiontop10.json', function(data) {
				// once grabbed, we run this callback

				// setup the new map and its variables
				var map = new google.visualization.DataTable();
					map.addRows(data.length);  // length gives us the number of results in our returned data
					map.addColumn('string', 'Country');
	      		map.addColumn('number', 'Population');

				// now we need to build the map data, loop over each result
				$.each(data, function(i,v) {
					// set the values for both the name and the population
					map.setValue(i, 0, v.DisplayName);
					map.setValue(i, 1, v.population);
				});
				// finally, create the map!
				var geomap = new google.visualization.GeoMap(
		          document.getElementById('visualization'));
		     		 geomap.draw(map, null);

			});
   });</pre>
<p>And that is it! <a href="http://wesbos.com/demos/google-geo-map-visualization/">Take a look at the demo</a> and view source for the rest of the HTML markup.</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/jquery-json-google-visualization-api/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
							</item>
		<item>
		<title>The Cobbler&#8217;s Children Finally Have Shoes &#8211; New Site Launched!</title>
		<link>https://wesbos.com/wes-bos-new-site/</link>
				<comments>https://wesbos.com/wes-bos-new-site/#respond</comments>
				<pubDate>Tue, 15 Mar 2011 15:00:38 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=90</guid>
				<description><![CDATA[This is a phrase I will no longer have to joke about when telling someone about my website. I&#8217;ve finally taken the time to create myself a brand spakin&#8217; new website. Its been almost 2.5 years since I launched the &#8230; <a href="https://wesbos.com/wes-bos-new-site/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<h3 style="text-align: left;"><span style="font-size: 13px; font-weight: normal;">This is a phrase I will no longer have to joke about when telling someone about my website. I&#8217;ve finally taken the time to create myself a brand spakin&#8217; new website. Its been almost 2.5 years since I launched the last one and a lot has changed. I&#8217;m very proud to launch this site as I think it reflects who I am a lot better than the old one.<span id="more-90"></span></span></h3>
<p><strong><span style="font-size: 13px;">I&#8217;m Blogging!</span></strong></p>
<p style="text-align: left;">Over the past couple of years I&#8217;ve gathered up so much knowledge, so many code snippets and many more insights on everything from web development to entrepreneurship. These were all great, but I never had a spot to put them! With the start of this blog, I hope to further establish myself by helping the community who I&#8217;ve learned so much from over the years.</p>
<h3>Ingredients</h3>
<p style="text-align: left;">Incase you were wondering, the site, which is fairly simple in its make up, is run on WordPress with hints of HTML5, CSS3 and some jQuery.</p>
<h3 style="text-align: left;">Suggestions</h3>
<p>I am often asked questions by friends who are just getting into something like WordPress or jQuery. They are usually asking how I did something on a certain website, or how to get started with a certain lanaguage. If there is anything you want to ask me, please get in touch right now. I&#8217;m always looking for ideas to do tutorials and blog posts on, so I would love to hear from you!</p>
<p>&nbsp;</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/wes-bos-new-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
		<item>
		<title>Simple PHP Page Caching Technique</title>
		<link>https://wesbos.com/simple-php-page-caching-technique/</link>
				<comments>https://wesbos.com/simple-php-page-caching-technique/#comments</comments>
				<pubDate>Tue, 15 Mar 2011 14:17:20 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[page-cache]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[snippet]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=68</guid>
				<description><![CDATA[This is a little code snippet that I use in almost every project that isn&#8217;t based on a popular CMS. Since its fairly expensive to hit the database on every page load, its a smart idea to cache the plain &#8230; <a href="https://wesbos.com/simple-php-page-caching-technique/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>This is a little code snippet that I use in almost every project that isn&#8217;t based on a popular CMS. Since its fairly expensive to hit the database on every page load, its a smart idea to cache the plain HTML markup of your page and serve that up. You can set how often the page cache is flushed out depending on how often you update your site&#8217;s content.<span id="more-68"></span></p>
<pre class="brush:php">&lt;?php
	// define the path and name of cached file
	$cachefile = 'cached-files/'.date('M-d-Y').'.php';
	// define how long we want to keep the file in seconds. I set mine to 5 hours.
	$cachetime = 18000;
	// Check if the cached file is still fresh. If it is, serve it up and exit.
	if (file_exists($cachefile) &amp;&amp; time() - $cachetime &lt; filemtime($cachefile)) {
   	include($cachefile);
    	exit;
	}
	// if there is either no file OR the file to too old, render the page and capture the HTML.
	ob_start();
?&gt;
	&lt;html&gt;
		output all your html here.
	&lt;/html&gt;
&lt;?php
	// We're done! Save the cached content to a file
	$fp = fopen($cachefile, 'w');
	fwrite($fp, ob_get_contents());
	fclose($fp);
	// finally send browser output
	ob_end_flush();
?&gt;</pre>
<p>Have some others tricks? Leave a comment below!</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/simple-php-page-caching-technique/feed/</wfw:commentRss>
		<slash:comments>46</slash:comments>
							</item>
		<item>
		<title>Web apps I pay for monthly</title>
		<link>https://wesbos.com/web-apps-i-pay-for-monthly/</link>
				<comments>https://wesbos.com/web-apps-i-pay-for-monthly/#respond</comments>
				<pubDate>Tue, 15 Mar 2011 14:14:54 +0000</pubDate>
		<dc:creator><![CDATA[wesbos]]></dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[basecamp]]></category>
		<category><![CDATA[cloud app]]></category>
		<category><![CDATA[dropbox]]></category>
		<category><![CDATA[freshbooks]]></category>
		<category><![CDATA[grooveshark]]></category>
		<category><![CDATA[reinvigorate]]></category>
		<category><![CDATA[tutsplus]]></category>

		<guid isPermaLink="false">http://wesbos.com/?p=75</guid>
				<description><![CDATA[The web is filled with with online applications and services that &#8220;Only cost a few bucks a month!&#8221;. While they are certainly a lot cheaper than buying desktop software, not all of them area always worth it. These are the &#8230; <a href="https://wesbos.com/web-apps-i-pay-for-monthly/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
								<content:encoded><![CDATA[<p>The web is filled with with online applications and services that &#8220;Only cost a few bucks a month!&#8221;. While they are certainly a lot cheaper than buying desktop software, not all of them area always worth it. These are the apps that I feed a few bucks to each month.<span id="more-75"></span></p>
<h3><a href="http://www.freshbooks.com/" target="_blank">Freshbooks</a></h3>
<p>Freshbooks makes invoicing clients easy. Dealing with poorly formatted excel documents and keeping track of payments are a thing of the past when you use freshbooks. At around $15/ month, the service pays for itself even if you are sending just a few invoices a month.</p>
<h3><a href="http://getcloudapp.com/" target="_blank">Cloud App</a></h3>
<p>Could App is a new addition to my paid services as I only signed up for the premium membership a month ago after using a free account for 7+ months. The app is very simple, take a screenshot and it automatically uploads it to the cloud and embeds a short URL into your clipboard &#8211; all within about 2 seconds. The premium account (at $5/ month) allows me to upload any type of file up to 250MB as well as use my own snazzy domain name &#8216;b-w.es&#8217;.</p>
<h3><a href="http://basecamphq.com/" target="_blank">Basecamp</a></h3>
<p>Basecamp is a project management and collaboration tool created by 37 Signals. Ask any developer, designer or team lead what tools are in their toolbox, and they will likely say Basecamp. The premium service allows me to manage large projects, collaborate communication, organize to-dos among other time savers. If you&#8217;re pulling your hair out because your email inbox is in disarray, its time to check out Basecamp.</p>
<h3><a href="https://www.dropbox.com/" target="_blank">Dropbox</a></h3>
<p>Dropbox is a file syncing service that has grown to become the standard in the web design and development industry. I work right out of my Dropbox folder and always maintain a safe backup both in the cloud as well as on my other computers. It even acts as sort of a source control system when working on a project with more than one developer. The revert history function has saved my ass many times over to make it worth the $100/year.</p>
<h3><a href="http://tutsplus.com/" target="_blank">Tuts Plus Membership</a></h3>
<p>Keeping your skills sharp is an important part of being a developer. The TutsPlus network provides an array of sites that offer up premium tutorials to paying subscribers. The tutorials are always top quality and definitely worth the few bucks a month I pay. I check <a href="http://net.tutsplus.com/" target="_blank">NetTuts</a> daily but also keep an eye on <a href="http://webdesign.tutsplus.com/" target="_blank">Web Design Tuts Plus</a>, <a href="http://mobile.tutsplus.com/" target="_blank">Mobile Tuts</a>, and <a href="http://psd.tutsplus.com/" target="_blank">PSD Tuts</a></p>
<h3><a href="http://reinvigorate.net/" target="_blank">Reinvigorate</a></h3>
<p>Website analytics company Reinvigorate fills in the gaps where Google Analytics falls short. With realtime tracking and really awesome heatmaps, the data I get from them is worth the $10/month.</p>
<h3><a href="http://listen.grooveshark.com/" target="_blank">Groove Shark</a> (Almost)</h3>
<p>I&#8217;m a huge Groove Shark user and have considered their premium plan many times. The only thing that is holding me back at the moment is the ability to use the forward and back media keys on my laptop. The day they implement this, I&#8217;ll be first to sign up</p>
]]></content:encoded>
							<wfw:commentRss>https://wesbos.com/web-apps-i-pay-for-monthly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
	</channel>
</rss>
