When I create software I am often tasked to follow the whole development life cycle in a brief way. I am usually given a requirement specification - what the software has to do, design it using UML diagrams and/or pseudo-code then I write the code. I am then tasked with providing test cases so in a way I am following the standard lifecycle: Analysis -> Design -> Implementation -> Testing ->
My design though is generally just pseudo-code on paper and other scribbles. I find if I create UML diagrams (usually class diagrams) or type up my pseudo code then I just end up having to change it. The reason I have to change it is that when I write my code I realise some things don't work as intended, some things could be done better in other ways or my original design in some way was wrong. For example if I create class diagrams and then I realise I need extra or less methods.
My question: does this happen in industry? I assume the design can't be perfect and changes tend to be made? Is the original design updated? How often is the design updated? Is it done in phases? i.e. implement the first version using original plan then design possible changes and implement those?