Google's Python Class
developers.google.com
developers.google.com
Python 3 is the present, we are there, Python 2 is the past and in 2 short years it will be unsupported and whatever you learned from this resource will need to be re-learned for Python 3 pretty damn quick.
Recommendation to those learning Python: avoid this Google resource and instead use Zed Shaw's "Learn Python 3 The Hard Way" https://learnpythonthehardway.org/python3/
Or you could do things Google's way and then follow up with learning how to use DOS http://people.uncw.edu/pattersone/121/labs/L1_MSDOS_Primer.p... because I believe things are heading that way.
"I decided to become a Prolog programmer because it was the only thing installed on my machine."
By this logic, we should be using IE on Windows.
But, if you know nothing about the web and are just learning, and you've got a Windows machine, sure, use IE (or Edge, if it's Windows 10.)
Just like if you are starting from zero programming, and self-teaching, sure, use whatever is available in the base install of your OS.
My "give up" was just install as root, system wide, but that's only because I have root access to my machine.
We're talking about learning a new language, not deploying to production.
> By this logic, we should be using IE on Windows.
No, that's not what anybody said. This is about learning languages, not even using them. Using a language is different from learning a language in so many ways they aren't even comparable.
Millions of people could be learning a language for millions of reasons. Simple portability is useful - knowing a language that is preinstalled on a huge portion of computers worldwide has massive advantages for a huge number of people who are learning new languages today.
Dismissing the values that others might place in how they learn a language is being close-minded. There are lots of reasons to learn to program, and learning based on the language available to you first and most readily is certainly a reasonable approach.
(In this case, it's both javascript and c, on linux, and VBA on Windows. I use none of those today but that doesn't matter!)
if only..
Is there something useful that's only in Python 3?
[1] https://python3wos.appspot.com/
Citation needed. Back then it was at best at 20%, and even today it's not much more (source: PYPY download statistics breakdown).
>I don't know anyone who is starting a Python 2 project as of now.
I know several. Any company with lots of Python 2 projects that are not going anywhere soon (Google is one of them), is probably also starting new Python 2 projects alongside them, they won't add 2 different versions to cater to.
Citation needed.
Edit: Oh and Tensorflow for Windows is made by Google and it's Python 3.5 or higher.
Most of the big libraries have supported both 2 and 3 for a while; that's changing soon, and not because Python 3 is dying.
IPython dropped Py 2 support in 6.x.
Django dropped support for Py 2 with Django 2.0.
Numpy drops new feature support for Python 2 at the end of this year (but will continue bugfixes for that last Py2-supporting feature release past that point), and all support for Python 2 at the end of next.
SciPy, similarly, has announced it will drop Python 2 support by 2020.
And lots of other libraries have sunsetted or announced plans to sunset Py 2 support quite soon.
Also—and a big driver—is that the Python Software Foundation has announced it will drop support for Python 2 in 2020.
>SciPy, similarly, has announced it will drop Python 2 support by 2020.
And there's the reason I needed to convert, thank you.
Still, if you need to search for today's reason to switch to DuckDuckGo, I guess Google releasing a free class for the wrong version of Python is as good as any.
If you are releasing a free Python class under the Google brand, but the content is almost a decade old[1] and a lot of it will be phased out shortly or unsupported in 2 short years, you are doing the community a dis-service.
Stop assuming freebie is always good stuff or Google always release high quality content.
Disclaimer: I am a long time python developer and I love Google's service in general.
Companies use things that are "out of date" due to various factors. You could shit on a "IBM's COBOL Class" because COBOL is old as shit, but it doesn't change the fact that there is a lot of COBOL out in the world, and a need for folks to learn it so that they may maintain or migrate it.
Just because Python 3 is the shiny new version and the future of the language doesn't change that there is going to be a lot of Python 2 out there and folks will need to learn and understand it.
In a nutshell, it's not about Python 2 being old, it's about calling Python 2 "Python" when that hasn't been the case for a few years now at the least.
Well, no, they've made no comparable claim.
From skimming the material, not only does Google not refer to Python as "modern" but provide the caveat
> For Google's Python Class, it's best to use Python 2.7. Although Python 3.x is becoming more popular, this course is designed for Python 2.6 or later.
I suppose to some folks they should provide a disclaimer with road flares warning of Danger Ahead, but it's not as if they're intentionally misleading.
"Becoming more popular" should instead be "will be the only supported version of Python from 2020 onwards".
Unless the reader is aware of the state of Python 2 vs. 3, he/she wouldn't even bat an eye.
If I were looking at learning Python and read that line I'd stop and dig a little deeper.
I hate on Google as much as the next neo-Luddite, but they're putting out quality material on a topic that some folks will need. Y'all are pretty damn hateful.
COBOL doesn't even make it to the top 25 on TIOBE index, so your comparison doesn't matter. Who wants to learn COBOL these days if they weren't mandated by the job or for teaching?
[1]: https://stackoverflow.blog/2017/09/06/incredible-growth-pyth...
1) Teaching beginners' Python 2 , the motives are suspicious -- especially considering Googles' use of Python 2 internally.
It's not entirely noble to train beginners' to familiarize themselves on languages that are on their way out just so that they can maintain your legacy code once they get some experience. It's profit maximizing, speaks to their thought-process behind the employees' career, and points towards a culture that's uninterested in internal improvement when things work to turn a profit.
2) Python 2 is not Python, it's Python 2. Programming tutorials for "Python" muddy the search-query waters and make it difficult for beginners to find specific information. This happened to the Lisps, and it's a big barrier to entry for beginners to the language(s).
3) Python 2 can be easily understood by Python 3 users. In fact, it's often more verbose and easier to wrap your head around than Python 3, and the syntactic differences are minor unless you're using advanced features.
I'm sure Google is just releasing internal stuff that's been around for years -- I just think its' disingenuous to refer to what they teach as 'Python'.
Yeah; it's Python if you're a googler; it's python 2 to the rest of the world -- and it's on the way out.
P.S. if my company sent me to a seminar on COBOL, i'd be well aware of the position they expected of me -- and i'd have one foot out the door.
Well what do you propose we call it? Cobra? It's still Python, just not the latest version.
> P.S. if my company sent me to a seminar on COBOL, i'd be well aware of the position they expected of me -- and i'd have one foot out the door.
To be frank, you sound like a prima donna. Part of software engineering is maintenance and migration. If my company sent me out to learn COBOL I'd be happy for an interesting challenge that I'd not normally be exposed to.
Python 2 still comes pre-installed on most everything. So, why can't someone coming to Python with little or no experience just be welcomed to use what they have for now?
I kid you not, some of these Python3'ers would have a newb bike shed for a week getting a whole Python 3 workflow with virtual environments, etc going before they'd let the person write their first hello, world. They can learn that stuff later, when it matters.
So, why can't someone coming to Python with little or no experience just install the latest version?
Just shedding some light on both sides of the argument. I'd prefer people starting out use the latest version because it is not hard to install Python 3 and takes very little effort.
Going from knowing Python 2 to 3 is far easier than going from not knowing Python or programming at all to knowing Python 3.
Is it that it is more consistent in places?
No more long type
Division that works as expected
Annotations
No more xrange, iteritems etc, instead you get iterators everywhere
f-strings
Less duplicates (xrange vs range, itemview/iteritems/items(), map/itertols.map,).
Entering french in comments will not crash the program even if you didn't give "the unicode talk". Clear type for raw bytes with a proper name.
Way less verbose (no __future__, no u, no object, no codecs import, f-strings, simple super(), etc)
Debugging is easier (debug messages are better, exception chaining, division makes sense, repr is clearer)
You can't shoot yourself in the foot as much (ordering "1" and 1, assigning to True ...)
Less stuff to learn (e.g: pathlib instead of os/shutils/glob/codecs)
And that's just out of my head.
Under the freedoms provided by Free Software licensing, users who have a need to continue to use Python 2 should be able pool their effort to continue to support Python 2.
There was an effort called Python 2.8 to do this, but the Python Software Foundation made it change its name and I don't recall what the new name is. It's not particularly nice that the thing that's compatible with what was called Python to begin with is the one that got renamed.
Not cool, and not true either.
Python dev team get to decide - have already decided - when they stop supporting Python 2.
Anyone can just it as long as they want, but, of course, without official support.
I'm quite happy that some other people were discouraged from misappropriating the name Python 2.8, as that way much confusion lies.
The PSF also owns the "Python" trademark and the whole purpose of trademarks is to prevent confusion about who made something, i.e. exactly the kind of confusion a Python 2.8 that isn't made by the same people who made Python 2.7 would have caused.
The new name, for what it's worth, is Tauthon: https://github.com/naftaliharris/tauthon
Entitled to the name perhaps, but _not_ entitled to indefinite support by the core devs.
> The core devs don't owe you indefinite support for your chosen version. Absolutely they get to decide when they want to stop supporting it (and they already gave it a ridiculously extended support lifetime!).
I agree! I said the users of Python 2 should be able to pool effort to continue to support Python 2.
Yet, there is a lot of sentiment in this thread that whether Python 2 should continue to be used should be tied to whether the Python core devs are still supporting it. Similarly, there is widespread sentiment that e.g. Linux distros should drop Python 2 and packaging Tauthon in its place doesn't even make it to the agenda.
> The PSF also owns the "Python" trademark and the whole purpose of trademarks is to prevent confusion about who made something, i.e. exactly the kind of confusion a Python 2.8 that isn't made by the same people who made Python 2.7 would have caused.
I'm well aware that the PSF is legally entitled to exclude Tauthon from being called Python 2.8. It's still not particularly nice towards the users of the language who bet on Python 2 and who'd benefit from easy discovery of Tauthon.
Imagine if Stroustrup had gone on to develop the language that's in reality called D but insisted that it be called C++ and the language everyone else knows as C++ be renamed if developed further in a backward-compatible way.
Once there is no longer a Python 2.x by the Python core devs to confuse Tauthon with, it's arguably more confusing for Python 2 and Python 3 to share a name but Python 2.x and Tauthon not to. (For clarity, the previous sentence is not a legal argument. I'm well aware that the public who could be confused about names doesn't have standing under trademark law.)
> The new name, for what it's worth, is Tauthon: https://github.com/naftaliharris/tauthon
Thanks.
> The notion that the Python core devs get to decide when Python 2 should stop being used is not cool.
They don't. They just won't support it anymore, nor provide updates for it.
> Under the freedoms provided by Free Software licensing, users who have a need to continue to use Python 2 should be able pool their effort to continue to support Python 2.
They can, just not under the name of Python, as this name is owned by the Python Software Foundation. Similarly Canonical would crack down on someone opening a project 'Ubuntu12', continuing to support Ubuntu 12.x versions.
> There was an effort called Python 2.8 to do this, but the Python Software Foundation made it change its name and I don't recall what the new name is.
And the people who decided to do this are well within their rights to do so - it is free software after all. Just - as explained in the last paragraph - not with the name Python.
This isn't only to prevent the brand 'Python' to be influenced by a project out of the reach of the foundation, but also to prevent confusion for newcomers.
You are absolutely able to go clone their git repo right now (https://github.com/python/cpython) and work on it as your own. You can create updates, backport fixes, etc. You can maintain that well after they cease supporting python 2.7.
You may not call it Python though, because of trademarks.
Many major libraries have already released their last version supporting Python 2 or announced plans to do so by the end of this year, several have already released the first major version that does not support Python 2.
Core decision that Python 2 wouldn't be supported past 2020 played a role in timing, but isn't the decisive factor in why Py 2 is being dropped: many of the projects specifically said Py 2 was holding them back.
> Under the freedoms provided by Free Software licensing, users who have a need to continue to use Python 2 should be able pool their effort to continue to support Python 2.
They are free to do so.
> There was an effort called Python 2.8 to do this, but the Python Software Foundation made it change its name and I don't recall what the new name is.
Tauthon, I think, is the project you are referring to.
> It's not particularly nice that the thing that's compatible with what was called Python to begin with is the one that got renamed.
Free Software principles don't make names public domain; you don't get to steal a project’s name because you object to major release.
This is incorrect. They get to decide when they stop supporting it. Of course that's within their rights, and a 2020 sunset date on a version released in 2010 is a very long LTS window.
> It's not particularly nice that the thing that's compatible with what was called Python to begin with is the one that got renamed.
This is how copyright works. Someone else is free to release a MyPython 2.8 if they'd like, but they're not free to call it Python.
Or the community -- including companies with huge resources and lots of Python 2 code -- will just fork 2.7 and fix it.
Anyone who's every ported a very large project from 2 to 3 might end up despising the PSF for this purpose and might tend to search for a new language (Nim? Go? JS? Scala? Ruby?!). So much for the B in BDFL..
Yeah, but a name like "Cobra, a fork of Python 2.7" will do just as well, and everyone that cares enough will know what it is and where to find it.
More importantly, the fact that major libraries are dropping Python 2 support is not meaningless. (Again, I suppose, it's possible that people could fork IPython, NumPy, Django, etc., from the last Py 2 supporting version and extend support, but that seems even less likely than the core language getting solid support by way of a community fork.)
Also, you should note that most systems that come with python pre-installed still come with 2.x, so the last update to this (March 2016) could have been accommodating that fact.
> Originally created during the Python 2.4 days, we've tried to keep the content universal and exercises relevant, even for newer releases. As mentioned on the setup page, this material covers Python 2. While we recommend "avoiding" Python 3 for now, recognize that it is the future, as all new features are only going there.
Furthermore I do not believe that the rate of change will stop in several lifetimes.
On how old computing is, automated computing using punch cards was invented in the 1800s. "Programmer" has been a viable job title since WW II. Essays about programming written 50 years ago are still relevant today.
On how much things change, that depends on your environment. Across the hall from me there is a company of COBOL programmers. A lot of what they need to know hasn't changed since before I was born. Sitting next to me are people implementing code in node.js with react. Most of the libraries and best practices that they are trying to follow were invented in the last 10 years. I'm maintaining a legacy project that isn't using any technology less than 10 years old. The experience of how much things change is highly dependent on what exactly you are doing.
However I'm minded of what my sister said about nursing. When she started as a nurse she was told that on average half of what she knew would be out of date in 10 years. This is why nurses need continual retraining. This was ridiculous to her. But guess what? When she retired it was true, every 10 years about half of what she knew went out of date! Between new research, new technologies, new best practices and so on, nursing never stopped changing. And hasn't stopped changing since modern nursing was invented in the 1800s.
If a profession so much older than ours shows such sustained change, and our profession has shown an extended sustained rate of change, why would I expect this to change? The truth is that I don't. Sustained change is more the rule than the exception in technology, and none of the fundamental reasons why have changed.
Some knowledge is core - the ways that programmers get defensive and have trouble accepting their own bugs and mistakes has not changed since before I was born - and others change constantly. Learn the principles. Learn what is core. And be prepared to continue learning trivia forever because programming is continuing to change.
Edit: On a related note, I don't think python is a very good first language, despite it being my absolute favorite, because it uses kind of a mishmash of paradigms.
What language would you say is a good first language? To me, Python seems very readable to a new programmer without having a capability/tooling ceiling that you will eventually reach, which seem to make it a decent choice.
And if you're going to port, it's not a question 2 vs 3, it's a question of 3 versus many other languages, chiefly Go.
The idea of data being encoded should be an extremely high level idea, with foundations that are supported by the internal libraries and maybe even compiler.
I feel that golang has a much more data-structure friendly view of Unicode.
* The ancient paradigm of bytes remains
* Strings are immutable sequences of bytes; but are trivial to cast back and forth.
* 'runes' (distinct Unicode code points) also exist
However to actually validate or do anything fancy to a Unicode sequence a programmer would need libraries from https://godoc.org/golang.org/x/text which shows how truly complex /proper/ handling of Unicode data is; instead of just the simple copy / append / search (is this inside of / a match to it) operations that make up 99% of my handling of Unicode data.But I agree, making unicode part of the language is very dumb. I just wish they would give up as it has never been good.
The best in-memory representation of Unicode is UTF-8. No alignment issues, ingest "decode" is mere validation and output "encode" step is a no-op. Space requirements are favorable to common computer language syntaxes. Byte-wise lexical sort matches code point-wise lexical sort.
However, since "narrow builds" of Python 2 already used UTF-16 which allowed for things like bridging strings with Cocoa, Python would have done well to stick to UTF-16 and get rid of the "wide builds".
Not having both "narrow" (UTF-16, Python 2 on Mac) and "wide" (UTF-32, Python 2 on Debian) is an improvement, though.
The difficult engineering problems in the world aren't greenfield engineering.
I seriously cannot tell if this is a joke or not.
The writing is on the wall for py2 at Google, and in some ways it has been for years.
Sure it's mostly outdated, but it really clicked for me. Nick Parlante does a great job, and his codingbat.com was the perfect step 2.
First Lecture. https://www.youtube.com/watch?v=tKTZoB2Vjuk
I took a couple C classes in college that were geared for people who already knew how to program and hated it. Never wanted to think about it again.
Those videos helped abstract a lot of the low level muck away and build real stuff. Once I was able to understand some of these concepts and why you would actually use them I could go back and learn all the things that were too deep in the weeds to understand.
Its a bit dated now but still some of the best training videos I've seen.
> https://www.udacity.com/courses/all
It's an interesting mix of empowering the learner and getting the learner to use Google products (e.g. you finally make that Android app, you learn how to iterate development, gain traction with users, grow). I wonder to what extent learning from the resources can bring up to parity with a Google developer.
Some years ago in a googs search box i searched for some flag for 'python3 itertools' and googs immediately took me to a subdomain saying, 'does this sort of thing interest you? This is the kind of work we do here at the goog.' then something to the effect of enter your email and answer some obscure python question
Out of curiosity I answered the first few questions but after about four I was more bothered than intrigued and closed the tab and redid the search and this time googs gave me the results I was looking for
It was the only time it's ever happened to me..
Has anyone else ever seen this?
https://thehustle.co/the-secret-google-interview-that-landed...