I've been on Stack Overflow and Code Review for some time and I admire people who help there and provide amazing code reviews. I myself have also quite a bit of experience. Unfortunately to meet and work with such people in real life is almost impossible.
Each and every company I worked for (approx 8-12 so far, also as a contractor) was so unprofessional that I wonder how it even still functions. People there had no idea about the most basic concepts. Everywhere magic strings, namespaces named Classes, classes with several responsibilities, everything you can do wrong they managed to do it this way.
What is worse, they did not strive to improve. They needed tremendous amount of time to implement simplest changes because their code was so bad.
I decided to try to find a new job where I can work with real professionals so I created this new account to ask this question (because I use the other one for CVs).
The question is: How do you find out whether a company employees are good at what they do?
Would you say it's a good idea to ask for a sample of their code? If they want to check what I can I would also like to see if they are worth my time. I don't want to waste almost my entire time at work debugging some old code where each variable is a tmp1, str1, lst3 to tmp23.
I don't want to be just a coder but an engineer and create software that is robust and extendable because of its design and not because of try/catch everywhere and hundreds of ifs to fix some stupid bugs or few hundreds lines of code inside an event handler.
I've tried linkedin and xing but closed both accounts after I noticed that most people have just fake confirmations about their skills.
What should I do to not only be interviewed but also to interview the prospective company. Do you have any experience with that and could give me some advice?
Should I ask for a trial work?
Should I bring my own questions to the interview?