• A Quick Fix to Being Unable To Update WordPress

    With WordPress’ 3.0.1 release, I figured I may as well update as I had just updated myself to 3.0 this week.

    Much to my chagrin , I was confronted with an error when trying to use the built in updater that WP offers. I was presented with this message when entering my login information:

    Error: There was an error connecting to the server, Please verify the settings are correct.

    Huh? I know my settings are correct. I typed it again, slowly. Still nothing. I SSH’d to my server and began digging a bit. I saw that I had changed permissions on my web directory (who remembers why?). This didn’t hamper my 2.8->3.0 upgrade as I had done it manually, but here I was.

    Thankfully, a quick permissions change got me back to the latest and greatest in no time.

    skye@skyebook: sudo chown -R www-data:www-data /my/blog/directory/
  • Updated to WordPress 3.0

    Yes I did… And it wasn’t nearly as painless as it could’ve been (or should have been, considering my luck). I’m more surprised at how long I had waited, considering the fact that I’ve been using WP3 along with BuddyPress quite heavily in preparation for the big web changes going on over at jMonkeyEngine.

    I’ve also been recently using the domain I set up a few weeks back, devstreak.net. Don’t read too much into the name though, I thought of it while drinking bottom of the pot coffee at work when I found myself in the need of a quick domain.. True inspiration!

    Did you really just read my rambling?

  • The Virtues of Solid Documentation

    I remember vividly my first programming class in college.  I remember the LAN parties and frustrated students blaming the professor for their inability to understand pointers, but most of all I remember losing points on homework for not including comments  (I also lost points for including ‘return 0;’ in my main functions).

    Needless to say, I became a comment machine.  I needed those points… it’s not like my exam grades were going to drag up my GPA!  If I didn’t lose points for trying too hard and being a jerk at that point, I should have.  I recall wasting about 30 lines on a nursery rhyme in one instance, but it was all in good fun.

    Fast forward some years and I’ve made the better part of a full jump from C++ to Java.  Comments, as well as verbosity in naming conventions, would seem to be king.  This very cool thing we know as JavaDoc has seemingly turned every programmer into a technical writer virtually overnight.  Along with the usual language ineptitude that is so prevalent among the technically inclined, there does also seem to be the occasional developer with a clue about writing form (or at least how to construct a complete sentence).

    Its fascinating what a relatively small investment in time can do for code.  By simply writing comments, IDE’s suddenly spring to life with documentation just by hovering over method calls!  In-source documentation isn’t everything though, and eventually we all must embark upon the daunting task of compiling some sort of human digestible document about our efforts.

    This time its for Betaville, and thank goodness its not me taking the lead (Disclaimer: I absolutely love writing, but I’m cramming 22 hours of Betaville into a day over the past year or so; I’m running out of space).  I have, however, had the opportunity to contribute a nice chunk of writing to the effort.  Its an impressive document to see come together, and I felt some familiarity with the wording as I read over (and wrote additions to) it in some places.  It finally hit me that much of what is written has been derived from JavaDoc already in the code base!  It was exciting to think that the comments being written throughout the application over all this time finally mean something to more than three people, but the real bonus is how much time this head start has likely saved.  Its a nice feeling, to say the least.

    Now with a bit of a prompt, I’ve embarked on writing better database documentation for the project.  This is kind of an awkward area as the database should, by nature, be fairly self-explanatory if one is already familiar with the application it is supporting.  To this extent, I haven’t seen much in the way of documentation with the exception of what the WordPress team puts out.  It seems acceptable, but doesn’t provide much more information than a UML-styled chart would provide.  Hopefully I can improve on this a bit in my own efforts, but I suppose we’ll find out about that at a later date.

    It is funny though, as I reminisce about that first semester of college I find myself very much in need to gather some people and play the PC Halo demo over LAN once more.  Ah, simple times.

  • 5 Kitchen Habits Befitting a Hanging

    I have a bit of an obsession with the kitchen being kept just right.  You can laugh and show me pictures of my desk and bedroom all you want, but the kitchen is serenity and I demand perfection.  Over the years I’ve developed a particular intolerance for a few habits, so here we go.

    1. Empty Ice Trays in the Freezer – Who is doing this?  We have 7 ice trays for four people, how is it at all possible that they are all empty.  Perhaps more importantly I should ask why exactly do we have so many ice trays?

    2. Shopping Bags as Garbage Bags – First, don’t flame me for not having recyclable bags made of hemp or something.  Now, who’s the lazy one who can’t change a full garbage bag?  You’ve certainly got a lot of nerve hanging it on a drawer 18 inches from the waste basket, and don’t tell me its a bear bag.

    3. Jelly in the Cream Cheese Container – This is particularly infuriating.  I’m an exclusive consumer of cream cheese rather than butter with my bagels and I’m not looking to try anything new.  Cream cheese and jelly together looks terrible;  special mention for the moron who gets a bunch of poppy seeds in there too.  Ditto for that winner who gets jam in the peanut butter jar.

    4. Salad Dressing Left Out of the Fridge – Hey guess what?!  The label says “Refrigerate After Opening” for a reason.  No worries though, if the turned ranch dressing doesn’t kill you then I will.

    5. Dirty Frying Pans on the Stove Top – This needs no introduction, just stop doing it.  If you aren’t going to clean your dishes, then please don’t leave a pan full of olive oil used for God-knows-what sitting around.

    There you have it.  Rest assured there are many, many other things which provoke me to violence but this will have to do for now.  Do me a favor and never let me see you doing this and we’ll be cool.

  • The Ubuntu Tomcat Disaster

    I’m generally not a big Ubuntu user on the desktop and am rather fond of my usual choice of Gentoo that I’ve grown quite accustomed to setting up.  Desktops get plain old Gentoo and the laptops get Sabayon (so I don’t spend all of my time configuring wireless).  On the other hand, I’ve gained quite a bit of respect for Ubuntu Server over the past year or so.

    In the usual Ubuntu fashion, its extremely quick and very easy to get a LAMP server up and running.  This is a nice plus for me when I seem to have a habit of installing and trashing virtual machines on a near weekly basis.  I’d gotten to like it so much that I even started setting it up on dedicated hardware, that’s right: machines of importance.  Dodging the occasional quirk here or there (in one release I had to change my version of Vi to get syntax highlighting working and properly configurable), its worked admirably.

    I even had a good experience come from a bad one which was an Apache update that caused a server to stop serving PHP files.  Of course, this happened over a weekend so by the time I got to access the box on Monday I was furious and hesitant to touch Ubuntu anymore.  After realizing that the only install disk I had around was an Ubuntu Server CD. I convinced myself that the problem was caused by Synaptic and went on my way.  Once again the install blew me away in its speed and I was back up in a few hours.

    Recently though, I’ve encountered an oddity that is simply too much to bear.  I’ve had Hudson set up and running on an old Debian install for a long time.  I like it for its simplicity, price, and awesome mascot-man.  Oh yeah, and it works quite well!  Distribution as a WAR file makes deployment easy.  I just set up a home directory for Hudson, drop it into an application server, and build away.

    When it came time to set up continuous integration for Betaville’s server software, I apt-getted in the usual Ubuntu fashion and grabbed Tomcat 6.  The install went and port 8080 brought me to Tomcat’s “It Works!” page it which point I praised the Canonical gods just a little more.  As soon as wget had completed downloading the Hudson WAR, I dropped it in and waited for Tomcat to do its thing.

    And I kept waiting.  I now started wondering what was going on.  I remembered having seen two Tomcat directories, /usr/share/tomcat6 and /var/lib/tomcat6, each with their own webapps folder.  The version in /var seemed like the logical place to put one’s webapps, but I changed it just in case.  No joy in the /usr directory either.  Now I’m flustered.

    As the number of tabs in firefox grew I began to sense desperation setting in.  More and more tabs were showing up where I’d find a Google result or two which would promptly be closed.  As the minutes ticked on I was reduced to a bunch of useless tabs of Google results that had gotten me nowhere.

    I eventually got myself to Hudson’s dashboard.  In Ubuntu’s wonky wisdom, their Tomcat package has the security manager set to ON by default.  Is it smart thinking?  Probably.  I just find it strange that Tomcat is totally locked down in an operating system that leaves iptables completely open immediately post installation.  Now, back to the task at hand.

    So I sort of made it to the Hudson dashboard, in that I now had some errors having to do with Hudson not being able to create some folder.  The good folks at that project handily provide a link right in the error page to their wiki which details how to sort it all out.

    This is the page that I was brought to.

    Now, it says I need to set CATALINA_OPTS, or failing that, create an environmental variable called HUDSON_HOME.  After I do one or the other, I’m to run “catalina.sh start”.  Now the fun starts again as I come across this beauty of an error:

    /usr/share/tomcat6/bin/catalina.sh: 357: cannot create /usr/share/tomcat6/logs/catalina.out

    Cool!  A permissions error!  I know how to fix those!  Long story short, I tried a seemingly endless number of permissions and users to no avail.  Heck, I tried things that no one should allow a machine talking to the internet to do and still came up empty.

    After devoting an embarrassing amount of time to this, I tried to jump ship to Jetty.  Of course, I already had Tomcat installed so getting Jetty to serve on 8080 took a moment, and eventually never happened (this is once again an installation done from an Ubuntu package).  I was now installing OpenSUSE in a virtual machine on my desktop thinking I’d just get Hudson working and build and SCP the application JAR’s up to the server when it detected a change in the SVN repository.

    Before I could finish, however, I came across an interesting tidbit on my last remaining friend, the Hudson wiki.  It seems that Hudson comes with an application server, one that I’d never heard of, already bundled.  In under fifteen seconds I had Hudson running on the Winstone (incidentally, there is a pretty funny, if raunchy story behind the name) container with a single command:

    java -jar hudson.war

    After recognizing my mistake, I quickly recanted and added nohup to the command, allowing me to keep the application running after I’d closed my shell.  With this, I’d put to rest hours of frustration with literally a single command.  It doesn’t get much sweeter than that.  Hudson and Winstone have been running like clockwork for the better part of 48 hours now.  Now I can finally get back to the projects that were waiting on it!

    Needless to say, I think my days of using Ubuntu Server are numbered.  Too much about how it handles itself just isn’t normal.  Because of this, I’m forced to restrict most of my troubleshooting to looking around Ubuntu-centric hangouts.  I was fairly impressed with OpenSUSE’s installation process the last time I went through it, perhaps its time to put Novell to test one more time?