Option to include sketch in flash?

robtillaart:
... or better writes a copy of the source to your personal cloud ....\myCloud\ArduinoSketches$UUID$.pde

That would be a great feature, and it could be used to provide a full revision history as well. That would probably be a more widely useful feature than what I am asking for. I can see a few disadvantages, although I admit they are minor:

  1. Cloud pollution. Thousands of sketch versions building up over the years, and you don't know which 20 you actually need to keep.
  2. Handoff. When somebody else wants to tweak one of my creations, they may not have access to my cloud
  3. No internet. I've had to set up a few haunted houses in areas with no wifi (parking garages), though that is a shrinking problem these days.

I'm going to stick to my guns and say I still want an option to include the sketch in the flash. Here's why:

I am a believer in simplifying things as much as practical. If the source is in the flash, then a stranger can pick up an object I created 10 years prior and start hacking it. There is a reason that scripting languages are so popular: the source IS the executable. Scripting is computationally less efficient than running compiled code, and yet it is extremely popular. This is at least in part because you don't have to worry about loosing the source and you can always tweak a script. Saving the sketch in the flash gives you the simple development cycle of a scripted language with the computational efficiency of a compiled language.

I checked and only one of my projects is too big to fit both the executable and the sketch in 32K, and that project was complex enough that I had done proper source control on it anyway. Dozens of my other sketches would easily fit. So, all that unused flash is busy storing nothing but 0xff's. I'd rather put it to use doing something potentially helpful than let it sit there unused.

Again I ask, where is the harm in an option to include the source if it fits?

Cheers,

  • Dean