03 September 2010
The perfect mobile office backup system
Ok, I have been postponing this post for a long time but actually this BACKUP SYSTEM just saved me from a real disaster - losing more than 20 hours of work so I decided to finally polish and publish it. Enjoy!
The perfect backup system is a hierarchical one. After trying several systems, the hierarchy I use quite successfully nowadays is this one:

My working set is the documents that I'm working on right now. These are the most valuable data and are usually the LESS PROTECTED ones. This is an interesting paradox of the information industry. The documents you are working on the last few days and you have to deliver tomorrow are probably the most mission critical information you have at any given moment. This is usually the least replicated information which is usually lying in just one laptop or USB drive. This means that it's really easy to get lost because you lose the USB drive or your hard disk breaks or for any other reason. You need to put special effort to backup those documents as soon as they are created by sending them to yourself with an e-mail etc.
On the other hand old documents that have already paid for themselves and are not that valuable anymore usually are replicated all over the place, in USB drives, backup disks, e-mails etc. This not only means a versioning nightmare that makes it difficult to find what you want the time you want it but also it is a waste of disk space. You need to put conscious effort to cleanup, keep tidy and reduce replication of those old and not that valuable data.
My Perfect Backup system solves this problem. I use InSync and Windows scheduling to automatically replicate directories. I have the laptop disk, an external HDD and a backup HDD. On the laptop I have only one directory which is called safe. This directory gets automatically synchronized every 6 hours with the External HDD and the external HDD gets automatically synchronized every day with the Backup HDD. Most of the time I work on things on the safe directory. Also I use windows scheduled tasks to automatically backup Mysql databases (with automysqlbackup and cygwin) and svn repositories directly to the safe. This means that practically with zero effort I have three backups of the things I'm working right now! That's quite safe and effortless!
The second class of documents is what I call reference material. These are documents that you rarely use but if you have them the time you need them they can save you lots of time. This might be some work you did a few years ago, or other piece of information that you rarely use but it has high value under certain circumstances. The problem with this information is that it's usually quite huge and rarely used. I have all this information on the directory reference that gets automatically backed up. There is nothing very exciting about this directory apart from the fact that whenever I have the External HDD with me I can connect it to my laptop and know that I have all the reference material I need.
Other content like music or movies that I have in DVDs and I can recover easily in case I lose them is not mission critical at all. I store them in a directory called bulk. This directory is disposable and in case I lose it I could recover everything from other sources within hours. This directory is quite large and I never back it up. It means quite some savings in terms of space but also in terms of keeping those data organized.
I also developed the habit of delivering by e-mail my products as soon as they get finished which means they are always implicitly backed up on a Gmail server.
As you can see with this backup system you have all the benefits of mobility and at the same time reduce the waste of space and most importantly it's self maintained and flexible. If I delete something it takes about a day till the change propagates from my laptop to the backup disk. This is more than enough time to realize that I did something wrong and recover it. On the other hand I don't keep versioned replicates that would make everything (including search) more complicated and would require huge amounts of space. If I delete something from my safe disk and I believe it's ok for more than a day I'm probably right and this piece of data might rest in peace for ever.
If on top of the backup infrastructure I need security e.g. to protect confidential data that I don't want to be published if my laptop gets stolen I usually put them in encrypted folders. If I wanted something more secure I might want to use something more sophisticated like disk encryption. I'm not doing this right now but I'm sure I would have no trouble combining such security solution with my perfect backup scheme because they are quite vertical.
29 July 2010
One year of being my own boss!
About a year ago I quit my job and started living the e-dream. I am my own boss, I have control of a business and work for rewards. It's an awesome experience and I must admit I've learned many things. I will try to summarize my experience on how this really works.
The biggest difference between working for a company and working for yourself is that in the latter case you as the main employee have to constantly feed a pipeline similar to this:

Every company has a pipeline like that and I as self-employed have to have it and know how wear different hats and operate on all those different modes.
- Marketing means bringing customers to me
- Sales means closing deals with customers maximizing my profit
- Engineering is the middle on which is doing the job and is the only thing I used to do when I was working for a company
- Delivery is packing, testing, documenting and in general adding value to the engineering product in order the customer to accept it and use it
- Payments is actually making those ugly phone calls and sending the emails that ask for money from all those guys who owe you. This used to make me feel quite nervous.
Obviously while working for a company I was exposed only on a very small part of those and I was very weak on the rest. The truth is that the rest is I would say at least equally important as doing the engineering job. This is especially true for marketing. You may find yourself having set-up (and paying) the whole pipeline and having it waiting for The Customer to arrive. If marketing doesn't bring him you have big problem. Marketing has to fight the competition and many times define the requirements.
The second important thing is that it takes time from the time you take a marketing action to the time that money comes in your pocket. I send one morning in December about 30 e-mails (it was my first time and it made me feel very uncomfortable) to some prospects informing them of my services. About a month later one of them contacted me and he was a 1500 euro customer. I got those money on February i.e. 3 months later!
This means that as a small business owner you have to wear different hats and switch constantly between living in the present and foreseeing the future. If you feel that in two months you might be running out of projects, that is the real bottleneck NOW and no matter how loaded with engineering you are, you should stop and start doing marketing. I find sales very easy probably because I have quite some flexibility as an owner and I know the products/services perfectly. Delivery is ok but time consuming an dull. I'm a good teacher so no big problem there. Payments is pain but there are some tricks you can do. The easiest actually is to deliver so much value that the customer wants more from you and wants to have you happy.
In any case this is the summary of my first e-year. I'm wondering what's coming next!
15 July 2010
Running R from Cygwin with RCurl
R is an amazing language and for me it’s the best free substitute to Matlab. On top of that it has a very active community of developers and it has many powerful statistics and financial packages. I needed to run R from within Cygwin and use the RCurl library.
Step 1. Running R from Cygwin
I installed the R language for Windows and of course I wanted to run it from within cygwin. The only thing I really had to do for my convenience is to add the R bin directory to the path by adding the following line to .bashrc:
export PATH="$PATH:/cygdrive/c/Program Files (x86)
/R/R-2.11.0/bin/"
Next time I started Cygwin I was able to run R by just typing
$ R
Step 2. Using RCurl
From within R, the only thing I was missing was the RCurl library:
> require('RCurl')
Loading required package: RCurl
Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE,
logical.return = TRUE, : there is no package called 'RCurl'
> getURL("http://www.omegahat.org/RCurl/")
Error: could not find function "getURL"
First we have to choose a mirror. Select the one appropriate for you from the menu.
> chooseCRANmirror()
The following command installs RCurl and automatically resolves the dependency on "bitops" library. It even creates the appropriate directories for you.
> install.packages("RCurl")
Let's load the RCurl library:
> require('RCurl')
And... Voilà it just works!
> getURL("http://www.omegahat.org/RCurl/")
07 June 2010
Tor with cygwin
Tor is an amazing tool for keeping anonymity on-line that allows you to change IP's at will. If you use for more than just (relatively safe) web browsing it you might find the tor-ctrl.sh script quite useful. It allows you to control tor from the prompt. If try to run it on a default Cygwin installation you will have two problems: a) telnet not installed b) xxd not installed. In order to install those two programs you have to choose the a) inetutils and b) vim (!!) packages when you run Cygwin setup. Problem almost solved! Then you will get: xxd: /var/lib/tor/data/control_auth_cookie: No such file or directory. The easiest way to get arround this is to set a password on the settings of Tod from Vidalia Control Panel > Settings > Advanced and then use the -p option of tor-ctrl.sh.
So here we are:
$ curl --socks4a localhost:9050 http://www.whatismyip.org/
81.169.183.122
$ ./tor-ctrl.sh -p "password" -c "signal NEWNYM"
$ curl --socks4a localhost:9050 http://www.whatismyip.org/
77.109.139.87
21 April 2010
Your Articles Directory SEF URL problem
The Your Articles Directory script is an amazing solution for building sites that hold keyword rich articles and some links to websites. It has problem with it's SEF support though. You can enable SEF URLs by going to Site Management > Manage Site Settings > SEF URL and choose Enable. If then you or your customers try to use anything other than English e.g. French, Spanish, German or Greek for the titles, all the "strange characters" will be trimmed out of the url resulting useless URLs. I managed to fix it by repairing the class.sef.php class to add support of what is called Greenglish - Greeklish which is translation of Greek characters to English. I managed to do it quite successfully for Greek but didn't yet have the opportunity to do it for French, Spanish, German or other languages. If you have a website using the Your Articles Directory and you would like to make SEF work please drop me an e-mail on lookfwd {a}t g mail .com and I will give it a go for you.
P.S. This script doesn't encrypt the passwords of users and that's bad because if somebody hacks the site, he can get all the e-mails and the passwords which is a real security hole.
:: Next Page >>