Sunday, May 18, 2008

Clipboard PingPong

What is it?

Clipboard PingPong can send your clipboard contents to other computers and receive the other computers' published clipboard contents. Currently, it has been restricted to transfer only string data. It runs on top of the JVM and that's the only prerequisite. It's also very tiny. (Version 0.1's size is roughly 58KB of which 35KB is GNU GPL v3 license text.)

Wanna try? Download from here.

The Development Lesson

I learned one thing: release early. I wrote the first working version almost a month ago for my personal use in about 1 hour. I just wanted to exchange the clipboard contents between 2 machines I was using. It had to be platform independent because I was using both Linux and Windows. Then I decided to share the code and had all these plans like having a configuration utility, adding a logging module, etc. But I kept procrastinating and didn't have the time to finish it. So now, I didn't add any graphical configuration utility. Instead, I added some instructions in README which should explain the configuration process which is frankly very trivial. I also have the startup and shutdown scripts. This software should really run as a service but I am releasing it early. May be the suggestions from you can steer me in the right direction.

What do I need?

Testing. And lots of it. I tested with 2 machines; it did fine. Bug reports will be really helpful to enhance and decide the future development activities. Report the bugs here.

Decisions

Before writing the code, I had a few things in my mind on how the software must be written which I would like to share here. I called them "requirements." These are they:
  • Should be platform independent
  • Should have no library dependencies
  • Should use a simple text file for configuration (no XML)
I needed the software to be platform independent, and that's the reason why I chose Java. I could have chosen Python but in most of the the machines a JVM can be found easily than a Python interpreter. Minimum Java version required is 1.4. I didn't test it on a 1.4 JRE, I tested it on 1.5. But it should run without any problems. If someone is testing on 1.4 and if it doesn't run, please let me know.

The other thing I made sure was not to use any libraries (no dependent jars). I had to parse command line arguments, but I wrote my own helper class to do it. That's the same reason why I didn't use XML for configuration files apart from plain text being easy to edit manually than XML.

Note: It also requires a desktop environment.

0 comments:

Post a Comment