We were tasked with implementing a command called `du` in filer. Now, I am already a contributor to filer so I know about how stuff works in there and what would be expected in this assignment.
My first task was to research what `du` actually did. Well, to be honest, I already knew what it did but I did not know it’s “extra” features such as flags, etc. Straight to Google I go. A lot of what I found I didn’t understand. For example, while looking up the `du` docs, I found that it takes flags such as “-a” and “-x”. But I couldn’t make head or tails of it (at least in the context of filer). So I decided to keep it simple.
So I started to code. It wasn’t that hard. My experience working with rsync code (in makedrive) using recursion certainly helped. Overall it took me maybe two hours to write all the code and the tests. Then,
All my tests pass on the first try. Usually, Dave tells me when that happens, there’s definitely something wrong with your tests. Well, that’s where I spent my next hour…combing through each line of both the implementation and the tests to find a problem. Turns out there wasn’t one. So I was relieved.
So I create a PR and leave it to rest 🙂
Meanwhile, I help one of my other classmates out and also work on another bug. The bug I worked on was to disallow `unlink`’s on directories. That didn’t take me long but I did not follow the Node standard of dealing with the error and that was a recommendation in my PR. But unfortunately, before I could change that (I took way too long to do so), my PR was merged into the master repo. Hmm, well that sucked. Oh well, I made the fix in a follow up bug and that was merged in.
Thanks to these events, I ended up with 3 bugs that I fixed for release 1. I am thus a happy man.