Home Accessibility Courses Twitter The Mouth Facebook Resources Site Map About Us Contact
20.9.2014 - We have just updated our course layouts and descriptions and added our 2015 schedule.

Well House Consultants
You are on the site of Well House Consultants who provide Open Source Training Courses and business hotel accommodation. You are welcome to browse and use our resources subject to our copyright statement and to add in links from your pages to ours.
Other subject areas - resources
Java Resources
Well House Manor Resources
Perl Resources
Python Resources
PHP Resources
Object Orientation and General topics
MySQL Resources
Linux / LAMP / Tomcat Resources
Well House Consultants Resources
Extras Resources
C and C++ Resources
Ruby Resources
Tcl/Tk Resources
Web and Intranet Resources
Python module Y116
Applying OO design techniques and best practise
Exercises, examples and other material relating to training module Y116. This topic is presented on public courses Learning to program in Python, Python Programming, Intermediate Python

By this point on your course, you will have learned about the principles of OO, and Object design, and also the features of the Python OO scripting language. This module pulls the two threads together in order to show you the practical application of the theory.
Related technical and longer articles
What makes a good variable name?

Articles and tips on this subjectupdated
4118We not only teach PHP and Python - we teach good PHP and Python Practice!
This week, I'm running a private PHP course in North London, and a private Python course in Bristol ... and it's confirmed and re-confirmed the need for programming standards to be included from the beginning just as much as the mechanisms of the language. I'm not only teaching people how to write ...
4028Really Simple Class and Inheritance example in Python
It's so tempting when writing a simple training example to get excited and add lots of features - so that you then end up with an example that's anything but a simple training example! Here's an example - just about my shortest and simplest ever - that shows a base class, a subclass, inheritance, polymorphism, ...
3887Inheritance, Composition and Associated objects - when to use which - Python example
• Inheritance is where one object is based on another. • Composition is where one object contains another. Question: Which should I use? Answer: Probably BOTH! On yesterday's Python course, the question came up, and I wrote an illustrative answer - source code [here]. The scenario we ...
2604Tips for writing a test program (Ruby / Python / Java)
Where does my test code go? If you've written a class - a series of methods to be used within another application - how do you test it? How about writing a test program within the same file which runs as the main program if you run your class on its own from the command line, but is ignored if you ...
2523Plan your application before you start
Planning your project / application ahead of time can save you so much heartache and wasted time that it's untrue - but there is still a tendency for people to jump right into to coding without thinking "how will this work". And you should think "How will this work" in many ways. These seven diagram ...
2485How do I set up a constant in Python?
You may think of values like pi being a constant, but in Python they're really just another object that's defined in the namespace of the module from which they're loaded! So ... >>> import math >>> math.pi 3.1415926535897931 >>> math.pi *= 4 >>> math.pi 12.566370614359172 You are fully entitled to ...
2407Testing code in Python - doctest, unittest and others
The doctest and unittest modules of Python allow you to provide test harnesses for your classes / packages. Designing applications from the bottom up, you'll want to ensure that each of your code levels works and works well. You'll want to provide an example of what it should do for the next level ...
2363Alpaca Case or Camel Case
A very first practical program on our Learning to Program in Python course that started today. Even at this early stage, we teach things like good practise in variable naming - standards such as using a consistent case (e.g. camel case where each intermediate words starts with a capital). I was looking ...
1181Good Programming practise - where to initialise variables
It's a good idea to initialise your variables directly before you use them for the first time if you're going to use them as accumulators. By accumulator I mean that you're going to write assignments such as:   $n += 4; # Perl   incr notepad; # Tcl   lappend flcodes [lindex ...
945Code quality counts
We're celebrating Geekmas this weekend ... and we've got a full place. Plus others who are coming in for the day. Really good session yesterday on the good DESIGN of an interactive (scripted) web site that "mines" user information to give a tailored presentation, and a great intro by Paddy to Python's ...
836Build on what you already have with OO
If I start recalling a "Goons" sketch, then I'll show my age .... but never mind. It was a RERUN that I saw ;-) Spike Milligan is counting votes at an election. "Two thousand, six hundred and forty two". "Two thousand, six hundred and forty three". "Two thousand, six hundred and forty four" ... "Would ...
668Python - block insets help with documentation
For many programmers, documenting their code is a chore, yet every piece of code that's going to be (re)used needs both instructions for the user, and adequate explanation of techniques for the code maintainer. The need for BOTH of these forms of support documentation is often overlooked by the newcomer, ...
Examples from our training material
constant.py   Constants in Python
ddd.py   Good practise tips and documentation string
novel   Traffic survey - Python and Objects
sob   Data for novel and story examples
story   Traffic survey - Python without Objects
t6   inherited and associated / composite objects
t7   completion of example t6 - add factory, comparator, etc
Background information
This module is available under an Open Training Notes License for free download from http://www.training-notes.co.uk.
Topics covered in this module
Review of OO design techniques.
Review of OO facilities in Python.
Naming conventions in Python.
How to arrange your classes, modules and packages.
Documentation and code control.
Complete learning
If you are looking for a complete course and not just a information on a single subject, visit our Listing and schedule page.

Well House Consultants specialise in training courses in Python, Perl, PHP, and MySQL. We run Private Courses throughout the UK (and beyond for longer courses), and Public Courses at our training centre in Melksham, Wiltshire, England. It's surprisingly cost effective to come on our public courses - even if you live in a different country or continent to us.

We have a technical library of over 700 books on the subjects on which we teach. These books are available for reference at our training centre. Also available is the Opentalk Forum for discussion of technical questions.

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/resources/Y116.html • PAGE BUILT: Thu Sep 18 11:03:17 2014 • BUILD SYSTEM: WomanWithCat