Experiential learning in a food course

Some courses are easier to translate to an experiential learning platform. In a class I am teaching on the history of food, from Palaeolithic times to now, I first wanted to incorporate the idea of recreating recipes from various time periods on campus. It would have been fun, and extremely educational to have students recreate foods from old recipes. Of course these high hopes were dashed pretty quickly when people outside the scope said there were no facilities – and by that they really mean “it’s not safe”, for various reasons. I do understand the concern for safety, but schools in general have been far too conscious of safety at the expense of learning. So scratch that. What can be done however is tasting. People eat, and if people are allowed to voluntarily taste or smell foods from different time periods or cultural epochs, there is nothing wrong with that. Of course, given the classroom setting, this too has its limitations, obviously hot food is out. But food like baked goods, and “processed” food like cheese have no problems.

Comparison of products can help highlight both cultural and regional differences. This has been done successfully by Willa Zhen who teaches a course, China: Food and Cultures, at the Culinary Institute of America¹. An easy food to do this with is cheese. Cheese arguably has quite a long history, and today is produced all over the world. Incorporating a cheese tasting allows a series of questions to be discussed:

  • Where is the cheese produced? Country has an impact, but also the culture of the country. Is there a focus on soft fresh cheeses, or harder cheeses that can be preserved for longer?
  • How do geography and environment impact the cheese? Cows which graze on alpine herbs will produce milk which is markedly different from those who graze in lowlands, or those whose feed is supplemented with fodder. For example Beemster Graskaas is a seasonal cheese produced only in the summer season, when cows are fed on young spring grass.
  • Describe the colour, texture, taste, smell.
  • How is the cheese produced, e.g. artisanal or industrial?
  • Why is cheese dominant in certain cultures?
  • How does culture affect the types of cheese produced? The Greeks like brined Feta cheese, the Icelanders like Skyr.

The same can be done with other food products and ingredients: chocolate, bread, fruit (apples are good, or tropical fruit), indigenous products, or even spices. It does require some trial-and-error on the part of the instructor, and the ability to find recipes for food that can be explored in a classroom setting. Some food epochs, such as Paleolithic are especially problematic (raw meat, nuts and berries anyone?) In this case we looked at the modern Paleo diet (and its limitations), and explored various “paleo” products on the market.

¹Zhen, W., “Tasting soy sauce, teaching culture”, Education About Asia, 22(2), pp.58-60 (2017)

Understanding history via experiential learning

I’m not a historian by profession, but my work does involve the history of computer science, so I am a historian of sorts. I am also interested in the history of woodworking, especially tools, and the history of food (and kitchen tools). What I do know is that history is interesting to me because of the ability to investigate things. It’s possible to recreate artifacts from history, reenact events in history, or visit places where historical events took place. Many things can be learned from viewing the historical record.

Experiential learning of course is the difference between a course that is purely academic, and one where students can experience things. For example, a history course that is based purely on literature relating to “The Castles of Great Britain“, versus one where students can experience visiting real castles, and exploring why they were built the way they were. This is field based experiential learning (FBEL). Of course there are some caveats to this model of learning. Foremost is cost. You can’t really take a class of 20, or 40, or 80 students to the Britain to tour castles. It is prohibitively expensive. One solution could be for the instructor to visit a series of castles, video them in 4K, and use this to explore things in more detail – not the same type of experiential learning, but everything has its intrinsic limits. This is classroom based experiential learning (CBEL). I can’t say I’m the biggest fan of CBEL, largely because it doesn’t move far enough away from the traditional lecture-based model of teaching. In some respects there are more hands-on activities at the elementary, or even the secondary school level.

There are many historical sites that offer exceptional learning experiences. Some of these are geared towards visual experiences, while others are more interactive. Sites like the Scottish Crannog Centre, which we visited this past summer provide a cohesive experience of what it would be like to live in a loch dwelling, 2500 years ago. The problem with traditional learning environments is that some people question why they should take a course, when they can teach themselves using the extensive plethora of information available in todays world. And that’s an extremely valid point. Learning has to be more than reading papers, and talking about what has been read. Imagine taking it a step further, and actually living history? No, I don’t mean travelling back in time, but rather constructing history from the past. By constructing artifacts from history one obtains a better understanding of both the process, and the importance of the artifact. Maybe that’s why axe-making is so in vogue.

Can we provide all our students with a more interactive learning environment? Experiential learning could be building something, it could be writing an exploratory article on a particular topic, and by that I mean article, not essay. We need to move away from the traditional model of higher education and embrace experiential learning where it is most effective – the real world.

 

Fortran Re-engineering: Debt repayment schedule (iv)

In the final phase of the program, we will do some refactoring. The only refactoring to do here is to improve the readability of the program by modifying some of the variables. Here are the basics of the final step:

  • Re-indent the code and make madifications for spacing.
  • Add “implicit none” clause, and define missing variables.
  • Redefine variables that are not apparent.
  • Add comments.

The re-indenting just makes the program easier to read, removing the hard 7 column indenting of the legacy program. Adding “implicit none” forces the program to acknowledge all variables must be declared. In this program, some were declared, and others implicitly declared, which is not a good thing in modern programs. Finally, we redefine some of the variables to make them more meaningful. Examples are (i→iRate), (n→delay), (k→numP). We could also add some comments, so a reader of the program understands what is going on.

Here is what the program looks like, sans comments:

We can now run the program on the following test data, saved in the file test.dat, for easy testing:

0100000100050041978
0250000120100151978

The program can be tested using a file redirect of the form: ./a.out <test.dat

 

Fortran Re-engineering: Debt repayment schedule (iii)

Now that the program looks nicer, we will deal with the first of the legacy issues, the declaration of the variables. This is simple, as it just requires the addition of the ::. For example:

integer year, bdate
real i, int, intamt

becomes

integer :: year, bdate
real :: i, int, intamt

Next we will deal with the label based loop. Here is the code that forms the loop:

      do 15 j=1,k
      year=bdate+n+j
      int=cmpamt*i
      balrd=pmtamt-int
      cmpamt=cmpamt-balrd
 15   write(*,4) year,pmtamt,int,balrd,cmpamt
 4    format(5x,i4,6x,f8.0,3x,f8.0,5x,f8.0,6x,f8.0)

To deal with this we move to the newer spec for loops, i.e. do/end do. The loop above now becomes:

do j = 1,k
   year=bdate+n+j
   int=cmpamt*i
   balrd=pmtamt-int
   cmpamt=cmpamt-balrd
   write(*,4) year,pmtamt,int,balrd,cmpamt
   4 format(5x,i4,6x,f8.0,3x,f8.0,5x,f8.0,6x,f8.0)
end do

The label has been removed, and the loop properly terminated. Notice the label 4 associated with the format statement has been indented. There is no right or wrong way of doing this, doing it this way just makes it fall in line with the rest of the indented code.

The next unstructured jump to dispose of is that associated with label 10, which basically cycles through multiple debts in the input. It looks like this:

 10   read(*,1,end=50) amt,i,n,k,bdate
      ...
      ...
      goto 10

In the read statement, the clause end=50 implies that at the end of the input, jump to label 50, which in the case of this program, is the end of the program. The first thing to do is update this. In newer versions of Fortran, one can use the parameter iostat. For example the code above is modified to:

 10   read(*,1,iostat=reason) amt,i,n,k,bdate

The status of the I/O is then returned in the integer variable reason. If reason is less than 0, then the input has ended. A simple if statement following this will deal with exiting the program if this is the case.

if (reason < 0) then
   stop
end if

The structure of the program can now be modified to incorporate a global do/end do loop. This would look like this:

do 
   read(*,1,iostat=reason) amt,i,n,k,bdate
   if (reason < 0) then 
      stop 
   end if
   ...
   ...
   stop
end do

Basically the read statement deals with the input, returning a status in the variable reason. If reason is less than zero, the program terminates, otherwise the program processes the data.

All the unstructured jumps are now gone!

 

Fortran Re-engineering: Debt repayment schedule (ii)

The first step to re-engineering this program is to convert it to lowercase, because UPPERCASE is awful to work in. This can easily be done using the Unix utility tr:

tr '[:upper:]' '[:lower:]' < debt.for > debtREENG1.f95

Now try to compile this wont work, because there are three fundamental issues:

  1. The comment delimiters must be changed from “C” to “!”.
  2. The line continuation technique must be changed from digits in column 6 to the use of the & character at the end of the line to be continued.
  3. The addition of a program header.
  4. Modification of the first value in read and write statements to *, e.g. write(6,2) becomes write(*,2). These values originally related to specific hardware devices for I/O.

The program now looks a little different, but not that much really. Once you have made these changes, compile the program, and make sure the output is still the same.

program debtRepayment

!     debt repayment schedule
      integer year, bdate
      real i, int, intamt
 10   read(*,1,end=50) amt,i,n,k,bdate
 1    format(f7.0,f2.2,2i3,i4)
      write(*,2) bdate,amt,i,n
 2    format('1',18x,'repayment schedule'/5x,' loan date ', &
      'dec. 31, ',i4,5x,'amount borrowed ',f8.0,' interest rate ', &
      f4.2/5x,'repayment to begin after ',i3,' years'// &
      14x,'repayment',16x,'principal'/5x,'year',7x,'amount',4x, &
      'interest',5x,'reduction balance')
      cmpamt=amt*(1.+i)**n
      write(*,3) cmpamt
 3    format(53x,f8.0)
      pmtamt=cmpamt/(((1.+i)**k-1.)/(i*(1.+i)**k))
      do 15 j=1,k
      year=bdate+n+j
      int=cmpamt*i
      balrd=pmtamt-int
      cmpamt=cmpamt-balrd
 15   write(*,4) year,pmtamt,int,balrd,cmpamt
 4    format(5x,i4,6x,f8.0,3x,f8.0,5x,f8.0,6x,f8.0)
      intamt=pmtamt*float(k)-amt
      write(*,5) intamt
 5    format(/5x,'total interest charge ',f8.0)
      goto 10
 50   stop

end

The program could now loose its column-based formatting, but this is easier to do along the way, as labels are dispensed with. The only labels that likely won’t disappear are those related to the read/writeformat statements. In actuality these are only two labels of interest. The first is 10, relating to a global goto which can be replaced by a loop. The second is 15, which controls a loop. Removing those will be the next task.