Hacker News new | ask | show | jobs
by jorge-fundido 2518 days ago
Perhaps it's just a factual element. Or perhaps the intention is `s/python/pragmatic/`. Yeah, python sucks in many ways but is it really so horrible? I know! Let's ask the reader to get intimate with a static compiler. If they're "smart" enough to satisfy (or trick) the compiler, then they've earned the "reward" of being able to execute their program.

There is value is static typing, but there are many instances where that cost is not worth the reward.

2 comments

I think the grandparent poster was just pointing out that this post has very little to do with python or matplotlib, with the code to generate the plots just thrown in as an afterthought at the end. Which makes it weird to have them in the title. (Whether python is a good tool or not is unrelated to this observation.)

I would expect a post entitled “exploring mathematics with python” to have a whole lot more python code (inline with the text and better explained instead of an uncommented blob at the end) and a whole lot more mathematics.

A more accurately descriptive title for this post might be “counting the repetitions among randomly chosen positive integers”.... which of course isn’t going to get as many clicks or as many reflexive upvotes from non-readers as a post promising “exploring mathematics with python” because it doesn’t sound (and frankly isn’t) all that interesting to most readers. (It might make a decent short project for middle school students though.)

Personally I flagged the post for its misleading title.

What I got out of the post was that exploratory and experimental mathematics is fun and worthwhile and if you haven't tried it, you should, and by the way, this experiment uses Python and matplotlib (which some readers may already know). I think you missed the point of the article.
Every in the title is a major part of the article. The author used Python's matplotlib to investigate mathematics, and share both the math and the Python code.

It's not the author's fault if you bring your own baggage to the words.

> If they're "smart" enough to satisfy (or trick) the compiler, then they've earned the "reward" of being able to execute their program.

This is needlessly dismissive and frankly offensive.

I prefer having errors from a compiler(or static analysis, or...) because it helps me. Not because I am a better programmer but because it helps me be a better programmer.

> Compiler: Hey that type doesn't work there

Oh! Thank you! I meant to use this type instead.

> Compiler: This value is freed here but used right afterward here

I meant to clone it. Whoops. That would have been embarrassing to debug in production!

And so on.

I absolutely recognize that it's a barrier to entry, but it's not one erected to keep people out, it's there to catch your mistakes for you so that you spend less time debugging and more time writing your actual application.

It's also needlessly dismissive to write as if everyone using Python is making a mistake.
> It's also needlessly dismissive to write as if everyone using Python is making a mistake.

That's true. If I start doing that, please call me out on it. From the HN Guidelines:

> Please respond to the strongest plausible interpretation of what someone says, not a weaker one that's easier to criticize. Assume good faith.[0]

I'm very much not a fan of meaningful whitespace, but I use Python occasionally, and regularly help my friends who are learning it grasp this or that topic. Except where pointing them to a specific library or other tool, I've never said "You shouldn't do that in Python, do it in this other language instead".

[0]: https://news.ycombinator.com/newsguidelines.html

I apologize if I misinterpreted what you wrote. It seems you just meant to criticize the title, or...? I'm actually not sure what your above comment was getting at. Sorry if I missed your point.
> I'm actually not sure what your above comment was getting at. Sorry if I missed your point.

I was responding specifically to the content that I quoted, which came from the post that I replied to.

> It seems you just meant to criticize the title, or...?

I should note that I am not the person who started this comment thread.

They were criticizing the post title as they did not believe that the contents within were specific to Python.

They were not criticizing Python either. Rather they were saying that the word Python in the title appears to be used to attract viewers who might otherwise be intimidated by the contents, instead of being relevant to the contents of that article.

I see! Thanks. What I meant to say was that the "'smart' enough" comment seemed to me to be meant in a jocular way and should not be something to take offence at. However, I did indeed misread the thread flow.