Posts

Showing posts from May, 2008

Put Apache Tomcat in its own directory, and your web applications in another

I recently took my first look at Apache Tomcat 6.0. I was inspired by Tomcat: The Definitive Guide, 2nd Edition , which covers Tomcat 6.0. It mentioned a way to separate the actual Tomcat distribution and binaries from the webapp data, but described it for environments that had it pre-installed as an RPM or DEB package. As I'm writing this, the latest version is 6.0.16. Here's what I had to do to get my webapp code in a separate directory tree from the Tomcat binaries as downloaded straight from tomcat.apache.org . Create a directory, say /home/joshuago/domain.com , where all the webapps for that domain are going to be. Set CATALINA_BASE to the directory above. (Don't set CATALINA_HOME.) Move conf , logs , temp , and webapps directories to /home/joshuago/domain.com/ . Run apache-tomcat-6.0.16/bin/startup.sh script as usual. Start developing at /home/joshuago/domain.com/webapps/ROOT/ . Change the directories as convenient or as suits best practices for your particular envir...

A fix for LaTeX "Missing $ inserted." console message

While I was running pdflatex on a .tex file containing a math expression, I got this error message: Missing $ inserted. Powering through it would evaluate the math expression adequately, but I included a plus sign later in the same sentence. I followed the directions and made it convert to a PDF beautifully by adding a dollar sign at the beginning and at the end of the math expression. (It's not just at the end-of-the-line, like I would normally guess it meant in a Unix environment.) So, what started off as 9*2^4 turned into $9*2^4$ and produced a beautifully formatted PDF. I should also note that Norm Matloff has a great introduction to LaTeX . EDIT: This one's even better. It just took a while to load and I got impatient.

Observations about making money from open source

Open source is a great thing and I've personally benefited tremendously from it. It has let me deepen my knowledge, given me entire software platforms to invest my energies in, and has opened up a wide landscape of job opportunities. For a company though, it's pretty challenging to make money from it, and I recently I got around to thinking what successful companies in open source have done. Arguably, Red Hat is the most successful open source software company out there. They came to mind not only because their product portfolio is mostly based on open source or that they've been around for a long time (relatively speaking), but because I actually use their products and find value that I willingly pay for. Good for them. But I wanted to figure out what it was they did in very general terms, because I'm definitely not going to try to take them head on. Open source software has its strengths and weaknesses, where the strengths and the value produced often tend to accrue t...

Why the office of U.S. President should be available to all citizens

Under our current Constitution, an American citizen is an American citizen — except when it comes to the presidency. There are American citizens who will never be able to attain the highest office in the land, even with distinguished military service, community involvement, or a track record of political achievements. The one differentiating factor that isolates these citizens from the rest is that they happened to be born in another country, to parents who were not American citizens. This means that foreign-born American citizens — whether they were born in Mexico, the United Kingdom, Canada, Germany, China, or India — can never be President. Nevertheless, the United States is one of the most accepting countries in the world when it comes to citizenship. Acquiring United States citizenship is a long and arduous process, but in theory it is open to all. And as many of us know, there's so much to be done and so much that could be done aside from coveting the presidency....