Optimization: moving with code vs. moving with rig

In terms of very basic repeating animations, is it better to have a rig or just move things with code? For very simple things (rotating, floating/bobbing, etc.) code seems the better way to go. But, for example, what about opening/closing blinds? Multiple slats moving at once could work with a rig, but I could just as easily move slats individually in code. Is rig vs. code just a matter of ‘rig for organic/complex and expressive moving objects’ and ‘code for basic and inexpressive objects?’
I know there are probably some good resources out there for this, but it’s not an easy topic to search for. Any links or help would be appreciated!