I am wondering if when I upload a program in which I did only small changes compared to the previous version of that program (changing for example byte a = 2 to byte a = 3), will the whole program be uploaded or just the changes?

My real question is, will uploading a program "damage" every memory cells it uses, even if only one memory cell was required to be changed? Considering "memory supports at least 10,000 writes or upload cycles"... I'm already at 2000+ uploads I think, and I haven't even done 10% of the code for my project, just testing things...

Well you are right, I use a Mega 2560 so can't replace chip (at least not easily) but (sainsmart's) Mega 2560 is like 15$ these days. But still, isn't it possible for the "uploader" (avrdude?) to "download" the current program that is on the chip, compare with the to-be-uploaded and if only few bytes changed only upload those bytes? Is it theorically possible and if yes, why it hasn't been made? It would greatly increase the lifetime of that flash memory right?

I'm already at 2000+ uploads I think, and I haven't even done 10% of the code for my project, just testing things...

Is this an exaggeration? I can't imagine how a project small enough to fit on an Arduino could require 2000 attempts to get 10% of it working. Are you uploading the code when you meant to just verify it, or something? You'd have to be uploading every five minutes for weeks on end to reach that sort of number of uploads.

I only provide help via the forum - please do not contact me for private consultancy.

Well, I have an Arduino since approx 7 months, uploading on average 10 times a day... (that's how it works when you want to explorate and learn) so that's how I calculated those 2000+. Maybe you don't realize, but it goes quick.

Divide the cost of a new Arduino by the number of hours you will have been programming before it wears out. If you do about 15 minutes of programming for every upload that works out at 2,500 hours before you use up the 10,000 uploads. £25 / 2,500 = 1p per hour. Not very expensive compared with your time.

because it is not a problem and it would take so much memory space in the boot loader that it would restrict the maximum program size.But suppose you added one byte at the start of the memory then everything else gets shuffled down making all the code needing moving. So just changing one line in C might result in one more or less actual machine code instructions and that would shuffle everything.

Well, I have an Arduino since approx 7 months, uploading on average 10 times a day... (that's how it works when you want to explorate and learn) so that's how I calculated those 2000+. Maybe you don't realize, but it goes quick.

Bearing in mind that when the flash life runs out the failure symptoms are that the memory becomes 'leaky' and will eventually encounter bit errors if you leave it for long enough, if you keep using your arduino rather than leaving it for months and years without being reprogrammed, it is likely you will be able to massively exceed the specified life without encountering any errors. And, if it does encounter any errors you can resolve them by reloading your sketch. And if you get fed up with that it's only a couple of bucks to replace the chip, although I suppose by the time you reach that point these chips will be obsolete and will have been replaced by something with the same form factor but a million times more powerful.

I only provide help via the forum - please do not contact me for private consultancy.