Thank you rsync for saving my ass again.
I have an Apple Mac G5 that I use for running my DAW’s and music production. About a year ago I reinstalled the OS from scratch and set the partition type as Case-Sensitive. At the time I thought that was clever because I work in linux all day and linux is case-sensitive. Wow was that a mistake. It is amazing how much case-sensitivity causes headaches on a daily basis. Adobe Photoshop (and most other adobe products) will not install. They require case-insenstive operating systems… (case-insensitive is the default for OSX). Protools, although doesn’t require it, doesn’t seem to work correctly under a case-sensitive OS. Even iTunes has it’s share of issues. Which is where rsync saved the day for me.
In my iTunes library I ended up with a bunch of files that named the same, some with capital letters and some without. For example, I have a two files in a directory named: “Coheed and Cambria – Welcome Home” and “coheed and cambria – Welcome Home”. How it got like that I will never know but it really made things tough.
Last week I bought a 1TB SATA drive from Fry’s and installed it in the G5. I then moved all my project files and audio files and everything important off of the main hard drive to the new one, which I of coarse formatted as case-insensitive preparing for a fresh install of OSX. Well, when I dropped the iTunes folder on the new drive it started copying only to error when it hit the Coheed directory. Because in a case-sensitive environment there were two Welcome Home files (one with capitals and one without) and in a case-insensitive env they are the same file. Needless to say the finder copy failed and I would have had to wade through 19GB of music to find where this happens and clean it up to move everything over.
Welcome rsync to save the day. I opened up my good ‘ol terminal and popped off an rsync instead:
rsync -av –inplace /Users/heijmans/Music/iTunes /Volumes/MusicDrive/
rsync is able to overwrite the files without caring and TADA! all fixed!
Thank you rsync for being so awesome.
Command expaination:
-av –inplace means:
a = archive: copy over everything. (there is more to it but you will need to go read the manual)
v = verbose: show me what you are doing
–inplace = inplace: don’t copy over to a temp file and then compare the source and dest. Just overwrite the dest file inplace. This is handy if you are running an rsync for the first time and there is nothing to compare. It speeds it up a bit.
Posted in General.
By mike
November 17, 2009
I never could understand why developers didn’t write tests. The concept of a test is simple. You write a little extra code now that tests the outcome you want or have so that, in the future, when you add a feature or decide to refactor into something simpler or better, you know that you didn’t break anything without having to walk through all the test cases by hand.
There are two approaches to writing tests and one of them is more conducive to test writing then the other.
The first way is to write your application code first then write the tests to back it up. The first problem with this is a matter of motivation really. After writing all the application code and making it work, I find it very hard to motivate myself to write the little extra bit of tests instead of diving right in to the new feature on the roadmap. Why write the tests after you know it works? Well, again, what if you have to wedge a feature in there or refactor? Then you have to recall all the stuff that you tested by hand while you were building it and then test it again, by hand, or write tests at that point and Murphy’s law says that you will forget at least one critical case the second time around. That is why the second choice is the better.
The second way to develop with tests is to write the tests for the functionality that you want and then write the code to make the tests pass. This is the Agile approach and, in my opinion, the better. Why? Well, you are writing tests based on requirements. So you will know as soon as your code does what you want. Second, you are writing tests based on what you are encountering while writing the application. This lends itself to more coverage because you will be writing tests for all the little edge cases you will encounter while writing the application. This means that, in the future, when you refactor or go muddling around, you can verify, RIGHT THEN, if you broke anything.
I have heard managers complain about developers spending time on tests and not on features first because users and clients won’t see the tests and time should be spent on user/client features. Well, here is the reality, a little time spent at the beginning of a project writing tests saves a lot of time in the end because you don’t need to spend so much time verifying feature requirements while writing. Plus the QA process is much faster and smoother because you are handing of working code from the beginning. Writing tests at the beginning usually saves me more than 10% time on the same project where I write the application code only with no tests! That is 10% faster to release and ensures better user experience in the long run because I verified that the project is doing what it should and handling errors properly before I even wrote the application!
Posted in Rails, Tech, Web.
Random Kitty photo… This is Leo after he had a tumor removed from the top of his head. He was doing something that he knew he wasn’t supposed to be doing and after I caught him he started to ham it up so I would forget what he was doing… it worked.
Posted in Animals.
I host some stuff with bluehost and I have to say that I am pretty fed up with them and shared hosting! I know shared hosting is never a good idea but for something as simple as http://isitabugorfeature.com it should be a non-issue. Bluehost has “rails support” but the assholes keep updating gems without letting anyone know and there isn’t a list or anything I can subscribe to that would let me know about these sort of very relevant updates. I have been burned again.
Today someone mentioned to me that bug or feature was down and I logged in and found that, sure enough, they had updated the rails gem. So I changed my gem requirement in my environment.rb file but my app relies on some 2.2.2 specific stuff so it wouldn’t start. So, I am forced to get the rails-2.2.2 tag from github and put it in vendor/rails to get the site back up again. I am so tired of this. I am done with bluehost and shared hosting. I am going to begin migrating everything to my slicehost slices and call it a day.
Goodbye bluehost, I would love to say it was all great but I can’t…
Posted in Rails, Tech, Web.
A few months back I posted that I would be building my own DIY Talk Box. I have finally gotten around to doing it. I managed to pickup a PylePro PDS772 for $20 and it was still in the box. The thing has a great frequency range (500Hz to 16KHz) and is very powerful at a whopping 300W RMS with a peak of 600W. I managed to pickup all the parts I needed from Fry’s Electronics and Home Depot and cobbled it together earlier in the week. Boy, does it sound good. I am making a HowTo video to show all the steps and explain some of the gotcha’s I expierenced on the project. So that video is coming very soon. I also had a Crown D-75 reference amp tucked away that I decided to drive the Talk Box with but I wanted to switch it to Bridge Mono and the service shop said it would cost $125 to get done so I sent an email to crown asking for the service manual and within a day I had all the schematics (including all the older revisions) emailed back to me. Upon looking at the schematics I found that it was a single jumper that needed to be changed and so it took me a total of 5 minutes to switch to bridge mono. There is a HowTo video for that coming as well.
Posted in Music.
By mike
February 13, 2009