Home Accessibility Courses Diary The Mouth Facebook Resources Site Map About Us Contact
Some terms used in programming (Biased towards Python)


Some of the elements of your program

Command

- typically a keyword followed by series of parameters
- a "unit" of shell / batch / Tcl programming
(You don't really have commands in Python)


Statement
- an atomic operational unit of a program
- a "unit" of Python / Perl / PHP / Lua / C etc programming
- does NOT start with a keyword (even though it looks like it in hello world!)


Block
- a series of statements (like sentence -> paragraph)
- blocks are a logical combination of multiple statements - molecular unit


Operator
- an action that is performed on operands (variables, constants, expressions)
- examples are + - * / = == print if (etc)

Operand
- something an operator works on (variable, constant or expression)


Variable
- a named memory location which contains a value that may be altered during a run

Constant
- Something that doesn't every change unless you edit the program

Expression
- a combination of variables, operators and constants that gives a result value


Function
- a named operator that performs on a number of expressions
- each expression passed into a function is known as a "parameter"
- there are a lot or prewritten functions, and you can define your own too.
- typically, using a function allows you to package common statement sequences


Method
- a function the performs its actions against a specific type of data


Separator
- the item that comes between statements or between parameters
- in Python, it's a new line or a ; between statements
- in Python, it's a comma between parameters


High Level
- Shorter instructions where a lot is done underneath and assumed for you

Low level
- Instructions where you give more minute detail of what you're doing


e.g. in Python ... "print" is high(er) level because it automatically adds spaces and new lines
... "write" is low(er) level because you tell it exactly the characters you want to output


How a program is translated and run

True Interpretter / Interpretive language

- Each statement is interpreted and then run as the program as a whole runs
- Simple structure
- Slow to run when you have loops - repeatedly re-interpreting the same thing
Examples - Shell, Tcl


Compiled language

- Source code (original text you wrote) translated into internal / binary format
- lots of other bits of standard code added to it to make an executable file
- Big song and dance routine to set up an executable even for a small change but
- potentially lightening fast to run
Examples - C, C++ Fortran


So what do all the other languages use?

- Source code is translated into a binary format that's common to all platforms
- A "Virtual Machine" reads and runs each statement from that binary format
- Other bits of standard code are loaded in as needed, also run via the Virtual Machine
Examples - Perl, Python, PHP, Ruby, Lua of languages we teach
Not quite identical - Java, where the translation from source to binary is done ahead of time and saved.

Note - Python STORES the binary format of modules as it translates them for the first time
- this makes for a quicker start-up when you rerun the program
- files are timestamped, and a check is made that the binary format is current


Fixing problems

Debugging
- fixing PROGRAM errors

Validation
- dealing with USER data errors



(written 2011-12-12, updated 2011-12-17)

 
Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articles
Q100 - Object Orientation and General technical topics - Learning to Progam
  [4008] Reading and checking user inputs - first lessons - Ruby - (2013-02-17)
  [3895] Flowchart to program - learning to program with Well House - (2012-10-14)
  [3120] Learning to write good programs in C and C++ - separating out repeated code - (2011-01-04)
  [2973] Learning to program - where to start if you have never programmed before - (2010-09-28)
  [2898] Programming Standards from the start! - (2010-08-02)
  [2505] I almost put the bins out this morning - (2009-11-16)
  [2504] Learning to program in ... - (2009-11-15)
  [2326] Learn a new programming language this summer. - (2009-08-06)
  [2294] Can you learn to program in 4 days? - (2009-07-16)
  [2286] New to programming? It is natural (but needless) for you to be nervous - (2009-07-14)
  [2092] Tracking difficult bugs, the programmer / customer relationship - (2009-03-20)
  [2048] Learning to program in PHP, Python, Java or Lua ... - (2009-02-19)
  [2001] I have not programmed before, and need to learn - (2009-01-19)
  [1985] Learning to program as a part of your job - (2009-01-10)
  [1963] Best source to learn Java (or Perl or PHP or Python) - (2008-12-28)
  [1605] Learning and understanding scripting programming techniques - (2008-04-08)
  [116] The next generation of programmer - (2004-11-13)

Q101 - Object Orientation and General technical topics - Programming Principles
  [4206] Writing the perfect program in Tcl? - (2013-11-13)
  [4153] Rooms available tonight - how to code an algorithm from first principles - (2013-08-19)
  [4118] We not only teach PHP and Python - we teach good PHP and Python Practice! - (2013-06-18)
  [4090] Test Driven Development in Python - Customer Comes First - (2013-05-16)
  [4061] Seamless, integrated IT - we have a long way to go! - (2013-04-11)
  [4003] Web and console - same principle, same code - Ruby example - (2013-02-14)
  [3954] Lesson 1 in programing - write clean, reuseable and maintainable tidy code - (2012-12-16)
  [3928] Storing your intermediate data - what format should you you choose? - (2012-11-20)
  [3878] From Structured to Object Oriented Programming. - (2012-10-02)
  [3673] Object oriented or structured - a comparison in Python. Also writing clean regular expressions - (2012-03-26)
  [3548] Dark mornings, dog update, and Python and Lua courses before Christmas - (2011-12-10)
  [3542] What order are operations performed in, in a Perl expression? - (2011-12-07)
  [3456] Stepping stones - early coding, and writing re-usable code quickly - (2011-09-24)
  [3026] Coding efficiency - do not repeat yourself! - (2010-11-02)
  [2964] An introduction to file handling in programs - buffering, standard in and out, and file handles - (2010-09-21)
  [2915] Looking up a value by key - associative arrays / Hashes / Dictionaries - (2010-08-11)
  [2878] Program for reliability and efficiency - do not duplicate, but rather share and re-use - (2010-07-19)
  [2769] Easy - but for whom? - (2010-05-18)
  [2737] Improving your function calls (APIs) - General and PHP - (2010-04-24)
  [2586] And and Or illustrated by locks - (2010-01-17)
  [2550] Do not copy and paste code - there are much better ways - (2009-12-26)
  [2510] The music of the stock market - (2009-11-22)
  [2415] Variable names like i and j - why? - (2009-09-22)
  [2327] Planning! - (2009-08-08)
  [2310] Learning to write high quality code in Lua - (2009-07-30)
  [2228] Where do I start when writing a program? - (2009-06-11)
  [2022] Pre and post increment - the ++ operator - (2009-02-03)

Y102 - Python - Fundamentals
  [3917] BODMAS - the order a computer evaluates arithmetic expressions - (2012-11-09)
  [3886] Formatting output - why we need to, and first Python example - (2012-10-09)
  [3278] Do I need to initialise variables - programming in C, C++, Perl, PHP, Python, Ruby or Java. - (2011-05-05)
  [3181] Beware - a=a+b and a+=b are different - Python - (2011-02-23)
  [3083] Python - fresh examples from recent courses - (2010-12-11)
  [2778] Learning to program in Python 2 ... and / or in Python 3 - (2010-05-24)
  [2442] Variable storage - Perl, Tcl and Python compared - (2009-10-08)
  [2368] Python - fresh examples of all the fundamentals - (2009-08-20)
  [1878] Pascals Triangle in Python and Java - (2008-11-10)
  [1461] Python - input v raw input - (2007-12-06)
  [1448] Question on division (Java) - Also Perl, PHP, Python ... - (2007-11-28)
  [1430] Integer v float - Python - (2007-11-12)
  [956] Python security - trouble with input - (2006-11-30)
  [748] Getting rid of variables after you have finished with them - (2006-06-06)
  [633] Copying a reference, or cloning - (2006-03-05)
  [328] Making programs easy for any user to start - (2005-05-29)


Back to
Provide a useable train service, and people will use it!
Previous and next
or
Horse's mouth home
Forward to
Melksham Training Centre and Hotel internet speed - how does it compare?
Some other Articles
Football league tables - under old and new point system. Python program.
Learning more about our web site - and learning how to learn about yours
Changes to morning routines
Melksham Training Centre and Hotel internet speed - how does it compare?
Some terms used in programming (Biased towards Python)
Provide a useable train service, and people will use it!
Well House Manor - perhaps the best hotel rooms in Melksham
Using Perl to generate multiple reports from a HUGE file, efficiently
The difference between dot (a.k.a. full stop, period) and comma in Perl
4279 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86 at 50 posts per page


This is a page archived from The Horse's Mouth at http://www.wellho.net/horse/ - the diary and writings of Graham Ellis. Every attempt was made to provide current information at the time the page was written, but things do move forward in our business - new software releases, price changes, new techniques. Please check back via our main site for current courses, prices, versions, etc - any mention of a price in "The Horse's Mouth" cannot be taken as an offer to supply at that price.

Link to Ezine home page (for reading).
Link to Blogging home page (to add comments).

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2014: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 899360 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.net/mouth/3551_Som ... thon-.html • PAGE BUILT: Sun Mar 30 15:20:58 2014 • BUILD SYSTEM: WomanWithCat