It's more of a question actually. What's it like to read other's people code and why you should be prepared?
Well, the evil doers over at the powerful and evil Abstruse Goose Corporation made this into a bloody good comic (opens new window). Go read it and then come back, so we can understand what's really going on here.
waiting for the reader to come back
Well if you made it to this sentence it means we can continue with our philosophical pondering of random stuff about computer programming.
In order to answer our questions we first have to look at the standards of code writing. I'm not referring to language standards but to actual writing of code. The developer community has standards, in terms of code writing, right?
We can all agree that we do, in some way or another. The problem with these standards it that there is no proper authority that tells the developer how to write his or hers code.
The lack of proper standardization from developers is appalling. Yes, if you work in a big company, you have certain guide lines that you must follow, but if you're an open source developer, like most of us are these days, then you don't give a rats ass about guide lines, because you write code the way you feel comfortable writing code.
Maybe you're opening the brackets on a new line after the class name, maybe you're using tabs instead of spaces and above all that you use 4 tabs.
As much as I hate to play devil's advocate, with myself, contradicting my own words, I have to agree that all of the above are standards that people adhere to. There are standards, but there's too many of them and people still write code the way they feel comfortable.
Unity. That is what we need. We need people to collaborate more than they do now. Github is doing a marvelous job at this. How come?
Well imagine forking a project, modifying it and making a pull request. You, for the sake of the project and others like you write the code in the original style. Or maybe someone else has this job of formatting all the code in that project. But let's get back to collaboration.
Why is collaboration so important? Because the more you talk and work together with other developer the more you learn from them, they learn from you and both sides start using the same style of writing and conceptual thinking.
You start to write code with a style that is shared by your developer friends / collaborators. As everything these days, unity and standardization also have a different side. When you apply unity and standardization you automatically take out the individualism of each person and you create a kind of dictatorship out of code writing.
If everyone would conform to the same style of writing code, we'd be North Korea of code writing. And we don't want that don't we? It's a treacherous path to follow, this standardization of code writing, and in the end it's a matter of choice for each developer.
So, in order to answer our questions we had to look at the way people work and the conclusion we can come to is this: reading other people's code is a bad if you don't have enough experience in the field. You should be prepared to read, interpret and think like the original developer of the code, because it all revolves around your ability to adapt to certain situations. But the human race is built to adapt and you should have no problem in deciphering some lines of code.
Until next time, code long and prosper!