Skip to content

Definitions of Pardon jargon to help Python beginners understand Pythonista gobbletigook

License

Notifications You must be signed in to change notification settings

asweigart/python_learners_glossary

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 

Repository files navigation

python_learners_glossary

Definitions of Python jargon to help Python beginners understand Pythonista gobbletigook. The idea is to help a Python beginner's understanding even before they've learned to write the code.

CONTRIBUTING

Please submit issues and pull requests!

  1. Clarity
  2. Conciseness
  3. Accuracy

... are all desirable - in that order. Don't get pedantic or hung up on `corner cases`_.

Terms to define are not strictly Python terms, but any terms likely to be frequently heard at a Python conference.

To reduce cognitive load, let's use examples around a consistent, familiar theme: cats.

Glossary

Basic

Execute
Go. Run. Do that thing you do. Nothing to do with beheading anybody.

Data

Value
A single piece of data, like 3 or 'Fluffy'
String
A piece of text data, like 'hello'. Enclosing it in quotation marks tells Python that it's a string and not something like a variable name.
Float
Short for floating-point number, a number with a decimal point.
Variable

A piece of data that has a name.

cat_name = 'Fluffy'

Now cat_name is a variable with the value 'Fluffy'.

Assign
Give a name to a value, making a variable.
Expression

A description of a value that contains calculations and/or other executable code; the code must be executed to determine the expression's actual value. Typically, these fit on one line, but not necessarily.

Examples:

'lazy ' + 'cat'  # Evaluates to 'lazy cat'
2 * 2 > 100  # Evaluates to ``False``
Boolean
True or False.
List

A series of values. Python will remember what order they come in.

['Mouser', 17, 'Whiskers']
Tuple

A series of values. Python will remember what order they come in.

Hey, is that the same as a list? It's very similar, but after a tuple is set up, you're not allowed to change it.

('Mouser', 17, 'Whiskers')
Set
Just like in mathematics - a group of values. Python will not necessarily remember what order they came in, and each value can only appear in the set once.

Functions

Function

A named series of instructions. Its definition begins with the def keyword.

def feed_cat(kg_of_food, kg_of_cat):
    kg_of_food = kg_of_food - 0.1
    kg_of_cat = kg_of_cat + 0.1
Call

Tell a function to execute. To call a function, give its name followed by parenthesis containing its arguments (if any).

feed_cat(8.0, 3.0)
Argument
A piece of data that you "pass" (give) to a function as you call it. In our feed_cat function, kg_of_food and kg_of_cat are the function's arguments.
Parameter
Synonym for argument.
Return
Stop running a function and return to the place where the function was called from. Send a value back - the "return value".

Object-oriented

Object
A logical grouping of functions (called "methods" in this context) and variables (called "attributes_" in this context).
Method

A function that belongs to an object and "knows" about the object it belongs to. For instance, if my_cat is an object that has a speak method, then we can call it:

my_cat.speak()
'meow'

... and my_cat.speak doesn't need to be told what kind of animal should speak, because it already knows that it belongs to my_cat.

Attribute

A piece of data that belongs to an object. This object, my_cat, has a name attribute with the value 'Agamemnon'.``

my_cat.name
'Agamemnon'
Class
TODO
Instance
An object of a given class. my_cat is an instance of the class Cat.
Instantiate
Create a new instance of a given class. When my_cat has kittens, she is instantiating several new instances of the class Cat. (Please spay our neuter your pets!)
Object-oriented programming
Programming that makes use of classes and objects.
Dunder
The two underscores before and after a method name to indicate that it is "magic", i.e. __init__, __new__, etc. (Short for "Double-underscore")
Magic Method
Methods that can be used to change the normal behavior of an object. HINT : in Python, everything is an object.

Program Structure

Module
A single file of Python commands. Calling it a module implies we plan to "import" it, not just call it on its own.
Package
A directory full of modules that can all together be referred to by the package's name.
Import
Make the contents of a module or package available in your current program, even though it comes outside your current program's file.

Tools

Editor
A program to create or change files. We usually mean text editor, since a Python program is a kind of text file. Notepad is an example of an editor (but don't use Notepad to edit Python, it can introduce mistakes into your Python programs; Notepad++ is a good alternative).
IDE
Abbreviation for Integrated Development Environment. A kind of text editor with programming-related superpowers; a program that lets you build more programs. Examples include Eclipse, Sublime, Wingware, and IDLE
Database
A place to store data outside the program, possibly in memory ("in-memory databases") but generally on disk. A file on disk could be considered a very simple database, but we usually mean much more advanced programs.
Relational database
A very common kind of database that's good at retrieving data that have relationships to one another. For instance, a question like "How expensive is the cat food brand that most of my cats prefer?" is usually easier to answer in a relational database than in other types of database.
RDBMS
Relational database management system - basically a synonym for relational database.
SQL
The specialized language usually used to get and manipulate data in a relational database.
SQL database
More or less a synonym for relational database.

Techniques

Bug
A mistake in software that makes it crash or behave badly.
Debug
Fix bugs
Refactor
Change a program so that the functionality seems the same from the user's point of view, but the code itself is better - easier to read, understand, maintain, etc.
Agile Development
TODO

Version Control

Version Control
Tools and techniques for keeping track of the changes in files in a reversible way. More importantly, it helps people cooperate on changes to a file without ruining each others' work.
Issue
Request for a specific change to software, either to fix a bug or provide new features ("enhancement"). Issues are usually filed in a project's `bug tracker`_.
Bug report
A category of issue for notifying the programmers of a bug
Repository
A record on disk of the version control history for a directory (and its subdirectories). Usually we mean someplace on line, usually at a service like github_.
Repo
Abbreviation for repository.
Branch
TODO
Fork
TODO
Pull Request
After you have fork_ed a repository and made changes, you may ask the original repository owner to incorporate ("pull") your changes into the original repository.
Git
The most popular program for version control.
Mercurial
Another version control program
Github
The most popular commercial service that hosts version control repositories online.
Bitbucket
Another commercial service for hosting version control repositories.

Testing

Testing
To programmers, them means scripts that verify that a program works as desired automatically. We rarely talk about non-automated, direct human testing, because it's soul-sucking and can't keep up with our speed of generating bugs.
Regression test
Tests to make sure that one part of a program doesn't get worse - regress - as improvements aren't made to a different part. All of our tests could generally be considered regression tests.
Unit Test
A fine-scale test that works directly on one small piece of a program, at a scale finer than the end-user will directly see. Contrast functional test.
Functional test
A test that makes sure a program is working from the user's point of view. Contrast unit test.
Test-Driven Development
A style of development where you first write the tests saying what you want the program to do - even before the program exists. Then you write the code until the tests no longer fail.
Corner Case
A situation that's likely to show bugs in code because it's so unusual that the developers were unlikely to account for it. For instance, if you are classifying cats by their eye color, a cat with two different-color eyes may be a corner case that disrupts your classification scheme.

Packaging

PyPI
PyPI, pronounced "Pie-Pee-Eye" and also known as The Cheeseshop, is the "Python Packaging Index". It is where you can publish and download open source Python packages.
pip
pip is the recommended tool for installing Python packages and is preferred over easy_install.

Architecture

API

Shorthand for "application programmer interface". This is the way that other programs can make use of this program. Web services can have APIs that let them accept messages from other programs and send messages back in response.

Examples include POSIX (the unix/Linux API), Win32, Cocoa, Amazon AWS, and Android. However, many other services have APIs to add things like (for instance) Dropbox and Facebook to your app.

TODO: generalize this more

Operations

Operations
Activities related to deploy_ing software and keeping it running on its destination servers.
DevOps
Philosophy and tools for operations that try to make the process as automatic and failsafe as possible by imitating software developers' tools and techniqes.
Deploy
To deliver a completed program so that other people can use it. Ususually different than just programming it so that it works. Sometimes, a program needs to be installed in a package, or through an App Store, or maybe it just needs to be on the web. That last step to make it so that other people can reach it is called "deployment"
Build
TODO
Build Server
TODO
Continuous Integration
TODO

About

Definitions of Pardon jargon to help Python beginners understand Pythonista gobbletigook

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published