6 Computer Tips from a Geek

As a software developer, I work with computers all day every day. Some things that for me are second nature, I discovered are not at all obvious to someone who doesn’t use a computer as often. So, I thought I would write up 6 tips that can save you a lot of time if you are having trouble.

  1. If you are trying to learn a new program, try playing with it for a few minutes. (Play? Yes, this is actually fun for geeks.) Don’t try to accomplish a specific task. You don’t know the program yet, so you won’t get anywhere. Instead, hover your mouse over icons so you can read their descriptions and click on menus and read the options. Try out any options that sound useful or unclear. A few minutes playing with a program is often more beneficial than hours spent in training or reading a manual.
  2. If you don’t know how to do something, type what you are trying to do into Google. Usually someone else had the same problem and posted the solution on the web. The great thing about this tip is it applies to all sorts of things, not just computers. I know, I know, this is a pretty obvious tip, but I’m still surprised how often I have to remind myself to check Google. For example, for years I’ve had trouble picking a halloween costume, and it didn’t occur to me until I wrote this article that I should ask Google. Sure enough, there is a detailed article on wikiHow that is very helpful.
  3. If something doesn’t work, try it again. Technology these days is incredibly complex, and temporary glitches are common.
  4. If a web page or web application doesn’t work, try another browser. Government and some corporate web sites sometimes only work with older browsers like IE7 or IE8. Most other sites work best with a modern browser like Firefox, Chrome or Safari.
  5. If a program doesn’t work, try restarting the program. If you are using a web application, restart the whole web browser (including all windows and tabs you have open)
  6. If you have a bunch of computer problems all at once, such as the computer running too slowly, try restarting your computer. If your computer is always slow, you probably don’t have enough memory in the computer. Buying more usually costs less than $100 and can save you hours of time. If you want to be sure you have enough memory in the computer, have a geek check for you. It only takes a couple minutes to check so he or she probably won’t mind.

New Dojo Tree Functionality

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

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

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

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.