In my first job I worked for a guy named Mark. Mark was a very intelligent and goal-oriented programmer, and I learned a lot from him. But we constantly butt about standards and coding styles.
We then wrote under DEC VAX on VAX Basic. In order for this whole story to have any meaning, you must understand that VAX Basic was not the classic Basic you are thinking about. The compiler developers from DEC started with the Basic syntax and gradually added all the good from FORTRAN, Modula II and Pascal. For example, in the early 1980s, there were already exceptions in the language.
You also need to remember that in the 1980s there was still no full-fledged IDE with rich code editors (like Visual Studio). We used something called TPU (Text Processing Utility). This program was somewhat more powerful than Notepad, but significantly inferior to modern editors. Then she competed with Emacs and vi. As a result, each developer was himself responsible for his own style of code, and the text editor did not interfere in this matter at all.
')
Mark defined a strict set of rules and standards for writing code. His commitment to these standards was close to fanaticism. For example, he could connect to a working computer at night from home (and at that moment it meant using a modem at about 1200 baud) for the sake of review code. The next morning I had a meeting with Mark, where he commented on my code line by line, pointing out errors in style and demanding that I correct them today.
Some rules seemed absurd to me. For example, it required that each line begin with a tab and two spaces. Just think about it - both tabs and two spaces! Why two? I still do not know, but it was our standard. Mark had a list of words that could not be called variables. Yes, some of them were from the list of key words of the language, but about half were just words that Mark personally did not like. He defined things like exactly where you need to wrap long lines, in what cases what indents are needed, etc.
I was just mad about it all. These two spaces, these forbidden words - what nonsense! Some rules were seemingly harmless — such as moving the Then line to the next line after If. But the fact of the appearance of a new line in this case again led to the addition of these two spaces, which again made me angry.
But what could I do? Mark was my immediate superior, this was my first job after university, and the recession of the 80s was in the yard. Thousands of qualified programmers hung out on the labor market without work, so I simply could not risk it.
I do not say that I did not mind - my character simply sometimes did not allow me to remain silent. But still, I never brought the controversy to the acute phase. Well, since Mark remained my boss, and his adherence to standards did not go anywhere - over time, these standards became my second kind. Later, I realized that they can be thought of in another way. Standards did not limit the flight of my imagination, they gave me the opportunity to create within their framework, which could also be enjoyable.
If you look at the work of famous artists, you will notice that it was often the imposition of certain frames on the work that was often the key to creating masterpieces. People of creativity often go to these restrictions consciously - so they get the context for their creativity. I do not consider software development to be 100% art, but you can see creativity in good code.
After several months of my work with Mark, in the course of which I absorbed all these coding standards, another company bought and consumed our company. Mark, I and a few others successfully survived this process. We all moved from Minnesota to Birmingham, but that's another story. I can only say that cultural differences between some states are sometimes worse than between the USA and Europe.
The company that acquired my first company was also involved in software development. The number of employees was also comparable. But they had no coding standards at all. They also wrote under DEC VAX, they also used VAX Basic. But each developer wrote the way he wanted and did not pay any attention to the code of other people.
One of the programmers started with FORTRAN. He found that the VAX Basic code could be written in FORTRAN style (and you remember that DEC carefully dragged most of the FORTRAN capabilities into Basic) - so the code compiled itself and worked quite well.
Another developer learned to program on Apple] [and there were line numbers in his VAX Basic code. I am not kidding! Like in Applesoft!
Everyone in this office wrote differently, radically differently. Some were dragging something older, and some were using new approaches. Later it turned out that they did it on purpose. Partly because none of them wanted to learn something new, and partly because it gave them some security (as long as no one except you understands your code, and you need to support it, they won't fire you).
This was the exact opposite of Mark’s world of my own, where it was impossible to tell who wrote this or that line of code, since each line clearly conformed to the same standard.
And this was the moment when the first epiphany in my professional life lit up. Yes, strictly complying with coding standards is not easy, but alternatives are much worse!
Since then, in every project in which I worked, I tried to promote the idea of applying strict standards and programming styles. And even some oddities in standards (like two spaces after tabulation - which is very, very, very stupid!) Are much better than no standards at all. And I will furiously support even these 2 spaces if chaos is the only alternative.
Of course, at the stage of discussing standards I try to find and criticize obviously bad things, but as soon as a decision is made, it is made, and I become its most vehement defender.
I learned a lot from Mark. Something was good, something was bad. But his adherence to standards has very strongly shaped my understanding of quality software.