I think (2) is the prudent course of action. The majority of cheating that I am aware of is only possible because professors reuse assignments and homework/exam questions from previous years. Solutions are simply passed down each year. One notable exception is in our theory classes, where the faculty make the effort to produce unique homework and exam questions every semester. I believe cheating in the theory classes is far lower as a result and I am extremely thankful that the faculty put forth this effort.
I am cognizant of the work required to generate unique assignments each semester. However, as demonstrated by how departments typically handle quals, it is doable if the workload is distributed. It is my sincere hope that this becomes standard practice. It is the easiest and most fair way to handle the cheating problem. The reason why such a system usually doesn't get implemented in practice is because it requires the entire department to commit to undergraduate education, which is quite difficult to achieve at research universities.^
Some other minor additions to the above system that have a good payoff/cost ratio: (1) static analyzers to detect duplicate code submission and (2) higher weights on exams to punish those who share complete answers on homework assignments.
^Don't take this as a condemnation of undergraduate education in the CS department at UIUC. There are incredible teachers here you'll get an excellent education if you make a little effort to avoid professors whose priorities are elsewhere.