Testing multi-threaded code is tricky, the test and the code under test most likely are run under different threads. Here, we will discuss how to deal with the issue based on the book Growing Object-Oriented Software Guided by Tests
Backbone fundamentals is a great free resource to learn Backbone.js from scratch. The book was written by Addy Osmany under creative-commons license. As its second exercise, the book guide the readers to create a simple library application that uses Node.js as the back-end. However, it left the part to upload book’s cover to the readers as an exercise. Hence, here is the way I did it.
Requirement There are two additional requirements for the upload book’s cover features:
I am a noob in android development and one thing I am not comfortable with is the stock android device emulator. The default emulator is really slow, the boot-up process could take minutes in my machine (I won’t say my machine is fast either, but it is sufficient), the app deployment takes too much time, moreover, the interaction is sluggish. Hence, it is a no go.
Up to now, I used my own android phone to test my app.
When learning backbone.js (i’m a novice by the way), at first, I was actually having a hard time to grasp the backbone view. Especially how the best practice to render the view and build a rather complex view consists of several subviews. And then, magically I came accross Ian Storm Taylor’s post about his experience on dealing with backbone subview. At first I didn’t quiet understand well about the post until I found a thread on stackoverflow, which was started by Ian Storm Taylor.