– All code I write is… bullshit?
– Yes, it is.
(conversation between 2 developers somewhere in the Middle-earth)
The cruel truth is that the dialogue above is valid for most of the people involved in programming to some extent (developers, automation guys, DevOps, etc.). It sounds crazy because you like coding, you do our best, always improving skills, extending knowledge, digging, digging, digging…
It could be because of different reasons. I was thinking – how can any of us understand that our code isn’t good enough? How can we accept that our code is far from ideal, sometimes even bullshit, as mentioned? First of all, when we learn-by-doing something, our brain is limited by what we’ve learned already. It’s in the cage of current experience and we don’t know sometimes (actually, quite often) how can we do better or what can be improved.
That’s where mentors come into play. The main role of a mentor is to lead you. Just for preventing misunderstanding, a mentor is not a teacher or a lecturer, or your warden. He is a guy who can and who is allowed to tell that your code is bullshit. Of course, there is nothing offensive in such situation, a mentor sees how things are going from the different point of view. And this vision together with mentor’s experience helps him to give tips of advice which are the most relevant for your case.
I don’t get tired of repeating: nothing is perfect, neither is software, neither are people who create it. For instance, I wrote code which was clean and readable, well designed and easy to maintain from my point of view. But when I sent it for the developer’s review, I was surprised how much my “perfect” code could be improved. Simple example but after that, I understood how valuable a feedback from someone who is level up from you can be.
No doubts, sometimes you have a look at the old code and see obvious problems, especially when you haven’t seen it for several months or so. And you think: “Did I create it? How come?”. That’s because you’re getting better every f**cking line of code you write, if this line has a background underneath. When I say “background”, I mean dozens of read StackOverflow questions & answers, Javadoc (or any other -doc from the other languages) and articles that we learned and analyzed for writing that single but important line. This is a mostly self-organised process but a mentor plays a vital role in it by adjusting, leading but not forcing.
In order to understand how else a mentor can be useful, let’s imagine for a moment that you have the superpower to create a new world, for example, a fantasy world, but you have no or very basic skills in worlds design. Are you gonna fail? Most likely, at least you will not be able to build a perfect word where everybody’s happy and everything goes well. The very first version of such word will be raw and slack-baked and have lots areas for improvements. Yeah, ..it happens! The second one may be better, if you don’t make too many fixes by guess. And so on, and so far.
It’s okay, if you play with a fictional world. But what if you’re almighty and a single wrong decision can affect millions of people? In this case, a mentor can help by, for example, explaining best practices in building worlds, pointing at pitfalls to avoid, saying which component can be added to the map. Such a great architect. No, such The Great Architect.
Our automation framework is a world. A world that we build sometimes without complete understanding how it should work and grow. When the time comes, we need to change it but changes can be very painful and expensive (remember the previous paragraph?). However, we’re ready to do these changes because it’s our framework, our baby. But it will become very difficult to maintain eventually.
A mentor can help you to design test frameworks which don’t trigger a headache neither for you nor for their users. A mentor can emphasize tough areas where you can add flexibility for future. A mentor can advise design patterns which will make your code readable and easy to maintain. A mentor can do a lot for you. Just ask…
In the social sciences, triangle is often used to indicate that two (or more) methods are used in a study in order to check the results of one and the same subject ... By combining multiple observers, theories, methods, and empirical materials, researchers can hope to overcome the weakness or intrinsic biases and the problems that come from single method, single-observer and single-theory studies.So what's my point? Testing frequently involves collations, connections, and comparisons. Triangulation is an interesting model of those activities to consider, for me, right now, even there's likely no solar system in which it's a novel one.