Sunday, August 30, 2009

Simple Backup, Think Areca Backup

If you ever find yourself looking for a backup tool that’s easy to use without all the nonsense of buying into proprietary hardware then you might want to try Areca Backup by aventin a try. For an average, everyday user it’s a very simplistic program to learn, and with just a few clicks, you can set individual files or multiple directories to be backed-up.

I’ve found this program on sourceforge.net, an open-source community where developers post their software for others to use/rate.

Essentially, Areca Backup is a file backup software that supports incremental, image and delta backup on local drives or FTP servers. Areca-Backup also allows you to browse your backups and navigate among different version of the files contained in your archives.


For evaluation purposes I will be using Philip Johnson’s Three Prime Directives of Java-based Open Source Software Engineering.

Prime Directive 1: I believe that this program does accomplish a useful task. However, it’s sort of a hit-miss type of deal. Today, most external storage devices come with their own type of back-up software making Areca Backup seem useless. But, as the functionality of the computer grows, so does the base hard drive. A brand-new computer with a 160 GB hard drive has lots of room to spare and normally wouldn’t come with backup software, only a recovery disc. So those that already have a large hard drive will benefit from the usefulness of this software.

Prime Directive 2: The very simple user interface of Areca Backup makes this software very attractive to use. The software itself is only 5 MBs, making download and installation very fast. The online tutorial was very helpful as it included written steps as well as screen shots. Those two facts alone more than satisfy prime directive 2. The types of backups range from basic backups, to server caliber FTP backups.

Prime Directive 3: Looking through the Areca Backup’s Documentation, it does have an API for custom plug-ins for a custom storage policy as well as a DTD template found on their website, but both somewhat vague. Also through sourceforge.net, they have a forum which developers can go to, to ask questions about modifying storage policies. For developers looking to modify this program, it’s very possible to do so, there are many resources you can check; the forums, documentation, and Areca’s homepage.

Overall, the software is very intuitive and easy to use, otherwise there’s a very helpful tutorial to point you in the right direction. It’s simplistic design and advanced features make it attractive to an average user that want to back up a few important files, or an experienced user managing multiple drives.

Fizzuous Buzzourous - Remembering Java

FizzBuzz Program Description:

Print out all of the numbers from 1 to 100, one per line, except that when the number is a multiple of 3, you print "Fizz", when a multiple of 5, you print "Buzz", and when a multiple of both 3 and 5, you print "FizzBuzz".

When I was presented with the FizzBuzz program it seemed like it was like a first semester Java type of assignment. I was already familiar with Eclipse and so I opened it and started to declare the prototype of the main method, but once I opened the curly brackets I stumped myself because I forgot how to do modulo. I could recall it involved the %, but I couldn’t remember if it was just one or two %’s. The Boolean operators of and-&& and or-|| confused me for a few seconds because those had two symbols, but then Eclipse didn't recognize %% in the condition so it just 1 %. (Just one of the marvels of using an IDE with MS Word like error lines)

Reading the problem verbatim I began to create my if-statements accordingly. As I got to the first If-statement, I started to modulo 3 right off the bat. I realized that the order of conditions cannot be taken verbatim because a number like 15 would print out “Fizz” instead of “FizzBuzz”. I successfully completed the code in about 15 minutes. My final code looked like this:

public class FizzBuzz {
/* Implementation of the FizzBuzz program
* Prints integers 1 to 100
* Multiples of 3 will print "Fizz"
* Multiples of 5 will print "Buzz"
* Multiples of 3 and 5 will print "FizzBuzz"
*/
public static void main (string [] args) {
for (int i = 1; i <= 100; i++) {
if (i % 15 == 0) {
System.out.println
("FizzBuzz");
} else if (i % 3 == 0) {
System.out.println
("Fizz");
} else if (i % 5 == 0) {
System.out.println
("Buzz");
} else {
System.out.println
(i);
}
}
}
}

However, Prof. Johnson made an interesting comment in class. Although that the above program would work correctly, how would you go about testing the program. It was hard to prove that the program worked because the solution was hard-coded into the if-statements, and there was no way to specifically test the boundary conditions. So I went back created a static method that takes an integer as a parameter, and returns a String. This way, you would be able to feed it an integer and it will return the appropriate value. The second version ended up like this, which took about 3 minutes to adapt the code from the first version:

//Version 2 of FizzBuzz Program
public class FizzBuzz2 {
/* Main method feeds integers into method myFizzBuzz
* that returns a string value depending on the integer
*/
public static void main (string [] args) {
for (int i = 1; i <= 100; i++) {
System.out.println
(myFizzBuzz(i));
}
}

/* Static method allows for individual integers to be tested,
* boundary conditions can be tested by manually feeding
* integers through main method
*/
public static string myFizzBuzz(int j) {
if (j % 15 == 0) {
return "FizzBuzz";
} else if (j % 3 == 0) {
return "Fizz";
} else if (j % 5 == 0) {
return "Buzz";
} else {
return string.valueOf(j);
}
}
}

(Note that I did use a for-loop to feed it numbers 1 to 100, but you can replace the loop with a hard coded integer to test the boundary conditions; 1, 15, and 100)