Live data from Hacker News

Python overtakes Java to become the second-most popular programming language

techrepublic.com

341–350 of 357 posts

Re: Python overtakes Java to become the second-most popular programming language

#341

I was a total raving Python evangelist for the first 12 years of my coding career, and then got a job as the CTO for a Python based startup that had been running absent a technical leader for 5 years, with relatively junior coders making all the decisions. I still love Python, but I now have a completely different attitude to hyper-dynamic languages (like Python, Ruby, Clojure, Elixir, etc). In my new opinion, they a…

Absolutely agree with you. But with advent of microservices architecture patterns, it is possible to keep service code within bounds of maintainable size.

The more I do this, the more I come to believe that boundaries, no matter how you do them, are the million dollar question.

Re: Python overtakes Java to become the second-most popular programming language

#342

I was a Python dev for 14 years or so (now doing mostly personal projects in C/C++, Scheme, Clojure), and 10 years ago met my partner who is a biologist. I think one thing programmers underestimate is how many scientists and academics are using Python. It's not just ML, it's pretty much every kind of scientist and tons of non-science academics too. The fact that it's a great "casual" or part-time language is huge for…

I'm one of those scientists, working in industry R&D. I use Python for everything from Jupyter notebooks to a roughly 8000 line program that runs a prototype of a product. Python pulled me away from Visual Basic several years ago, and then I have a longer history going back through Turbo Pascal and ultimately originating with primordial BASIC. On the hardware side, I use C within the Arduino ecosystem. I've got rough…

This is an area I want to get more into actually. I've done a bunch of freelancing for scientists, and it seems to me that there is now a wave of scientists hitting the code size and complexity level where understanding the principles of maintainable software architecture is become pretty important. One of the gigs was reverse-documenting some RCPP because they had been left with a ball-of-mud someone had to write in a hurry and no one knew how to break it up. It was interesting, and cool to help people doing real science. If you have any thoughts about the viability of teaching architecture to scientists, I'm all ears. You can find me on linked on or my user name plus the email of a behemoth starting with G... ;-)

Re: Python overtakes Java to become the second-most popular programming language

#343

Earlier quoted context omitted.

I do most of my work in C/C++. There's a ton of it in every microwave oven, washing machine, car, telephone, device driver, etc.

Likewise, my day job has been C++ for the last decade. And it's not just in devices or games, or in OSs. Before I worked in hardware devices I worked in video pipeline stuff in Google Fiber. And before that, I worked on the ad serving stack at Google and another company before that. All in C++. A good portion of servers @ Google are in C++. Now, if you strictly interpret the "C" in this popularity nonsense as "C", th…

Maybe I'm crazy, but recently I had to dive into ANSI C in a big way for some computer music projects (many old computer music code bases are pure C) and I'm really liking it. It's like you have a handful of really damn sharp tools and you can do amazing things with only those if you keep in mind you gotta keep your fingers clear of the blades.

Re: Python overtakes Java to become the second-most popular programming language

#344
post #311

Earlier quoted context omitted.

You might be surprised to see the quality of the docs in the Elixir world: https://hexdocs.pm/phoenix/Phoenix.html

That looks … like many Python projects? It's slightly prettier than the default Sphinx theme but I'm not seeing anything which wasn't common a decade or two back.

IMO part of the quality here is these docs are generated from comments in the code. All you have to do is document your functions and modules properly, run a command, and you have an entire set of docs.

It reminds me a lot of JavaDocs, although I never used them extensively. I'm also not very aware of how documentation looks in the Python world.

Another interesting thing is the code examples. You write them in the comments as "Doc tests", and they are run and tested like normal tests. This means that all the code snippets are up to date with the latest version of the project (as long as you do test!).

The best part, also imo of course, is that it all works out of the box.

Re: Python overtakes Java to become the second-most popular programming language

#345

Earlier quoted context omitted.

I've often found that starting some quick-and-dirty thing in shell scripts is great, but once I get to around 100 lines of shell script code, I'm better off switching to python (or similar). Similarly, once I get to around 1000 lines of python code, I'm better off switching to compiled, statically typed language (e.g., Java, C, C++, etc.). So my own heuristic has become: shell script when

I feel that Python has (among many, many other things) replaced Matlab and the likes. These were the go-to "prototyping" languages people in science, R&D, etc. used (and still use!), and then you'd port those into more manageable languages for larger scale projects, or actual software products. These days, Python does all that. Unless you need some extreme performance for your final product, a well-optimized Python p…

On a continuing project with a company where everyone speaks Matlab as a second language, I succeeded in switching the guy writing Matlab code for the Matlab REST API to Python/numpy/scipy for the industrial analytics we need, saving us $25k a year in licence fees and VM costs.

Re: Python overtakes Java to become the second-most popular programming language

#346
post #311

Earlier quoted context omitted.

That looks … like many Python projects? It's slightly prettier than the default Sphinx theme but I'm not seeing anything which wasn't common a decade or two back.

IMO part of the quality here is these docs are generated from comments in the code. All you have to do is document your functions and modules properly, run a command, and you have an entire set of docs. It reminds me a lot of JavaDocs, although I never used them extensively. I'm also not very aware of how documentation looks in the Python world. Another interesting thing is the code examples. You write them in the co…

That’s how it works in Python, too. You add text descriptions (docstrings), automatic documentation generated from function/class definitions (comments can add prose), and you can run doctests to test things like examples.

See e.g. https://www.sphinx-doc.org/en/master/index.html and https://docs.python.org/3/library/doctest.html

Re: Python overtakes Java to become the second-most popular programming language

#347
post #163

Earlier quoted context omitted.

This is an interesting architecture, can you provide some more details on how exactly that works? E.g. do you use a c++ library that interprets scheme?

yeah, I use S7 Scheme. It's a complete scheme interpreter in one C file, super easy to embed, quite similar to Clojure linguistically. Basically all "business" logic is in Scheme, all OS/UI interaction is in C or C++. For me, it's amazing, because I write music apps and I can reuse my model code across desktop, phone, in Max/MSP or PureData, in web assembly, everywhere. Being able to prototype in Max is awesome. My m…

This sounds awesome, glad to hear it's working well for you. One question that comes to mind for the business stuff is security. Basically, are you accepting Scheme code from untrusted users, or is it just a bundled part of the app?

The reason I'm asking is that that run-time flexibility can completely bite you in the ass if someone can submit code that does unacceptable, unanticipated things. For example, I had an engagement with a company to review their main application, that they host. The issue was that while the app was in Java, it accepted user templates in (IIRC) BeanShell. One quick System.exit() in a template as a proof of concept, and Tomcat came thundering down.

The concept still works of course if you restrict the language accepted to some minimal DSL.

Re: Python overtakes Java to become the second-most popular programming language

#348
post #346

Earlier quoted context omitted.

IMO part of the quality here is these docs are generated from comments in the code. All you have to do is document your functions and modules properly, run a command, and you have an entire set of docs. It reminds me a lot of JavaDocs, although I never used them extensively. I'm also not very aware of how documentation looks in the Python world. Another interesting thing is the code examples. You write them in the co…

That’s how it works in Python, too. You add text descriptions (docstrings), automatic documentation generated from function/class definitions (comments can add prose), and you can run doctests to test things like examples. See e.g. https://www.sphinx-doc.org/en/master/index.html and https://docs.python.org/3/library/doctest.html

Very nice, I'm glad to see it elsewhere. Maybe Elixir even took inspiration (or it's just a plain good idea). I'm really surprised that I had never heard of or encountered it, maybe it's just an accepted part of the ecosystem so no one talks about it and/or I assumed everything was written manually. Also haven't used Python professionally which doesn't help.

Re: Python overtakes Java to become the second-most popular programming language

#349
post #142

Earlier quoted context omitted.

This precise struggle is why Go is created, and also why Rob Pike said what he said. The industry needs a statically typed language with good ergonomics (not typing too much) and performant. I agree with you, asking everyone to be discipline with their code in a dynamic language is a bit too much to ask (unfortunately).

Yeah. When you have two experts in a garage, it rocks. When you absolutely need to hire some new folks in little old Victoria in the next two months so you turn to bootcamps and interns, not so much.... ;-)

Victoria, BC? /me waves from Quadra (Island, not Street).

Not job hunting, but always happy to chat with people doing cool stuff sort-of locally.

Re: Python overtakes Java to become the second-most popular programming language

#350

Earlier quoted context omitted.

I'm mostly a C++ and Python programmer by a large margin, but I only ever visit Stackoverflow for Javascript questions or Linux distribution bugs/misfeatures. This only represents the sad state of Javascript documentation, I think.

You been to MDN? their JavaScript Documentation is impeccable? What are you referring to? There are tons of JS resources available? Or are you referring to 3p libraries which vary in terms of their documentation and can be contributed by anyone?

> You been to MDN?

Of course.

> ...their JavaScript Documentation is impeccable?

Well, no. MDN doesn't answer the questions everyone has: "Which browser does this work on?" "Is it okay to use this new feature?" "Why does this buggy thing do this to me?" "Is it really true that you can't do in CSS"?

Etc. Web standards really aren't. (And I'm not even touching the third-party library churn problem here.)

Post reply on HN