A quarter century of Java

July 4, 2020

We are all natives now, and everybody else not immediately one of us is an exotic. What looked once to be a matter of finding out whether savages could distinguish fact from fancy now looks to be a matter of finding out how others, across the sea or down the corridor, organise their significative world. (Clifford Geertz)

The Java Programming Language turned 25 years old on May 23 2020.

I’ve been writing Java code for 24 years, since 1996.

When Java arrived on the scene, my languages of choice were C, C++ and Perl, but mostly the first and last.

For me, there were at first various BASIC dialects, with smatterings of assembly code. Then at university and just at the moment I thought I knew something about programming, I learned Pascal, C and Fortran.

Later, languages such as LISP, Prolog, ML, CLIPS, SQL, even COBOL (about which I really never could find anything to like) showed me different ways in which a computer could be programmed.

Programming paradigms and language translation (compilers, interpreters) have interested me since around 1989. I wrote the ACE BASIC compiler in C from 1991 to 1996.

I’ve since designed and implemented other programming languages, including LittleLisp for the Newton PDA, and others that were only ever experiments, most personal projects, one commercial. In recent times I’ve been developing a domain specific functional language called VeLa that I’ll write about some time.

From the start, Java made it possible to write cross-platform programs, with or without GUIs, with relative ease.

Its byte-code compilation model resonated with me after having written my first compiler for a subset of Pascal in 1989 that generated USCD p-codes.

In 2004, six years after Java was released, Java 5 brought generics, regular expressions and assertions. I had craved these, especially the first two, for years, since writing C++ and Perl code in the early to mid-90s.

Java’s history is something of a long strange trip: from set-top boxes to web applets, the desktop, enterprise frameworks, smart cards and other embedded devices, to Just In Time compilation and dynamic profiling, WebStart and security model criticisms, and from Sun Microsystems to Oracle.

C# learned from Java’s mistakes. Some of its proponents have not always seemed to me to be honest about acknowledging its heritage though.

Programming Languages are tools for thought, for human communication, and not merely a means by which to bend a machine to our will. As I’ve mentioned elsewhere, they can also determine what it is possible for us to think.

My working days are now dominated by R, Python, C++ and sometimes Fortran; and bash of course. R and Python are powerful and have a rich ecosystem of tools and libraries, but I’m no fan of dynamic typing which makes it easy to get started, yet leaves too much unsaid, too many possibilities for error. This problem only becomes worse as programs grow.

Rust, Julia, Go, Clojure, Swift are all contenders to the throne now too. Which of these will stand the test of time? Which will one day be considered to have legacy code bases, just like Java, C, C++, Fortran, COBOL? All of them, I would say.

Then there are those languages like Haskell that blaze trails but tend not to be dominant. Java and most of the current crop owe such languages a debt of gratitude as functional programming’s higher order functions, type inference, and immutability have come out of academia to take over the world.

Distinguishing fact from fancy, fashion from solid ground, making predictions about the future of the programming language landscape is no easy task.

The older I get, the more selective I become about what new languages and frameworks to learn and the more interested I am in as much static typing, type inference, and run-time efficiency as I can get my hands on.

Yet, after a quarter century, I still like to code in Java whenever I can. It has its own beauty. I don’t pay much attention to its detractors. Of course, that’s where it’s important to think about context. If I’m writing code for a tiny embedded system or want to squeeze the most out of a machine, I’m more likely to code in C of C++ than anything else. But if I want to build a big habitable castle in the sky, I’ll still choose Java when I can.

Yuck, that’s not meat!

May 24, 2020

A 2019 New Idea article complains that customers of some Australian supermarket chains have been “falling into the trap” of buying what they thought were meat products, only to find when they get home that they purchased plant-based products instead.

Photo by Polina Tankilevitch on Pexels.com

Many have been left infuriated by what has been called ‘misleading’ product packaging when it comes to vegan ‘meat’ products.

“Infuriated”?

Is that really appropriate an appropriate emotion here?

Ooh, it’s plants! Can’t possibly eat those!

Yuck, I bought these, I didn’t realise they were meat free, they have been sat in the freezer ever since”, said one disgruntled shopper.

Yuck? Did they consider trying the product?

…it’s not like the vegan meat is in its own section – at my local they’re mixed in amongst the proper meat. I keep buying it by accident, it’s driving me nuts. The other day I bought one that said meaty on it!

“Proper meat”?

Does the person quoted understand where “proper meat” actually comes from? Would they be willing to “process” it in order to have their meal?

And, until very recently, there was a distinctly separate meat section at major Australian supermarkets…

…where only those weird vegans went.

You know, the ones who just won’t shut the hell up about why everyone should go vegan?

So annoying…

This one I don’t understand: “I keep buying it by accident”?

Huh? How?

I accidentally bought these the other day thinking they were chicken, lol they do NOT taste like chicken, but the dogs seemed to enjoy them.

Wow. Lucky dog.

Sigh…

The items pictured in the article are clearly marked as Plant-Based, literally beyond meat in one case. Umm. Yuck?

How about trying them first? The products pictured are all high in protein, easy to cook and tasty.

We in the West are spoiled for choice by the range of products to choose from, but then, this post isn’t intended to be an advert.

The subject of what meat is, and its changing definition, is a rabbit hole for another time.

It’s worth noting that even the Medical Journal of Australia (that has influenced the Australian Dietary Guidelines) acknowledges that diets dominated by plant foods are likely the way of the future.

When something tastes as good as meat, is better for you, the environment and, obviously, the animals, isn’t it reasonable to at least give it a try?

Animalia Commonalis: Truth, Suffering and Ethics

April 19, 2020

All truths are easy to understand once they are discovered; the point is to discover them. (Galileo Galilei)

Three things cannot be long hidden: the sun, the moon, and the truth. (Buddha)

The truth will set you free, but first it will make you miserable. (James A. Garfield)

All truth passes through three stages. First, it is ridiculed. Second, it is violently opposed. Third, it is accepted as being self-evident. (Arthur Schopenhauer)

Why do we want so desperately to know whether there is life elsewhere in the Universe when we treat so much human and non-human life on this planet with such disdain?

blue turtles on brown sand
Photo by Jolo Diaz on Pexels.com

I’ve written briefly here about what makes homo sapiens special.

We know that species other than ours exhibit some of these qualities:

  • Problem solving
  • Sophisticated memory
  • Ability to plan
  • Tool use
  • Culture
  • Ability to act contrary to instinctive behaviour
  • Belief in gods of one sort or another

As far as we know, the last item on the list is unique to us. This could mean either that there are gods of some kind or that we have a tendency to mistake certain types of patterns for gods.

What of the second to last? We are not purely instinctive creatures. Without that, we would never have developed Science, mathematics, technology.

But there exist humans with a severe mental handicap who cannot participate in anything approaching the “lofty intellectual heights”. Neither can young children.

For children, this is only transient you say. Rightly so. Children mature.

Not so for someone with a severe mental handicap.

Perhaps questions like “what makes us special?” or “what sets us apart from other animals?” are less than useful.

Perhaps it would be better to ask instead: What do we have in common?

Animalia Commonalis popped into my head when I was writing this post. By this latin-sounding (but not real) phrase, I was trying to capture this idea: The Commonality of Animals.

Of course, there’s a continuum of complexity of animal life starting from self-replicating molecules (RNA, DNA), to viruses, bacteria, fungi, insects, reptiles, fish, birds, and mammals like us.

Just limiting ourselves to mammals, all have:

  • A common body plan. Animals as diverse as whales and bats share the same basic skeletal structure and organs.
  • An apparent desire, or at least a strong instinct, to care for their young.
  • The ability to feel pain, to suffer.

The question is not, Can they reason?, nor Can they talk? but, Can they suffer? Why should the law refuse its protection to any sensitive being? (Jeremy Bentham 1789, in An Introduction to the Principles of Morals and Legislation)

Bentham said this more than 200 years ago!

Where on this continuum from viruses to us does the ability to suffer begin? Dogs don’t pass the mirror test whereas pigs do, but few would say that a dog cannot suffer.

Do bees feel pain or is the avoidance of harmful stimuli purely mechanical with no pain response? It seems that no-one really knows the answer yet.

I’ll be honest and say that right now I’m more concerned about dealing with the more obvious and well-documented suffering of mammals, birds, and fish by our hand. The “low hanging fruit”. Even choosing not to consume one of these groups is a big win at this point. The jury is still out for me regarding insects.

Think occasionally of the suffering of which you spare yourself the sight. (Albert Schweitzer)

Whether starting from the idea that not consuming animal products may be healthier for us, from worrying about the environment and sustainability, or from a concern for the welfare of animals other than ourselves, one can eventually be led to the realisation that what we once did only to people taken out of Africa to America and to other “civilised” countries, we are now doing to other species, but worse.

The time will come when men such as I will look upon the murder of animals as they now look on the murder of men. (Leonardo da Vinci)

Speciesism is just a generalisation of racism beyond the borders of homo sapiens.

In my view, along with Climate Change, Speciesism is the defining issue of our time, and we will be judged by future generations on how we responded to both.

If Climate Change is an existential crisis, Speciesism can be thought of as a battle for the collective “soul” of homo sapiens.

The greatness of a nation and its moral progress can be judged by the way in which its animals are treated. (Mahatma Ghandi)

Vegan Vignette: Lions Though…

April 13, 2020

lion on green grass field

Photo by Pixabay on Pexels.com

The argument goes something like this. Lions (and other predators) hunt and kill prey.

While horrible for the prey, this is also natural. So, eating meat is natural.

This argument from nature is flawed.

A lion, and the scavengers that come after the hunter has killed its prey, waste little.

Lions act out of instinct. Much of what we humans do is contrary to our natural tendencies.

Most meat consumed by humans is cooked, not raw, as a lion would eat it. Further, there is some evolutionary evidence that we were never natural meat eaters.

While they may hunt in packs, lions don’t intensively factory farm their prey by the billions per year worldwide.

We bear the terrible burden of being free to choose and the only thing we are not free to choose is our freedom to choose. Especially those of us in the affluent west.

Cult of Stupidity: Naming Names

February 13, 2020

Grant Foster, as always, using clear, simple statistical arguments to show why those who say the data doesn’t support the warming trend are mistaken.

Open Mind

Jennifer Marohasy. Remember that name, especially if you’re Australian.

View original post 1,131 more words

On How Not to Protest (again)

January 19, 2020

Recently, Karen and I were waiting for a tram in Bourke Street to take us to a vegan pizzeria in Melbourne I’d heard good things about.

IMG_4752

Before the tram was able to come, hundreds of climate change protesters emerged. It was an unseasonably cold, wet day, as the picture suggests.

Now, as someone who in late 2019 attended a climate rally and a protest against oil and gas exploration in the Great Australian Bight, I’m broadly supportive of such public protests and marches.

However, there were a few problems with this one…

It seemed to Karen and I that the protesters were mostly preaching to the converted.

It took place in a street in which trams run. Trams. Not cars. Public transport.

Sure, not very efficient public transport given Victoria’s current reliance on coal for power (perhaps that was at least part of their point).

Why not march up a street where cars ran instead? They, at least, could have taken a different route. There was a police presence since this was a planned event, unlike another recent protest in Melbourne.

Yes, I know that disruption was probably part of the aim.

But the truth is that you don’t have to be completely disruptive to get attention like a two year old having a hissy fit.

Another problem was they appeared to circle around multiple times…

After the boredom set in, Karen and I got to wondering what a poll would show about just how seriously participants in the protest were about finding solutions to climate change.

Which of these people, we wondered, use vehicles (theirs or others) in a responsible way in order to minimise emissions?

Which of these people were vegan or at least made some significant attempt to reduce the consumption of animal products, given that the animal agriculture industry is responsible for a similar quantity of emissions as the whole of the transport sector.

Which of these people regularly waste food?

Which of them recycle? And so on…

Yet another problem was that at one point, the chants changed from being climate related to:

Always was, always will be, aboriginal Land

I encountered the same thing during the 2019 oil and gas exploration protest in Adelaide.

Now, no matter how sympathetic you are to the plight of aboriginal people in Australia (and there is good reason to be), how much you support the notion of land rights, or how positively you view the aboriginal people as good stewards of the Land, this is a problematic statement.

For one thing, it is astonishingly anthropocentric, the very thing that has gotten us into so much trouble with climate change.

For another, it’s a claim that can only have any validity for the last 60,000 years or thereabouts. Before that brief geological time span, the land “belonged” to other species.

Such a view may not be politically popular these days, especially with Australia/Invasion Day on January 26, but it has the distinct advantage of being true.

Of course, none of this excuses the terrible things done to the aboriginal people by our white settler ancestors and it is important to separate the massacres of two centuries ago from the broader historical place of homo sapiens, and the future of our species.

I’ve written more on this theme elsewhere. As I said there:

I’ve always found the Cosmic Calendar quite compelling. Popularised by Carl Sagan on Cosmos, the whole timescale of the universe is compressed into 12 months. Nothing remotely human begins until late morning on December 31. The original settlement of Australia by seafarers didn’t happen until 11:58pm and the last few thousand years of human history occupies the last 30 seconds of the day!

cosmos-04-hulu

Getting back to the chant… It was out of place in the context of this protest.

If you’re going to have a protest about climate change, stick to the point!

Don’t dilute the message!

Also, ensure that you are really making an attempt to walk the walk, not just talk the talk.

We eventually got to that vegan pizzeria, but it was far enough that we caught a cab.

Anyone who knows me, knows how much I hate catching a cab if I don’t have to!

So, thanks for that (not).

On Being Special

January 19, 2020
sunset person love people
source: Josh Willink (pixels.com)

I’ve had some conversations in recent times that have ended in disagreement over the question of whether members of homo sapiens are more important or special than members of other animal species.

But what do we mean by special?

Relationships with other beings, human or non-human, make the participants special to one another.

Particular things about us make us special, e.g. tool use, intelligence, culture.

The holy books of some religions and other ideological traditions often claim that humans are special, perhaps even chosen in some way.

It’s important to distinguish between these different types of special-ness.

The first type is subjective and derives from a shared history, an emotional bond. For some people, the death of an animal can be as devastating as the loss of a relative or human friend to someone else. There’s no right or wrong in that. It just is.

The second type can be tested; other species use tools, have high intelligence and some may even have their own kind of culture (e.g. humpback whales).

Although a person of faith is unlikely to agree with this, the third type must be supported by evidence, and since, as Carl Sagan reminds us, extraordinary claims require extraordinary evidence, this is a difficult requirement to meet.

Humans are meaning creators. Relationships are central to being human and meaning is often created in relationship with others; not always, but very often; some do choose to find meaning in solitude.

My father’s health was in decline late last year and more rapidly before my eyes in the first week of 2020. However, his death on January 7 2020 has not changed my view of the special-ness of homo sapiens relative to other species.

Dad was special to me because he was, well, my father. We had an emotional connection, a shared biological and social history, a relationship spanning more than 5 decades. I am in the process of mourning his loss. This does not necessarily imply that we or members of homo sapiens in general are special in any other sense.

We are free to choose who to become. If we are special in any sense, it is due to the responsibility we have to accept the human condition and to leave the world better than we found it, irrespective of the fact that we will not be around to see our legacy.

…but what is not possible is not to choose…if I do not choose, that is still a choice. (Sartre, Existentialism is a Humanism)

A Eulogy (for Dad)

January 19, 2020

IMG_4814

I gave a eulogy at my Dad’s funeral six days ago. Before the transcript of the eulogy below, I want to make some preliminary background remarks.

My father, Kelvin Benn, was born on May 14 1931 and died on January 7 2020 after recurrent bouts of pneumonia. He had emphysema and a rare blood cancer that a small fraction of patients with non-Hodgkin’s Lymphoma present with.

After the usual indignities of being a hospital patient, falls in and out of hospital, being on oxygen, and having intra-venous antibiotics a couple of times, Dad began eating less and became increasingly unwilling to take medications. The intention was still to try to get him well enough to be able to leave hospital and go into a nursing home. The reality is that he had lost the will to live by late 2019 and certainly by early 2020.

I spent time with Dad in hospital from January 1 to January 6. We said our goodbyes. I felt there was a good chance I would never see him again. I returned home, uncertain of his future, intending to return again soon. My wife, kids and I had a few days planned in Melbourne from January 8. I thought that if Dad’s condition deteriorated I would at least be able to get back to him (in Tasmania) at short notice. He died late in the afternoon of January 7…

My mother died in 2002 after failed heart valve replacement surgery. Dad married again in 2006. Dawn (dad’s wife) gave a eulogy followed in turn by my sister Julie and I. In the last part of the eulogy, Julie and I took turns reading short extracts from a few of my father’s short funeral sermons that resonated with both of us.

What comes through from these extracts is a focus on relationships, a requirement for personal responsibility, freedom and the necessity of choice, a consideration of the consequences of our actions, and a mandate to do good whenever possible. This resonated with my sister and I and aligns with my own philosophical position, derived from existentialism and consequentialist ethics.

It also gives me some hope for the future of our species that an atheist and a Christian can agree on so much.

What follows is the eulogy I gave at Dad’s funeral on January 13 at Pilgrim Uniting Church in Launceston. My theme was commonality, something we desperately need to focus more on if we are collectively to survive the decades to come.


It’s easy to focus on the differences between people. Dad and I were different in many ways. But we also had a lot in common.

We were both in The St John Ambulance Brigade from an early age, attending sporting and other community events as first aiders, and both becoming cadet sergeants.

Along with the anchor tattoo, Dad also had the S-J-A-B tattoo to prove it!

We both studied at theological college, and enjoyed having philosophical discussions.

We both took our work seriously.

Further to Julie’s comments, Dad often used to say that rights come with responsibilities. As a teenager, mostly I would just internally groan at that…

However, I’ve found myself increasingly saying this sort of thing in recent years to my kids and others, along with: “That music is too loud!”

Then one day, I realised that I had become my father. 🙂

Something I also remember as a young teenager was that if I was ever rude to my mother, out would come the belt!

Of course, those occurrences were few and far between! 😉

Dad’s work as a Uniting Church minister kept him well occupied and, as Julie noted, when he wasn’t out preaching or providing pastoral care, he was often up working late in his office, especially on Saturdays, preparing the sermon for the following day.

Even after retirement, Dawn can probably relate to Dad not straying far from the office for long periods!

Some of my favourite memories of Dad are from beach holidays in the seventies, the two of us body surfing or snorkelling.

As Julie also noted, holidays like those at Port Hughes were good times too, even if my first jetty catch was a puffer fish!

Another fond memory is from 1998, when Dad and I stayed up until the wee hours in Mallala watching a meteor shower as the Earth ploughed through the debris left by a comet.

Dad had a good sense of humour.

IMG_4740

In an email to me in 2016 he said:

“I have a few things I want to share with my GP …  Will let you know if he thinks I may not live to be 100 after all!!”

When he was in hospital recently, a measure of his wellness was the frequency of his witty remarks.

Dad gave a Probus club talk in 2015 titled “Strange Things that Happen at Funerals”. In one anecdote from that talk he says:

One day the undertaker picked me up to conduct a funeral for a man he knew, so I asked him to tell me something about him. “What was he like,” I asked. His answer stunned me: “This is the first decent thing he has done in his life,” I was told. “What about his family,” I asked. “They are all the same”, he replied. So, I thought I had better used the old, sterner burial service. Afterwards the family came up to me and said, “Lovely service, Father.” It just goes to show that you can never tell how people are going to react.

Like many fathers and sons, Dad and I had our disagreements and at times we hurt each other with words.

However, in a 2015 email exchange, in which we had disagreed on matters of belief, he said:

“Unless we are willing to be open to change, our thinking can only become stagnant. The older we get the more we realise how little we really know…or we have wasted a life. It has been a great blessing that we have always been able to be open and honest with one another.”

I’m sure there are times we could have been even more honest and open, but the point is to intend to do better.

I don’t think it would be a misrepresentation to say that Dad emphasised the social justice and pastoral care aspects of his faith.

He genuinely cared about people. The idea that “God is Love” became more important to Dad as time passed.

Julie’s daughter, Kate, recently found some of the funeral sermons Dad wrote. It seems appropriate to finish by reading some excerpts that resonated with both of us. At a time when so much of the world is divided, Dad’s words seem especially relevant.

“In our troubled world today we are witnessing what happens when over zealous people force their misguided views on others… We need to be aware of each other’s differences so that we will not make the fatal mistake of believing that we are right and God is on our side.

We come into this world and pass through it, leaving it either a happier & better place or a sadder & sorrier place. The choice is ours and so are the consequences of our choice.

Nobody else can live our life for us and nobody else can be held responsible for the way we live it. Freedom to choose & responsibility for actions are the two sides of the same coin.

Life is all about relationships and building relationships makes demands on us. Good relationships are costly. We are all far from perfect but we should always be striving to be better than we are.

As we think about somebody else’s death we cannot help thinking about our own life, and our accountability…to help people to become more loving, more forgiving, more compassionate, more honest, more understanding and more tolerant, more in tune with… one another.”

Thank you Dad for your life of service to others.

Current Betelgeuse Dimming Event

December 29, 2019

The semi-regular late-type variable supergiant star alpha Orionis, better known as Betelgeuse, pulsating with a period of around 420 days at a distance of 640 light years, one of the largest stars visible to the unaided eye and normally in the top 10 list of brightest stars in the sky, is currently undergoing a rapid dimming event.

betelgeuse-size-comparison-with-the-solar-system

source: ESO

If Betelgeuse was located at our sun’s position, it would engulf all the inner planets and extend out to the vicinity of Jupiter’s orbit.

When this star ends its life in a supernova explosion it will be visible in daytime and cast shadows at night.

There have been recent questions about the possibility of Betelguese going supernova (or having done so already) and whether the current dimming may be a sign of it.

ATel 13365 has this to say about the dimming event:

The current faintness of Betelgeuse appears to arise from the coincidence of the star being near the minimum light of the ~5.9-yr light-cycle as well as near, the deeper than usual, minimum of the ~425-d period.

It’s interesting to look at past observations of the star.

Here are the last 2 years of visual and Johnson V observations:

alfOri2yrs

The last 5 years of observations:

alfOri5yrs

The last 10 years of observations:

alfOri10yrs

The last 25 years of observations:

alfOri25yrs

In this and the next plot you can see the transition to image-based photometry about 50 years ago in the form of Johnson V data points.

The last 50 years of observations:

alfOri50yrs

The last 100 years of observations:

alfOri100yrs

It’s apparent that there have been similar dimming events over the last 100 years, e.g. in 1947, 1985 and other years.

alfOri100yrsWithFilterGT1.3.png

It’s not obvious that the current dimming event is significantly more rapid than others that came before it, at least by looking at the slope of a linear fit of dimming events.

Alpha Orionis is a bright star, varying between around magnitude 0 and 1.3. It’s easily observable in the north-eastern late evening sky at the moment, along with comparison stars such as Aldebaran and Pollux.

You can create a finder chart via the AAVSO website. An easier way to get started is to see pages 2 and 3 and the chart on the last page of the AAVSO Citizen Sky southern “10 star” tutorial.

The submission of observations to the AAVSO is encouraged and there’s no need for binoculars or a telescope.

AAVSO Merit Award

November 9, 2019

I was humbled recently to be a recipient of the 2019 Merit Award from the American Association of Variable Star Observers (AAVSO), having previously received The Director’s Award in 2011 and the Bill Bradfield Award from ASSA in 2012.

IMG_4406

fdf8d7ca-b612-4850-964d-671d55a5cc4f

Receiving the Merit Award at Melbourne University from AAVSO Director, Stella Kafka, Dec 10 2019

Patrick Wills also received the AAVSO Merit Award this year for his work on the AAVSO Variable Star Index, a database that VStar also uses, including the web services Patrick has created.