<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
  <channel>
    <title>THE CONTEXT OF COLOR</title>
    <link>http://alax.me</link>
    <description>THE CONTEXT OF COLOR Feed</description>
    <language>en-us</language>
    <generator>Symphony</generator>
    <atom:link href="http://alax.me/rss/" rel="self" type="application/rss+xml"/>
    <item>
      <title>Quick tip: Dynamic object properties with Javascript (and Node.js)</title>
      <link>http://alax.me/articles/quick-tip-dynamic-object-properties-with-javascript-and-nodejs/</link>
      <pubDate>Sun, 18 Jul 2010 14:35 -0700</pubDate>
      <guid>http://alax.me/articles/quick-tip-dynamic-object-properties-with-javascript-and-nodejs/</guid>
      <description>&lt;p&gt;I&amp;#8217;ve been working a lot on my Superintendent project lately, and I just ran across an odd solution to a problem I was having. I&amp;#8217;ve been writing the agent in Node.js, and I needed a way to get the output of &lt;code&gt;/proc/meminfo&lt;/code&gt; into a clean, well-formatted JSON object. The issue I was having was I needed a way to assign object property names based on variables. Here&amp;#8217;s what I mean:&lt;/p&gt;

&lt;pre&gt;&lt;code class="prettyprint"&gt;var meminfo = new Object();
var someName = "objectPropertyName";

//now, assign an object property based on the variable
//someName's value
meminfo.someName = "some data here.";
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You can probably already see the problem. The property that we assigned is called &lt;code&gt;meminfo.someName&lt;/code&gt;, but we wanted it to be &lt;code&gt;meminfo.objectPropertyName&lt;/code&gt;. How do we solve this? Well, first, let&amp;#8217;s take a look at an associative array that would get the job done (albeit with an array):&lt;/p&gt;

&lt;pre&gt;&lt;code class="prettyprint"&gt;var meminfo = new Array();
var someName = "arrayPropertyName";

//assign a value to the array with the key being the
//content of the variable 'someName'
meminfo[someName] = "some data here.";
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;That example would give us the variable &lt;code&gt;meminfo['arrayPropertyName']&lt;/code&gt; with the value &lt;code&gt;some data here.&lt;/code&gt;. Exactly what we want, but with an object. So how do we do this? The answer is incredibly simple. Take the second example, but instead of creating a new array, create an object, and access it like an associative array:&lt;/p&gt;

&lt;pre&gt;&lt;code class="prettyprint"&gt;var meminfo = new Object();
var someName = "objectPropertyName";

//assign a value to the array with the key being the
//content of the variable 'someName'
meminfo[someName] = "some data here.";
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now check and see of the object property exists; you&amp;#8217;ll find that it does. We&amp;#8217;ve successfully created a dynamic object property &lt;code&gt;meminfo.objectPropertyName&lt;/code&gt;. All we had to do is access the object like an array.&lt;/p&gt;

&lt;p&gt;Weird, but it works.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Defending Apache against Slowloris attacks on Ubuntu 10.04</title>
      <link>http://alax.me/articles/defending-apache-against-slowloris-attacks-on-ubuntu-1004/</link>
      <pubDate>Thu, 08 Jul 2010 21:10 -0700</pubDate>
      <guid>http://alax.me/articles/defending-apache-against-slowloris-attacks-on-ubuntu-1004/</guid>
      <description>&lt;p&gt;For anybody who is unaware, all default Apache2 installations on Ubuntu (and most other OSes) are vulnerable to a simple &lt;a href="http://ha.ckers.org/slowloris/"&gt;Slowloris&lt;/a&gt; DOS attack; any script kiddie with Perl and some free time can bring down major sites with limited bandwidth and resources, due to the way Apache handles half-open connections. Without going into how Slowloris works (that&amp;#8217;s detailed on the &lt;a href="http://ha.ckers.org/slowloris/"&gt;Slowloris project page&lt;/a&gt;) or getting too complicated, here&amp;#8217;s a simple way to effectively defend against this type of attack.&lt;/p&gt;

&lt;p&gt;Run these commands (as root) and you&amp;#8217;ll be good to go.&lt;/p&gt;

&lt;pre&gt;&lt;code class="prettyprint"&gt;root:~# apt-get install libapache2-mod-antiloris
root:~# service apache2 restart
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;That&amp;#8217;s it! While this module doesn&amp;#8217;t offer complete protection&amp;#8212;a sufficiently distributed attacker could probably still defeat this&amp;#8212;it will stop most script kiddies and even somewhat determined attackers from using Slowloris on your servers.&lt;/p&gt;</description>
    </item>
    <item>
      <title>New servers, new businesses, new projects</title>
      <link>http://alax.me/articles/new-servers-new-businesses-new-projects/</link>
      <pubDate>Wed, 07 Jul 2010 11:10 -0700</pubDate>
      <guid>http://alax.me/articles/new-servers-new-businesses-new-projects/</guid>
      <description>&lt;p&gt;I&amp;#8217;m probably the worst person ever at sitting down and writing about what&amp;#8217;s going on; there&amp;#8217;s just so much and I really hate writing it all out. But nevertheless, here&amp;#8217;s what&amp;#8217;s been going on in the last few weeks.&lt;/p&gt;

&lt;h3&gt;Infrastructure Upgrade&lt;/h3&gt;

&lt;p&gt;I&amp;#8217;ve finally moved away from Dreamhost; not that there was anything wrong with them in my short experience, it&amp;#8217;s just&amp;#8230; well, it&amp;#8217;s SLOW. That&amp;#8217;s really the only downfall to using them (I was only with them for a few months, but I never noticed any downtime or anything like that.)&lt;/p&gt;

&lt;p&gt;However, I&amp;#8217;ve moved on. I&amp;#8217;m now running a custom setup on a &lt;a href="http://www.linode.com/"&gt;Linode&lt;/a&gt; Xen VPS. It&amp;#8217;s still not totally bug-free&amp;#8212;more on that in a second&amp;#8212;but it&amp;#8217;s &lt;em&gt;much&lt;/em&gt; faster, and a lot cooler. Which is all that really matters.&lt;/p&gt;

&lt;p&gt;Now, for those of you that have read my articles, you know I&amp;#8217;m a huge &lt;a href="http://httpd.apache.org/"&gt;Apache&lt;/a&gt; fan. I&amp;#8217;ve used it for all of my projects, and I run it on all of my servers. But I was looking for a change, so I thought I&amp;#8217;d try something new.&lt;/p&gt;

&lt;h4&gt;The Cherokee Project&lt;/h4&gt;

&lt;p&gt;&lt;a href="http://www.cherokee-project.com/"&gt;The Cherokee Project&lt;/a&gt; was my first choice as an alternate HTTPD. From their site:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;strong&gt;Cherokee&lt;/strong&gt; is a very fast, flexible and easy to configure Web Server. It supports the widespread technologies
  nowadays: FastCGI, SCGI, PHP, CGI, uWSGI, SSI, TLS and SSL encrypted connections, Virtual hosts,
  Authentication, on the fly encoding, Load Balancing, Apache compatible log files, Data Base Balancing, 
  Reverse HTTP Proxy, Traffic Shaper, Video Streaming and much more.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;What&amp;#8217;s not to love?&lt;/p&gt;

&lt;p&gt;I set it all up (getting PHP working was quite the fiasco until I realized they had built-in tools for doing such things) and configured a bunch of vHosts, all using different PHP interpreters for a secure multi-user environment. Everything was great, until I tried to move this domain (alax.me) over. It would seem that Cherokee is great for most things, but when you start using a ton of regular expressions in redirects, it chokes itself and brings all the vHosts down. Not good.&lt;/p&gt;

&lt;h4&gt;Back to Apache&lt;/h4&gt;

&lt;p&gt;Cherokee was nice to play with, but now I&amp;#8217;m back with Apache, and frankly, I should&amp;#8217;ve just done that from the start. Multi-user environments are dead simple with &lt;a href="http://mpm-itk.sesse.net/"&gt;mpm-itk&lt;/a&gt; (sorry Cherokee, but information sources and PHP-CGI &lt;em&gt;really&lt;/em&gt; suck.) and I can count on it to handle as little or as much as I need and not worry. Cherokee was fast, but I need my stuff to work &lt;em&gt;all the time&lt;/em&gt;, and Apache has proven itself over and over in that regard. Also, I like configuration files; &lt;a href="http://www.cherokee-project.com/doc/other_bundle_cherokee-admin.html"&gt;Cherokee-admin&lt;/a&gt; was pretty, but honestly, I&amp;#8217;m running a command-line OS; I should be able to do this stuff without a GUI.&lt;/p&gt;

&lt;p&gt;Well, that&amp;#8217;s enough about my servers for now.&lt;/p&gt;

&lt;h3&gt;Eluviis&lt;/h3&gt;

&lt;p&gt;What is &lt;a href="http://eluviis.com/"&gt;Eluviis&lt;/a&gt;? It&amp;#8217;s my latest project; It&amp;#8217;s the name I&amp;#8217;ll be conducting my business under from now on, and it&amp;#8217;s where I&amp;#8217;ll be keeping my grid services. If you click that link, you&amp;#8217;ll notice it&amp;#8217;s really nothing exciting; I&amp;#8217;m actively working on the site (and the servers that power the technology behind it) so it&amp;#8217;ll be up soon.&lt;/p&gt;

&lt;p&gt;While Eluviis is actively engaged in projects for clients right now, one of the things I&amp;#8217;m planning on releasing over there is the &lt;a href="http://alax.me/articles/introducing-the-superintendent-project/"&gt;Superintendent&lt;/a&gt;. It&amp;#8217;s still a long way off, but I&amp;#8217;ve got some seriously cool ideas that I think people are going to like (instant push notifications? active attack detection and mitigation? yeah.) It&amp;#8217;s going to be cool. Here&amp;#8217;s hoping my programming skills&amp;#8212;and my determination&amp;#8212;can keep up with my imagination.&lt;/p&gt;

&lt;h3&gt;Final Thoughts&lt;/h3&gt;

&lt;p&gt;I&amp;#8217;ve been thinking about posting some tutorials on various things I encounter (like how to run Cherokee as a multi-user server) so I&amp;#8217;ll probably get around to posting those sometime soon.&lt;/p&gt;

&lt;p&gt;That&amp;#8217;s about it. Carry on, then.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Introducing The Superintendent Project</title>
      <link>http://alax.me/articles/introducing-the-superintendent-project/</link>
      <pubDate>Wed, 26 May 2010 20:16 -0700</pubDate>
      <guid>http://alax.me/articles/introducing-the-superintendent-project/</guid>
      <description>&lt;p&gt;In looking for lightweight, simple, and extensible network monitoring systems, I haven&amp;#8217;t come across any that really strike me as all three of those (extensible and lightweight are a killer for most).&lt;/p&gt;

&lt;p&gt;I&amp;#8217;ve decided that writing my own seems to be the best way (for now). &lt;/p&gt;

&lt;p&gt;This is the Superintendent Project.&lt;/p&gt;

&lt;h3&gt;The Idea&lt;/h3&gt;

&lt;p&gt;I want to be able to get raw stats from the things I need to monitor, and most Linux distros already have great tools for this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Process Monitoring.&lt;/strong&gt; The &lt;code&gt;pidof&lt;/code&gt; command makes this dead simple; If &lt;code&gt;pidof apache2&lt;/code&gt; returns a bunch of numbers, it&amp;#8217;s running, and if the result is blank, it&amp;#8217;s not. Couldn&amp;#8217;t be easier.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Apache Status.&lt;/strong&gt; You may or may not be aware of this, but if you visit &lt;code&gt;http://localhost/server-status&lt;/code&gt; on any machine running Apache2 with the default config, you&amp;#8217;ll get a bunch of statistics about Apache2. Turn &lt;code&gt;ExtendedStatus&lt;/code&gt; on, and you get even more information.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Postfix Statistics.&lt;/strong&gt; Need to know how much mail is in the queue? There&amp;#8217;s a command for that, built-in.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Shorewall Status.&lt;/strong&gt; Run &lt;code&gt;shorewall status&lt;/code&gt;. That&amp;#8217;s all that needs to be said.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This works for pretty much any program you can think of; if there isn&amp;#8217;t a tool, you can always &lt;code&gt;grep&lt;/code&gt; the logs.&lt;/p&gt;

&lt;p&gt;So, what if I made a PHP script that ran all these commands, and sends the raw output securely to a remote server? That way, if any of the commands change, none of the clients need to be updated, just the server&amp;#8212;just the &lt;em&gt;Superintendent&lt;/em&gt;.&lt;/p&gt;

&lt;h3&gt;How It&amp;#8217;s Going To Work&lt;/h3&gt;

&lt;p&gt;It&amp;#8217;s really very simple. A PHP script will be running on the server machine that runs all of the commands above (and more) and gets their raw output. This PHP script can either be set to daemonize itself, or be run by Cron.&lt;/p&gt;

&lt;p&gt;At the specified intervals (assuming Cron is used) all of the output will be posted to an SSL enabled server using PHP&amp;#8217;s CURL functions. The server will then parse the output&amp;#8212;meaning that if the clients update, and the command output changes, the clients don&amp;#8217;t all need to be updated, just the server&amp;#8212;and you can choose to do with it what you want. In my case, it will be output to a web-based interface and a wall-mounted monitor.&lt;/p&gt;

&lt;p&gt;In addition, several other techniques will be used to monitor the server; things like ping and response time can be handled by the Superintendent server. If no information is received from a node, it can be assumed down, and other backup checks will occur (check if Apache is still responsive, if it&amp;#8217;s responding to ping at all, possibly even parse the status page of the server&amp;#8217;s datacenter for possible problems.)&lt;/p&gt;

&lt;p&gt;I&amp;#8217;m sure I will run into pitfalls in the development of this, but it should be pretty awesome when all the bugs are ironed out. It will be lightweight, cross-platform (as the server accepts &lt;em&gt;raw&lt;/em&gt; data), simple, and extensible.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Thoughts on Photoshop CS5 Extended, Snow Leopard, and NMSes</title>
      <link>http://alax.me/articles/thoughts-on-photoshop-cs5-extended-snow-leopard-and-nmses/</link>
      <pubDate>Sun, 16 May 2010 22:05 -0700</pubDate>
      <guid>http://alax.me/articles/thoughts-on-photoshop-cs5-extended-snow-leopard-and-nmses/</guid>
      <description>&lt;p&gt;It&amp;#8217;s been a busy few weeks since my last post, and really not a whole lot of stuff happened that&amp;#8217;s worth writing down. However, in my absence I&amp;#8217;ve been changing things up a lot. First off, new software.&lt;/p&gt;

&lt;h3&gt;Photoshop CS5 Extended&lt;/h3&gt;

&lt;p&gt;All I have to say is &lt;em&gt;pure awesome.&lt;/em&gt; Seriously. It loads up insanely fast, it&amp;#8217;s 64-bit from the ground up, and it even has a new splash screen. What&amp;#8217;s not to love? (besides the fact that I really hate the new icon).&lt;/p&gt;

&lt;p&gt;Also, I need to make sure that people are aware: Content-Aware Fill is pure magic. Seriously. There is no way half the stuff I&amp;#8217;ve used it for recently is even possible, and yet it makes it happen right before my eyes. My friend Todd really had the best explanation of how this wizardry works (I was editing a photo of a tree):&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;You see, as soon as you click the button, Adobe goes out to that exact same spot, digs up the tree, fills the hole, 
  replants the grass, and fixes the rest of the landscape. Then, they set up the camera at the exact same position,
  time-warp to the time of day you took the photo, take the photo, and send it back. It&amp;#8217;s actually quite simple, really.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That&amp;#8217;s &lt;em&gt;definitely&lt;/em&gt; how it works.&lt;/p&gt;

&lt;h3&gt;Snow Leopard&lt;/h3&gt;

&lt;p&gt;I&amp;#8217;ve been running Snow Leopard since the beta stages on my MacBook Pro, and I have to say, I&amp;#8217;m less than pleased. It&amp;#8217;s a fantastic OS, but the RAM consumption has been out of control. Every time I fire up &lt;a href="http://www.apple.com/logicstudio/mainstage/"&gt;MainStage&lt;/a&gt; (an amazing program, by the way) it shows all 4Gb of RAM completely used. MainStage uses about a gig by itself with all my patches loaded; where is the other memory being used? It&amp;#8217;s the only program running, aside from Dropbox and GlimmerBlocker in the background.&lt;/p&gt;

&lt;p&gt;I re-installed in a vain attempt to regain some of this lost memory; honestly, that was just a huge waste of time and the RAM consumption is back to ridiculous levels.&lt;/p&gt;

&lt;p&gt;Ahh, well. This is why I love Linux.&lt;/p&gt;

&lt;h3&gt;Network Management Systems&lt;/h3&gt;

&lt;p&gt;I&amp;#8217;ve been looking into all sorts of network management systems lately for an upcoming project, and again, I have to say I&amp;#8217;m displeased. I&amp;#8217;ve looked into Hyperic, Zenoss, Nagios, OpenNMS, and many, many others; all fall short in one of these areas:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Too much RAM consumption.&lt;/strong&gt; All you do is monitor my other systems, and yet you won&amp;#8217;t even start up with less than a gig of ram. Not acceptable.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not extensible enough.&lt;/strong&gt; Most of these solutions are great, but they don&amp;#8217;t offer the extensibility I need. I want to be able to pull stats from their interfaces into my own &lt;a href="http://en.wikipedia.org/wiki/10-foot_user_interface"&gt;10-foot user interface&lt;/a&gt; which is on a wall-mounted monitor. That way, I can glance over and know if something is wrong, and then use the more complicated system interface to find/troubleshoot/fix the problem.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Just plain ugly.&lt;/strong&gt; This may sound superficial, and it kind of is, but I don&amp;#8217;t do ugly UIs.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If there is one solution that can do/doesn&amp;#8217;t have all of those, somebody, &lt;em&gt;anybody&lt;/em&gt;, please &lt;a href="/contact/"&gt;let me know&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Quick tip: Handling NULL in MySQL Joins</title>
      <link>http://alax.me/articles/quick-tip-handling-null-in-mysql-joins/</link>
      <pubDate>Sat, 17 Apr 2010 11:09 -0700</pubDate>
      <guid>http://alax.me/articles/quick-tip-handling-null-in-mysql-joins/</guid>
      <description>&lt;p&gt;This is just something I ran into, and thought might be helpful to someone. (note this is from a project I&amp;#8217;m currently working on, which is why there are articles and games, and no explanation. The concept should be fairly self-explanatory though)&lt;/p&gt;

&lt;p&gt;Normally, when I do &lt;code&gt;JOINS&lt;/code&gt; in MySQL, I use &lt;code&gt;WHERE&lt;/code&gt; clauses, like so:&lt;/p&gt;

&lt;pre&gt;&lt;code class="prettyprint"&gt;SELECT article_title, game_title FROM articles, games WHERE articles.game_id = games.game_id
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now, this works beautifully&amp;#8212;but only if &lt;code&gt;articles.game_id&lt;/code&gt; actually references a &lt;code&gt;game_id&lt;/code&gt;. What if the article doesn&amp;#8217;t reference a game (meaning, it&amp;#8217;s &lt;code&gt;NULL&lt;/code&gt;)? That query will only return results for articles that have a &lt;code&gt;game_id&lt;/code&gt; set.&lt;/p&gt;

&lt;p&gt;Here&amp;#8217;s what to do:&lt;/p&gt;

&lt;pre&gt;&lt;code class="prettyprint"&gt;SELECT article_title, game_title FROM articles LEFT JOIN games ON articles.game_id = game.game_id
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;That query will return all articles, including ones that have a &lt;code&gt;game_id&lt;/code&gt; set and ones that don&amp;#8217;t.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Why XHTML is better for the web</title>
      <link>http://alax.me/articles/why-xhtml-is-better-for-the-web/</link>
      <pubDate>Fri, 09 Apr 2010 00:09 -0700</pubDate>
      <guid>http://alax.me/articles/why-xhtml-is-better-for-the-web/</guid>
      <description>&lt;p&gt;With the rise of HTML5, it&amp;#8217;s left developers wondering what happened to XHTML; it would seem that the XHTML2 spec is dead in the water. Why does this matter? First, let&amp;#8217;s get some basic concepts down.&lt;/p&gt;

&lt;h3&gt;XHTML vs. HTML&lt;/h3&gt;

&lt;p&gt;XHTML and HTML are very similar in terms of coding, but they do have some major differences. XHTML requires you to close all tags, and HTML does not. This is because XHTML is handled like XML; the entire document must be well-formed and valid in order for it to parse at all. HTML, on the other hand, will just keep going if it finds a broken tag, attempting to resolve errors itself. While this functionality is quite nice from a developer&amp;#8217;s point of view&amp;#8212;errors in your code won&amp;#8217;t mess up your whole site&amp;#8212;it&amp;#8217;s bad for the web as a whole.&lt;/p&gt;

&lt;h3&gt;Benefits of XHTML&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;It is far more strict.&lt;/strong&gt; XHTML requires the developer to make well-formed code; it&amp;#8217;s not a suggestion, like with the HTML5 spec, it&amp;#8217;s a &lt;em&gt;requirement&lt;/em&gt;. It simply won&amp;#8217;t parse at all if it&amp;#8217;s malformed&amp;#8212;this is assuming you&amp;#8217;re actually using XHTML, served as &lt;code&gt;application/xhtml+xml&lt;/code&gt;. Even if you&amp;#8217;re sending it as &lt;code&gt;text/html&lt;/code&gt; (which would mean you&amp;#8217;re actually telling the browser to parse your page as invalid HTML 4.01), XHTML still requires better coding practices, though it will behave like HTML in these cases.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It requires consistency.&lt;/strong&gt; XHTML requires all tags to be lowercase. While this seems a simple cosmetic feature, it unifies the look of the code, which is never a bad thing, though not necessarily a benefit. It also requires that all attributes be quoted, and that all inline elements must be contained within a block element (meaning you can&amp;#8217;t link a &lt;code&gt;div&lt;/code&gt; using an anchor.)&lt;/p&gt;

&lt;p&gt;I&amp;#8217;ve heard many arguments that using XHTML is a waste of time; some developers state that HTML doesn&amp;#8217;t need these &amp;#8220;ridiculous&amp;#8221; requirements on the code, that &amp;#8220;HTML parsers are meant to handle things like omitted tag closes.&amp;#8221; While these are valid points, I can&amp;#8217;t see why encouraging better coding practices is a bad thing. If we &lt;em&gt;can&lt;/em&gt; code better, why shouldn&amp;#8217;t we?&lt;/p&gt;

&lt;h3&gt;So, what can I do?&lt;/h3&gt;

&lt;p&gt;Since XHTML2 is effectively dead, three options are available for writing modern code, but all have benefits and downfalls.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stay at XHTML1.0/1.1&lt;/strong&gt; This provides the benefits we&amp;#8217;ve all become accustomed to; well formed code, lowercase tags, etc. The only problem is that it is quickly becoming outdated, and no new work is being done on it. Sticking to a dead standard is never a good idea in the long run.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Switch to HTML5.&lt;/strong&gt; This is the option that I&amp;#8217;m currently using for all of my sites. HTML5, like it or not, is the future of the web&amp;#8212;even if it is a future filled with ugly, invalid code trees and UPPERCASE TAGS THAT PRACTICALLY SHOUT AT YOU. It recommends that you code like HTML, i.e. don&amp;#8217;t close your empty elements, but it allows you to code like XHTML. So even though it doesn&amp;#8217;t enforce good coding practices&amp;#8212;in fact, it recommends &lt;em&gt;against&lt;/em&gt; them&amp;#8212;you can still use them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Switch to XHTML5.&lt;/strong&gt; This is the best option in terms of standards, but probably the worst in terms of compatibility. It will definitely confuse older browsers, due to the fact that the doctype must be omitted to be valid, and it &lt;strong&gt;must&lt;/strong&gt; be served as &lt;code&gt;application/xhtml+xml&lt;/code&gt;. However, if setup correctly, it will have all the requirements of XHTML1.1 with all the benefits of HTML5. Valid, current code. Awesome.&lt;/p&gt;

&lt;h3&gt;My thoughts on HTML5&lt;/h3&gt;

&lt;p&gt;Personally, I&amp;#8217;m kind of upset with HTML5. While it provides a ton of awesome new features, it takes a huge step backwards in terms of standards. Let&amp;#8217;s face it, even though &lt;code&gt;&amp;lt;br&amp;gt;&lt;/code&gt; is easier to code than &lt;code&gt;&amp;lt;br/&amp;gt;&lt;/code&gt;, one makes way more sense. Why shouldn&amp;#8217;t you close empty tags? At best, you have to make sure your parser can understand non-closed empty tags, and doesn&amp;#8217;t screw up and make every subsequent element a child.&lt;/p&gt;

&lt;p&gt;Seriously guys, what part of this is a good idea?&lt;/p&gt;

&lt;p&gt;Let&amp;#8217;s enforce well-formed code, not recommend against it.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Content, content, content</title>
      <link>http://alax.me/articles/content-content-content/</link>
      <pubDate>Tue, 06 Apr 2010 17:55 -0700</pubDate>
      <guid>http://alax.me/articles/content-content-content/</guid>
      <description>&lt;p&gt;When it comes to site design, there are several things I love doing: headers, footers, and the overall encompassing frame of the design. However, there are parts that I hate. The number one thing?&lt;/p&gt;

&lt;h3&gt;Content Layout &amp;amp; Design&lt;/h3&gt;

&lt;p&gt;I absolutely loathe content layout; there might be a more official term for it, but it&amp;#8217;s what I call the area that actually holds the text, the area you&amp;#8217;re reading from right now. It&amp;#8217;s the only part of the design that feels cookie cutter on every site; even my site has nothing new about it.&lt;/p&gt;

&lt;p&gt;Having similar looks isn&amp;#8217;t necessarily a bad thing, but when you strive for creativity in every area of the design, it&amp;#8217;s a huge drain on productivity. I can&amp;#8217;t even begin to name the amount of time I&amp;#8217;ve spent trying to get unique and good-looking &lt;em&gt;content&lt;/em&gt;. For the designers out there, you know how much of a pain getting the correct line height, letter spacing, and alignment can be, especially with all the inconsistencies between modern browsers (I&amp;#8217;m looking at you, IE). So, while it&amp;#8217;s hard to be different in this area, we might as well be good-looking.&lt;/p&gt;

&lt;h3&gt;So, what do we do?&lt;/h3&gt;

&lt;p&gt;There are a few incredibly basic principles I&amp;#8217;ve come to follow when it comes to content layout. These are probably pretty common knowledge, so don&amp;#8217;t get upset if there&amp;#8217;s nothing new here. Also, I don&amp;#8217;t claim to be an expert on all of this, so don&amp;#8217;t get upset if I&amp;#8217;m completely wrong. That being said, I have used these techniques quite a bit and it always helps contribute towards a good-looking design.&lt;/p&gt;

&lt;h4&gt;Text&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Line height should always be at least 1.5 times the size of your text.&lt;/strong&gt; It makes it much, much easier on the eyes and much nicer to read. In CSS, simply add this to your element of choice to get on your way:&lt;/p&gt;

&lt;pre&gt;&lt;code class="prettyprint"&gt;line-height: 1.5;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;However, make sure you never go over 2 times the size of your text, unless your intent is to make it appear double spaced or you just like making your writing incredibly hard to read (note that this doesn&amp;#8217;t apply everywhere; if you&amp;#8217;re going for a typographic look, for example.) Making your line height double the size of your text visually separates your content, subconsciously informing your reader that your current thought has ended, and you are starting a new one. Definitely not what you want, especially mid-sentence.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Serifs should be determined by the design, not concerns of readability.&lt;/strong&gt; It&amp;#8217;s a wives tale of design that I&amp;#8217;ve fallen for myself; &lt;em&gt;should I use this sans-serif font so it&amp;#8217;s easier to read?&lt;/em&gt; The answer is no. There have been several major studies showing that there is virtually no difference in the readability (not &lt;em&gt;legibility&lt;/em&gt;&amp;#8212;if a font is illegible, it&amp;#8217;s never going to be readable, but a &lt;em&gt;readable&lt;/em&gt; font can be made illegible) of sans-serif fonts vs. serif fonts. Some designers might reference the studies of Sir Cyril Burt, a man who conducted a psychological study of typography, saying that his studies show that serif fonts are indeed more readable; however, Burt has since been accused of forging his results, and there have been studies arguing the better points of both types of fonts.&lt;/p&gt;

&lt;p&gt;But wait! There&amp;#8217;s more. It is true that sans-serif fonts are generally more legible at smaller sizes&amp;#8212;especially on the web&amp;#8212;due to the pixelation that comes from being displayed on a computer screen. It&amp;#8217;s also usually true that if you&amp;#8217;re using fonts this small, you&amp;#8217;re not worried about readability.&lt;/p&gt;

&lt;p&gt;All this to say, if your design looks better with one type of font over another, there is no academic proof that because of serifs readability will be affected. Choose what looks best, as long as the font is legible to start with. If you&amp;#8217;re unsure, just choose Helvetica. Everybody loves Helvetica.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Readability dramatically varies based on line width.&lt;/strong&gt; There are many studies on this topic, but it basically comes down to this: for a 12 point font, try to keep the line width (the distance from one end of text to another) between 400px and 500px. I&amp;#8217;ve broken this rule multiple times for the sake of a design, but if at all possible, try to stay within that range. Your readers will thank you.&lt;/p&gt;

&lt;p&gt;If you want to see how much of a big deal this is, go to Wikipedia, look up any article, and then stretch the browser window the full width of your screen. See how much harder to read it is? Now, take that browser window and make it ridiculously small. Difficult, right? 400px to 500px. It&amp;#8217;s a wonderful thing.&lt;/p&gt;

&lt;h4&gt;Spacing&lt;/h4&gt;

&lt;p&gt;Spacing isn&amp;#8217;t quite as cut-and-dried as text styles&amp;#8212;not that they&amp;#8217;re simple either&amp;#8212;and it really comes down to individual design. Here are some principles you can use if you&amp;#8217;re unsure as to spacing between elements; in most cases, these will look good and make adequate visual sense.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Paragraphs should be spaced no further than double the line height.&lt;/strong&gt; If your line height is 15px, a good top margin would be 30px. That way, your paragraphs still appear connected, while informing the reader visually that you&amp;#8217;ve moved onto a new thought.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Headings should be spaced no further than triple the line height.&lt;/strong&gt; Double the line height works well too, due to the fact that headings are visually different themselves. Try to avoid less than your paragraph spacing, because you don&amp;#8217;t want to give the impression that the heading is tied to that paragraph, but rather all the paragraphs under it until the next heading.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;No text related margins should ever be greater than the space between articles.&lt;/strong&gt; This one is a no brainer, but I thought I&amp;#8217;d include it just in case. If your headings are further apart than your articles, how is the reader supposed to know when the article is over? Or that it hasn&amp;#8217;t already ended?&lt;/p&gt;

&lt;p&gt;The basic principle here is you want to connect content while separating ideas.&lt;/p&gt;

&lt;h3&gt;Wrapping Up&lt;/h3&gt;

&lt;p&gt;While this article definitely wasn&amp;#8217;t extensive, hopefully it gets someone on their way to making more beautiful and more visually sensible content.&lt;/p&gt;</description>
    </item>
    <item>
      <title>A fresh start with Symphony</title>
      <link>http://alax.me/articles/a-fresh-start-with-symphony/</link>
      <pubDate>Tue, 30 Mar 2010 15:30 -0700</pubDate>
      <guid>http://alax.me/articles/a-fresh-start-with-symphony/</guid>
      <description>&lt;p&gt;I&amp;#8217;ve finally moved away from Tumblr and switched to a new system called Symphony. Tumblr lately has been incredibly slow during peak hours, and Symphony was just too awesome to pass up.&lt;/p&gt;

&lt;h4&gt;Welcome to Symphony&lt;/h4&gt;

&lt;p&gt;Symphony is a CMS unlike any I&amp;#8217;ve tried; It can do pretty much anything you&amp;#8217;d like, straight out of the box. For those that don&amp;#8217;t know, even though I work with WordPress a lot, I really don&amp;#8217;t like it. I feel like the code has become too bloated as it tries to be everything for everyone, and the multiple security breaches it has become famous for have deterred me from using it anywhere important. Drupal is powerful, but it&amp;#8217;s extremely ugly, and I just can&amp;#8217;t work with ugly.&lt;/p&gt;

&lt;p&gt;Then I found Symphony.&lt;/p&gt;

&lt;p&gt;Everything about Symphony is beautiful, from the backend management to the templating system. XSLT was rather difficult for me to grasp, but once I did I realized templating shouldn&amp;#8217;t be done any other way. It&amp;#8217;s really that good. However, my XSLT is incredibly rough and as such, this site is probably going to break all over the place. If it does, please let me know using the contact page. The code was thrown together to get it all to work; I will be revising it over the coming weeks.&lt;/p&gt;

&lt;p&gt;There&amp;#8217;s a lot more coming (stuff that might be actually useful, unlike on my Tumblr account), this post is really just so that the homepage isn&amp;#8217;t blank until I can get around to writing something useful.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
