Archive for the ‘Software’ Category.

Greener Data Center at Home

Let’s face it, I collect computers. Trust me, I don’t want to be in the computer collection business, but some how I have several sitting in the closet and many up and running as I write. Being an entrepreneur, start-up engineer, software developer, etc, I need machines to get things done. So, I tend to treat the house like a personal data center. Several enabling technologies have emerged that have helped me start down-sizing my home data center to be much more energy and space efficient. At this point noise and heat are still my biggest issues.Product photo of a blue Dell Studio Hybrid

In the past, I would buy the best computer I could build and install everything under the sun on it to try and keep costs down. Problem is each machine would start collecting more and more cruft and the next thing you know, you’re wanting another box.

Not too long ago, VMWare unshackled their server product and allowed me to start collapsing physical hardware on to virtual hardware. They also made their product run on Linux, including Ubuntu my current distro of choice. The combination of VMWare Server with Ubuntu gave me the power to have a low/no cost solution for collapsing physical machines and easily re-using older hardware.

Another benefit is that I could start building single purpose “machines”. I could afford to run a Virtual Machine (VM) per application or have development specific VMs. A huge benefit was that you can migrate a VMs quickly to different hardware. I can, for example, take a web application from my “data center” drop it on my laptop and go mobile. When I get home, I simply move it back into the data center. When I buy a new host machine, I can easily move the VMs and recycle the old hardware without having to re-install all of the software. Not only have I started running server type applications in their own VM, I have also started creating single purpose VMs for desktop applications. Currently, I have a VM for my trading/investment software and I’m about to build a VM for my QuickBooks and other bookkeeping and business tasks.

I know I’m behind, but I finally took a look at the Dell Studio Hybrid. There is a review on PC Magazine. Seeing the form factor, I immediately wondered if it would run Ubuntu. Quick little search and I found the quote below at Dell’s IdeaStorm.

Posted 01 Aug 2008 on Dell\'s IdeaStorm.

To me, a home VM server needs:

  1. The capacity to have lots of RAM
  2. Enough storage for all of the VMs you want to host
  3. A fast, cool running multi-core CPU
  4. Runs quietly. Noise is tiring and annoying
  5. The ability to run Ubuntu and VMWare server
  6. Draw as little energy as possible
  7. One or more Gb ethernet adapters

What it doesn’t need:

  1. Fast graphics, I access the machines remotely
  2. Big form factor, I might want it in a closet.
  3. Proprietary anything, we want to run linux
  4. It should be relatively inexpensive

The Studio Hybrid allows:

  • Intel Core 2 Duo up to 2.6GHz
  • 4 GB RAM
  • 320 GB SATA Hard Drive
  • Integrated video with DVI and HDMI
  • Built-in wireless N and Gigabit Ethernet

What I haven’t been able to determine is how quiet it is. You can see from the back panel that it does have a fan, so it can’t be completely silent. But in all other aspects, it looks like it could be a viable platform for a VM host in my greener home data center.

Gmail Labs Quick Links: Using Stored Searches

I use Gmail as a mail aggregator for many of my accounts. I honestly do strive for Inbox Zero but I’m not very consistent. As part of the quest, I’ve become relatively proficient at typing in advanced search query strings, but it is a real time sink to hand enter those every day. Enter Gmail Labs.

On June 5, 2008 Google announced Gmail Labs in the official Gmail Blog. Being an early adopter, I turned labs on in Gmail almost immediately after reading the post but didn’t look at the features closely. This morning I woke up and realized I was failing miserably in maintaining my inbox and decided to make a dent. The frustration led me to search gmail help to see if there was any way to save/bookmark advanced searches. That’s when I stumbled on to Quick Links.

Gmail Labs, being experimental, are not enabled by default. You may have to Manually Enable Gmail Labs in Your Account. Once labs are enabled, you are allowed to control the features on an individual basis. As you can see if the photo above, I have Quick Links enabled.

Example of my personal Quick Links

For example, the Twitter Quick Link shows all of the email from Twitter in my Inbox using the search below. One nice touch is that clicking on the Quick Link re-populates the search field allowing you to specify additional search criteria.

from:twitter in:inbox

I know this feature won’t solve all of my Inbox Zero issues, but I’m hoping it will help me quickly wade through items that I don’t want processed by a rule and want to look at before archiving or deleting. Happy Cleaning!

GitHub - Homesteading

I’m too swamped to actual learn Git at the moment, but I’m not going to let that stop me from claiming my name at GitHub.

What is it?

Not only is Git the new hotness, it’s a fast, efficient, distributed version control system ideal for the collaborative development of software.

GitHub is the easiest (and prettiest) way to participate in that collaboration: fork projects, send pull requests, monitor development, all with ease.

- from the github main page

The Wikipedia page for Git provides a good overview of the tool.

There are some interesting features and solutions in Git, but to me I don’t see a compelling reason to leave Subversion just yet. It took a long time for Subversion to bake before it was well integrated into various toolsets and worked well across many platforms. I don’t have the luxury to not use many OSs, so I think it may be a while before Git is viable on Linux, Windows, and OS X and works with the tools I like.

ActiveX - Resident Evil

I’ve always wondered why ActiveX controls continue to be written. There are cases where you need access to the local machine to provide a useful service, but most things don’t, at least not outside of a sandbox. There will always be security flaws in every type of software, but ActiveX controls seem to be the easiest target for the dark side. Most of my friends and I stopped using Internet Explorer years ago except for a few sites that either require IE (e.g. Outlook Web Mail) or other poorly written sites that won’t even display data unless you’re using IE.

Browsing through my email today I ran across an article on eWeek, ActiveX Under Seige: Facebook, MySpace Image Uploaders Vulnerable that once again highlights the problem. Here is a small excerpt:

“In tandem with the public release of this information, remote code-execution exploits targeting the Aurigma, Facebook, and Yahoo! issues were released. Each issue allows remote attackers to execute arbitrary code in the context of the application using the ActiveX control (typically Internet Explorer),” Kamerling said.

In the absence of patches, Symantec recommends that IE users take “extreme caution” when browsing the Web and ensure that the browser is configured with the highest security settings.

The US-CERT goes a step further, recommending that IE users completely disable ActiveX scripting in the browser.

The article also points you to a helpful guide from US-CERT on Securing Your Web Browser.

Plushie - Interactive Toy Modeling System

While I can’t so myself, I have friends that can and enjoy doing so. Yuki Mori a Ph.D student, at Fine Digital Engineering Laboratory Research Center for Advanced Science and Technology (RCAST) The University of Tokyo, has developed a system called Plushie that enables you to design and create patterns for 3D plush toys.

Yuki Mori, Takeo Igarashi. Plushie: An Interactive Design System for Plush Toys. ACM Transactions on Graphics (Proceedings of SIGGRAPH 2007), vol.23, No.3, Article No.45, San Diego, USA, August 2007 (Link to the PDF is available on her site).

Collecting Senders from Gmail Using POP3

Over the years, we’ve had a lot of people submit jokes for LOL. Since we’ve recently upgraded the site to allow user submissions, we thought it would be nice to let them know they can now add their own jokes (Truth be told, we were slow adding them).

I’m not going to go into great detail, but I thought I’d post a mini howto. Note: I’m not supporting this code, but you are free to use it

Firstly, Ruby 1.8’s POP3 implementation doesn’t support SSL. stunnel provides encrypted channels for software that doesn’t understand SSL. I run cygwin on my Windows box to get access to essential tools. Note: Configuring cygwin and installing it is beyond the scope of this entry, so ask Google for help.

A quick search for gmail and stunnel allowed me to cobble together the following configuration file called gmail-tunnel.txt

client = yes
debug = debug
foreground = yes

[pop3s]
accept = 127.0.0.1:42
connect = pop.gmail.com:995

Open up a command window and issue this command to start the tunnel:

C>stunnel gmail-tunnel.txt

Save the following code in rpopget.rb and then execute it from another command window while the tunnel is active. It will write a file called address.csv that lists each address and the number of times that person sent mail.

#!/usr/bin/ruby

require 'net/pop'

HOST = 'localhost'
USER = 'YOURACCOUT@gmail.com'
PASS = 'YOURPASSWORD'

$addr = {}

def add_address(a)
    $addr[a] = $addr[a].nil? ? 1 : $addr[a] + 1
end

Net::POP3.start(HOST, 42 , USER, PASS) do |pop|
    if pop.mails.empty?
        puts ‘No mail’
    else
        pop.mails.each do |email|
            $stderr.printf(”.”)

            lines = email.header.split(”\r\n”)
            lines.each do |l|
                if l =~ /^From:/
                    if l =~ /^.*/
                        add_address($1)
                    elsif l =~ /^From: (.*@.*)[ ]*/
                        add_address($1)
                    end
                end
            end
        end
    end
end

open(”address.csv”, “w”) do |f|
    f.puts “Address,Count”
    $addr.each_pair do |a, c|
        f.puts “#{a},#{c}”
    end
end

LOL.com is taking shape

Ages and ages ago some friends and I were able to get the lol.com domain and have kept it all these years. A couple of years ago, when advertising started coming back, my business partner John Munsch and I started talking about how we could make it more than just a dead site and an email trap.

A little over a year ago, we brought up a very simple site with a very limited set of jokes. We opened up a gmail account to accept jokes to place on the site, but it was too hard to keep up with the submissions, format them all, and get them live on the site. After the site had been up for a while, it became apparent that there was growth potential and it was worth getting an interactive site up and running.

So for the last year or so John and I have been working to bring our initial vision to life. John has done most of the development for this site, I’ve done most of the IT. We have released version 2.0 of LOL.

We’re proud of our baby. If you have some time stop by and give it a look.

Ruby consolidation in the Eclipse World

Apparently I’ve been a little out of touch. I’ve been happily using RDT with Eclipse and hadn’t needed to change. While catching up on some reading, I ran across this press release "Aptana to Merge RadRails and RDT into its Ajax-focused IDE".

Aptana LogoAptana bills itself as “the leading Interactive Development Environment (IDE) for Web 2.0 and Ajax development”. I took a moment and watched their screen cast and have to say it looks like a good start. As soon as I need to update my IDE again, I’ll look at switching over. For now, I’m going to keep pluging away with my current version.

Swing Threading

The article Rethinking Swing Threading by Jonathan Simon provides a good description on how to use event based programming to simplify your Swing development.

I used a similar method in the past and it worked very well. My only addition to what he did was to add a Job system for handling the tasks. Basically, I wrote a Task for each operation that I wanted to perform in the system and handed it off to the job manager to execute and monitor. In addition to being able to simplify the Swing code, it made it possible to easily annotate the task with any exceptions that occurred for use in displaying errors to the user.

Tomcat Configuration

There is a great article at OnJava.com called Top Ten Tomcat Configuration Tips. It points out a method of adding new web applications without adding a context in server.xml.

Basically, you can create an XML fragment that contains the context you would have placed in the server.xml and put it in a separate xml file. Name the file MyApp.xml, place it in the webapps directory and there you go. The docBase attribute can point to anywhere on your file system, so you don’t have to place your application in the Tomcat webapps directory.

Why is this important? If you have a web application and you want to write an installation program for it what do you do? You could write code to edit server.xml to add/remove/modify your context or you could simply copy/delete/replace MyApp.xml in the Tomcat webapps directory. On Windows, you could do a standard install, put your web application under Program Files/My Company/MyApp and copy your context file to CATALINA_HOME/webapps. You’re uninstall process also becomes much simpler.