Electrical tape can be used to keep folded cables compacted. A second and more elegant option is to use some 'spiral loom' - this is available at most electrical shops and is typically used to keep electrical cables neat and tidy. After the cable has been folded or cut, simply wrap the 'spiral loom' around the cable, to give a neat and compact result. The 'spiralled cables' are still quite flexible, but also tend to hold their shape when put into place. The left-over spiral loom can then be put to good use tidying up the rest of the electrical cables inside your machine.
Spiral loom makes for tidy looking cables.
While folding your cables is adequate, a much better result can be found if you take a razor blade to them. A little care is needed, but it's surprisingly difficult to actually kill them. Since standard IDE cables are easiest to work with, it's probably a good idea to start with those. If you don't have half a dozen of these lying around, you can buy them for a couple of dollars each, so even if you manage to stuff one up, it's no big drama. What you'll need.