Expectations of writing abilities in higher education

A few years back I taught a first year seminar course a couple of times. It had 20 students in it, and the topic was “the history of food”. It was a very experiential-based course, and the assignments primarily involved writing. The students in the course came from many different disciplines. It was probably the most fun I have ever had teaching. Through teaching it, I had one great epiphany – I shouldn’t expect epic writing masterpieces from first year students, or perhaps even fourth year students. I have to say, after the first assignment, my expectations were somewhat blown. I had envisioned reasonably good writing skills, especially from humanities students, but what I got was in some cases quite ghastly to read. I didn’t blame the students… but it did beg some questions. Were the majority of incoming students poor writers? Was I expecting far too much? How were they going to cope with the rigours of academic writing?

Then it dawned on me that they were probably lacking good writing skills in part because of poor skills obtained in elementary and secondary school. But they also were young, and had very limited experience in terms of writing. You only become a good writer through life’s experiences, and actually writing. Good writers enjoy writing. Some people of course have a natural ability, but many others have to grow that ability. Part of this stems from reading – it helps ingrain technique, and improves both spelling and grammar by introducing new words. It also helps propagate new ideas. People who don’t read, very rarely become good writers. Another part of course comes from writing. Experience begets ability. It was too much to expect that 18 year old students were going to be good writers, but any stretch of the imagination. Some might be good at writing by the end of their tenure at university, others might take decades more, yet others will never be good at writing.

Here, students in the humanities have the advantage, as their discipline involves doing research, making arguments, and writing. Their work will improve over their years at university – I have seen this happen over the last three years of my daughters history essays at university. Other students, especially those in STEM, might never improve beyond the stuffy world of scientific writing, which often has very little in the way of soul. It is actually sad that we spend so little effort in having STEM students write more, especially opinion pieces beyond the black-and-white formulaic world they live in. Computer science students may be even worse, for some their idea of writing is program documentation. The worst pieces of work are often postgrad STEM theses, which are so boring, it begs to question whether many of these people will ever be good writers (beyond their fields).

Of course in computer science we never really ask questions that require a written response. Designing an algorithm or writing a program doesn’t really require “writing” skills per se – even though programming does require the ability to decipher and comprehension programs, a skill which a number of students seem to lack. We never ask students to write an essay describing why they think goto statements were considered so horrendous, or why Algol-68 was never adopted. We likely do them a great disservice. Sure, many won’t like the idea of writing, but they will likely have to write in their careers, and no one wants to read poor writing. You could be a fantastic programmer, say someone who designed an evolutionary new programming language, but if you can’t write about it in a manner that gets other people interested, what does it matter?

My own writing journey should have given me some indication that 18 year old’s would not produce works of art. Years of STEM provided me with little in the way of artistic writing, although I always tried to push this envelope, even if only to make scientific writing more interesting. At 18, I was not a good writer, although I did read a lot. Years of worldly experience, a love of reading, and practice at writing have made me a better writer. You also have to have a love for writing, and telling a story – no matter the subject.

Advice for programming language designers

For anyone interested in designing a programming language, I would first suggest reading the following paper by Niklaus Wirth: On the Design of Programming Languages. It is unlikely anyone has developed more programming languages than Prof. Wirth.

“If you wish to develop a language, you must have a clear idea of how it is intended to be used”.

  • Niklaus Wirth, “On the Design of Programming Languages,” (in) Information Processing, J. L. Rosenfeld (ed.), North-Holland, 386-393 (1974)

Technology is often just a house of cards

Computing technology once held a lot of potential for “making our lives easier”. It has never really fulfilled that potential. Life is arguably more complex than what it was 40 years ago. Sure, some things have become simpler, but as technology became more complex, so to did it’s integration into our lives. Every year we are sold a package of goods touted to make life easier, from intelligent fridges, to intelligent houses. Problem is, most of this technology is just a house of cards.

Let’s take mobile apps as an example. There was a time when people thought that every company would have an app of some sort. A great amount of effort was put into their design and usability. Billions of dollars likely invested… and for what? Why have they languished? I think it is largely because they require a great deal of investment and maintenance. Every time there is a major OS upgrade, the apps have to be upgraded. There are also development issues – app developers have to deal with different operating systems, different devices/models, and different screen sizes.

How many apps do you have on your phone? Probably around 100. How many do you use? Maybe 20-30? I have them categorized by frequency of use in categories. Some apps I keep for nostalgia’s sake, like maybe someday I’ll use them again. What apps do i use the most? – Google Maps, Instagram, Camera, Photos, Outlook. Some apps I have because they are well designed and offer some level of convenience, e.g. LibraryThing to maintain my book database, and MyScans to scan book pages. Some replace physical items, like myLightMeter Pro. Too many apps (and their data) just end up clogging up the storage on my mobile device.

On the user side of things, I think people have just tired of apps. I have a number of photographic apps on my iPhone, but often they just aren’t maintained, become unresponsive, or just have too many features to function properly. Sometimes developers forget that mobile devices are too small for some forms of interaction. That’s the other side of things, apps that offer a lot, but don’t deliver because of their complexity. You know how it goes, you use it a couple of times, and then it just languishes in a folder somewhere on your device. Many of the photo apps I have just aren’t as responsive as a real camera. If I want a better photo, I have to upgrade my phone which will have better photo-AI, and then how many of my apps will still work?

Unless a company produces an app which makes use of a mobile device as a mobile hardware platform, e.g. using the camera(s) for purposes of a light meter, or provides specific functionality/security features, it is easier to go with a mobile-friendly website. LibraryThing has a website and an app, with the app providing access to the camera to allow scanning of ISBN codes. There are of course good apps out there that serve a purpose. The “SBB Mobile” app, which serves the Swiss rail system allows the user to buy e-tickets, make personalized timetables, and load travelcards. It is well designed, maintained, and user centric. Or perhaps bank apps, which provide better security than a browser, and features like cheque scanning.

I think many companies thought technology would permeate into every facet of peoples lives. Some people certainly have wholly embraced it, turning their homes into “smart homes” filled with technology. But what happens when the technology becomes redundant, or unmaintained? Do we need technology to turn on a light bulb, or control temperature in a house? Unlikely. Do we need to communicate with washing machines or toaster ovens? No. In many cases all these smart devices do is provide companies with data which is the real commodity here.

Technology is often created by people who believe they have designed something people want. But rarely is it something people truly need. The reality is we should be creating things that serve a purpose and are sustainable in some manner.

With recursion a problem solves itself

Recursion fits nicely into a stepwise refinement approach to problem solving. In this approach, a problem is split up into subproblems, with the idea being that the subproblem are easier to solve than the original problem. Each of these subproblems is, in turn, divided into even simpler subproblems, and so on, until such time that the simplest case is derived, which can be solved directly. If a subproblem is similar in context to the original problem, then the problem is naturally recursive.

The first step in developing a recursive algorithm is to identify one or more simple, nonrecursive, cases of the problem that can then be used to solve the problem directly (the base case). The next step involves deriving a method of solving the complex case in terms of the simple case. This often occurs by reducing the problem by some factor, typically by half, or by one. Eventually the more complex cases reduce to one or more simple cases.

For example, consider the problem of solving powers, i.e. xn. Here x is multiplied by itself n times. The simplest case here of course is when n=0, such that x0=1. Therefore the problem of xn can be reduced to a simpler problem, one where the exponent is n-1, until the base case n=0 is encountered. Here is a version of the function written in Fortran:

recursive function power(x,n) result(p)
   integer, intent(in) :: x, n
   integer :: p
   if (n == 0) then
      p = 1
   else
      p = x * power(x,n-1)
   end if
end function power

Here the core functionality of the recursive algorithm occurs on lines 4-8.

  • Line 4: A standard if statement, used in recursive subprograms to decide whether the call to a subprogram is the base case, or a recursive call to explore a subproblem. In this case it checks to see if n=0.
  • Line 5: If n equals 0, then the simplest, nonrecursive instance of the problem has been encountered. In this case, the value 1 is returned by the function.
  • Line 7: If n does not equal, then the function power() is called recursively on the subproblem, in this case power(x,n-1). What is returned is the value derived from the recursive call times n.

Let’s see it working. If we use the function to calculate 25, we call power(2,5).

power(2,5) → 2 * power(2,4)
power(2,4) → 2 * power(2,3)
power(2,3) → 2 * power(2,2)
power(2,2) → 2 * power(2,1)
power(2,1) → 2 * power(2,0)
power(2,0) → 1   (the simplest problem)

The first recursive call power(2,4) is a subproblem of power(2,5), because 2*24=25. When the function ends, basically what it has calculated is 1*2*2*2*2*2 = 32.

It is not easy to derive recursion solutions to problems because the human mind does not solve problems in a recursive manner. Many people would simply have solved the problem in a nonrecursive manner, using a loop. For example, the same function rewritten using a loop would look like this:

integer function power(x,n)
   integer, intent(in) :: x, n
   integer :: i, p
   p = 1
   do i = 1,n
      p = p * 2
   end do
   power = p
end function power

Do these equations differ?

In a recent course, students were given a legacy Fortran program to reengineer. One of the issues some students had is that they found that the equations in the code differed from the ones in the paper. Here is the code in the paper:

Versus that found in the legacy code:
60     BB=0.1*SI*(1000./(25.+108.64/EXP(0.023*BUI)))
91     IF(BB-1.0.LE.0.) GO TO 98
       SL=2.72*(0.43*ALOG(BB))**0.647

The problem here lies not with the equations, but rather with their interpretation. In the first line of code, there are issues with the fact that 108.64 e-0.023U from the paper has become 108.64/exp(0.023*BUI). They are essentially equivalent, with 108.64*e^(-0.023U) being equivalent to 108.64/e^(0.023U). Why? Because they use the negative exponent rule, where a-b becomes (1/ab).

This is a good example of where you have to actually test the values produced by the program against those which are manually calculated from the equations… and have a good understanding of mathematical principles.

How to interpret a simple equation

There is a viral math equation that has lead to a lot of debate, namely:

8 ÷ 2(2 + 2)

There are of course two answers to this equation, depending on how it is interpreted. The first answer is 16 (which is what Google will tell you), is derived using order of operations, i.e. PEMDAS/BODMAS:

8 ÷ 2(2 + 2)
= 8 ÷ 2(4)
= 4(4)
= 16

The other answer is 1, derived from 8÷2(4), which gives 8÷8=1. The issue here is not the answer, but how such an equation is actually presented when writing a program. Programming languages will, by and large, interpret the answer as 16, but if this is not what is wanted, then more parentheses should be added to make it explicit. So to get an answer of 1, the equation becomes:

x = 8 / (2*(2+2))

This equation illustrates how easy it is to misinterpret an equation, and how care should be taken when translating them within programs. It is always important to consider checking calculations by hand before hard coding them. It would have been easier had the equation been differently presented, such as:

Fibonacci and sunflowers

One place that plant life reflects the Fibonacci sequence is in the seed heads of numerous plants. The spiral pattern of the seed heads in both the clockwise, and counterclockwise direction, are quite often Fibonacci numbers. It is likely that the reason for this formation is to allow the seedheads to pack the maximum number of seed in the given area. A perfect example of phyllotaxis is afforded by the common sunflower (Helianthus annuus,L.) which consists of a number of tightly packed florets. The seeds can be quite clearly seen, distributed over the head in two distinct spirals, or curves, radiating from the centre, one clockwise, and the other counterclockwise.

Fig.1: Plate VII from Church [4] overlaid with coloured spirals.

It was Church [4], who in 1904 published an extensive work on phyllotaxis, extensively described its relation to sunflowers in detail – “A fairly large head, 5-6 inches in diameter in the fruiting condition will show exactly 55 long curves crossing 89 shorter ones. A head slightly smaller, 3-5 inches across the disk, exactly 34 long and 55 short; very large 11 inch heads give 89 long and 144 short.” According to Sister Mary de Sales McNabb, the head of the sunflower which is approximately 3-5 inches across the disk will have exactly 34 long (counterclockwise) and 55 short curves (clockwise) [1,2] all beginning from the centre. A smaller head will exhibit 21 spirals in one direction, and 34 in the other [2], whereas a larger head 5-6 inches in diameter will show 55 long curves crossing 89 shorter ones [1]. There have been reports of large sunflower, with 89/144 spirals.

Fig.2: 34 clockwise spirals in a sunflower head.

But do all sunflowers exhibit these Fibonacci characteristics? The Museum of Science and Industry, in Manchester (UK), decided to crowdsource the problem as Turing’s Sunflower project. For a number of years (the project ended in 2017), the museum had citizen scientists grow sunflowers, and submit information about them. Data from 557 sunflowers from seven countries was analyzed, with 458 (82%) showing spiral counts as part of a Fibonacci sequence. In a small number of cases, 33 spiral counts were observed, from the Lucas series, and some double Fibonacci sequences. The interested reader can find more information at [3].

Fig.3: Some sunflowers have a third spiral, shown here in orange.

Sometimes sunflowers even have three spirals. The third spiral shown in Figure 3 is also counterclockwise, emanating from the outer edges of the flower-head, not always completing the spiral to the centre.

Further reading

  1. Sister Mary de Sales McNabb, “Phyllotaxis”, in A Primer for the Fibonacci Numbers, p.9-12 (1973)
  2. Sister Mary de Sales McNabb, “Phyllotaxis“, 1(4), pp.57-60,71 (1963)
  3. Swinton, J., Ochu, E., The MSI Turing’s Sunflower Consortium, “Novel Fibonacci and non-Fibonacci structure in the sunflower: results of a citizen science experiment“, Royal Society Open Science, May (2016)
  4. Church, A.H., On the Relation of Phyllotaxis to Mechanical Laws, Williams & Norgate (1904)

Fibonacci and pinecones

Look at a pinecone and you’ll see a tear-drop shaped object with many small, hard leaflets protruding. Look closer and you’ll notice those leaflets are arranged in spirals. The seed containing scales of the pinecone grow along the intersections of two sets of spirals that unfold in 3D space, like a DNA molecule. Count the number of clockwise spirals, and the number of anticlockwise spirals and you usually end up with two adjacent numbers in the Fibonacci sequence. One of these sets of spirals rises steeply up the side of the pinecone, and the other rises much more gradually. Pinecones commonly have 3 steep and 5 gradual spirals, or 5/8, or 8/13. This arrangement is called phyllotaxis, and when the leaves on a stem form a spiral pattern it’s called a phyllotactic spiral. A similar form of spiralling occurs in the outer petals of artichokes and various other flower buds.

Two pine cones with 8/13 spiral configuration

There was a lot of work done on phyllotaxiis in the 1830s. Botanist Alexander Braun may have been one of the first to study the arrangement of scales on a pine cone [4]. Braun observed that the number of spirals to the left and right represented consecutive terms in the Fibonacci sequence. It was Brother Alfred Brousseau in the 1960s, who extensively explored the association of pine cones and Fibonacci numbers [1,2]. Counting the spirals in the Tamarack Pine ((Pinus Murrayana) he determined there were 8 gradual and 5 steep spirals. His field work explored the statistics of Fibonacci in pine cones, including the prevalence of pinecones to contain both left and right spirals [2], and counting the spiral patterns found in California pines [1]. His work [1] shows that pines often have cones with differing spiral configurations, e.g. the Yellow Pine (Pinus ponderosa) had cones in three differing configurations: 5/8, 8/13, and 5/13.

13 clockwise spirals
8 anticlockwise spirals

Further reading

  1. Brousseau, A., Brother, ”On the Trail of the California Pine”, Fibonacci Quarterly, 6(1), pp.69-76 (1968)
  2. Brousseau, A., Brother, ”Fibonacci statistics in conifers“, Fibonacci Quarterly, 7(5), pp.525-532 (1969)
  3. Goldstine, S., Two Numbered Pinecones
  4. Braun, A., Vergleichende Untersuchung über die Ordnung der Schuppen an den Tannenzapfen als Einleitung zur Untersuchung der Blattstellung Überhaupt. Verhandlungen der Kaiserlichen LeopoldinischCarolinischen Akademie der Naturforscher, 15, pp.195–402 (1831)

Technology – as harmful as it is helpful

Technology was meant to be a “Wunder Kindt”, a panacea for everything… but it hasn’t turned out that way. But why? To understand this you have to look into why the computer evolved. For the most part, computers evolved in order to perform calculations efficiently, and quickly. Along the way we adapted technology to make our lives easier… well, that was the plan anyways. And yes, technology has benefited society in many ways over the past half a century. But on the flip side it has produced an incredible amount of garbage, and morphed us into a somewhat throwaway society. There are obviously places where technology has benefited society greatly, for example medicine, science, digital photography. Sure, we have the internet, which has brought the world closer, and made knowledge more accessible. But it too has a *lot* of downsides. Now some technologies are also being used to help with things such as recycling, which makes sense considering the amount of garbage humans seem to create.

Take music for example. Everyone thought cassette tapes would kill LP records. They they thought CDs would kill records. Then the iPod would kill any kind of physical media. Then online streaming would take over the world. But guess what? It hasn’t happened that way. After being a niche market for many years, by 2021 one out of every three albums sold in the US were vinyl LPs. The sales of LPs has been increasing for more than 12 years. Why? Because there is a tactile aesthetic to playing an LP. With an LP you have to take the album from its jacket, open the record player, place the LP carefully on the turntable, set the stylus, and switch it on. It is an experience, which is tactile as it is auditory. They you listen to the whole album, not just the tracks you like… because there is often more to be gained from listening to the less-hyped songs. And it’s not just people who grew up with a record player in the home buying LPs… most are in the 18-19 age bracket.

Then there is the cautionary tale of e-book readers. They were suppose to replace everything paper. But you know what, when you charge just as much for a digital book as you do for a paper book, you aren’t going to sell many. That and frankly who needs an e-reader when on vacation on the beach somewhere (electronics + sand = 😢). iPads and the like are likely better than e-readers, mainly because they do so many more things. Even digital magazines *seemed* like a good idea, but they really aren’t… the apps are often awful, and sometimes publishers change apps, leaving you with a bunch of issues in one app, and the rest in another. Besides which with a real magazine, I don’t have to worry about opening an app, can easily read it anywhere, and I don’t have to juice it up. And that may be the real crux… having to continuously charge these devices, even the Apple Watch… every day everything needs to be plugged in, and its a pain.

Ultimately it’s one of the reasons digital devices get a failing grade – battery life. I would never use an iPhone as my sole camera on vacation, because the battery life is abysmal, well, and the features suck too. An iPhone is great as a backup, or for taking photos in places where one has to be a bit more discreet, but for real photographic power, I’ll take a digital camera, where I get 250-350 shots per battery, and changing a battery literally takes 5 seconds (and the optics are batter anyway). It’s no wonder analog cameras have also made a comeback… a 50 year old vintage SLR still works, whereas my 10 year old “vintage” digital cameras are mostly dust collectors.

Just wait for the cassette tape to make a comeback…