<?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>Noah Frederick</title>
	<atom:link href="http://noahfrederick.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://noahfrederick.com</link>
	<description>Graphic Designer &#60;span&#62;+&#60;/span&#62; Web Developer &#60;span&#62;+&#60;/span&#62; Artist</description>
	<lastBuildDate>Tue, 22 Sep 2009 00:02: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>Virtual Hosts in Apache</title>
		<link>http://noahfrederick.com/blog/2009/virtual-hosts-in-apache/</link>
		<comments>http://noahfrederick.com/blog/2009/virtual-hosts-in-apache/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 05:44:37 +0000</pubDate>
		<dc:creator>Noah Frederick</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://noahfrederick.com/?p=120</guid>
		<description><![CDATA[I usually find it convenient to develop my websites and Web applications locally before pushing them to the production server. Mac OS X conveniently comes with the Apache Web server pre-installed. In fact, all you really need to do to start using it is to check the &#8220;Web Sharing&#8221; checkbox in System Preferences&#8230; > Sharing. [...]]]></description>
			<content:encoded><![CDATA[<p>I usually find it convenient to develop my websites and Web applications locally before pushing them to the production server. Mac OS X conveniently comes with the Apache Web server pre-installed. In fact, all you really need to do to start using it is to check the &#8220;Web Sharing&#8221; checkbox in System Preferences&#8230; > Sharing. You can then use your Web browser to navigate to <code>http://localhost/</code>, and you should see whatever files are in your Web root. The default Web root (root directory from which Apache serves files) is <code>/Library/WebServer/Documents</code> on Mac OS X. However, it&#8217;s useful, especially if you are working on more than one project at a time, to be able to host multiple sites on your Mac. To do this, you need to set up virtual hosts in Apache. Here is a step-by-step tutorial on setting up virtual hosts:</p>
<ol>
<li>
<p>Open the file <code>/private/etc/hosts</code>, and add one line for each virtual host you want like so:</p>
<pre><code>127.0.0.1	newhostname
127.0.0.1	othernewhostname</code></pre>
<p>The IP listed should always be <code>127.0.0.1</code>, and the name of the host can obviously be whatever you choose.</p>
</li>
<li>
<p>Open your Apache configuration file (<code>/private/etc/apache2/httpd.conf</code> on Mac OS X  Leopard), and add these lines if not already present (you can add them at the end of the file):</p>
<pre><code>NameVirtualHost *:80
Include /private/etc/apache2/extra/httpd-vhosts.conf</code></pre>
<!-- Easy AdSense V2.71 -->
<!-- Post[count: 3] -->
<div class="ezAdsense adsense adsense-midtext" style="text-align:center;margin:12px;" ><script type="text/javascript"><!--
google_ad_client = "pub-3945350459988518";
/* 468x60, created 7/22/09 */
google_ad_slot = "6778515850";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div><p>The <code>Include</code> directive tells Apache to look in a separate configuration file for virtual hosts, which makes it easier to manage. <strong>Make sure you use the path that corresponds to your installation of Apache.</strong> The path listed above corresponds to Leopard.</p>
</li>
<li>
<p>Open the configuration file (you may have to create it, if it doesn&#8217;t exist already) that you pointed to in the main <code>httpd.conf</code> file, and add the following for each new host name you specified in <code>hosts</code> above:</p>
<pre><code>&lt;VirtualHost *:80&gt;
	ServerName newhostname
	DocumentRoot /path/to/root
&lt;/VirtualHost&gt;</code></pre>
</li>
<li>
<p>Restart Apache. The easiest way to do this on a Mac is to go to System Preferences&#8230; > Sharing and uncheck &#8220;Web Sharing&#8221;, then check it again. You should then be able to use your browser to navigate to <code>http://newhostname/</code>.</p>
</li>
</ol>
<p>This was just an overview. For more detailed information on setting up virtual hosts, see: <a href="http://httpd.apache.org/docs/2.2/vhosts/">Apache Virtual Host documentation</a>.</p>
<p>A very easy way to manage virtual hosts on Mac OS X is through a handy application called <a href="http://clickontyler.com/virtualhostx/">VirtualHostX</a>, which is free, except that it limits you to three hosts. You can register it for a small fee to remove this restriction.</p>
]]></content:encoded>
			<wfw:commentRss>http://noahfrederick.com/blog/2009/virtual-hosts-in-apache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS Good Practices</title>
		<link>http://noahfrederick.com/blog/2009/css-good-practices/</link>
		<comments>http://noahfrederick.com/blog/2009/css-good-practices/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 20:17:08 +0000</pubDate>
		<dc:creator>Noah Frederick</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[best practice]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://noahfrederick.com/?p=103</guid>
		<description><![CDATA[In any sort of collaborative context, especially when it comes to code and the Web, following a standard is important. As such, in order that my CSS files are descriptive and legible to others as well as to myself, I follow a set of conventions in each new document that I create.
Note that while some [...]]]></description>
			<content:encoded><![CDATA[<p>In any sort of collaborative context, especially when it comes to code and the Web, following a standard is important. As such, in order that my <acronym title="Cascading Style Sheet">CSS</acronym> files are descriptive and legible to others as well as to myself, I follow a set of conventions in each new document that I create.</p>
<p>Note that while some Web developers prefer to rely on their development software to format their style sheets, I do all this by hand (i.e., I type the code directly as opposed to manipulating it through a <acronym title="Graphical User Interface">GUI</acronym>).</p>
<h4>Filename</h4>
<p>The first thing to consider is naming your style sheet appropriately. I always name my main style sheet <code>baseline.css</code>, because it serves as the style sheet from which I can build more specialized styles (e.g., a print version of the site). Where I need a style sheet for a particular media type such as <code>print</code> or <code>projection</code>, I use the name of the medium, giving us <code>print.css</code> and <code>projection.css</code> respectively. More often than not, I also want to include a separate style sheet for Internet Explorer that I serve through <a href="/blog/2009/notes-on-conditional-comments/">conditional comments</a>. I name this file <code>ie.css</code>, or if I&#8217;m targeting a particular version, I include the version number (e.g., <code>ie6.css</code>).</p>
<h4>The Header</h4>
<p>At the top of every style sheet that I create, I make sure to describe the file&#8217;s context. I use a template that I keep whenever I start a new CSS file:</p>
<pre><code>/*
author: [my name and URL]
project: [the URL of the site I'm working on]
scope: [where the style sheet applies (usually &quot;site-wide&quot;)]
*/</code></pre>
<p>You can get as detailed as you see fit for the scale and needs of the project you are working on. For instance, I might want to denote a version number with <code>version: 1.2</code>. What I&#8217;ve included above is the bare minimum.</p>
<p>Aside from being useful to others working on the same project or someone simply taking a look at your source, I find this information invaluable when, for example, I&#8217;m looking through a bunch of files on my computer called <code>baseline.css</code> and I need to find the one that corresponds to <code>example.com</code>. In general, the more documentation you provide with your code, the better.</p>
<h4>Structure</h4>
<p>Especially on bigger projects, keeping the body of your style sheet organized is a must. I always break the body down into sections and I employ easy-to-see headings to mark each section I make. Here is the style I use, but of course, the format is up to you:</p>
<pre><code>/* THIS IS A HEADING
***************************************************/</code></pre>
<p>As for what I find useful in terms of making divisions, it depends somewhat on the project, but I usually have at very least the following sections:</p>
<ol>
<li>ELEMENT DEFAULTS</li>
<li>LAYOUT LOGIC</li>
<li>PAGE-SPECIFIC</li>
</ol>
<p>Item (1) is where I put all of the rules for plain old HTML elements such as <code>p {...}</code>. Item (2) describes the way that pages are laid out. This section contains rules pertaining to structural elements that are common to multiple pages. Item (3) contains rules pertaining to the content of specific pages. I like to keep this separate in order to avoid clutter in the rest of the style sheet. For the most part, the sections move from more general rules to more specific ones. On larger projects where I divide the body of my style sheet into many sections, I even include a table of contents.</p>
<h4>Rules</h4>
<p>The following is an example of a rule with only one property. I like to keep these on one line:</p>
<pre><code>p { line-height: 1.5em; }</code></pre>
<p>When I have a rule where I&#8217;m setting multiple properties, I break it up over separate lines:</p>
<pre><code>p {
	line-height: 1.5em;
	font-style: italic;
	}</code></pre>
<p>Note that the only part not indented is the selector, so that you can easily scan the document with your eyes for a particular element or class in the same way that bibliographies are indented so that you can scan the left margin for an author. Where I am grouping multiple selectors, I like to keep them on separate lines for this purpose:</p>
<pre><code>p,
li { line-height: 1.5em; }</code></pre>
<p>Note also that I always include the semicolon following the last declaration in my rule, so that if I add a new declaration, I don&#8217;t need to worry about what&#8217;s already there.</p>
<p>This particular format is just a suggestion. Your own style may vary according to your preferences as long as it is legible and consistent.</p>
]]></content:encoded>
			<wfw:commentRss>http://noahfrederick.com/blog/2009/css-good-practices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yeasayer @ Pitchfork 2009</title>
		<link>http://noahfrederick.com/blog/2009/yeasayer-pitchfork-2009/</link>
		<comments>http://noahfrederick.com/blog/2009/yeasayer-pitchfork-2009/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 02:40:52 +0000</pubDate>
		<dc:creator>Noah Frederick</dc:creator>
				<category><![CDATA[Music]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[concert]]></category>
		<category><![CDATA[pitchfork]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[yeasayer]]></category>

		<guid isPermaLink="false">http://noahfrederick.com/?p=94</guid>
		<description><![CDATA[I attended Chicago&#8217;s Pitchfork Music Festival this year for the first time. I was only able to attend one of three days, Saturday, which had an attractive lineup including most notably (in order of appearance) Yeasayer, MF Doom, Beirut, and The National. After securing a good position in front of stage C after The Pains [...]]]></description>
			<content:encoded><![CDATA[<p>I attended Chicago&#8217;s <a href="http://www.pitchforkmusicfestival.com/">Pitchfork Music Festival</a> this year for the first time. I was only able to attend one of three days, Saturday, which had an attractive lineup including most notably (in order of appearance) Yeasayer, MF Doom, Beirut, and The National. After securing a good position in front of stage C after The Pains of Being Pure at Heart&#8217;s set, Yeasayer started setting up (what I knew of them came from listening to their first and only album, <a class="affiliate" href="http://www.amazon.com/gp/product/B000VLLYEY?ie=UTF8&#038;tag=noahfred-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=B000VLLYEY"><i>All Hour Cymbals</i> [2007]</a>, and their contribution to <a class="affiliate" href="http://www.amazon.com/gp/product/B001KVW574?ie=UTF8&#038;tag=noahfred-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=B001KVW574"><i>Dark Was the Night</i></a>). The Brooklyn-based band, which describes its music as <q cite="http://blog.washingtonpost.com/postrock/2008/01/week_late_review_yeasayer_1.html">Middle Eastern-psych-pop-snap-gospel,</q> did all of their own sound checking, and extensively too. It was like getting an extra 30 minutes or so of play time from them.</p>
<p>With their first LP as my only reference to their music, I was surprised to see how electronically based their performance was. Performing with three permanent members of the band were two additional members who perform with them and are reported to appear on their upcoming album. Yeasayer opened with a song that I didn&#8217;t recognize and followed it up with material from <i>All Hour Cymbals</i> including their singles &quot;Sunrise&quot; and &quot;2080,&quot; and &quot;Tightrope&quot; from <i>Dark Was the Night</i>. I was slow to recognize much of what they played since their performance was not a direct translation of their recorded music but in some cases a total reworking, often incorporating harsher, electronic sounds not present on their album. To my delight they performed all of their electronic beats on the spot with drum pads alongside (two) traditional drum sets.</p>
<p>They ended their set with a new song (the only one they announced as being new), which had a sound strangely similar to that of Animal Collective. All in all, the show was energetic and crowd-pleasing, thanks to the upbeat energy of their music and their stage presence, despite the sudden downpour which lasted the duration of their performance. I look forward to their new album to be released sometime this year.</p>
<div class="update">
<p><strong>Update (8/25/09):</strong> Pitchfork has posted <a href="http://pitchfork.com/tv/#/episode/2022-yeasayer-at-pitchfork-music-festival-09/1" title="watch the video">a video</a> of Yeasayer&#8217;s live performance of &quot;Wait for the Summer&quot; at the festival.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://noahfrederick.com/blog/2009/yeasayer-pitchfork-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Notes on Conditional Comments</title>
		<link>http://noahfrederick.com/blog/2009/notes-on-conditional-comments/</link>
		<comments>http://noahfrederick.com/blog/2009/notes-on-conditional-comments/#comments</comments>
		<pubDate>Sun, 05 Jul 2009 16:00:36 +0000</pubDate>
		<dc:creator>Noah Frederick</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://www2.noahfrederick.com/?p=7</guid>
		<description><![CDATA[Conditional comments are conditional statements inserted into HTML that are interpreted by Internet Explorer (IE); they are most often used to differentiate CSS rules for the various IE versions (IE5 and later). The advantage to using conditional comments is that, as their name implies, they are wrapped in the HTML comment tag (&#60;!-- --&#62;) and [...]]]></description>
			<content:encoded><![CDATA[<p>Conditional comments are conditional statements inserted into <acronym title="HyperText Markup Language">HTML</acronym> that are interpreted by Internet Explorer (IE); they are most often used to differentiate <acronym title="Cascading Style Sheet">CSS</acronym> rules for the various IE versions (IE5 and later). The advantage to using conditional comments is that, as their name implies, they are wrapped in the HTML comment tag (<code>&lt;!-- --&gt;</code>) and so keep your code clean and valid. Conditional comments can be used to address all IE browsers as a group, or target only a specific version or versions, and they remain hidden from other browsers, which don’t support them. Most front-end developers, including me, find that the use of conditional comments is the best way to deliver targeted CSS to Internet Explorer to try to repair its many rendering bugs (or to <a href="http://forabeautifulweb.com/blog/about/universal_internet_explorer_6_css/" title="Universal Internet Explorer 6 CSS">feed IE an entirely different style sheet</a>).</p>
<p>There are two types of conditional comments: so-called <dfn>down-level hidden</dfn> and <dfn>down-level revealed</dfn>.</p>
<p>down-level hidden:</p>
<pre><code>&lt;!--[if IE]&gt;Show this to IE&lt;![endif]--&gt;</code></pre>
<p>down-level revealed:</p>
<pre><code>&lt;![if !IE]&gt;Show this to everybody but IE&lt;![endif]&gt;</code></pre>
<p>Browsers that don’t support conditional comments will ignore those that are down-level hidden, interpreting the code as a standard HTML comment; but down-level revealed comments will reveal the HTML content to other browsers because the conditional statements are ignored as invalid HTML tags (more on that below).</p>
<h4>Syntax</h4>
<p>The <dfn>condition</dfn>, which is enclosed in brackets <code>[ ]</code>, always begins with <code>if</code>. Next, we have an <dfn>operator</dfn> such as <code>!</code> used above. The possible operators are:</p>
<dl>
<dt><code>!</code></dt>
<dd>NOT</dd>
<dt><code>lt</code></dt>
<dd>LESS THAN</dd>
<dt><code>lte</code></dt>
<dd>LESS THAN OR EQUAL TO</dd>
<dt><code>gt</code></dt>
<dd>GREATER THAN</dd>
<dt><code>gte</code></dt>
<dd>GREATER THAN OR EQUAL TO</dd>
<dt><code>&amp;</code></dt>
<dd>AND</dd>
<dt><code>|</code></dt>
<dd>OR</dd>
</dl>
<p>What follows the operator is the <dfn>feature</dfn> to test for. Since conditional comments are exclusively a feature of Internet Explorer, <code>IE</code> is the only possible value. We can, however, add a version number in order to target a specific version or range of versions:</p>
<pre><code>&lt;!--[if lte IE 7]&gt;Show this to IE versions 7 and below&lt;![endif]--&gt;</code></pre>
<h4>Fixing down-level revealed</h4>
<p>Down-level revealed comments may work as they are, but as noted above they are invalid HTML. To standards-conscientious designers and developers like me this is unacceptable. <a href="http://www.456bereastreet.com/">Roger Johansson</a> wrote about <a href="http://www.456bereastreet.com/archive/200511/valid_downlevelrevealed_conditional_comments/" title="See his article">a solution</a> in 2005. To summarize, it turns out that the solution is quite simple. Instead of using Microsoft&#8217;s suggested syntax of </p>
<pre><code>&lt;![if !IE]&gt;Show this&lt;![endif]&gt;</code></pre>
<p>use the equivalent but valid</p>
<pre><code>&lt;!--[if !IE]&gt;--&gt;Show this&lt;!--&lt;![endif]--&gt;</code></pre>
<p>All set.</p>
<h4>Conclusion</h4>
<p>I find that conditional comments are more elegant, reliable, and easier to use than scripted techniques for identifying browsers when it is necessary to create a separate style sheet for Internet Explorer. You can read more of the specifics in <a href="http://msdn.microsoft.com/en-us/library/ms537512(VS.85).aspx">Microsoft&#8217;s documentation</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://noahfrederick.com/blog/2009/notes-on-conditional-comments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
