16 August 2009

Backing up files to a remote site

Recently I changed ISP and lost access to a ftp server that I used to upload critical files, from my server every night, via an automated job. I have now replaced this with some free space at box.net that I can access via webdav. I use davfs2 to mount this space as a normal directory on my linux machine and can then simply copy files to it. The setup process on a centos machine is:

yum install fuse dkms-fuse davfs2
modprobe fuse
edit /etc/davfs2/secrets and insert "http://www.box.net/dav boxnetusername boxnetpassword"
edit /etc/davfs2/davfs2.conf and insert "use_locks 0"
mkdir /media/box.net
mount -t davfs http://www.box.net/dav /media/box.net


09 August 2009

Remote Mirroring Using nc and dd | Linux Journal

Remote Mirroring Using nc and dd | Linux Journal
You can use the dd and nc commands for exact disk
mirroring from one server to another.
The following commands send data from Server1 to Server2:

Server2# nc -l 12345 | dd of=/dev/sdb
Server1# dd if=/dev/sda | nc server2 12345


Make sure that you issue Server2's command first
so that it's listening on port 12345 when Server1 starts sending its data.

Unless you're sure that the disk is not being modified,
it's better to boot Server1 from a RescueCD or LiveCD to do the copy.

Spotify Is the Best Desktop Music Player We've Ever Used - Lifehacker

Modularity Patterns

Modularity Patterns does a great job at describing the tension between resuse and ease-of-use.

06 August 2009

Maven Versions

Versions is a maven plugin that offers useful functions, such as listing newer versions of all your dependencies.
  • versions:display-dependency-updates scans a project's dependencies and produces a report of those dependencies which have newer versions available.
  • versions:display-plugin-updates scans a project's plugins and produces a report of those plugins which have newer versions available.
  • versions:update-parent updates the parent section of a project so that it references the newest available version. For example, if you use a corporate root POM, this goal can be helpful if you need to ensure you are using the latest version of the corporate root POM.
  • versions:update-properties updates properties defined in a project so that they correspond to the latest available version of specific dependencies. This can be useful if a suite of dependencies must all be locked to one version.
  • versions:update-child-modules updates the parent section of the child modules of a project so the version matches the version of the current project. For example, if you have an aggregator pom that is also the parent for the projects that it aggregates and the children and parent versions get out of sync, this mojo can help fix the versions of the child modules. (Note you may need to invoke Maven with the -N option in order to run this goal if your project is broken so badly that it cannot build because of the version mis-match).
  • versions:lock-snapshots searches the pom for all -SNAPSHOT versions and replaces them with the current timestamp version of that -SNAPSHOT, e.g. -20090327.172306-4
  • versions:unlock-snapshots searches the pom for all timestamp locked snapshot versions and replaces them with -SNAPSHOT.
  • versions:resolve-ranges finds dependencies using version ranges and resolves the range to the specific version being used.
  • versions:use-releases searches the pom for all -SNAPSHOT versions which have been released and replaces them with the corresponding release version.
  • versions:use-next-releases searches the pom for all non-SNAPSHOT versions which have been a newer release and replaces them with the next release version.
  • versions:use-latest-releases searches the pom for all non-SNAPSHOT versions which have been a newer release and replaces them with the latest release version.
  • versions:use-next-versions searches the pom for all versions which have been a newer version and replaces them with the next version.
  • versions:use-latest-versions searches the pom for all versions which have been a newer version and replaces them with the latest version.
  • versions:commit removes the pom.xml.versionsBackup files. Forms one half of the built-in "Poor Man's SCM".
  • versions:revert restores the pom.xml files from the pom.xml.versionsBackup files. Forms one half of the built-in "Poor Man's SCM".


05 August 2009

Guide - GUI Development Environment

GUIDE looks quite impressive in its screencast. I've never used a GUI builder, well not since Visual Basic, many years ago, so I can't really compare. However, GUIDE has been built by friends of mine, so I'm sure it's good!

"We're looking for developers to take GUIDE out for a spin and help us shape it up for general release. You can use GUIDE unregistered with some feature restrictions, or fill in your email address and we'll send you a licence valid for 30 days. You can request a new licence as often you need. If you have any problems with this form please contact us at betasignup@mindsilver.com."


03 August 2009

MultithreadedTC

Overview of MultithreadedTC - Dept. of Computer Science, UMD
MultithreadedTC is different. It supports test cases that exercise a specific interleaving of threads. This is motivated by the principle that concurrent applications should be built using small concurrent abstractions such as bounded buffers, semaphores and latches. Separating the concurrency logic from the rest of the application logic in this way makes it easier to understand and test concurrent applications. Since these abstractions are small, it should be possible to deterministically test every (significant) interleaving in separate tests.


Performance Comparison of Apache MINA and JBoss Netty

JBoss.org: Netty - Performance Comparison of Apache MINA and JBoss Netty
"One of my big complaints with Apache MINA is the high latency that’s incurred when sending data. MINA uses a set of I/O threads to handle reads and writes. This is typical of many non-blocking I/O frameworks.

Netty is much more clever than MINA. In Netty, when you make a call to send data and the send queue is empty, Netty will just send the data. We are using non-blocking I/O so the call will still be asynchronous. If the send queue is not empty, Netty will queue up the data to be sent in much the same way that MINA does sends. The Netty approach is much faster."


Obba: A Java Object Handler for Excel and OpenOffice.

Obba: A Java Object Handler for Excel and OpenOffice.

Obba provides a bridge from spreadsheets to Java classes. With Obba, you can easily build spreadsheet GUIs (Excel or OpenOffice) to Java code. Its main features are:

  • Loading of arbitrary jar or class files at runtime through an spreadsheet function.
  • Instantiation of Java objects, storing the object reference under a given object label.
  • Invocation of methods on objects referenced by their object handle, storing the handle to the result under a given object label.
  • Asynchronous method invocation and tools for synchronization, turning your spreadsheet into a multi-threaded calculation tool.
  • Allows arbitrary number of arguments for constructors or methods (avoids the limitation of the number of arguments for Excel worksheet functions).
  • Serialization and de-serialization (save Serializable objects to a file, restore them any time later).
  • All this though spreadsheet functions, without any additional line of code (no VBA needed, no additional Java code needed).


Fabrizio Giudici's Blog: Switched to Mercurial

Fabrizio Giudici's Blog: Switched to Mercurial
"asynchronous mode support. This might not be the most important thing, but I love the fact that Mercurial commits locally, so you can work without being connected. You should know that I love to be disconnected, if possible, and other times I can't be connected if I'm traveling (and with the incoming August I'm going to move for a month to the countryside). The requirement of synchronous operations by a centralized SCM such as Subversion is really annoying if you like the "commit often" approach, like me: if you are not connected, either you can't work, or you are forced to change commit style, which is no good. If you have a mobile connection, which is often slow and intermittent, "commit often" works but you loose lots of time while waiting for commits to be completed. With Mercurial, commits are immediate, so you can work as usual. Then, a few times per day, you do a "push" to synchronize the primary repository - this might take a few time, but you can run it while you're doing something else (another job, you're eating or having a bath)."


Dilbert Budget Planning




Making the Good Programmer ... Better | Javalobby

Got to buy some of these Belkin Gigabit Powerline HD plugs