Live data from Hacker News

Python has brought computer programming to a vast new audience

economist.com

201–210 of 268 posts

Re: Python has brought computer programming to a vast new audience

#201

Earlier quoted context omitted.

> Sometimes you do want to do math on bools.. Can you provide a concrete example for when this would be useful? I assume you're not talking about binary arithmetic.

sum(x > 3 for x in iterable) True == 1, False == 0, so this counts how many items in iterable are greater than 3. But I think that's the only non-dirty way I've used it, and if that wasn't possible a trivial count() function could do the job. If I remember correctly, bool subclasses int mostly for compatibility with pre-existing conventions. People were already defining their own "True = 1" and "False = 0" constants…

If it wasn't possible you could still do:

    sum(x > 3 for int(x) in iterable)
And avoid a class of errors in other places.

Re: Python has brought computer programming to a vast new audience

#202

Earlier quoted context omitted.

The distinction between what an object is and what an object can do is an artifact of bad object modelling (specifically, single inheritance OOP.) Any “can do” set has an exactly corresponding “is a thing that can do” set, so there is no logical need for different constructs to model “is” sets and “can do” sets.

Sounds like a controversial statement and I'm not sure how universal true this is. I'll give it a thought. Thank you.

Another way of explaining this is that Interfaces are Java's way to compensate for the lack of multiple inheritance.

There's more than one variety of inheritance. Both Python and Java chose implementation-inheritance, meaning that the children get to use not only the interface, but also the implementation of the parent.

For some reason, I'm not quite sure why, the Java folks thought that multiple implementation-inheritance would cause too many problems. They still recognized it's useful, so they provided a 2nd form of inheritance that supports multiple parents, interface-inheritance.

There are more varieties of inheritance that a language could choose, for example, prototypes like JavaScript.

Re: Python has brought computer programming to a vast new audience

#203
post #22

There seems to be a sentiment that Python is a kids language - but I think of Python as a language that scales with your experience. You can do some really interesting and complex things and I’m really appreciative of my deep understanding of the language through a decade of heavy use, open source contribution, and project ownership. Recently I released a package which allows you to dynamically create or change funct…

>>There seems to be a sentiment that Python is a kids language

Python is like the new Basic.

Very easy to work with, so a lot of people would be using it. Like volumes of people.

Re: Python has brought computer programming to a vast new audience

#204
post #96

Read the comments here. Look at the diversity of opinions and the number of them that, while professing love for Python, directly contradict each other. Python is verbose|concise, simple|advanced, disciplined|experimental, modern|classical. It goes to show: something doesn't need to be actually-better. It doesn't need to be actually-simpler. It doesn't need to make your job easier or better. It needs to make people t…

I believe SQL is "the most deployed programming environment family in human history". SQLite is seemingly everywhere. Your second paragraph does not follow from the first. It could instead be that HN commenters are poor at this sort of analysis, or that people in general are poor at this sort of analysis. What were the contemporaries with similar design constraints? I started looking at Python in 1995, and the major…

>>I believe SQL is "the most deployed programming environment family in human history".

Actually that is Microsoft Excel.

Both SQL and Python will never come close to the ubiquity Microsoft Excel has.

Re: Python has brought computer programming to a vast new audience

#205
post #164
post #73

This seems misspoken. Python hasn't necessarily brought computer programming to a new audience. A new audience is being brought to computer programming. They just happen to be given python as their first steps. There is nothing intrinsic to python that is helping these use cases. Some people like it. Some people don't. I have not seen studies showing any real advantage or disadvantage to it. Do those exist, and I've…

Perhaps. Or perhaps programming instructors like Python better. When I taught statistics, R was more popular and featureful for the task than Python, yet I chose to teach my students Python.

If the competition is R, I can see how python is a pretty language. I think R still has prettier charts, with ggplot. However, there can be little argument that it is a peculiar language.

That said, I don't see much that python really has going for it in the pretty scenario, either. Most of the examples that make it worth looking at get ugly as quickly as most any other programming language. And the error messages are no more helpful than any of a myriad other languages.

None of which is to say I think it is bad. Just I suspect it is getting credit for some intrinsic quality that doesn't really exist. It is getting used because it is the language people know is getting used.

Re: Python has brought computer programming to a vast new audience

#206
post #202

Earlier quoted context omitted.

Sounds like a controversial statement and I'm not sure how universal true this is. I'll give it a thought. Thank you.

Another way of explaining this is that Interfaces are Java's way to compensate for the lack of multiple inheritance. There's more than one variety of inheritance. Both Python and Java chose implementation-inheritance, meaning that the children get to use not only the interface, but also the implementation of the parent. For some reason, I'm not quite sure why, the Java folks thought that multiple implementation-inher…

Yes, I'm familiar with all of that, but isn't the Diamond of Death [1] is the exact reason why they did it?

[1] https://en.wikipedia.org/wiki/Multiple_inheritance#The_diamo...

Re: Python has brought computer programming to a vast new audience

#207
post #205
post #164

Earlier quoted context omitted.

Perhaps. Or perhaps programming instructors like Python better. When I taught statistics, R was more popular and featureful for the task than Python, yet I chose to teach my students Python.

If the competition is R, I can see how python is a pretty language. I think R still has prettier charts, with ggplot. However, there can be little argument that it is a peculiar language. That said, I don't see much that python really has going for it in the pretty scenario, either. Most of the examples that make it worth looking at get ugly as quickly as most any other programming language. And the error messages ar…

Not as any other language, but as any recently designed language. They (almost) all have good REPLs and a decent variety of data structures.

It's easy to compare Python against C or Java and say how great it is, but against Rust or Dart, maybe not so great. However, popularity has its own benefits.

Still, compare against Go. There's a major difference in philosophy of deployment. Python's modularity causes dev ops problems, but it also means that any user can monkey patch whatever they need. With Go you need access to the original source, which isn't necessarily provided.

Re: Python has brought computer programming to a vast new audience

#208
post #110

Am I the only who thinks that "90% of American parents want their kids to be computer scientists" is rather unsettling? The market is currently full of people who are in for the money and will continue to be. It will be filled with people until supply meets demand. That the salaries will drop significantly is a natural result of this. We had this pork cycle for teachers, doctors and other highly trained people. No on…

I believe widespread employment as programmers is the only possible way for the US economy to have a large middle class in the coming decades. Unionized manufacturing ain't coming back.

Sorry to disappoint you, but there won't be a large middle class in industrial nations. It will be gig-based and there will be a big group of people working hard who get nothing and a small group of people who are extremely wealthy and disconnected.

You don't like Fiverr? Imagine that our whole job market runs like this in the future. The profit margin will be extremely small.

You need a website or a logo? Create a Fiverr task. You think you're a better developer or designer than those Fiverr guys? Then wait a few years and you will see that the performance and quality will improve drastically because workers get desperate when the pork cycle hits them.

- - -

I'm not dreaming this up - this is already happening! And even employees are used like replaceable commodities e.g. big agencies have so many applicants that they say to their employees: "if you don't work hard for that shitty pay, you will be replaced immediately" - the agencies are clear about that and demonstrate their power. It's soul-crushing and I've seen great designers who get exploited in those power dynamics.

Re: Python has brought computer programming to a vast new audience

#209
post #128

Earlier quoted context omitted.

Maybe it makes sense to encourage your kids to go into blue collar jobs. In a future teeming with code monkeys, plumbers and electricians are going to be highly valuable. As for the current career programmers, maybe we should unionize before our jobs are being taken by kids coming out of 2 week bootcamps (who have been taking programming classes since kindergarten).

In a future teeming with code monkeys, plumbers and electricians are going to be highly valuable. As a person who repaired quite a few toilets in their life As for the current career programmers, maybe we should unionize before our jobs are being taken by kids coming out of 2 week bootcamps (who have been taking programming classes since kindergarten). I've seen such people(well, they started learning in primary scho…

> Apparently Our unique skill in the job market is an immunity to boredom.

This is about right IMO. Most of the work is seriously boring. I was in meetings talking with software developers about API interfaces of legacy systems (with monologues about the intriguing question: "Why is the a thing we have to stick with?" - answer is always backwards support, btw) and I couldn't understand why are they sitting here and why do they think their life is well spent doing that? Anything is better - and they earn €3500-4500/month, so it isn't even that much for their 5-10 y/o careers.

Everything is better than this. I love programming, I've started when I was 10-11y/o, but I hate most things in the software industry. I love to program my own little tools, but I've become so fast building CRUD applications and apps that I have 200-300% efficiency (and thus a very high hourly rate) but I'm simultaneously so seriously bored that I have a hard time focussing on work because it's always the same.

- - -

> I've seen such people

Me too: I've seen a kid (maybe 15-16) that has no A-level and dropped out of the 9th grade to work in a startup. Without any shares. I think he makes €10/hour maximum. I was 2 years older than him at that time and worked as a freelancer and had much more experience. Even 2 years earlier I had more skill than him. And I would never have considered to drop out of school back then because it's hilariously naïve. I can't understand how the startup could support it without any moral conflicts. Exploiting 15y/o and encouraging them to drop out is something I don't want to be involved in. But I guess this will happen a lot more in the next few years which is sad.

> Maybe it makes sense to encourage your kids to go into blue collar jobs.

Yeah, don't expect anything like a developer salary. Not even half of it.

My grandfather and my uncle have a blue collar company. They're operating with a 10% profit margin - sounds good, right? Wrong - if one of their employees is sick, they get into money problems really quick. Normally every employee needs to earn the company 2-3x of his salary to compensate for random events. They can't do that because the market doesn't allow them to - other people would do it for less than them and the quality is the same. Supply and demand will eventually lead to diminishing returns in all sectors. And if plumbing is too damn expensive, we have better incentives to automate the whole job.

Re: Python has brought computer programming to a vast new audience

#210
post #202

Earlier quoted context omitted.

Another way of explaining this is that Interfaces are Java's way to compensate for the lack of multiple inheritance. There's more than one variety of inheritance. Both Python and Java chose implementation-inheritance, meaning that the children get to use not only the interface, but also the implementation of the parent. For some reason, I'm not quite sure why, the Java folks thought that multiple implementation-inher…

Yes, I'm familiar with all of that, but isn't the Diamond of Death [1] is the exact reason why they did it? [1] https://en.wikipedia.org/wiki/Multiple_inheritance#The_diamo...

People read left to right. That solves all the trivial problems. The harder problems were always vocabulary problems not programming problems.

The trouble is that English, and other human languages, have never been as clear or specific as we assume they are when we start writing code. For example, what is a bird? It's a thing that flies? Oh, ostrich, penguin...

All these supposed OOP inheritance problems aren't unique to inheritance but to the translation of human language to programming. There's no need to exclude multiple inheritance, because nearly every aspect of programming is afflicted.

Post reply on HN