What minimum should a person know before saying "I know Python"

A

Aseem Bansal

I started Python 4 months ago. Largely self-study with use of Python documentation, stackoverflow and google. I was thinking what is the minimum that I must know before I can say that I know Python?

I come from a C background which is comparatively smaller. But as Python is comparatively much larger what minimum should I know?

Just a general question not for a specific purpose.
 
R

rusi

I started Python 4 months ago. Largely self-study with use of Python documentation, stackoverflow and google. I was thinking what is the minimum that I must know before I can say that I know Python?



I come from a C background which is comparatively smaller. But as Python is comparatively much larger what minimum should I know?



Just a general question not for a specific purpose.

Stroustrup says he is still learning C++ and I know kids who have no qualms saying they know programming language L (for various values of L) after hardly an hour or two of mostly advertising and pep-talk exposure.
So without knowing what you mean my 'knowing' I am not going to try answering q-1

I am just curious about q-2 -- C is small compared to python -- whats your measure for that?

BTW 20 years ago I wrote about why C is very hard to learn and teach
In these intervening years some things have changed, some have not

See
http://blog.languager.org/2013/02/c-in-education-and-software-engineering.html#relevate
 
T

Tim Chase

I started Python 4 months ago. Largely self-study with use of
Python documentation, stackoverflow and google. I was thinking what
is the minimum that I must know before I can say that I know Python?

It's a fuzzy line. A good while back, there was a thread regarding
Python interview questions:

http://www.mail-archive.com/[email protected]/msg168971.html

to which I replied with a pretty large list. The idea was not to
ensure that people knew everything on it, but as a way to take stock
of somebody means by "I know Python", which can mean anything from "I
wrote _Hello World_ in Python once" to "I'm Guido/Raymond/Effbot".

Along with the "Basics" section of that email, I'd expect a reasonable
understanding of commonly-used libraries offered out of the box (at
least a breadth of what is there, even if you haven't used them
much).

Most of the "history" items in that list are somewhat moot unless you
have to support older Python (I still have some 2.4 installs that
don't let me use the "with" statement or sqlite by default).

-tkc
 
R

Robert Kern

Stroustrup says he is still learning C++ and I know kids who have no qualms saying they know programming language L (for various values of L) after hardly an hour or two of mostly advertising and pep-talk exposure.
So without knowing what you mean my 'knowing' I am not going to try answering q-1

I think that's his actual question: "What do *you* mean by 'I know Python'?" At
what point in your Python career did you feel comfortable claiming that?

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
 
R

rusi

I think that's his actual question: "What do *you* mean by 'I know Python'?"
At what point in your Python career did you feel comfortable claiming that?

Hmm... Now you are putting me in a spot :)
Too many aspects to this to give a reasonably short answer :)
I'll try and collect my thoughts in due course...

What I meant to say to the OP:
Knowing a language can mean widely different things:
1. to crack interviews
2. as a junior programmer
3. as a tech-lead
4. for bug-fixing/maintaining others' code

A big difference between 1 and 2 is the value of obfuscated/ting code
For 1 knowing trick questions/answers is a big win; for 2 more likely a loss.
Also for 1 a big breath-first knowledge is required; for 2 its ok to know asubset well and be able to use it with good taste.

For 3 right emotions are more important than details -- to look at a significant piece of code and be accurate in exclaiming "Wonderful/Blechhh"

4 is really an important and much neglected mindset. Ive talked about it here

http://blog.languager.org/2010/02/service-and-product-mindsets.html

Ok... So trying to say (a little!) in answer to your (Robert's) question though tangentially.

Ive spent 20 years in a university. Most of what goes on there may be called gaming.
- The best students are not the one's who know or love to know most but whosuccessfully game the system
- The best teachers are not those who teach best but who are one-up on the students' gaming habits and tendencies
- The best administrators are those who are cleverest at using academic (sounding) jargon to make lucrative institutions

Sounds cynical? Well most of the students are not the 'best students' above and so its more important to gauge where (s)he is coming from, where going etc and to answer appropriately rather than giving to-the-point answers when the student may be too bewildered to ask exact/precise questions.

Basically instruct him just enough on how to game the system so that he clears the course but not so much he loses his soul!
 
M

Mark Janssen

I started Python 4 months ago. Largely self-study with use of Python documentation, stackoverflow and google. I was thinking what is the minimum that I must know before I can say that I know Python?

Interesting. I would say that you must know the keywords, how to make
a Class, how to write a loop. That covers about 85% of it.
 
A

Aseem Bansal

By C being smaller than Python I did not mean the scope of C is lesser thanPython. I simply meant that the standard libraries are less in number compared to Python.

By knowing Python I didn't imply an expert-level understanding. Minimum that so someone cannot say "Hey, you said you knew Python but you don't know anything.". Something on these lines. You can say for cracking interviews and/or as a junior programmar and/or as a fresher getting into industry.

I like to have test cases for my functions/scripts but that wasn't what I had in my mind.

Also I am learning Python because it is faster to make things with it. Not because it is going to get me any marks or anything.

@Tim Chase
That list helped. I was looking for something like that. Questions which I can try to answer and see where I stand.

I hope that cleared some confusion about what I wanted to ask. I wanted to gauge myself to find if I am progressing or not.
 
C

Chris Angelico

I hope that cleared some confusion about what I wanted to ask. I wanted to gauge myself to find if I am progressing or not.

Well, based on my definition, that's easy to answer. Have you solved
problems using Python? If you have a bunch of HTML pages and you need
to get some info out of all of them by COB today, do you think "I can
do that with Python", or do you think "I can do that with sed, awk,
grep, and five levels of pipe"? The tools you use for an urgent job
will be the ones you know.

ChrisA
 
J

Jugurtha Hadjar

I think it is a philosophical question. It's like saying "I know maths",
which is a ridiculous phrase I was surprised to hear, let alone
surprised to hear often.

Can someone know everything there is to know about something ? I doubt
it. The point, at least for me, isn't to know everything .. But the
ability to find out.

I consider myself ignorant in almost everything, that's because I ask
myself a lot of questions about a lot of things I ignore. The point is
following up and looking things up so that you know them.

I knew many things I wasn't even aware existed. What this (constant
questions) does is that it gives a lot of information that is networked
(and you make a lot of connections between seemingly unrelated topics).

I'll give an example: I had a class in my second year in college about
nuclear and atomic physics. There was a chapter about the Doppler
effect. I was able to grasp it easily, because when I was a kid, it
happened I took magazines in the bathroom to read, and I've read about it.

Having a déjà-vu impression in a lot of things and to be able to make
analogies of concepts and principles has helped me tremendously. When I
got into college and started programming PIC microcontrollers, having
tinkered with Intel assembly language in high-school (disassembling
executables and tinkering with them) was definitely a plus (Registers,
operands, carry operations, hexadecimal, addresses).

When in the first year we started Pascal, I already did things in Delphi
when I was in high-school. But then again, I also did tinker with C in
middle-school (really basic stuff) and BASIC as a child.



Do I know Python ? No. I don't think I ever will. But I am confident I
will be able to do what I cannot do right now, and the complexity of the
things I will be able to do will increase, as will my ability to
simplify complex things.


It's a converging exponential, as a capacitor charging. The goal is to
minimized the time constant so you get at about 63.2% fast. The
incremental 1%s will take years and I don't think you'll ever hit 100%,
not even after decades. Sorry :)
 
A

Aseem Bansal

Well, based on my definition, that's easy to answer. Have you solved
problems using Python? If you have a bunch of HTML pages and you need
to get some info out of all of them by COB today, do you think "I can
do that with Python", or do you think "I can do that with sed, awk,
grep, and five levels of pipe"? The tools you use for an urgent job
will be the ones you know.

ChrisA

Yeah I have. I needed to get stats from the front page of a website. I wrote a script for that. I plotted the stats using matplotlib. I collected datamanually and missed running the script one day so I took care of that problem using Python. Wrote a script that checked for internet connectivity andthen ran the scripts that downloaded the stuff I needed and then placed this script in the Windows startup folder.

That was a nice feeling. Because I can just customize that startup script if I ever wanted to change my computer's startup behaviour.

But that was pure luck that I had done the random example that you had chosen. It would be difficult to find my overall progress by the one thing.

I am currently unemployed so the sense of urgency isn't there normally. That's why I asked this question. But I got your point.
 
A

Aseem Bansal

I understand that being able to solve problems and knowing when to use something is the final measure of knowing something properly.

But I wanted to find something quantitative that I can use to measure myself. Like the interview questions that Tim Chase posted.

Measuring myself based on the problems that I can think of is like a small child saying "I know that 1 + 1 = 2. So I know maths". That may be the toughest problem that he can think of. That isn't a correct evaluation of hismath abilities. Similarly measuring myself on the basis of the problems that I can think of and solve doesn't actually measure anything.

I don't want to be living in a fool's paradise based on solving the problems I can solve. It is not being able to solve a problem that will make me realize my limits.

That's why I asked this question... I am kind of asking for advice.
 
T

Terry Reedy

I started Python 4 months ago. Largely self-study with use of Python
documentation, stackoverflow and google. I was thinking what is the
minimum that I must know before I can say that I know Python?

I come from a C background which is comparatively smaller. But as
Python is comparatively much larger what minimum should I know?

The C stdlib may be smaller than the Python stdlib, but I do not think
the language itself is much smaller. Python3 is a bit smaller than
Python2 due to removals.

Python the language is defined in the Language Reference. So 'knowing
Python' means knowing most of that. What I might leave out: the details
of all the special method names; which bitwise operators do what; yield
from (3.3+). From the library manual, I would include an overview of
chapters 2 to 5. For instance, not memorize all the exceptions, but
understand the hierarchy.
 
C

Chris Angelico

Yeah I have...
But that was pure luck that I had done the random example that you had chosen. It would be difficult to find my overall progress by the one thing.

I am currently unemployed so the sense of urgency isn't there normally. That's why I asked this question. But I got your point.

It wasn't exactly a random example; it's an extremely common task
(maybe without the "must be done today" restriction), and one that
Python happens to do fairly well. :)

There was a time, back in the 1990s, when REXX was my primary
language. (We were exclusively an OS/2 shop at the time, so it was a
good choice.) If I needed to write a quick script, it would be in
REXX. If I needed to parse text, I'd use REXX. If I wanted a GUI app,
I'd write it in VX-REXX. Later on, when I needed to write Windows
code, I tended to use C++. It wasn't till the late 2000s that I
started using Python for those sorts of jobs - even though I'd met the
language back in the 90s - indicating that that's when I actually knew
the language.

ChrisA
 
R

Roy Smith

Chris Angelico said:
Well, based on my definition, that's easy to answer. Have you solved
problems using Python? If you have a bunch of HTML pages and you need
to get some info out of all of them by COB today, do you think "I can
do that with Python", or do you think "I can do that with sed, awk,
grep, and five levels of pipe"? The tools you use for an urgent job
will be the ones you know.

The fact that you reach for traditional command-line tools to parse HTML
should not be taken as evidence that you don't know Python. It should
be taken as evidence that you have a lot of tools in your quiver and
know when to use the right one.

I started with Python in the 1.4 days. I will reach for Python these
days in preference to Perl, Tcl, C, C++, Java, or PHP for most things.
But, for a lot of basic text processing, I can throw together a sed,
awk, grep, sort, uniq, wc, tac, tail, etc pipeline faster than I can
write a Python program to do the same thing.

Oh, and by the way, the python.org home page has

$ curl -s python.org | tr ' ' '\n' | grep ^href= | wc -l
124

124 links on it.

You're still reading the BeautifulSoup docs :)
 
C

Chris Angelico

The fact that you reach for traditional command-line tools to parse HTML
should not be taken as evidence that you don't know Python. It should
be taken as evidence that you have a lot of tools in your quiver and
know when to use the right one.

I started with Python in the 1.4 days. I will reach for Python these
days in preference to Perl, Tcl, C, C++, Java, or PHP for most things.
But, for a lot of basic text processing, I can throw together a sed,
awk, grep, sort, uniq, wc, tac, tail, etc pipeline faster than I can
write a Python program to do the same thing.

Oh, absolutely! I never said that sed/awk/grep was a bad way to do
things; my point is that, when there are dozens of viable solutions to
a problem and you have to solve that problem *now*, you are going to
reach for the one you know best. I use sed all the time (it's one of
the easiest ways to edit a root-owned file from a non-root shell
script - 'sudo sed -i').

ChrisA
 
G

Gene Heskett

It wasn't exactly a random example; it's an extremely common task
(maybe without the "must be done today" restriction), and one that
Python happens to do fairly well. :)

There was a time, back in the 1990s, when REXX was my primary
language. (We were exclusively an OS/2 shop at the time, so it was a
good choice.) If I needed to write a quick script, it would be in
REXX. If I needed to parse text, I'd use REXX. If I wanted a GUI app,
I'd write it in VX-REXX. Later on, when I needed to write Windows
code, I tended to use C++. It wasn't till the late 2000s that I
started using Python for those sorts of jobs - even though I'd met the
language back in the 90s - indicating that that's when I actually knew
the language.

ChrisA

That also brings back fond memories of the days of the amiga, Chris.

We had a huge superset of REXX called ARexx, which brought every system
call that AmigaDOS had right into the script writers usage menu. Jim Hines
and I wrote the only cron the amiga ever had that didn't busy wait, so cpu
usage was minimal. Called it EzCron. Gave it away. Then since the x10
stuff for home automation was /the/ system back in the day, we wrote
EzHome, which had an MUI driven gui, and sold that for a time. It, ARexx,
was written by a William Hawes, and sold thru the commie dealer chains at
the time. I've no clue whatever became of that gentleman after that, but
it came to light much that he never got a dime for writing ARexx from those
2 crooks that bought commie and moved it to the Bahamas where he, nor
anyone else, could sue to collect. I did note that for many years, there
was a subdir on kernel.org for him to work in, but to my knowledge it was
empty when I downloaded and built my first x86 based linux kernel in early
1998, and remained empty till whenever.

I was quite pleased to see that there was a Rexx/Regina for linux, and for
about 10 minutes thought I could make use of the library of ARexx code Jim
& I had carved up and had running on the amiga, but was very disappointed
to see that Regina wasn't coupled to the os itself in any way, causing our
scripts to barf and exit within the first 3 or 4 lines of code.

Our first web page at WDTV.com in the winter of 1999-2000 was served up on
a dialup circuit, by an ARexx script we wrote, from an amiga 2000.

Heady days, those, while the dosboxes were still struggling with trumpet,
and choking on the all the amiga, pdp and VAX dust. But time marches on,
while the amiga didn't.

I've seen python doing some heady stuff in the last 5 years, but the
learning curve is pretty steep for my now aging wet ram, which will be 79
years old in a few days, so the scripting language here at the Heskett
Ranchette is bash, and there is quite a boatload of that running as
background daemons right now. So I lurk, reading what goes by, hoping I'll
learn enough python from osmosis to get comfortable with it. From all
indications, it is todays "ARexx" of scripting languages.

I'll get me coat now. :)


Cheers, Gene
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
My web page: <http://gene.homelinux.net:6309/gene> should be up!

As pointed out in a followup, Real Perl Programmers prefer things to be
visually distinct.
-- Larry Wall in <[email protected]>
A pen in the hand of this president is far more
dangerous than 200 million guns in the hands of
law-abiding citizens.
 
D

Dennis Lee Bieber

I was quite pleased to see that there was a Rexx/Regina for linux, and for
about 10 minutes thought I could make use of the library of ARexx code Jim
& I had carved up and had running on the amiga, but was very disappointed
to see that Regina wasn't coupled to the os itself in any way, causing our
scripts to barf and exit within the first 3 or 4 lines of code.

No surprise given the lack of real /interactive/ IPC in Windows and
Linux. A version of REXX running on (Open)VMS might have a chance -- as VMS
Mailboxes were a (protected memory equivalent) of Amiga message ports... So
a means of "address other_application" could be mapped to opening
"other_application_port".

I vaguely recall once using the "advanced" calls from the back of the
manual, and having multiple ARexx scripts talking to each other via
"address other_script"
I've seen python doing some heady stuff in the last 5 years, but the
learning curve is pretty steep for my now aging wet ram, which will be 79
years old in a few days, so the scripting language here at the Heskett
Ranchette is bash, and there is quite a boatload of that running as
background daemons right now. So I lurk, reading what goes by, hoping I'll
learn enough python from osmosis to get comfortable with it. From all
indications, it is todays "ARexx" of scripting languages.

Having been spoiled by ARexx myself... No... Python will never be
/that/... Even subprocess.popen() doesn't allow for the easy control of
other programs. One is stuck with M$ COM (the win32 extension library or,
more portable maybe [if the libraries are ported] ctypes to do what
"address ..." did in ARexx.
 
G

Gene Heskett

No surprise given the lack of real /interactive/ IPC in Windows and
Linux. A version of REXX running on (Open)VMS might have a chance -- as
VMS Mailboxes were a (protected memory equivalent) of Amiga message
ports... So a means of "address other_application" could be mapped to
opening "other_application_port".

I vaguely recall once using the "advanced" calls from the back of the
manual, and having multiple ARexx scripts talking to each other via
"address other_script"

We did that dozens of times a day on every machine we owned, which at the
time was about just in the commercial production rooms.
I've seen python doing some heady stuff in the last 5 years, but the
learning curve is pretty steep for my now aging wet ram, which will be
79 years old in a few days, so the scripting language here at the
Heskett Ranchette is bash, and there is quite a boatload of that
running as background daemons right now. So I lurk, reading what goes
by, hoping I'll learn enough python from osmosis to get comfortable
with it. From all indications, it is todays "ARexx" of scripting
languages.

Having been spoiled by ARexx myself... No... Python will never be
/that/... Even subprocess.popen() doesn't allow for the easy control of
other programs. One is stuck with M$ COM (the win32 extension library
or, more portable maybe [if the libraries are ported] ctypes to do what
"address ..." did in ARexx.

Then it seems to me that work in the direction should be an active feature
request. Unforch, as I've said before, I'm rowing this barge with a
toothpick for an oar. :)

I would be interesting to see if the "bait" is taken. :)

Thanks Dennis.

Cheers, Gene
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
My web page: <http://gene.homelinux.net:6309/gene> should be up!

Real programmers don't write in BASIC. Actually, no programmers write in
BASIC after reaching puberty.
A pen in the hand of this president is far more
dangerous than 200 million guns in the hands of
law-abiding citizens.
 
G

Gene Heskett

We did that dozens of times a day on every machine we owned, which at
the time was about just in the commercial production rooms.

s/about just/about 6 just/g
I've seen python doing some heady stuff in the last 5 years, but the
learning curve is pretty steep for my now aging wet ram, which will
be 79 years old in a few days, so the scripting language here at the
Heskett Ranchette is bash, and there is quite a boatload of that
running as background daemons right now. So I lurk, reading what
goes by, hoping I'll learn enough python from osmosis to get
comfortable with it. From all indications, it is todays "ARexx" of
scripting languages.
Having been spoiled by ARexx myself... No... Python will never be

/that/... Even subprocess.popen() doesn't allow for the easy control
of other programs. One is stuck with M$ COM (the win32 extension
library or, more portable maybe [if the libraries are ported] ctypes
to do what "address ..." did in ARexx.

Then it seems to me that work in the direction should be an active
feature request. Unforch, as I've said before, I'm rowing this barge
with a toothpick for an oar. :)

I would be interesting to see if the "bait" is taken. :)

Thanks Dennis.

Cheers, Gene


Cheers, Gene
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
My web page: <http://gene.homelinux.net:6309/gene> should be up!

Hate is like acid. It can damage the vessel in which it is stored as well
as destroy the object on which it is poured.
A pen in the hand of this president is far more
dangerous than 200 million guns in the hands of
law-abiding citizens.
 
D

Dennis Lee Bieber

Then it seems to me that work in the direction should be an active feature
request. Unforch, as I've said before, I'm rowing this barge with a
toothpick for an oar. :)

I would be interesting to see if the "bait" is taken. :)
Unfortunately, I see that as a requiring a change at the OS level.

Even on the OS that REXX was developed upon, my books give a strong
hint that the only application that was readily "address app" compatible
was a text editor. ARexx piggy-backed on the underlying linked list
messages on "findable" message ports.

Until the OS supports a multiple writer IPC with return addressing in
an easy API, it's unlikely to be created. UDP/IP might be a way -- but UDP
has that nasty unreliability factor. Amiga message ports had guaranteed
delivery (as long as the receiving process read the queued messages; and
VMS mailboxes were similar).

Multiple writer -- as any process could send messages to the single
receiving port; it wasn't a socket server style where connection requests
on a single port would be assigned a distinct port subsequent usage.

Then again, the Amiga auto-config for boards pre-dates the PCI-express
configuration system, which is very similar.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top