Live data from Hacker News

Ask HN: Why you use python most?

news.ycombinator.com

11–20 of 39 posts

Re: Ask HN: Why you use python most?

#11

Python used to be my "main" language, but that was only due to familiarity. For most IO intensive tasks (especially networking), Python is not the best choice [0]. Recently I've been using nodejs with promises and async/await for heavy IO. I really like the productivity gains of Javascript's functional programming style, and the event loop lends itself well to network/IO intensive tasks. (I would prefer to use golang…

[deleted]

Re: Ask HN: Why you use python most?

#12
Automation. I'm building a dev environment that does various bits and pieces transparently - DNS, databases, reverse proxying, backups/restores, secrets, stacking/merging/relating containers etc.

I kinda just stumbled into it as the logical way to move forward once the shell scripts I started out with became too complex, but I've fallen in love with it. I'm sure it will be my go-to language for a lot of coding tasks in the future.

Re: Ask HN: Why you use python most?

#13
I work on a GUI application written with PyQt. It's been very productive for my small team. The downside is that Python's permissiveness has bitten us over and over again. We've become focused on managing mutability --- it's the central problem we have to solve.

Re: Ask HN: Why you use python most?

#14
The biggest reason I use Python? Honestly, because it's great for interview-type problems, comfortable for writing on a whiteboard, and suits one-man projects where I don't find myself wishing for static typing or interfaces as a way to coordinate code.

P.S.: I'm sure you can make big multi-team projects in Python with the right discipline and tooling, but that's just not the spot it occupies in my language-toolkit.

Re: Ask HN: Why you use python most?

#15
post #14

The biggest reason I use Python? Honestly, because it's great for interview-type problems, comfortable for writing on a whiteboard, and suits one-man projects where I don't find myself wishing for static typing or interfaces as a way to coordinate code. P.S.: I'm sure you can make big multi-team projects in Python with the right discipline and tooling, but that's just not the spot it occupies in my language-toolkit.

Likewise for me — it's the best general purpose, (very) high-level programming language.

I don't think it's really even playing favorites when it's a competitive language with a very diverse collection of good libraries across applications and domains.

Re: Ask HN: Why you use python most?

#17
I use it most for numpy, pandas, scikit-learn, and a bit of graphing. I use it because there is so much data processing, formatting, piping, munging, and so forth involved in analytical work in data analysis, and I think python brings in the ideal combination of general programming and stats/numerical libraries.

I don't use it for web programming. If I had my choice, I'd still use an integrated system like rails or Django, and bring in javascript sparingly, but unfortunately, that's not my choice, so I end up using a lot of Javascript.

Re: Ask HN: Why you use python most?

#18

Python is my go-to language and I write big batch jobs in it and profile them and use PyPy. I do it because it's so clean and concise. Recent C++ with lambda and auto is much improved but still not nearly as productive as Python. Likewise lambda has really made Java better, but lack of type inference really makes it clunky to write. I really want a statically typed Python. But because I don't have it, I choose Python…

> I really want a statically typed Python.

Can golang fill this role?

Re: Ask HN: Why you use python most?

#19
post #6

I'm in ops and python is pre-installed on debian and fedora so besides writing stuff in bash, python is my next best thing without installing other languages. I would like to do more advanced things in python but I don't have any big projects / automation in my head yet.

How about moving any (all) calls to /usr/bin/ssh to run a script on a remote server? Like running deployment, upgrades, or creating home directories and mail folders for a new user? http://harpcaller.jarowit.net/ ( https://github.com/dozzie/harpcaller )

We do this using Ansible (Written in python haha). So we have that covered there =)

Re: Ask HN: Why you use python most?

#20
Jupyter Notebooks + Theano + Lasagne + Matplotlib + [the pip package ecosystem]. For my weird little niche (Machine Learning / Computational Intelligence), it is the perfect tool. It's also the perfect language for basic management scripts - a handful of lines of Python made setting up a shared machine learning server with Slurm/Jupyter-Hub/IPFS/Theano+Lasagne+Tensorflow (the last of which I've not personally used) easy. I work with a tmux session with scripts running training nets, and a Jupyter notebook open to evaluate and explore parameters and behavior at save points each epoch. Python/Theano/Lasagne allow for concise easily readable code that documents and describes the concept at hand such that my code cells wind up containing few, if any, comments - instead writing anything that needs to be written in markdown with any inline graphic needed in cells between code cells. For real-time work like mine, scripts are likely to be run once (or rather several times, changing meta-parameters along the way), and most code written will be notebook cells either soon to be deleted or as part of a record that should ideally be in clear readable language.
Post reply on HN