Hacker News new | ask | show | jobs
by peti 5661 days ago
I agree, but I would like to quote the author : "This isn’t an article where I try to convince you to write your code like I write mine." He does not really try to force his style. I respect his approach, because even if the article seems to be about aesthetic preferences, I think that he is concerned by the lack of curiosity and education that may be shown by some programmers. I think what the author really says is : RTFM. None of the comments here focus on the conclusion of the article, which is the most important part:

"Cozy up with some hot chocolate and the ECMAScript spec some Saturday afternoon. Practice a little. Play around with some test programs. It’s a good time. Or don’t do that, if you don’t feel like it. It’s your life. You almost certainly have better things to do with it. Just please stop making authoritative claims like “terminate all lines with semicolons to be safe.” It’s not any safer, or more reliable."

2 comments

Some programmers like to know everything about a language they are using, knowing all the edge cases, keywords no-one else uses, the exact execution order of tokens and weird quirks. They are masters of complete understanding, and very occasionally this mastery allows them to come up with a revolution in the way things are done. Let's call these the Scholars.

A lot of others don't though, the joy of programming for them is not mastery of the grammar but writing the story. They would rather use a combination of run it and see and diving into the documentation only when totally necessary. Do not mistake this for an amateur who is cargo culting their code, these programmers know exactly what their code does, they just learn the bits they need as they need them. Let's call these the Mavericks.

I struggled to find neutral words for both schools of thought, don't read too much into the names I picked.

Both types can be excellent hackers. And of course we have a spectrum in between Scholars and Mavericks.

I am a Maverick. I find the Scholars, with their memorization of all the rules, to be both awe inspiring and entirely tiresome at the same time. I don't enjoy sitting down with a cocoa and a spec because I'd prefer to be programming. There is a vast swathe of every spec and every library that is entirely useless for the task I have at hand, quite often for any task I would ever do. I see anything which forces me to learn that useless knowledge as a waste of time.

Use semi-colons for every statement is a simple and easily remembered rule, one which takes no effort compared to reading a spec that delivers me little or even no benefit. I will also tend to forget these rules because my mind just doesn't see it as particularly useful information, I don't use it enough. I don't have any motivation to force that knowledge in my brain through learning practices because to a Maverick, it's boring.

There is no lack of curiosity or education in the latter type of programmer. I read this type of article which Scholars so often write with exasperation. Mavericks just don't care about learning the intricacies of language grammar compared to doing something else in programming. That something else is just as intellectually demanding.

Please remember that the next time you come across a Maverick, we're just of different schools, not of different ability.

If you are a Maverick, then that's fine. Write code however you like. Seriously, I care less than anyone.

Just stop talking trash about how I do things. If the story is more interesting than the grammar, then shut up about grammar and go back to writing stories.

My problem is with telling people that there is a problem when there is no problem, and at the same time calling yourself a scholar.

If you don’t understand how statements in JavaScript are terminated, then you just don’t know JavaScript very well, and shouldn’t write JavaScript programs professionally without supervision

You obviously do care to such an extent that you're saying that we shouldn't even be programming without you looking over our shoulder.

I appreciate your reply. I am not sure if I really am on the Scholars side of the spectrum myself, but I surely love to know how to use my tools appropriately (Googling instead of memorizing everything is efficient). There was an article recently on HN (http://news.ycombinator.com/item?id=1906070) related to "bad" habits in Perl (What about using the safer, clearer three-parameter form of open?) : as you and other expressed it more clearly than I did, this is the Cargo Cult side of programming that bothers me. Also, I was disappointed that most of the comments seemed to fight over stylistic considerations whereas the point of the author was "Just please stop making authoritative claims", e.g. uninformed claims; but don't get me wrong, I clearly noticed that people here actually know quite well their subject, even when they choose the always-use-semi-colon side of this war.
I have a problem with the way the author puts forward his position: "I am sorry that, instead of educating you, the leaders in this language community have given you lies and fear. That was shameful."

As folks have said here, there is a valid alternative position. He's arguing as if there's no valid alternative ... which is problematic.