01.Blogs :
RobMiles  
Programming, gadgets and life as a lecturer in a UK university.

Busy Days are Best. And teaching is sometimes strange.

I don't know about you, dear reader, but I like busy days. Today I've given a couple of lectures and written a whole bunch of stuff for the C sharp course. The lectures were fun, although trying to make bound and constrained properties interesting to the third years and static members interesting to the first years was quite hard work. I was talking to someone who was worried that presenting the same material year on year was boring. As if. Every year I end up finding a new and different way to put the stuff over. This time the subject matter for the constrained properties took a bizzare turn when we ended up considering who would have to be informed if my age changed. And whether age is ever allowed to change by more than one year. And then I got into a fluster with the first year when thinking of ways to remember what members of a class should be made static:

"The word interest has an s and a t in it, and so it should be static, 'cos static as an s and a t in it. But instance has an s and a t in it too, and also an i and an n, so that doesn't work. So think of the interest on a bank statement that you can rub on your sleeve and then stick on the ceiling with static. No, that doesn't work either because the bank statement has a balance on it too....."

The bottom line, if anyone is still reading this, is that members of a class which are held for the entire class, like for example the interest rate charged on all the bank accounts in my bank, should be made static. But things which are held for each account, like the balance of an account, should be made instance members. I wonder what I'll do next year.....

posted on Monday, January 24, 2005 9:17 PM by RobMiles

# @ Tuesday, January 25, 2005 12:30 AM

It's probably best to think of 'static' like a poster stuck to the wall. Anyone can see it, there's only one, and it contains useful information that anyone might want to use. You can even change it to another poster or notice, but everyone will be affected. And no matter what happens inside the room, it will always be there, a useful reference or guide...

Pandilex

# @ Tuesday, January 25, 2005 4:51 PM

Im a second year and i was in the lecture about constrained properties. I understand them quite well but thats mainly because i had to do the lab at 9:15 and we only had the lecture on them at 2:15, so i had kinda tought myself. You did however clarify a few points.

adam150785

# @ Tuesday, January 25, 2005 9:19 PM

Good grief! What the heck are you talking about?

epiNole

# @ Tuesday, February 01, 2005 11:28 AM

Er, OK. Sorry epiNole. Bottom line. In a program some things about an item need to be held once (like the biggest overdraft a bank account is allowed). Others are held individually (like how much is in your particular bank account). In programming terms, the held once items are called "static". It is a stupid name (most students start off thinking that a static value can't be changed) but we have to work with it.

RobMiles


 
03.UPDATE CALENDAR :
<January 2005>
SunMonTueWedThuFriSat
2627282930311
2345678
9101112131415
16171819202122
23242526272829
303112345

05.MY LINKS :

07.Subscriptions :

Subscriptions


© Copyright 2005 Microsoft Corporation. All Rights Reserved.
Terms of Use | Privacy Statement | Code of Conduct | Hosted by MaximumASP for Microsoft
WHO-BAR