Hello Archaeopy! It has been awhile since our last post. It has been a busy past two months full of conferences and fieldwork, but these have inspired upcoming tutorials and challenges! We would appreciate some feedback regarding how ArchaeoPy is administrated. Our new plan is to release challenges monthly (with the next challenge issued next week, on the 17th... so there is still time to complete the first challenge and submit your entry for the mystery prize!) with virtual meetings being held and broadcast every fortnight. Also, what do people think of a mailing list, for the between meeting times, for any questions, comments, or ideas? We will we be sending around invitations to a google group, to those who are subscribed as archaeopy.org users. Please let us know in the comments below, on the facebook page, or via tweet what you think of these changes!
The following post on basic terminology was requested to clarify the jargon in the posts... so ask and you shall receive! If you have an post request or thoughts, please share them in the comments below, on facebook, or send us a tweet! So please find below an A-Z of the common terms will we be using, with wikipedia and python docs links for your edification. Please also checkout this very straightforward tutorial of computing basics (and how they relate to python).
Algorithm: A set of of steps for solving a problem/completing an operation.
Argument/Parameter: For clarity, from the associated python documents entry: "parameters are defined by the names that appear in a function definition, whereas arguments are the values actually passed to a function when calling it. Parameter define what types of arguments a function can accept."
Assignment: Associating a value to a variable.
Bug/debugging A bug is problem in the program. The process of debugging helps find and remove these problems.
Bool: Bool is a class in python where values can be converted to a Boolean, to evaluate a truth value. Boolean expressions are either true or false. For example:
Delimiter: The character(s) that separate individual data (e.g. we commonly use comma or tab separated values).
Expression: Expressions combine values, variables, and operators in a way that Python can evaluate. For instance:
Function: Functions are sequences of statements that perform a defined action. For example, a function which squares the input value.
def sq(x): return x*x print sq(2)
Import: Notice how we have been importing numpy? Importing numpy allows us to use the numpy code within our own code.
Integer: Integers are whole numbers; they have no fractional component.
Loop: Loops are sequences of statements that can be executed successively. A loop can be specified to run a certain amount of times, indefinitely, or until some conditions are meant.
Parameter/Argument: For clarity, from the associated python documents entry: "parameters are defined by the names that appear in a function definition, whereas arguments are the values actually passed to a function when calling it. Parameter define what types of arguments a function can accept."
Statement: Statements express a command or action to be performed. For example, the print statement:
Semantics/Semantic Error: Like the natural languages that we speak, formal programming languages also have meaning. In computer science, semantics relates to the meaning of the programme and how it is interpreted. With natural langues, we could have a grammatically incorrect statement, such as "I are hungry," but is correctly semantically understood (that I am hungry). On the flip side, we could have a grammatically correct statement that is semantically ambiguous, such as "Let's eat grandma." Adding a comma after grandma ("Let's eat, grandma") clarifies the statement. These natural language analogies can apply to formal languages as well. Your code can run with semantic errors, but it will not do what you want or are expecting it to do.
String: Strings are a data type that we can create by assigning a value in apostrophes to a variable:
example_string = 'Archaeopy"
Syntax/Syntax Error: While semantics refers to the meaning of language, syntax refers to the correct structuring of the language. Python will not execute your syntax errors. For example, let's take a look what happens when we forget the apostrophe to finish this print statement.
Type: Values fall into different categories of classifications. Python handles different data types differently. For the most part we will be working with strings (str), integers (int), floating points (float), and boolean values. For a more detailed understanding of different python data types, this is a pretty useful page.
Variable: Variables in python store values. For instance, consider:
name = 'archaeopy'
In this example name would be the variable and archaeopy would be the value.