Sutton 0-1 Grimsby

Sutton 0-1 Grimsby

Grim! A wicked night with persistent, drizzly rain throughout the second half. Sutton had few attempts on goal in the first half and none in the second half. Grimsby were lively, performing well above what their much lower league position would suggest. A grim performance and result from Sutton on a grim, Sutton night.

Games with the kids

Games with the kids

A 5 mile circular stroll with the little ones as well as our Berlin son began just outside Reigate, (near a couple of fine pubs) and took us through woods into the centre of the town. A fine walk on a dull day. On another day we’ll do it again but make use of one of the pubs.

Back home for a late lunch followed by a long session playing Monopoly Deal, a great card game for young and old. Congratulations to 8-year-old Chloe on her wins!

I’ve recently become a cribbage fan and I’ve got Chloe playing the 5-card version, whilst for us grown-ups the 6-card version is a better challenge. I’m doing pretty good playing random Internet opponents.

What with the pre-dinner pints with my son at one of our local pubs, it’s been a lovely few days with the family.

Sutton 2-0 Doncaster

Sutton 2-0 Doncaster

What a match! After 10 minutes I was convinced Sutton would get stuffed as they were made to look poor by the sharp passing of the visitors. It was goal-less at half-time and the visitors started the second half sharply. But minutes into the half Sutton scored and more or less wrapped up the game with a well taken breakaway with 5 minutes of normal time remaining. The applause from the home supporters was deafening. What a terrific game of football.

Sutton 2-1 Swindon

Sutton 2-1 Swindon

A poor first half for Sutton produced a goal for the visitors. An improved second half lead to two goals for Sutton, both scored in the last 5 minutes, resulting in an unexpected turnaround and result. The visitors felt that their goalkeeper had been fouled for Sutton’s first goal, but the ref disagreed. A bit of luck for Sutton, there!

It was good to be at an evening game again.

My next two long walks

My next two long walks

With the Solent Way out of the way it’s time to prepare another challenge. As with previous long walks I will do them in stages, using public transport wherever possible to get to/from the starting/end points. I try to keep stages to be between 8 and 12 miles.

The first walk will be from Salisbury to Winchester using the Clarendon Way (26 miles) followed by Winchester to Farnham using the St Swithun’s Way (34 miles).

I found the guides, below, to help me on my way:

The Clarendon Way

The Clarendon Way – 26 miles
(Salisbury to Winchester)

A 24 mile walk joining the two Wessex cities of Salisbury and Winchester. The Clarendon Way crosses the Test Valley between Kings Somborne and Houghton. It starts near the Avon at Salisbury Cathedral and ends beside the waters of the Itchen in the heart of Winchester.

Possible timings (3 stages)

Stage 1 (7 miles) Leave home (9:20) then 9:42 from station to CJ (10:07), then 10:27 to Salisbury (11:43) leaving 4 hours to do the walk and possibly visit the pub

Stage 2 (7+3 miles) Leave home (8:20) then 8:42 from station to CJ (9:07), then 9:27 to Salisbury (10:43)

Stage 3 (12 miles) Leave home (9:20) then 9:42 from station to CJ (10:07), then 10:27 to Basingstoke (11:06) then 11:11 to Winchester (11:26)

St Swithun’s Way

St Swithun’s Way – 34 miles
(Winchester to Farnham)

St Swithun’s Way runs between Winchester and Farnham. Unable to follow the original route, as much of this is now the A31, St Swithun’s Way follows some of the county’s best countryside paths. Starting at Winchester Cathedral, the route passes through the Itchen Valley. It then continues northeast passing the towns of Alresford and Alton, as well as Chawton, the home of Jane Austen. Following the path of the River Wey, the route reaches Farnham in Surrey and continues to Canterbury.

Sutton 0-0 Stevenage

Sutton 0-0 Stevenage

A fascinating and competitive first half and a subdued second half resulted in no goals. A useful point for Sutton but a disappointing result for promotion contenders Stevenage.

It was good to be at a game again.

My not-first Fortran code

Back in 2021, for a challenge, I taught myself part of the Python programming language and wrote a program based on the idea of a Fortran program I wrote decades ago. Now, for another challenge, I’ve written the same program – in Fortran! I had to dig out a free compiler from the Internet (Fortran 90). Things have developed and changed since I was a programmer and I have had to learn new things in the language. Back then I think I used Fortran 66 and Fortran 77.

It’s been fun coding in Fortran, again! For the record, I downloaded and used a free product Code::Blocks, which I’ve found to be successful. I also found this YouTube video to explain configuring of Code::Blocks for Fortran.

! ===================================================================
! Program REMINDER
! Decades ago I wrote a FORTRAN program to take a file of reminders 
! and to display the records in a sorted and pretty format.
! In March 2021, for fun, I wrote a Python version of the program.
! Now, in January 2023, for fun, I have again written a FORTRAN version.
! Version 0.1 20-Jan-2023 Start of conversion of the Python code
! Version 1.0 29-Jan-2023 Final version.....?
! ===================================================================
program Reminder

use ReminderModule ! All the functions/subroutines are in this module.
implicit none
type (rec_data) ReminderTable(100)
character myfile*100
integer Nreminders

myFile = "C:\Users\Mike\Documents\Documents\MyFortranCode\MyReminderProject\Reminder.dat"

call GetReminderData(myFile,ReminderTable,Nreminders)
call SortList (ReminderTable,Nreminders)
call PrintList(ReminderTable,Nreminders)
end program Reminder
! Module REMINDERMODULE containing all the functions and subroutines.
module ReminderModule
implicit none
type rec_data !Structure to hold the reminder records
    character*11  rec_date      !reminder date
    character*50  rec_event     !reminder event
    integer  rec_numdays        !Calculate days between date and today's date
end type rec_data

!Subroutine GETREMINDERDATA to get the reminder records
!Records are of the form dd-mmm-yyyy,"Event description" and are unordered
subroutine GetReminderData(filename,ReminderTable,N)
implicit none
integer mystatus,N,ans,ans_today
character filename*(*), mystatusmessage*200,mydate*11,mytext*50,today*8
character monthchar*3,months*36
integer d,m,y
type (rec_data) ReminderTable(*)

open (unit=1,file=filename,action='read', &
if (myStatus /= 0) then
    write (*,'(///2a)') "OOPS! ", mystatusmessage
! Calculate the number of days between today and a base date
call date_and_time(date=today) ! Inbuilt procedure
read(unit=today,fmt='(i4,i2,i2)')y,m,d ! This used to be done using an ENCODE statement!
call getDays(d,m,y,ans_today) !Get the number of days between today and a base date
! Get the reminder records
N = 0
    read (unit=1,fmt=*,iostat=mystatus,iomsg=mystatusmessage)mydate,mytext
    if (mystatus /= 0) then
        ReminderTable(N)%rec_date = mydate
        ReminderTable(N)%rec_event = mytext
        read (unit=mydate,fmt='(i2,1x,a3,1x,i4)')d,monthchar,y ! Get the date components
        m = index(months,uppercase(monthchar))/3+1 ! Lookup the month number using the month text
        call getDays(d,m,y,ans) !Get the number of days between the date and a base date
        ReminderTable(N)%rec_numdays = ans - ans_today !Number of days between date and today's date
    end if
end do
close (unit=1)
end subroutine

! Subroutine GETDAYS to calculate the number of days between
! the supplied date and an arbitrary base date (01/01/2000)
subroutine getDays( day,month,year ,ans)
implicit none
integer ans,i,daysPerMonth(1:12),daysPerMonthLeapYear(1:12)
integer day,month,year
data daysPerMonth         / 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 /
data daysPerMonthLeapYear / 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 /

do  i = 2000, year-1 ! Add up the days in the preceding years of the supplied date
    ans=ans +365
    if (isLeap(i)) ans=ans + 1
end do
do i =1,month-1,1 ! Add up the days in the preceding months in the year of the supplied date
    if (isLeap(year)) then
        ans = ans + daysPerMonthLeapYear(i)
        ans=ans + daysPerMonth(i)
    end if
end do
ans = ans + day - 1 ! Finally add in the number of days (less 1) of the month of the supplied date
end subroutine getdays

! Function ISLEAP to determine if a year is a leap year
logical function isLeap(Y)
integer Y
! A leap year is divisible by 400 or, is divisible by 4 but not by 100
isLeap = (mod(Y,400) .EQ. 0) .OR. (mod(Y,4) .EQ. 0 .AND. mod(Y,100) .NE. 0)

end function isleap
! Subroutine SORTLIST to sort the data in date order.
subroutine SortList (ReminderTable,N)
type (rec_data) :: ReminderTable(*),temp
integer :: N,i,j
logical :: Swapped

DO j = N-1, 1, -1
    swapped = .FALSE.
    DO i = 1, j
      IF (ReminderTable(i)%rec_numdays > ReminderTable(i+1)%rec_numdays) THEN
        temp = ReminderTable(i)
        ReminderTable(i) = ReminderTable(i+1)
        ReminderTable(i+1) = temp
        swapped = .TRUE.
      END IF
    END DO
    IF (.NOT. swapped) EXIT

end subroutine
! Function UPPERCASE to convert text to upper case.
function uppercase(string)
character(len=*), intent(in) :: string
character(len=len(string)) :: uppercase
integer :: j
do j = 1,len(string)
  if(string(j:j) >= "a" .and. string(j:j) <= "z") then
       uppercase(j:j) = achar(iachar(string(j:j)) - 32)
       uppercase(j:j) = string(j:j)
  end if
end do
end function uppercase
! Function PRINTLIST to nicely print the data
subroutine PrintList (ReminderTable,N)
type (rec_data) :: ReminderTable(*)
integer :: N, nDays, i
logical :: tChange
character*16 t1
character*75,parameter :: mySectionSeparator="---------------------------------------------------"

tChange = .TRUE.

write (*,'(/////)')
write (*,'(2x,a)')mySectionSeparator
write (*,'(2x,a)')"         Welcome to my FORTRAN Reminder program!"
write (*,'(2x,a)')mySectionSeparator
do i = 1, N
    nDays = ReminderTable(i)%rec_numdays
    if (tChange .eqv. .TRUE. .and. nDays > 0) then
        tChange = .False.
        write (*,'(2x,a)') mySectionSeparator
    end if
    if (nDays == 0) then
        t1 = "     Today    "
    else if (nDays == -1) then
        t1 = "   Yesterday  "
    else if (nDays == 1) then
        t1 = "    Tomorrow  "
    else if (nDays < 0) then
            write(unit=t1,fmt='(i4,a)')-ndays," days since" !In my days it was the ENCODE statement
            write(unit=t1,fmt='(i4,a)')ndays," days until"
    end if

    write (*,'(2x,a,1x,a,1x,a,a)')ReminderTable(i)%rec_date,t1,ReminderTable(i)%rec_event

end do
write (*,'(2x,a///)')mySectionSeparator
end subroutine

end module

And the output is….