You could edit the maximum allowed block size in the code. Change it to 100 KB and it'll be a soft fork, change it to 100 MB and it'll be a hard fork.
Good example.
Changing the max block size from 1MB to 0.1MB is a softfork, because it makes previously valid blocks (0.1MB-1MB) invalid.
I think changing the max block size from 1MB to 0.1MB is a hard fork, actually. Miners that don't upgrade will generate one 1MB and those won't be accepted but the upgraded clients, forking the blockchain.
A soft fork would be changing the max block size one
produces from 1MB to 0.1MB, while leaving the max block size one
accepts unchanged.
Or am I wrong? #sincerequestion