Cisco switch hardware installation guides have a section on how to connect stack cables. The diagram below is the classic example, taken from the 9300 guide. The guides say this is a recommended configuration, not the recommended configuration
To me, this method has the drawback that you must have one stack cable long enough to reach from top to bottom. This becomes pretty significant when you have several switches in your stack, and more so if you put cable management between each switch.
Let me recommend another configuration.
If you connect two switches with stack cables, most people connect the two A ports and the two B ports together. It is tidy:
But not as per the recommendation from Cisco. So what if you want to add a third switch to the stack? You can't go from here to the Cisco method without breaking the stack, but you don't need to. You could instead do this:
You don't need to break the stack, and can add your third switch without disrupting the network. We can now add a fourth switch, and then a fifth switch in the same manner, never breaking the stack, and never needing a stack cable reach more than two switches away, and no cable even crosses another:
Another, and perhaps better, use for this method is creating a single stack of top-of-rack switches across numerous racks using only 3m stack cables:
This is extensible to any number of switches, not withstanding the limitations of the hardware itself. So, why isn't this the recommended configuration?
As an interesting aside, this pattern is very similar to the straight-laced boot problem, where the stack cables are equivalent to the lacing inside the boot, and the internal stack bus is equivalent to the external straight-laces.