Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Python is a tool for people from diverse backgrounds to work together with code. "Advanced mastery" works against this goal by elevating your level beyond what others can read and understand.

But then again, I don't use list comprehensions, because I don't comprehend them, so what do I know.



Just because you can't read or understand masterful code, does not mean you should deny someone else's mastery of Python.

Are the "people from diverse backgrounds" (whatever that means) denied any of their rights and privileges by a programmer's use of "advanced" code? No. Quite the contrary: less-experienced people may still read, learn from and improve themselves by the advanced/beyond-their-level code they encounter. So what's your real issue?

Code is written to solve problems; not to please the lowest common denominator. If you can't read code, you're that denominator, and that's on you.

I find your statement terribly odd too. A true Python master tends to write highly readable code; idiomatic and Pythonic code tends to be readable, unlike in other languages. So if you can't read advanced Python (or even use list comprehensions, which are basic in the Python scheme of things), you're not qualified to opine on what "advanced mastery" of Python entails.


> Python is a tool for people from diverse backgrounds to work together with code.

Where did you get that idea? Python is a programming language. That some find it more accessible than others is orthogonal to the work needed to master it.


So people should suck at writing Python code for the sake of teamwork? What?


Mastering your tools is step one of being a professional.


Ah, the lowest-common-denominator argument for why your code is crap. That is the reason that Python code has become what PHP was 10 years ago: The mark of projects to avoid at all cost.


That's not nice. Everyone is on their own journey, their own learning curve, to a level experience needed to fulfill their own ambition. Rather than saying, "your code is crap" wouldn't it be more productive to encourage this person to challenge themselves to get outside their comfort zone?


That person explicitly dismissed "advanced mastery" and thus challenging and bettering oneself or themselves as being non-inclusive. I find this attitude highly offensive, because my motivation towards mastery is not of that kind. I'm happy to include people, explain them my code, help them along towards mastery.

Software also has an ongoing quality crisis, all while being more and more influential in people's lives. That person's attitude towards writing quality software helps to deepen that crisis and is therefore harmful.


> Everyone is on their own journey

Not everyone is trying to be nice either.


This is a perfectly sane, at least from business point of view, argument. It is being treated with a tantrum of downvotes. That in turns shows a lot about the state of affairs in a certain bunch of programmers. Most importantly that they put their own narrowly defined version of excellence above the importance of maintainability and thus tangible business value.

To put it bluntly. I'd hire the downvoted guy/gal in a heartbeat but would shy away from the downvoters. Why? Because I need to deliver business value which pays for our salaries. And I need to do it today and tomorrow and in years from now.

This is a message to normal people that understand that coding is a _social_ activity that has an audience in the present (your coworkers) and in the future (poor maintainers). Not only you're not alone in this but you are the majority.


I think downvoting that comment is stupid, but I also think the comment is wrong: Mastery does not imply incomprehensibility, but rather the opposite.


I have several decades of experience reading and using other people's code. When code is written at "master" level, that excludes most of the people who could generate business/social value out of using or improving it.

I appreciate the aesthetic beauty of great code. But it has a cost compared to average code.

This is doubly true for a language like Python, which occupies a niche of "lingua franca between users with wildly different backgrounds bringing value to the table by being able to use and change the same software".


What you are talking about is not code that is written at a "master" level, what you are talking about is code that is clever. An important part of mastery is understanding what kind of code to write, when. Mastery means writing code that is easy for others to read and modify, when writing code in a professional setting. Mastery can also be writing clever code with "aesthetic beauty", in a different setting like an academic or personal project. But people who write clever inaccessible code while working professionally with a team have a few more steps to walk toward mastery.


Mastery of Python, in my opinion, is mastering "Pythonic" code, which incorporates readability as a fundamental tenet. In addition, the gigantic universe of not only the standard library but also numerous external libraries and tools, of which a master can leverage to undertake tasks both rapidly and efficiently.

So, to me, a Python zen master would not write incomprehensible code, but instead write readable code very quickly that effectively and efficiently solved the problem they are facing due to their comfort working inside the Python ecosystem.


My personal goal is to get as close to Norvig as possible for general Python code: https://github.com/norvig/pytudes/blob/main/ipynb/Advent%20o...

(short but exact comments, inline testing, good function and variable naming, overall good use but not overuse of the standard library, functions very rarely more than a dozen lines, generally understandable code)


> I think downvoting that comment is stupid,

Why?


Not OP. Nothing in the original comment was technically wrong. It does feel misguided and perhaps a little naive. But it seems more like an opportunity for a real conversation to both understand why they think that way and as a way to educate why there might be a better way.

I reserve downvotes for posts that are flagrant, factually wrong, or are otherwise against the rules. Flagging might also be used. But using downvotes to have a voice not be heard feels wrong, too. What was said doesn't hurt anyone, even if a vast majority of people around here might disagree with it. Downvoting because you disagree feels wrong.


Downvoting to indicate disagreement is how HN has always worked: https://news.ycombinator.com/item?id=16131314


This might come as a shock, but pg has been wrong about lots of stuff, including this. Downvotes should be used for bad comments, not comments that you disagree with. These aren't the same thing. It's fine that downvotes and upvotes aren't symmetrical in this sense. They aren't anyway - highly upvoted comments don't get bolded the way that downvoted comments get grayed.


> Downvotes should be used for bad comments, not comments that you disagree with.

I disagree with this. But I can't downvote this comment because it is a reply to my comment. This restriction specifically exists because downvoting to disagree is how HN has always worked.

> highly upvoted comments don't get bolded the way that downvoted comments get grayed.

Highly upvoted comments float to the top and therefore have more visibility.


> This restriction specifically exists because downvoting to disagree is how HN has always worked.

I don't think so? For instance, I can upvote replies to my comments, so it's not they have set up some "you can either comment or vote" system. This restriction is just a nudge toward positivity rather than negativity.

> Highly upvoted comments float to the top and therefore have more visibility.

Yes, but downvoted comments float down and are grayed out. The point is just that the two things aren't totally symmetrical.

(Also I think some of this stuff was implemented years after pg's pronouncement about downvotes.)

And listen, I didn't say "people who downvoted that comment aren't using HN correctly and should be booted off the site!". I just said "I think it is stupid to downvote that comment". And I do. It's stupid to downvote perfectly reasonable comments that you simply disagree with. Again, most people don't use HN that way, irrespective of anything pg said in 2008, or we would see a lot more gray comments, and I would have gotten a lot more downvotes over the years on stuff I've said that people disagree with, instead of comments telling me why I'm wrong.


Bad comments should be flagged.


Abusive comments should be flagged. Bad comments should be downvoted. There are lots of comments that are bad because they are not constructive, or are off topic, or are arguing in bad faith. These don't deserve to be flagged. They deserve to be downvoted. And there are lots of comments that are constructive and in good faith, but just reasonable to disagree with. These don't deserve downvotes, they deserve a comment disagreeing, or an upvote on an existing comment disagreeing with them.

For what it's worth, I contend that - notwithstanding what pg and dang said many years ago, this is the revealed preference of most HN users, because it's quite rare to see a comment that is downvoted, just because lots of people disagree with it.


> revealed preference of most HN users, because it's quite rare to see a comment that is downvoted, just because lots of people disagree with it.

This does not match my experience at all.


Outside of this thread, which seems to have brought "downvotes are for disagreement!" crusaders out of the woodwork, I essentially never see grayed out comments that are in good faith but just wrong. That may be because there are roughly the same number of people who agree with the wrong take as disagree, but I doubt it. I also get five to twenty upvotes on a comment every once in awhile, but I don't think I've ever seen more than about two downvotes on a comment, including on ones that get strong disagreement in replies. People don't just agree with me a lot more than they disagree with me, it's that most people aren't using the votes in this symmetrical agreement/disagreement way. Which I think is a good thing, even if it's not what the site's powers that be intended.


It is technically and factually wrong.

Advanced != incomprehensible. Incomprehensible isn’t a feature of advanced either, you can be a novice and still write incomprehensible Python code.


Because downvotes aren't for disagreement. There is nothing wrong with the comment, it isn't aggressive or trolling or in bad faith or anything. It's just reasonable to disagree with it.


> Because downvotes aren't for disagreement.

On Reddit, not HN: https://news.ycombinator.com/item?id=16131314


I'm not going to downvote you just because I disagree with you, I'm going to write you a comment about what I think instead :)

I don't consider that appeal to authority canonical. My opinion is that downvotes should be used for bad comments, not for comments you disagree with. These aren't the same thing.


> I'm not going to downvote you

You can't downvote me because my comment was in response to yours. It's not an appeal to authority. It's a statement of fact as also seen in the implementation itself.


It was tongue in cheek :)

It is the definition of an appeal to authority to quote an authority figure as the final word on some debate. I've been here since before that first comment from pg about this, and no, I don't agree that it's a "fact" that this is "how HN has always worked", and no, there is nothing in the implementation that unambiguously makes downvotes be for disagreement.

But again, I'm not arguing for strict rules that work the way I prefer. I'm saying, this is a community I participate in, and I have my own opinions about how best to participate in it, which aren't necessarily aligned with the people who created the site 15 years ago. Other people are entitled to differing opinions about this, and can use the site how they prefer, but I still have my own opinions and will advocate for them.


> This is a perfectly sane, at least from business point of view,

It's perfectly sane to actively avoid trying to understand the your tools of your trade better?


I too would have disagreed 10 years ago. 15 years ago I may also have downvoted.

Now I recognise that we should, unless there's a very good reason (not for style), keep our code stupid-simple.

And doing that is harder than making it clever.


It was a bit dumb to make a definitive statement about what Python is used for, rather than just saying it's fairly often used for that.


Thanks, but I have a job. :)


I agree with you, though I wouldn't draw the line before list comprehensions, those are very basic.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: