Archive for the ‘Technology’ Category

New Dojo Tree Functionality

Thursday, December 18th, 2008

Dojo has just accepted code from Spider Strategies into the toolkit that allows dragging and dropping hierarchical data in a tree format “between” places in the structure!

Dojo drag and drop between

Like the folder tree we’re all familiar with, we get accustomed to dragging and dropping things from one place to another.  Many of these structures, like file folders, don’t care about the order of the contents. They can sort by things like size or name, but don’t store the order of data.

For more complex data structures, like those in CMS, the order of the data is an important part of the information. Thanks to the code we sent to Dojo, data in a tree can easily be moved from anywhere to anywhere. Previously, you could only drag and drop things into a location. Now it is possible to position things before or after other items, allowing users to intuitively manage their data.

Using Chainsaw for Log Viewing

Wednesday, July 11th, 2007

If you’re a programmer, no doubt you’ve the occasional, if not constant, need to read the logging statements generated by your application. I know that I’m constantly reading log output, which is why I’m thankful for a tool like Chainsaw v2. Despite having a not-yet-complete feel to it, Chainsaw has become an invaluable tool in my programming environment. Recently I discovered a hint that I should have known a long time ago, which increases its usability tenfold.

Configuring log4j and Chainsaw is a breeze. Once you’ve downloaded it, configure your log4j to use a SocketAppender. Here’s a snippet from my own log4j.properties:

log4j.logger.com.spider=DEBUG, CHAIN
log4j.appender.CHAIN=org.apache.log4j.net.SocketAppender
log4j.appender.CHAIN.remoteHost=localhost
log4j.appender.CHAIN.port=4238
log4j.appender.CHAIN.locationInfo=false

Here I’ve set up an appender named ‘CHAIN’ on port 4238. Its running on the same machine as my application (hence ‘localhost’), but it could just as easily point to a Chainsaw instance on another computer.

Next, add a “SocketReciever” within Chainsaw. The important property is ‘port’, which must correspond the value in your log4j.properties:

Chainsaw receiver configuration

That’s it. Your log messages should go to chainsaw, where you can navigate and search with ease. Here are a couple tips for Chainsaw use, including my own recent discovery:

  • Create an XML receiver file and configure Chainsaw to use it upon startup. This way you won’t have to redefine the receiver each time. See “View example Receiver configuration” on Chainsaw’s welcome tab.
  • Use the ‘Refine Focus’ field when you need to get at specific log statement or logger. You can use the “=~” operand for partial matches. For example, if you want to display only log messages from the Logger named “ServiceClassWithLotsOfLogging”, you can type “Logger ~= LotsOf” in refine focus. This same technique can be used for messages as well: “msg ~= some logging text”. Wish I had known this a long time ago!

If you’ve multiple monitors (or computers), I think you’ll find that 2nd monitor makes a great home for Chainsaw.

Happy coding!

~ Keith

Web 2.0 Simplified

Friday, May 25th, 2007

Found this wandering around the web and it is a very entertaining explanation of what Web 2.0 is all about. We are very quickly moving towards the future where the internet is more and more interactive. We are no longer just passive observers of the information, but are now active participants modifying, using, and accessing the data real time. Spider Strategies has been on the forefront of Web 2.0 technologies because we realized at the very beginning, that Web 2.0 was the future for both the internet and web applications.

Our customers don’t want to just look at their data, they want to use it. They want to be able to modify, manipulate, and manage their data. The process for doing so shouldn’t be an entirely new process to learn and manage. Working with the data should be as seamless as any other administrative task. That is what CMS is all about. Designed to work just like any other web page, it requires no special training, and users can quickly find, edit, and share data as quickly as doing a Google search.

You Had Me at Softlinks

Wednesday, April 25th, 2007

Last week Ubuntu 7.04 was released. I thought I’d contribute to the hype by talking about why I love Linux. Before I do though, I just want to say I am not a zealot. I believe in the right tool for the right job — and I’m even forgiving of not-quite-so-right-but-comfortable tool for the right job. I use Windows all the time, but when it comes to development, I prefer Linux hands down.

I’m relatively new to the party. A couple years ago I had been hired at a Linux-only development shop. Fortunately, even two years ago, it was relatively easy to transition from Windows to Linux. Which isn’t to say there isn’t much to learn — but even with a shallow knowledge of Linux it was easy for me to get around. Like many programmers though, I need more than shallow knowledge, and began delving into the OS’s nuances.

Its through this exploration that I began to appreciate Linux. These short, terse commands I entered at the command-line — these aren’t just tools, they are the collective wisdom of the ancients. My handy bash-scripting reference talks about the evolution of the “echo” command for two pages! Clearly, most of the basic concepts of Linux have been honed and polished for two decades, and truly I feel as if I’m standing on the shoulder of giants with each “sed” or “cat” invocation.

Granted, you don’t need to know how a car works to drive it, and Linux was the same for me. Indeed, I had been piping commands to each other for years before appreciating the holy trifecta of stdout, stdin, and stderr.

For those who want to get their feet wet, you can run Ubuntu entirely from CD. There are even instructions for running Ubuntu as a virtual machine using VMWare. But doing a full-on, dual-boot installation isn’t difficult (though disk partitioning is always harrowing for me), and I’d encourage anyone to give it a shot.

Here are some reasons, in no particular order, why I prefer to do development work on Linux:

  • Command-line Console. Slowly I’m becoming a command-line ninja, and find it much easier to navigate my filesystem, and perform other operations, by typing.
  • Warm fuzzies when using open source software.
  • Softlinks. Besides being a very handy way to organize my filesystem, it never fails to make me giggle when I compare it to window’s *.lnk (“Shortcut to…”) equivalent.
  • Appropriate Verbosity. Most unix commands (cp, mv, chmod) don’t provide any output upon completion. Type “man cp” though, and you have a couple pages of describing the simple command’s functionality.
  • Easy Package installation. How do I install MySQL? “sudo apt-get install mysql”
  • Multiple Desktops. One for my mail reader, one for log-viewing (via Chainsaw), and one for my IDE.

Undoubtedly there are dozens of other reasons, and I look forward to finding even more.

Windows Media Player for Firefox

Wednesday, April 18th, 2007

Are you sick of visiting sites like CNN.com with your Firefox browser and not being able to view video clips because they require Windows Media Player? Microsoft has just released a media player plug-in that should solve this problem.

Networking with Virtual PC 2007

Sunday, April 15th, 2007

I wrote a post last month about how impressed I was with Virtual PC 2007 and how it has changed the way I work. This is a follow-up about a networking problem that I didn’t discover until it was almost too late, as well as how to fix it.

I decided to install Vista Business on my laptop a few months ago, and aside from a few application compatibility issues, I’ve been pretty happy with it so far. One of the main problems is that Oracle 9i doesn’t work with Vista, and that’s a database we need to develop against. So, I fired up my Windows XP virtual machine, installed Oracle, and then connected to Oracle on the virtual machine just like I would if it were installed on another server. Everything was working smoothly… or so I thought.

A little background: The default networking option for your virtual PC is “Shared Networking.” This allows the virtual PC to share your host PC’s internet connection, but doesn’t allow the host PC to talk to the virtual PC. So, instead of using shared networking, I set the virtual machine to directly use my wireless network. Both the host PC and the virtual PC got separate IP addresses from the router, and could therefore talk to each other. The only thing I didn’t think about was that the second my laptop lost its connection to my router, I couldn’t communicate with the virtual PC.

So, there I was, minutes before a demo with an important client, and my application server couldn’t talk to my database, even though they were both on the same laptop.

The solution was relatively simple, but for some reason the information was really hard to find. First install Microsoft’s Loopback Adapter on the host PC, and then tell the virtual PC to use it for its network access. The process is explained very well here.

Version Labeling and Continuous Frustration

Wednesday, April 11th, 2007

I approach continuous integration (CI) servers in the same way I do my IDE — as a tool of convenience for performing tasks I could choose to perform manually. I would no more have a build system reliant upon a specific CI server than I would write code that was only recognized by a specific IDE. Thankfully the CI servers with which I’ve worked conform to my philosophy. They do not seek to replace your build system as much as provide much needed automation. There is one area, though, where I feel CI servers violate this ideal, and that’s creating a unique build/version label.

Out-of-the-box, most CI servers provide a simple numbering scheme in order to produce a unique label for each build. Generating a build/version label is a task I prefer to happen within the build itself, so that the build is truly self-contained. Take our builds, for example. I’ve made use of the ant task buildnumber, so, upon a build, ant reads and increments a build-number property file and appends it to the project’s “base version,” the result being a label like “1.9.0.6″, where “6″ would be the build number. I imagine this is a common scenerio — indeed its why the <buildnumber> ant task exists. Once I launch an official build via command-line, label generation happens automatically, and the repository is tagged “Build 1.9.0.6″.

Introduce the CI server, though, and suddenly I’m having to jump through hoops to accommodate this setup. At the crux of the problem is this: from the CI server’s perspective, a build starts upon checkout or update of a project, and therefore wants to know the build label prior to actually running the build. That’s putting the cart before the horse, in my opinion, although I do understand the reasoning. Should access to the repository fail, for example, the CI server is able to report “1.9.0.6 Build failed due to VCS unavailability”.

What I’ve done is create a small script whose sole duty is to fetch the next build label for the CI server — fortunately the CI servers with which I’ve worked allow for pre-build script execution in some manner or another. With CruiseControl, I use an “antbootstrapper” to invoke a small ant build named “get-next-version.xml”. CruiseControl passes the value generated from that to the official build, so ant is invoked like so: “ant package -Dbuild.label=1.9.0.6″.

However, my work isn’t done. I still must ensure that my build-number property file is accurate, even if the build.label is being provided instead of being generated. So, in addition to configuring CruiseControl in the manner described, I also must have my build.xml extract the build number from the passed label (in this case, “6″), and update the build-number file appropriately.

Granted, I imagine most folks don’t rely on ant to generate build numbers, and therefore the CI server provided functionality is a convenient mechanism. The minority of us who do, though, ought to be able to supply build labels to the server in an easier fashion.

Raving about Virtual PC 2007

Tuesday, March 20th, 2007

I think I can say this in all sincerity and without hyperbole: Microsoft Virtual PC 2007 has changed my life. Maybe I’m a little late jumping on the virtualization bandwagon, but now that I have, I’m grinning with Kool-Aid stained lips. Sure, I’ve known that the technology has been out there for a while, but for some reason I just didn’t realize how cool it would be. For me it is kind of like TiVo in the fact that it sounds really neat before you check it out, but once you’ve used it you just can’t possibly live without it.

Before I get into my thoughts and share a few tips I’ve picked up over the past few weeks, I’ll give a quick overview of the technology for those who aren’t up to speed. The idea behind virtualization is that you can use your existing computer to work as two or more computers at the same time. It’s a lot like remote desktop, but instead of viewing another computer in a window, you’re viewing a virtual computer in a window. This virtual machine has a separate operating system and installed software, but can share devices like DVD ROM drives and internet connections with the host operating system.

As you can probably guess, virtualization lends itself particularly well to software testing, where it’s often important to have access to different operating systems and browsers. With a few clicks of a mouse you can load a virtual Windows XP desktop, test your web based software on IE6, and then go right back to your Vista/IE7 desktop. If you screw up the virtual operating system you can just replace it with a backed up copy.

So, now that I have you convinced that you need virtualization, I’ll walk you through the relatively simple process of getting everything set up and configured. First of all, dig around in your bios and see if there is a configuration option for turning on virtual machine optimizations. I have a relatively new Dell laptop, and for some reason the Intel virtualization optimizations were turned off by default.

Virtualization Bios

Then download and install a copy of Virtual PC from Microsoft’s website. Sure, there’s other (and arguably better) virtualization software out there, but this is free!

So, once the software is installed create a new virtual machine. During this process you’ll be asked to define a new virtual hard disk. This is the single file that is used to store all of the virtual files for the virtual machine. Be careful with the size you choose for the disk; it’s a little confusing and I messed up the first time through. The number you choose will allow the virtual disk to grow to that size. It will not take up the space unless you actually use that much inside the virtual machine. Unfortunately, you can’t increase this later, so be careful to not choose a value that is too low. If you have extra disk space, I’d recommend going with 8 gigabytes. I’d also recomend bumping the memory up to at least 256MB or 512MB if you have a lot of memory.

Virtual Disk

Now you need to install the operating system. Put the windows install CD in the drive and fire up your virtual machine. It’s kind of strange seeing the familiar windows install screens from a desktop window, and this was my first “oh, cool” moment. Another thing I tripped over during the install was that my mouse would become stuck in the virtual machine window. To send control back to the host desktop, just hit the right Alt button.

The next step is to install the virtual machine additions inside your newly installed virtual operating system. These can be accessed from the “Action” menu and allow you to drag and drop files from the host desktop, fixes the mouse locking annoyance, and allows you to share files. This would also be a good time to download the latest OS updates from windows update and install any other software you’re going to be using.

Now that you have your virtual machine image just the way you want it, we’ll back it up. The first step is to run a disk defragmentation inside of the virtual machine. Then run the precompactor utility inside of the virtual machine. You can access this by going to the CD menu, choosing Capture ISO Image, and browsing to C:\Program Files\Microsoft Virtual PC\Virtual Machine Additions\Virtual Disk Precompactor.iso. Finally, perform the actual Virtual Disk Compression on the host machine via the virtual disk wizard (accessible under File in the console). You now have a .vhd file that is ready for backup. That way, if you screw up your virtual machine you can just replace one file and you’re back on your feet.

Please let me know in the comments if my notes were helpful or if I should change anything.

Burn Rubber, Not Gasoline

Wednesday, February 28th, 2007

I am a car nut. I also love technology. Any time these two industries meet up together, I am a happy guy. Although electric vehicles have had a rocky start the last few decades, it seems that a few companies are making leaps and bounds relatively quietly. One of the more notable, Tesla Motors, has recently been making a few headlines. Imagine a car that has Porsche-like performance, Lotus-like appearance, yet only costs about a penny per mile to drive.

Tesla Roadster

It is by no means the cheapest electric vehicle choice out there, but very well may be the most practical to date. The motivating factor behind this is the Tesla’s incredible range. The company claims a 250 mile range before needing a recharge. That takes this from being a limited commuter car to a practical second vehicle. You still can’t reasonably drive it across the country, but there aren’t many people out there with the need to drive more than 250 miles a day. All you have to do is park it in the garage at night, plug it in, and it’s ready again for you in the morning.

Electric vehicles aren’t necessarily better for the environment, but they can be. It all depends on where your electric company derives its energy source from. If they are using hydro, wind based, or other environment friendly means, then the Tesla Roadster effectively becomes a zero emissions vehicle, reduces our dependency on petroleum based fuels, and ultimately makes the world a better place for our children. The roadster is currently sold out for 2007, and orders are already being lined up for 2008. Not everyone will be able to afford one yet, but as they become more popular and mass-production options bring the initial cost down, don’t be surprised if you see one next to you at the stop light. Don’t worry though, when he leaves you in the dust, it will be a much cleaner and quieter experience than you are used to.

Web 2.0, meet Business 2.0

Tuesday, February 13th, 2007

As a gadget lover, the Consumer Electronics Show (CES) is my annual awards event of choice. Others can have the Oscars, the Grammys, and all of the Pageants combined. For me, it’s all about what new gizmos are coming out that are going to make my life easier, happier, or more productive.

This year was no different. Although life always seems to prevent me from attending, I followed the highlights from the 2007 show in Las Vegas on both CNET and the CES website. As you can see from the list of 2007 Award Winners, these gadgets are all about making life more enjoyable and perhaps even a bit more productive. CES 2007 highlighted everything from a fully voice-activated control system for your car, in the Ford Sync (through a Partnership with Microsoft), to a PDA/Smartphone designed to play TV programs.

Really? TV on a cellphone? Well, this, coupled with Steve Jobs official introduction of the Apple iPhone at Macworld 2007, got me thinking about mobile productivity in the next 2-3 years. Looking back, the last 5 years have brought the onslaught of the Blackberry, Treo, and other PDA/Smartphone generation. These devices have allowed us to get away from our desks (although never away from work), by bringing our email, documents, presentations, and even the web right to our pockets. And now, it seems, TV, videos, music, and more.

So, as the technical world and the business world further collide, will more business be done via hand-held computers? Perhaps the V- Cast and iPhone don’t convince you. But, how about the new OQO Model 2? This is a palm-sized mobile device with the specs of a PC (1.5GHz CPU, 60GB HDD, and 1GB RAM, the model 02 computer supports Microsoft’s next generation operating system, Windows Vista).

Well, since we here at Spider like to be out ahead of the curve, this got us thinking: “How are we going to embrace this new Mobile Generation?” For starters, we modified this very blog page you are reading to make it accessible via mobile-internet. That’s right, your favorite blog is now available anywhere, anytime right from your mobile device.

Treo

But, that’s not all. It’s one thing to make your Blog available via mobile internet; In the next several months, Spider will be looking to integrate mobile accessibility into our products. Meaning you would be able to access our Corporate Management Suite via any web-accessible PDA/phone.

We’re just getting started on this, but we are extremely excited about the use of this technology and what it will mean for our customers. In the mean time, if you have any ideas or suggestions on mobile-web applications, we would love to hear them.