Home Accessibility Courses Twitter The Mouth Facebook Resources Site Map About Us Contact
 
Python, Lua, Tcl, C and C++ training - public course schedule [here]
Private courses on your site - see [here]
Please ask about maintenance training for Perl, PHP, Java, Ruby, MySQL and Linux / Tomcat systems
 
Learning to program - what are algorithms and design patterns?

There are common themes for how programming statements are put together to give complete section of code to perform combined tasks. And typically these are putting together building blocks in a similar way to we would do things if we were working something out by hand.

Looking for the maximum value in a column of numbers, for example, we would start off by guessing that the first number was the maximum, and then we would check against each of the following numbers to see if it was greater, updating our guess if it was. Come the end of the reading down the column, the final value is no longer just a guess, it really is the maximum.

Such standard application of coding is known as the application of algorithms or design patterns - that latter term especially applicable to what we'll describe to you later on the course as Object Oriented Programming

All the languages that we teach have at least some algorithms and / or design patterns built into the language, as standard pieces of code in the library that we've referred to earlier in this module. In some languages, such as Lua and Tcl the standard libraries are quite small, and on the course we'll be showing you how to code certain algorithms yourself. In others such as PHP, we have a standing joke around the class that says "there's a function to do that" ... and indeed a huge array of common functions are available to you which you can call up in a single line to run a particular algorithm against some of your variables, passing back a result into another variable. Java, Python, Perl and Ruby - and some of the other languages - have a large number of algorithms available to you, included in the language distribution (as so present on your computer's disc / file system) but only loaded in to memory at run time, typically on your request through a program statement asking for them to be loaded. And resources are available in virtually every language on teh web to provide shared algorithms which, whilst to commonly enough needed to included in the distribuiton, are never the less worth sharing.

(written 2014-11-22)

 
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
  [4575] Learning not just what a program does, but how to design it in the first place. - (2015-11-06)
  [4337] Learning to program sample program - past its prime, but still useful - (2014-12-02)
  [4326] Learning to program - comments, documentation and test code - (2014-11-22)
  [4324] Learning to program - variables and constants - (2014-11-22)
  [4323] Learning to program - Loop statements such as while - (2014-11-22)
  [4322] Learning to Program - the conditional statement (if) - (2014-11-21)
  [4318] Learning to Program - how we start to teach you at Well House Consultants - (2014-11-16)
  [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)
  [3551] Some terms used in programming (Biased towards Python) - (2011-12-12)
  [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)

Q908 - Object Orientation and General technical topics - Object Orientation: Design Patterns
  [4673] Separating detailed data code from the main application - Ruby example - (2016-05-16)
  [4663] Easy data to object mapping (csv and Python) - (2016-03-24)
  [4626] Singleton design pattern - examples and uses - (2016-01-20)
  [4581] Thin application, thick objects - keep you main code simple. Example in Ruby - (2015-11-21)
  [4421] How healthy are the stars of stage and screen? - (2015-02-09)
  [4396] Java Utility class - flexible replacement for array. Also cacheing in objects and multiple catch clauses example. - (2015-01-16)
  [4377] Designing a base class and subclasses, and their extension, in C++ - (2015-01-01)
  [4359] How to avoid too many recalculations within an object - (2014-12-21)
  [4356] Object factories in C++, Python, PHP and Perl - (2014-12-19)
  [4330] Java - factory method, encapsulation, hashmap example - (2014-11-27)
  [4098] Using object orientation for non-physical objects - (2013-05-22)
  [4096] Perl design patterns example - (2013-05-20)
  [4021] Spike solution, refactored and reusable, Python - Example - (2013-02-28)
  [3843] Caching Design Patterns - (2012-08-20)
  [3810] Reading files, and using factories to create vectors of objects from the data in C++ - (2012-07-21)
  [3716] Learning C++ - a design pattern for your first class - (2012-05-02)
  [3608] Design Patterns - what are they? Why use them? - (2012-02-12)
  [2977] What is a factory method and why use one? - Example in Ruby - (2010-09-30)
  [2741] What is a factory? - (2010-04-26)
  [2322] Looking for a practical standards course - (2009-08-05)
  [1224] Object Relation Mapping (ORM) - (2007-06-09)
  [485] North, Norther and Northest - PHP 5 Objects - (2005-11-04)

Q110 - Object Orientation and General technical topics - Programming Algorithms
  [4707] Some gems from an introduction to Python - (2016-10-29)
  [4656] Identifying the first and last records in a sequence - (2016-02-26)
  [4652] Testing new algorithms in PHP - (2016-02-20)
  [4410] A good example of recursion - a real use in Python - (2015-02-01)
  [4402] Finding sum, minimum, maximum and average in Python (and Ruby) - (2015-01-19)
  [4401] Selecting RECENT and POPULAR news and trends for your web site users - (2015-01-19)
  [3662] Finding all the unique lines in a file, using Python or Perl - (2012-03-20)
  [3620] Finding the total, average, minimum and maximum in a program - (2012-02-22)
  [3451] Why would you want to use a Perl hash? - (2011-09-20)
  [3102] AND and OR operators - what is the difference between logical and bitwise varieties? - (2010-12-24)
  [3093] How many toilet rolls - hotel inventory and useage - (2010-12-18)
  [3072] Finding elements common to many lists / arrays - (2010-11-26)
  [3042] Least Common Ancestor - what is it, and a Least Common Ancestor algorithm implemented in Perl - (2010-11-11)
  [2993] Arrays v Lists - what is the difference, why use one or the other - (2010-10-10)
  [2951] Lots of way of converting 3 letter month abbreviations to numbers - (2010-09-10)
  [2894] Sorting people by their names - (2010-07-29)
  [2617] Comparing floating point numbers - a word of caution and a solution - (2010-02-01)
  [2586] And and Or illustrated by locks - (2010-01-17)
  [2509] A life lesson from the accuracy of numbers in Excel and Lua - (2009-11-21)
  [2259] Grouping rows for a summary report - MySQL and PHP - (2009-06-27)
  [2189] Matching disparate referencing systems (MediaWiki, PHP, also Tcl) - (2009-05-19)
  [1949] Nuclear Physics comes to our web site - (2008-12-17)
  [1840] Validating Credit Card Numbers - (2008-10-14)
  [1391] Ordnance Survey Grid Reference to Latitude / Longitude - (2007-10-14)
  [1187] Updating a page strictly every minute (PHP, Perl) - (2007-05-14)
  [1157] Speed Networking - a great evening and how we arranged it - (2007-04-21)
  [642] How similar are two words - (2006-03-11)
  [227] Bellringing and Programming and Objects and Perl - (2005-02-25)
  [202] Searching for numbers - (2005-02-04)

Q101 - Object Orientation and General technical topics - Programming Principles
  [4645] What are callbacks? Why use them? An example in Python - (2016-02-11)
  [4632] Remember to ask the question before you listen for the answer - (2016-01-26)
  [4611] Hungarian, Camel, Snake and Kebab - variable naming conventions - (2016-01-03)
  [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)
  [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)


Back to
Learning to program - variables and constants
Previous and next
or
Horse's mouth home
Forward to
Learning to program - comments, documentation and test code
Some other Articles
Does Santa Claus need a CRB check?
Folk music train, Westbury to Swindon round trip, 14th December 2014
Good, stable, reliable local businesses
Learning to program - what are algorithms and design patterns?
Are administration / review charges on hotel guests acceptable?
An example of Model-View-Controller techniques in a Perl / CGI script
4755 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, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96 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., 2017: 404 The Spa • Melksham, Wiltshire • United Kingdom • SN12 6QL
PH: 01144 1225 708225 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.net/mouth/4325_Lea ... erns-.html • PAGE BUILT: Sat May 27 16:49:10 2017 • BUILD SYSTEM: WomanWithCat