At some point in their career every programmer tries to write their own rsync. I must have written at least three — none of which are anywhere near as clever and reliable as rsync.
I will often 'reinvent the wheel' on my own time just to gather some more detailed understanding of what's happening behind the scenes. I never really use the stuff in production code, though.
I used to code PHP and made a transition to Ruby at some point. After programming Ruby/Rails for a bit I decided to create a rails-like MVC framework for PHP. There are plenty of those in existence. I could have just read the ruby code, which I did a bit, but I wanted to understand a bit better why certain decisions were made.
Doing that little exercise helped out a good bit with that.
It is a good learning/practice/appreciation exercise, if nothing else.
After trying to replicate some of rsync's functionality you discover edge cases and other complications you might never have thought about and appreciate all the more how well rsync manages to work for your specific use case and more generally.
:) in my defense, rsync was doing too much for my simple needs. I wanted to have a simple and customizable experience. While I agree with you (no little script can match the power of rsync) it's good to have alternatives.
Comments
At some point in their career every programmer tries to write their own rsync. I must have written at least three — none of which are anywhere near as clever and reliable as rsync.
Why do we do this?
I will often 'reinvent the wheel' on my own time just to gather some more detailed understanding of what's happening behind the scenes. I never really use the stuff in production code, though.
I used to code PHP and made a transition to Ruby at some point. After programming Ruby/Rails for a bit I decided to create a rails-like MVC framework for PHP. There are plenty of those in existence. I could have just read the ruby code, which I did a bit, but I wanted to understand a bit better why certain decisions were made.
Doing that little exercise helped out a good bit with that.
It is a good learning/practice/appreciation exercise, if nothing else.
After trying to replicate some of rsync's functionality you discover edge cases and other complications you might never have thought about and appreciate all the more how well rsync manages to work for your specific use case and more generally.
:) in my defense, rsync was doing too much for my simple needs. I wanted to have a simple and customizable experience. While I agree with you (no little script can match the power of rsync) it's good to have alternatives.
My best guess is http://en.wikipedia.org/wiki/Not_invented_here