by leibnizwasright · 8y ago · 0 comments
My approach is to ask the person question and understand what is the objective trying to be achieved, and hope with the answers given, the person realize it is doing a mistake.
I also hope that the person respect my experience and is able to learn from my mistakes and do not need to do the same mistakes in order to learn.
But I do not always succeeds in these endeavors. Once a colleague was developing some page objects for Selenium tests and creating classes with only one attribute, which was the full URL of the page. Of course tests would not word when executed in several environments and to have this files were useless. But to fix exactly this, I saw it required more knowledge on OO design than a simple talk could give.
If that's not the case, and once someone recognizes what it is that you're doing, they may become rightly offended at the arrogance you're displaying by choosing the teacher role for yourself.
Or else you are probably wearing an expression of disapproval when you ask them these questions. If you go in with an honest “I want to learn and understand” stance, normal people will generally be happy to answer.
But that's not what Socratic questioning is. It is specifically when you ask pointed questions, pretending that you don't know the answer already, in order to make the student work out the line of thinking herself, or perhaps force her to flesh out her thinking more completely.
It's more about making the askee think than transferring information. As such, trying to mask that behind "I'm just asking questions" is rude.
So 1st, make questions, understand what is the objective with that code you see on screen. 2nd, make more questions too see if other use cases were considered.
3rd, there are best practices, literature that provide a common way of working, discuss how to apply this.
There are no ways of understanding without making questions.
On this specific case, besides the lack of OO design knowledge, there were also a misunderstand on the page object pattern , how web apps are build and what is the web app and what is part of the browser.
And this is why I also talk with my team on my ideas to develop something before or while developing it. It should not be a surprise, no matter how nice and commented the code is.
What do you do in this situation?