I met a dairy farmer at a recent dinner party who keeps his herd of fifty cows the old-fashioned way in a byre.

He lets them out to fields during the day in winter for exercise and keeps them in the byre at night, while in the summer months they are out-of-doors grazing day and night between milking.

When they return to the byre for milking, they are tied by neck chains in numbered stalls and fed their rations in fireclay troughs. Cows soon learn to go into their own stall and wait for the dairyman to tie the chain round their neck, and as a result end up being identified by the number above their stall.

It was fairly common to hear phrases like "number twenty-four is the daughter of old forty-eight".

Keeping cows in byres is a system based on hard, physical work that most have abandoned in favour of modern "loose housing" systems where cows wander freely from individual cubicles where they can lie down and rest, to the feed passage where they eat. When it is time for them to be milked they patiently queue to enter the milking parlour in batches.

Milking cows in a byre involves connecting the hose from the milking cluster to a vacuum pipe running above the stalls, and when both cows in that stall have been milked, moving it on to the next pair of cows.

Feeding cows in a byre involves carrying concentrated feed in a bucket from a barrow to the trough at the front of the stall, followed by their ration of hay.

Perhaps the most unattractive chore of keeping cows in a byre is the drudgery of mucking it out twice a day by shovelling the dung in the "grip" at the back of the cows into a wheelbarrow.

Then it had to be wheeled up planks in the midden, that were often slippery and could lead to a very messy and smelly accident for the unwary. More progressive byre systems were fitted with mechanical "round-the-byre" scrapers that scraped the muck to the midden.

My dinner companion said he didn't mind the extra work, adding that he could give his cows the individual care and attention lacking in larger, loose-housed herds. I didn't disagree with him, as he obviously liked what he did, but it is fair to say that modern systems offer just as much individual care and attention - it's all down to stockmanship aided by electronics.

Most modern dairy systems use transponders attached to the necks of cows that relay valuable information through a "reader" to a central computer.

For instance the transponder identifies the cow so that yields can be recorded and the correct level of concentrated feed dispensed to her when she is in the parlour being milked. Transponders also record unusual movement so that sick cows, or those coming into heat can be identified.

Perhaps the biggest advantage of loose-housing systems is that they allow very sophisticated rations to be dispensed mechanically as total-mixed-rations (TMRs).

In conjunction with improved genetics, modern dairy nutrition has been one of the main reasons milk yields have increased so dramatically. TMRs are highly sophisticated, appetising blends of different types of silage, straw, grains and protein sources that are fed ad lib in the feed passage.

Cows are encouraged to eat more by keeping the TMR fresh and regularly pushing it in front of the cows.

Compare that to the old-fashioned diets based on hay that was often mouldy as a result of our wet summers. To make the winter rations more appetising, that hay was supplemented with chopped swedes, or neeps as we call them, kale or succulent brewers draff (the mash left after brewing or distilling). Needless to say, all those feeds involved a fair amount of work.

My dinner companion certainly looked fit and well on his regime of hard work, and he may well be better placed to survive the current downturn in the fortunes of dairy farmers.

He may not have the output of a large modern dairy herd, but then he won't be saddled with the debts that others have incurred with what may prove to have been over-ambitious expansion.

Quite often the first casualties in a market downturn are those that have over-borrowed, and there are a few of them in Scotland just now.

I bet my cheery looking companion on the other side of that dinner table sleeps well at night.