Simpler Code for 7 Segment LED and Shift Register

You can shift it to the 595 in one line using SPI. I have a brief bit of example code here: