Live data from Hacker News

Why People Should Learn Python

iluxonchik.github.io

61–70 of 329 posts

Re: Why People Should Learn Python

#61

Is it just my feeling or are there languages which are preferred on HN? Indicators for languages which are liked by the HN community: - Positive stories get many upvotes and are instantly at the top of HN - Most comments are positive - Frequent coverage on HN about the language Indicators for languages which are not liked by the HN community: - Rants get many upvotes and are instantly at the top of HN - Most comments…

Interesting that you rate RoR lower than Java and .NET. My perception is that there is a lot of bashing of the latter two. Personally I do like Python, Rust and Go and I'm curious about Swift. So there's one "data" point. :)

Re: Why People Should Learn Python

#62
post #43

I switched to writing python as my main backend/scripting language with my new job. Previously I was using Ruby for most of this stuff with some Go. I must say that so far Python has been a vastly inferior experience for me. The languages are fairly similar all though I prefer the more talkative/english style of ruby and the use of functions over list and dict comprehension. The thing that really stands out to me tho…

I wish Ruby had the math and scientific library support of Python.

Also, I've been using Jupyter lately to brush up on data structures and algorithms. It's been pretty sweet to write code in a web notebook and render output including digraphs beneath each block of code. Is there anything like that for Ruby?

Re: Why People Should Learn Python

#63
post #52

I use python on daily basis for 5 years now. It's a really cool language, but: * Packaging is horrible * Releasing python code is a non-standarised nightmare. Every solution has it's own flaws * Big and complex projects in python are really hard to reason about * Poor support for concurrency (fixed in py3) Don't get me wrong, python is really cool as a proof-of-concept scripting language. But for mature and complex s…

I'm often frustrated with python packaging but after trying a few other languages' equivalents' (npm, go, etc.) I'm starting to think it's really not so bad.

Re: Why People Should Learn Python

#64

Why you shouldn't learn Python: 1. In-consistant syntax. 2. The language uses exceptions to control flow of logic. 3. Divided community, since Python 3+ included breaking changes to the standard. 4. Un-discoverable APIs. You better hope the documentation is bulletproof else the API could change in any which way during runtime. 5. Poor error messages. If an import goes wrong you are not told why, and so on. 6. Ultimat…

> 4. Un-discoverable APIs...

One of the main reasons I like python is that it is the most self-documenting language I've come across. Say what you like about significant whitespace, but in my last job I used to show salespeople snippets of code and they understood them - with no knowledge of the language.

Re: Why People Should Learn Python

#65

> Another thing is strict typing and debugging: since Python is an interpreted language, finding bugs wasn’t as easy Wait, what? How is its interpreter remotely relevant to its semantics? > if you have a syntax error in C, the program will simply not compile, on the other hand, in interpreted languages, the problem might go unnoticed for quite some time Hang on--Python allows you to run code that has syntax errors? I…

To my knowledge syntax within a file is completely checked when that file is loaded. I think the OP referred more to errors in method and other reference names.

Re: Why People Should Learn Python

#66
post #52

I use python on daily basis for 5 years now. It's a really cool language, but: * Packaging is horrible * Releasing python code is a non-standarised nightmare. Every solution has it's own flaws * Big and complex projects in python are really hard to reason about * Poor support for concurrency (fixed in py3) Don't get me wrong, python is really cool as a proof-of-concept scripting language. But for mature and complex s…

Fully agree. After spending quite some time working on a medium-sized Python codebase I went from being agnostic about static vs. dynamic typing to favor static typing. In a small side project I've used Python 3.5 with type annotations and it's an improvement, IMHO.

Re: Why People Should Learn Python

#67

Is it just my feeling or are there languages which are preferred on HN? Indicators for languages which are liked by the HN community: - Positive stories get many upvotes and are instantly at the top of HN - Most comments are positive - Frequent coverage on HN about the language Indicators for languages which are not liked by the HN community: - Rants get many upvotes and are instantly at the top of HN - Most comments…

Javscript (I assume you mean) just one star? Then why 90% of the projects on the frontpage are js-based?

Re: Why People Should Learn Python

#68
post #43

I switched to writing python as my main backend/scripting language with my new job. Previously I was using Ruby for most of this stuff with some Go. I must say that so far Python has been a vastly inferior experience for me. The languages are fairly similar all though I prefer the more talkative/english style of ruby and the use of functions over list and dict comprehension. The thing that really stands out to me tho…

"There seems to be fewer nice libraries and they seem to be spread across the web whereas Ruby centralises around GitHub. I also find that Python libraries have lacking or hard to find documentation in many cases." Could you clarify a bit more on this with the real world examples ?

Well for the case of "nicer libraries" I suppose I mean high quality libraries. Also good to note that I am referring to libraries in the web development/backend sphere here. I have a hard time thinking of some real world examples of there being a larger quantity of quality libraries for ruby, it's more a feeling that I get.

Around documentation and usage I think it comes down to the fact that for Python libraries a google search usually takes you to the modules page on the PyPi registry, to a project website or a read the docs instance. I usually find that where ever I end up doesn't provide all the information I want, e.g what's the latest version, what are some typical use cases for this library. As a concrete example let's compare Flask and Sinatra.

For both Flask and Sinatra a google search gives me their respective websites as the top relevant result. In this case I find both websites don't really provide all the information I am after. When I navigate to their GitHub page however the difference is more stark. Sinatra uses GitHub flavoured markdown to render a nice guide with increasingly more complex use cases. Flask just has some non markdown text pointing me in a few different directions. I could probably find all the information I need to setup and use Sinatra from just the GitHub Readme whereas for Flask I'd have to go navigate their read the docs page where all the documentation and usage instructions are spread over multiple pages and sub pages. I guess it comes down to my preference for the more concise format of a long markdown README.md vs the experience with a read the docs like set of pages.

I recon this is a bit rambling, it's kinda hard to put into words what my feelings around this are and why I hold the opinions I do.

Re: Why People Should Learn Python

#69
post #52

I use python on daily basis for 5 years now. It's a really cool language, but: * Packaging is horrible * Releasing python code is a non-standarised nightmare. Every solution has it's own flaws * Big and complex projects in python are really hard to reason about * Poor support for concurrency (fixed in py3) Don't get me wrong, python is really cool as a proof-of-concept scripting language. But for mature and complex s…

I'm often frustrated with python packaging but after trying a few other languages' equivalents' (npm, go, etc.) I'm starting to think it's really not so bad.

Just yesterday I had a frustrating issue. Digital Ocean VM with Ubuntu 16.04 and pip 8.1.1 installed via apt. "pip install -r requirements.txt" with pinned (recent) versions failed. I think it triggered this issue https://github.com/pypa/pip/issues/3687. Didn't investigate though, since this was just a side project and it was 11pm. Made it work somehow. :-/

Re: Why People Should Learn Python

#70
post #43

I switched to writing python as my main backend/scripting language with my new job. Previously I was using Ruby for most of this stuff with some Go. I must say that so far Python has been a vastly inferior experience for me. The languages are fairly similar all though I prefer the more talkative/english style of ruby and the use of functions over list and dict comprehension. The thing that really stands out to me tho…

I wish Ruby had the math and scientific library support of Python. Also, I've been using Jupyter lately to brush up on data structures and algorithms. It's been pretty sweet to write code in a web notebook and render output including digraphs beneath each block of code. Is there anything like that for Ruby?

Not to my knowledge and this is definitely an area where Python is a lot better than Ruby from my experience. My comment pertains more to web development than scientific computing.
Post reply on HN