Multiple sketchbook locations

I think allowing multiple paths to sketchbook folders would be cool. I can think of one path to my local drive, where I store some stuff, and another path to a cloud storage folder like dropbox or one drive. Currently I only have my office computer Arduino IDE point to onedrive folder but my home computer to local drive. It's nice to have multiple folder names to search for sketchbooks. Do you think so?

No for me. Hard enough to find stuff I've done on just 1 computer.
No way I am keeping my source files in the "cloud", I am not waiting around to access it when the 'net is having issues.

CrossRoads:
No way I am keeping my source files in the "cloud", I am not waiting around to access it when the 'net is having issues.

Or while everyone else in the world is having a peek at it and a snigger :slight_smile: (My stuff, I mean, not yours).

...R

I don't know, have you seen some of my code? I am sure the real programmers have a good chuckle over it! 8)

@liudr

in the IDE you can change the location of your sketchbook and it adapts the schetchbook option in the file menu without reboot.

robtillaart:
@liudr

in the IDE you can change the location of your sketchbook and it adapts the schetchbook option in the file menu without reboot.

I didn't know that. Thanks.

CrossRoads:
No for me. Hard enough to find stuff I've done on just 1 computer.
No way I am keeping my source files in the "cloud", I am not waiting around to access it when the 'net is having issues.

I had similar doubts regarding cloud storage, what if they go down? Well, you have a local copy and as long as you are the only person accessing the file, the cloud handles updates very well. Also different computers on the same local network, dropbox can do ethernet sync that is faster than pulling things from the internet. Say your main computer and a second computer just to test a project for some extended time, you don't have to carry flash drives. I have problems carrying flash drives between home and work, especially with versions etc. With cloud it's easy. When you back up your computer, the cloud drive's local copy is backed up as well, so you have a copy in the backup. Yes, if one of your computers hasn't been on for a while then it takes a while to update all the files. In case you want the file now, access a web interface (dropbox or onedrive) and get the latest version.

I have one main computer at home and a tablet (rarely use it for arduino), one office computer, and soon a business laptop. So with the cloud solution I don't have to keep copying back and forth with a flash drive.

CrossRoads:
I don't know, have you seen some of my code? I am sure the real programmers have a good chuckle over it! 8)

I'm pretty sure "magic numbers" are still widely used by programmers, right? The most popular one might be 10 :wink:

What are magic numbers? Not something that comes up in hardware designs.

CrossRoads:
What are magic numbers? Not something that comes up in hardware designs.

Say you want to run a for-loop that averages analog readings. For some reason you magically think 10 iterations should be enough. You put 10 in the for statement and subsequently divided the result by 10 (of course, assuming you don't know about oversampling and decimation). Then after some time you think maybe 5 is enough but forget to change all the "10" into 5. These arbitrary numerical literals that get used in programming are called magic numbers. I'm sure I'm guilty of using magic numbers. Thing is, another 10 somewhere else is not related to these 10's in the for loop and updating the code becomes a mess. Instead, I often use #define analog_samples 10 so I can use this defined word instead of 10 and then I can change it whenever I want without missing a 10 or changing a 10 that isn't related to the analog sampling.

Ah. I would just use
byte analog_samples = 10.

I have always used the zip install of Arduino IDE and extract it to my DropBox folder then in the same level as the Arduino IDE folder (see image) I create a Projects folder and alter the IDE preferences 'Sketchbook Location' to ..\Projects. The IDE is run from the dropbox folder and no matter where the dropbox folder is (differnet PC's) it pick up the Projects.

Clipboard-1.jpg

CrossRoads:
What are magic numbers? Not something that comes up in hardware designs.

For software people many of the hardware are magic numbers. Why is one cap 10uF and the other 100uF :wink:

what to think of
A = 1.8
B = 9.7751711e-4
C = 4.887585e-3
D = 57,2957795
E = 440

(A) conversion factor Celsius -> Fahrenheit
(B) 1/1023 => * B -> normalized analogRead .0..1
(C) 5/1023 => *C -> converts analogRead to 0..5.0 volts
(D) conversion factor degrees - radians
(E) frequency of the middle C

in short most of the magic numbers are undocumented conversion factors
that is why good naming of functions and variables and constants lead to almost self documenting code.

I know that most Arduino code is not confidential but the idea of saving any of my personal stuff on someone else's computer seems like madness to me.

How would you know if the Mafia (from whatever country) bought out the company that owns the servers?

...R

Robin2:
I know that most Arduino code is not confidential but the idea of saving any of my personal stuff on someone else's computer seems like madness to me.

How would you know if the Mafia (from whatever country) bought out the company that owns the servers?

Dropbox is purely for my personal code and makes life a lot easier when writing code at work, home & laptop. The number of times I had written code at work and forgot to copy to USB to bring home prompted my current scheme. Work developed code is written on PC's that have no internet access.

I know that most Arduino code is not confidential but the idea of saving any of my personal stuff on someone else's computer seems like madness to me.

You could encrypt the data before uploading ? mainly use it as a safe backup. Or as an encrypted drive.
If your personal data is so confidential you should consider to have encrypted drives on you PC too.

How would you know if the Mafia (from whatever country) bought out the company that owns the servers?

You would never know,

I think loosing the data (inaccessability) is a far bigger problem than people reading it (confidentiality) when storing on a remote server. It should never be your only external backup! I have worked with companies that stored their backups triple-wise in three continents to meet their redundancy requirements. If all three servers crashed at the same time, the world would have a bigger problem than the data.

The magic numbers listed, I just derive them as needed.
440 is Middle A, not C. So you could be out of tune there!

We can't access dropbox, and many other sites, at work. Blocked for virus protection reasons.

I've tried google docs cloud spreadsheet thing, just too slow for me.

CrossRoads:
Ah. I would just use
byte analog_samples = 10.

If you add const then the analog_samples is treated like a def and won't occupy any SRAM. Without const it would occupy SRAM.

const byte analog_samples = 10;

The above is better than #define because the compiler will check data type and report error when type mismatch happens. I should have migrated to const but am too old-fashioned to do it. Give me some time.

CrossRoads:
The magic numbers listed, I just derive them as needed.
440 is Middle A, not C. So you could be out of tune there!

We can't access dropbox, and many other sites, at work. Blocked for virus protection reasons.

I've tried google docs cloud spreadsheet thing, just too slow for me.

What about microsoft onedrive? It has some additional feature to fetch files from outside onedrive too.

Riva,

You are a couple steps ahead of me. What is your experience running the IDE in dropbox? Is there any performance issues? I considered moving the IDE but didn't actually do it.