I hated it at the time, but when we were in grade school our sainted mother forbade us to wear jeans to school. She said, “the way you dress affects the way you behave. If you are dressed properly, you will pay attention and perform better.”
She was right. Even today if I attend a meeting or a continuing education class, I dress up a bit and sit in the front of the class.
It’s nerdy, but effective.