<?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>The Incurable Geek &#187; tools</title>
	<atom:link href="http://nicolasrosental.com/tag/tools/feed/" rel="self" type="application/rss+xml" />
	<link>http://nicolasrosental.com</link>
	<description>Web Development, Coworking and 42</description>
	<lastBuildDate>Fri, 03 Sep 2010 18:46:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>PHP Logging Is Your Friend</title>
		<link>http://nicolasrosental.com/2010/03/22/php-logging-is-your-friend/</link>
		<comments>http://nicolasrosental.com/2010/03/22/php-logging-is-your-friend/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 14:34:02 +0000</pubDate>
		<dc:creator>nic</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[logs]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://nicolasrosental.com/?p=272</guid>
		<description><![CDATA[There are many ways of debugging PHP and it&#8217;s mainly a matter of preference; however I&#8217;m amazed at how little attention is given to error logging in favor of error displaying. Not only is the latter method more inefficient, it also leads to sloppy sites that reveal a great deal about their coding and organization [...]]]></description>
			<content:encoded><![CDATA[<p>There are many ways of debugging PHP and it&#8217;s mainly a matter of preference; however I&#8217;m amazed at how little attention is given to error logging in favor of error displaying. Not only is the latter method more inefficient, it also leads to sloppy sites that reveal a great deal about their coding and organization to the Internet.</p>
<p>We&#8217;ll do a quick walk-through to get started with error logging.</p>
<p><span id="more-272"></span></p>
<h2>Prepare php.ini</h2>
<p>There are a few options that need to be set in php.ini to make proper logging possible. If you don&#8217;t have access to php.ini you can attempt to set the options at runtime (your mileage may vary.) An alternative to using php.ini is setting directives in an .htaccess file, but I won&#8217;t be discussing it in this post.</p>
<pre>error_reporting  =  E_ALL
display_errors = Off
log_errors = On
error_log = /file/writeable/by/web/server/
</pre>
<p>Let&#8217;s look at this options a bit closer to understand what they do. <strong>error_reporting </strong>can take a number or different settings that grant an entire discussion all their own. I like using <strong>E_ALL </strong>which can be a little chatty at times, but can help to write better code. With PHP 5 <strong>E_STRICT </strong>has also been included, and has to be declared explicitly (not included in E_ALL.) This setting doesn&#8217;t provide additional logging, but gives recommendations to write even cleaner code.</p>
<p><strong>display_errors</strong> is usually turned on during development, and turned off when going into production. If you are using logging, you&#8217;ll soon realize that it&#8217;s not necessary to turn this on at all.</p>
<p><strong>log_errors</strong> is almost self explanatory, but could cause a newcomer to wonder why log files aren&#8217;t being written. This is the first place you should look if you aren&#8217;t getting logging information.</p>
<p><strong>error_log </strong>has to be set to the path of a file writable by the web server; this is the second place you should look if your logs aren&#8217;t working. File ownership and permissions aren&#8217;t as daunting as they seem and you&#8217;ll be doing yourself a huge favor by learning how to apply them properly. If log_errors isn&#8217;t turned on, then this setting will have no  effect whatsoever.</p>
<h2>Set Up Your Box</h2>
<p>This is where the rubber meets the road. Once you have all your settings in place and you&#8217;ve verified that errors are written to the log, it&#8217;s time to start using it. Open a terminal (command line as some folks call it) and give it the following command:</p>
<pre>tail -f /log/file
</pre>
<p>The <strong>tail</strong> command retrieves the last 10 lines of a given file, the <strong>-f</strong> switch tells it to do it in real time. That is to say, that the display will be updated each time there&#8217;s a new entry in the log as opposed to having to run the command each time you want to see what&#8217;s going on. Leave this terminal running at all times and make it the first thing you glance at when something isn&#8217;t working right.</p>
<h2>Talk To The Log, It Listens</h2>
<p>So far you are able to view errors generated by PHP which is incedibly useful, but how about sending your own messages to the log? Enter <strong>error_log</strong>. This function allows you (in its simplest form) to send a custom message to the log. Let&#8217;s see an example, enter the following bit of code in a file and access it with your browser.</p>
<pre>&lt;?php
if ( 1 &gt; 0 )
{
    error_log('it would be weird to NOT get this message');
}
?&gt;
</pre>
<p>Now the log in the terminal (that&#8217;s ALWAYS open) will display something like</p>
<pre>[22-Mar-2010 06:54:05] it would be weird to NOT get this message
</pre>
<p>This function also provides several other options such as being able to send the message via e-mail, or to a TCP port. So you can imagine the possibilities for customizing responses to different situations are endless. Here&#8217;s a list of useful resources that will help you in your logging quests.</p>
<ul>
<li><a title="error_log PHP Manual" href="http://php.net/manual/en/function.error-log.php">error_log &#8211; Manual</a></li>
<li><a href="http://php.net/manual/en/errorfunc.configuration.php">Errors and Logging Configuration Options &#8211; Manual</a></li>
<li><a title="Error handling and logging - Added Bytes" href="http://www.addedbytes.com/drafts/php-ini-guide/php-ini-guide-error-handling-and-logging/">php.ini Guide: Error Handling and Logging &#8211; Added Bytes</a></li>
<li><a href="http://unixhelp.ed.ac.uk/CGI/man-cgi?tail">tail () &#8211; Unix man pages</a> (if you have *nix system available just type &#8216;man tail&#8217; <img src='http://nicolasrosental.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  )</li>
</ul>
<p>This post only covers the very basics of logging PHP, but it&#8217;s intended as a starting point. I&#8217;m very interested in learning how you use logging or what debugging techniques you&#8217;ve developed. Don&#8217;t be shy and leave a comment.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d272').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d272" style="overflow:hidden">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http%3A%2F%2Fnicolasrosental.com%2F2010%2F03%2F22%2Fphp-logging-is-your-friend%2F&amp;submitHeadline=PHP+Logging+Is+Your+Friend&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://nicolasrosental.com/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fnicolasrosental.com%2F2010%2F03%2F22%2Fphp-logging-is-your-friend%2F&amp;title=PHP+Logging+Is+Your+Friend" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://nicolasrosental.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fnicolasrosental.com%2F2010%2F03%2F22%2Fphp-logging-is-your-friend%2F&amp;title=PHP+Logging+Is+Your+Friend" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://nicolasrosental.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fnicolasrosental.com%2F2010%2F03%2F22%2Fphp-logging-is-your-friend%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://nicolasrosental.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fnicolasrosental.com%2F2010%2F03%2F22%2Fphp-logging-is-your-friend%2F&amp;title=PHP+Logging+Is+Your+Friend" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://nicolasrosental.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http%3A%2F%2Fnicolasrosental.com%2F2010%2F03%2F22%2Fphp-logging-is-your-friend%2F&amp;bm_description=PHP+Logging+Is+Your+Friend" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://nicolasrosental.com/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http%3A%2F%2Fnicolasrosental.com%2F2010%2F03%2F22%2Fphp-logging-is-your-friend%2F&amp;T=PHP+Logging+Is+Your+Friend" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://nicolasrosental.com/wp-content/plugins/social-bookmarks/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fnicolasrosental.com%2F2010%2F03%2F22%2Fphp-logging-is-your-friend%2F&amp;title=PHP+Logging+Is+Your+Friend" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://nicolasrosental.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fnicolasrosental.com%2F2010%2F03%2F22%2Fphp-logging-is-your-friend%2F&amp;title=PHP+Logging+Is+Your+Friend" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://nicolasrosental.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fnicolasrosental.com%2F2010%2F03%2F22%2Fphp-logging-is-your-friend%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://nicolasrosental.com/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http%3A%2F%2Fnicolasrosental.com%2F2010%2F03%2F22%2Fphp-logging-is-your-friend%2F" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://nicolasrosental.com/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+PHP+Logging+Is+Your+Friend+@+http%3A%2F%2Fnicolasrosental.com%2F2010%2F03%2F22%2Fphp-logging-is-your-friend%2F" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://nicolasrosental.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fnicolasrosental.com%2F2010%2F03%2F22%2Fphp-logging-is-your-friend%2F&amp;t=PHP+Logging+Is+Your+Friend" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://nicolasrosental.com/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d272').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d272').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://nicolasrosental.com/2010/03/22/php-logging-is-your-friend/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Work, Projects, Tools and Tips</title>
		<link>http://nicolasrosental.com/2010/01/23/work-projects-tools-and-tips/</link>
		<comments>http://nicolasrosental.com/2010/01/23/work-projects-tools-and-tips/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 17:58:06 +0000</pubDate>
		<dc:creator>nic</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[resources]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://nicolasrosental.com/?p=216</guid>
		<description><![CDATA[As you might have noticed I&#8217;m trying to get a post out at least once a week. If I keep up this pace I will have more posts by March 2010 than I had in all of 2009, that&#8217;s all good and great except that I&#8217;m so busy with work that I haven&#8217;t had time [...]]]></description>
			<content:encoded><![CDATA[<p>As you might have noticed I&#8217;m trying to get a post out at least once a week. If I keep up this pace I will have more posts by March 2010 than I had in all of 2009, that&#8217;s all good and great except that I&#8217;m so busy with work that I haven&#8217;t had time to write at all lately. So I figured that instead of making up an excuse I&#8217;ll let you know what is that&#8217;s been keeping me occupied, and mix that with some useful information.</p>
<h3>Work</h3>
<p>Fortunately I&#8217;ve been extremely busy with three projects I&#8217;m working in parallel. The first one is a new site for a well known real estate agent in the Atlanta market. The site has a custom-made admin interface to allow her and her team to edit their own content and some other details, without drowning them in unnecessary features. We should be going live in early February so we are in the final stages which can be extremely hectic. We already have some very cool features (<a title="Mmmhhhh" href="http://www.geoapi.com/">hint</a>) to follow the launch which I&#8217;ll probably write about later.</p>
<p>The second project is a web application that makes use of the <a title="Mechanical Turk" href="https://www.mturk.com/mturk/welcome">Amazon Mechanical Turk</a> API which took me a bit of time to learn. Unlike some of the APIs I&#8217;ve written about, this one is more complex. I&#8217;m planning on extending this project into a full PHP library for the Mechanical Turk API once it&#8217;s finished. I will very likely release it as an open source project from the beginning.</p>
<p>The third project is longer term and it&#8217;s based on a WorpPress MU, although with the upcoming <a href="http://mu.wordpress.org/forums/topic/14163">merge</a> it&#8217;ll just be WordPress. It has to do with a national religious-based organization and will probably spawn many blog posts along the way as well. I&#8217;m really excited about this project as it&#8217;ll allow me to dig very deep into WordPress.</p>
<h3>Projects</h3>
<p>As any developer, designer or webbie out there I have a list of personal projects I&#8217;d like to tackle at one point.</p>
<p><strong>Blog re-design</strong>: I don&#8217;t consider my blog to be ugly, but it certainly isn&#8217;t beautiful either (and it has some details that need fixing badly), and the best word to describe it is probably &#8220;simple&#8221;. I&#8217;ve been working on some ideas here and there and hopefully will get to release a new theme soon. Here&#8217;s a preview of the latest iteration (please give me your $0.02).</p>
<p><a href="http://nicolasrosental.com/images/nicdev4.png"></a><a href="http://nicolasrosental.com/images/nicdev4.png"><img class="alignnone" title="New design for my blog" src="http://nicolasrosental.com/images/nicdev4.png" alt="New design for my blog" width="420" height="399" /></a></p>
<p><strong>Collaborate with WordPress</strong>: During <a title="Wordcamp Atlanta" href="http://atlantawordcamp.com/">Wordcamp Atlanta</a> many of the speakers tried to motivate the audience to help WordPress grow. What a good job they did! I came out of the event energized to start lending a hand. So expect me to start picking up some tickets, writing plugins, etc. very soon.</p>
<p><strong>Start an open source project</strong>: I&#8217;ve been wanting to start one for a very long time, and I think it will be a small PHP library for Amazon&#8217;s Mechanical<strong> </strong>Turk API.</p>
<p><strong>Learn <a href="http://en.wikipedia.org/wiki/Objective-C">Objective-C</a></strong>: I&#8217;ve been meaning to learn a new language for a long time. Writing iPhone and/or Mac applications sounds very appealing and that&#8217;s the direction I want to take. Of course, this will take a big commitment on my part so I&#8217;ll have to wait until I have a bit more time to tackle this one.</p>
<h3>Tools</h3>
<p>When I say tools I don&#8217;t just mean my editor and ssh client -although these are fundamental- but actually all the things that help me as a web developer. Here&#8217;s a list that might have some tidbits you can use as well.</p>
<p><strong>Software tools</strong>: I write in <a href="http://www.panic.com/coda/">Coda</a>, keep track of my code in <a href="https://github.com/">GitHub</a>, use a Linux VPS to host my projects (and this blog), use <a href="http://filezilla-project.org/">FileZilla</a> to transfer files, and <a href="http://getfirebug.com/">FireBug</a> and <a href="http://www.firephp.org/">FirePHP</a> to debug.</p>
<p><strong>Stay-on-top tools</strong>: It&#8217;s hard to stay on top of everything in the web development world, but there are some key blogs and podcasts that help reduce the noise to signal ratio. My favorite podcast is <a href="http://boagworld.com/">BoagWorld</a> which is also a very neat blog. Here&#8217;s my <a href="http://nicolasrosental.com/images/Podcasts.txt">entire podcast playlist</a> if you want to look for yourself. I usually listen to them in the car which would otherwise default to NPR, talk radio or some lame FM station.</p>
<p>If you can spare a couple of hours every week, do yourself a favor and sign on to <a href="http://dcth.info/">DCTH (Design Community Twitter Hours)</a>. You will learn, network, have fun and spend time in great company with awesome webbies from all over.</p>
<p>Not all my activities take place in front of a computer.  I&#8217;ve joined <a title="My Meetup profile" href="http://www.meetup.com/members/8623976/">several groups</a> of interest through <a href="http://meetup.com/">Meetup.com</a> which have helped me learn, make friends and even find new clients. Also, working from home was taking a toll in my social interaction level, so I joined <a href="http://ignitionalley.com">Ignition Alley</a>, a great <a href="http://en.wikipedia.org/wiki/Coworking">co-working</a> space in midtown Atlanta.</p>
<p>So as you can see I have more than a plate-full going forward. What do you have going on? Please share your own experiences, tips, projects and whatnot.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d216').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d216" style="overflow:hidden">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http%3A%2F%2Fnicolasrosental.com%2F2010%2F01%2F23%2Fwork-projects-tools-and-tips%2F&amp;submitHeadline=Work%2C+Projects%2C+Tools+and+Tips&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://nicolasrosental.com/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fnicolasrosental.com%2F2010%2F01%2F23%2Fwork-projects-tools-and-tips%2F&amp;title=Work%2C+Projects%2C+Tools+and+Tips" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://nicolasrosental.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fnicolasrosental.com%2F2010%2F01%2F23%2Fwork-projects-tools-and-tips%2F&amp;title=Work%2C+Projects%2C+Tools+and+Tips" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://nicolasrosental.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fnicolasrosental.com%2F2010%2F01%2F23%2Fwork-projects-tools-and-tips%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://nicolasrosental.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fnicolasrosental.com%2F2010%2F01%2F23%2Fwork-projects-tools-and-tips%2F&amp;title=Work%2C+Projects%2C+Tools+and+Tips" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://nicolasrosental.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http%3A%2F%2Fnicolasrosental.com%2F2010%2F01%2F23%2Fwork-projects-tools-and-tips%2F&amp;bm_description=Work%2C+Projects%2C+Tools+and+Tips" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://nicolasrosental.com/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http%3A%2F%2Fnicolasrosental.com%2F2010%2F01%2F23%2Fwork-projects-tools-and-tips%2F&amp;T=Work%2C+Projects%2C+Tools+and+Tips" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://nicolasrosental.com/wp-content/plugins/social-bookmarks/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fnicolasrosental.com%2F2010%2F01%2F23%2Fwork-projects-tools-and-tips%2F&amp;title=Work%2C+Projects%2C+Tools+and+Tips" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://nicolasrosental.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fnicolasrosental.com%2F2010%2F01%2F23%2Fwork-projects-tools-and-tips%2F&amp;title=Work%2C+Projects%2C+Tools+and+Tips" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://nicolasrosental.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fnicolasrosental.com%2F2010%2F01%2F23%2Fwork-projects-tools-and-tips%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://nicolasrosental.com/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http%3A%2F%2Fnicolasrosental.com%2F2010%2F01%2F23%2Fwork-projects-tools-and-tips%2F" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://nicolasrosental.com/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Work%2C+Projects%2C+Tools+and+Tips+@+http%3A%2F%2Fnicolasrosental.com%2F2010%2F01%2F23%2Fwork-projects-tools-and-tips%2F" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://nicolasrosental.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fnicolasrosental.com%2F2010%2F01%2F23%2Fwork-projects-tools-and-tips%2F&amp;t=Work%2C+Projects%2C+Tools+and+Tips" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://nicolasrosental.com/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d216').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d216').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://nicolasrosental.com/2010/01/23/work-projects-tools-and-tips/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Practical Introduction to Firebug</title>
		<link>http://nicolasrosental.com/2009/02/23/practical-introduction-to-firebug/</link>
		<comments>http://nicolasrosental.com/2009/02/23/practical-introduction-to-firebug/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 16:46:26 +0000</pubDate>
		<dc:creator>nic</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[firebug]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://nicolasrosental.com/?p=103</guid>
		<description><![CDATA[Firebug is a very well known add-on for Firefox (it also works on other browsers) which allows web developers analyze, troubleshoot, and improve their sites. There&#8217;s a huge collection of documents and tutorials to teach you how to use it, how to debug different languages with it, and even how to cook dinner with Firebug [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://getfirebug.com/">Firebug</a> is a very well known add-on for Firefox (it also works on other browsers) which allows web developers analyze, troubleshoot, and improve their sites. There&#8217;s a huge collection of documents and tutorials to teach you how to use it, how to debug different languages with it, and even how to cook dinner with Firebug (not really).</p>
<p>This quick intro is intended to give you a taste of how it works, the different sections, and give you enough of a kickstart to allow you to discover on your own. We&#8217;ll walk through the interface, and try out a few practical examples to give you a taste of the bug. Best of all, you can do all of it while reading this post.</p>
<p>First of all you need to <a href="http://getfirebug.com/">install it.</a></p>
<p>Open it with F12, or click on the little bug at the bottom right corner of the browser.</p>
<p style="text-align: center;"><img class="size-full wp-image-105 aligncenter" title="firebug_html" src="http://nicolasrosental.com/wp-contents/uploads/2009/02/firebug_html.jpg" alt="Firebug HTML menu" width="149" height="88" /></p>
<p>Select <strong>HTML</strong> from the top bar and hover over the different elements. Notice how they are highlighted as you move from one to the next.</p>
<p>Select the <strong>CSS </strong>(right next to HTML), you can double-click any entry to modify it, or right-click and select &#8216;edit&#8217;. For example, look for the <strong>a </strong>selector and change <strong>text-decoration :   none</strong> to <strong>underline</strong> and see all the links suddenly change. Also, note that it auto-completes the property (fancy).</p>
<div id="attachment_106" class="wp-caption aligncenter" style="width: 467px"><img class="size-full wp-image-106" title="firebug_dom" src="http://nicolasrosental.com/wp-contents/uploads/2009/02/firebug_dom.jpg" alt="" width="457" height="215" /><p class="wp-caption-text">Firebug DOM menu</p></div>
<p>The <strong>DOM </strong>section is very useful, but also complicated to navigate if you don&#8217;t know what you are looking for. We&#8217;ll look at more of the DOM later on.</p>
<p>The <strong>Net </strong>section is simply cool. It might be disabled when you first click on it, but it&#8217;ll give you the option to enable if that&#8217;s the case. The initial subsection is <strong>All </strong>which shows a graphical representation of the aggregate of time it took to download each element on the page. You can also view the other sub-sections for CSS, Javascript, etc. Click on &#8216;clear&#8217; at the top left of the Firebug pane, then refresh the page and see the section populate in real time.</p>
<p>Let&#8217;s give a second look at the HTML section. Look at the HTML tree and open up to the entry <strong>&lt;div class=&#8221;container&#8221;&gt;</strong> (html -&gt; body -&gt; div).  On the right pane you can see the CSS styles affecting the page, under <strong>Laytout </strong>there&#8217;s an on-the-fly box model (awesome for troubleshooting margins, padding, etc.) In the <strong>DOM</strong> section you can check out the DOM properties for each particular element.</p>
<p style="text-align: center;"><img class="size-full wp-image-107 aligncenter" title="dom_edit_firebug" src="http://nicolasrosental.com/wp-contents/uploads/2009/02/dom_edit_firebug.jpg" alt="dom_edit_firebug" width="463" height="214" /> For exmaple, on the left side select the  <strong>&lt;title&gt;</strong>tag (html -&gt; head -&gt; title). In the right panel look for the <strong>text</strong> entry and double-click on it. Change the title to the one of your choice and see the page renamed.</p>
<p>Saving the best for last, try the following. Click on <strong>Console</strong>, at the very bottom you should have a prompt that looks like<strong> &gt;&gt;&gt;</strong>. Right there type &#8220;alert(&#8220;Hello NicDev&#8221;);&#8221; without the quotes, and press enter. Your script has just been run, you can imagine how handy this is to try JS on the fly.</p>
<p>Well, there&#8217;s a whole lot more to Firebug than what we went over today, but hopefully you feel comfortable enough to go tackle some of those tutorials and start churning out some awesome sites.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d103').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d103" style="overflow:hidden">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http%3A%2F%2Fnicolasrosental.com%2F2009%2F02%2F23%2Fpractical-introduction-to-firebug%2F&amp;submitHeadline=Practical+Introduction+to+Firebug&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://nicolasrosental.com/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fnicolasrosental.com%2F2009%2F02%2F23%2Fpractical-introduction-to-firebug%2F&amp;title=Practical+Introduction+to+Firebug" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://nicolasrosental.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fnicolasrosental.com%2F2009%2F02%2F23%2Fpractical-introduction-to-firebug%2F&amp;title=Practical+Introduction+to+Firebug" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://nicolasrosental.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fnicolasrosental.com%2F2009%2F02%2F23%2Fpractical-introduction-to-firebug%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://nicolasrosental.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fnicolasrosental.com%2F2009%2F02%2F23%2Fpractical-introduction-to-firebug%2F&amp;title=Practical+Introduction+to+Firebug" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://nicolasrosental.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http%3A%2F%2Fnicolasrosental.com%2F2009%2F02%2F23%2Fpractical-introduction-to-firebug%2F&amp;bm_description=Practical+Introduction+to+Firebug" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://nicolasrosental.com/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http%3A%2F%2Fnicolasrosental.com%2F2009%2F02%2F23%2Fpractical-introduction-to-firebug%2F&amp;T=Practical+Introduction+to+Firebug" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://nicolasrosental.com/wp-content/plugins/social-bookmarks/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fnicolasrosental.com%2F2009%2F02%2F23%2Fpractical-introduction-to-firebug%2F&amp;title=Practical+Introduction+to+Firebug" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://nicolasrosental.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fnicolasrosental.com%2F2009%2F02%2F23%2Fpractical-introduction-to-firebug%2F&amp;title=Practical+Introduction+to+Firebug" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://nicolasrosental.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fnicolasrosental.com%2F2009%2F02%2F23%2Fpractical-introduction-to-firebug%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://nicolasrosental.com/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http%3A%2F%2Fnicolasrosental.com%2F2009%2F02%2F23%2Fpractical-introduction-to-firebug%2F" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://nicolasrosental.com/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Practical+Introduction+to+Firebug+@+http%3A%2F%2Fnicolasrosental.com%2F2009%2F02%2F23%2Fpractical-introduction-to-firebug%2F" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://nicolasrosental.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fnicolasrosental.com%2F2009%2F02%2F23%2Fpractical-introduction-to-firebug%2F&amp;t=Practical+Introduction+to+Firebug" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://nicolasrosental.com/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d103').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d103').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://nicolasrosental.com/2009/02/23/practical-introduction-to-firebug/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->