Live data from Hacker News

I'm switching to Python and actually liking it

cesarsotovalero.net

351–360 of 718 posts

Re: I'm switching to Python and actually liking it

#351

Earlier quoted context omitted.

I have a related feeling or prejudice that people not in the Java World view their corner as "the tech industry" without realizing that they are living in a village compared to the giant metropolis that is the Java World. Java programmers may not blog as much, and Java doesn't show up on Hacker News as much, but not being Extremely Online does not mean that it isn't extremely widely used by real people whose experien…

you could say the same thing about a dozen other languages, but there is definitely a stereotypical cranky java dev that is frustrated writing corporate crud apps that should in theory be blazingly fast, but never quite are for reasons. They revel in the verbosity, and look down on anyone they feel is taking the easy path. If you've never met one you're lucky, but they've been at every company I ever worked for.

> you could say the same thing about a dozen other languages

No, you could not. You could say it about maybe four others: PHP, C, C++, and C#.

No other languages have anywhere near the userbase size while being fairly quiet when it comes to online tech discussion.

I agree there are crusty old Java devs (as well as crusty old C, C++, PHP, etc. devs). In a decade or two, there will be crusty old TypeScript devs. It's just the nature of technology lifecycles and career paths. Some people get relatively tired of learning when they get older and just want to capitalize on what they already know for their remaining earning years.

Re: I'm switching to Python and actually liking it

#352

Earlier quoted context omitted.

I have a related feeling or prejudice that people not in the Java World view their corner as "the tech industry" without realizing that they are living in a village compared to the giant metropolis that is the Java World. Java programmers may not blog as much, and Java doesn't show up on Hacker News as much, but not being Extremely Online does not mean that it isn't extremely widely used by real people whose experien…

If the TIOBE index is an even remotely useful indicator, Python's an even bigger giant metropolis.

Yes, but the difference here is that Python is talked about all the time, so the online tech world knows that Python is huge.

The comment I was replying to seems to believe Java is a tiny backwater, which is anything but true.

Re: I'm switching to Python and actually liking it

#353

Earlier quoted context omitted.

Apparently the author used to be a Java person. I have this feeling - or prejudice - that people still in the Java World are a bit out of tune with the tech industry, working on huge legacy projects on big retail or US banking. These people tend to be conservative and resistant to change, so maybe that's where these types of articles are coming from.

I gave a talk recently at a conference about how modern Java doesn’t suck very much, and that the worst part of Java is Java developers, who seem to be completely intellectually unambitious. I don’t think Java makes anyone unambitious, I think it’s that Java is taught in schools and unambitious people don’t feel the need to learn anything else, and they get jobs at unambitious corporations. It selection-biases toward…

>how modern Java doesn’t suck very much,

Given fact that Lombok is still pretty much widely used, with its under the hood functionality of essentially hacking the AST, or the fact that annotation processors write out Java code to files, or the fact that you could be using a standard library like Log4j and have a massive vulnerability on your system because someone decided that it would be a good idea if log statements could execute code and nobody said anything otherwise, or the fact that Kotlin and Groovy were literally made to address inefficiencies in Java, amongst other things....

Yeah not really sure how you came to that conclusion.

Re: I'm switching to Python and actually liking it

#354

I love writing Python. However, there are caveats: 1: I don't like dealing with language crossing boundaries with it - it's painful, especially if to/from a compiled language - there's just too much friction. It's easy to write but hard to maintain . 2: Debugging python can be...painful. If you have a pure perfect environment dedicated to pure python and all the tooling set up, it can be breezy. But if you have somet…

Python debugging is great when you're strictly debugging Python code. Placing a `breakpoint` or spinning up an IPython instance to investigate the issue via `import IPython; IPython.embed()` makes life breezy. For neovim, you can send code to the ipython REPL easily via vim-slime.

I've never found myself debugging the underlying C++ code unless developing a C++ extension. But is it really that hard? Just point lldb to the python process and run your script in lldb.

If the C++ is not yours & assuming it's a mature lib (e.g. PyTorch): it's probably an error caused by you in Python land.

Re: I'm switching to Python and actually liking it

#355
post #45

From what I was told, Python was originally seen as a Swiss Army knife for sysadmins. It started gaining more traction when Canonical adopted it as the main language for Ubuntu 4.10 in 2004. Then, in 2005, Guido van Rossum was hired by Google to work on Google Cloud. That opened the door for wider adoption in academia, since Python had strong math libraries and integrated well with tools researchers were already usin…

>From what I was told, Python was originally seen as a Swiss Army knife for sysadmins.

Yea, I was a sysadmin around 2000 (before that too) and I knew it as such.

>between 2005 and 2006, two important things happened:

Somewhat - I used it in 2001 for Plone which is based on Zope, which was somewhat popular around that time. Writing all the web stuff with Python made sense, since Plone provided a CMS and could include a wiki. Adding on some sql calls to it in python just made sense. The competition was between PHP and Python, though there were some other less popular choices. Ruby on Rails definitely was getting a lot more popular around those times. PHP didn't start getting popular around 2005, if anything, people started using Python more, and started criticizing the crappy code that was circulating in the PHP community.

In any case, it was a fun time, but what's the point of looking back like that?

Re: I'm switching to Python and actually liking it

#356
post #73
post #45

From what I was told, Python was originally seen as a Swiss Army knife for sysadmins. It started gaining more traction when Canonical adopted it as the main language for Ubuntu 4.10 in 2004. Then, in 2005, Guido van Rossum was hired by Google to work on Google Cloud. That opened the door for wider adoption in academia, since Python had strong math libraries and integrated well with tools researchers were already usin…

Python's success is entirely due to entry-level programming courses. They all switched to Python, because you have to explain less. I don't think I heard about web servers in Python before 2012. I suppose a 2005 computer wouldn't be able to serve a Python backend smoothly. PHP's popularity isn't really from 2005-2006. It was popular at the end of the 90s, and it looks like JS as much as it looks like a potato.

> I don't think I heard about web servers in Python before 2012

Excuse me but... what ? Django is 20 years old.

Re: I'm switching to Python and actually liking it

#357
post #38
post #2

> the Python interpreter is natively integrated in all Unix distros It's included in the default install of most desktop/server Linux distros (with plenty of exceptions), but I don't believe any of the BSDs ship it in their base system. IIRC macOS used to have python 2 in its default install, but I vaguely recall that being deprecated and removed at some point. My only Mac is on the other side of the country at the m…

Python 2 was removed in Monterey 12.3, which was incredibly stupid and disruptive as it caught everyone by surprise. We all knew Apple said they would remove it, but everyone was expecting them to be sensible and do it on a new major OS release, like they did with PHP, not mid-cycle. https://developer.apple.com/documentation/macos-release-note... I wonder if that kerfuffle is why they ended up not removing Ruby and P…

I think that by now we shouldn’t take a .0 major release as a sign of what is really going to be present in macOS and what’s not. The OS stabilizes around .4 or so, and in the meantime some deprecated things may get removed, too.

They also have a habit of sometimes add or change some APIs mid-cycle, so you may see requirements for the latest Xcode being a mid-cycle version of the OS. Or how was it with Mac App Store, that not only itself, but the relevant APIs for programs distributed in it appeared in 10.6.4?

Re: I'm switching to Python and actually liking it

#358
Maybe I'm the only one that finds Python simultaneously verbose and lacking? Either you need 500 dependencies to do something in a simple way, or you need dozens (if not hundreds) of lines to do trivial things. I avoid writing Python because there's so much bullshit to add. Much prefer Perl, I can actually get things done quickly. Python feels like programming for the sake of programming.

Re: I'm switching to Python and actually liking it

#359
post #307

Earlier quoted context omitted.

Set them up, each in its own container, and use GRPC to communicate between them... (Not even kidding, I've seen people do this)

Goodness gracious!

Well, if you're using GRPC anyway, and have the protocol buffers already... It's hard to resist the temptation after a few hours of installing broken package versions.

Incidentally, I suspect this is the spiritual origin of microservoces...

Re: I'm switching to Python and actually liking it

#360
post #238

Earlier quoted context omitted.

I have had a somewhat unearned distaste for Python for the last decade or so. I mostly just don’t like some of the design decisions it made. I don’t like that lambdas can’t span multiple lines, I don’t like how slow loops are, I don’t like some functions seem to mutate lists and others don’t, and I am sure that there are other things I missed. But it really comes down to the fact that my career hasn’t used it much. I…

The most insane python feature is that for loops keep their intermediate variable. for x in [1,2,3]: print(x) x sticks around! So you'll always have these random variables floating around, and hope you don't use the wrong one. And to add insult to insult to injury, if you're using mypy for type checking you'll get a nice error if you try to reuse x with a different type: for x in ['a', 'b', 'c']: print(x) And the typ…

Comments like this basically should say "I want as much handholding as possible"

Lucky for you, LLMs are pretty good at that these days.

>And the types I can never trust. I've used all the tooling and you still get type errors in runtime. It's also ridiculously slow.

IDE integrated mypy checking does this in the background as you type. As for errors, it all has to do with how much typing you actually use. You can set the IDE to throw warning based around any types or lack of type annotation.

Again, handholding.

Post reply on HN