Some thoughts on using chatGPT to write a program to determine which foods are fresh in Ontario

It is easy to find out which foods are fresh in Ontario. There are several guides, including this one from Foodland Ontario, that can help you with this. However, I wanted a particular guide that would list for me all the fresh foods for a given month only.  And since I couldn’t find a guide like that, I decide to write a python program to make such a guide.

In the past, to write a program like that, I would go through sample code I have, pull out bits of code that were good, and cobble together something from all these bits. Lately, though, I simply ask a service like ChatGPT or others to write the code for me. I find nowadays it’s just so much faster to go that route. Call me lazy. 🙂

Since I wanted this done quickly, I pointed chatGPT at the Foodland Ontario guide and asked it to do the following:

Write a python program that strips out the text on this page https://www.ontario.ca/foodland/page/availability-guide?gad_campaignid=22412095602
and leaves just the foods and the month they are grown on. Include all food that states that is Year Round.

Did ChatGPT do that? Yes, it did. Was the program any good? No, it was not! It somehow looked at that web page and decided the values were stored in a table, even though they were not. The web page is more complex than that and so the program was a pretty failure.

After many prompts, I gave up and took an alternative approach. For this new approach, I stripped out the data manually and created a simple CSV file. I then asked ChatGPT to write a program to process the CSV file. Since it is a simpler file, ChatGPT was able to produce a workable Python program that was able to process the CSV file and output the information I needed.

Perhaps a more skilled prompt engineer could have written a better prompt to process the code. I dunno. I am finding that LLMs — not just ChatGPT — are fine with writing some straightforward code based on non-complex inputs and outputs. They are not so fine once the inputs or outputs get complex. But that’s just my experience. YMMV.

I have also concluded that even warmer months like May in Ontario do not have much in the way of fresh food. No wonder there are so many food stories on asparagus and rhubarb! 🙂 You really need to hit June or later before you get into a cornucopia of fresh produce.

If you’d like to see the end result of my coding, go here to this repo: https://github.com/blm849/ontfoods

 

The American Right is familiar with Carl Schmitt and you should be too (for different reasons)

Nuremberg Laws English.jpg

I would have thought that Carl Schmitt is someone who should have been assigned to the dustbin of history. I would have thought wrong.

According to this piece in the New York Times from the summer of 2024:

J.D. Vance, the Republican senator from Ohio who is vying to be Donald Trump’s running mate, declared: “The thing that I kept thinking about liberalism in 2019 and 2020 is that these guys have all read Carl Schmitt — there’s no law, there’s just power. And the goal here is to get back in power.”

Masterful bit of projection there by Vance of his own ideas on to the American left.

Give the rise of Nazi thought on the American right, it should not be surprising that some of its members are turning to Schmitt. For those who are unfamiliar with him, his Wikipedia entry starts with this:

Schmitt wrote extensively about the effective wielding of political power. An authoritarian conservative theorist, he was noted as a critic of parliamentary democracy, liberalism, and cosmopolitanism.His works covered political theory, legal theory, continental philosophy, and political theology. However, they are controversial, mainly due to his intellectual support for, and active involvement with, Nazism.In 1933, Schmitt joined the Nazi Party and utilized his legal and political theories to provide ideological justification for the regime. Schmitt supported many of Hitler policies including the Night of the Long Knives purge and the Nuremberg Laws.

Based on what we have seen so far, expect to see the Trump administration put more of Schmitt’s ideas in action over the length of Trump’s latest term in office.

To learn more about Schmitt and his ideas, you can read the Times piece and the wikipedia page. You can also check out a review of this book on him. For German readers, you can read his defense of the Night of the Long Knives, here.

(Image credits: By Government of Germany – Flickr: Nuremberg Laws English, Public Domain, Link. It’s important to see just where Schmitt’s ideas lead, hence why I included this terrible diagram. After all, “he praised the Nuremberg Laws for dispensing with the commitment to “treat aliens in species and Germans equally.” – NY Times)

On bike-shedding / the bike-shed effect

Anyone who works with a group of people needs to understand the idea of bike-shedding (as known as the law of triviality). Let me jump right to the Wikipedia entry to explain it:

The law of triviality is C. Northcote Parkinson’s 1957 argument that people within an organization commonly give disproportionate weight to trivial issues. Parkinson provides the example of a fictional committee whose job was to approve the plans for a nuclear power plant spending the majority of its time on discussions about relatively minor but easy-to-grasp issues, such as what materials to use for the staff bicycle shed, while neglecting the proposed design of the plant itself, which is far more important and a far more difficult and complex task.

The law has been applied to software development and other activities.The terms bicycle-shed effect, bike-shed effect, and bike-shedding were coined based on Parkinson’s example; it was popularized in the Berkeley Software Distribution community by the Danish software developer Poul-Henning Kamp in 1999 and, due to that, has since become popular within the field of software development generally.

Coming from the software development community, I’ve known about and seen countless examples of bike-shedding in meetings I’ve attended. I just assumed everyone knew the term. It was only when talking to people outside of software did I realize the term was not as well known.

Now you know it. And now that you do know it, you will see examples of it in many of the meetings you attend this week. 🙂