Back when I did my CS degree, we were taught the "B-method": https://en.wikipedia.org/wiki/B-Method
The course dropped in popularity with students and the university eventually dropped it.
Looking back on it, it really should've been a mandatory course for all software engineering students.