Sei sulla pagina 1di 13

Learning to Program with C#

Quintin Cutts
Department of Computing Science
University of Glasgow

Learning to Program 1
In this unit…
• What is programming?
• Fundamental skills for programming
• Learning process to develop these skills
• How is this course structured to enable
you to learn to program…

Learning to Program 2
Designer Artist

Engineer Writer

Investigator
• Which do you think is the most similar
to a computer programmer?

Learning to Program 3
What does a programmer do?
• Crafts/designs/writes/engineers a model
of some aspect of the real world…
– solving a problem
– simulating an activity
– assisting us to complete some task

• Must understand the aspect thoroughly


– must be able to investigate/analyse it
Learning to Program 4
Model – Description of the world
• Points to consider
– Accuracy of models
– Purpose of models
– Building materials for models

• Consider following examples


– building toy boats etc
– master ship-builders models
– weather forecasting

Learning to Program 5
Models in programming…
• Accuracy
– defined by the particular problem to be
solved – no need to be more accurate than
required
• Purpose
– stated in the problem specification
– defines a mini-world
• Building materials…

Learning to Program 6
Building Materials for programs
• The set of concepts that can be
described with a programming language

• In essence, a PL supports description of


– the components of the real world scenario
– the actions/activities/processes that take
place between those components
• Most PLs work in the same general way
Learning to Program 7
Examples
• Banking system
– Components for accounts and for ATMs
– Actions to update/query account balances, set
overdraft levels, display info on ATM
• Word processor
– Components to represent the text
– Actions to add, to delete characters from the
text store, to update the display
Learning to Program 8
Two Skills Required to Program
• Deciding what components and activities are required
– Investigator, Designer, Engineer, Artist

• Developing descriptions of these using the


programming language
– Writer, Artist, Engineer

• All backed up by fundamental concepts in the


programming language

Learning to Program 9
A Framework for Learning
• Programming is a doing activity…
– Cannot be read about in books
• although fundamental concepts can
– Skills must be developed by practising on
real examples
• Separate environments
– Investigation/design environment
– Writing/testing environment
• Learning can/should take place both
away from and in front of computers
Learning to Program 10
Course Resources
• This series of lecture slides
– Introduces concepts
– Demonstrates the skills
• Written description of the content
– To be used alongside the lectures
• Series of study packs
– One for course unit
– Attempt these as soon as possible after the lecture
to reinforce knowledge and practise skills

Learning to Program 11
“Why hasn’t C# been
mentioned”
• Programming skills are relatively
independent of language
– We could use one of a number of languages
– C# is a sound choice for a first language and
has the benefit of upcoming popularity

• Your next language will be very much


easier to learn

Learning to Program 12
Summary
• Many qualities required in a programmer
• Programming involves model building
• Programming language fundamentals define what
models can be built
– Remember components and actions
• Two fundamental skills
– Deciding on the components and actions
– Describing them using the PL
• Proficiency in programming requires continual practice
– and so here is the first study pack…

Learning to Program 13

Potrebbero piacerti anche