Personally, I don't know how anyone could learn algebra without first understanding the concept of a variable. In programming, one generally thinks of variables like "boxes" that you can put values in (with, eg, `i = int(input("Enter a number: "))`) and take values out of (by referring to `i` later in the program). Algebra, then, expands on this by introducing more advanced ideas like "solving for a variable".
Of course, I'm probably biased because I learned programming before algebra myself.
I have not studied the subject beyond remembering my own childhood and seeing my children learn, but I think most kids are able to grasp the concept of a variable much earlier than they learn Algebra or coding. Variables grow naturally out of categorization, which is something very young children excel at. Once you learn the difference between "a ball" and "the ball" you're halfway there.
Imperative language variables aren't the same concept as algebra variable anyway. I don't see how one helps with the other.
In fact, it's much better to state this out loud to people learning to program, because statements like 'x = x + 1' added to the name coincidence make things very confusing.
Of course, I'm probably biased because I learned programming before algebra myself.