Tuesday, December 16, 2008

For Future Reference

Running without being able to put much weight on the balls of your feet is a lot like running in dry sand.

Don't get a passport photo from the post office.  Just go to Rite Aid.  It's cheaper and nicer.

Babies will smile big huge cute smiles in their passport photos because they are inherently happy creatures.

Thursday, December 11, 2008

Command Line Speed Demon

It will never cease to amaze me how people freak out when I open a command line and type instead of clicking around in the gui to do something simple.  You'd almost think they hadn't used a computer before Windows XP came out.

Friday, December 05, 2008

Running the Liferay Tomcat Bundle as a Service

Liferay, when bundled with Tomcat 5.5 (maybe 6 too, I dont know) can be run as a windows service pretty easily with a few simple commands.  These instruction assume you have already succesfully run the program from the command line and clicked around inside the application some.

  1. Open a command prompt (Run "cmd")
  2. navigate to the liferay bin folder
    c:
    cd \liferay-portal-tomcat-5.5-5.1.2\bin
  3. Install the windows service:
    service.bat install
    (You should get a success message)
  4. Launch the tomcat service manager program thingy
    tomcat5w.exe
  5. Change "Startup Type" to Automatic
  6. In the Java tab, append these options, one per line, to the very end of "Java Options":
    -XX:MaxPermSize=256m
    -XX:+UseConcMarkSweepGC
    -XX:+CMSPermGenSweepingEnabled
    -XX:+CMSClassUnloadingEnabled
    Make sure there are no spaces at the end of the options lines and make sure each option is on its own line!  This can waste hours of your time!  If MaxPermSize doesn't work then you almost certainly have a space messing you up or you're missing a carriage return.
  7. Go back to the general tab and start the service.  That's it!
The other option to make this work without step 6 is to use BEA or IBM's version of the JDK.  Those versions of Java do not have Permanent Generation space which is memory reserved for Classloaders that normally never gets garbage collected.  The three options under MaxPermSize are meant to garbage collect that permanent generation space, but I found that I still needed to increase the size of it anyways.  Liferay does use Hibernate for ORM, and a lot of people have said that Hibernate is the real problem.  I'm not sure, I just made it work.

Thursday, December 04, 2008

I Need a Better Search Engine

Google no longer searches for what I type. It is programmed to treat people like total idiots. If you search for a plural (even if you put + in front of the search term), it also returns nonplurals, infinitives, and gerunds. If you search for a something like "TempGetStateItem", it will try to correct it to some nonsensical crap. You can't search for anything with parentheses, slashes, quotes, or dashes. If you specify -linux in your search, you will get results that have the word "linux" and if you search for +linux, you will get results that don't have the word linux. Words inside quotation marks will be searched separately. And the worst part is that MSN search and Yahoo search still don't return results that are as good. Google is actively trying to drive people away and I wish I had a decent alternative that wasn't just an aggregator. Oooor, here's an idea for Google Labs: "Uncorrected search -- where you get what you ask for". I just want to find the docs I need quickly without having to stroke the ego of these dorks that think people want "features" like these.