HooDis

joined 1 year ago
[โ€“] HooDis 8 points 1 week ago

rsync by itself provides no encryption, and i wouldn't use just rsync by itself. That's probably what he meant.

You should use something else with rsync that encrypts the data before uploading it to a server that you don't own physically.

Or use restic, which takes care of the uploading part too, so you can skip using rsync altogether.

[โ€“] HooDis 1 points 11 months ago* (last edited 11 months ago)

Header guards and #pragma once serve the same purpose, so i'd say use whichever method you want. #pragma once should exist on most modern compilers. If your compiler doesn't support that, then normal header guards.

one advantage of #pragma once is that it reduces the pollution of #defines that header guards introduce. For every header file, there would be one #define FILE_NAME. Depending on your naming convention of these defines, it may clutter up the global namespace in the long run.

Header guards, like you said, provide better compatibility. At the end of the day, use whichever you want. i use #pragma once because it's much more convenient. I hope this answers your question!

Edit: oh and of course, if the existing code base is using either one of those ways, stick to that same convention!