Development Environment

A project log for Garden Squid

The garden squid is an open platform for indoor garden automation to bring software, hardware, and garden hackers together!

christine-banekChristine Banek 08/10/2016 at 02:160 Comments

Everyone who has done software knows that in order to write great code, you need to iterate, and iterate fast. This is why having a good development environment and the right tools are key.

For embedded projects, this gets even more tricky than most software projects, since there is usually hardware involved and required, and while the hardware might be plenty powerful for your use case, compiling, and running in debug mode sometimes make things dog slow.

Even on the raspberry pi, which I'm very pleased with, can be incredibly slow. Yesterday I tried to do an npm install of my app, and it took many hours to complete. I haven't tried profiling it yet, but I also saw anecdotal evidence that compiling phantomjs takes over 2 days! DAYS.

Such compile times were fine in the 1980's, but these days we need something with a little more pep.

This is why I want the garden squid to have a great development environment. Everything is based on linux, including both the raspberry pi and my development machine. They both run ubuntu, and by putting in some mock devices, I can exercise all the functionality of the front end and the back end (other than testing the hardware).

This has been a great boon, since running `grunt` can easily take a minute, whereas on the dev machine it takes a few seconds.

Architecture issues with packages are a constant problem, as trying to install phantomjs via npm has taught me. Apparently there is no binary package via npm for arm. I ended up downloading a binary from the following:

and following those instructions.

In the end, it makes sense to simply distribute a tarball of the minified site and not do the development on the pi, but it's always good to have that option for fast fixes.