<?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:atom="http://www.w3.org/2005/Atom"
				  >
<channel>
<title></title>
<link>http://www.mattsnider.com/</link>
<description><![CDATA[Understanding Web Development]]></description>
<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://www.mattsnider.com/feed" type="application/rss+xml" />
<item>
<title>Web Development News Week 4, January 2012</title>
<link>http://www.mattsnider.com/news/web-development-news-week-4-january-2012/</link>
<guid isPermaLink="true" >http://www.mattsnider.com/news/web-development-news-week-4-january-2012/</guid>
<pubDate>Tue, 31 Jan 2012 22:07:20 -0800</pubDate>
<description><![CDATA[<p>Web development news for the 4th week of 2012:</p>

<p><h3>JavaScript</h3></p>

<p><a href="http://venturebeat.com/2012/01/30/dahl-out-mike-drop/">Node.js creator Ryan Dahl steps away from Node’s day-to-day</a> and is turning the management over to Joyent’s Isaac Schlueter. While this is by no means the end of Node.js, it is an interesting turn of events, given its recent meteroric rise in popularity. Enjoy your spare time Ryan and good luck Isaac.</p>

<p><a href="http://javascriptweekly.com/archive/63.html">JavaScript Weekly, Issue #63 - January 27th, 2012</a></p>

<p>Testing Backbone.js, Best Practices, ES6-Collections: A Shim for New ECMAScript 6 Collection Types, InfoWorld's Interview with Node.js Creator Ryan Dahl, &hellip;</p>

<p><h3>HTML 5</h3></p>

<p><a href="http://html5weekly.com/archive/22.html">HTML 5 Weekly, Issue #22 - January 25th, 2011</a></p>

<p>HTML5 Please: Use the New and Shiny Responsibly, An Introduction to the HTML5 Gamepad API, Steve Souders on High Performance HTML5, &hellip;</p>]]></description>
<wfw:commentRss>http://js-kit.com/rss/mattsnider.com/p=611</wfw:commentRss>
</item>
<item>
<title>Web Development News Week 3, January 2012</title>
<link>http://www.mattsnider.com/news/web-development-news-week-3-january-2012/</link>
<guid isPermaLink="true" >http://www.mattsnider.com/news/web-development-news-week-3-january-2012/</guid>
<pubDate>Tue, 24 Jan 2012 10:29:14 -0800</pubDate>
<description><![CDATA[<p>Web development news for the 3rd week of 2012:</p>

<p><h3>JavaScript</h3></p>

<p><a href="http://javascriptweekly.com/archive/62.html">JavaScript Weekly, Issue #62 - January 20th, 2012</a></p>

<p>The V8 Myth: Why JavaScript is not a Worthy Competitor, JavaScript Design Patterns: Decorators, Simplicity and JavaScript Modules, &hellip;</p>

<p><h3>HTML 5</h3></p>

<p><a href="http://html5weekly.com/archive/21.html">HTML 5 Weekly, Issue #21 - January 18th, 2011</a></p>

<p>(Better) Tabs with Round Out Borders using CSS3, The Lowdown on :Before and :After in CSS, The CSS3 Click Chart, &hellip;</p>

<p><h3>Browsers</h3></p>

<p>Christian Heilmann wrote an interesting article about <a href=http://christianheilmann.com/2012/01/19/some-real-world-browser-stats/">some real world browser stats</a>.</p>]]></description>
<wfw:commentRss>http://js-kit.com/rss/mattsnider.com/p=610</wfw:commentRss>
</item>
<item>
<title>Amending and Squashing Commits in Git</title>
<link>http://www.mattsnider.com/development/amending-and-squashing-commits-in-git/</link>
<guid isPermaLink="true" >http://www.mattsnider.com/development/amending-and-squashing-commits-in-git/</guid>
<pubDate>Sat, 21 Jan 2012 21:51:02 -0800</pubDate>
<description><![CDATA[<p>Have you ever committed code to your Git repository, and then realized that you forgot something or there was an error in your code? Wish there was an easy way to amend your commit with the fix? What about if you've already pushed your code or made several commits?</p>

<p>If you run a strong test suite, and commit before running the whole test, this probably happens regularly (at least it does for me). Usually each fix you make will require a separate commit until the test suite passes. While there is nothing wrong with many small commits, sometimes it is helpful to squash many commits into one complete commit, especially when hooking project management software into your Git commits. This article discusses a technique used to squash multiple commits in branch (even master) into a single commit. Next week we will discuss another approach to this problem where you start in a branch and squash when you merge the branch into master.</p>

<p><h3>Getting ready</h3></p>

<p>You will need Git install on your machine and <a href="http://gitx.frim.nl/">GitX</a> is also useful for visualizing the Git commit tree.</p>

<p><h3>How to do it...</h3></p>

<p>In the simplest situation, where you have just committed and now need to amend that commit:</p>

<p><pre class="brush:bash">git add .
git commit --amend</pre></p>

<p>If you have 2 or more previous commits that you want to squash, then read on. The follow steps discuss how to squash multiple commits.</p>

<p>The following command will list the previous commit(s) (change -1 to -N, where N is the number of previous commits to see). However, it is much easier to see commit using a tool like GitX.</p>

<p><pre class="brush:bash">git log -1 --sparse</pre></p>

<p>Running the previous command will output something like:</p>

<p><pre class="brush:bash">commit a8e3d75acc974a76bc7aafb43b392a69ab1bab57
Author: Matthew Snider <mattsnider@example.com>
Date:   Thu Jan 19 14:05:55 2012 -0800

    [#23700817] COMMIT MESSAGE B

commit 7c44b35795b03426861963ad8cc9f5bd1898d901
Author: Matthew Snider <mattsnider@example.com>
Date:   Thu Jan 19 14:44:01 2012 -0800

    [#23700817] COMMIT MESSAGE A</pre></p>

<p>Grab the SHA-1 of your latest commit (we'll call this B, a8e3d75acc974a76bc7aafb43b392a69ab1bab57), and the SHA-1 of the previous commit that you want to squash into (we'll call this A, 7c44b35795b03426861963ad8cc9f5bd1898d901). It doesn't have to be the immediately previous commit, if you want to squash several commits together, but I usually only squash 2 commits together for sanity reasons.</p>

<p>Move the Git back to the lastest commit (B) that we want to squash (detached HEAD, you are in a temp mode now and won't affect master):</p>

<p><pre class="brush:bash">git checkout <sha1_for_B></pre></p>

<p>Reset the branch pointer to the initial commit (A), but leave the index and working tree intact:</p>

<p><pre class="brush:bash">git reset --soft <sha1_for_A></pre></p>

<p>Amend the commit (A) on the initial tree using the tree from 'B':</p>

<p><pre class="brush:bash">git commit --amend</pre></p>

<p>Get the SHA-1 of the current commit (we'll call this commit C):</p>

<p><pre class="brush:bash">git rev-parse HEAD</pre></p>

<p>Go back to the original branch (we assumed master for this example, but this can be done just as easily on a branch as well):</p>

<p><pre class="brush:bash">git checkout master</pre></p>

<p>Replay all the commits after B onto the new initial commit:</p>

<p><pre class="brush:bash">git rebase --onto <sha1_for_C> <sha1_for_B></pre></p>

<p>Push changes to master:</p>

<p><pre class="brush:bash">git push origin master</pre></p>

<p><h3>How it works&hellip;</h3></p>

<p>The simple solution simply adjustes the previous commit tree to include your most recent changes that you added. It also gives you an opportunity to update the commit message. If you have not added new changes, then the amend command will simply allow you to change your previous commits message.</p>

<p>If you are changing more than the previous commit, these steps cause Git to jump to a forward commit, then move back to a previous commit, without actually updating the tree. Since the changes from the forward commit are still there, you can amend them onto the previous commit, creating a new updated commit containing the first commit and all changes until the forward commit. Once you push to master it will be as if the there was ever only 1 commit.</p>

<p><h3>There's more&hellip;</h3></p>

<p>This technique was originally found on the Stack Overflow article <a href="http://stackoverflow.com/questions/598672/git-how-to-squash-the-first-two-commits">git-how-to-squash-the-first-two-commits</a>. The author follows similar steps to those above, but instead of remembering the newly created commit SHA, he tags the commit for referencing and deletes the tag at the end. The questioner was trying to squash their first and second commits ever in master, so this technique can be used to cleanup any part of your Git history. Additionally, if you replace <q>master</q> in the steps above with whatever active branch you are using, then you can use this same techique on your branches.</p>]]></description>
<wfw:commentRss>http://js-kit.com/rss/mattsnider.com/p=609</wfw:commentRss>
</item>
<item>
<title>Web Development News Week 2, January 2012</title>
<link>http://www.mattsnider.com/news/web-development-news-week-2-january-2012/</link>
<guid isPermaLink="true" >http://www.mattsnider.com/news/web-development-news-week-2-january-2012/</guid>
<pubDate>Tue, 17 Jan 2012 08:46:28 -0800</pubDate>
<description><![CDATA[<p>Web development news for the 2nd week of 2012:</p>

<p><h3>JavaScript</h3></p>

<p><a href="http://javascriptweekly.com/archive/61.html">JavaScript Weekly, Issue #61 - January 13th, 2012</a></p>

<p>What You May Not Know About jQuery (in 5 Methods), JavaScript's 'eval' Considered Crazy, Writing Quality Third-Party JS: Part 1 - The First Rule, &hellip;</p>

<p><h3>HTML 5</h3></p>

<p><a href="http://html5weekly.com/archive/20.html">HTML 5 Weekly, Issue #20 - January 11th, 2011</a></p>

<p>Profiling CSS for fun and profit. Optimization notes, 7 Things Still Missing From CSS, Cut the Rope: A Slick HTML5 Game from Microsoft and ZeptoLab, &hellip;</p>]]></description>
<wfw:commentRss>http://js-kit.com/rss/mattsnider.com/p=608</wfw:commentRss>
</item>
<item>
<title>Web Development News Week 1, January 2012</title>
<link>http://www.mattsnider.com/news/web-development-news-week-1-january-2012/</link>
<guid isPermaLink="true" >http://www.mattsnider.com/news/web-development-news-week-1-january-2012/</guid>
<pubDate>Tue, 10 Jan 2012 09:20:30 -0800</pubDate>
<description><![CDATA[<p>Web development news for the 1st week of 2012:</p>

<p><h3>JavaScript</h3></p>

<p><a href="http://javascriptweekly.com/archive/60.html">JavaScript Weekly, Issue #60 - January 6th, 2012</a></p>

<p>WebStorm 3.0: A JavaScript IDE from JetBrains, JsFiddle Tips And Tricks, Matador: An MVC Framework for Node (by Dustin Diaz), &hellip;</p>

<p><h3>HTML 5</h3></p>

<p><a href="http://html5weekly.com/archive/19.html">HTML 5 Weekly, Issue #19 - January 4th, 2011</a></p>

<p>Foundation HTML5 Animation with JavaScript, How Google Ported 'Angry Birds' to HTML5, Implementing Minecraft in WebGL, &hellip;</p>]]></description>
<wfw:commentRss>http://js-kit.com/rss/mattsnider.com/p=607</wfw:commentRss>
</item>
<item>
<title>Web Development News Week 51 - 52, December 2011</title>
<link>http://www.mattsnider.com/news/web-development-news-week-51-52-december-2011/</link>
<guid isPermaLink="true" >http://www.mattsnider.com/news/web-development-news-week-51-52-december-2011/</guid>
<pubDate>Tue, 03 Jan 2012 12:23:47 -0800</pubDate>
<description><![CDATA[<p>Sorry to miss my update last week, I was spending time with the family and wasn't able to post. However, 2012 is here and I hope find time to write more substantive articles. </p>

<p>Anyway here is the web development news for the last two weeks of 2011:</p>

<p><h3>JavaScript</h3></p>

<p><a href="http://javascriptweekly.com/archive/58.html">JavaScript Weekly, Issue #58 - December 23rd, 2011</a></p>

<p>Fake Operator Overloading in JavaScript, JavaScript as a First Language class, Your jQuery: Now With 67% Less Suck, &hellip;</p>

<p><a href="http://javascriptweekly.com/archive/59.html">JavaScript Weekly, Issue #59 - December 30th, 2011</a></p>

<p>The Rise and Rise of JavaScript, The JS Guide to Objects, Functions, Closures and Scope, 12 Days of CreativeJS, &hellip;</p>

<p><h3>HTML 5</h3></p>

<p><a href="http://html5weekly.com/archive/18.html">HTML 5 Weekly, Issue #18 - December 21st, 2011</a></p>

<p>The Smallest Possible Valid (X)HTML Documents, The HTML5 'output' Element, Internet Explorer to Get Automatic Upgrades across XP, Vista and Windows 7, &hellip;</p>]]></description>
<wfw:commentRss>http://js-kit.com/rss/mattsnider.com/p=606</wfw:commentRss>
</item>
<item>
<title>Web Development News Week 50, December 2011</title>
<link>http://www.mattsnider.com/news/web-development-news-week-50-december-2011/</link>
<guid isPermaLink="true" >http://www.mattsnider.com/news/web-development-news-week-50-december-2011/</guid>
<pubDate>Tue, 20 Dec 2011 08:53:16 -0800</pubDate>
<description><![CDATA[<p>Web development news for the 50th week of 2011:</p>

<p><h3>JavaScript</h3></p>

<p><a href="http://javascriptweekly.com/archive/57.html">JavaScript Weekly, Issue #57 - December 16th, 2011</a></p>

<p>SOLID JavaScript: The Single Responsibility Principle, A Case Against Using CoffeeScript, JSPkg: A New Place to Host JavaScript Packages, &hellip;</p>

<p>PPK discusses the state of static positioning in mobile browsers: <a href="http://www.quirksmode.org/blog/archives/2011/12/position_fixed.html">Position Fixed</a>.</p>

<p>Nicholas Zakas discusses <a href="http://www.nczonline.net/blog/2011/12/14/timer-resolution-in-browsers/">timer resolution in browsers</a>. He's discussed this topic before, but is updating us on the present and future of timer resolution.</p>

<p><h3>HTML 5</h3></p>

<p><a href="http://html5weekly.com/archive/17.html">HTML 5 Weekly, Issue #17 - December 14th, 2011</a></p>

<p>How to Use Firebug on your iPad and iPhone, HTML5 Scorecard: Amazon Kindle Fire, What I Learned About the Web in 2011: An Experts' Roundup, &hellip;</p>]]></description>
<wfw:commentRss>http://js-kit.com/rss/mattsnider.com/p=605</wfw:commentRss>
</item>
<item>
<title>Web Development News Week 49, December 2011</title>
<link>http://www.mattsnider.com/news/web-development-news-week-49-december-2011/</link>
<guid isPermaLink="true" >http://www.mattsnider.com/news/web-development-news-week-49-december-2011/</guid>
<pubDate>Tue, 13 Dec 2011 09:48:31 -0800</pubDate>
<description><![CDATA[<p>Web development news for the 49th week of 2011:</p>

<p><h3>JavaScript</h3></p>

<p><a href="http://javascriptweekly.com/archive/56.html">JavaScript Weekly, Issue #56 - December 9nd, 2011</a></p>

<p>What is Happening to the jQuery Plugins Site, Introducing ECMAScript 5.1, Introducing Mozilla's JavaScript Native File Management: OS.File, &hellip;</p>

<p>It's time again for the yearly <a href="http://dailyjs.com/2011/12/01/javascript-developer-survey-2011/">JavaScript Developer Survery</a>.</p>

<p><h3>HTML 5</h3></p>

<p><a href="http://html5weekly.com/archive/16.html">HTML 5 Weekly, Issue #16 - December 7th, 2011</a></p>

<p>Top 6 Trends In HTML5 In 2011, Auto-Saving User Input In Your Forms With HTML5 and Sisyphus.js, Let's have a look at some recently landed Web APIs for Firefox, &hellip;</p>

<p><h3>Python</h3></p>

<p>I discovered an interesting article on the Yipit blog, where they discuss feature flipping in a continuous deployment Django/Python environment: <a href="http://tech.yipit.com/2011/11/30/getting-to-continuous-deployment-in-django-feature-flipping/">Getting to Continuous Deployment in Django: Feature Flipping</a>.</p>]]></description>
<wfw:commentRss>http://js-kit.com/rss/mattsnider.com/p=604</wfw:commentRss>
</item>
<item>
<title>Web Development News Week 48, December 2011</title>
<link>http://www.mattsnider.com/news/web-development-news-week-48-december-2011/</link>
<guid isPermaLink="true" >http://www.mattsnider.com/news/web-development-news-week-48-december-2011/</guid>
<pubDate>Tue, 06 Dec 2011 00:04:21 -0800</pubDate>
<description><![CDATA[<p>Web development news for the 48th week of 2011:</p>

<p><h3>JavaScript</h3></p>

<p><a href="http://javascriptweekly.com/archive/55.html">JavaScript Weekly, Issue #55 - December 2nd, 2011</a></p>

<p>JavaScript Libraries Now Used by 50% of Top 1m Web Sites, Principles of Writing Consistent Idiomatic JavaScript, Nondeterministic Turing Machine Simulator in 23 Lines of JavaScript, &hellip;</p>

<p>I also found <a href="http://javascriptweblog.wordpress.com/2011/12/05/extending-javascript-natives/">Extending JavaScript Natives</a> by Angus Croll very interesting. It covers a lot of the reasons why we all know not to extend natives in JavaScript, but also mentions a few cases where it might make sense to bend this rule.</p>

<p><h3>HTML 5</h3></p>

<p><a href="http://html5weekly.com/archive/15.html">HTML 5 Weekly, Issue #15 - November 30th, 2011</a></p>

<p>Stitches - An HTML5 Sprite Generator, Typography Effects with CSS3 and jQuery, HTML5 Semantics and Good Coding Practices, &hellip;</p>]]></description>
<wfw:commentRss>http://js-kit.com/rss/mattsnider.com/p=603</wfw:commentRss>
</item>
<item>
<title>Web Development News Week 47, November 2011</title>
<link>http://www.mattsnider.com/news/web-development-news-week-47-november-2011/</link>
<guid isPermaLink="true" >http://www.mattsnider.com/news/web-development-news-week-47-november-2011/</guid>
<pubDate>Tue, 29 Nov 2011 09:40:40 -0800</pubDate>
<description><![CDATA[<p>Web development news for the 47th week of 2011:</p>

<p><h3>JavaScript</h3></p>

<p><a href="http://javascriptweekly.com/archive/54.html">JavaScript Weekly, Issue #54 - November 25th, 2011</a></p>

<p>Felix's Node.js Style Guide, Face Detection jQuery Plugin, Asynchronous UIs - The Future of Web User Interfaces, &hellip;</p>

<p><h3>HTML 5</h3></p>

<p><a href="http://html5weekly.com/archive/14.html">HTML 5 Weekly, Issue #14 - November 23rd, 2011</a></p>

<p>Adobe Donates Flex to Apache, The Fundamentals, Primitives and History of HTML5, Going Fullscreen with Canvas, &hellip;</p>


<p><h3>CSS</h3></p>

<p>If you aren't using SASS to better manage your CSS, then you should check out this article, <a href="http://www.alistapart.com/articles/getting-started-with-sass/">Getting Started With SASS</a> from A List Apart. I&rsquo;ve started using SASS for all my projects as it allows for easier cross-browser support and I have to write much less code.</p>

<p><h3>General</h3></p>

<p>Many web companies are opposing SOPA, the A List Apart article, <a href="http://www.alistapart.com/articles/say-no-to-sopa/">Say No to SOPA</a>, describes why you should oppose SOPA as well.</p>]]></description>
<wfw:commentRss>http://js-kit.com/rss/mattsnider.com/p=602</wfw:commentRss>
</item>
</channel>
</rss>
