Python at Netflix
medium.com
medium.com
Interesting... very curious to see Netflix using tools in the VFX industry, Shotgun & Nuke to name a few, I wish they can expand more on this.
Some of it is licensed/farmed out to places like DreamWorks however (new Voltron/She-ra), which is mostly a Java/Spring shop, to my knowledge.
there will be a certain amount of sharing needed between vendors, and so Netflix will need to have some vfx expertise in-house to coordinate that (similar to how a film will have a vfx supervisor that works for the film production company, who liases with supervisors at each vendor company)
but it would be very sensible for them to have an in-house asset library (which may included work written in python, not just images or textures) so that if they want to switch vfx vendor between seasons of a show it's easy to do so
in general, python rules in the vfx world. there's some c++ too. Sadly, because it's been this way for so long, many houses are still stuck in a python 2 world with huge legacy codebases
I've been looking for a job for the first time in 10 years of Python, and Netflix is one of the rare big companies that I still have respect for.
https://jobs.netflix.com/ has several offers I would be a good fit for, but I'm not ready to relocate to the US.
Netflix is generally opposed to remote work, but some teams may make case by case exceptions (especially in Open Connect, the organization which manages the CDN). I'd encourage you to speak to a recruiter.
Besides, I know many people that are not as productive at home.
It works if everyone is on site. It also works if everyone is remote.
But when some are at the office and some aren't, communication and information sharing becomes a lot harder. Mostly it's a process and tool issue, but still humans will rather just turn around and ask the team than spend a minute writing their issue on Slack/whatever.
Even in remote-heavy orgs, communication issues remain if the culture or process is shit. If you have 10 different Jira sites, 4 forms of communication, and documents in 15 different systems, it's going to suck no matter where people work.
Although this now translates to a cost on me needing an extra room in the house for an office.
Not everyone has space in their apartment for a "normal desk".
Bring a laptop to a different corner of the house or a library/coffee shop if you can't adapt to using your personal space for work.
Not every coffee shop likes having people lounging around for 8 or more hours a day, making minimal purchase. Aside from the fact that most are too noisy to concentrate, have shit wifi, bathrooms that are frequently occupied / barely work, etc.
I find that there are significant benefits to working in the same physical location.
It's just way easier to go to someone's desk and ask them something than to have to set up a video chat. Human interaction is just naturally an in person thing. So much is lost if you can only video chat. Sure it may not affect the work directly but I think it really affects a team's dynamic. Lots of great ideas happen just from random office interactions, whether it be lunch or just talking over coffee. These kinds of things are really hard to reproduce in a remote environment.
That's not to say there aren't reasons working remotely is beneficial. I just don't think it's fair to just say the only reason companies opt for physical proximity is cultural.
That's not a benefit, that's a downside. Interrupting someone while they're working kills productivity. You're far better asking in chat and having someone you're not interrupting help.
What you describe sounds like it's putting one person's progress over another. Sure a mentor may be disrupted but by unblocking someone else they're still increasing the overall productivity of the team and thus is a net gain.
> You're far better asking in chat and having someone you're not interrupting help.
This only works when your question is general enough that many people can help you
Also, some dev positions require extensive communication and that is easier in person.
Netflix is in biking distance, but instead I work for a company on the east coast, 4000km away, waking at the crack of dawn.
There is always something. It's not possible to solve every problem, I prefer to choose my battles. Getting polite rejection letters is not important to me.
My intent wasn't to offend, rather set expectations for would-be applicants. Of course, things could be entirely different in Paris vs. Hollywood, so grain of salt and all that.
Trying any other way is a lottery - and if you didn’t go to MIT/Stanford/CalTech/Harvard then your odds are pretty bad.
The other way is already working at a famous company and having another famous company send you a recruitment email via linked in, but that typically requires you to have done the referral way first.
Just as a single data point, the last clause here isn't true in my experience. I worked at Google for a few years some years ago, and I get a regular flow of recruiter spam from all the big companies for Bay Area roles, and have never had any friction turning them into interviews.
I wasn’t clear, but I meant in order to already be working at a famous company you probably already had to figure out the referral piece at least once.
I was also not hired by referral, but got lucky they liked my resume in some resume book at RPI.
For the places I applied online my interview response rate from companies was poor (or an instant rejection).
It's one of the main benefits of living in the bay area, you build out a network of friends working at different companies which adds a layer of job security and ability to interview more easily at interesting places.
They don't really care where you went or even if you have a degree, but there are so many people applying through the front door that that ends up being a filter everyone uses. There are obviously excellent people outside of that, but it's harder to find them through the noise.
This is another reason I think Lamda School is great - they're actually attacking this problem too: http://zalberico.com/essay/2019/04/08/lambda-school.html
Many of the FAANGs have pushed for diversity in hiring. I don't have a problem with that. I think an ideal workplace would hire people regardless of their circumstances of birth and lived experience as long as they are qualified to do the job and they, in fact, do a good job there. That's actually the crux of my problem.
When companies have pushed to remove names, genders, and races from resumes before the hiring process because they find that people are treated differently in hiring due to unconscious bias in that process then it smacks of hypocrisy to then blanket filter incoming resumes unless you went to a short list of approved schools or have a buddy on the inside juicing your chances. That sounds like the complete opposite of trying to be diverse in recruitment. I don't think that Lambda School is that great of a response to this - it just adds one more "acceptable" school to the list.
In fact, to a cynic, it sounds like virtue signalling of the highest order to please both Wall Street and the public.
Currently highly selective schools and other famous companies are the easiest filter. Then they don’t want to have unconscious bias from that point on - I don’t think it’s virtue signaling, it’s more just pragmatism.
The reason I think Lambda School is cool is that they're actually focused on the first piece of this, scaling up to give opportunity to capable people the current system ignores and eventually leveraging their reputation to get people interviews. Right now it’s extremely unlikely to get accepted into MIT or Stanford, but Lambda School is incentivized to not do this - if you’re capable of the work they want to be able to scale to admit you.
Even if you wanted to, it's nearly impossible to immigrate to the US as a skilled worker legally.
I have a friend who is an really talented programmer (and a really diligent worker) who studied Computer Science at some of the best universities in Europe: École Centrale Paris and the EPFL (École Polytechnique Fédérale de Lausanne) in Switzerland. One of his biggest desires for a while was to move to the US, and live and work in New York. He spent more than 2 years trying to the US, and then gave up. He had even hesitated buying too much furniture while in France, because he was anticipating being able to move to the US.
The only viable option to move to the US for most people in your (and his) situation would be the H-1B visa, which is extraordinarily difficult to get, and requires a miracle to obtain. You need to: (1) have a bachelor's degree that's related to the field you want to work in -- e.g. Computer Science degree for software development work, (2) find a company that's willing to offer you a job that pay at least what Americans make doing the same job, (3) the company must be willing to wait 7-8 months, (4) you need to win a lottery in which your odds of success are about 1 in 3.
(1) and (2) are not too difficult. (3) is quite difficult -- the majority companies do not want to wait for 7-8 months for you to join. And (4) is completely up to chance, and out of your control. (By the way, this lottery is conducted at the beginning of April every year, and you can only start working in October.
My friend fulfilled criteria (1), (2), and the difficult (3). But he did not get selected in the H-1B lottery two years in a row.
The US is essentially a closed country when it comes to skilled immigration. Most of the immigrants who get green cards here are family members, refugees/asylees, and diversity lottery winners. Getting even temporary permission to work in the U.S. as a educated/skilled person requires a miracle from God.
I'm an optimist :)
The only visas that don't prohibit immigrant intent (i.e. desire to immigrate + company applying for permanent residence for you) are the H-1B visa, L-1 visa, and O-1 visa. For anyone looking to permanently move the U.S. on the basis of skills, those are the only options. (I didn't mention the L-1 and O-1 in my comment above because they're even more narrowly granted.)
> only of of them is technically better
Technical skill doesn't really matter with the H-1B visa; only salary really does. Even going to a top university doesn't mean anything. The lottery doesn't discriminate.
There are foreign students who graduate from the best universities in the U.S. like Harvard, Yale, MIT, etc, often with advanced degrees (Master's / PhD), with good high-paying jobs, who get deported from the US because they did not win the H-1B lottery.
The Harvard Crimson complained about this even back in 2007: https://www.thecrimson.com/article/2007/4/9/raise-the-h-1b-c...
For example, right now, if you wanted to work in the U.S. the earliest date you could start working would be October 1, 2020. (That's because this year's lottery is already over, you'll have to try your shot with the April 2020 lottery, and you can only start working 6 months after that at the earliest.)
There might be racial prejudices in terms of getting a job, where being a European helps, but even that's extremely unlikely in Silicon Valley. Most U.S. tech companies are concentrated in progressive (Democratic party voting) regions -- and most people in these regions are emphatically not racists, and many often go the extra mile and make a conscious effort to deal with any subconscious racism in their minds. So don't expect being European or white to help that much.
The government certainly doesn't care what country you're from, and what your skin color is, when it comes to approving H-1Bs -- at least there hasn't been any evidence to the contrary. The vast majority of H-1B visas go to people from India and China, of which the majority go to people from India.
----
Also regarding L-1 visas: Getting a job at a FAANG or a large multi-national company with offices in the U.S. and Europe/elsewhere, and that's willing to relocate you is not easy. If you're a valuable contributing member of your team, I doubt your manager would be jumping with job at the idea of you being transferred to the US.
Getting an L-1 visa requires not just a degree and 1 year of work experience with the company, it also requires "specialized knowledge". Lookup the definition. There have been denials on the basis of this "specialized knowledge" requirement.
Furthermore, it's unpleasant to be in the U.S. on the L-1 because you have no way to change jobs (unlike the H-1B) and lose legal status as soon as you're fired. I had a family member who after many years in the US on the L-1A (managerial) visa, had to suddenly pack up and leave the US. The company held off on applying for an EB-1 green card until the L-1A was nearing its 7-year limit, and then for unrelated financial reasons this company shut down overnight. Everyone was laid off, including US staff.
So you need a company that's nice enough to apply for your H-1B every year (knowing that it'll give you the freedom to change jobs as you wish), and one that's willing to relocate (at a loss to the team in your original country).
https://www.immi-usa.com/h1b-masters-quota/
If you don't what they do is they ask you to work for them elsewhere for 1 year ( London / Switzerland ) then move you back to the US with an L1 visa.
The Master's degree needs to be from an US university - which is pure genius, as this way a prospective immigrant needs to pay a lot of money (US degrees are not cheap) for the right to have a better chance of getting in - even if they already have a Msc, or could get one for free in their country of origin. America's basically found a way to profit on people wanting to move there. Of course, it's not new, with indentured servitude being common in previous centuries, but it's cool (in a creepy way) to see it still being alive.
It's "most likely", if your definition of "most likely" is 51%.
Let's calculate the probability:
• In 2018, there were 95,885 applicants with a Masters degree or higher[1]. Out of 190,098 total applicants.
• There are 20,000 spots available for U.S. Master's degree holders, and 65,000 spots for everyone. (Ignoring the fact that there's a reservation of 1,400 for Chile and 5,400 for Singapore.)
• Your probability of rejection in the masters lottery is 1-(20000/95885) = 0.7914
• Your probability of rejection in the general lottery is 1-(65000/(190098-20000)) = 0.6179
• These are independent events; the probability of being rejected in both is: 0.6179 x 0.7914 = 0.489
• If you flip that, your probability of being selected in the lottery with a U.S. Master's degree is 0.51, ie. 51%.
[1] https://redbus2us.com/h1b-historical-data-lottery-vs-85k-quo...
I've addressed this in this sibling comment: https://news.ycombinator.com/item?id=19789172
> 1. Get F1-visa
People that study here also have to go through the H-1B lottery, like everyone else. Graduates with MS/PhD have a slightly higher probability of winning the H-1B lottery, but it's like 0.5 for US MS/PhD versus 0.3 for everyone else. You are still forced to go through a lottery. (One thing is you get to work in the US for a 1-3 years with an F-1 visa under a program called OPT.)
There are many graduates with Masters and PhD degrees from American universities (incl. highly-ranked ones), who have well-paying jobs (under F-1 OPT), who lose the H-1B lottery, and as a result, employers are forced to fire them, and they have to leave the country (under the threat of forcible deportation and being banned from the US). This is the reality of US immigration today, and it's been like this for a long time. For example, here's a Harvard Crimson article from back in 2007 arguing for increasing or eliminating the H-1B limit: https://www.thecrimson.com/article/2007/4/9/raise-the-h-1b-c...
> 2. Marry a US citizen
Marrying someone for the purpose is immigration is considered "immigration fraud", and if they find out, you will be deported and permanently banned from the US. If you became a U.S. citizen through such a marriage, your citizenship can and will be revoked, and you could even be rendered stateless as a result. If the currently conservative U.S. Supreme Court overturns Zadvydas v. Davis[1], you could spend the rest of your life in prison.
No, it's not; Marrying someone for the purpose of evading immigration laws is. There is a difference; even if immigration is sought as a benefit of marriage, if there is genuine intent to enter into and maintain a bona fide marital relationship and that is maintained throughout the conditional period associated with immigration by marriage, there is no fraud.
I personally am very against fake marriages (in my own life). I want my marriage to be genuine, and life-long. There was a post on HN back in 2015 about William Han's experience with the US immigration system: https://news.ycombinator.com/item?id=9764564 (article: https://www.vox.com/2015/6/23/8823349/immigration-system-bro... )
Some of the parts of his article, especially regarding marriage as an immigration pathway, are sad but enlightening (emphasis mine):
> Years spent as a student do not count. Neither do years on a work visa unless your employer is willing to sponsor your green card. Marrying an American works, as a thousand films and television shows have taught us, because it allows a change of status to permanent resident. But if you wish to follow the rules, as I do, then it must be a bona fide marriage. And if you take important personal decisions such as marriage seriously, then you may not wish to have their timing dictated by Homeland Security.
> I've already talked about my friends who think becoming a citizen is as easy as going to a government office and signing some papers. But even people whose job it is to understand the system often don't see how broken it is. At one firm where I worked, an HR manager told me to "just get married." Marriage solely for the sake of a green card is, of course, illegal — it is fraud upon the federal government. A bona fide marriage is fine, but that depends on you finding the right person and having your relationship progress according to Homeland Security's timeline. Once again there is the humiliating feeling that your life is not your own: the government may now effectively dictate when you get married.
(2) the salary must follow the prevailing wages in the area the employee is gonna work. That's not really an absurd thing specially considering that the market rates are usually higher than the prevailing wages.
(3) what I have seen about this point is that companies will usually find a way around that if they're really willing to hire you. Either work remotely as a contractor until the visa is stamped and you can move or something else. It's hard but not impossible.
(4) is really up to chance and I've had friends who were and were not selected.
I'd say it's hard but no miracles needed.
Nearly impossible? Come on, this is a gross exaggeration. Get a job at a FAANG or unicorn in Europe, work there for 1 - 2 years, transfer to the US on an L1 visa, then apply for H1B each year until you get it. I know several people who have done this. Hell, Microsoft opened an office in Vancouver specifically to move failed H1B's there until they can get an L1.
JS is heavily used, as is Groovy, Java, Python, C and C ++, etc.
Depends on the project and the team. We're not about limiting people, but the choice should be justifiable (like... Brainfuck is probably not ok)
We lean on the many of the statistical and mathematical libraries (numpy, scipy, ruptures, pandas) to help automate the analysis of 1000s of related signals when our alerting systems indicate problems. We’ve developed a time series correlation system...
First we detect if any of the possible candidate signals were born or died in the interesting time period. We use these time points to reduce the window we'll use to pass to the correlation functions. We can also detect any changepoints in the time series and apply similar logic. Once we've determined the best window bounds for each candidate signal, we use pearson and spearman correlation functions to get a score for the pair of signals -- the initial signal that started the inquiry and the candidate signal using the determined time window.
The code is about 98% data preparation, signal analysis, and window determination and about 2% correlation work.
(I've tried to summarize quite a bit, let me know if you'd like clarifications or have other questions.)
Because it's a distributed environment probably is exactly why. Python has (arguably) great concurrency support apart from Multi-threading.
https://www.youtube.com/watch?v=MCs5OvhV9S4
So if you need concurrency in the context of a single thread, then Python's GIL is a non-starter. But a distributed environment is not likely one of those.
Edit: I should amend concurrency in a single thread to: concurrency in a single thread that is compute gated...since coroutines can give you pseudo concurrency in a single thread provided you're workload has blocking steps like IO or TCP calls.
The same holds for various CPU intensive standard library functions implemented in C.
The GIL issue is real, but posts like this one confused me for years. Please, don’t exaggerate GIL issues.
That caveat is somewhat true for all programming abstractions, but well-designed interfaces make the more efficient techniques more obvious and beautiful, while the inefficient or risky techniques are made esoteric and ugly.
In general, the "just rewrite the slow parts in C!" motto is terrible advice because it's unlikely that it will actually make your code appreciably slower, and if it does, it's very likely to be defeated unexpectedly as soon as requirements change. Using FFI to make things faster can work, but only if you've really considered your problem and you're quite sure you can safely predict relevant changes to requirements.
There are plenty of pitfalls in leaky abstractions. Establishing that fast numeric calculations only work with specific numeric types seems to help.
One thing you seem to be encountering, that I've seen a few times, is that people don't realize NumPy and core Python are almost orthoganal. The best practices for each are nearly opposite. I try to make it clear when I'm switching from one to the other by explaining the performance optimization (broadly) in comments.
Regardless, any function that receives a ``list`` of ints will need to convert to an ndarray if it wants NumPy speed. If the function interface is modified later, I think it's fair to expect the editor to understand why.
Sure, but this is a _massive_ pitfall. It's an optimization that can trivially make your code slower than the naive Python implementation, all due to a leaky abstraction.
> Regardless, any function that receives a ``list`` of ints will need to convert to an ndarray if it wants NumPy speed. If the function interface is modified later, I think it's fair to expect the editor to understand why.
Yeah, that was a toy example. In practice, the scenario was similar except the function called to a third party library that used Numpy under the hood. We introduced a ton of complexity to use this third party library on the grounds that "it will make things fast" instead of the naive list implementation, and the very next sprint we needed to update it such that it became 10X slower than the naive Python implementation.
That's the starkest example, but there have been others and there would have been many more if we didn't have the stark example to point to.
The current slogan is "just use Python; you can always make things fast with Numpy/native code!", but it should be "use Python if you have a deep understanding of how Numpy (or whatever native library you're using) makes things fast such that you can count on that invariant to hold even as your requirements change" or some such.
It seems reasonable that different parts of the code are appropriate for modification by engineers of differing skills.
IIRC, I've only ever seen "unawaited coroutine found" (or similar) errors; I've never seen anything that points to a specific unawaited coroutine. In either case, a bug in prod is still many times worse than compile time type error.
> you can enable debug on the event loop and have it print out every time a coroutine takes longer than a configurable amount of time
I don't run my production servers in debug mode, and even when I do manage to find the problem, I have limited options for solving it. Usually it amounts to refactoring out the offending code into a separate process or service.
An extreme counterpoint is a language like Go which
1) Is roughly 100X faster in single-threaded, CPU-bound execution anyway
2) Allows for additional optimizations that simply aren't possible in Python (mostly involving reduced allocations and improved cache coherence)
3) Has a runtime that balances CPU load across all available cores
This isn't a "shit on Python" post; only that concurrency really isn't Python's strong suit (yet).
And yet we see the same incorrect information trotted out over and over again.
- it's easy to learn - we've go numpy
If I were to pick a language to build significant infrastructure with, I wouldn't choose python.
Personally, I've worked with some HPC apps in pharma. We found quite a mix of CPU and IO-bound challenges when we actually profiled and looked closely at what was slowing up the apps. Contrary to the original belief, rewriting and increasing improving the CPUs wouldn't have helped much.
In most cases (Python, Ruby, etc...) is it even possible to find your hot-loops and replace them with C/C++/Rust/etc... code. So you can really focus on those small areas where that would make an actual difference.
Additionally, in some places where you need concurrency you can split up the task into parts that have little to do with each other, and there Python is a great glue language to manage calling other executable that do the actual work.
Well, without knowing the exact issue people trying to solve, of course you won't understand the motivation behind.
Reading their post, it seems that they are not using Python for serving, mainly for long running daemon processes. Concurrency is probably not something people care about in such situation, nor squeeze CPU perf. In fact such workload probably wants to maintain a low-key finger print.
You're conflating several things that are orthogonal imo. A system can be distributed without concurrency. A concurrent system need not be distributed. Either kind of thing can be built with or without a specific kind of type system. And CPU efficiency has nothing to do specifically with any of the previous things.
To expand on that: distributed systems are quite often constructed from simple single-threaded processes, and where concurrency is needed it is probably more often achieved through multi-processing than multi-threading. A single-threaded event-dispatched request-response service probably describes a big chunk of all the stuff running in distributed environments today. In a lot of these cases the workloads are i/o bound, and instructions per cycle is not even close to the top of the list of concerns. There are a lot of reasons why python fits into that world very well.
The only justification for such design I can think of is HA. I.e. you have very light workload that does not saturate a single machine, but nonetheless you create a distributed system with two machines for HA. Such light workload is probably not often the case at Netflix.
I'm not trying to justify any particular design. I'm just saying that concurrency and distributed processing are different things. And I'm no expert, but I continue to be confused as to what saturation, whether of cpu or i/o - you don't specify - has to do with concurrency? If I have for example n http servers all running one thread and handling enough traffic that they are all at 100 percent CPU that is by some minimal definition a distributed system, but none of the processes in it are concurrent. If the http servers read and write a database then the database is almost certainly concurrent, so then you have a distributed system that has both concurrent and non-concurrent processes collaborating.
Concurrency is broader than just threads in a process. In your example, the whole problem is concurrent.
And at that point, you can just code your application as a single thread, and run one per core on the machine.
And the Python lack of types "issue" has always been a bit overblown in my opinion. If it's not immediately obvious what something is, then you need to either comment more, or come up with better variable names. And if you really, really feel the need for a type system, Python natively supports that now.
Poor intra-process parallelism, yes. Python is pretty capable when it comes to concurrency.
This is especially true inside big orgs that have lots of silos and need "Rosetta Stones" that translate between the silos.
I'm working on my first larger, industrial-strength REST API in Python and I've found the Django Rest Framework to be more suited once you get to that level of complexity.
django-rest-framework is nice because it's maintained well and it's consistent with the rest of Django, but plenty of people just prefer the Flask way of doing things, even if it's a scrappier set of tools in some ways.
FWIW, I don't like DRF's reliance on serializers that do more than serialization.
This may be biased (I've been a Flask user since 0.7), and perhaps I'm stuck in my ways, but I've found I either need to find a supported and blessed Django plugin for the thing I need, or build something much more complex than I'd need in Flask.
For a company as specialized as Netflix, they probably are doing so much customization it doesn't matter much which framework they started with.
what do you really do here - connect to the flask instance and route requests manually ?
I would love to setup an architecture like this that lets me connect to stuff through a CLI. Also, I'm assuming you are on kubernetes (or something). How does this bpython business work through all those layers ?
Not sure if you use different frameworks that dont have this issue.
Amazing how much of a pure-functional bubble I live in now. I should probably branch out more.
I remember being a bit baffled that they used Java and not Python as an introductory language. It's a very obvious choice for beginners.
Lol, I remember the first lesson.
class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, world");
}
}Now I have a job where I do Java about 30-40% of the time, and I've become horrified to learn that the school version of Java is the easy version. Having to create three different files to set up a database connection never ceases to depress me.
https://www.economist.com/graphic-detail/2018/07/26/python-i...
Another measure could be looking at commits on github, but that also has its own biases.
I've used Python a fair bit for a variety of semi-permanent or long scripts. I would have liked types more as well. Discovered MyPy after those instances.
https://docs.python.org/3/library/typing.html
The thing about python, as overall language philosophy, is convention over enforcement.
If you want your team to have a particular style and use certain features, then you should agree to do it and then use automated tools (like pep8, flake) to check that code complies with those rules, but it is up to you how you want to write the code.
"most popular" is hard to measure or even define.
Though it is outside my area of expertise, Node usage continues to increase as well. Different use-cases.
I'd argue the converse: one advantage of a micro-service architecture is that it lets you use the best language for any particular task (where best could be "what your team is most comfortable with" or "has the most extensive library support" or something else).
def enableAutoPlay( flag ): annoyingAutoPlay = flag return
Auto-play doesn't make sense anywhere, streaming apps, youtube, or TVs. Only crazy people expect video to auto-play in a video app.
Medium is trying to look like NY Times, minus any kind of effort to actually write the stories.
Really good tools can make a big difference.
You really do need world class though - the trade off of custom means your tools really do need to be a lot better than the standard.
See you at rehab!
"Better" is contextually dependent. There's no silver bullet to anything we do in tech.
Not necessarily. Python has a few huge advantages that aren't (directly) related to the quality or utility of the language. For example, hiring and training people to use Python is going to be easier and cheaper than hiring and training people to use C++. Additionally, as mentioned in the article, Python has a massive and healthy ecosystem of high quality packages.
And then there's the cost of porting an existing codebase to a new language...
https://www.salaryproject.com/salaries/company/netflix/senio...
You're being downvoted because:
A) You left a comment with a strong opinion without expressing it while dismissing other peoples' experience B) Python is in fact a type safe language for a while now https://docs.python.org/3/library/typing.html - you have pluggable "a la bracha" types.
Well it has a typing mechanism, which is better than nothing, but has the mechanism been shown to be safe? C has types too, but I'm not sure that it would be described as type safe.
The research I've seen is basically:
- Take a class room of independently selected subjects (read: CS undergrad students).
- Give them the same coding problem in multiple languages or in the same language with or without compile time type checking.
- Measure the number of defects said programs have and hopefully draw a conclusion about the safety of the language.
All the research I've read on the topic has been pretty poor (though maybe I'm just bad at finding it).
Indeed there is no such research for typed Python (although the pluggalbe types research in general is great) but there is also no such research (that I've found) for Idris, ReasonML, Swift, Haskell, Rust or any of the usual "suspects" for "good types".
Please enlighten me :]
Sure there is. Strong typing means a language doesn't permit implicit type coercions.
> Any Haskell programmer would laugh at someone who calls Python strongly typed.
I'm sure lots of programmers are not particularly educated on the topic; it doesn't mean the word is 'nonsense'.
I definitely agree that it's not seeing nearly as much adoption as let's say... TypeScript in the JavaScript ecosystem though.
Facebook even wrote a package to generate types automatically for existing code https://github.com/Instagram/MonkeyType .
And that’s fine! Python is probably the best language in its niche. Type annotations just don’t do enough to break out of that niche. Annotated Python with mypy is a terrible statically-typed language. Python generally is an excellent dynamically-typed language.
I like the idea of type annotators but they do not make it a type safe language because types are not checked and they are more like comments.
Python will remain a dynamically typed language, and the authors have no desire to ever make type hints mandatory, even by convention.[1]
It's still not really a sound type system, though. Many safe languages have some kind of escape hatch for the type system, but the escape hatches are very close at hand in Python's typing and you see them used several orders of magnitude more often.
Not that i like it but just to show that a lot of languages require a properly set up configuration and CI-infrastructure to make them safe and useful. mypy should be considered equal to -Wall -Werror and anyone who doesn't run it is frankly a bloody idiot.
It isn't, you're just contributing to a flamewar that has been going on since computers have been a thing.
how would the cases be better suited for a type safe language? what is type safety, in your opinion?