I wrote the following code to transform a series of comma separated numbers to alternating zeros and ones e.g. 4,3,4,3 is 00001110000111. But it could be so much better like so: My insight is that when the code goes bit by bit or character by character there must be a better way.
Another thing that I do often in code is aggregating strings. E.g.: Oh, the horror! This code could be so much better, like that: