Question

How to improve code+feedback cycle on Android.

As a developer doing web development, the change feedback is extremely quick. I simply make a change to my code, refresh my browser and voila I can see whether my change worked. Add to this the ability to make changes in the browser.

In Android however, even if I've made an extremely trivial change and I have to run the application again. That ends up requiring the entire compilation process, installing the app again on the usb device/emulator and starting the app again - which is prohibitively slow and makes for unproductive development.

Traditional desktop apps required the compilation etc., but at least the process happened on the same machine and did not require the entire process of installing the app on the mobile device/emulator etc.

I was wondering if there are any better development practices to work around this. I understand that some amount of the pain could be relieved through unit testing, but even the tests runs on the device. It just seems like an extremely slow process.

Was it helpful?

Solution

I've been doing Android dev for about 5 years, and I always just considered this a fact of life. I've worked on huge desktop applications where you'd have to run a build script that would take up to 30 minutes just to compile and run (we'd refactor it back down to 5 minutes, and it would creep back up to 30 over time). You'd get your compile time feedback for things like syntax on the module you were building, but to see your work integrated into the larger product, you just had to wait.

That said, this is also what unit tests can help with. I sometimes write unit tests not for the sake of testing, but for trying out code quicker than if I integrate it into the UI and wait for the build/deploy/run cycle. I do this for web service calls, parsing, validation, business logic, etc. For UI stuff, I don't believe there's a better answer than what you're already doing.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top