<?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>Steven Benner&#039;s Blog</title>
	<atom:link href="https://stevenbenner.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://stevenbenner.com</link>
	<description>Random articles about programming, computing, and the internet.</description>
	<lastBuildDate>Sat, 23 Apr 2022 14:03:33 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.9.24</generator>
	<item>
		<title>The Ten Commandments of Source Control</title>
		<link>https://stevenbenner.com/2012/08/the-ten-commandments-of-source-control/</link>
		<comments>https://stevenbenner.com/2012/08/the-ten-commandments-of-source-control/#comments</comments>
		<pubDate>Sun, 05 Aug 2012 09:47:56 +0000</pubDate>
		<dc:creator><![CDATA[Steven Benner]]></dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Opinion]]></category>

		<guid isPermaLink="false">http://stevenbenner.com/?p=1574</guid>
		<description><![CDATA[I was meditating yesterday, as I often do, when I was visited by a supernatural being who called himself Gitsvn Hgtfs. He said that he had brought the good news of version control and that I was to be his prophet. Needless to say, I was so surprised that I almost knocked my beer over. [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>I was meditating yesterday, as I often do, when I was visited by a supernatural being who called himself <em>Gitsvn Hgtfs</em>. He said that he had brought the good news of version control and that I was to be his prophet. Needless to say, I was so surprised that I almost knocked my beer over.</p>
<p>When I asked what task he would have me to do, <em>Gitsvn</em> bestowed upon me two invisible golden tablets, with ten sacred commandments written in a strange script that only I can read. He instructed me to spread these glorious words among his chosen people.</p>
<p>And so I present the holy commandments of source control, with my understanding of their meanings.</p>
<p><span id="more-1574"></span></p>
<h3>Commit bad code by proxy</h3>
<p><img class="alignright size-full wp-image-1597" title="Buddy" src="https://static.stevenbenner.name/wp-content/uploads/buddy.png" alt="Buddy" width="150" height="150" />Did you write some questionable code yourself? Then the best course of action is to &#8220;work&#8221; with one of your team mates. Email the code in question to them and ask them to take a look at it, them make them check it in <em>&#8220;since you already have the project open&#8221;</em>.</p>
<p>This will divert the attention (and ire) when it inevitably breaks.</p>
<h3>Craft evasive and mystifying check in notes</h3>
<p><img class="alignright size-full wp-image-1599" title="Notes" src="https://static.stevenbenner.name/wp-content/uploads/notes.png" alt="Notes" width="150" height="150" />Don&#8217;t directly say what you did in the check in notes, it makes it to easy for people to follow your trail. Instead of simply spelling out what changed and why, attempt to enter as many words as possible without actually saying anything. A good technique is to try injecting bizdev terms like &#8220;synergize&#8221; and &#8220;vision&#8221;.</p>
<p>If all else fails, just reference a task ID that does not exist.</p>
<h3>Do not commit small change sets</h3>
<p><img class="alignright size-full wp-image-1600" title="Diff" src="https://static.stevenbenner.name/wp-content/uploads/diff.png" alt="Diff" width="150" height="150" />When someone checks in small changes they are easy to identify and read, this lets anyone reviewing the history know exactly what changed, as well as give them the power to easily revert your changes. You should not give away such an advantage to parties unknown. It is better to make innumerable changes and/or combine the work of many tasks into one check in.</p>
<h3>When in doubt, change things for no reason at all</h3>
<p><img class="alignright size-full wp-image-1601" title="if" src="https://static.stevenbenner.name/wp-content/uploads/if.png" alt="if" width="150" height="150" />It is usually advantageous to pad your check-ins with extra &#8220;work&#8221;. Especially when it is difficult to see exactly what changed, and completely impossibly to identify why. Get creative, it&#8217;s amazing how much you can change without changing anything. Swap around the conditionals, reorder switch statements, mix up some associative arrays.</p>
<p>This will serve to confuse and disorient your enemies.</p>
<h3>Do not fix a an error until all know who wrote it (unless it was you)</h3>
<p><img class="alignright size-full wp-image-1596" title="Bad!" src="https://static.stevenbenner.name/wp-content/uploads/bad.png" alt="Bad!" width="150" height="150" />So you&#8217;ve diagnosed the problem, and have located the exact block of code responsible, great! But you cannot proceed with the fix until you have sifted through the history and identified the individual who wrote that code. It is now your sacred duty to call said person out and make sure everyone on the team knows where the fault rests!</p>
<h3>Change tabs to spaces, or spaces to tabs</h3>
<p><img class="alignright size-full wp-image-1602" title="Backspace" src="https://static.stevenbenner.name/wp-content/uploads/backspace.png" alt="Backspace" width="150" height="150" />When you have a file open, swap the whitespace around. One of two things will happen, either diffs will ignore the whitespace and see no change, so the next person to get the file will be taken completely by surprise when they start coding. Or, the diffs will see the white space and mark every line as changed, essentially marking your territory as the <em>alpha</em> of its change history.</p>
<h3>Leave no rarely used project in a buildable state</h3>
<p><img class="alignright size-full wp-image-1604" title="gfx" src="https://static.stevenbenner.name/wp-content/uploads/gfx.png" alt="gfx" width="150" height="150" />Sure, you&#8217;ve got access to lots of legacy projects running around the system. Start working on them, checking in as you go, then abandon the project, leaving only your commits behind. If you did this right and obey all of the commandments then the project is essentially lost to the ages. A long forgotten un-reconstructable quagmire of history, broken structures, and sin, like ancient Greece, or New Orleans.</p>
<h3>If you find a bug you are responsible for, ignore it</h3>
<p><img class="alignright size-full wp-image-1605" title="Blame" src="https://static.stevenbenner.name/wp-content/uploads/blame.png" alt="Blame" width="150" height="150" />When you find a bug of your own making, for heaven&#8217;s sake, do not acknowledge it! Hell, don&#8217;t mention it, don&#8217;t have it open on your screen, do not even think about it. You may be tempted to check in a fix, but by doing so you will have admitted that you screwed up, and that is not something you should ever do.</p>
<p>Such things are best left forgotten and buried. With any luck nobody will know about it until long after you&#8217;ve moved on.</p>
<h3>Rebase, reset, and filter often</h3>
<p><img class="alignright  wp-image-1607" title="Victoire" src="https://static.stevenbenner.name/wp-content/uploads/victoire.png" alt="Victoire" width="150" height="150" />They say that history is written by the victor, and that&#8217;s almost right. In reality history is <em>rewritten</em> by the victor, and that is exactly what you are. So take every opportunity to rewrite history.</p>
<p>It doesn&#8217;t even have to be big stuff, some of the greatest rewrites of history were minor. Squash a few unrelated commits together, rename a file from the beginning of time, rewrite some commit messages. Little things can make all of the difference in the world.</p>
<h3>Commit often, preferably before any actual code has been completed</h3>
<p><img class="alignright size-full wp-image-1603" title="TODO" src="https://static.stevenbenner.name/wp-content/uploads/todo.png" alt="TODO" width="150" height="150" />There are many people evangelizing the benefits of committing often, but you need to step it up a notch. Commit very often, say, every 10 minutes or so. Any wild tangent that your code is taking should be prompty checked in.</p>
<p>Not only does this impress the management with your amazing productivity and work ethic, but it also leaves half completed work in source control, guaranteeing your position for another day.</p>
<h3>Conclusion</h3>
<p>I have given you this divine knowledge. Now it is your noble task to spread the gospel of <em>Gitsvn Hgtfs</em> to the world. Always hold these truths in your heart and let no coder go ignorant of the sacred rules.</p>
]]></content:encoded>
			<wfw:commentRss>https://stevenbenner.com/2012/08/the-ten-commandments-of-source-control/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Setting up an Ubuntu LAMP server. Part 2: Apache</title>
		<link>https://stevenbenner.com/2012/02/setting-up-an-ubuntu-lamp-server-part-2-apache/</link>
		<comments>https://stevenbenner.com/2012/02/setting-up-an-ubuntu-lamp-server-part-2-apache/#comments</comments>
		<pubDate>Thu, 01 Mar 2012 03:34:18 +0000</pubDate>
		<dc:creator><![CDATA[Steven Benner]]></dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[LAMP]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://stevenbenner.com/?p=1570</guid>
		<description><![CDATA[This is part two in my Ubuntu LAMP server series. In this article I will guide you through the process of installing and setting up the Apache HTTP Server. If you are setting up a web server then you are probably best off running Apache. There are other web servers that will serve your needs [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>This is part two in my Ubuntu LAMP server series. In this article I will guide you through the process of installing and setting up the <a href="http://httpd.apache.org/" target="_blank">Apache HTTP Server</a>.</p>
<p>If you are setting up a web server then you are probably best off running Apache. There are other web servers that will serve your needs and maybe even serve them faster but Apache is the default, for good reason.</p>
<p>There are arguments to be made for the merits of nginx and lighthttpd, but I get everything I need out of Apache and enjoy using it. I really cannot say enough good things about Apache, I love it and it is my web server of choice. I recommend it as the starting point for all web servers.</p>
<p><span id="more-1570"></span></p>
<h3>About Apache</h3>
<p>The internet runs on Apache, simple as that. There are other notable web servers that have been gaining popularity over the years, and they do offer some performance benefits, however Apache is the benchmark by which they are all judged.</p>
<p>In my opinion you should run Apache unless you have a specific reason to use one of the other servers.</p>
<h4>Why use Apache</h4>
<p>Apache is the stalwart web server, it has been the de facto web server software since I first started playing with the internet. But age alone does no great software make (though it sure can help). So here are the reasons to use Apache.</p>
<ul>
<li><strong>Unfathomable age.</strong> In software terms, Apache is older than time. Calling this software &#8220;time-tested&#8221; is like saying that Egypt has &#8220;been around for a while&#8221;. The Apache server has been running the internet so long that it has seen, been the victim of and subsequently patched just about every web server issue ever known.</li>
<li><strong>Stable.</strong> As a system administrator this should be your number one concern. Would you rather serve your content 10ms faster or know that your server is extensively tested and nearly impossible to break (if it&#8217;s set up properly)?</li>
<li><strong>Default web server.</strong> Basically every mainstream web application that you can download (blogs, forums, CMSs, etc.) was built using Apache and comes specially setup to run on Apache (most notably .htaccess files).</li>
<li><strong>Exceptional (community) documentation.</strong> The official Apache documentation is very good, but is difficult for most people to process. However, the wealth of tutorials, walk-throughs, guides, FAQs and forums is unrivaled. If you have a question about Apache it has been asked at least 1000 times, and been answered at least 2000 times.</li>
<li><strong>Extensibility.</strong> The Apache mods system is great. You can enable or disable features very easily and they perform very well.</li>
<li><strong>Well maintained.</strong> Since most of the internet runs on Apache any issue that comes up is a very big deal. Problems are found and patched very quickly.</li>
<li><strong>Performance.</strong> Although you may have heard otherwise, Apache is fast. If properly tuned it is as fast as any other server on the market.</li>
</ul>
<h4>Why not to use Apache</h4>
<p>There are times when Apache is not the best choice.</p>
<ul>
<li><strong>Performance.</strong> Yes, Apache can be as fast as any other server on the market, but it takes a little more tweaking to get it there. The default configuration seems designed for heavy hitting dedicated machines, and will bring most <abbr title="Virtual Private Server">VPS</abbr> instances to their knees if they get significant traffic. If you screw up the configuration at all then your sites will go down the first time you get linked on reddit.</li>
<li><strong>Memory footprint.</strong> Apache tends to be more memory heavy than the newer servers. This is what usually causes issues on VPSs.</li>
</ul>
<h4>The other popular web servers</h4>
<p>Of course this wouldn&#8217;t be an Apache web server article if I didn&#8217;t at least point out the other options.</p>
<ul>
<li><strong><a href="http://nginx.org/" target="_blank">nginx</a></strong> &#8211; Probably the best alternative web server. It is very fast, memory efficient and configuration is very intuitive. Speed is the top priority here.</li>
<li><strong><a href="http://www.lighttpd.net/" target="_blank">lighthttpd</a></strong> &#8211; I don&#8217;t have much first-hand experience with this one, but I can tell you that it is very efficient and scales well. Configuration can get just as complicated, if not more-so than Apache.</li>
</ul>
<h3>Apache Multi-Processing Modules</h3>
<p>Before I dive in to the install and configuration guide I do need to touch on one of the more advanced considerations, MPMs and their affects. This is the most advanced option with Apache, you do not need to know this to get a server up and serving hundreds of thousands of pageviews per day. You probably do need to know this to serve millions of pageviews a day.</p>
<p>You have a choice of several <a href="http://httpd.apache.org/docs/2.0/mpm.html" target="_blank">Multi-Processing Modules</a> <em>(MPMs)</em> for your web server. These are the internals of how Apache works and have some very important considerations.</p>
<dl>
<dt><a href="http://httpd.apache.org/docs/2.0/mod/prefork.html" target="_blank">MPM Prefork</a></dt>
<dd>This is a <strong>non-threaded</strong> system that launches a separate Apache process for each connection. This is the setup that <em>just always works</em>, there are no special considerations for your web applications and no restrictions on modules. You will be running mod_php5 for this MPM and each process will have its own instance of PHP loaded. As a result MPMs based prefork takes a bit more memory than the threaded MPMs based on worker.</dd>
<dd>Configuration is based on limiting the total number of server processes spawned and their lifespan.</dd>
<dd>Prefork is the default apache2 package on Ubuntu.</dd>
<dt><a href="http://httpd.apache.org/docs/2.0/mod/worker.html" target="_blank">MPM Worker</a></dt>
<dd>Worker is a system that uses separate <strong>threaded</strong> Apache processes. In this system you will be running <a href="https://en.wikipedia.org/wiki/FastCGI" target="_blank">FastCGI</a> with <a href="http://www.fastcgi.com/mod_fastcgi/docs/mod_fastcgi.html" target="_blank">mod_fastcgi</a> or possibly <a href="http://httpd.apache.org/mod_fcgid/" target="_blank">mod_fcgid</a> to execute PHP. This is significantly more memory efficient than the prefork system, but the overall performance difference is debatable. The speed at which the server works may or may not be improved, but FastCGI is, in general, faster for PHP scripts.</dd>
<dd>However, if you want <a href="Alternative PHP Cache" target="_blank">APC</a> (which you do) you should know that there are <a href="https://bugs.php.net/bug.php?id=57825" target="_blank">caching issues with APC and and mod_fcgid</a> that we cannot work around right now, so the best option is to use the slightly older and slower mod_fastcgi with <a href="http://php-fpm.org/" target="_blank">php-fpm</a>. In addition to the threading and APC issue with fcgid, some older PHP code will not play well with a FastCGI environment (e.g. older mediawiki versions). Modern PHP code should not have any issues in this environment but it may be something you need to consider.</dd>
<dd>Moving forward I suspect that MPM worker with php-fpm will probably become the default setup because of its speed and memory efficiency.</dd>
<dd>Configuration is based on limiting the number of threads and their lifespan.</dd>
<dt><a href="http://mpm-itk.sesse.net/" target="_blank">MPM ITK</a></dt>
<dd>This is an MPM designed for web hosts that want to be able to isolate virtual hosts with user accounts. It is based on prefork and runs the same way.</dd>
<dd>Don&#8217;t use this one unless you know you need to. I only mention it because there is the apache2-mpm-itk package available to you.</dd>
<dt><a href="http://httpd.apache.org/docs/2.2/mod/event.html" target="_blank">MPM Event</a></dt>
<dd><strong>Do not use this one</strong>, Apache calls it experimental for a reason. Event is a modified version of worker that has special reserved processes to handle listening and such.</dd>
<dd>In the future this may be awesome-sauce, but it is not ready for production.</dd>
</dl>
<h3>Installing Apache</h3>
<p>The basic Apache install really could not be simpler on Ubuntu. Just execute the following command:</p>
<pre>sudo aptitude install apache2</pre>
<p>Alright, you now have Apache 2 installed. That&#8217;s it.</p>
<h3>Configuring Apache</h3>
<p>Now this part is a bit more complicated than the install. We need to configure some basic global variables and set your MPM limits to values that make sense for your server.</p>
<p>First off lets set the basics, open up your apache2.conf file which is located in /etc/apache2.</p>
<pre>sudo nano /etc/apache2/apache2.conf</pre>
<p>Now lets do some configuration. I&#8217;m not going to list every option you can configure, just the ones you need to change. You should take the time to read over <a href="http://httpd.apache.org/docs/2.0/mod/core.html" target="_blank">all of the configuration directives</a> in Apache.</p>
<h4>Basic configuration</h4>
<ul>
<li><strong><code>ServerName</code></strong> &#8211; Used in server signatures and some server generated links. If you are only going to run one web site on this server then set this to that sites URL (e.g. <code>www.exampe.com</code>). If you are going to run more than one site then set this to the server&#8217;s IP address (e.g. <code>12.34.567.890</code>).</li>
<li><strong><code>Timeout</code></strong> &#8211; How long someone can hang a connection open before requesting a page. I set this to <code>30</code> seconds, which I feel is generous. The default config value of <code>300</code> is outrageous.</li>
<li><strong><code>KeepAliveTimeout</code></strong> &#8211; How long to hold connections open for followup requests. My recommendation is to set this short, I would recommend <code>2</code> to <code>5</code> seconds.</li>
<li><strong><code>ServerTokens</code></strong> &#8211; What the server should tell the world about itself in the response header. The default setting is to send the full version information with PHP and mod versions. You might as well print out a list of every hack your system is vulnerable to in the headers. Set this to <code>Prod</code>.</li>
<li><strong><code>ServerSignature</code></strong> &#8211; What kind of signature to show on server generated pages. I personally set this to <code>Off</code>.</li>
<li><strong><code>TraceEnable</code></strong> &#8211; Whether or not to allow TRACE requests. The default is to allow them, but there is absolutely no reason to so you should set this to <code>Off</code>.</li>
</ul>
<h4>MPM Prefork configuration</h4>
<p>The default values for MPM Prefork are fine, if you&#8217;re running a dedicated server with 4 gigabytes of memory. For us normal people we need to tune these way down or the server will light on fire (or start thrashing like crazy) when you get a significant amount of traffic.</p>
<ul>
<li><strong><code>StartServers</code></strong> &#8211; The number of server processes to spawn when Apache starts up. The server will almost instantly change the number of server processes so it&#8217;s irrelevant, but for the sake of consistency set this to your <code>MinSpareServers</code> value.</li>
<li><strong><code>MinSpareServers</code></strong> &#8211; Minimum number of active server processes to keep up waiting to handle new requests. This has nothing to do with how many requests the server can accept, it&#8217;s about reducing the delay users would see because of the start-up time needed for new processes. This should be a relatively small number, I set it to <code>10</code>.</li>
<li><strong><code>MaxSpareServers</code></strong> &#8211; Maximum number of waiting server processes. Apache will slowly kill these off when the server isn&#8217;t seeing much traffic. The point here is to not have a lot of pointless processes hanging around holding memory. Generally speaking this should be double your <code>MinSpareServers</code>.</li>
<li><strong><code>MaxClients</code></strong> &#8211; This is the important one, how many servers can we have up and actively talking to users. This does not mean how many connections the server will accept, it&#8217;s how many processes it can have running concurrently doing the work of processing requests, taking uploads, executing PHP, and serving data out to users. When the server reaches the <code>MaxClients</code> number further incoming requests will be queued and processed in order. The default in the config is <code>150</code>, you want to turn this way down. For a server with about 1GB of RAM I would recommend setting this in the range of <code>15</code> to <code>50</code>, depending on if you are running other services on the system (MySQL = set this low), how memory efficient your web apps are and how fast your server serves up requests.</li>
<li><strong><code>MaxRequestsPerChild</code></strong> &#8211; This is a safeguard to prevent server processes from leaking memory and never returning it. The default config value is zero, which means that child processes never die. You should set this to a large number, say <code>1000</code> to <code>5000</code>.</li>
</ul>
<h5>Example config for a 1GB VPS with well tuned MySQL:</h5>
<pre class="brush: plain; title: ; notranslate">
&lt;IfModule mpm_prefork_module&gt;
    StartServers            5
    MinSpareServers         5
    MaxSpareServers        10
    MaxClients             25
    MaxRequestsPerChild  1000
&lt;/IfModule&gt;
</pre>
<h4>Save your config and reload Apache</h4>
<p>Once you&#8217;ve got all of your basic global settings where you want them then exit nano by hitting Ctrl+X and Y to save.</p>
<p>Now reload the Apache server:</p>
<pre>sudo /etc/init.d/apache2 reload</pre>
<p>Your web server is now running with your new settings.</p>
<h3>Virtual hosts</h3>
<p>Name based virtual hosts are how we do multiple web sites on one server. You have the DNS records for the sites pointing at your web servers IP address and virtual hosts for each domain set up on the web server. Setting up a virtual host in Apache is very simple indeed.</p>
<p>You do this by creating a virtual host config file, these will be located in /etc/apache2/sites-available.</p>
<h4>Default virtual host</h4>
<p>If you hit the IP of the server in your browser (no host name passed) you will get the <em>default virtual host</em>. This default web site is the one that will be shown when Apache cannot match the requested host to any named virtual host.</p>
<p>The first virtual host that does not specify the <code>ServerName</code> in its configuration will be the default virtual host. Apache comes with a default virtual host (called &#8220;default&#8221;) already set up and running in the sites-available folder, but if you set the <code>ServerName</code> on default and add another virtual host that starts with a number or a letter combination that would sort it before the word &#8220;default&#8221; then that will become the default virtual host.</p>
<p>If you need to add such a domain then I recommend changing the file name of &#8220;default&#8221; to something like &#8220;000-default&#8221;. This is how you do it:</p>
<pre>cd /etc/apache2/sites-available
sudo a2dissite default
sudo mv default 000-default
sudo a2ensite 000-default</pre>
<h4>Adding a new virtual host</h4>
<p>Alright, let&#8217;s create a new virtual host. Start by creating the directories for your new site. You can put the directories anywhere you want, but the convention for Ubuntu is that web sites belong in /var/www, and I recommend following that convention. Let&#8217;s create a folder for the domain that contains an <em>htdocs</em> folder for the web site and a <em>logs</em> folder for the logs.</p>
<pre>sudo mkdir /var/www/yourdomain.com
sudo mkdir /var/www/yourdomain.com/htdocs
sudo mkdir /var/www/yourdomain.com/logs</pre>
<p>Now, create a new file in the sites-available directory:</p>
<pre>sudo nano /etc/apache2/sites-available/yourdomain.com</pre>
<p>And paste in this virtual host config:</p>
<pre class="brush: plain; title: ; notranslate">
&lt;VirtualHost *&gt;

        ServerName yourdomain.name
        ServerAlias www.yourdomain.name
        ServerAdmin webmaster@yourdomain.com

        DocumentRoot /var/www/yourdomain.com/htdocs

        &lt;Directory /&gt;
                Options FollowSymLinks
                AllowOverride All
        &lt;/Directory&gt;

        &lt;Directory /var/www/yourdomain.com/htdocs&gt;
                Options FollowSymLinks
                AllowOverride All
                Order allow,deny
                allow from all
        &lt;/Directory&gt;

        CustomLog /var/www/yourdomain.com/logs/access.log combined
        ErrorLog /var/www/yourdomain.com/logs/error.log
        LogLevel warn

&lt;/VirtualHost&gt;
</pre>
<p>Exit nano (Ctrl+X to exit, and Y to save). Now you just enable the site:</p>
<pre>sudo a2ensite yourdomain.com</pre>
<p>And reload Apache:</p>
<pre>sudo /etc/init.d/apache2 reload</pre>
<p>That&#8217;s it. You can do all kinds of crazy configuration in the virtual host, but that template is enough to get your site up and running. If your DNS is set up right you should be able to hit your domain in a browser and see whatever is in /var/www/yourdomain.com.</p>
<h3>Web optimizations</h3>
<p>Now is the time to do some tuning for the client side of your web server. If you&#8217;ve ever used the YSlow or PageSpeed addons for Firefox (must have for web developers) you&#8217;ve probably seen them complaining about sites that don&#8217;t gzip, or that use ETags. Well let&#8217;s make sure your sites are not guilty of those sins.</p>
<p>These changes are made by adding these configuration values to the bottom of your config file (it can go anywhere in the file, I just prefer to keep these kinds of customizations all in one place)</p>
<p>To edit your apache2.conf again just enter this command in the console:</p>
<pre>sudo nano /etc/apache2/apache2.conf</pre>
<p>After you&#8217;ve made your changes you exit nano (Ctrl+X to exit, Y to save), and reload Apache with this command:</p>
<pre>sudo /etc/init.d/apache2 reload</pre>
<h4>gzip static files</h4>
<p>This is the single best server side optimization you can do, it costs you almost nothing in terms of performance and greatly reduces the over-the-wire footprint of files, and thus response time.</p>
<p>First, enable mod_deflate:</p>
<pre>sudo a2enmod deflate</pre>
<p>And add the following to your apache2.conf:</p>
<pre class="brush: plain; title: ; notranslate">
# mod_deflate - add gzip compression
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript
</pre>
<p>You are now serving static text, HTML, XML, CS and JS files gzipped.</p>
<h4>ETags</h4>
<p>File ETags are used to compare a cached file against the servers version of that file and determine if the client needs to get the latest full version of that file. However they are generally not recommended because they are usually unique to the machine that sent the file so you can&#8217;t use them if you want to use multiple machines to serve front-end content.</p>
<p>That probably won&#8217;t be a problem for you, but since I am a whore for YSlow scores, and <a href="http://developer.yahoo.com/performance/rules.html#etags" target="_blank">YSlow recommends against them</a>, I always disable ETags.</p>
<p>This is the code to disable ETags:</p>
<pre class="brush: plain; title: ; notranslate">
FileETag None
</pre>
<h4>Far-future cache expiration dates</h4>
<p>To get the most out of client-side caching it is recommended that you set the cache expiration into the distant future for all static files. This will ask clients to hold onto your static files for a long time so that they do not have to regularly re-download them, wasting time and bandwidth.</p>
<p>However,<strong> I do not recommend this for most people</strong> because you are forced to implement versioning on all of your resource files (e.g. stylesheet_v1.2.css). If you want to modify a CSS file you have to make a new copy of that file and give it a file name and/or path different from the original because anyone that has that file cached will not receive any of the changes.</p>
<p>If you are willing to deal with this hassle then this is a nice boost to the effectiveness of caching.</p>
<p>Enable mod_expires:</p>
<pre>sudo a2enmod expires</pre>
<p>And add the code to set up far-future cache expiration dates on static files:</p>
<pre class="brush: plain; title: ; notranslate">
# Add far-future expiration dates
ExpiresActive on

&lt;FilesMatch &quot;\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$&quot;&gt;
	ExpiresDefault &quot;access plus 10 years&quot;
&lt;/FilesMatch&gt;
</pre>
<h4>Further reading</h4>
<p>I recommend you get both the YSlow and Page Speed addons and test your sites with them. These really are invaluable tools for improving your web site performance.</p>
<p>Also, I highly recommend taking the time to read through the official <a href="http://developer.yahoo.com/performance/rules.html" target="_blank">Yahoo performance best practices</a> and <a href="http://code.google.com/speed/page-speed/docs/rules_intro.html" target="_blank">Google performance best practices</a> documents. They are filled with excellent tips for both the server and the web site.</p>
<h3>Other useful mods</h3>
<p>This article covers the basics of getting Apache up and running. From here on you can keep it simple or get as complicated as your heard desires. There are at least a few other mods that you should probably be aware of to help you on your journey:</p>
<ul>
<li><strong>rewrite</strong> &#8211; The Apache URL rewriter, industry standard, much beloved and keeping the internet working. This will alow you to do URL rewriting, which is a huge article unto itself. Google to learn about Apache URL rewriting.</li>
<li><strong>auth_basic and auth_digest</strong> &#8211; These are the authentication modules that are used to require a username and password to access a file or directory on the server. Very useful, I personally like to protect admin folders (e.g. wp-admin for WordPress) with authentication, just as an extra layer of inconvenience to would-be hackers. Always use digest, don&#8217;t bother with basic.</li>
<li><strong>status</strong> &#8211; Useful for seeing what your web server is doing at any particular moment. This will give you the Apache status page that you might have seen before. Also, required for some monitoring tools (i.e. munin). Remember to require authentication on that page as well or anyone can see what sites/files you are sending and what IPs are accessing them.</li>
</ul>
<h3>Conclusion</h3>
<p>Apache is an awesome web server for any and every purpose, and is very easy to get up and running. It takes some more tuning to get it right, but once you&#8217;ve got it all setup and running smoothly it is almost impossible to bring down (from normal usage).</p>
<p>If you have any questions or notice that I forgot to cover something important then please leave a comment below and I&#8217;ll get back to you as soon as I can.</p>
]]></content:encoded>
			<wfw:commentRss>https://stevenbenner.com/2012/02/setting-up-an-ubuntu-lamp-server-part-2-apache/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Caching with CodeIgniter: Zen, headaches and performance</title>
		<link>https://stevenbenner.com/2010/12/caching-with-codeigniter-zen-headaches-and-performance/</link>
		<comments>https://stevenbenner.com/2010/12/caching-with-codeigniter-zen-headaches-and-performance/#comments</comments>
		<pubDate>Sat, 01 Jan 2011 04:47:01 +0000</pubDate>
		<dc:creator><![CDATA[Steven Benner]]></dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tips and Tricks]]></category>

		<guid isPermaLink="false">http://stevenbenner.com/?p=1452</guid>
		<description><![CDATA[CodeIgniter is already a very fast PHP framework, but that alone might not be fast enough for high traffic web applications. To get to the next level of performance you will need to implement some kind of caching. Luckily for the CodeIgniter crowd, the framework comes with one of the fastest caching systems possible, Output [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>CodeIgniter is already a very fast PHP framework, but that alone might not be fast enough for high traffic web applications. To get to the next level of performance you will need to implement some kind of caching.</p>
<p>Luckily for the CodeIgniter crowd, the framework comes with one of the fastest caching systems possible, <em>Output Caching</em>. Short of writing static HTML files or output caching to memory there is no faster way to serve pages.</p>
<p>However, if you have any degree of interactive or dynamic content, total output caching can be painful (if not impossible) to implement. Now there are other options, such as database caching and third party caching libraries, but none of them will be quite as fast as full output caching. So if at all possible that is what you should use.</p>
<p>Let me provide you with an overview of the caching systems available and a few of my tricks.</p>
<p><span id="more-1452"></span></p>
<h3>CodeIgniter Output Caching</h3>
<p>CodeIgniter&#8217;s <a href="http://codeigniter.com/user_guide/general/caching.html" target="_blank">output caching</a> system will take the completely rendered output of your views and save them to disk. It&#8217;s a very simple idea, and simple is good for performance. When a page is cached there is no need to talk to the database or process anything.</p>
<p>Output caching is actually built directly in to the CodeIgniter life cycle. Every time CodeIgniter starts up it checks to see if the current URL has a cached version on disk. If it finds it then CodeIgniter will completely skip everything and throw the cached version out to the browser.</p>
<p>It&#8217;s also incredibly easy to turn on, just call the <code>cache()</code> method anywhere in in your controller to output cache the page.</p>
<pre class="brush: php; title: ; notranslate">
$this-&gt;output-&gt;cache(MINUTES);
</pre>
<h4>Overcoming the problems of output caching</h4>
<p>There is one major downside to output caching, when a page is cached you <em>cannot</em> talk to the database or process anything. The greatest benefit is also the greatest curse. This means that anything the least bit dynamic or user derived cannot be cached this way.</p>
<p>Unfortunately CodeIgniter does not come with partial caching, support for dependencies or even a way to evict items from cache. To me at least, this is the single biggest hole in the awesomeness that is CodeIgniter. Just a little bit more love for the output caching system would make the most scalable PHP framework vastly more scalable.</p>
<p>But we can work around these issues with a little bit of extra thought and design.</p>
<p><strong>What output caching does parse</strong></p>
<p>It&#8217;s worth mentioning that there are two functions/strings that output caching will parse, even after the file is cached, the <a href="http://codeigniter.com/user_guide/libraries/benchmark.html" target="_blank">benchmark class&#8217;</a> <code>elapsed_time()</code> and <code>memory_usage()</code> functions. These functions will insert text markers (<code>{elapsed_time}</code> and <code>{memory_usage}</code>, respectively) that are parsed by CodeIgniter when it sends the output to the browser.</p>
<p>This always makes for some interesting figures so it&#8217;s nice to include a HTML comment in your pages with these functions to watch just how fast the output cache is working.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;!--
	Time: &lt;?php echo $this-&gt;benchmark-&gt;elapsed_time(); ?&gt;
	Mem: &lt;?php echo $this-&gt;benchmark-&gt;memory_usage(); ?&gt;
--&gt;
</pre>
<p>It&#8217;s quite common to see these values go from 0.07 seconds with 3.5MB of memory to 0.006 seconds with 0.75MB of memory. Output caching really does work <em>that</em> well!</p>
<p><strong>The small things</strong></p>
<p>For most pages on most web applications there are just a few small items that need to by dynamic, such as Login/Logout links, recently viewed items and pretty dates (x days ago). All of these things can be effectively done via JavaScript without losing any significant functionality.</p>
<p>So build a simple API to make the functions available via JSON. For example this is a basic controller that would allow a JavaScript to get the users current status (logged-in, username and group).</p>
<pre class="brush: php; title: ; notranslate">
class Api extends CI_Controller
{
	public function user_status()
	{
		$logged_in = $this-&gt;user_model-&gt;logged_in();
		$data = array(
			'isLoggedIn' =&gt; $logged_in,
			'userId' =&gt; $logged_in ? $this-&gt;session-&gt;userdata('user_id') : '',
			'userName' =&gt; $logged_in ? $this-&gt;user_model-&gt;get_user()-&gt;username : '',
			'userGroup' =&gt; $logged_in ? $this-&gt;user_model-&gt;get_user()-&gt;group : ''
		);
		$this-&gt;output-&gt;set_header('Content-type: application/json');
		$this-&gt;output-&gt;set_output(json_encode($data));
	}
}
</pre>
<p>Now with that data exposed via an API you can use JavaScript to show the user controls you find at the top of many web applications. Here is an example script using jQuery that would do just that.</p>
<pre class="brush: jscript; title: ; notranslate">
$.getJSON('/api/user_status', function(data) {
	if (data.isLoggedIn) {
		$('#user-controls').html('Logged in as &lt;b&gt;'+data.userName+'&lt;/b&gt; | ' +
			'&lt;a href=&quot;/logout&quot;&gt;Log Out&lt;/a&gt;');
	} else {
		$('#user-controls').html('&lt;a href=&quot;/register&quot;&gt;Register&lt;/a&gt; | ' +
			'&lt;a href=&quot;/login&quot;&gt;Log In&lt;/a&gt;');
	};
});
</pre>
<p>On an average web app this is still at least an order of magnitude  faster than not using caching at all since you are only making one query  to the database. The page load will finish much faster, then when the page is  ready the supplementary content will be loaded.</p>
<p>Now obviously there is a significant down side to this solution; users with JavaScript disabled will not see the login and register links. You could simply show those links by default and overwrite them with script, but for most applications it is a non-issue since many features that require a user to log in will also require that JavaScript is enabled anyway. It&#8217;s a judgment call for you to make.</p>
<p><strong>The big things</strong></p>
<p>For entire pages that are filled with content that changes regularly you will need a different technique. The best solution that I have found is evicting the cache for a page when you change the data. So when someone posts something you will call a function to clear the cache files for any pages affected.</p>
<p>The preserves the massive performance benefit of keeping output caching enabled but still makes the page completely dynamic.</p>
<p>However, as I said earlier, CodeIgniter does not give you any function to delete cache files so you have to do it yourself. Output cache files are saved in your cache folder (config item) as an MD5 hash of the URI they represent. This is the exact code CodeIgniter uses:</p>
<pre class="brush: php; title: ; notranslate">
$path = $CI-&gt;config-&gt;item('cache_path');
$cache_path = ($path == '') ? APPPATH.'cache/' : $path;
[ ........ ]
$uri =	$CI-&gt;config-&gt;item('base_url').
		$CI-&gt;config-&gt;item('index_page').
		$CI-&gt;uri-&gt;uri_string();

$cache_path .= md5($uri);
</pre>
<p><strong>Note: Actually this is for the latest CodeIgniter 2.0. For 1.7 replace <code>APPPATH</code> with <code>BASEPATH</code>.</strong></p>
<p>So you have to search for the cache files you want to purge using that algorithm and <code>unlink</code> them. Here is a simple little helper I wrote to do just that.</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/**
 * Delete Cache File
 *
 * Evicts the output cache for the targeted page.
 *
 * @author	Steven Benner
 * @link	https://stevenbenner.com/2010/12/caching-with-codeigniter-zen-headaches-and-perfomance/
 * @param	string	$uri_string	Full uri_string() of the target page (e.g. '/blog/comments/123')
 * @return	bool	True if the cache file was removed, false if it was not
 */
if ( ! function_exists('delete_cache'))
{
	function delete_cache($uri_string)
	{
		$CI =&amp; get_instance();
		$path = $CI-&gt;config-&gt;item('cache_path');
		$cache_path = ($path == '') ? APPPATH.'cache/' : $path;

		$uri =  $CI-&gt;config-&gt;item('base_url').
			$CI-&gt;config-&gt;item('index_page').
			$uri_string;

		$cache_path .= md5($uri);

		if (file_exists($cache_path))
		{
			return unlink($cache_path);
		}
		else
		{
			return TRUE;
		}
	}
}
</pre>
<p><strong>You may want to just download my complete <a href="https://github.com/stevenbenner/codeigniter-cache-helper">Cache Helper</a> from GitHub.</strong> Place cache_helper.php in your helpers directory and you&#8217;re good to go. Now you can evict cache files like this:</p>
<pre class="brush: php; title: ; notranslate">
$this-&gt;load-&gt;helper('cache');

delete_cache('/blog/comments/123');
</pre>
<h3>CodeIgniter Database Caching</h3>
<p>Another caching system that comes with CodeIgniter is the <a href="http://codeigniter.com/user_guide/database/caching.html" target="_blank">database caching</a> system. This system, as it&#8217;s name implies, only caches database responses from your queries. Leaving your PHP code to do all of the dynamic stuff you want without needing to requery the database for every page load.</p>
<h4>Implementing query caching</h4>
<p>Database caching will greatly reduce the load on your database and increase the performance of your application as a result. It&#8217;s also easy to turn on. There are two settings in the database config file you need to modify. Just flip the <code>cache_on</code> switch and set a <code>cachedir</code> that is writable. With those options set you are up and running with database caching.</p>
<p>Once you have query caching up and running you will need to clear the caches whenever you do an update. Thanks to the convenient <code>cache_delete</code> function this too is very easy.</p>
<pre class="brush: php; title: ; notranslate">
$this-&gt;db-&gt;cache_delete('controller', 'method');
</pre>
<h4>Possible issues</h4>
<p>Database caching has a few quirks that may or may not be a problem for you:</p>
<ul>
<li><strong>Uses an odd organization system.</strong> Query cache files are organized into &#8220;controller+method&#8221; folders. This can be helpful, but if you have a single function in a controller that does some heavy lifting or runs different queries for different situations you may build up a very large pile of query cache files in short order.</li>
<li><strong>You have to specifically exclude queries from cache.</strong> You can&#8217;t tell  the system to only cache queries that you specifically want to cache,  you tell the system to cache <em>all</em> queries then you can exclude individual  queries with the <code>cache_off()</code> function.</li>
<li><strong>Can get messy easily.</strong> You need to be very conscious about disabling cache for some queries to avoid a pile of useless cache files. It seems that if you&#8217;re using CodeIgniter&#8217;s DB sessions you will have a session query cached for every end user in every controller method folder, unless you extend it with custom code.</li>
<li><strong>Can&#8217;t purge cache for individual queries.</strong> You have to evict cache files for all queries in a controller function if you want to delete a cache. Again if you have a few controller methods doing all the heavy lifting this can cause a problem. But hey, at least query caching <em>has</em> a delete function.</li>
<li><strong>No expiration/TTL.</strong> Cache files can not be aged off. If you want a cache updated you must delete it.</li>
</ul>
<p>The biggest problem is that the database caching simply isn&#8217;t sharp enough for many situations. The all-or-nothing structure can get annoying really quickly. If you&#8217;re going to use database sessions then you&#8217;re probably going to want to run a cron job to completely purge the cache every night.</p>
<h3>Third Party Caching</h3>
<p>Several other more advanced and more flexible caching systems have been created by other CodeIgniter developers around the world. For some situations you may find them to be far better alternatives than the caching systems that CodeIgniter offers.</p>
<ul>
<li><a href="http://philsturgeon.co.uk/code/codeigniter-cache" target="_blank"><strong>Phil Sturgeon&#8217;s Cache Library</strong></a><br />
An excellent and very flexible caching system that can be used with just about any object you would want. This system uses disk caching just like the output and database caching systems. You can cache model returns and library results in a serialized format that will greatly reduce the amount of database queries you need to run.</li>
<li><a href="https://bitbucket.org/mijnpraktijk/mp_cache/wiki/Home" target="_blank"><strong>Jelmer Schreuder&#8217;s MP_Cache</strong></a><br />
Another take on flexible caching, MP_Cache is a similar idea to Phil&#8217;s Cache Library but adds some more nice little features that you might enjoy, such as dependencies and group tags.</li>
</ul>
<h3>Things I wish CodeIgniter supported</h3>
<p>One day I&#8217;ll probably stop being lazy and extend the caching system to add these features, but until that day these are the biggest things that I wish EllisLab would implement in CodeIgniter&#8217;s caching system:</p>
<ul>
<li><strong>Partial output caching.</strong> This would be a huge, massive, zomgwtfwin improvement. Even if I could just use partial caching on views. Having main un-cached template view that calls individual cached content views would be immensely awesome. Cache just the content blocks with lots of heavy lifting beneath them and leave the lightweight user-specific stuff completely un-cached.</li>
<li><strong>Native output cache eviction.</strong> One little function, say <code>clear_cache('controller/function')</code> would be very helpful. It is really troublesome to have to find cache files by their full URL. Any little modifier, say page-numbers, greatly complicates a search for cache files to delete. Not to mention that it just plain doesn&#8217;t make sense that the application has to know all of it&#8217;s possible URIs to purge cache files.</li>
<li><strong>Output cache groups.</strong> Similar to the last idea, it would be nice to group related caches somehow, even just being able to specify a sub-directory to save them in would be enough. One example is paginated content. If I want to evict all caches for every page of a category I have to determine number of pages and the URIs for every page to delete all of the affected cache files. It would be nice to purge all of them as a group.</li>
<li><strong>Support for common caching back-ends.</strong> It&#8217;s something I don&#8217;t really need to see in the library, but it would be nice if there was support for caching objects with the more popular PHP caching schemes such as APC.</li>
</ul>
<h3>Conclusion</h3>
<p>The caching systems in CodeIgniter have their pros and cons, and quirks, but the simplicity of the functions is nice in it&#8217;s own way, almost zen like in their simplicity. Of course I wish EllisLabs would improve and expand on this excellent base. Fortunately, thanks to the work of other developers we have some options for more complex caching needs.</p>
<p>So did I miss anything? Do you know of any other CI caching libraries that are worth mentioning here. Or do you know of any other techniques to squeeze some more flexibility out of the CI caching systems? I&#8217;d love to hear how you made caching work for your needs. Please add a comment below.</p>
]]></content:encoded>
			<wfw:commentRss>https://stevenbenner.com/2010/12/caching-with-codeigniter-zen-headaches-and-performance/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>How to set up a Team Fortress 2 dedicated server on Ubuntu</title>
		<link>https://stevenbenner.com/2010/11/how-to-set-up-a-team-fortress-2-dedicated-server-on-ubuntu/</link>
		<comments>https://stevenbenner.com/2010/11/how-to-set-up-a-team-fortress-2-dedicated-server-on-ubuntu/#comments</comments>
		<pubDate>Sat, 27 Nov 2010 02:19:14 +0000</pubDate>
		<dc:creator><![CDATA[Steven Benner]]></dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://stevenbenner.com/?p=1068</guid>
		<description><![CDATA[I recently decided that I wanted to set up a dedicated server running Team Fortress 2, the very entertaining multiplayer first-person shooter game by Valve.  I was pleasantly surprised at how easy it was to install and configure a server that runs exactly the way I want. All Valve multiplayer games run off of the [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>I recently decided that I wanted to set up a dedicated server running <em>Team Fortress 2</em>, the very entertaining multiplayer first-person shooter game by <em>Valve</em>.  I was pleasantly surprised at how easy it was to install and configure a server that runs exactly the way I want.</p>
<p>All Valve multiplayer games run off of the same base server software, <em>Source Dedicated Server</em> (SRCDS). They build a version for Windows, Linux and Mac so you can run it on whatever system you happen to have available. In my case I had Ubuntu 10.04 LTS, which is a great operating system for any server.</p>
<p>This article will give you a walk though guide for installing and configuring srcds on Ubuntu. I am writing specifically about TF2 here, but much of this information will apply to other Source games such as Counter Strike: Source, Left 4 Dead, and Half-Life 2: Deathmatch.</p>
<p><span id="more-1068"></span></p>
<h3>Basic server information</h3>
<p>First off a few notes about the software:</p>
<ul>
<li>The first thing that I should point out is the the srcds software is only available in 32-bit. So if you are setting up a server just for Source games then be sure to use the 32-bit version of Ubuntu. You will not gain anything by having the 64-bit version.</li>
<li>You may see references to &#8220;hlds&#8221; in places, hlds stands for Half-Life Dedicated server. This was the name of the old version of srcds (aka <em>Gold Source</em>) that ran the original Half-Life and Counter Strike. Don&#8217;t let it confuse you, the name is still used in places but (in this article) it is the same thing as srcds.</li>
<li>Depending on what game you&#8217;re running and what settings are applied srcds can use a good amount of processor and RAM. You really need at least 512 MB of RAM and a good modern processor to run a TF2 server properly. A gig to two of RAM will be optimal for running a couple instances. To my knowledge the srcds software is not multi-threaded so you wont see any benefits from a dual processor machine.</li>
<li>The server will require a huge amount of bandwidth. For a 24 player TF2 server with voice enabled running at max capacity 24/7 expect 800+ gigabytes of bandwidth per month. I regularly see the upload reach 3 Mb/s and download hovers at around 1.5 Mb/s.</li>
</ul>
<h3>Setting up Ubuntu</h3>
<p>For a basic system set up walk through please use Part 1 of my <a href="https://stevenbenner.com/2010/06/setting-up-an-ubuntu-lamp-server-part-1-initial-setup/">guide to setting up an Ubuntu server</a>. Everything in that article is relevant to this guide. The only thing that I should add is be sure not to run SSH on port 27015, since that is the port your Source server will be running on.</p>
<p>One extra step that you might want to do is to create an account for running the srcds process. This isn&#8217;t at all required, but it is good practice. The standard practice seems to be creating and account called &#8220;hlds&#8221; and using that account to run the process.</p>
<p>Also, if you&#8217;re running a good firewall (as you should be) remember to poke a hole for port 27015.</p>
<h3>Installing Source Dedicated Server</h3>
<p>The installation of srcds is handled entirely by the hldsupdatetool created by Valve. This simple little tool will handle the download and installation of your base Source Dedicated Server. The first step in this process is to get the hldsupdatetool.</p>
<pre>wget http://www.steampowered.com/download/hldsupdatetool.bin</pre>
<p>This will download hldsupdatetool.bin to your current directory. Next we need to give this file execute permissions and the run it.</p>
<pre>chmod +x hldsupdatetool.bin
./hldsupdatetool.bin</pre>
<p>This will run the tool. It will present you with a license agreement, type &#8220;yes&#8221; and hit enter to proceed. It will install steam into the current directory.</p>
<p>Now we have to run the steam client, which will check to see if it is currently up to date and download a whole bunch of updates. This will take some time.</p>
<pre>./steam</pre>
<p>Now that steam is up to date and ready to run we are ready to install the Team Fortress 2 server. We do this via the steam client by giving it the following command.</p>
<pre>./steam -command update -game tf -dir .</pre>
<p>The dot after the -dir flag tells it to install the game server based in the current directory. You can tell it to install wherever you want, but most people just install it in home directory.</p>
<p>If you thought the steam update took a while, you might want to find something else to do for a while, the initial install of the Team Fortress 2 server requires downloading about 3.5 gigabytes of files. This will take a lot of time.</p>
<p>Once it has finished downloading everything it will return you to the console. The game server has been completely installed.</p>
<h3>Configuring your server</h3>
<p>There are several files that you will want to edit for configuring and setting up your TF2 server. The big one is the server.cfg file located in the orangebox/tf/cfg folder. This file is where you set all of the server variables that control how your server runs.</p>
<p>There are literally hundreds of possible variables in srcds, many of which have no effect on a TF2 server. To simplify this guide I&#8217;ll provide you with a very simple sample server config file and talk about some of the more important variables. For a more complete list see <a href="http://www.dodbits.com/downloads/cvars/TF2/Team_Fortress_2_cvar_list_a-z.htm" target="_blank">the complete list</a>.</p>
<h4>Basic server configuration file</h4>
<pre class="brush: cpp; title: ; notranslate">
// General server settings
hostname &quot;Payload/Control-Point Rotation [Fremont, CA]&quot;
rcon_password &quot;myunguessablepassword&quot;
sv_password &quot;&quot;
sv_lan 0
sv_region 1

// game settings
mp_timelimit 30
mp_maxrounds 4
mp_winlimit 0

// voice settings
sv_voiceenable 1
sv_alltalk 0

// bandwidth rates/settings
sv_allowupload 1
sv_allowdownload 1
sv_minrate 10000
sv_maxrate 0
sv_maxupdaterate 100
sv_minupdaterate 66
sv_mincmdrate 66
sv_maxcmdrate 100

// run in pure mode
sv_pure 1
sv_pure_kick_clients 1
</pre>
<p>My server config is significantly more complicated than that, but trying to mention every possible variable that you can tinker with would be a huge article unto itself! This basic server config should be enough to get your server up and running with the best practices and and smoothest game play.</p>
<p>Any variable that you don&#8217;t explicitly set in the server config file will run it&#8217;s default value, which is exactly what you want for 99% of the variables.</p>
<h4>General server settings</h4>
<p>Most of these variables are pretty self-explanatory. The <code>hostname</code> is the server name that players will see in the server browser, <code>rcon_password</code> is the password for the remote console (make this a strong password), <code>sv_password</code> is the password to join the server (leave blank for a public server), and <code>sv_lan 0</code> sets the server to run as an internet server (instead of a LAN server).</p>
<h5>sv_region</h5>
<p>The <code>sv_region</code> variable is quite important. This tells the master list server what region your server is running in so players can filter out servers not in their region. Here are the possible values.</p>
<table>
<tbody>
<tr>
<th width="10%">Code</th>
<th width="23%">Region</th>
<th width="10%">Code</th>
<th width="23%">Region</th>
<th width="10%">Code</th>
<th>Region</th>
</tr>
<tr>
<td>0</td>
<td>US East coast</td>
<td>3</td>
<td>Europe</td>
<td>6</td>
<td>Middle East</td>
</tr>
<tr>
<td>1</td>
<td>US West coast</td>
<td>4</td>
<td>Asia</td>
<td>7</td>
<td>Africa</td>
</tr>
<tr>
<td>2</td>
<td>South America</td>
<td>5</td>
<td>Australia</td>
<td>255</td>
<td>World</td>
</tr>
</tbody>
</table>
<h4>Game settings</h4>
<p>There are three variables in the game setting section, <code>mp_timelimit</code>, <code>mp_maxrounds</code> and <code>mp_winlimit</code>. These are easily confused and mean different things in different types of maps. They are also the ones that new admins are most likely to screw up.</p>
<h5>mp_timelimit</h5>
<p>The maximum time a game is allowed to be played (in minutes). This one is easy to understand, what is the longest time that you want players to be stuck on a single map? This doesn&#8217;t count in the tie-breaker or sudden death round (which defaults to 2 minutes long).</p>
<h5>mp_maxrounds</h5>
<p>The maximum number of <em>&#8220;rounds&#8221;</em> that one team can win before the server changes maps. A round is an entire game where the teams win or loose the game. For example, in a payload map a round is everything from the gates opening to the cart being pushed to the last point. In a CTF map a round is from the gates opening to the the point where the winning team has captured the intelligence three times.</p>
<h5>mp_winlimit</h5>
<p>This is the one that can really screw things up. How many <em>&#8220;game points&#8221;</em> can one team earn before the server changes the map. In CTF maps a point is 3 intel captures, in payload maps a point is earned every time the cart is pushed to a control point, or a single point is given to the defending team if the round ends without the cart reaching the end, and in control-point maps a point is earned when one team captures the final control point.</p>
<p>Setting this to zero (no limit) works best, especially if you have different maps in your rotation. If you set it to a real number, like 4, then you will find the server changing maps in the middle of a payload game.</p>
<h4>Voice settings</h4>
<p>These are again self-explanatory, <code>sv_voiceenable</code> is whether or not to support voice chat, and <code>sv_alltalk</code> defines if <em>AllTalk</em> is enabled. If AllTalk is set to 1 then everyone can hear everyone else, if it&#8217;s set to 0 then only team mates can hear each other over voice chat. Generally, players use voice chat for tactical information, so set this to 0 unless you have a good reason.</p>
<h3>Running the server process (the right way)</h3>
<p>Now that your Team Fortress 2 server is installed, configured and ready to go it&#8217;s time to start it up. You can do so by running the following command.</p>
<pre>./srcds_run -game tf +map ctf_2fort</pre>
<p>However, you probably want to be able to log out of your SSH session from time to time. So you will need to run srcds as a service. To do this we will use a shell script and the <a href="https://help.ubuntu.com/community/Screen" target="_blank">Screen</a> utility. Screen is a command line multitasking tool that will allow you execute the process and detach it from your current session. Start by installing screen.</p>
<pre>sudo aptitude install screen</pre>
<p>Now we&#8217;re going to create a script called &#8220;srcds&#8221; in the /etc/init.d folder that will let you start, restart and stop the server with a very simple command.</p>
<pre>sudo nano /etc/init.d/srcds</pre>
<p>Now paste the following script in the text editor. I cannot take credit for this script, but it works well. I got this script from the <a href="http://www.freenerd.net/index.php?title=Linux_SRCDS_server" target="_blank">Linux SRCDS server</a> article on FreeNerd.net. It&#8217;s worth a read since it covers a couple things I wont bother with in this article.</p>
<pre class="brush: bash; highlight: [2,8,12]; title: ; notranslate">
# replace  with the user you created above
SRCDS_USER=&quot;&quot;

# Do not change this path
PATH=/bin:/usr/bin:/sbin:/usr/sbin

# The path to the game you want to host. example = /home/newuser/dod
DIR=/home//orangebox
DAEMON=$DIR/srcds_run

# Change all PARAMS to your needs.
PARAMS=&quot;-game tf +map pl_badwater&quot;
NAME=SRCDS
DESC=&quot;source dedicated server&quot;

case &quot;$1&quot; in
	start)
		echo &quot;Starting $DESC: $NAME&quot;
		if [ -e $DIR ]; then
			cd $DIR
			su $SRCDS_USER -l -c &quot;screen -d -m -S $NAME $DAEMON $PARAMS&quot;
		else
			echo &quot;No such directory: $DIR!&quot;
		fi
		;;

	stop)
		if screen -ls |grep $NAME; then
			echo -n &quot;Stopping $DESC: $NAME&quot;
			kill `screen -ls |grep $NAME |awk -F . '{print $1}'|awk '{print $1}'`
			echo &quot; ... done.&quot;
		else
			echo &quot;Couldn't find a running $DESC&quot;
		fi
		;;

	restart)
		if screen -ls |grep $NAME; then
			echo -n &quot;Stopping $DESC: $NAME&quot;
			kill `screen -ls |grep $NAME |awk -F . '{print $1}'|awk '{print $1}'`
			echo &quot; ... done.&quot;
		else
			echo &quot;Couldn't find a running $DESC&quot;
		fi
		echo -n &quot;Starting $DESC: $NAME&quot;
		cd $DIR
		screen -d -m -S $NAME $DAEMON $PARAMS
		echo &quot; ... done.&quot;
		;;

	status)
		# Check whether there's a &quot;srcds&quot; process
		ps aux | grep -v grep | grep srcds_r &gt; /dev/null
		CHECK=$?
		[ $CHECK -eq 0 ] &amp;&amp; echo &quot;SRCDS is UP&quot; || echo &quot;SRCDS is DOWN&quot;
		;;

	*)
		echo &quot;Usage: $0 {start|stop|status|restart}&quot;
		exit 1
		;;
esac

exit 0
</pre>
<p style="padding-left: 30px;"><strong>UPDATE: I have created a <a href="https://github.com/stevenbenner/srcds-service" target="_blank">repository for this script on GitHub</a>. Please check there for the latest version. I would also appriciate it if you would submit issues and pull requests to help improve it!</strong></p>
<p>The highlighted lines are the important ones that you will need to modify. As the instructions say, replace &lt;newuser&gt; with the username that you will be running the service as. This will probably be your username unless you have taken the time to setup a hlds user (a good idea).</p>
<p>The <code>SRCDS_USER</code> variable is the appropriate username, the <code>DIR</code> variable needs to be the path to the orangebox folder and the <code>PARAMS</code> variable are the parameters that will be used when running the server.</p>
<p>Once you have added this script save it by pressing CTRL+X (quit nano) and then Y to save changes.</p>
<p>You can now control the server via the following commands:</p>
<pre>/etc/init.d/srcds start
/etc/init.d/srcds restart
/etc/init.d/srcds stop</pre>
<p>Depending on your setup you may need to sudo these.</p>
<h3>Installing mods</h3>
<p>For the most part, I do not recommend installing any game-play mods. Aside from the massive headaches and maintenance issues with outdated mods breaking servers (especially after game updates), Valve put a lot of thought in to TF2 game pacing and balance, and judging by their wild success they seem to have gotten it right. So, if it ain&#8217;t broke don&#8217;t fix it.</p>
<p>However, the rcon admin system is just plain bad. As a TF2 server admin you will at the very least want to run <a href="http://www.sourcemod.net/" target="_blank">SourceMod</a>. This srcds addon is a great administration tool and framework for other mods, you will find it to be an invaluable tool for managing your TF2 server.</p>
<p>SourceMod itself is a mod for the srcds mod framework <a href="http://www.metamodsource.net/" target="_blank">Metamod:Source</a>. So we will have to install that before anything else. This is pretty simple, just download the package and extract the contents to your game directory (orangebox/tf). This will add metamod to the addons folder. Metamod does not really require any configuration, once you have the files in the correct location it&#8217;s ready to go.</p>
<p>For a slightly more detailed walk-through check out the official guide: <a href="http://wiki.alliedmods.net/Installing_Metamod:Source" target="_blank">Installing Metamod:Source</a>.</p>
<p>Now you just need to install SourceMod on top of Metamod:Source. This is the same basic process, download the archive and extract the files you your orangebox/tf game directory. You should read the official guide for this as well: <a href="http://wiki.alliedmods.net/Installing_SourceMod" target="_blank">Installing SourceMod</a>.</p>
<p>Once you have all of the files in their correct locations then you have successfully installed SourceMod, the base admin tool and the framework for any other mod you could ever want. Restart the server and it should all be up and running.</p>
<h4>Adding SourceMod admins</h4>
<p>Before you start adding mods you should add yourself (and anyone else you want) as a SourceMod admin. This is quite easy. I personally use Steam IDs to authenticate people as administrators, this is reasonably secure so long as you are running the server with Steam enabled (which you should be).</p>
<p>Start by grabbing your Steam ID. You can easily get the Steam ID of anyone you want from the <a href="http://steamidfinder.com/" target="_blank">Steam ID Finder</a> if you know their name.</p>
<p>Now add them to the admin file. Open up orangebox/tf/addons/sourcemod/configs/admins_simple.ini and add the following to the end of the file:</p>
<pre>"STEAM_0:1:1234567"    "99:z"</pre>
<p>Of course replace the Steam ID with your real Steam ID. This will grant the person with this Steam ID all admin permissions with an immunity value of 99. The next time you join the server you will be able to use the <em>sm_admin</em> command in the console which will bring up a simple little admin menu in-game. You will also be able to use any other the other <a href="http://wiki.alliedmods.net/Admin_Commands_%28SourceMod%29" target="_blank">Admin Commands</a>.</p>
<p>It&#8217;s that simple, but it can get as complicated as you want. For more information on the admin format read the <a href="http://wiki.alliedmods.net/Adding_Admins_%28SourceMod%29" target="_blank">Adding Admins</a> guide.</p>
<h4>Adding mods/addons/plugins</h4>
<p>The <a href="http://forums.alliedmods.net/" target="_blank">AlliedModders forums</a> have basically every mod in existence. It would take another full article to explain the important ones and walk you though configuration, so I&#8217;ll just provide you with the basics.</p>
<p>Browse the <a href="http://forums.alliedmods.net/forumdisplay.php?f=108" target="_blank">SourceMod Approved Plugins</a> forum for mod you want to install. The thread will have all of the information you need to configure the mod.</p>
<p>Once you&#8217;ve found a mod you want download the mod and install the files in the appropriate locations. Generally the smx files belong in the orangebox/tf/addons/sourcemod/plugins folder and the configuration files belong in the orangebox/tf/addons/sourcemod/configs folder.</p>
<h3>Creating a MOTD</h3>
<div id="attachment_1144" style="width: 160px" class="wp-caption alignright"><a href="https://static.stevenbenner.name/wp-content/uploads/tf2_motd.jpg"><img class="size-thumbnail wp-image-1144" title="TF2 MOTD Screen" src="https://static.stevenbenner.name/wp-content/uploads/tf2_motd-150x150.jpg" alt="TF2 MOTD Screen" width="150" height="150" /></a><p class="wp-caption-text">TF2 MOTD Screen</p></div>
<p>The Message of the Day (MOTD) is the intro chalkboard screen you see when you join a server. It is an HTML document that runs in WebKit, so you can do just about anything you like here. Personally, I find the chalkboard look to be the most professional looking MOTD.</p>
<p>The Message of the Day page is located in the orangebox/tf folder as motd.txt. Here you can create your HTML page that will be shown to players who join your server.</p>
<p>I&#8217;m not going to try to teach you HTML or CSS, so I&#8217;ll simply provide you with the markup for a simple Message of the Day sample page.</p>
<h4>Example page markup</h4>
<pre class="brush: xml; title: ; notranslate">
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;
    &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
    &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
    &lt;title&gt;Welcome to the Server&lt;/title&gt;
    &lt;style type=&quot;text/css&quot;&gt;
        html, body {
            height: 100%;
            margin: 0;
            padding: 0;
            overflow: hidden;
            color: #ECECEC;
            font-family: Verdana;
        }
        img#bg {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
        }
        #content {
            position: relative;
            z-index: 1;
            margin: 0 auto;
        }
    &lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;img src=&quot;http://stevenbenner.com/misc/blackboard.png&quot; id=&quot;bg&quot; /&gt;
    &lt;div id=&quot;content&quot;&gt;
        &lt;h1&gt;My TF2 Server&lt;/h1&gt;
        &lt;p&gt;
            Welcome to my Team Fortress 2 server.
        &lt;/p&gt;
    &lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>This is a very basic motd screen. I don&#8217;t remember where I got the blackboard graphic, but kudos to whoever did it because it works on just about every resolution. Replace the &#8220;Welcome to My Team Fortress 2 server&#8221; text with whatever you want.</p>
<p>For more advanced layout you&#8217;re going to have to learn some HTML and CSS, Google is your best friend here. Don&#8217;t get too crazy though, if your motd is too long then no one will read it.</p>
<h3>Updating your server</h3>
<p>You will have to occasionally update the server software, whenever Valve releases updates to Steam or the game itself. This is a very simple task, in fact you&#8217;ve already done it before. We will be running the same two commands that we used to install the server.</p>
<p>The first thing you need to do is shut down the srcds process.</p>
<pre>/etc/init.d/srcds stop</pre>
<p>Next you&#8217;ll want to execute the Steam software, which will automatically check for updates, and update itself if it needs to.</p>
<pre>./steam</pre>
<p>Now you&#8217;ll need to have srcds check for TF2 updates.</p>
<pre>./steam -command update -game tf -dir .</pre>
<p>That&#8217;s it! Your Steam software and TF2 server software have been fully updated. Now you can start the srcds process again and get back to gaming.</p>
<pre>/etc/init.d/srcds start</pre>
<p>You&#8217;re server is now up and running with the latest updates.</p>
<h3>Attracting players</h3>
<div id="attachment_1143" style="width: 160px" class="wp-caption alignright"><a href="https://static.stevenbenner.name/wp-content/uploads/tf2_server_browser.png"><img class="size-thumbnail wp-image-1143" title="TF2 Server Browser" src="https://static.stevenbenner.name/wp-content/uploads/tf2_server_browser-150x150.png" alt="TF2 Server Browser" width="150" height="150" /></a><p class="wp-caption-text">TF2 Server Browser</p></div>
<p>This is a tough topic to address, getting players to join your new server can be very difficult, and frankly random. I don&#8217;t have a recipe for success to offer you because there just isn&#8217;t one. But here are some of the top things that will make your server more desirable to other TF2 players.</p>
<ul>
<li><strong>Have a good ping (&lt;50ms).</strong> This is one of the most important things that players will be looking for, a server with low latency will attract many more players than a server with a marginal ping. Of course a server with a terrible ping will never attract anyone because the experience of TF2 is lost on a laggy server.</li>
<li><strong>Choose a good name.</strong> It should stand out some, but be readable and advertise what makes your server worth playing on. Are you running special mods? Advertise them, not only to tell players what to expect, but to get people who are looking for those mods to notice. If you&#8217;re running custom maps you might want to say that as well. But you&#8217;re going to have to keep it fairly short, long names get truncated in the server browser.</li>
<li><strong>Find a good map rotation.</strong> It&#8217;s hard to define this, different players are looking for different things. Even today 2Fort seems to attract players (even though I find it fairly boring), but this is more of a personal choice. Pick maps that are actually fun to play on.</li>
<li><strong>Set the region code properly.</strong> This has become far more important with a recent TF2 update. Setting your region code correctly will allow players to filter by the right region to find your server.</li>
<li><strong>Get friends to help jump-start your server.</strong> The catch-22 of populating a server is that players tend to only join already populated servers. After all, who want&#8217;s to join a server with no one playing? If you have a few people (4-10) that you can coerce into playing on your server at the same time (during peak hours for your region) then you will see random people join. If your server keeps its low ping and stays lag free then it will fill up in no time.</li>
<li><strong>Participate, and foster a sense of community.</strong> Last, and possibly the most importing item, play on your server. Talk to people, make friends, encourage players and make them feel welcome. Kick and/or ban people who mic-spam (too much) or who stack teams. Make the server fun! And show players that there are admins who will keep the game experience smooth and entertaining.</li>
</ul>
<h3>Finding admins</h3>
<p>It is a simple fact, you cannot be on your server 24/7/365. You can make the server more self-sufficient with mods, but you will need other admins to help keep the peace and kick/ban offensive players. I can&#8217;t really help you find admins, but I can give some some bullet points to think about.</p>
<ul>
<li><strong>Do not give anyone rcon access.</strong> Only the system administrator (you) should know the rcon password. Anyone with the rcon password can do terrible things to your server.</li>
<li>Only give full admin permissions to someone you really trust, and only via the SourceMod admin feature. The SourceMod admin has everything necessary to be an admin.</li>
<li>The type of people you accept as admins will define the attitude of your server. Make sure their personality is the kind that you want to reflect your server.</li>
<li>Bad admins can literally ruin your server. They can ban everyone from the server, change the maps randomly and kill players on a whim.</li>
<li>Real life friends are almost always better choices for admin roles than online friends. But there are plenty of good internet people out there.</li>
<li>Look for players who frequent your server. The best admins will be the admins who spend a lot of time playing on your server.</li>
<li>Do not give admin roles to anyone under 21 years old. Yeah, there are good kids out there, but generally this is an excellent rule.</li>
</ul>
<p>Basically, be careful about giving out the admin role. Get to know someone (over voice chat) before you offer them an admin role. Good admins will be the single greatest addition to your server, bad admins will spell irrevocable doom.</p>
<h3>Conclusion</h3>
<p>It&#8217;s quite easy to setup a Team Fortress 2 server and keep it running. The hardest and most expensive part will be finding the right host or paying for the colocation at the right data center. If your server takes off and becomes successful you will be able to enjoy a gaming experience custom suited to your tastes. If you&#8217;re really lucky you can even offset the costs with donations.</p>
<p>If you&#8217;re planning on setting up your own TF2 server then hopefully this article has offered some helpful information and give you some food for thought. If you have any questions please leave a comment below and I&#8217;ll respond back asap.</p>
]]></content:encoded>
			<wfw:commentRss>https://stevenbenner.com/2010/11/how-to-set-up-a-team-fortress-2-dedicated-server-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>41</slash:comments>
		</item>
		<item>
		<title>Must have software for your Microsoft Windows computer</title>
		<link>https://stevenbenner.com/2010/09/must-have-software-for-your-microsoft-windows-computer/</link>
		<comments>https://stevenbenner.com/2010/09/must-have-software-for-your-microsoft-windows-computer/#comments</comments>
		<pubDate>Wed, 29 Sep 2010 10:10:29 +0000</pubDate>
		<dc:creator><![CDATA[Steven Benner]]></dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://stevenbenner.com/?p=991</guid>
		<description><![CDATA[Microsoft Windows is my operating system of choice, for many reasons. One of the best reasons is because of the wide array of software available for it. I&#8217;ve been a Windows user since Windows 3.1, before that I used MS DOS. Despite the many criticisms levied against the Windows operating system (many completely unfounded, many [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><em>Microsoft Windows</em> is my operating system of choice, for many reasons. One of the best reasons is because of the wide array of <em>software</em> available for it. I&#8217;ve been a Windows user since Windows 3.1, before that I used MS DOS.</p>
<p>Despite the many criticisms levied against the Windows operating system (many completely unfounded, many are very true) it is an excellent OS for casual users, home users, business users, gamers, software developers, graphics artists, etcetera, etcetera. Unfortunately most of the point is lost if you don&#8217;t know what software to install.</p>
<p>This is my personal list of must have software for your Microsoft Windows computer. When I set up a new computer every item on this list gets installed, and I can do everything that I want to do. This list is valid for Windows XP, Vista or 7.</p>
<p><span id="more-991"></span></p>
<h3>Internet applications</h3>
<table style="border: 0;">
<tbody>
<tr>
<td style="vertical-align: top;"><img class="size-full wp-image-1287" title="Firefox Logo" src="https://static.stevenbenner.name/wp-content/uploads/firefox_logo_small.png" alt="Firefox Logo" width="75" height="75" /></td>
<td>
<h4>Mozilla Firefox (web browser)</h4>
<p><a href="http://www.mozilla.com/firefox/" target="_blank"><em>www.mozilla.com/firefox/</em></a></p>
<p>In my humble opinion Firefox is still the best web browser available, for numerous reasons. It is a hugely popular and well supported browser, backed by a huge community of users and developers. The Mozilla team works very hard indeed to keep this browser updated with the latest technology and security.</p>
<p>Second choice: Google Chrome / Third choice: Opera</td>
</tr>
<tr>
<td style="vertical-align: top;"><img class="size-full wp-image-1289" title="Thunderbird Logo" src="https://static.stevenbenner.name/wp-content/uploads/thunderbird_logo_small.png" alt="Thunderbird Logo" width="75" height="75" /></td>
<td>
<h4>Mozilla Thunderbird (email client)</h4>
<p><a href="http://www.mozillamessaging.com/thunderbird/" target="_blank"><em>www.mozillamessaging.com/thunderbird/</em></a></p>
<p>Personally, I think the days of desktop email software are coming to an end, email web applications are getting better and better and don&#8217;t tie your mails to a single computer. However that system really only works well if you have to monitor one or two email addresses. Since I have several email accounts that I need to monitor I need an email reader that shows them all.</p>
<p>Thunderbird does this quite well. It&#8217;s not as smooth and refined as I would like, but it is still the best for this purpose, even when compared to commercial software like Outlook.</p>
<p>Second choice: Microsoft Outlook</td>
</tr>
<tr>
<td style="vertical-align: top;"><img class="alignnone size-full wp-image-1294" title="Trillian Logo" src="https://static.stevenbenner.name/wp-content/uploads/trillian_logo_small.png" alt="Trillian Logo" width="75" height="66" /></td>
<td>
<h4><del datetime="2011-05-22T05:57:16+00:00">Trillian Astra (instant messeger)</del></h4>
<p><del datetime="2011-05-22T05:57:16+00:00">Trillian from Cerulean Studios was the original all-in-one instant messaging software. It is powerful and flexible, but it has some quirks. Luckily Cerulean has a record of being a great company and the community for Trillian is excellent. I find it to be the best instant messenger client available.</del></p>
<p><strong>Update: Trillian 5 requires a pay subscription or it spams ads in your conversations. I am dropping this from my list. Trillian 4 is still good but unmaintained. I&#8217;m looking for a better IM client now.</strong></p>
<p>Second choice: Pidgin</td>
</tr>
<tr>
<td style="vertical-align: top;"><img class="alignnone size-full wp-image-1296" title="FileZilla Logo" src="https://static.stevenbenner.name/wp-content/uploads/filezilla_logo_small.png" alt="FileZilla Logo" width="75" height="75" /></td>
<td>
<h4>FileZilla (FTP and SFTP client)</h4>
<p><a href="http://filezilla-project.org/" target="_blank"><em>filezilla-project.org</em></a></p>
<p>I finally made the switch to FileZilla a couple years back when I needed a competent SFTP client and haven&#8217;t looked back. Nothing beats good old WS_FTP for pure simplicity and ease-of-use, but FileZilla has it beat by far once you need to use secure FTP.</p>
<p>Second choice: WS_FTP</td>
</tr>
<tr>
<td style="vertical-align: top;"><img class="alignnone size-full wp-image-1299" title="PuTTY Logo" src="https://static.stevenbenner.name/wp-content/uploads/putty_logo.png" alt="PuTTY Logo" width="75" height="75" /></td>
<td>
<h4>PuTTY (SSH terminal client)</h4>
<p><a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/" target="_blank"><em>www.chiark.greenend.org.uk/~sgtatham/putty/</em></a></p>
<p>The one and only shell client worth mentioning. It is hardly user-friendly, but if you need to use an SSH terminal there is no better choice. It is old, but very powerful and has a nice set of support utilities that enhance it even further.</td>
</tr>
<tr>
<td style="vertical-align: top;"><img class="alignnone size-full wp-image-1305" title="mIRC Logo" src="https://static.stevenbenner.name/wp-content/uploads/mirc_logo_small.png" alt="mIRC Logo" width="75" height="75" /></td>
<td>
<h4>mIRC (IRC client)</h4>
<p><a href="http://www.mirc.com/" target="_blank"><em>www.mirc.com</em></a></p>
<p>Yes, people still use IRC, and if you are one of those people then you already have mIRC installed. Listed because it is the obligatory IRC client.</td>
</tr>
<tr>
<td style="vertical-align: top;"><img class="alignnone size-full wp-image-1307" title="µTorrent Logo" src="https://static.stevenbenner.name/wp-content/uploads/utorrent_logo_small.png" alt="µTorrent Logo" width="75" height="75" /></td>
<td>
<h4>µTorrent (torrent client)</h4>
<p><a href="http://www.utorrent.com/" target="_blank"><em>www.utorrent.com</em></a></p>
<p>If you use torrents, then µTorrent is the software you should be using. It is by far the most advanced torrent software available and has every feature you could want. It also happens to be the lightest and fastest.</td>
</tr>
<tr>
<td style="vertical-align: top;"><img class="alignnone size-full wp-image-1311" title="Dropbox Logo Small" src="https://static.stevenbenner.name/wp-content/uploads/dropbox_logo_small.png" alt="Dropbox Logo Small" width="75" height="75" /></td>
<td>
<h4>Dropbox</h4>
<p><a href="http://www.dropbox.com/" target="_blank"><em>www.dropbox.com</em></a></p>
<p>File synchronization and sharing over the internet, it&#8217;s a simple idea, but for some reason Dropbox is the only one that seems to have gotten it right. I love this simple little tool. The free version is limited to 2GB (3GB with viral marking game) but I have yet to even come close to that limit.</td>
</tr>
</tbody>
</table>
<h3>Multimedia software</h3>
<table style="border: 0;">
<tbody>
<tr>
<td style="vertical-align: top;"><img class="alignnone size-full wp-image-1320" title="CCCP MPC Logo" src="https://static.stevenbenner.name/wp-content/uploads/cccp_mpc_logo_small.png" alt="CCCP MPC Logo" width="75" height="68" /></td>
<td>
<h4>CCCP w/ Media Player Classic Home Cinema (video player)</h4>
<p><a href="http://www.cccp-project.net/" target="_blank"><em>www.cccp-project.net</em></a></p>
<p>No, this isn&#8217;t some bolshevik plot, it&#8217;s the end all be all of video playback, <em>Media Player Classic</em> (MPC) with the <em>Combined Community Codec Pack</em> (CCCP). This one sleek little package includes everything you need to play (almost) any video file. I haven&#8217;t found one file in the last 3 years that MPC w/ CCCP can&#8217;t play. It has excellent support for just about every codec you&#8217;ll find, great support for subtitles, powerful rendering options and playback tweaks that can fix videos that got screwed up somewhere.</p>
<p>Second choice: VLC</td>
</tr>
<tr>
<td style="vertical-align: top;"><img class="alignnone size-full wp-image-1321" title="Foobar2000 Logo" src="https://static.stevenbenner.name/wp-content/uploads/foobar_logo_small.png" alt="Foobar2000 Logo" width="75" height="75" /></td>
<td>
<h4>foobar2000 (audio player)</h4>
<p><a href="http://www.foobar2000.org/" target="_blank"><em>www.foobar2000.org</em></a></p>
<p>I have grown to love foobar, but I will say it is not for everyone. Foobar2000 is a slimmed down audio player with a minimalistic interface. The lack of feature clutter makes it more powerful to me. But it is missing things that most normal people will want, like library sorting. If you want a more feature rich audio player then I have to recommend MediaMonkey, which I also love.</p>
<p>I use foobar2000 for my FLAC collection and MediaMonkey for my MP3 collection.</p>
<p>Alternate choice: MediaMonkey</td>
</tr>
<tr>
<td style="vertical-align: top;"><img class="alignnone size-full wp-image-1322" title="Photoshop Logo" src="https://static.stevenbenner.name/wp-content/uploads/photoshop_logo_small.png" alt="Photoshop Logo" width="75" height="75" /></td>
<td>
<h4>Adobe Photoshop (image editor)</h4>
<p><a href="http://www.adobe.com/products/photoshop/" target="_blank"><em>www.adobe.com/products/photoshop/</em></a></p>
<p>The one and only. Adobe Photoshop is the only image editor you should be using if you can help it or consider yourself at all professional. There have been many attempts made by other companies to compete with this juggernaut, but they have all failed because Adobe just keeps making this product better and better.</p>
<p>Second choice: Paint.NET</td>
</tr>
</tbody>
</table>
<h3>Software development tools</h3>
<table style="border: 0;">
<tbody>
<tr>
<td style="vertical-align: top;"><img class="alignnone size-full wp-image-1325" title="Visual Studio Logo" src="https://static.stevenbenner.name/wp-content/uploads/visual_studio_logo_small.png" alt="Visual Studio Logo" width="75" height="42" /></td>
<td>
<h4>Visual Studio 2010</h4>
<p><a href="http://www.microsoft.com/visualstudio/" target="_blank"><em>www.microsoft.com/visualstudio</em></a></p>
<p>If you intend to do any kind of Windows software development then Visual Studio is pretty much your only option. But just because it is hopelessly proprietary does not mean it&#8217;s bad, in fact Visual Studio is the single best IDE I have ever used for anything, and at this point I&#8217;ve used just about every popular IDE ever made.</p>
<p>Microsoft Visual Studio is so fluid, so intuitive, and so advanced that it simply sets the bar that all other IDEs have been have been hopelessly trying to reach. Once you get the rhythm, VS development is a real pleasure that nothing else can match.</td>
</tr>
<tr>
<td style="vertical-align: top;"><img class="alignnone size-full wp-image-1326" title="phpDesigner Logo" src="https://static.stevenbenner.name/wp-content/uploads/phpdesigner_logo_small.png" alt="phpDesigner Logo" width="75" height="75" /></td>
<td>
<h4>phpDesigner</h4>
<p><a href="http://www.mpsoftware.dk/phpdesigner.php" target="_blank"><em>www.mpsoftware.dk/phpdesigner.php</em></a></p>
<p>I was so happy to find a <a href="https://stevenbenner.com/2010/01/an-ide-for-php-that-doesnt-suck/">PHP IDE that doesn&#8217;t suck</a>. I had basically given up all hope of finding a decent (<em>non-Java</em>) PHP development tool. Then I discovered phpDesigner from MPSoftware and I suddenly found new faith in man kind.</p>
<p>This is an excellent IDE that almost compares with Visual Studio. It is smooth, fast and pretty intuitive. It has a primitive version of intellisense which isn&#8217;t terrible (unlike Aptana/failbeans/etc), and has reasonably smart formatting. There is some room for improvement but it blows all other PHP IDEs out of the water. Reasonably priced too.</td>
</tr>
<tr>
<td style="vertical-align: top;"><img class="alignnone size-full wp-image-1327" title="XAMPP Logo" src="https://static.stevenbenner.name/wp-content/uploads/xampp_logo_small.png" alt="XAMPP Logo" width="75" height="75" /></td>
<td>
<h4>XAMPP</h4>
<p><a href="http://www.apachefriends.org/en/xampp.html" target="_blank"><em>www.apachefriends.org/en/xampp.html</em></a></p>
<p>WAMP stack in a box with a simple Windows interface. I use this as a simple PHP/MySQL development environment and it does a magnificent job at it. Simply install and go, there is little to no configuration necessary to get a running dev server. Now I wouldn&#8217;t recommend it as a production server because server administration is supposed to be complicated (make the admin think about the config), however for a Windows/Apache/MySQL/PHP development environment, nothing competes with it&#8217;s simplicity.</td>
</tr>
</tbody>
</table>
<h3>Text tools</h3>
<table style="border: 0;">
<tbody>
<tr>
<td style="vertical-align: top;"><img class="alignnone size-full wp-image-1335" title="Notepad++ Logo" src="https://static.stevenbenner.name/wp-content/uploads/notepad++_logo.png" alt="Notepad++ Logo" width="75" height="75" /></td>
<td>
<h4>Notepad++ (text editor)</h4>
<p><a href="http://notepad-plus-plus.org/" target="_blank"><em>notepad-plus-plus.org</em></a></p>
<p>The single greatest text editor ever made, in my humble opinion. Notepad++ is aptly named for having all of the features of notepad, plus more, plus more than that. It has integrated code highlighting for just about every language ever made, collapsible code blocks, smart formatting, encoding selection, macros and support for custom plugins. It has an amazing feature set, lots of customizations and is extremely fast and stable.</p>
<p>The only features I&#8217;ve ever missed from Notepad++ is support for #region tags and the ability to open gigabyte files.</td>
</tr>
<tr>
<td style="vertical-align: top;"><img class="alignnone size-full wp-image-1337" title="WinMerge Logo" src="https://static.stevenbenner.name/wp-content/uploads/winmerge_logo.png" alt="WinMerge Logo" width="75" height="75" /></td>
<td>
<h4>WinMerge (text diff and merge)</h4>
<p><a href="http://winmerge.org/" target="_blank"><em>winmerge.org</em></a></p>
<p>WinMerge is the best text diff and merge software I&#8217;ve found yet. It&#8217;s difference mapping is amazing and very smart. I can tell when lines have moved in the document and even when pieces of text have moved within a line. The merge feature is very intuitive and easy to use.</p>
<p>Alternate choice: WinDiff</td>
</tr>
</tbody>
</table>
<h3>System protection and maintenance software</h3>
<table style="border: 0;">
<tbody>
<tr>
<td style="vertical-align: top;"><img class="alignnone size-full wp-image-1341" title="NOD32 Llogo" src="https://static.stevenbenner.name/wp-content/uploads/nod32_logo.png" alt="NOD32 Llogo" width="75" height="75" /></td>
<td>
<h4>NOD32 Antivirus (anti-virus software)</h4>
<p><a href="http://www.eset.com/" target="_blank"><em>www.eset.com</em></a></p>
<p>In my opinion NOD32 is the best anti-virus software available, period. It is fast, reliable and takes a fraction of the memory that other AV software require. The virus definitions are updated regularly and it&#8217;s web/email scanning is excellent. The combination of fast and extremely low miss rate make NOD32 a great choice for AV software.</td>
</tr>
<tr>
<td style="vertical-align: top;"><img class="alignnone size-full wp-image-1342" title="MyDefrag Logo" src="https://static.stevenbenner.name/wp-content/uploads/mydefrag_logo.png" alt="MyDefrag Logo" width="75" height="65" /></td>
<td>
<h4>MyDefrag (defragmenter)</h4>
<p><a href="http://www.mydefrag.com/" target="_blank"><em>www.mydefrag.com</em></a></p>
<p>Windows XP had a great defragmenter included with it. It wasn&#8217;t particularly feature rich, but it worked great and didn&#8217;t require any additional software. Unfortunately Microsoft ditched that app in Vista and it will never return. The defrag tool included with Windows Vista and Windows 7 is frankly terrible. It doesn&#8217;t give you any idea of how far it has progressed or what it is doing.</p>
<p>So, lets replace it with something that is actually good, MyDefrag. This utility gives you a lot more than just defragmenting file, it optimizes the data on the drive. Moving the the data to the outside of the disc where the rotational velocity is higher and transfer rates are fastest and sorting files on the disc. Suffice it to say that this is a very advanced defrag tool, and you should be using it.</p>
<p>Be sure to disable the default defrag tool (a scheduled item in Vista/7) because it will un-optimize the disc.</td>
</tr>
<tr>
<td style="vertical-align: top;"><img class="alignnone size-full wp-image-1343" title="CCleaner Logo" src="https://static.stevenbenner.name/wp-content/uploads/ccleaner_logo_small.png" alt="CCleaner Logo" width="75" height="75" /></td>
<td>
<h4>CCleaner (drive cleaner)</h4>
<p><a href="http://www.piriform.com/" target="_blank"><em>www.piriform.com</em></a></p>
<p>CCleaner <em>(a.k.a. Crap Cleaner)</em> is a hugely helpful tool for deleting all of the crap that you don&#8217;t need. It will clear out all of the regular crap that builds up in Windows as well as the crap that builds up in various applications that you may have installed. It has an excellent registry cleaner that will clear all of the crap registry entries that build up over time. And it give&#8217;s you tools for even more advanced maintenance.</td>
</tr>
<tr>
<td style="vertical-align: top;"><img class="alignnone size-full wp-image-1592" title="KeePass Logo" src="https://static.stevenbenner.name/wp-content/uploads/keepass_logo.gif" alt="KeePass Logo" width="75" height="75" /></td>
<td>
<h4>KeePass (secure password storage)</h4>
<p><a href="http://keepass.info/" target="_blank"><em>keepass.info</em></a></p>
<p>Secure passwords are too important to let your your brain create and store them, you will end up creating weak passwords and reusing passwords. That is where KeePass comes in to play. KeePass is a very secure password storage system and it has a very powerful password generator. I use it create and store all of my passwords. Just make sure to keep a backup of your database somewhere.</td>
</tr>
<tr>
<td style="vertical-align: top;"><img class="alignnone size-full wp-image-1344" title="TrueCrypt Logo" src="https://static.stevenbenner.name/wp-content/uploads/truecrypt_logo_small.png" alt="TrueCrypt Logo" width="75" height="75" /></td>
<td>
<h4>TrueCrypt (encryption)</h4>
<p><a href="http://www.truecrypt.org/" target="_blank"><em>www.truecrypt.org</em></a></p>
<p>Encryption, the right way, TrueCrypt is an incredibly powerful and well thought out data encryption utility. Is can encrypt individual files, folders, virtual drives and even whole hard drives. It can use several different encryption algorithms and even layered combination of those encryption algorithms.</td>
</tr>
</tbody>
</table>
<h3>Miscellaneous</h3>
<table style="border: 0;">
<tbody>
<tr>
<td style="vertical-align: top;"><img class="alignnone size-full wp-image-1350" title="Microsoft Office Logo" src="https://static.stevenbenner.name/wp-content/uploads/microsoft_office_logo_small.png" alt="Microsoft Office Logo" width="72" height="75" /></td>
<td>
<h4>Microsoft Office 2010 (word processing &amp; spreadsheets)</h4>
<p><a href="http://office.microsoft.com/" target="_blank"><em>office.microsoft.com</em></a></p>
<p>The standard business productivity suite, Microsoft Office is something everyone involved with any kind of business simply must have. Documents, spreadsheets, presentations and email. Some people say OpenOffice is just as good, but that simply isn&#8217;t true. While it&#8217;s close it lacks complete compatibility with the Microsoft proprietary formats. If you need to be able to share documents with people who use Microsoft Office then you need MS Office.</p>
<p>After all, Microsoft Office apps are really good at what they do. Excel spreadsheets and Word documents are powerful, easy to create and can look really good if you know how to do some layout. They print very well and integrate with Windows.</td>
</tr>
<tr>
<td style="vertical-align: top;"><img class="alignnone size-full wp-image-1351" title="7zip Logo" src="https://static.stevenbenner.name/wp-content/uploads/7zip_logo_small.png" alt="7zip Logo" width="75" height="66" /></td>
<td>
<h4>7Zip (archiving and compression)</h4>
<p><a href="http://www.7-zip.org/" target="_blank"><em>www.7-zip.org</em></a></p>
<p>The free file archiving software. At this point all of the popular zip file tools are pretty much at the same level as far as features, file compatibility and interface, so just use the free one. WinRAR has an old clunky interface, but is still quite good. And of course WinZIP is still the stalwart in the industry, but aside from the nicer interface doesn&#8217;t have any features to set it apart from the rest.</p>
<p>Alternate choice: WinRAR</td>
</tr>
<tr>
<td style="vertical-align: top;"><img class="alignnone size-full wp-image-1361" title="Rainmeter Logo" src="https://static.stevenbenner.name/wp-content/uploads/rainmeter_logo.png" alt="Rainmeter Logo" width="75" height="68" /></td>
<td>
<h4>Rainmeter (resource monitor)</h4>
<p><a href="http://rainmeter.net/" target="_blank">rainmeter.net</a></p>
<p>This software has almost nothing to do with rain, although it can display the weather. Rainmeter is an awesome system monitor and feed consuming piece of software. It has support for skins (of which there have been countless masses created) and is extremely customizable. I run a very minimalistic resource monitor setup on all of my systems. It gives me at-a-glance status of CPU, RAM, network traffic, drive utilization and system uptime.</td>
</tr>
<tr>
<td style="vertical-align: top;"><img class="alignnone size-full wp-image-1362" title="Input Director Logo" src="https://static.stevenbenner.name/wp-content/uploads/input_director_logo.png" alt="Input Director Logo" width="75" height="75" /></td>
<td>
<h4>Input Director (software KVM)</h4>
<p><a href="http://www.inputdirector.com/" target="_blank">www.inputdirector.com</a></p>
<p>For those of us who have multiple (Windows) computers at our desk Input Director is the single greatest app ever made. It allows you to move your mouse across to the next computer and completely interface with it, without the need for a second keyboard and mouse. This tool gives you amazing multitasking power.</p>
<p>Second choice: Synergy</td>
</tr>
<tr>
<td style="vertical-align: top;"><img class="alignnone size-full wp-image-1352" title="Process Explorer Logo" src="https://static.stevenbenner.name/wp-content/uploads/process_explorer_logo.png" alt="Process Explorer Logo" width="75" height="67" /></td>
<td>
<h4>Process Explorer</h4>
<p><a href="http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx" target="_blank">technet.microsoft.com/en-us/sysinternals/bb896653.aspx</a></p>
<p>You will probably never have a need for this tool, but the one time that you do need it Process Explorer is the only tool that will work. Process Explorer is part of the Windows Sysinternals suite from Microsoft and gives you detailed information about the various processes running on your computer.</td>
</tr>
<tr>
<td style="vertical-align: top;"><img class="alignnone size-full wp-image-1593" title="Core Temp Logo" src="https://static.stevenbenner.name/wp-content/uploads/core_temp_logo.png" alt="Core Temp Logo" width="75" height="75" /></td>
<td>
<h4>Core Temp</h4>
<p><a href="http://www.alcpu.com/CoreTemp/" target="_blank"><em>www.alcpu.com/CoreTemp/</em></a></p>
<p>If you want to check the temperature of your CPU outside of the BIOS you will need a temperature probe or Core Temp. Well there are actually several software options, but I prefer Core Temp because it is the most compatible (even working on my old FX-51) and seems to have the most accurate guesses about <em>Tj.Max</em> (the rarely disclosed max temp processors report against).</p>
<p><strong>Update: Be sure to download the standalone version! The normal installer uses the InstallIQ software, which is so well known as being used for adware that NOD32 will flag the file.</strong></td>
</tr>
</tbody>
</table>
<h3>Am I missing anything?</h3>
<p>This is my personal software list, and it&#8217;s ever changing. But maybe I&#8217;m forgetting something important.</p>
<p>What&#8217;s on your must-have software list?</p>
]]></content:encoded>
			<wfw:commentRss>https://stevenbenner.com/2010/09/must-have-software-for-your-microsoft-windows-computer/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
		<item>
		<title>Will the really real programmers please stand up?</title>
		<link>https://stevenbenner.com/2010/08/will-the-really-real-programmers-please-stand-up/</link>
		<comments>https://stevenbenner.com/2010/08/will-the-really-real-programmers-please-stand-up/#comments</comments>
		<pubDate>Thu, 12 Aug 2010 18:00:56 +0000</pubDate>
		<dc:creator><![CDATA[Steven Benner]]></dc:creator>
				<category><![CDATA[Desktop Development]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Opinion]]></category>
		<category><![CDATA[Rants]]></category>

		<guid isPermaLink="false">http://stevenbenner.com/?p=1156</guid>
		<description><![CDATA[How do you define a real programmer? There are many facets that you can use to judge someone&#8217;s skill as a programmer: ability, experience, enthusiasm, dedication, etc. But I recently read an article by RethinkDB blogger Slava, and he boils all of these points down to one item, memorization. Some people agree with this idea, [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>How do you define a real programmer? There are many facets that you can use to judge someone&#8217;s skill as a programmer: ability, experience, enthusiasm, dedication, etc. But I recently read <a href="http://www.rethinkdb.com/blog/2010/06/will-the-real-programmers-please-stand-up/" target="_blank">an article</a> by RethinkDB blogger Slava, and he boils all of these points down to one item, memorization. Some people agree with this idea, but I do not, at all.</p>
<p>I have heard several companies bragging about having interview scripts like this, saying that this kind of testing is the most effective way to filter out unqualified applicants. However I think that the post by Slava perfectly demonstrates just how flawed this concept is. If there is one thing you should have learned in school, it&#8217;s that standardized tests are a terrible metric for gauging skill or intelligence.</p>
<p>But more to the point, I think that this is the wrong way to define a real programmer. Allow me to present you with my definition of a real programmer.</p>
<p><span id="more-1156"></span></p>
<h3>What is a real programmer?</h3>
<p>This comes from one of my favorite quotes in all of history:</p>
<blockquote><p>&#8220;Real knowledge is to know the extent of ones ignorance&#8221; &#8211; Confucius</p></blockquote>
<p>Having an encyclopedic knowledge of a college curriculum is not required to be a great programmer. Real world software development isn&#8217;t about memorizing low-level  programming techniques, or math formulas. These are great tools to have at your disposal, but are certainly not the end-all-be-all of development. It&#8217;s all about problem solving, in  the most efficient and elegant way that circumstances allow.</p>
<p>As a programmer you will be supplied with problems every day, and it&#8217;s your job to figure out how to solve these problems. To do this you need to know what your language of choice is capable of, this comes with experience. You will also need to be able to look at the possible solutions and pick the best one for the situation at hand.</p>
<p>Now here&#8217;s the fact that breaks the machine, you do not know every possible solution for every problem, <em>and you never will</em>. I don&#8217;t care how experienced you are, how much education you have had, or how many millions of lines of code you have written, because there are so many possible ways to approach the practical problems you find in software development that it is literally impossible to know everything. So you need to have a mix of creativity and resources that let you <em>learn</em> how to solve new problems.</p>
<p>Real programmers are the ones who can learn fast, and learn by doing.  These are the people who constantly strive to keep up with the  technology they love. They have ample real world experience building,  learning and growing their craft, but know that they still don&#8217;t know everything.</p>
<p>In short the defining characteristic of real programmers is that <strong>they never stop learning</strong>.</p>
<h3>My experience with real programmers</h3>
<p>I&#8217;ve worked as a peon coder, link-in-the-chain guy, I&#8217;ve worked as a manager who did the hiring and firing, I&#8217;ve worked as a one-man-shop serving milti-billion dollar corporations, and I&#8217;ve worked as a solo freelancer. This experience has taught me two things:</p>
<ol>
<li>I am not the greatest programmer in the world, despite what my website says, and</li>
<li>That you can rarely tell a good programmer from a bad one by the resume, or the interview.</li>
</ol>
<p>I&#8217;ve seen guys with terrible resumes turn out to be so far above my level that I still have them on my guru list, and I&#8217;ve seen guys with amazing resumes who couldn&#8217;t grasp even the most basic concepts.</p>
<h3>How to find a real programmer</h3>
<p>It is true that there is often a gap between what candidates say they can do and what they&#8217;re really capable of. That is why testing candidates is still a very good idea, but you need to test for higher level skills and abilities. Testing a candidate&#8217;s knowledge on obscure techniques and patterns means passing off great people for not remembering stuff that they simply do not  need to be top notch coders.</p>
<p>In my experience, it is very easy to separate the wheat from the chaff: go through the normal interview process to see if this is a person you can work with (and let&#8217;s face it, that&#8217;s all that the interview is really for). Then give them a small project, something realistic that resembles what their real work would be like, and send them home. Not a knowledge test, but a real &#8220;build something that does this&#8221; task.</p>
<p>When you get the finished result of their labor you will know if you&#8217;ve got the real deal. Is it done the way you would have expected (or better)? Is it high quality, showing some love some thought? Did they get it back to you reasonably quickly? Did they do anything cool to show off? If so, congratulations! You&#8217;ve just found a great programmer!</p>
<h3>code_by_google != bad_programmer</h3>
<p>Yes, they could have just coded by Google. But you know what? That shows  they can learn and adapt. I have plenty of respect for a person who doesn&#8217;t immediately know how to accomplish a complex task, but can quickly find out how and do it on their own without bothering the other programmers on your team.</p>
<p>Remember the key point of my real programmers definition, <em>they never stop learning</em>. Google is the greatest programming resource that has ever existed. You cannot look down on someone for using the most powerful learning tool computer science has ever known. I would go so far as to say knowing how to code by Google is the single most important skill in a programmers tool box, because if you want to grow as a programmer this is going to be the tool to use.</p>
<p>Someone who knows how to search for code examples and how to learn from the work of others will be more or less self-sufficient. They can learn and grow their skills on their own without needing someone else to do it for them. The ability to learn and grow your knowledge is the single most important skill for any developer. Without the ability to grow you will find yourself quickly deprecated.</p>
<p>I do expect people to know how to use the language and/or framework they were hired to work in, but I judge them primarily based on the work they submit. A guy who can figure out how to do things that he doesn&#8217;t know how to do, on his own, on the fly, is a real programmer.</p>
<h3>The catch-22 of impossibly high standards</h3>
<p>Of course it&#8217;s pretty absurd to require knowledge that 99% of programmers  have absolutely no need for in real life. But perhaps you don&#8217;t entirely know why. If you have very strict hiring standards then you are only going  to find people who match your specific model, and your code will suffer  because of this.</p>
<p>Computer science grows at a fantastical rate, every day  there is another small innovation that someone came up with. This small innovation will  slowly propegate out to the rest of the programming community and become part of everyone&#8217;s toolbox. This happens because  some creative programmer tried some alternative idea and found a new way to solve a problem.</p>
<p>If your team consists entirely of people with  the same background, skills and knowledge then your creativity bucket  will be quite small. This means you will not see as much innovation as a  varied team with people asking questions that wouldn&#8217;t normally be  asked, and people offering solutions that wouldn&#8217;t normally be offered.</p>
<p>Most alternative idea&#8217;s will, of course, be immediately shot down. But that one in a hundred that actually sticks will give your team an advantage. This alternative idea has given a level of innovation to your project that would not have existed if you didn&#8217;t have a radical element thinking in a unique way.</p>
<h3>Get real</h3>
<p>This was a rather long-winded rant, but let me sum it up in a few nice bullet points.</p>
<ul>
<li>People who are more interested in the buzz words and CS theory than actual experience and a history of practical application of skills are a perpetual thorn in the side of the programming industry.</li>
<li>Don&#8217;t look down on other programmers because they don&#8217;t fit your model definition of a programmer, they just might be better than you.</li>
<li>If 99 out of 100 candidates fail your interview then you are looking for something that doesn&#8217;t exist.</li>
<li>Without a varied group of developers in your team you will suffer from a lack of creativity.</li>
<li>Don&#8217;t test a CS curriculum, test the ability to create.</li>
<li>If you ever finish learning, then your career as a programmer is over. Go study law.</li>
</ul>
<h4>In short</h4>
<p>Look for someone who truly understand the concepts, who can offer creative and alternative ideas, and who shows the ability to grow as a programmer. Then you will finally find a <em>real programmer</em>.</p>
]]></content:encoded>
			<wfw:commentRss>https://stevenbenner.com/2010/08/will-the-really-real-programmers-please-stand-up/feed/</wfw:commentRss>
		<slash:comments>74</slash:comments>
		</item>
		<item>
		<title>The 5 types of programmers</title>
		<link>https://stevenbenner.com/2010/07/the-5-types-of-programmers/</link>
		<comments>https://stevenbenner.com/2010/07/the-5-types-of-programmers/#comments</comments>
		<pubDate>Sun, 18 Jul 2010 22:11:45 +0000</pubDate>
		<dc:creator><![CDATA[Steven Benner]]></dc:creator>
				<category><![CDATA[Desktop Development]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Opinion]]></category>

		<guid isPermaLink="false">http://stevenbenner.com/?p=1163</guid>
		<description><![CDATA[In my code journeys and programming adventures I&#8217;ve encountered many strange foes, and even stranger allies. I&#8217;ve identified at least five different kinds of code warriors, some make for wonderful comrades in arms, while others seem to foil my every plan. However they all have their place in the pantheon of software development. Without a [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>In my code journeys and programming adventures I&#8217;ve encountered many strange foes, and even stranger allies. I&#8217;ve identified at least five different kinds of code warriors, some make for wonderful comrades in arms, while others seem to foil my every plan.</p>
<p>However they all have their place in the pantheon of software development. Without a healthy mix of these different programming styles you&#8217;ll probably find your projects either take too long to complete, are not stable enough or are too perfect for humans to look upon.</p>
<p><span id="more-1163"></span></p>
<h3>The duct tape programmer</h3>
<p><em><img class="alignright size-thumbnail wp-image-1165" title="Duct Tape" src="https://static.stevenbenner.name/wp-content/uploads/ducttape-150x150.png" alt="Duct Tape" width="150" height="150" srcset="https://static.stevenbenner.name/wp-content/uploads/ducttape-150x150.png 150w, https://static.stevenbenner.name/wp-content/uploads/ducttape.png 200w" sizes="(max-width: 150px) 100vw, 150px" />The code may not be pretty, but damnit, it works!</em></p>
<p>This guy is the foundation of your company. When something goes wrong he will fix it fast and in a way that won&#8217;t break again. Of course he doesn&#8217;t care about how it looks, ease of use, or any of those other <em>trivial</em> concerns, but he will make it happen, without a bunch of talk or time-wasting nonsense. The best way to use this person is to point at a problem and walk away.</p>
<h3>The OCD perfectionist programmer</h3>
<p><em><img class="alignright size-thumbnail wp-image-1169" title="Perfection" src="https://static.stevenbenner.name/wp-content/uploads/perfection-150x150.png" alt="Perfection" width="150" height="150" srcset="https://static.stevenbenner.name/wp-content/uploads/perfection-150x150.png 150w, https://static.stevenbenner.name/wp-content/uploads/perfection.png 300w" sizes="(max-width: 150px) 100vw, 150px" />You want to do what to my code?</em></p>
<p>This guy doesn&#8217;t care about your deadlines or budgets, those are insignificant when compared to the art form that is programming. When you do finally receive the finished product you will have no option but submit to the stunning glory and radiant beauty of perfectly formatted, no, perfectly beautiful code, that is so efficient that anything you would want to do to it would do nothing but defame a masterpiece. He is the only one qualified to work on his code.</p>
<h3>The anti-programming programmer</h3>
<p><em><img class="alignright size-thumbnail wp-image-1171" title="Anti-Programming" src="https://static.stevenbenner.name/wp-content/uploads/antiprogramming-150x150.png" alt="Anti-Programming" width="150" height="150" srcset="https://static.stevenbenner.name/wp-content/uploads/antiprogramming-150x150.png 150w, https://static.stevenbenner.name/wp-content/uploads/antiprogramming.png 300w" sizes="(max-width: 150px) 100vw, 150px" />I&#8217;m a programmer, damnit. I don&#8217;t write code.</em></p>
<p>His world has one simple truth; writing code is bad. If you have to write something then you&#8217;re doing it wrong. Someone else has already done the work so just use their code. He will tell you how much faster this development practice is, even though he takes as long or longer than the other programmers. But when you get the project it will only be 20 lines of actual code and will be very easy to read. It may not be very fast, efficient, or forward-compatible, but it will be done with the least effort required.</p>
<h3>The half-assed programmer</h3>
<p><em><img class="alignright size-thumbnail wp-image-1173" title="Half-assed" src="https://static.stevenbenner.name/wp-content/uploads/halfassed-150x150.png" alt="Half-assed" width="150" height="150" srcset="https://static.stevenbenner.name/wp-content/uploads/halfassed-150x150.png 150w, https://static.stevenbenner.name/wp-content/uploads/halfassed.png 300w" sizes="(max-width: 150px) 100vw, 150px" />What do you want? It works doesn&#8217;t it?</em></p>
<p>The guy who couldn&#8217;t care less about quality, that&#8217;s someone elses job. He accomplishes the tasks that he&#8217;s asked to do, quickly. You may not like his work, the other programmers hate it, but management and the clients love it. As much pain as he will cause you in the future, he is single-handedly keeping your deadlines so you can&#8217;t scoff at it (no matter how much you want to).</p>
<h3>The theoretical programmer</h3>
<p><em><img class="alignright size-thumbnail wp-image-1174" title="Theoretical" src="https://static.stevenbenner.name/wp-content/uploads/theoretical-150x150.png" alt="Theoretical" width="150" height="150" srcset="https://static.stevenbenner.name/wp-content/uploads/theoretical-150x150.png 150w, https://static.stevenbenner.name/wp-content/uploads/theoretical.png 300w" sizes="(max-width: 150px) 100vw, 150px" />Well, that&#8217;s a possibility, but in practice this might be a better alternative.</em></p>
<p>This guy is more interested the options than what should be done. He will spend 80% of his time staring blankly at his computer thinking up ways to accomplish a task, 15% of his time complaining about unreasonable deadlines, 4% of his time refining the options, and 1% of his time writing code. When you receive the final work it will always be accompanied by the phrase &#8220;if I had more time I could have done this the right way&#8221;.</p>
<h3>Where do you fit?</h3>
<p>Personally, I&#8217;d have to classify myself as the perfectionist. So, which type of programmer are you? Or perhaps you know another programming archetype that is missing from my list? Post a comment below and I&#8217;ll add it to a new updated list.</p>
]]></content:encoded>
			<wfw:commentRss>https://stevenbenner.com/2010/07/the-5-types-of-programmers/feed/</wfw:commentRss>
		<slash:comments>292</slash:comments>
		</item>
		<item>
		<title>Setting up an Ubuntu LAMP server. Part 1: Initial setup</title>
		<link>https://stevenbenner.com/2010/06/setting-up-an-ubuntu-lamp-server-part-1-initial-setup/</link>
		<comments>https://stevenbenner.com/2010/06/setting-up-an-ubuntu-lamp-server-part-1-initial-setup/#comments</comments>
		<pubDate>Sun, 27 Jun 2010 23:23:43 +0000</pubDate>
		<dc:creator><![CDATA[Steven Benner]]></dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[LAMP]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://stevenbenner.com/?p=1074</guid>
		<description><![CDATA[This will be the first part in a new series of articles about setting up your own Ubuntu LAMP (Linux, Apache, MySQL, PHP) server. If you are already proficient with Linux and/or Ubuntu then you can skip this first part because it is just about the basic post-install set up and configuration. For those of [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>This will be the first part in a new series of articles about setting up your own <em>Ubuntu</em> LAMP <em>(Linux, Apache, MySQL, PHP)</em> server. If you are already proficient with Linux and/or Ubuntu then you can skip this first part because it is just about the basic post-install set up and configuration. For those of us who haven&#8217;t set up an Ubuntu system a hundred times over, here is the quick and dirty base Ubuntu set up guide.</p>
<p>Once you have your Ubuntu operating system installed there are still a few things you need to do to get it ready for prime time. A fresh install of Ubuntu will have a root account (you chose the password during installation) and the SSH server running. At the moment my recommendation for version is <em>10.04 LTS</em>.</p>
<p>Without further ado, lets get this show on the road. Start by connecting to your system via SSH and logging in to the root account. (For Windows users I recommend <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/" target="_blank">PuTTY</a> as an SSH client)</p>
<p><span id="more-1074"></span></p>
<h3>Create your account</h3>
<p>The first thing to do is to create your account. Logging in as root is bad and you should never do it after you create a personal account. Create a new account with the <em>adduser</em> command.</p>
<pre>adduser steve</pre>
<p>Of course use whatever name you like for your account. It will ask you for various pieces of account information, all of which is optional except for the password. Be sure to use a strong password, this is the single most important piece of security for the entire system. If you choose a dictionary word for your password then it is almost inevitable that sooner or later, someone will find it and destroy your server.</p>
<h3>Give your new account sudo access</h3>
<p>The reason you never have to log in as root is because your account will have super-user access via the <em>sudo</em> command. Sudo will let you execute other commands at nearly the same level as the root account. Open the sudo configuration file with the <em>visudo</em> command.</p>
<pre>visudo</pre>
<p>This will open a text file, at the bottom of that file add the following line (replacing &#8220;steve&#8221; with your account name).</p>
<pre>steve ALL=(ALL) ALL</pre>
<p>Now save the file and exit the text editor. Chances are this file was opened in <em>nano</em>, so you exit by hitting CTRL+X on your keyboard. It will ask you if you want to save the changes, say yes by typing &#8220;y&#8221; and hitting the enter key.</p>
<h3>Configure the SSH server</h3>
<p>We need to add your new account to the SSH server so you can log in under that name. We will also do a couple minor tweaks to make the server much more secure. Nothing too advanced, just enough to get your SSH of the easy attack list. Open the SSH server configuration file in <em>nano</em>.</p>
<pre>nano /etc/ssh/sshd_config</pre>
<p>Here are the thing we need to do in this file:</p>
<ul>
<li><strong>Change the port to something other than 22.</strong> If you leave SSH running on port 22 it will constantly be under attack by botnets and hackers that try to find SSH logins for every IP on the internet. This little trick will save you from millions of automated hack attempts.</li>
<li><strong>Disable root login.</strong> We do not want anyone (even you) to be able to SSH in as root. It is a huge security risk because root can do anything to the system.</li>
<li><strong>Disable X11Forwarding.</strong> X11Forwarding is another security risk for numerous reasons. You simply don&#8217;t need it so disable it.</li>
<li><strong>Add your account to the list of users that can SSH in.</strong> The SSH server will only allow the log in of accounts that are added to the configuration file.</li>
</ul>
<p>First and foremost, lets make sure your new account can log in via SSH. Add the following line to the file (I usually just add this at the bottom).</p>
<pre>AllowUsers steve</pre>
<p>Again, replace &#8220;steve&#8221; with your account name.</p>
<p>Now for the security stuff. Find the following config statements and update them accordingly:</p>
<pre>Port 12345
PermitRootLogin no
X11Forwarding no</pre>
<p><strong>Remember your port number!</strong> You will need it to SSH in to your server again.</p>
<p>Use any port number you like, I would recommend 4 or 5 digits because port sniffers start at 1 and scan up from there. So a large number will take much longer to find. This will thwart most lazy port sniffers. Do not use any of the standard service ports (e.g. 23, 24, 25, 80, etc). For a list of standard port numbers check out this <a href="https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers" target="_blank">Wikipedia list</a>. Basically any port number greater than 1024 should be okay to use. For better security use something 10000 or above.</p>
<p>Now reload the SSH server by entering the following command:</p>
<pre>/etc/init.d/ssh reload</pre>
<p>Now you can logout and log back in using your new account.</p>
<pre>logout</pre>
<p>SSH back in to your server and log in with your new account. You should now be logged in as yourself in your home directory. For now on when you need to execute something that requires <em>super-user</em> permissions you will do so via the <em>sudo</em> command.</p>
<h3>Update all of the installed software</h3>
<p>The next step is to get all of the software on your system up to date. This is one of the best things about running Ubuntu, updates are incredibly easy using the <em>aptitude</em> tool. Frankly, this is even easier than Windows Update, and far more reliable.</p>
<p>Update the packages list with the following command:</p>
<pre>sudo aptitude update</pre>
<p>This grabs all of the latest package information from the Ubuntu servers for everything you have installed.</p>
<p>Note that when you use sudo it will ask for your password. This is just the password for your account login. It will save your sudo session for a few minutes, so if you need to execute several sudo commands it will only ask for your password the first time you run it.</p>
<p>Now you can upgrade everything that needs updates with the <em>safe-upgrade</em> command.</p>
<pre>sudo aptitude safe-upgrade</pre>
<p>It will list all of the packages (programs) that it wants to update and ask if you want to proceed. Enter &#8220;y&#8221; for yes and hit enter. The aptitude program will automatically download and upgrade everything that needs to be updated.</p>
<p>You should do this as often as possible, once or twice a week is more than enough if you&#8217;re anal about keeping everything updated with the latest fixes and security updates.</p>
<h3>Switch to key-based SSH login</h3>
<p>It&#8217;s always a good idea to setup SSH to use key pairs to handle logins. This is a huge boost to security because it basically becomes impossible for an attacker to brute-force their way in via SSH.</p>
<p>The idea here is that instead of using a password to login to your account on the server your SSH client will prove to the server that you are in possession of the private key. The way this works (in SSH2) is that the SSH client will cryptographically sign a challenge from the server with the private key, then the server will verify that message with the public key.  If you&#8217;re interested you can find a more detailed and technical explanation in <a href="http://tools.ietf.org/html/rfc4252" target="_blank">RFC 4252</a>.</p>
<p>Note that these instructions are targeted towards Windows users, because that&#8217;s what I use.</p>
<h4>Generate the public/private key pair.</h4>
<p>For Windows users you will use the <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html" target="_blank">PuTTYgen</a> utility to generate you keys. Open up PuTTYgen and create a new SSH-2 RSA key pair. The key can be however big you want, but 1024 bits is fine. If you feel compelled to increase it then change it to be a 2048 bit or <a href="https://xkcd.com/538/" target="_blank">4096 bit</a> key. Make sure you set a password on it, and make sure that it&#8217;s a password that you will never forget. Then save the public and private keys to your system.</p>
<p><strong>DO NOT LOSE THE PRIVATE KEY!</strong> If you lose your private key after switching to key-based logins then you will never be able to login to your server again, <em>ever</em>. There is no way to recover from this unless you have physical access to the machine or your host has a back-door in.</p>
<p>Make sure it is backed up in a safe place. Make sure it is backed up in multiple safe places.</p>
<h4>Save the public key on the server</h4>
<p>Now you need to give the server your public key. This public key will need to be stored in the ~/.ssh/authorized_keys file. This file will not exists in a freshly installed system so you will need to first create the file, then add your private key to that file (do not sudo these commands!).</p>
<pre>mkdir ~/.ssh
nano ~/.ssh/authorized_keys</pre>
<p>Now you are viewing the new authorized keys file. Here you will enter &#8220;ssh-rsa&#8221;, then paste the private key string, then add &#8220;user@hostname&#8221; to the end. It should look something like this:</p>
<pre>ssh-rsa AAAAB3NzaC..........lots more...........6URYr15Xapm2+4sU8= steve@hostname</pre>
<p>Now you need to make sure the directory and the file have the correct permissions. SSH is very picky about the user and permissions on the file and directory. The .ssh directory and the authorized_keys file must be owned by the user they reference, and the permissions have to be 700 for the folder and 600 for the file.</p>
<pre>chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys</pre>
<h4>Setup PuTTY to use the private key to login</h4>
<p>Now you need to tell PuTTY about your private key. This is actually really simple, go to the Connections-&gt;SSH-&gt;Auth options and select the private key file.</p>
<p><img class="aligncenter size-full wp-image-1621" alt="PuTTY Private Key Config" src="https://static.stevenbenner.name/wp-content/uploads/putty-private-key.png" width="466" height="448" srcset="https://static.stevenbenner.name/wp-content/uploads/putty-private-key.png 466w, https://static.stevenbenner.name/wp-content/uploads/putty-private-key-300x288.png 300w" sizes="(max-width: 466px) 100vw, 466px" /></p>
<p><strong>VERIFY THAT YOU CAN LOGIN WITH ONLY THE KEY!</strong> Now make sure that you can successfully login with the private key. You should have to enter a password for the private key, but not to log in.</p>
<h4>Disable password-based logins.</h4>
<p>Now that you have verified that you can login with your private key and everything is working it&#8217;s time to shut down the ability to login with a password.</p>
<pre>sudo nano /etc/ssh/sshd_config</pre>
<p>Now change the PaswordAuthentication and UsePAM settings to &#8220;no&#8221;.</p>
<pre>PasswordAuthentication no
UsePAM no</pre>
<p>And then restart the SSH server.</p>
<pre>sudo service ssh restart</pre>
<p>And that&#8217;s it. Once you log out you will never be able to login again without the private key in your possession (unless you re-enable password logins).</p>
<h3>Install the base software</h3>
<p>This is an optional step, but it is worth adding because a majority of people will need these packages anyway. There are a couple software packages that you will almost certainly need at some point, no matter what you do with your server. So let&#8217;s go ahead and install those now.</p>
<p>Lets start with <em>wget</em>, the tool you will use to download files from the web to your server. It&#8217;s just a simple file download tool that you will be using.</p>
<pre>sudo aptitude install wget</pre>
<p>The next item on the list is the <a href="http://packages.ubuntu.com/dapper/build-essential" target="_blank">build-essential</a> package. It includes all of the software you need to build Debian/Ubuntu software packages on your machine. Most of the software you will be using will be downloaded pre-built and auto installed by the aptitude software, but if you need to build Apache modules or any other non-standard pieces of software you will require all of the suff in the <em>build-essential</em> package.</p>
<pre>sudo aptitude install build-essential</pre>
<p>This will download and automatically install everything in this package.</p>
<h3>Changing the system name</h3>
<p>The name of your sever (aka &#8220;hostname&#8221;) is not only useful for keeping track of what server you&#8217;re looking at in a console window, but it is actually used to identify your account in a couple places (e.g. the authorized_keys file). If you&#8217;re setting up a VPS or dedicated server then you probably didn&#8217;t install the operating system yourself. Which means it probably isn&#8217;t named what you want it to be named.</p>
<p>First off pick a name for your server. Some people use the names of greek gods, some use simpsons characters and some use the names of minerals. There are countless naming conventions so pick whatever you want.</p>
<p>Of course the simplest way is to name your server based on it&#8217;s role. For example: www1, sql1, memcache1, etc. If you do use generic names like this you probably should add a number to the end in case you add more servers (e.g. www1, www2, www3&#8230;).</p>
<p>Now there are two places we need to enter your name to get the system to use that name, /etc/hostname and /ets/hosts.</p>
<pre>sudo nano /etc/hostname</pre>
<p>Enter the name you have chosen for the computer. There should be nothing else in this file.</p>
<pre>sudo nano /etc/hosts</pre>
<p>You will see the first line maps the 127.0.0.1 loopback IP to localhost. Just after that line you will add the name of your server, using the same format.</p>
<pre>127.0.0.1 localhost
127.0.0.1 myservername</pre>
<p>Once these files are save you will have to restart the server for the setting to take effect. Now when you login you should see your new server name in the console prompt.</p>
<h3>Useful commands you should know</h3>
<p>Here are some of the most useful commands you should know for managing your system.</p>
<dl>
<dt>sudo !!</dt>
<dd>This is one of the best little tricks to know. When you try to run a command but get a permissions error because you needed to sudo it, then you can run &#8220;sudo !!&#8221; which will execute the last command under sudo. This will save you lots of typing.</dd>
<dt>free -m</dt>
<dd>The free command will display current memory usage information. This will be an invaluable tool for optimizing as well as diagnosing problems. The -m flag tells it to display the numbers in megabytes, instead of just bytes.</dd>
<dt>df -h and du -h</dt>
<dd>The df and du commands report disk usage information. The df (disk free) command reports how much disk space is used and available on each partition. The du (disk usage) command reports how much space all of the files and folders in the current directory are taking. Both commands should be run with the -h flag which tells it we want human-readable (xxxKB, MB, GB) numbers.</dd>
<dt>top</dt>
<dd>Use the top command to find out information about the processes that are currently running. This app shows a constantly refreshed list of the processes with memory utilization, CPU usage, time running and such. It&#8217;s a very useful tool for finding out which processes are taking the most CPU and memory. There are a lot of feature in this one so read the <a href="http://manpages.ubuntu.com/manpages/hardy/man1/top.1.html" target="_blank">man page</a>. Press &#8220;q&#8221; to exit the app.</dd>
<dt>man</dt>
<dd>Of course real men don&#8217;t read instructions, so I don&#8217;t know why I&#8217;m listing this here. Perhaps it&#8217;s all of the times other real men have told me to RTFM. Anyway, man is the manual tool. For example entering &#8220;man top&#8221; will display the manual for the top application.</dd>
</dl>
<h3>Conclusion</h3>
<p>That&#8217;s it. You now have an Ubuntu server running the latest software with the basic best practices for accounts and SSH security. You can go anywhere from here, set up a LAMP server, a mail server, a game server, whatever. Look forward to the next part of my Ubuntu server series where I&#8217;ll discuss installing and configuring the web server.</p>
]]></content:encoded>
			<wfw:commentRss>https://stevenbenner.com/2010/06/setting-up-an-ubuntu-lamp-server-part-1-initial-setup/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Ultimate web site optimization trick: data URIs</title>
		<link>https://stevenbenner.com/2010/05/ultimate-web-site-optimization-trick-data-uris/</link>
		<comments>https://stevenbenner.com/2010/05/ultimate-web-site-optimization-trick-data-uris/#comments</comments>
		<pubDate>Tue, 18 May 2010 04:15:46 +0000</pubDate>
		<dc:creator><![CDATA[Steven Benner]]></dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[Tips and Tricks]]></category>

		<guid isPermaLink="false">http://stevenbenner.com/?p=1012</guid>
		<description><![CDATA[Are you an obsessive compulsive web site optimization nut? Are you willing to sacrifice maintainability for one less HTTP request? Have people ever asked you to seek a mental health professional because of your OCD? If so, then you are in good company. Us optimization nuts may not be very well received when we start [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Are you an obsessive compulsive web site optimization nut? Are you willing to sacrifice maintainability for one less HTTP request? Have people ever asked you to seek a mental health professional because of your OCD? If so, then you are in good company. Us optimization nuts may not be very well received when we start building a project, but we become very appreciated when someone asks how to make it scale. Depending on who you ask, web optimization is either the most useless talent ever or the single most important skill on a web developers resume.</p>
<p>Allow me to broaden your optimization toolbox with the ultimate HTTP connection killer, the <a href="https://en.wikipedia.org/wiki/Data_URI_scheme" target="_blank">data URI scheme</a>. Most web developers have never heard of data URIs but they can dramatically reduce the number of HTTP connections required to download your web site.</p>
<p>This article will explain what data URIs are, how to use them, and how to properly implement them.</p>
<p><span id="more-1012"></span></p>
<h3>What exactly are data URIs?</h3>
<p>The data URI scheme (<em>aka data: URLs</em>) is a method to include data in-line in a URI.</p>
<p>I don&#8217;t suppose that makes much sense, let me elaborate; Simply put, data URIs allow you to include a file (or multiple files) inside of another file. The most obvious and practical use is to embed background images inside a CSS file. You do this by base64 encoding a file and embedding the contents, with some basic meta data, into a URI.</p>
<p>It is important to note that while the data URI scheme was created in 1998 it never reached the status of Standard Protocol. It is still on the list of &#8220;Proposed Standards&#8221;. However, all of the most popular <em>modern</em> browsers have implemented the data URI scheme.</p>
<p>Due to the IE problem (explained further down) data URIs can only be fully supported in CSS files.</p>
<h3>Data URI scheme</h3>
<p>The format is pretty straight forward, the official data URL scheme as defined in the RFC is:</p>
<blockquote><p>data:[&lt;MIME-type&gt;][;charset=&#8221;&lt;encoding&gt;&#8221;][;base64],&lt;data&gt;</p></blockquote>
<p>Okay, let me break that down for you and provide some real world examples.</p>
<p>Like any URI it starts with a protocol identifier, data. Just like http, ftp, mailto or gopher this tells the browser how to use the following information.</p>
<p>The first piece the browser needs to know is the MIME type of the data you are including (e/g image/png or text/html). Over normal HTTP transfers the server identifies the MIME type from the file extension and sends it back with the file in the response headers. Since we are not transferring the data through an HTTP connection there is no automatic MIME-type data, and we have to manually identify the type of data we are giving to the browser.</p>
<p>Next is the charset identifier, which is exactly what it sounds like. If you are passing any kind of text document (e.g. plain text, html, xml) then you should tell the browser what kind of character encoding your are using for that text (e.g. UTF-8 or US-ASCII).</p>
<p>And the last piece of possible meta data is the base64 keyword. This tells the browser that the following data is base64 encoded.</p>
<p>All of this meta data is optional depending on the data you are embedding. If you are passing an image you won&#8217;t include the charset information, likewise if you&#8217;re passing a text document then your probably wont be encoding it and will omit the base64 keyword.</p>
<h3>Useful examples</h3>
<p>Here are a few examples of data URIs at work.</p>
<h4>CSS background</h4>
<p>In the real world, CSS backgrounds are about the only place where data URIs can be used (see: IE problem below). In my opinion this is the single best use for this technique anyway. We can embed all of our icons and backgrounds inside of the very style sheet that defines the rules that use those images.</p>
<pre class="brush: css; title: ; notranslate">
#logo {
	background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEkAAABJCAYAAABxcw[*about 2000 more characters*]AAAABJRU5ErkJggg==');
}
</pre>
<h4>JavaScript</h4>
<p>If you don&#8217;t have to worry about old versions of IE then you can use data URIs anywhere, even in JavaScript for any kind of URL destination. If you need to open a new window with a basic layout but don&#8217;t want to host an otherwise useless file then embed the layout in a data URI.</p>
<pre class="brush: jscript; title: ; notranslate">
window.open('data:text/html;charset=utf-8,%3C%21DOCTYPE%20html%3E%0D%0A%3Cht' +
	'ml%20lang%3D%22en%22%3E%0D%0A%3Chead%3E%3Ctitle%3EEmbedded%20Window%3C%' +
	'2Ftitle%3E%3C%2Fhead%3E%0D%0A%3Cbody%3E%3Ch1%3EDATA%3C%2Fh1%3E%3C%2Fbod' +
	'y%3E%0A%3C%2Fhtml%3E%0A%0D%0A', '_blank', 'height=300,width=400');
</pre>
<h4>Embedded images</h4>
<p>If you don&#8217;t need to support IE 6/7 then you can embed an image inside of the image tag itself with a data URI. This probably isn&#8217;t very useful, but it is a good demonstration of the technique.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;a href=&quot;http://www.linkedin.com/in/stevenbenner&quot; target=&quot;_blank&quot;&gt;
	&lt;img src=&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEkAAABJCAYAAABxcw[*about 2000 more characters*]AAAABJRU5ErkJggg==&quot; /&gt;
&lt;/a&gt;
</pre>
<h4>Embedded links</h4>
<p>Even Internet Explorer 8 won&#8217;t let you embed data in links because of security considerations, but it is another good demonstration of the technique.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;a href=&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEkAAABJCAYAAABxcw[*about 2000 more characters*]AAAABJRU5ErkJggg==&quot;&gt;
	Link to Twitter logo
&lt;/a&gt;
</pre>
<h3>The Internet Explorer problem</h3>
<p>As usual, Microsoft <em>Internet Explorer</em> screws up everything, data URLs are not supported in any version prior to Internet Explorer version 8. As much as I may want to add this to the hate list, I honestly cannot fault Microsoft for not supporting this until version 8. As I said earlier the data URI scheme is still on the list of <em>Proposed</em> Standards. So the fault rests entirely on the shoulders of the <a href="http://www.w3.org/" target="_blank"><em>W3C</em></a> for not looking at this <a href="http://tools.ietf.org/html/rfc2397" target="_blank">RFC</a> for the last 10 years.</p>
<p>In addition to the problem of old versions, Internet Explorer 8 has some additional restrictions.</p>
<ul>
<li>data must be smaller than 32KB</li>
<li>data URIs cannot be used for JavaScript</li>
<li>only object, img, input and link HTML tags can use data URIs</li>
</ul>
<p>However, you can use data URIs in any CSS url statements, so there is still plenty of use for data URIs in the latest version of Internet Explorer.</p>
<h4>Graceful degradation options for older versions of IE</h4>
<p>There are two options for graceful degradation:</p>
<ul>
<li>Make regular images available and use regular url links as a fall-back.</li>
<li>Or, use the MHTML technique.</li>
</ul>
<p>Personally, I&#8217;m not a fan of the MHTML technique because it will greatly increases the size of your CSS file (doubling the number of embedded images). In my opinion, this is just too high of a price to pay. It is far simpler to make the images available on your server and just link to them with regular CSS url statements. At least it is for me, if for some reason you would rather take the file size hit instead of publishing the image files then there is a good MHTML how-to article <a href="http://www.phpied.com/mhtml-when-you-need-data-uris-in-ie7-and-under/" target="_blank">here</a>.</p>
<p>For the this article I will use CSS url fall-backs for graceful degradation.</p>
<h3>IE 6-7 specific CSS degradation</h3>
<p>There are two ways to implement your CSS fall-back statements to target IE 6 and 7:</p>
<ul>
<li>Use Internet Explorer revision targeting with conditional comments</li>
<li>Or, use the asterisk CSS hack.</li>
</ul>
<p>Both of these are good choices, with simple pros and cons. IE revision targeting with <em>conditional comments</em> will require an additional CSS file specifically for older versions of IE, but in return it allows you to craft a style sheet that validates. Whereas the asterisk hack saves you the trouble of having an extra file but creates an invalid CSS statement.</p>
<p>Personally, I am anal about writing valid CSS and often have a separate CSS file for IE anyway (for IE PNG fix behavior statement) so I use IE revision targeting statements.</p>
<p>I&#8217;ll leave the choice up to you, so here are examples of both techniques:</p>
<h4>Internet Explorer revision targeting</h4>
<p>I&#8217;m sure you seen this technique countless times before, but here it is again. Internet Explorer supports version targeting statements in HTML comment blocks. These <em>conditional comments</em> are quite smooth because they produce valid markup and guarantee, for all time, that your code will only be parsed by the versions of Internet Explorer that you target.</p>
<p>The following snippet demonstrates how you include a CSS file that will only be seen and downloaded by Internet Explorer versions 7 and older:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;base.css&quot; /&gt;
&lt;!--[if lte IE 7]&gt;
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;old_ie.css&quot; /&gt;
&lt;![endif]--&gt;
</pre>
<p>In this example base.css is seen by all browsers but old_ie.css is only seen by IE 7 and older. Place this code in your HTML head block and the statements you place in old_ie.css will override the rules from base.css in old versions of Internet Explorer. For example:</p>
<p><strong>base.css</strong></p>
<pre class="brush: css; title: ; notranslate">
#logo {
	background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEkAAABJCAYAAABxcw[*about 2000 more characters*]AAAABJRU5ErkJggg==');
}
</pre>
<p><strong>old_ie.css</strong></p>
<pre class="brush: css; title: ; notranslate">
#logo {
	background-image: url(/images/logo.gif);
}
</pre>
<p>Now when a modern browser visits the page they will properly download and use the embedded background image but when an old version of IE visits the site it will use the rule from old_ie.css.</p>
<h4>The asterisk hack</h4>
<p>A less well known technique for targeting old versions of IE is the so called <em>Asterisk Hack</em>. This is a nifty little trick that someone, somewhere figured out. If you prepend an asterisk to a CSS rule then that rule will only be processed by Internet Explorer versions 6 and 7.</p>
<p>Here is an example of this hack:</p>
<pre class="brush: css; title: ; notranslate">
#wrapper {

	/* Processed by all browsers */
	background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEkAAABJCAYAAABxcw[*about 2000 more characters*]AAAABJRU5ErkJggg==');

	/* Only seen by IE 6 &amp; 7 */
	*background-image: url('/images/graphic.png');

}
</pre>
<p>Simple! Unfortunately this is invalid CSS, which irks me, but it is a clean and efficient hack. Only IE 6 and 7 will see the second background statement, and since it comes after the default data URI statement, it will override it with a link to the image.</p>
<h3>How to get encoded files for data URIs</h3>
<p>I built a little tool that allows me to quickly encode files on my computer. Here is the download if you would like to use it. This isn&#8217;t my finest work, it is just a basic tool to do the job in 20 lines of code, don&#8217;t expect a lot of bells and whistles.</p>
<p><strong>Steve&#8217;s Encode64 Utility</strong></p>
<p><a href="http://stevenbenner.github.com/steves-encode64-utility/" target="_blank"><img class="aligncenter size-full wp-image-1035" title="Steve's Encode64 Utility" src="https://static.stevenbenner.name/wp-content/uploads/encode64_screenshot.png" alt="Steve's Encode64 Utility Screen Shot" width="379" height="255" srcset="https://static.stevenbenner.name/wp-content/uploads/encode64_screenshot.png 379w, https://static.stevenbenner.name/wp-content/uploads/encode64_screenshot-300x201.png 300w" sizes="(max-width: 379px) 100vw, 379px" /></a></p>
<p style="-moz-border-radius: 4px; -webkit-border-radius: 4px; background-color: #f0f8ff; border: 1px solid #CCC; font-size: 20px; margin: 15px auto; padding: 10px; text-align: center; width: 300px;"><strong><a href="http://stevenbenner.github.com/steves-encode64-utility/" target="_blank">Click here to download</a></strong></p>
<ul>
<li>This tool is for almost any version of Microsoft Windows (sorry Mac users).</li>
<li>You can get the source code here: <a href="https://github.com/stevenbenner/steves-encode64-utility" target="_blank">Steve&#8217;s Encode64 Utility Source Code</a> (GitHub project)</li>
</ul>
<h3>How to generate base64 strings in code</h3>
<p>If you need to dynamically generate base64 strings then you&#8217;re in luck, this task is quite simple. Here are a couple code examples to get you on your way:</p>
<h4>PHP</h4>
<pre class="brush: php; title: ; notranslate">
$encoded_string = base64_encode(file_get_contents('logo.png'));
</pre>
<h4>C#</h4>
<pre class="brush: csharp; title: ; notranslate">
private string Base64Encode(string fileToEncode)
{
	byte[] EncodeBuffer;

	using (FileStream fs = new FileStream(fileToEncode, FileMode.Open))
	{
		int Length = Convert.ToInt32(fs.Length);
		EncodeBuffer = new byte[Length];

		fs.Read(EncodeBuffer, 0, Length);
	}

	return Convert.ToBase64String(EncodeBuffer);
}
</pre>
<h3>Conclution</h3>
<p>I think data URIs are an awesome, and powerful optimization trick. You can save many extra HTTP connections, and the associated latency and overhead for all of your users who are running a modern browser. This will make your site much snappier, especially if you use a lot of icons.</p>
<p>Using these techniques you can have a fully compatible web site that will gracefully degrade to traditional external resources if you can accept the following restrictions:</p>
<ul>
<li>Only images</li>
<li>Only in CSS files</li>
<li>Less than 32KB each</li>
</ul>
<p>I can see this working well for background images and for icons. With data URIs you can embed all of your presentation resources into the same CSS file that uses them. This file will grow much larger than normal but it will cache well and save in overall bandwidth.</p>
]]></content:encoded>
			<wfw:commentRss>https://stevenbenner.com/2010/05/ultimate-web-site-optimization-trick-data-uris/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>How to circumvent internet filtering and enhance privacy</title>
		<link>https://stevenbenner.com/2010/05/how-to-circumvent-internet-filtering-and-enhance-privacy/</link>
		<comments>https://stevenbenner.com/2010/05/how-to-circumvent-internet-filtering-and-enhance-privacy/#comments</comments>
		<pubDate>Sun, 09 May 2010 23:30:36 +0000</pubDate>
		<dc:creator><![CDATA[Steven Benner]]></dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Privacy]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://stevenbenner.com/?p=894</guid>
		<description><![CDATA[The whole world knows about the so called &#8220;Great Wall&#8221; that protects the Chinese people from dangerous western ideals, the serious concerns about internet privacy in the United Kingdom, now we have Australia making a real push towards internet filtering legislation as well as all of North America and most of Europe signing on with [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>The whole world knows about the so called <em>&#8220;Great Wall&#8221;</em> that protects the Chinese people from dangerous western ideals, the serious concerns about internet privacy in the United Kingdom, now we have Australia making a real push towards <a href="http://www.guardian.co.uk/world/2010/mar/29/google-yahoo-australia-internet-filter" target="_blank">internet filtering legislation</a> as well as all of North America and most of Europe signing on with the <em><a href="https://en.wikipedia.org/wiki/Anti-Counterfeiting_Trade_Agreement" target="_blank">ACTA</a></em> legislation. Of course we still have <a href="http://online.wsj.com/article/SB10001424052748704140104575056972514372994.html" target="_blank">Iran blocking news, social media and even gmail</a>. But even countries that we wouldn&#8217;t expect to support censorship are signing bad legislation, such as <a href="http://www.theinquirer.net/inquirer/news/1591582/france-falls-internet-censorship" target="_blank">France</a>, <a href="http://www.neowin.net/news/main/09/09/14/new-zealand-to-get-country-wide-filtered-internet" target="_blank">New Zealand</a>, and <a href="http://www.irishtimes.com/newspaper/frontpage/2009/0820/1224252952116.html" target="_blank">Ireland</a>.</p>
<p>For at least a decade the very idea of filtering information was something first world countries laughed at as a tactic only dictatorships and xenophobes would seriously consider, now it seems the stage is changing and governments and ISPs are becoming more open to the idea of national censorship.</p>
<p>This is a terrible, and dangerous trend. I for one hope the aussies block the forced internet filtering law and I hope the whole world sees ACTA as the scam that it is. There is a quote that I often like to cite when the topic of internet filtering comes up, <em>&#8220;The internet sees censorship as damage, and automatically routes around it&#8221;</em>. Unfortunately, when censorship happens at the ISP level, that automatic routing is broken, so you have to do some manual routing to circumvent the broken tubes.</p>
<p>I think it is important to know how to get around censorship schemes and I believe that the greater the number of people with this knowledge the better off the internet, and the world will be. So here&#8217;s how to circumvent internet censorship, the <em>VPN</em>.</p>
<p><span id="more-894"></span></p>
<p>In several countries it is illegal to even attempt to circumvent government authorized internet censorship. You can and will go to jail if you get caught bypassing official filters in such countries. As much as I want to promote internet free speech I do not want any of my readers to go to jail. Please read up on your countries laws regarding net filtering and, of  course, I do not advise you to attempt anything illegal.</p>
<p><em>Disclaimer: This site is not intended for distribution to, or use by, any person or entity in any jurisdiction or country where such distribution or use would be contrary to local law or regulation.</em></p>
<h3>VPN tunnel through a country that supports internet freedom</h3>
<p>The idea is simple, do your internet surfing through a <em>VPN</em> tunnel that ends in a country that has a good record of supporting a free internet and protecting privacy (such as Sweden).</p>
<p><img class="aligncenter size-full wp-image-929" title="OpenVPN" src="https://static.stevenbenner.name/wp-content/uploads/openvpn_logo.png" alt="OpenVPN Logo" width="300" height="74" /></p>
<h3>What is a VPN?</h3>
<p>A VPN (or <em>Virtual Private Network</em>) is a way to securely extend a private network across the internet to another location. The client computer (in this case your computer) makes an encrypted connection to a server which acts as a normal network connection. This technique is commonly used at tech companies to allow employees to connect to their work network from anywhere in the world so they can access files on the corporate network or even open a remote desktop connection to their office computer.</p>
<p>This system is very secure. Since VPN users don&#8217;t want any nefarious types or compromised systems along the way to be able to sniff out what files you are reading or what information you are sending, hence &#8220;Private&#8221;. When a VPN connection is open it is just like having an Ethernet cable connected to the other machine, just slower since it is going over public networks.</p>
<h3>Sounds great! So how do I get a VPN?</h3>
<p><img class="alignright size-full wp-image-931" title="PRQ" src="https://static.stevenbenner.name/wp-content/uploads/prq_logo.jpg" alt="PRQ Logo" width="110" height="95" />It&#8217;s not free, but it is cheap. There are actually several companies offering this service already, such as <a href="http://prq.se/?intl=1" target="_blank">PRQ</a> which offers an <a href="http://prq.se/?p=tunnel&amp;intl=1" target="_blank">OpenVPN tunnel service</a> for as little as $10 per month. There, your VPN server is all ready to go! I mention PRQ only because they are famous for protecting their customers, for more VPN providers check out the <a href="http://en.cship.org/wiki/Virtual_Private_Network" target="_blank">VPN list</a> on the Internet censorship wiki.</p>
<p>You can also set up a VPN server of your very own anywhere you like, but you will need to find a host to house the system and keep it online. I highly recommend a VPS (<em>Virtual Private Server</em>) system for this because it is cheap, fast and you don&#8217;t need much computing power to run a VPN. Of course a dedicated server is fine too, but a lot more expensive. No matter what you will need a system that gives you root access so you can install and configure the VPN server.</p>
<h3>Alright, I have my VPN server! Now, how do I use it?</h3>
<p>Making a VPN connection is easy with <a href="http://openvpn.net/" target="_blank">OpenVPN</a>, and even easier with a Windows Server VPN. For this article I&#8217;ll assume you are running OpenVPN because a Windows Server VPN would be prohibitively expensive for a home user who just wants to browse the internet in peace. I will also assume you are using the Microsoft Windows operating system (because that&#8217;s what I use). If you are a Mac or Linux user you&#8217;ll find similar guides with a quick Google search.</p>
<p>The first thing you need to do is to download a copy of the <a href="http://openvpn.se/" target="_blank">OpenVPN GUI</a> for Windows. This is a free application and the Installation Package includes everything you need, even the base OpenVPN software.</p>
<p>If you are getting your VPN access from a company that provides OpenVPN services then you should receive all of your configuration information from them. If you&#8217;re setting up your own VPN server then you will need to read the OpenVPN documentation for your particular system.</p>
<p>The guide for setting up your VPN will be the topic of another article, I&#8217;ll write up a nice how-to with screen shots and such eventually. For now, if you&#8217;re looking fo a good walk-through on setting up the OpenVPN GUI check out <a href="http://www.itsatechworld.com/2006/01/29/how-to-configure-openvpn/" target="_blank">How to configure OpenVPN</a>.</p>
<h3>The other option</h3>
<p>I believe that a VPN system like what I have described is the best solution because it is fast and nearly impossible to eavesdrop on, however it isn&#8217;t the only solution.</p>
<p>The simplest option is the good old fashioned <em><a href="https://en.wikipedia.org/wiki/Proxy_server" target="_blank">proxy server</a></em>. A proxy server, as it&#8217;s name implies is a server that bounces internet traffic from your system, through the proxy server, to the destination. Setting up your computer to work with a proxy server is easy, every web browser has a configuration section for proxies. They are free and readily available, however they have some <a href="http://www.sesawe.net/Risks-of-using-web-proxies.html" target="_blank">serious drawbacks</a>. Proxies are notoriously slow, often have injected ads, offer little to no security and do not encrypt the connection.</p>
<p>There are more advanced proxy systems such as <em><a href="http://www.torproject.org/" target="_blank">Tor</a></em> and <em><a href="http://info.picidae.net/" target="_blank">picidae</a></em> that aim to remedy some of those problems. However in general proxies are designed to enhance privacy, not circumvent filtering.</p>
<p>In completely cut off countries there is the <em><a href="https://en.wikipedia.org/wiki/Sneakernet" target="_blank">sneakernet</a></em> phenomena. A sneakernet is literally a network of people who pass media around by hand, such a CDs and flash drives. This is the last line of defense for free speech because it doesn&#8217;t use any computer network to transmit data. However I understand that the latency is quite poor.</p>
<h3>Why ACTA is bad for the internet and you</h3>
<p>Since I&#8217;m American and the only thing really threatening American  internet is the upcoming ACTA treaty. So I feel that I must add a note here about ACTA.</p>
<p>ACTA  (<em>The Anti-Counterfeiting Trade Agreement</em>) is an international  agreement being pushed through many nations. There are some parts of  ACTA that are good, basically the anti-counterfeiting portions, however  most of ACTA is about <em>intellectual property</em>. In fact ACTA, if it  is accepted, will put forth some of the most sweeping international  copyright policies ever made.</p>
<p>Primarily backed by media giant and  organizations such as the infamous RIAA and MPAA, ACTA will force  countries to enact legislation very similar to the American DMCA (<em>Digital  Media Communications Act</em>) except with even more stringent rules and  harsher penalties.</p>
<h4>Quick ACTA facts:</h4>
<ul>
<li>ACTA will require ISPs to permanently sever users internet  connections if they get 3 copyright infringement complaints.</li>
<li>Complaints need not have any evidence nor see a court of any kind,  all it takes is a <em>complaint</em>.</li>
<li>Several sections of the ACTA draft show that rightsholders can  obtain an injunction just by showing that infringement is &#8220;imminent,&#8221;  even if it hasn&#8217;t happened yet. (source: <a href="http://arstechnica.com/tech-policy/news/2010/04/acta-is-here.ars" target="_blank">Ars  Technica</a>)</li>
<li>ACTA will allow border agents to search and seize any equipment  that they believe may contain copies of copyrighted material. (e.g.  laptops, iPods, hard drives, etc.)</li>
<li>ACTA would ban &#8220;the unauthorized circumvention of an effective  technological measure.&#8221; No-CD cracks will become illegal.</li>
</ul>
<p>Basically, ACTA is a very bad thing. It sacrifices a great deal of  your privacy and threatens to get you permanently disconnected from the  internet without any evidence or legal action.</p>
<p>Stop ACTA, support  the EFF and countless human rights organizations.</p>
<h3>Support free speech, privacy and net neutrality</h3>
<p>Now that you have the power to get around censorship I want you to help prevent censorship. Take action, join free speech groups, donate to influential organizations, write your government representatives and vote for candidates who support free speech. It is important to know how to get information even when the powers that be try to stop you, but it is even more important to work with those powers to make the world a better place.</p>
<h4>Support the watchdog organizations</h4>
<p>Here are some influential organizations that are fighting for internet freedom:</p>
<ul>
<li><a href="http://www.eff.org/" target="_blank">Electronic Frontier Foundation (EFF)</a></li>
<li><a href="http://www.cdt.org/" target="_blank">Center for Democracy &amp; Technology (CDT)</a></li>
<li><a href="http://www.aclu.org/free-speech/internet-censorship" target="_blank">American Civil Liberties Union (ACLU)</a></li>
<li><a href="http://www.efa.org.au/" target="_blank">Electronic Frontiers Australia (EFA)</a></li>
<li><a href="http://www.laquadrature.net/en" target="_blank">La Quadrature du Net</a></li>
</ul>
<h4>Learn more</h4>
<p>These are a few informational sites on topics of freedom of speech and internet censorship:</p>
<ul>
<li><a href="https://en.wikipedia.org/wiki/Internet_censorship" target="_blank">Internet censorship article on Wikipedia</a></li>
<li><a href="http://www.indexoncensorship.org/" target="_blank">Index on Censorship</a> (UK)</li>
<li><a href="http://www.digitaldueprocess.org/" target="_blank">Digital Due Process</a> (US)</li>
<li><a href="http://www.edri.org/" target="_blank">European Digital Rights</a> (EU)</li>
<li><a href="http://www.rsf.org/index.php?page=rubrique&amp;id_rubrique=2" target="_blank">Reporters Without Borders</a></li>
<li><a href="http://opennet.net/" target="_blank">OpenNet Initiative</a></li>
<li><a href="http://www.google.com/governmentrequests/" target="_blank">Google government requests tool</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>https://stevenbenner.com/2010/05/how-to-circumvent-internet-filtering-and-enhance-privacy/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
