C Sharp Course

A blog for the C Sharp course at the University of Hull

Wednesday, September 22, 2004

The Blogs Don't Work

I'm afraid that blogging a programming course just doesn't seem to work very well. It is proving hard to incorporate the listings and the structure is all wrong. So I'm trying something else instead. Let me know what you think.

Tuesday, September 21, 2004

Lecture 02 Intro - Program Construction Essentials

We have seen how a C# program can be made to do useful things like add two numbers together and get the result right some of the time. In this session we are going to look at the essential C# constructions which are used to create a program which can process data. The programs that we are considering at the moment work as follows:
  1. Start
  2. Read in some data
  3. Do something with it.
  4. Display a result
  5. Stop

This is essentially how all programs work (except that they may not stop; instead they return to step 2 after step 4).

In terms of C# this means that we have to know:

  • how the program can be made to perform particular operations in sequence
  • how the operations are expressed
  • how the program can store information that it is going to work on
  • how the program can make decisions based on the information it is given
  • how the program can display output to the user

These things will be covered in the lecture today.

Monday, September 20, 2004

Tutorial 01 - Decisions Decisions

Today we had our first tutorial sessions. You can find out what they were about here. For those of you on the course there is a simple tutorial session on the class server for you to work through. The practical work (which will be based on the tutorial) will be going live on Wednesday of this week. Oh, and if anyone is not on the class, but would like to take part in the course, send an email here and I'll see what I can do.

Friday, September 17, 2004

Practical 01 - Getting a C# Program To Run

Today is our first proper practical. Do not be afraid. If you can read this you are already half way there. The classroom server can be found here. An html version of the lab can be found here. The login is your email address and your student number. As an example: - with an email address of: F.Bloggs@2004.hull.ac.uk - and a student number of: 200402232 Your username would be F.Bloggs and your password would be 200402232. If you try this and it doesn't work, please send me an email at systems@csharpcourse.com with your email address and student number and I'll add you manually. Note that your student number is the one that you got when you registered. It usually starts with the year that you arrived in Hull, i.e. for most of you 2004. Note that it is not your UCAS number. Please change your classroom password (you can do this with the change password link underneath your username on the login page). This password is separate from the other passwords that you use.

Thursday, September 16, 2004

Lecture 01 Notes - The Science of the Happy Ending

The first lecture has come and gone. After some housekeeping we moved on to consider programming. I regard it as: The Science of the Happy Ending A project should end with you, the programmer, walking away with a wad of cash which is fair reward for effort and the customer with a system that does what they want. To this end the program itself is just a small part of the job that you need to do. You must also do things like:
  • Make sure the customer is prepared (and able) to pay you a good rate for the job.
  • Make sure that you understand what the problem is (sometimes the customer doesn't even know this one).
  • Make sure that you don't do more work than you need. And you get paid for what you do.
  • Make sure that you deliver a product which does the job, can be proved to do the job, and can be maintained over time.

Learning C# is not going to answer all the above points, but it does make a good tool to do the program part. I'm sorry if it seems I'm taking an unduly "product centered" view of the art of programming. But I find that this helps a lot when considering what you should be doing. This part of the course will concentrate on the programming part of the effort. Other parts will worry about specification, testing and the other issues. But you should always keep a clear view of that mythical "happy ending" in whatever you do.

In terms of the business of programming itself, it is worth considering a few terms:

metadata - data about data. Saying "we store the age" is one thing. Saying "we store the age as an integer in years with a low limit of 0 years and an upper limit of 120 years" is much more sensible. The long bit is the data about the data. Or metadata.

abstraction - stepping back from the problem. Before you worry about precisely how the "customer" item will work internally you need to consider just what the customer item will be called upon to do. You can say things like "the customer has an address" and then later you go back and fill in the detail. You need to practice abstraction. Write a program to keep track of a dress shop (and we might do this) and you might think that your starting point is "Dress". It is not. It is "StockItem". If our dress shop starts selling handbags we need a way to handle these later. If we start at the level of dress we are heading for trouble. Start with StockItem and every thing that we want to sell can be handled like this.

program - a sequence of steps which tells something how to do something. This is one way of viewing programming. There are others. We are using this view because we have found it the easiest for people to learn. With this in mind consider:

  • shopping list
  • address book
  • chocolate cake recipe
  • CD track list
  • club member list

One of these is a program. One of these might be a program. The recipe is the obvious one. It is a sequence of steps. The others are simply collections. Except that when I go shopping I get instructions like "..if you can't get self raising flour then get plain. But then you have to buy some baking powder..." which sound like instructions to me.

Lecture 01 Intro

In the first lecture we are going to discuss issues around what programmers actually do. Then we are going to look at how we might best go about these things. These issues have little to do with computers as such, but more to do with the nature of problems and human behaviour. If all this sounds a bit vague and meaningless, then never mind. We will also cover issues of abstraction and metadata. So it really sounds like fun. There are links to classroom server for the labs here. You will need these for your first practical session tomorrow.

Monday, September 13, 2004

Welcome

This is the blog of the C sharp programming course at the University of Hull. It forms part of the module 08101 Programming I. I'm going to use the blog as a medium to inform Hull University students who are lucky enough to end up on this course of the content of each lecture. I will also be publishing downloads and notes along the way so if you want to follow the course you are welcome to. This is kind of experimental - I'm not sure how it is going to turn out. Feel free to post constructive comments about the content. If you are learning to program and you want to start your own blog specifically about how you are getting on, then I reckon this might be a very good idea. If you want to become part of a worldwide community of people who are into this stuff, take a look at the spoke.