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

<channel>
	<title>scriptNode &#187; Novice</title>
	<atom:link href="http://scriptnode.com/category/novice/feed/" rel="self" type="application/rss+xml" />
	<link>http://scriptnode.com</link>
	<description>Tips and tricks for web developers.</description>
	<lastBuildDate>Tue, 01 Sep 2009 18:46:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Making @Twitter Names Clickable</title>
		<link>http://scriptnode.com/article/making-twitter-names-clickable/</link>
		<comments>http://scriptnode.com/article/making-twitter-names-clickable/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 07:10:32 +0000</pubDate>
		<dc:creator>Matt Hackett</dc:creator>
				<category><![CDATA[Novice]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[regex]]></category>
		<category><![CDATA[script-sunday]]></category>
		<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://scriptnode.com/?p=334</guid>
		<description><![CDATA[
Here&#8217;s a super quick Script Sunday for you: making @Twitter usernames clickable. Here&#8217;s an example:


@scriptnode

Should be:

@&#60;href="http://twitter.com/scriptnode"&#62;scriptnode&#60;/a&#62;

Which looks like:

@scriptnode


And here&#8217;s how to do it in PHP and JavaScript:

PHP

$text = preg_replace(&#8217;#@([a-z0-9_]+)#i&#8217;, &#8216;@&#60;a href=&#8221;http://twitter.com/\\1&#8243;&#62;\\1&#60;/a&#62;&#8217;, $text);


That was easy! Now let&#8217;s get to the more interesting JavaScript, which allows us to test inline!

JavaScript

text = text.replace(/@([a-z0-9_]+)/gi, &#8216;@&#60;a href=&#8221;http://twitter.com/$1&#8243;&#62;$1&#60;/a&#62;&#8217;);


You can run this [...]]]></description>
			<content:encoded><![CDATA[<p>
Here&#8217;s a super quick Script Sunday for you: making @Twitter usernames clickable. Here&#8217;s an example:
</p>
<p>
<code>@scriptnode</code>
</p>
<p>Should be:</p>
<p>
<code>@&lt;href="http://twitter.com/scriptnode"&gt;scriptnode&lt;/a&gt;</code>
</p>
<p>Which looks like:</p>
<p>
@<a href="http://twitter.com/scriptnode">scriptnode</a>
</p>
<p>
And here&#8217;s how to do it in PHP and JavaScript:
</p>
<h3>PHP</h3>
<p><textarea class="php" cols="50" name="code" rows="10"><br />
$text = preg_replace(&#8217;#@([a-z0-9_]+)#i&#8217;, &#8216;@&lt;a href=&#8221;http://twitter.com/\\1&#8243;&gt;\\1&lt;/a&gt;&#8217;, $text);<br />
</textarea></p>
<p>
That was easy! Now let&#8217;s get to the more interesting JavaScript, which allows us to test inline!
</p>
<h3>JavaScript</h3>
<p><textarea class="javascript" cols="50" name="code" rows="10"><br />
text = text.replace(/@([a-z0-9_]+)/gi, &#8216;@&lt;a href=&#8221;http://twitter.com/$1&#8243;&gt;$1&lt;/a&gt;&#8217;);<br />
</textarea></p>
<p>
You can run this code right here:
</p>
<div class="section">
<p id="example-twitter-output">Some @<a href="http://twitter.com/test">test</a> code</p>
<input id="example-twitter-input" type="text" value="Some @test code">
</div>
<p>
<button onclick="YAHOO.twitterExample();">Format</button>
</p>
<p><script type="text/javascript">
<!--//
YAHOO.twitterExample = function() {
var text = document.getElementById('example-twitter-input').value;
text = text.replace(/@([a-z0-9_]+)/gi, '@<a href="http://twitter.com/$1">$1</a>');
document.getElementById('example-twitter-output').innerHTML = text;
};
//-->
</script></p>
<p>
I&#8217;m awful at regular expressions; please do let me know if I could optimize somewhere or if I missed something.<br />
<strong>Edit:</strong> <code>+</code> instead of <code>*</code></p>
]]></content:encoded>
			<wfw:commentRss>http://scriptnode.com/article/making-twitter-names-clickable/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PHP: goto hell;</title>
		<link>http://scriptnode.com/article/php-goto-hell/</link>
		<comments>http://scriptnode.com/article/php-goto-hell/#comments</comments>
		<pubDate>Fri, 14 Aug 2009 19:53:11 +0000</pubDate>
		<dc:creator>Matt Hackett</dc:creator>
				<category><![CDATA[Novice]]></category>
		<category><![CDATA[code-style]]></category>
		<category><![CDATA[just-for-fun]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://scriptnode.com/?p=326</guid>
		<description><![CDATA[
As of version 5.3, PHP supports goto (much to the chagrin of many). To protest, one snarky programmer filed a faux bug in their bug tracking system:





Funny stuff! But all kidding aside, I personally feel like PHP was ugly enough without goto. To me, one of the language&#8217;s biggest downfalls has always been that it [...]]]></description>
			<content:encoded><![CDATA[<p>
As of <a href="http://www.sitepoint.com/article/whats-new-php-5-3/">version 5.3</a>, PHP supports <a href="http://us3.php.net/goto"><code>goto</code></a> (much to the chagrin of many). To protest, one snarky programmer filed a <a href="http://bugs.php.net/bug.php?id=48669">faux bug</a> in their bug tracking system:
</p>
<p>
<a href="http://bugs.php.net/bug.php?id=48669"><img alt="PHP: goto hell;" src="/assets/img/php_goto_hell.jpg" style="border: 1px solid #000;"/></a>
</p>
<p>
Funny stuff! But all kidding aside, I personally feel like PHP was ugly enough without <code>goto</code>. To me, one of the language&#8217;s biggest downfalls has always been that it practically <em>encourages</em> sloppy design, and this is a huge step in the wrong direction. How do you feel about it?
</p>
<p>
(Link via <a href="http://foohack.com/">Isaac Schlueter</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://scriptnode.com/article/php-goto-hell/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>5 Things That Suck About Being a Frontend Engineer</title>
		<link>http://scriptnode.com/article/5-things-that-suck-about-being-a-frontend-engineer/</link>
		<comments>http://scriptnode.com/article/5-things-that-suck-about-being-a-frontend-engineer/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 00:23:18 +0000</pubDate>
		<dc:creator>Matt Hackett</dc:creator>
				<category><![CDATA[Novice]]></category>
		<category><![CDATA[careers]]></category>
		<category><![CDATA[just-for-fun]]></category>

		<guid isPermaLink="false">http://scriptnode.com/?p=313</guid>
		<description><![CDATA[
Call it what you will. There&#8217;s been much debate about the job title for a frontend engineer, or a web developer, or whatever name you prefer. What I&#8217;m referring to, however, are the folks who code for the browser. If you spend all day waste-deep in markup, CSS and JavaScript, then you do what I [...]]]></description>
			<content:encoded><![CDATA[<p>
Call it what you will. There&#8217;s been much debate about the job title for a frontend engineer, or a web developer, or whatever name you prefer. What I&#8217;m referring to, however, are the folks who code for the browser. If you spend all day waste-deep in markup, <a href="/tag/css/">CSS</a> and <a href="/tag/javascript/">JavaScript</a>, then you do <a href="http://raptr.com/">what I do</a> and I&#8217;m talking about you.
</p>
<p>
And let&#8217;s just skip right past <a href="http://www.stopie6.com/">Internet Explorer</a> and its plethora of headaches, shall we? We all know it sucks. Here&#8217;s why <em>else</em> it sucks to be one of us:
</p>
<ol>
<li>
<h3>Everyone Thinks It&#8217;s Your Fault</h3>
<p>
So you&#8217;re <a href="/article/5-ways-qa-ruin-developers-lives/">QA</a>. You&#8217;re testing a website and something is broken. It looks to you like the frontend, because that&#8217;s what you see. What may separate good QA from excellent QA is the ability to determine where the error lies, but sometimes that&#8217;s out of QA&#8217;s scope.
</p>
<p>
Regardless of who the owner is, chances are the issue will go to you first. You must then determine if it&#8217;s even your issue, and either fix it, or pass it on. Bringing us to …
</p>
</li>
<li>
<h3>You Are Also a Project Manager</h3>
<p>
The frontend is the very <strong>last</strong> thing to get done. That&#8217;s because the design needs to be finished way in advance so that assets can be delivered, and the backend has to be complete before you have access to data to use in your implementation.
</p>
<p>
This means that you must act as <strong>Project Manager</strong> to keep everyone else on track, because otherwise you can&#8217;t ever get to work! And that&#8217;s why …
</p>
</li>
<li>
<h3>You Always Seem Late</h3>
<p>
Since you&#8217;re the last one that gets to begin implementing, chances are you&#8217;ve got less time than everyone else. And sometimes you can&#8217;t even get started until <em>after</em> your deadline! And even when you do finally get your assets and can get to it, sometimes …
</p>
</li>
<li>
<h3>You Must Know Photoshop</h3>
<p>
To be fair, I actually use <a href="http://www.gimp.org/">The Gimp</a>, which works fine. What I mean by this point is that you must learn to use a competent image manipulation program. Why? Because although you may have an excellent design person/team, chances are they&#8217;re not going to cater to you and your crazy <a href="http://delicious.com/richtaur/css">CSS hacks</a>.
</p>
<p>
You know what I mean. Sometimes you&#8217;re wanting to <a href="http://developer.yahoo.com/performance/rules.html">sprite your images</a> to get better page performance, or sometimes you need to pull off some crazy rounded corners hack to get the positioning <a href="http://developer.yahoo.com/yui/articles/gbs/">cohesive across browsers</a>. You could go back-and-forth with design all day, or you could say &#8220;screw it&#8221; and alter the image yourself. It sucks but that&#8217;s how it gets done. And that&#8217;s part of …
</p>
</li>
<li>
<h3>You Must be a Jack-of-All-Trades</h3>
<p>
In addition to competency with a decent image manipulation application, you&#8217;re going to need at least a familiarity in many other areas. It&#8217;s very rare to find a frontend engineer who doesn&#8217;t ever need to modify at least some server-side code.
</p>
<p>
For example, although I am official a frontend engineer, I probably spend 30-50% of my time in <a href="/tag/php/">PHP</a>. That&#8217;s because, before I can even render the markup I need to tweak, I&#8217;ve got to setup the data I receive from the backend.
</p>
<p>
Not to mention the various other tasks that randomly pop up in the webdev stack, such as <a href="http://www.addedbytes.com/apache/url-rewriting-for-beginners/">Apache rewrite rules</a> or cronjobs. I&#8217;m sure the same could be said for most jobs, but it seems like frontend engineers&#8217; skillsets must be broader than most.
</p>
</li>
</ul>
<div class="section">
But it&#8217;s not all bad. Especially right now in Silicon Valley, frontend engineers are quite valuable, so it&#8217;s a great time to know how to code for the browser. Either way, did I miss something? Let me know!
</div>
]]></content:encoded>
			<wfw:commentRss>http://scriptnode.com/article/5-things-that-suck-about-being-a-frontend-engineer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Simple Loading Bar</title>
		<link>http://scriptnode.com/article/simple-loading-bar/</link>
		<comments>http://scriptnode.com/article/simple-loading-bar/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 06:56:36 +0000</pubDate>
		<dc:creator>Matt Hackett</dc:creator>
				<category><![CDATA[Novice]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[lab]]></category>
		<category><![CDATA[script-sunday]]></category>

		<guid isPermaLink="false">http://scriptnode.com/?p=316</guid>
		<description><![CDATA[
Haven&#8217;t had a Script Sunday for a while, so here&#8217;s a quick, simple script for you. Ever see those Loading … overlay images and wonder if JavaScript can handle it? Turns out it&#8217;s extremely simple:


animate = (function() {
  var busy;
  return function(id) {
    if (busy) return;
    busy [...]]]></description>
			<content:encoded><![CDATA[<p>
Haven&#8217;t had a <a href="/tag/script-sunday/">Script Sunday</a> for a while, so here&#8217;s a quick, simple script for you. Ever see those <strong>Loading …</strong> overlay images and wonder if JavaScript can handle it? Turns out it&#8217;s extremely simple:
</p>
<p><textarea class="javascript" cols="50" name="code" rows="10"><br />
animate = (function() {</p>
<p>  var busy;</p>
<p>  return function(id) {</p>
<p>    if (busy) return;</p>
<p>    busy = true;<br />
    var width = 0;<br />
    var interval = setInterval(function() {</p>
<p>      var el = document.getElementById(id);<br />
      el.innerHTML = &#8216;@%
<div style="width: @px;"><span>@%</span></div>
<p>&#8216;.replace(/@/g, width);</p>
<p>      if (width++ >= 100) {<br />
        busy = false;<br />
        clearInterval(interval);<br />
      }</p>
<p>    }, 50);</p>
<p>  };</p>
<p>})();<br />
</textarea></p>
<p>
You can view this by itself <a href="/lab/bar/">in the lab</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://scriptnode.com/article/simple-loading-bar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP to Use Backslash as Namespace Separator</title>
		<link>http://scriptnode.com/article/php-to-use-backslash-as-namespace-separator/</link>
		<comments>http://scriptnode.com/article/php-to-use-backslash-as-namespace-separator/#comments</comments>
		<pubDate>Sun, 26 Oct 2008 21:23:52 +0000</pubDate>
		<dc:creator>Matt Hackett</dc:creator>
				<category><![CDATA[Novice]]></category>
		<category><![CDATA[code-style]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://scriptnode.com/?p=235</guid>
		<description><![CDATA[
After much debate, the minds behind PHP have made an important decision. The good news is, PHP will support namespaces. The (arguably) bad news is, the namespace separator will be the backslash character.


Here&#8217;s a simple example of what this will look like:


$object_instance = new My\PEAR\Module(&#8217;myvar&#8217;);


PHP 5 already already has its criticisms. The developers looked at [...]]]></description>
			<content:encoded><![CDATA[<p>
After <a href="http://wiki.php.net/_media/rfc/php.ns.txt?id=rfc%3Anamespaceseparator&#038;cache=cache">much debate</a>, the minds behind <a href="http://php.net/">PHP</a> have made an important decision. The good news is, PHP will support namespaces. The (arguably) bad news is, <a href="http://news.php.net/php.internals/41374">the namespace separator will be the backslash character</a>.
</p>
<p>
Here&#8217;s a simple example of what this will look like:
</p>
<p><textarea class="php" cols="50" name="code" rows="10"><br />
$object_instance = new My\PEAR\Module(&#8217;myvar&#8217;);<br />
</textarea></p>
<p>
PHP 5 already already has <a href="http://www.tnx.nl/php5.html">its criticisms</a>. The developers looked at <a href="http://wiki.php.net/rfc/namespaceseparator">many different options</a>, including <code>**</code>, <code>^^</code>, <code>%%</code>, <code>:&gt;</code>, <code>:)</code> and <code>:::</code>, but eventually decided on <code>&#92;</code>, which is an odd decision, given that it doesn&#8217;t remotely resemble <a href="http://www.math.tu-berlin.de/polymake/index.html#perl/namespaces.html[3,3,0]">its</a> <a href="http://en.wikipedia.org/wiki/Namespace_identifier">cousins</a>. In fact, it most closely resembles <a href="http://en.wikipedia.org/wiki/MS-DOS">directories in MS-DOS</a> or <a href="http://en.wikipedia.org/wiki/Windows_Registry">other Windows features</a>.
</p>
<p>
The argument was also made that current operators such as  <code>::</code> or <code>-&gt;</code> could have been used, but they <a href="http://us2.php.net/manual/en/language.oop5.paamayim-nekudotayim.php">already had other duties</a>. The argument doesn&#8217;t go far, however, because PHP of course uses the backslash character for escaping.</p>
]]></content:encoded>
			<wfw:commentRss>http://scriptnode.com/article/php-to-use-backslash-as-namespace-separator/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Simple Cookie Script</title>
		<link>http://scriptnode.com/article/simple-cookie-script/</link>
		<comments>http://scriptnode.com/article/simple-cookie-script/#comments</comments>
		<pubDate>Sun, 19 Oct 2008 09:22:23 +0000</pubDate>
		<dc:creator>Matt Hackett</dc:creator>
				<category><![CDATA[Novice]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[script-sunday]]></category>
		<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://scriptnode.com/?p=222</guid>
		<description><![CDATA[
I often chat with a lot of new JavaScript developers. Many of their questions are really easy and can be answered with single-line responses, such as, &#8220;How do you append to an array?&#8221;


myArray.push(thevalue);


Easy stuff. What&#8217;s unfortunate, though, is when the questions are a bit more involved, and these developers have already searched around a bit [...]]]></description>
			<content:encoded><![CDATA[<p>
I often <a href="irc://irc.freenode.org/#javascript">chat</a> with a lot of new JavaScript developers. Many of their questions are really easy and can be answered with single-line responses, such as, &#8220;How do you append to an array?&#8221;
</p>
<p><textarea class="javascript" cols="50" name="code" rows="5"><br />
myArray.push(thevalue);<br />
</textarea></p>
<p>
Easy stuff. What&#8217;s unfortunate, though, is when the questions are a bit more involved, and these developers have already searched around a bit and found lousy code to read and learn from. The problem is that there&#8217;s much ancient, <a href="http://www.w3schools.com/js/default.asp">awful JavaScript code</a> out there, and when performing simple search queries, these sites come up. My goal is to improve this process.
</p>
<p>
One common topic is that of cookies. Dealing with cookies is really basic stuff, but hey, that&#8217;s what the <a href="http://scriptnode.com/category/novice/">novice category</a> is for. So here&#8217;s a simple script to assist with managing cookies:
</p>
<p><textarea class="javascript" cols="50" name="code" rows="5"><br />
/**<br />
 * Global cookies object to manage cookies<br />
 * @return {Object} The exposed methods<br />
 * @public<br />
 */<br />
var cookies = (function() {</p>
<p>	/**<br />
	 * Gets a cookie&#8217;s value<br />
	 * @param {String} name The name of the cookie to get<br />
	 * @return {String} The cookie&#8217;s value, or false if it can&#8217;t find the cookie<br />
	 * @member cookies<br />
	 * @public<br />
	 */<br />
	var get = function(name) {</p>
<p>		var cookie = document.cookie,<br />
			end,<br />
			pre = name + &#8216;=&#8217;,<br />
			begin  = cookie.indexOf(&#8217;; &#8216; + pre);</p>
<p>		if (begin == -1) {<br />
			begin = cookie.indexOf(pre);<br />
			if (begin !== 0) return false;<br />
		} else {<br />
			begin += 2;<br />
		}</p>
<p>		end = document.cookie.indexOf(&#8217;;', begin);<br />
		if (end == -1) end = cookie.length;</p>
<p>		return decodeURIComponent(cookie.substring(begin + pre.length, end));</p>
<p>	};</p>
<p>	/**<br />
	 * Removes a cookie that has already been set<br />
	 * @param {String} name The name of the cookie to remove<br />
	 * @param {String} path The path of the cookie to remove<br />
	 * @param {String} domain The domain of the cookie to remove<br />
	 * @member cookies<br />
	 * @public<br />
	 */<br />
	var remove = function(name, path, domain) {</p>
<p>		var cookie = name + &#8216;=&#8217;;</p>
<p>		if (!get(name)) return;<br />
		if (path) cookie += &#8216;; path=&#8217; + path;<br />
		if (domain) cookie += &#8216;; domain=&#8217; + domain;<br />
		cookie += &#8216;; expires=Thu, 01-Jan-70 00:00:01 GMT&#8217;;</p>
<p>		document.cookie = cookie;</p>
<p>	};</p>
<p>	/**<br />
	 * Tells the browser to set a cookie<br />
	 * @param {String} name The name of the cookie to set<br />
	 * @param {String} value The value to set in the cookie<br />
	 * @param {String} expires The date that the cookie expires (must be a valid date string)<br />
	 * @param {String} path The path of the cookie to set<br />
	 * @param {String} domain The domain of the cookie to set<br />
	 * @param {Boolean} secure Whether to make the cookie secure or not<br />
	 * @member cookies<br />
	 * @public<br />
	 */<br />
	var set = function(name, value, expires, path, domain, secure) {</p>
<p>		var cookie = name + &#8216;=&#8217; + encodeURIComponent(value);</p>
<p>		if (expires) cookie += &#8216;; expires=&#8217; + expires.toGMTString();<br />
		if (path) cookie += &#8216;; path=&#8217; + path;<br />
		if (domain) cookie += &#8216;; domain=&#8217; + domain;<br />
		if (secure) cookie += &#8216;; secure&#8217;;</p>
<p>		document.cookie = cookie;</p>
<p>	};</p>
<p>	return {<br />
		get : get,<br />
		remove : remove,<br />
		set : set<br />
	};</p>
<p>})();<br />
</textarea></p>
<p>
You can download this script below:
</p>
<ul>
<li><a href="/assets/js/cookies/cookies.js">[Download cookies.js]</a> (2,160 bytes)</li>
<li><a href="/assets/js/cookies/cookies-min.js">[Download cookies-min.js]</a> (634 bytes; compressed)</li>
</ul>
<p>
Also, PPK has an in-depth <a href="http://www.quirksmode.org/js/cookies.html">article about cookies</a>. His code examples get the job done, but unfortunately create too many functions in the global scope (which, as we all know, <a href="http://yuiblog.com/blog/2006/06/01/global-domination/">should be avoided</a>).</p>
]]></content:encoded>
			<wfw:commentRss>http://scriptnode.com/article/simple-cookie-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How Webdevs View Webpages</title>
		<link>http://scriptnode.com/article/how-webdevs-view-webpages/</link>
		<comments>http://scriptnode.com/article/how-webdevs-view-webpages/#comments</comments>
		<pubDate>Tue, 07 Oct 2008 20:25:39 +0000</pubDate>
		<dc:creator>Matt Hackett</dc:creator>
				<category><![CDATA[Novice]]></category>
		<category><![CDATA[accessibility]]></category>
		<category><![CDATA[philosophy]]></category>

		<guid isPermaLink="false">http://scriptnode.com/?p=194</guid>
		<description><![CDATA[
Web developers don&#8217;t usually browse the net like your average surfers. We will often view pages with a critical eye, tear them apart and see how they tick. I know I do. Sure, I&#8217;ve got periods when I&#8217;m lazy and just feel like surfing around or watching videos. But usually the engineer in me will [...]]]></description>
			<content:encoded><![CDATA[<p>
Web developers don&#8217;t usually browse the net like your average surfers. We will often view pages with a critical eye, tear them apart and see how they tick. I know I do. Sure, I&#8217;ve got periods when I&#8217;m lazy and just feel like surfing around or <a href="http://www.youtube.com/view_play_list?p=053E355639559255">watching videos</a>. But usually the engineer in me will take over and criticize a page when I first see it. Here&#8217;s what us webdevs do when we first see a webpage.
</p>
<ol>
<li><a href="#disable-styles">Disable Styles</a></li>
<li><a href="#view-source">View Source</a></li>
<li><a href="#favicon">Check the favicon</a></li>
<li><a href="#validate">Validate</a></li>
<li><a href="#firebug">Check Firebug</a></li>
<li><a href="#disable-javascript">Disable JavaScript</a></li>
<li><a href="#yslow">Run YSlow</a></li>
</ol>
<p>
<em><strong>Note:</strong> This article focuses on browsing with <a href="http://www.mozilla.com/en-US/firefox/">Firefox</a>, the browser &#8220;real&#8221; web developers use!</em>
</p>
<ol>
<li id="disable-styles">
<h3><a href="#disable-styles">Disable Styles</a></h3>
<p>
<img alt="CSS Zen Garden" class="after" src="/assets/img/css_zen_garden.gif"/><br />
The first thing I do when viewing a new webpage is hit <code><strong>ctrl</strong>+<strong>shift</strong>+<strong>s</strong></code> to disable styles and see a page in its design-free, <a href="http://naked.dustindiaz.com/">naked state</a>. What you <strong>should</strong> see after doing this is a really basic page with headers, text, and maybe some images. The Internet in its easiest-to-consume form, really. If nothing or very little changes, you know the page was <a href="http://delicious.com/richtaur/barf">developed incorrectly</a>.
</p>
<p>
Firefox added a keyboard shortcut (I believe in <a href="http://blog.mozilla.com/blog/2008/09/29/firefox-303-now-available-for-download/">version 3</a>) to map <code><strong>ctrl</strong>+<strong>shift</strong>+<strong>s</strong></code> to toggle the sidebar. I&#8217;m used to this shortcut disabling styles instead because I&#8217;ve been using the <a href="https://addons.mozilla.org/en-US/firefox/addon/60">Web Developer Toolbar</a> for a few years now. Thankfully, there&#8217;s the <a href="http://forums.mozillazine.org/viewtopic.php?t=72994">keyconfig add-on</a> to allow users to alter keyboard shortcuts to their liking.
</p>
</li>
<li id="view-source">
<h3><a href="#view-source">View Source</a></h3>
<p>
This one&#8217;s a given and can be <strong>very</strong> revealing. Hit <code><strong>ctrl</strong>+<strong>u</strong></code> to view source and open up a world of <a href="http://homestarrunner.com/">shame</a> or <a href="http://www.csszengarden.com/">glory</a>.
</p>
<p>
Viewing a page&#8217;s source reveals many things about the developer(s) responsible. It&#8217;s one thing to disable styles to see how well <a href="/tag/css/">separation of design and content</a> was practiced, and quite another to see how <a href="http://en.wikipedia.org/wiki/Semantic_Web">semantic</a> the page&#8217;s markup is (typical things to look for include headers in <code>&lt;h*&gt;</code> tags, paragraphs in <code>&lt;p&gt;</code> tags, and lists in their proper ordered or unordered tags).
</p>
<p>
It&#8217;s also pretty revealing when a developer tries his or her damnedest to get spacing and/or tabbing consistent in the markup. It takes a lot of effort and shows a real discipline for cleanliness and organization.
</p>
</li>
<li id="favicon">
<h3><a href="#favicon">Check the favicon</a></h3>
<p>
Having a <a href="http://en.wikipedia.org/wiki/Favicon">favicon</a> can be a pretty good indication of whether a site is <a href="http://encyclopediadramatica.com/index.php/The_Internet_Is_Serious_Business">serious business</a> or not. Web developers that are devoted to <a href="http://developer.yahoo.com/performance/rules.html#favicon">high performance</a> would shudder at the thought of pushing a site live without a favicon.
</p>
<p>
Other than the technical reasons, favicons have high visibility by showing up in your browser&#8217;s tabs, can have <a href="http://foohack.com/2008/06/hacking-the-google-favicon/">considerable branding benefits (or consequences)</a>, are <a href="http://gimp.org/">easy to make</a> and can be <a href="/article/weekly-round-up-week-of-71308/">really fun</a> or <a href="http://gaygeeks.org/">just adorable</a>. Why the hell not have one?
</p>
<p>
&#8230; Then again, even web standards evangelists like Yahoo! have some properties lacking favicons (<a href="http://profiles.yahoo.com/richtaur">Yahoo! Profiles</a> is guilty as of this writing; I have filed a bug), so not having one only says so much.
</p>
</li>
<li id="validate">
<h3><a href="#validate">Validate</a></h3>
<p>
This is one of my favorites. The <a href="http://validator.w3.org/">W3C Validator</a> is one of the most useful development tools I&#8217;ve ever had access to. Now, there has been much debate about whether making a page 100% valid has any value at all. The usual consensus is to remove obvious or easily fixed errors (like malformed tags), but not to put too many resources into validation just to be valid.
</p>
<p>
But it&#8217;s a pretty good indication of careless development when a page has hundreds of errors, especially when most of them are easily fixed. Honestly, I&#8217;d say a large majority of pages have errors, and that&#8217;s fine, but when a page is 100% valid, it shows that the developer(s) went that extra mile.
</p>
</li>
<li id="firebug">
<h3><a href="#firebug">Check Firebug</a></h3>
<p>
<img alt="Firebug" class="after" src="/assets/img/firebug.jpg"/><br />
Oh, <a href="http://getfirebug.com/">Firebug</a>, where were we without you? Typically I will glance at Firebug to see if there are any JavaScript errors and to see what <acronym title="XML HTTP Request">XHR</acronym> calls are getting sent off (mostly just out of curiosity). The JS errors can be pretty revealing, but overall Firebug is just a great development tool that really lets you look inside of a page.
</p>
<p>
As of Firebug 1.2, you <a href="http://code.google.com/p/fbug/source/browse/branches/firebug1.2/docs/ReleaseNotes_1.2.txt?r=1146">now have to add a site to its whitelist to enable it</a>, so I do this much less often than I used to. Oh well.
</p>
</li>
<li id="disable-javascript">
<h3><a href="#disable-javascript">Disable JavaScript</a></h3>
<p>
I only do this when I&#8217;m feeling overly critical or just hardcore. Maybe I simply love JavaScript too much, who knows? I don&#8217;t have a quick shortcut for this; instead, up in my toolbar I click <strong>Disable</strong> &gt; <strong>Disable JavaScript</strong> &gt; <strong>All JavaScript</strong>, and then releod the page. Often, this tells me nothing. But sometimes it tells me that the page isn&#8217;t as <a href="http://www.w3.org/WAI/">accessible</a> as it should be.
</p>
<p>
A good example is the current <a href="http://developer.yahoo.com/">Yahoo! Developer Network homepage</a>, which as of this writing doesn&#8217;t properly display its footer when JS disabled (see it <a href="/assets/img/ydn_js.jpg">with JS</a> and with <a href="/assets/img/ydn_no_js.jpg">JS disabled</a>). For shame!
</p>
</li>
<li id="yslow">
<h3><a href="#yslow">Run YSlow</a></h3>
<p>
<a href="http://developer.yahoo.com/yslow/">YSlow</a> is a fantastic tool that gives a letter grade to a page based on how well it follows <a href="http://developer.yahoo.com/performance/index.html#rules">Yahoo!&#8217;s high performance recommendations</a>. Again, this is only if I&#8217;m particularly bored or curious, and Firebug must be enabled so I very rarely do this. Getting a <strong>B</strong> or higher <a href="http://blog.dirtybeta.com/new-yslow-grade-a-93/">can be challenging</a>, so it&#8217;s a terrific indicator of developers that really care about a snappy user experience.
</p>
</li>
</ol>
<p>
These habits are pretty common among webdevs. Hopefully they come across as endearing instead of obsessive compulsive. Either way, they come in especially handy when looking for a <a href="http://www.idolhands.com/personal/obama-is-restful/">reason to praise</a> a site, or when wanting to <a href="/article/interview-questions-part-1-php/">scrutinize an applicant&#8217;s resume</a> sites.</p>
]]></content:encoded>
			<wfw:commentRss>http://scriptnode.com/article/how-webdevs-view-webpages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynamically Load CSS and JS Files</title>
		<link>http://scriptnode.com/article/dynamically-load-css-and-js-files/</link>
		<comments>http://scriptnode.com/article/dynamically-load-css-and-js-files/#comments</comments>
		<pubDate>Sun, 28 Sep 2008 08:04:29 +0000</pubDate>
		<dc:creator>Matt Hackett</dc:creator>
				<category><![CDATA[Novice]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[script-sunday]]></category>
		<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://scriptnode.com/?p=183</guid>
		<description><![CDATA[
I hear a lot of developers asking about loading
CSS and JS files dynamically.
Surprisingly, creating script and link nodes is just like creating any other nodes.
All you have to do is create them using DOM methods and append to the head:

The Script

var loadCSS = function(file) {
	var link = document.createElement(&#8217;link&#8217;);
	link.href = file;
	link.rel = &#8217;stylesheet&#8217;;
	link.type = &#8216;text/css&#8217;;
	document.getElementsByTagName(&#8217;head&#8217;)[0].appendChild(link);
};
var loadJS [...]]]></description>
			<content:encoded><![CDATA[<p>
I hear a lot of developers asking about loading<br />
<a href="/tag/css/" title="Cascading Style Sheets">CSS</a> and <a href="/tag/javascript/" title="JavaScript">JS</a> files dynamically.<br />
Surprisingly, creating <code>script</code> and <code>link</code> nodes is just like creating any other nodes.<br />
All you have to do is create them using <a href="http://www.w3.org/DOM/" title="Document Object Model">DOM</a> methods and append to the <code>head</code>:
</p>
<h3>The Script</h3>
<p><textarea class="javascript" cols="50" name="code" rows="10"><br />
var loadCSS = function(file) {<br />
	var link = document.createElement(&#8217;link&#8217;);<br />
	link.href = file;<br />
	link.rel = &#8217;stylesheet&#8217;;<br />
	link.type = &#8216;text/css&#8217;;<br />
	document.getElementsByTagName(&#8217;head&#8217;)[0].appendChild(link);<br />
};</p>
<p>var loadJS = function(file) {<br />
	var script = document.createElement(&#8217;script&#8217;);<br />
	script.src = file;<br />
	script.type = &#8216;text/javascript&#8217;;<br />
	document.getElementsByTagName(&#8217;head&#8217;)[0].appendChild(script);<br />
};<br />
</textarea></p>
<h3>Example 1 &#8211; JavaScript</h3>
<p>
First let&#8217;s load up a JavaScript file. Here&#8217;s what the <a href="/assets/misc/dynamic-load/example-1.js">external JS file</a> looks like:
</p>
<p><textarea class="javascript" cols="50" name="code" rows="10"><br />
alert(&#8217;Loaded!&#8217;);<br />
</textarea></p>
<p>
And by using the above script, loading it is easy:
</p>
<p><textarea class="javascript" cols="50" name="code" rows="10"><br />
loadJS(&#8217;/assets/misc/dynamic-load/example-1.js&#8217;);<br />
</textarea></p>
<p>
<button id="example-dynamic-load-1">Load JS file</button>
</p>
<h3>Example 2 &#8211; CSS</h3>
<p>
Loading CSS is not much different. Here are the contents of the <a href="/assets/misc/dynamic-load/example-2.css">external CSS file</a>:
</p>
<p><textarea class="css" cols="50" name="code" rows="10"><br />
body {<br />
	border: 3px solid red;<br />
}<br />
</textarea></p>
<p>
Note that you can also use relative <acronym title="Uniform Resource Locators">URLs</acronym> or even files on another server:
</p>
<p><textarea class="javascript" cols="50" name="code" rows="10"><br />
loadCSS(&#8217;http://scriptnode.com/assets/misc/dynamic-load/example-2.css&#8217;);<br />
</textarea></p>
<p>
<button id="example-dynamic-load-2">Load CSS file</button>
</p>
<p>
This has been tested and works in all of the <a href="http://developer.yahoo.com/yui/articles/gbs/">standard browsers</a> including<br />
Firefox, Chrome, Internet Explorer, Opera and Safari.
</p>
<p><script type="text/javascript">
<!--//</p>
<p>var loadCSS = function(file) {
	var link = document.createElement('link');
	link.href = file;
	link.rel = 'stylesheet';
	link.type = 'text/css';
	document.getElementsByTagName('head')[0].appendChild(link);
};</p>
<p>var loadJS = function(file) {
	var script = document.createElement('script');
	script.src = file;
	script.type = 'text/javascript';
	document.getElementsByTagName('head')[0].appendChild(script);
};</p>
<p>YAHOO.util.Event.addListener('example-dynamic-load-1', 'click', function() {
	loadJS('/assets/misc/dynamic-load/example-1.js');
});</p>
<p>YAHOO.util.Event.addListener('example-dynamic-load-2', 'click', function() {
	loadCSS('http://scriptnode.com/assets/misc/dynamic-load/example-2.css');
});</p>
<p>//-->
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://scriptnode.com/article/dynamically-load-css-and-js-files/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Software Development Meme</title>
		<link>http://scriptnode.com/article/software-development-meme/</link>
		<comments>http://scriptnode.com/article/software-development-meme/#comments</comments>
		<pubDate>Thu, 18 Sep 2008 23:50:21 +0000</pubDate>
		<dc:creator>Matt Hackett</dc:creator>
				<category><![CDATA[Novice]]></category>
		<category><![CDATA[careers]]></category>
		<category><![CDATA[interviews]]></category>
		<category><![CDATA[just-for-fun]]></category>
		<category><![CDATA[questions]]></category>

		<guid isPermaLink="false">http://scriptnode.com/?p=171</guid>
		<description><![CDATA[
I&#8217;ve been tagged by the insanely creative Jacob Seidelin, which means it&#8217;s my turn to fill out the Software Development Meme!

How old were you when you first started programming?
I was about 12 years old. That combined with my love of Nintendo really makes it sound like I never left the house, but I found time [...]]]></description>
			<content:encoded><![CDATA[<p>
I&#8217;ve been tagged by the insanely creative <a href="http://blog.nihilogic.dk/2008/09/software-development-meme.html">Jacob Seidelin</a>, which means it&#8217;s my turn to fill out the <strong>Software Development Meme</strong>!
</p>
<h3>How old were you when you first started programming?</h3>
<p>I was about 12 years old. That combined with my love of Nintendo really makes it sound like I never left the house, but I found time to play sports and get in trouble, really&#8230; &#8230;</p>
<h3>How did you get started in programming?</h3>
<p>A mysterious friend of mine (Jim MacDonald, who all but doesn&#8217;t exist online) and I used to play games all day, like <a href="http://www.rpgclassics.com/shrines/nes/dw1/">Dragon Warrior</a> and <a href="http://www.rpgclassics.com/shrines/genesis/shiningforce/">Shining Force</a>. Then one day he wondered how games were made, and found&#8230;</p>
<h3>What was your first language?</h3>
<p>QBASIC! This has gotta be the easiest language to learn, and that says a lot in an age where PHP exists. I think more developers would benefit from starting with this fantastically simple language.</p>
<h3>What was the first real program you wrote?</h3>
<p>I wrote a program I simply called <strong>Dragon</strong>, which was a direct ripoff of Jim&#8217;s game <strong>Wizard</strong> or something. It used QBASIC&#8217;s <code>DRAW</code> commands to draw shapes and <code>PLAY</code> for sound effects. It was a single-battle, turn-based game pitting you (a knight) against a dragon. It was amazingly bad but pretty fun (for 12-year-olds anyway).</p>
<h3>What languages have you used since you started programming?</h3>
<p><strong>Professionally:</strong> Only <a href="http://php.net/">PHP</a> and JavaScript</p>
<p><strong>For fun and/or school:</strong> BASIC, C, C++, Perl, Python, QBASIC, Turbo Pascal, Visual BASIC</p>
<h3>What was your first professional programming gig?</h3>
<p>Working for <a href="http://blog.davglass.com/">Dav Glass</a> at <a href="http://schoolcenter.com/">SchoolCenter</a>. I was a PHP programmer making a measly $10/hour coding content management tools for K-12 schools. I was quickly promoted to lead designer (odd, right?), then when the company realized we needed engineers more than designers, put back into the development department. About a year after <a href="http://yuiblog.com/blog/2007/03/29/yuiteam/">Dav moved to Yahoo!</a>, I followed.</p>
<h3>If you knew then what you know now, would you have started programming?</h3>
<p>Oh <strong>hell</strong> yes. I&#8217;m always trying to learn as much as I can. Learning new languages is fascinating, and learning more about what you already are familiar with to me should be a daily exercise. If I had had the knowledge I have now when I was younger, I can&#8217;t imagine what I would have built by now. Interesting to think about!</p>
<h3>If there is one thing you learned along the way that you would tell new developers, what would it be?</h3>
<p>In a normal curriculum in school, students are taught to read well before they are taught to write. I&#8217;m not sure why this isn&#8217;t the case in programming. You&#8217;ve always got these wannabe developers that try to run before they can walk, and they end up tripping. There&#8217;s no shame in beginning modestly.</p>
<p>I recommend to <strong>anyone of any</strong> programming level: read other people&#8217;s code. The Internet is the <strong>ideal</strong> place to learn.</p>
<h3>What’s the most fun you’ve ever had… programming?</h3>
<p>Everytime I learn a new language, my first task is to build a game. I&#8217;ve been doing this for over a decade, in every single language I&#8217;ve dabbled in. But I think it was the most fun in QBASIC. I built an intentionally awful game called <a href="http://seanbaby.com/readers/richter1.htm">Seanbaby&#8217;s Magic Bus Ride Trip</a> for you guessed it&#8230; <a href="http://seanbaby.com/">Seanbaby</a>. Working in <a href="http://paletteswap.com/misc/games/benzer/">Flash is really fun</a> too, but <a href="/lab/spacius/">nothing beats JavaScript</a>.</p>
<h3>Who’s next?</h3>
<p>Let&#8217;s go with <a href="http://foohack.com/">Isaac Schlueter</a>, since he&#8217;s a great writer and always has interesting things to say!</p>
]]></content:encoded>
			<wfw:commentRss>http://scriptnode.com/article/software-development-meme/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>5 Ways QA Ruin Developers&#8217; Lives</title>
		<link>http://scriptnode.com/article/5-ways-qa-ruin-developers-lives/</link>
		<comments>http://scriptnode.com/article/5-ways-qa-ruin-developers-lives/#comments</comments>
		<pubDate>Sat, 06 Sep 2008 04:06:23 +0000</pubDate>
		<dc:creator>Matt Hackett</dc:creator>
				<category><![CDATA[Novice]]></category>
		<category><![CDATA[careers]]></category>
		<category><![CDATA[quirks]]></category>

		<guid isPermaLink="false">http://scriptnode.com/?p=106</guid>
		<description><![CDATA[

A Scholastic quality assurance employee


Quality Assurance people are important and valuable, to be sure, but they can also make developers&#8217; lives much more difficult. This is particularly bad because (like many roles in an organization), their end goal is to help the developers make better software, not stress them out.


Here are some of the common [...]]]></description>
			<content:encoded><![CDATA[<div class="after caption">
<a href="http://flickr.com/photos/photomatekitt/84560351/"><img alt="QA" src="/assets/img/qa.jpg"/></a><br />
<span>A Scholastic quality assurance employee</span>
</div>
<p>
<strong>Quality Assurance</strong> people are important and valuable, to be sure, but they can also make developers&#8217; lives <strong>much more difficult</strong>. This is particularly bad because (like many roles in an organization), their end goal is to <strong>help the developers make better software</strong>, not stress them out.
</p>
<p>
Here are some of the common ways <acronym title="Quality Assurance">QA</acronym> workers ruin developer&#8217;s lives and how these behaviors can be avoided:
</p>
<ol class="cls">
<li>
<h3>Misunderstanding the technology</h3>
<p>
I&#8217;m often shocked by what somebody on the team didn&#8217;t know about. <strong>Understanding when software is working properly and when it isn&#8217;t can sometimes require a deep understanding of the technologies involved in making the software</strong>&#8230; And sometimes you just need to know enough.
</p>
<p>
My favorite example of this is a bug I got about a year ago, in which the report was something along the lines of, &#8220;Page is dumping out plain markup, no CSS.&#8221; Sounds kind of like an <acronym title="Really Simple Syndication"><a href="/feed/">RSS</a></acronym> feed right? It was. This person had never heard of <acronym title="Really Simple Syndication">RSS</acronym>.
</p>
<h4>How to avoid this</h4>
<p>
I hate to say it, but sometimes people just need to be qualified for their jobs. A unique perspective on a product is sometimes great, even <strong>sought after</strong> (for example, during usability tests). Other times, people need to do research and read up on the projects they&#8217;re working on. Most projects have awful documentation, but if they have it at all, it will probably mention in there what something like <acronym title="Really Simple Syndication">RSS</acronym> is.
</p>
<p>
On the other hand, nobody can know everything about everything. Technology moves quickly (especially when dealing with the Internet), so it&#8217;s understandable to be behind in a given area. A better way to handle this issue might be to suggest that perhaps <strong>the page could provide more information about what was misunderstood</strong> so that if others come across the same page, they&#8217;d understand too.
</p>
</li>
<li>
<h3>Assuming the software is buggy</h3>
<p>
A friend told me about a bug he received recently. A <acronym title="Quality Assurance">QA</acronym> person had tried three different features in the software that were supposed to display images. None of them worked, so <strong>three different bugs were filed</strong>. Thing is&#8230; those three areas of the software worked fine. It was the image that was broken. This person just assumed the software was buggy.
</p>
<h4>How to avoid this</h4>
<p>
When something is not behaving as expected, <strong>all reasonable checks should be made before branching out and getting others involved.</strong> Sometimes it&#8217;s as low-level as checking the Internet connection, and other times (as in the example above), it&#8217;s seeing if something works in other software. Pulling the image up in a browser or editor would have shown that the image was broken. Instead, everyone&#8217;s time was wasted.
</p>
</li>
<li>
<h3>Omitting necessary information</h3>
<p>
I very recently received this email:
</p>
<blockquote><p>Hi Matt there is Javascript errors on Devtool editor and preview pages. Do you want me to file a bug for them in one bug or are you already fixing (have fixed ) them?</p>
</blockquote>
<p>
This email was next to useless. First off, I don&#8217;t know <strong>what environment</strong> these errors were found in. Typically at work we&#8217;ve got a handful of environments, sometimes up to five or six, and almost always I don&#8217;t know when they were last updated. All <strong>I</strong> know at any given time is about <strong>my</strong> development box, which I doubt people test on.
</p>
<p>
Secondly, <strong>what browser and operating system</strong> were these errors found on? This is <strong>critical</strong> in a world where browsers behave so differently.
</p>
<p>
Lastly, <strong>what were the actual errors</strong> and (probably more importantly) <strong>how did you produce these errors?</strong> Sometimes it&#8217;s very obvious. Load up a program or hit a webpage and the same error pops up for everyone on every operating system or every browser. Sometimes. But not usually.
</p>
<p>
My all-time <strong>least</strong> favorite among the &#8220;not enough info&#8221; issues are the bugs that say something like, &#8220;looks funky&#8221; or &#8220;is broken&#8221;. I know what I think is funny. I don&#8217;t know what <strong>you</strong> think is funny. It&#8217;s ambiguous. If someone says, &#8220;it&#8217;s blue but it&#8217;s supposed to be red,&#8221; then I understand perfectly. Otherwise, there are blanks that need to be filled in, and a failure in communication has occurred.
</p>
<h4>How to avoid this</h4>
<p>
In short: <strong>I&#8217;m the developer. Need the info.</strong>
</p>
<p>
All that really has to be done is to answer each of the questions above. I&#8217;d love to know about errors if there are any, but I <strong>must</strong> have the bare essentials of information about them, and usually the more information the better. Help me help you.
</p>
</li>
<li>
<h3>Not knowing the specifications</h3>
<p>
Long ago, I lost track of how many bugs I&#8217;ve closed with a comment along the lines of, <strong>&#8220;This is by design.&#8221;</strong> Sure, sometimes nobody knows how the hell something is supposed to work, but if you&#8217;re doing it right there is documentation that answers these questions. It&#8217;s especially frustrating because the software is behaving <strong>exactly</strong> as intended and a bug is filed that (unknowingly to the creator) basically is saying, &#8220;Everything&#8217;s good, but I&#8217;m not aware of that.&#8221;
</p>
<h4>How to avoid this</h4>
<p>
Read the documentation. Know how it&#8217;s supposed to work. Don&#8217;t assume it&#8217;s broken. If all else fails, <strong>ask before filing a bug</strong>.
</p>
</li>
<li>
<h3>Over-filing bugs</h3>
<p>
I&#8217;m primarily a front-end guy, so I get a lot of design tweak bugs. Sometimes a character is missing, sometimes a border is too thick, sometimes a font is one point too large… These tiny issues often take mere seconds to fix. What takes longer is managing <strong>each</strong> of the bugs created for these issues.
</p>
<p>
A site I was working on a while back had a list that looked something like this:
</p>
<ul>
<li>Upgrade users</li>
<li>Truncate users</li>
<li>View users</li>
<li>Mass edit users</li>
<li>Import users</li>
</ul>
<p>
For each bullet point in this list, I was assigned a bug whose summary was something like, &#8220;Add a period to the end of &#8216;Upgrade users&#8217;&#8221;. That&#8217;s five bugs for five <strong>really</strong> easy fixes. What a waste of everyone&#8217;s time!
</p>
<h4>How to avoid this</h4>
<p>
Bugs happen. Tickets for these bugs need to be filed. Usually they are unrelated and separate tickets are not just good, but necessary. However, knowing when to create fifteen bugs and when to create just one is very important to know in order to be efficient. Sometimes it&#8217;s best to think about the issues at hand and consider if they&#8217;re similar enough to be filed together.
</p>
<p>
Another cause of over-filed bugs are <strong>duplicate bugs</strong>. This one&#8217;s easy, folks; just search for similar bugs before filing.
</p>
</li>
</ol>
<p>
<em><strong>Note:</strong> I certainly hope this article hasn&#8217;t offended any kind <acronym title="Quality Assurance">QA</acronym> folk. When they&#8217;re good at their job, they make my job <strong>way</strong> easier. Let&#8217;s hear it for <acronym title="Quality Assurance">QA</acronym>!</em>
</p>
<p>
(Special thanks to <a href="http://foohack.com/">Isaac Schlueter</a>.)</p>
]]></content:encoded>
			<wfw:commentRss>http://scriptnode.com/article/5-ways-qa-ruin-developers-lives/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
