<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><!-- generator="Joomla! 1.5 - Open Source Content Management" --><feed xmlns="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" xml:lang="en-gb">
	<title type="text">Synchros Interactive Blog</title>
	<subtitle type="text">My name is Dustin McQuay and I am a software developer from North Salt Lake, Utah. Synchros Interactive is simply the name under which I do business. My background is mostly in website development.</subtitle>
	<link rel="alternate" type="text/html" href="http://www.synchrosinteractive.com" />
	<id>http://www.synchrosinteractive.com/blog</id>
	<updated>2013-03-01T08:23:01Z</updated>
	<generator uri="http://joomla.org" version="1.5">Joomla! 1.5 - Open Source Content Management</generator>

	<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/SynchrosInteractiveBlog" /><feedburner:info uri="synchrosinteractiveblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry>
		<title>PyCharm</title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SynchrosInteractiveBlog/~3/XPUtbWCajqk/81-pycharm" />
		<published>2012-03-20T15:37:02Z</published>
		<updated>2012-03-20T15:37:02Z</updated>
		<id>http://www.synchrosinteractive.com/blog/13-pythondjango/81-pycharm</id>
		<author>
			<name>Dustin McQuay</name>
		<email>dmcquay@gmail.com</email>
		</author>
		<summary type="html">&lt;p&gt;I've been seeing ads all around for PyCharm, a Python IDE from JetBrains. I've used IntelliJ IDEA (their Java IDE) and it is a well done product so I finally decided I'd better give PyCharm a shot.&lt;/p&gt;

&lt;p&gt;Until then I had been using Aptana Studio 3 for Python/Django development (Eclipse) which has support for Python/Django, but I found it lacking in a few areas. Namely, templates, ability to run the server and tests within the browser with reloading enabled, and overall usability.&lt;/p&gt;

&lt;p&gt;So with PyCharm I have been looking for it to do a better job in these areas and it has. The support for Python/Django is thorough and user friendly. It's really a pleasure to use and well worth the $100. Everything works perfect. Everything. I have to apply a patch to django to get the auto-reloading to work and I'm guessing that patch would make it work in Eclipse too, but at this point I'm just too hooked on PyCharm to go back. It has great support for Python, full integration with Django including their template syntax among other template syntaxes, support for things like checking if a reverse call is going to resolve or if a render call is pointing to an existing template. The JavaScript support is not just a second thought either. Very nice deep support for JavaScript. It even seems to pick up things well using RequireJS.&lt;/p&gt;</summary>
		<content type="html">&lt;p&gt;I've been seeing ads all around for PyCharm, a Python IDE from JetBrains. I've used IntelliJ IDEA (their Java IDE) and it is a well done product so I finally decided I'd better give PyCharm a shot.&lt;/p&gt;

&lt;p&gt;Until then I had been using Aptana Studio 3 for Python/Django development (Eclipse) which has support for Python/Django, but I found it lacking in a few areas. Namely, templates, ability to run the server and tests within the browser with reloading enabled, and overall usability.&lt;/p&gt;

&lt;p&gt;So with PyCharm I have been looking for it to do a better job in these areas and it has. The support for Python/Django is thorough and user friendly. It's really a pleasure to use and well worth the $100. Everything works perfect. Everything. I have to apply a patch to django to get the auto-reloading to work and I'm guessing that patch would make it work in Eclipse too, but at this point I'm just too hooked on PyCharm to go back. It has great support for Python, full integration with Django including their template syntax among other template syntaxes, support for things like checking if a reverse call is going to resolve or if a render call is pointing to an existing template. The JavaScript support is not just a second thought either. Very nice deep support for JavaScript. It even seems to pick up things well using RequireJS.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SynchrosInteractiveBlog/~4/XPUtbWCajqk" height="1" width="1"/&gt;</content>
	<feedburner:origLink>http://www.synchrosinteractive.com/blog/13-pythondjango/81-pycharm</feedburner:origLink></entry>
	<entry>
		<title>Useful bash command</title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SynchrosInteractiveBlog/~3/9Img1xwjK7Y/80-useful-bash-command" />
		<published>2012-02-24T20:29:01Z</published>
		<updated>2012-02-24T20:29:01Z</updated>
		<id>http://www.synchrosinteractive.com/blog/1-software/80-useful-bash-command</id>
		<author>
			<name>Dustin McQuay</name>
		<email>dmcquay@gmail.com</email>
		</author>
		<summary type="html">&lt;p&gt;Here's a super helpful little bash snippet I use a lot. It adds very basic error handling to bash commands.&lt;/p&gt;

&lt;pre lang="bash"&gt;
function cmd {
        cmd=$*
        echo $cmd
        eval $cmd
        if [[ "$?" != "0" ]]; then
                echo "The last command failed. Setup will now exit.";
                exit 1;
        fi
}
&lt;/pre&gt;

&lt;p&gt;So, instead of writing code like this...&lt;/p&gt;

&lt;pre lang="bash"&gt;
echo 'scp example.com:/foo/bar.txt /foo/bar.txt'
scp example.com:/foo/bar.txt /foo/bar.txt
if [[ "$?" != "0" ]]; then
    echo "The last command failed. Exiting.";
    exit 1;
fi

echo 'echo "more stuff" &gt;&gt; /foo/bar.txt'
echo "more stuff" &gt;&gt; /foo/bar.txt
if [[ "$?" != "0" ]]; then
    echo "The last command failed. Exiting.";
    exit 1;
fi

echo 'cp /foo/bar.txt /baz/bar.txt'
cp /foo/bar.txt /baz/bar.txt
if [[ "$?" != "0" ]]; then
    echo "The last command failed. Exiting.";
    exit 1;
fi
&lt;/pre&gt;

&lt;p&gt;You can just write this...&lt;/p&gt;

&lt;pre lang="bash"&gt;
cmd scp example.com:/foo/bar.txt /foo/bar.txt
cmd 'echo "more stuff" &gt;&gt; /foo/bar.txt'
cmd cp /foo/bar.txt /baz/bar.txt
&lt;/pre&gt;

&lt;p&gt;Note that if you want to have pipes and redirects in your command, you must use quotes to pass the entire command as a single parameter, like this:&lt;/p&gt;

&lt;pre xml:lang="bash"&gt;
cmd "cat /etc/bash.bashrc | grep -v APPLICATION_ENV &gt; /tmp/bash.bashrc"
&lt;/pre&gt;

&lt;p&gt;Of course you may want to tweak it and there are many cases when you need more advanced error handling. But this works in many cases and makes it much faster to write up a shell script that needs to stop if a command fails.&lt;/p&gt;</summary>
		<content type="html">&lt;p&gt;Here's a super helpful little bash snippet I use a lot. It adds very basic error handling to bash commands.&lt;/p&gt;

&lt;pre lang="bash"&gt;
function cmd {
        cmd=$*
        echo $cmd
        eval $cmd
        if [[ "$?" != "0" ]]; then
                echo "The last command failed. Setup will now exit.";
                exit 1;
        fi
}
&lt;/pre&gt;

&lt;p&gt;So, instead of writing code like this...&lt;/p&gt;

&lt;pre lang="bash"&gt;
echo 'scp example.com:/foo/bar.txt /foo/bar.txt'
scp example.com:/foo/bar.txt /foo/bar.txt
if [[ "$?" != "0" ]]; then
    echo "The last command failed. Exiting.";
    exit 1;
fi

echo 'echo "more stuff" &gt;&gt; /foo/bar.txt'
echo "more stuff" &gt;&gt; /foo/bar.txt
if [[ "$?" != "0" ]]; then
    echo "The last command failed. Exiting.";
    exit 1;
fi

echo 'cp /foo/bar.txt /baz/bar.txt'
cp /foo/bar.txt /baz/bar.txt
if [[ "$?" != "0" ]]; then
    echo "The last command failed. Exiting.";
    exit 1;
fi
&lt;/pre&gt;

&lt;p&gt;You can just write this...&lt;/p&gt;

&lt;pre lang="bash"&gt;
cmd scp example.com:/foo/bar.txt /foo/bar.txt
cmd 'echo "more stuff" &gt;&gt; /foo/bar.txt'
cmd cp /foo/bar.txt /baz/bar.txt
&lt;/pre&gt;

&lt;p&gt;Note that if you want to have pipes and redirects in your command, you must use quotes to pass the entire command as a single parameter, like this:&lt;/p&gt;

&lt;pre xml:lang="bash"&gt;
cmd "cat /etc/bash.bashrc | grep -v APPLICATION_ENV &gt; /tmp/bash.bashrc"
&lt;/pre&gt;

&lt;p&gt;Of course you may want to tweak it and there are many cases when you need more advanced error handling. But this works in many cases and makes it much faster to write up a shell script that needs to stop if a command fails.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SynchrosInteractiveBlog/~4/9Img1xwjK7Y" height="1" width="1"/&gt;</content>
	<feedburner:origLink>http://www.synchrosinteractive.com/blog/1-software/80-useful-bash-command</feedburner:origLink></entry>
	<entry>
		<title>Django image upload failure problem and fix</title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SynchrosInteractiveBlog/~3/EAuQL9NXqCg/79-django-image-upload-failure-problem-and-fix" />
		<published>2012-01-27T06:42:30Z</published>
		<updated>2012-01-27T06:42:30Z</updated>
		<id>http://www.synchrosinteractive.com/blog/1-software/79-django-image-upload-failure-problem-and-fix</id>
		<author>
			<name>Dustin McQuay</name>
		<email>dmcquay@gmail.com</email>
		</author>
		<summary type="html">&lt;p&gt;On my Mac (Lion) I was getting an error when uploading images: "Upload a valid image. The file you uploaded was either not an image or a corrupted image."&lt;/p&gt;

&lt;p&gt;I guess django uses PIL for verification of a valid image. The problem as it turns out was that PIL was installed without JPEG support and I was trying to upload a JPEG image.&lt;/p&gt;

&lt;p&gt;The fix is very simple. You have to install libjpeg and then you have to reinstall PIL.&lt;/p&gt;

&lt;pre&gt;
brew install jpeg
pip install pil --upgrade
&lt;/pre&gt;</summary>
		<content type="html">&lt;p&gt;On my Mac (Lion) I was getting an error when uploading images: "Upload a valid image. The file you uploaded was either not an image or a corrupted image."&lt;/p&gt;

&lt;p&gt;I guess django uses PIL for verification of a valid image. The problem as it turns out was that PIL was installed without JPEG support and I was trying to upload a JPEG image.&lt;/p&gt;

&lt;p&gt;The fix is very simple. You have to install libjpeg and then you have to reinstall PIL.&lt;/p&gt;

&lt;pre&gt;
brew install jpeg
pip install pil --upgrade
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/SynchrosInteractiveBlog/~4/EAuQL9NXqCg" height="1" width="1"/&gt;</content>
	<feedburner:origLink>http://www.synchrosinteractive.com/blog/1-software/79-django-image-upload-failure-problem-and-fix</feedburner:origLink></entry>
	<entry>
		<title>Mockingbird</title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SynchrosInteractiveBlog/~3/X3Tf2MaqXzs/78-mockingbird" />
		<published>2012-01-23T16:22:30Z</published>
		<updated>2012-01-23T16:22:30Z</updated>
		<id>http://www.synchrosinteractive.com/blog/12-startup/78-mockingbird</id>
		<author>
			<name>Dustin McQuay</name>
		<email>dmcquay@gmail.com</email>
		</author>
		<summary type="html">Making wireframes is a great way to capture and test an idea. For those of us that aren't gifted at photoshop, and even perhaps for those of us who are, it is nice to have a tool specifically designed for this. There are a few such online tools that have been developing nicely. One that I really like is mockingbird.

The general idea is this. The tool gives you tons of common widgets (text, input boxes, placeholder image, etc) to quickly make a wireframe of your product. You create many of these and you can make them link to each other easily, so when you click on some button in one wireframe, it takes you to another.</summary>
		<content type="html">Making wireframes is a great way to capture and test an idea. For those of us that aren't gifted at photoshop, and even perhaps for those of us who are, it is nice to have a tool specifically designed for this. There are a few such online tools that have been developing nicely. One that I really like is mockingbird.

The general idea is this. The tool gives you tons of common widgets (text, input boxes, placeholder image, etc) to quickly make a wireframe of your product. You create many of these and you can make them link to each other easily, so when you click on some button in one wireframe, it takes you to another.&lt;img src="http://feeds.feedburner.com/~r/SynchrosInteractiveBlog/~4/X3Tf2MaqXzs" height="1" width="1"/&gt;</content>
	<feedburner:origLink>http://www.synchrosinteractive.com/blog/12-startup/78-mockingbird</feedburner:origLink></entry>
	<entry>
		<title>AJAX Forms Only</title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SynchrosInteractiveBlog/~3/-LIHBRrblSQ/77-ajax-forms-only" />
		<published>2012-01-18T21:23:08Z</published>
		<updated>2012-01-18T21:23:08Z</updated>
		<id>http://www.synchrosinteractive.com/blog/3-websites/77-ajax-forms-only</id>
		<author>
			<name>Dustin McQuay</name>
		<email>dmcquay@gmail.com</email>
		</author>
		<summary type="html">Forms. As web developers, we work with them a lot. And you have to deal with validating them client-side and server-side.  You can write custom javascript to do the client-side validation and then separate code for server-side validation. But what if the server finds and error that was not found client side, such as trying to register a user, but that username is already taken? So now you have to be able to not only validate on both sides, but display errors from both sources.

It's simple really, but I've finally decided that it's just easier to submit ALL forms via AJAX. The validation can all be done server-side because with an AJAX call it's pretty darn fast. In the end it's really much more simple. Plus, on most sites, you have some forms that submit "normally" and some that submit via ajax, so you have two general philosophies to support. Let's make life more simple. Just do it all via AJAX.</summary>
		<content type="html">Forms. As web developers, we work with them a lot. And you have to deal with validating them client-side and server-side.  You can write custom javascript to do the client-side validation and then separate code for server-side validation. But what if the server finds and error that was not found client side, such as trying to register a user, but that username is already taken? So now you have to be able to not only validate on both sides, but display errors from both sources.

It's simple really, but I've finally decided that it's just easier to submit ALL forms via AJAX. The validation can all be done server-side because with an AJAX call it's pretty darn fast. In the end it's really much more simple. Plus, on most sites, you have some forms that submit "normally" and some that submit via ajax, so you have two general philosophies to support. Let's make life more simple. Just do it all via AJAX.&lt;img src="http://feeds.feedburner.com/~r/SynchrosInteractiveBlog/~4/-LIHBRrblSQ" height="1" width="1"/&gt;</content>
	<feedburner:origLink>http://www.synchrosinteractive.com/blog/3-websites/77-ajax-forms-only</feedburner:origLink></entry>
	<entry>
		<title>Two Helpful Git Aliases</title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SynchrosInteractiveBlog/~3/7WUWs81-QDA/76-two-helpful-git-aliases" />
		<published>2011-11-22T21:10:52Z</published>
		<updated>2011-11-22T21:10:52Z</updated>
		<id>http://www.synchrosinteractive.com/blog/1-software/76-two-helpful-git-aliases</id>
		<author>
			<name>Dustin McQuay</name>
		<email>dmcquay@gmail.com</email>
		</author>
		<summary type="html">&lt;p&gt;Add this to your ~/.gitconfig to add these two super useful aliases. A guy at work shared these with me. The provide a nice way to view your history on the command line in a much more pretty format. Mainly they add some color and add visualization of branching and merging.&lt;/p&gt;

&lt;pre&gt;
[alias]
        hist = log --pretty=format:'%Cred%h%Creset %C(bold blue)&lt;%an&gt;%Creset%C(yellow)%d%Creset %Cgreen(%cr)%Creset%n%w(80,8,8)%s' --graph
        histfull = log --pretty=format:'%Cred%h%Creset %C(bold blue)&lt;%an&gt;%Creset%C(yellow)%d%Creset %Cgreen(%cr)%Creset%n%w(80,8,8)%s%n' --graph --name-status
&lt;/pre&gt;</summary>
		<content type="html">&lt;p&gt;Add this to your ~/.gitconfig to add these two super useful aliases. A guy at work shared these with me. The provide a nice way to view your history on the command line in a much more pretty format. Mainly they add some color and add visualization of branching and merging.&lt;/p&gt;

&lt;pre&gt;
[alias]
        hist = log --pretty=format:'%Cred%h%Creset %C(bold blue)&lt;%an&gt;%Creset%C(yellow)%d%Creset %Cgreen(%cr)%Creset%n%w(80,8,8)%s' --graph
        histfull = log --pretty=format:'%Cred%h%Creset %C(bold blue)&lt;%an&gt;%Creset%C(yellow)%d%Creset %Cgreen(%cr)%Creset%n%w(80,8,8)%s%n' --graph --name-status
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/SynchrosInteractiveBlog/~4/7WUWs81-QDA" height="1" width="1"/&gt;</content>
	<feedburner:origLink>http://www.synchrosinteractive.com/blog/1-software/76-two-helpful-git-aliases</feedburner:origLink></entry>
	<entry>
		<title>Oracle XE on Ubuntu 11.04 32 bit and other platforms</title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SynchrosInteractiveBlog/~3/piagkXkviAI/75-oracle-xe-on-ubuntu-1104-32-bit" />
		<published>2011-11-13T21:19:51Z</published>
		<updated>2011-11-13T21:19:51Z</updated>
		<id>http://www.synchrosinteractive.com/blog/1-software/75-oracle-xe-on-ubuntu-1104-32-bit</id>
		<author>
			<name>Dustin McQuay</name>
		<email>dmcquay@gmail.com</email>
		</author>
		<summary type="html">&lt;p&gt;At my work we are now using Oracle 11g database. The production version of this thing is quite hefty so I wanted something lighter while developing on my laptop. Oracle provides a lightweight edition called Oracle XE. Unfortunately I had to install 10g (see compatibility notes below). Using 10g instead when the rest of the company is on 11g has only caused me one pain point so far and I was able to work around it. I'll explain more later. So, without further ado, here's what I learned when trying to get this sucker installed.&lt;/p&gt;

&lt;h2&gt;Compatability notes&lt;/h2&gt;

&lt;p&gt;I mentioned above that I had to use 10g since I'm running 32 bit. Here's some more specific notes about what version you have to use for various platforms.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If you have 64 bit Ubuntu/Debian, then you have to follow the alien instructions below.&lt;/li&gt;
&lt;li&gt;If you have 64 bit RedHat, Fedora or CenOS, just skip the alien stuff and install the RPM directly.&lt;/li&gt;
&lt;li&gt;If you have a 32 bit linux OS (like me), install Oracle 10g XE instead. There are packages for lots of distributions in that version so nothing special is required.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Prerequisites&lt;/h2&gt;

&lt;p&gt;You need a JDK. For Ubuntu, I just installed openjdk-6.&lt;/p&gt;

&lt;pre xml:lang="bash"&gt;
sudo apt-get install openjdk-6-jdk
You also need ant installed
sudo apt-get install ant
&lt;/pre&gt;

&lt;h2&gt;Converting 11g 64 bit RPM into a .deb using Alien&lt;/h2&gt;

&lt;p&gt;Download the RPM from Oracle's website. The instructions below assume you have a copy of it. Note: I got a few weird errors while installing this, but it seems that they were benign.&lt;/p&gt;

&lt;pre xml:lang="bash"&gt;
sudo apt-get install alien libaio1 chkconfig
sudo alien -d --scripts oracle-xe-11.2.0-0.5.x86_64.rpm
&lt;/pre&gt;

&lt;h2&gt;Install the package&lt;/h2&gt;

&lt;p&gt;If you are installing an RPM, I haven't actually done that. I assume it would be easy though. If you're installing a deb (either converted by alien or a deb directly from Oracle in the case of 10g), then here's some more details.&lt;/p&gt;

&lt;pre xml:lang="javascript"&gt;
sudo dpkg -i oracle-xe-11.2.0-0.5.x86_64.rpm
sudo /etc/init.d/oracle-xe configure
#if you don’t want oracle to start automatically on boot, run this:
sudo /sbin/chkconfig oracle-xe off
&lt;/pre&gt;

&lt;p&gt;Here are the answers I gave to questions during installation.&lt;/p&gt;

&lt;pre xml:lang="javascript"&gt;
Port for Oracle Application Express: 8085 (so it doesn’t conflict with Tomcat, JBoss, etc.)
Port for DB Listener: 1521 (default)
Password for SYS and SYSTEM: Oracle11 (because this is standard)
&lt;/pre&gt;

&lt;p&gt;You should now add yourself to the dba group. When I was doing this I noticed that oracle wasn’t in this group either. Added that user too, but probably unnecessary. This will allow you to start/stop your XE database among other things.&lt;/p&gt;

&lt;p&gt;Now you need to setup some env variables for your user and for your oracle user:&lt;/p&gt;

&lt;pre xml:lang="javascript"&gt;
export ORACLE_SID=XE
alias vi='vim'
export ORACLE_BASE=/u01/app/oracle #(or just $HOME for oracle user)
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/xe
export ORACLE_TERM=xterm
export _EDITOR=vim
export NLS_LANG=american_america.utf8
export TNS_ADMIN=$ORACLE_HOME/network/admin
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$ORACLE_HOME/bin:$PATH
&lt;/pre&gt;

&lt;p&gt;I found that the paths are a bit different if you’re installing 10g. Here’s what worked for me:&lt;/p&gt;

&lt;pre xml:lang="javascript"&gt;
export ORACLE_SID=XE
alias vi='vim'
export ORACLE_BASE=/usr/lib/oracle/xe/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/server
export ORACLE_TERM=xterm
export _EDITOR=vim
export NLS_LANG=american_america.utf8
export TNS_ADMIN=$ORACLE_HOME/network/admin
export ORA_NLS33=$ORACLE_HOME/nls/data
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$ORACLE_HOME/bin:$PATH
&lt;/pre&gt;

&lt;h2&gt;Troubleshooting&lt;/h2&gt;

&lt;p&gt;In $TNS_ADMIN/tnsnames.ora, your computer’s hostname is used in the default XE config. But for me, my hostname was not resolvable. Either add it to /etc/hosts or get a DNS entry for your host...or just change this to localhost, which is what I did.&lt;/p&gt;

&lt;p&gt;Eventually you’re going to start getting an error like this due to the fact that XE limits the number of concurrent connections too much:&lt;/p&gt;

&lt;pre&gt;
org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: Listener refused the connection with the following error:
ORA-12519, TNS:no appropriate service handler found
The Connection descriptor used by the client was:
localhost:1521:XE
)
&lt;/pre&gt;

&lt;p&gt;So let’s up this limit with the following commands:&lt;/p&gt;

&lt;pre xml:lang="bash"&gt;
sqlplus system/Oracle10
alter system set processes=150 scope=spfile;
quit;
sudo /etc/init.d/oracle-xe restart
&lt;/pre&gt;</summary>
		<content type="html">&lt;p&gt;At my work we are now using Oracle 11g database. The production version of this thing is quite hefty so I wanted something lighter while developing on my laptop. Oracle provides a lightweight edition called Oracle XE. Unfortunately I had to install 10g (see compatibility notes below). Using 10g instead when the rest of the company is on 11g has only caused me one pain point so far and I was able to work around it. I'll explain more later. So, without further ado, here's what I learned when trying to get this sucker installed.&lt;/p&gt;

&lt;h2&gt;Compatability notes&lt;/h2&gt;

&lt;p&gt;I mentioned above that I had to use 10g since I'm running 32 bit. Here's some more specific notes about what version you have to use for various platforms.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If you have 64 bit Ubuntu/Debian, then you have to follow the alien instructions below.&lt;/li&gt;
&lt;li&gt;If you have 64 bit RedHat, Fedora or CenOS, just skip the alien stuff and install the RPM directly.&lt;/li&gt;
&lt;li&gt;If you have a 32 bit linux OS (like me), install Oracle 10g XE instead. There are packages for lots of distributions in that version so nothing special is required.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Prerequisites&lt;/h2&gt;

&lt;p&gt;You need a JDK. For Ubuntu, I just installed openjdk-6.&lt;/p&gt;

&lt;pre xml:lang="bash"&gt;
sudo apt-get install openjdk-6-jdk
You also need ant installed
sudo apt-get install ant
&lt;/pre&gt;

&lt;h2&gt;Converting 11g 64 bit RPM into a .deb using Alien&lt;/h2&gt;

&lt;p&gt;Download the RPM from Oracle's website. The instructions below assume you have a copy of it. Note: I got a few weird errors while installing this, but it seems that they were benign.&lt;/p&gt;

&lt;pre xml:lang="bash"&gt;
sudo apt-get install alien libaio1 chkconfig
sudo alien -d --scripts oracle-xe-11.2.0-0.5.x86_64.rpm
&lt;/pre&gt;

&lt;h2&gt;Install the package&lt;/h2&gt;

&lt;p&gt;If you are installing an RPM, I haven't actually done that. I assume it would be easy though. If you're installing a deb (either converted by alien or a deb directly from Oracle in the case of 10g), then here's some more details.&lt;/p&gt;

&lt;pre xml:lang="javascript"&gt;
sudo dpkg -i oracle-xe-11.2.0-0.5.x86_64.rpm
sudo /etc/init.d/oracle-xe configure
#if you don’t want oracle to start automatically on boot, run this:
sudo /sbin/chkconfig oracle-xe off
&lt;/pre&gt;

&lt;p&gt;Here are the answers I gave to questions during installation.&lt;/p&gt;

&lt;pre xml:lang="javascript"&gt;
Port for Oracle Application Express: 8085 (so it doesn’t conflict with Tomcat, JBoss, etc.)
Port for DB Listener: 1521 (default)
Password for SYS and SYSTEM: Oracle11 (because this is standard)
&lt;/pre&gt;

&lt;p&gt;You should now add yourself to the dba group. When I was doing this I noticed that oracle wasn’t in this group either. Added that user too, but probably unnecessary. This will allow you to start/stop your XE database among other things.&lt;/p&gt;

&lt;p&gt;Now you need to setup some env variables for your user and for your oracle user:&lt;/p&gt;

&lt;pre xml:lang="javascript"&gt;
export ORACLE_SID=XE
alias vi='vim'
export ORACLE_BASE=/u01/app/oracle #(or just $HOME for oracle user)
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/xe
export ORACLE_TERM=xterm
export _EDITOR=vim
export NLS_LANG=american_america.utf8
export TNS_ADMIN=$ORACLE_HOME/network/admin
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$ORACLE_HOME/bin:$PATH
&lt;/pre&gt;

&lt;p&gt;I found that the paths are a bit different if you’re installing 10g. Here’s what worked for me:&lt;/p&gt;

&lt;pre xml:lang="javascript"&gt;
export ORACLE_SID=XE
alias vi='vim'
export ORACLE_BASE=/usr/lib/oracle/xe/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/server
export ORACLE_TERM=xterm
export _EDITOR=vim
export NLS_LANG=american_america.utf8
export TNS_ADMIN=$ORACLE_HOME/network/admin
export ORA_NLS33=$ORACLE_HOME/nls/data
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$ORACLE_HOME/bin:$PATH
&lt;/pre&gt;

&lt;h2&gt;Troubleshooting&lt;/h2&gt;

&lt;p&gt;In $TNS_ADMIN/tnsnames.ora, your computer’s hostname is used in the default XE config. But for me, my hostname was not resolvable. Either add it to /etc/hosts or get a DNS entry for your host...or just change this to localhost, which is what I did.&lt;/p&gt;

&lt;p&gt;Eventually you’re going to start getting an error like this due to the fact that XE limits the number of concurrent connections too much:&lt;/p&gt;

&lt;pre&gt;
org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: Listener refused the connection with the following error:
ORA-12519, TNS:no appropriate service handler found
The Connection descriptor used by the client was:
localhost:1521:XE
)
&lt;/pre&gt;

&lt;p&gt;So let’s up this limit with the following commands:&lt;/p&gt;

&lt;pre xml:lang="bash"&gt;
sqlplus system/Oracle10
alter system set processes=150 scope=spfile;
quit;
sudo /etc/init.d/oracle-xe restart
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/SynchrosInteractiveBlog/~4/piagkXkviAI" height="1" width="1"/&gt;</content>
	<feedburner:origLink>http://www.synchrosinteractive.com/blog/1-software/75-oracle-xe-on-ubuntu-1104-32-bit</feedburner:origLink></entry>
	<entry>
		<title>Gnome Terminal Tab Titles</title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SynchrosInteractiveBlog/~3/glzpIH5QSw4/74-gnome-terminal-tab-titles" />
		<published>2011-11-04T16:34:39Z</published>
		<updated>2011-11-04T16:34:39Z</updated>
		<id>http://www.synchrosinteractive.com/blog/10-tech-a-gadgets/74-gnome-terminal-tab-titles</id>
		<author>
			<name>Dustin McQuay</name>
		<email>dmcquay@gmail.com</email>
		</author>
		<summary type="html">&lt;p&gt;I love screen. One of the things I love about it is that I can name the windows. When I get too many tabs open in Gnome Terminal it gets really hard to keep track of things. There are definitely times when I'd prefer to just use Gnome Terminal without screen if it weren't for that issue. Well it turns out that you can easily name the tabs in Gnome Terminal by right clicking them and choosing "Set Title...". I'm not sure if this is new or if I'm just a dork and never noticed it, but this is great! Just one of those little details that will make a big difference for me.&lt;/p&gt;
&lt;p&gt;&lt;img src="images/stories/gnome-terminal-tab-set-title.png" alt="Set Tab Titles in Gnome Terminal" title="Set Tab Titles in Gnome Terminal" style="width:600px" /&gt;&lt;/p&gt;</summary>
		<content type="html">&lt;p&gt;I love screen. One of the things I love about it is that I can name the windows. When I get too many tabs open in Gnome Terminal it gets really hard to keep track of things. There are definitely times when I'd prefer to just use Gnome Terminal without screen if it weren't for that issue. Well it turns out that you can easily name the tabs in Gnome Terminal by right clicking them and choosing "Set Title...". I'm not sure if this is new or if I'm just a dork and never noticed it, but this is great! Just one of those little details that will make a big difference for me.&lt;/p&gt;
&lt;p&gt;&lt;img src="images/stories/gnome-terminal-tab-set-title.png" alt="Set Tab Titles in Gnome Terminal" title="Set Tab Titles in Gnome Terminal" style="width:600px" /&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SynchrosInteractiveBlog/~4/glzpIH5QSw4" height="1" width="1"/&gt;</content>
	<feedburner:origLink>http://www.synchrosinteractive.com/blog/10-tech-a-gadgets/74-gnome-terminal-tab-titles</feedburner:origLink></entry>
	<entry>
		<title>Yahoo! Cocktails</title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SynchrosInteractiveBlog/~3/Jsz9Ka55FPQ/73-yahoo-cocktails" />
		<published>2011-11-02T22:32:37Z</published>
		<updated>2011-11-02T22:32:37Z</updated>
		<id>http://www.synchrosinteractive.com/blog/9-nodejs/73-yahoo-cocktails</id>
		<author>
			<name>Dustin McQuay</name>
		<email>dmcquay@gmail.com</email>
		</author>
		<summary type="html">This could be the future of web development.

&lt;a href="http://developer.yahoo.com/blogs/ydn/posts/2011/11/yahoo-announces-cocktails-%E2%80%93-shaken-not-stirred/"&gt;http://developer.yahoo.com/blogs/ydn/posts/2011/11/yahoo-announces-cocktails-%E2%80%93-shaken-not-stirred/&lt;/a&gt;</summary>
		<content type="html">This could be the future of web development.

&lt;a href="http://developer.yahoo.com/blogs/ydn/posts/2011/11/yahoo-announces-cocktails-%E2%80%93-shaken-not-stirred/"&gt;http://developer.yahoo.com/blogs/ydn/posts/2011/11/yahoo-announces-cocktails-%E2%80%93-shaken-not-stirred/&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/SynchrosInteractiveBlog/~4/Jsz9Ka55FPQ" height="1" width="1"/&gt;</content>
	<feedburner:origLink>http://www.synchrosinteractive.com/blog/9-nodejs/73-yahoo-cocktails</feedburner:origLink></entry>
	<entry>
		<title>Programming Puzzle Websites</title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SynchrosInteractiveBlog/~3/jh54b4WEr-o/72-programming-puzzle-websites" />
		<published>2011-07-15T05:21:03Z</published>
		<updated>2011-07-15T05:21:03Z</updated>
		<id>http://www.synchrosinteractive.com/blog/8-miscellaneous/72-programming-puzzle-websites</id>
		<author>
			<name>Dustin McQuay</name>
		<email>dmcquay@gmail.com</email>
		</author>
		<summary type="html">&lt;p&gt;I thought a few of these looked pretty interesting...&lt;/p&gt;

&lt;p&gt;&lt;a href="http://sixrevisions.com/resources/10-puzzle-websites-to-sharpen-your-programming-skills/"&gt;10 Puzzle Websites to Sharpen Your Programming Skills&lt;/a&gt;&lt;/p&gt;</summary>
		<content type="html">&lt;p&gt;I thought a few of these looked pretty interesting...&lt;/p&gt;

&lt;p&gt;&lt;a href="http://sixrevisions.com/resources/10-puzzle-websites-to-sharpen-your-programming-skills/"&gt;10 Puzzle Websites to Sharpen Your Programming Skills&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SynchrosInteractiveBlog/~4/jh54b4WEr-o" height="1" width="1"/&gt;</content>
	<feedburner:origLink>http://www.synchrosinteractive.com/blog/8-miscellaneous/72-programming-puzzle-websites</feedburner:origLink></entry>
</feed>
