Aug 31 2008

Cool Twitter Plugin For WordPress…

Category: BloggingPhil @ 9:01 pm

Nothing fancy, but I installed the Twitter WordPress Sidebar Widget tonight… Now that I have a Twitter client on Ubuntu, I figured it was time to start sending out a few tweets. I’m tired of my sister yelling at me about not tweeting anymore!

Aug 31 2008

Setting Up Eclipse / Tomcat Integration

Category: EclipsePhil @ 8:05 am

Hopefully, this will jump start your Eclipse-Tomcat Integration. It is not really that hard, but I made some assumptions that wasted a bunch of time. I’m not sure if this is completely correct, but it will minimally allow you to deploy and debug multiple web applications from within Eclipse.

The first step is to connect a Tomcat server installation with Eclipse. This is simple, but had the first gotcha. It appears that the Tomcat installation must be “writable” by the user id running eclipse. I selected my default Ubuntu Tomcat installation, which was owned by root, and I could never associate it with a project. So, on a whim I installed another copy in my home directory (/home/phil/software/apache-tomcat-6.0.18) and solved the problem. I’m not exactly sure why the image has to be writable, but I did not want to spend any more time on that problem. Once you have Tomcat installed, goto Window / Preferences / Server / Runtime Environment in the Eclipse menu. Click the Add button and select Tomcat6.0, and your new Tomcat installation. I have mine wired to Sun’s Java 1.6 JRE, but don’t know if I’ll be using any 1.6 features.

For the next step, you have to create a “Dynamic Web Project” or convert an existing one. This is required for the deployment process to work; Eclipse will not recognize any other project types. There are just a couple of configuration lines that need to be added to your .project file if you want to convert and existing project. However, you project must be in the proper format (directory structure) for this to work. The simplest way is to create a new “Dynamic Web Project” and compare the .project file to your current one; copy the changes over and you should be good to go. When you see the little blue world icon next to the project name, you know it worked.

Now it is time to configure your server instance. You need to add the “Servers” view on whatever perspective you are using; this is typically done under Window / Show View / Other menu from Eclipse. On the Server view, right click and select New / Server. Select the appropriate Tomcat version and leave all of the other options alone. Click the Next button and you will be able to “Add and Remove Projects” for this configuration. Select your web project, click Add, followed by the Finish button.

At this point, you will see the Tomcat instance added to your view. The most interesting thing to me, was that a “Servers” project was created in the “Project Explorer” view. It appears to be a copy of all of your Tomcat configuration files. This originally confused me, as I tried to access the Tomcat administration pages and generated a ton of page not found issues. It appears that this is running a minimal Tomcat configuration, and nothing but your projects are deployed with this configuration. This configuration seems to be “disconnected” from the installation directory. There appear to be a couple of ways to configure the instance, but the more I thought about it, I figured it really did not matter! This was simple and worked; all I really need to do is compile, deploy, and debug my web application.

The real convenience is in the Servers tab. You can start and stop your instance from this view. Additionally it will automatically synchronize and restart the server based on what is happening within the web project. The best part is that when you start Tomcat in debug mode, all breakpoints will be recognized and Eclipse will switch over to the Debug perspective if it hits one. No messing around with connecting to running Tomcat instances, just plain and simple, just like debugging any other Java unit test or application.. .

Aug 25 2008

jUnit 4.x Test Suites…

Category: Java,TestingPhil @ 8:11 pm

Have you ever wanted to run all of your jUnit tests from within Eclipse? It is pretty easy if they are in the same package, but if you have a hierarchy of packages, you are out of luck! I learned quite a few jUnit tricks tonight, even found the exact code I was looking for. You can read about some annotation-based test suites at this site. This guy gave me the exact code I was looking for, maybe someday they will add this feature directly to jUnit!

I’m still digging Unitils as well… I found a cool annotation to rollback the transaction for a specific test case. This is kind of nice when you don’t want your jUnits messing up your database! Check this out…

public void validateLoad() {…}

Aug 22 2008

Late to the party….

Category: MusicPhil @ 9:04 pm

I have been aware of Pandora for a long time, but never bothered to mess with it…. I have been using the limited stations on Rhythmbox, since I don’t yet have my music library configured on the Linux box. I was not sure if their fancy web page would even work on Linux, but I finally broken down tonight and created a Pandora account, it worked like a champ. Everything is much cooler on Linux! I sure hope Pandora does not crash and burn, as I read on Slashdot this week; as it is amazingly cool. The music it picks is dead on… I don’t think I’ve heard a bad song yet! I might need to upgrade my sound system at work!

Aug 19 2008

Linux, It just works?

Category: UbuntuPhil @ 8:28 pm

I bought a new UPS for my computer tonight, I think it was a pretty good deal from Staples…. only $50. I have been looking for a reasonably priced unit for some time now, but found no really good deals. So, what really amazed with with this one, was the fact that you could download Linux software for it, and it actually works! Pretty cool, it even gave me a little icon that shows it was working. There is a small daemon that runs which communicates with the UPS unit. You can configure the daemon to respond to multiple events, such as power failures or low battery status. I know this is not big deal, as this functionality has existed for Windows-based solutions for many years, I was just really surprised it worked so easily. Just plug it in and run the setup program. Now I’m ready for all of the power hits we get out here in the country!

Aug 17 2008

Neat little Screenlets for Ubuntu

Category: UbuntuPhil @ 3:33 pm

Probably doing more messing around than I should be, but I think I’m finally done. My main goal is no more Microsoft Windows! We have a laptop which I will use to do my checkbook and any other mundane tasks, but everything else I want to do on this new machine. When I was looking for software to install to make the machine feel more slick, I happened upon I don’t think I’m a big fan of the implementation, but they do look pretty cool! All of the screenlets are written in python, and creates a 10 to 20 meg python process. When I first started playing with the tool, I think I chewed up about 70% of my memory! I have sence upgraded to 4Gig of 1066 OCZ Reaper memory, so I’m not going to worry about a few python processes! There are a boat load of widgets, but I am only using a few to monitor the behavior of my new machine.

Aug 13 2008

Cool Image Viewing Plug-in

Category: EclipsePhil @ 9:00 pm

Just installed a nice little image viewer for Eclipse tonight… called QuickImage. Seems to work pretty cool, has lots of nice features. You have view thumb nails size pictures, easily navigate around a big picture, and some in see more detail on the image.

Works pretty slick when you are looking at a big ERD or UML diagram.

Aug 13 2008

Back to blogging at home…

Category: BloggingPhil @ 7:56 pm

Now that I have my new box all setup, single boot, no windows, only have Ubuntu 64-bit running on it, it was time to setup WordPress again!

I really wanted to find a better way to publish than using the internal blog publisher, so I gave ScribeFire a try… Only played with it a little bit tonight, but is was super easy to configure and seems to work pretty well. I have not tired a fancy post yet, but it seems to have lots of nice features.