I majored in CS (and am now getting a PhD in it), and guess what? Actual academics in CS also write shitty research code! Those undergrad CS majors you're talking to would be horrified by some of the code I've written, and even more by some of the code I've seen out there. The only thing I'd recommend is actually reading some good code (hopefully in your area of interest), just so you get a feel for some efficient patterns that are readable and intuitive and useful for your work.
:') I feel less alone now Wow, that's a really good idea, I hadn't thought of that. Time to creep through my labmates' and advisor's R scripts on the server...Actual academics in CS also write shitty research code!
The only thing I'd recommend is actually reading some good code (hopefully in your area of interest)