How are you using generative AI productively?

If it doesn’t threaten any privacy I’d be curious to see the sort of prompts this uses. I’ve only used ChatGPT for the most basic of things (give me jokes about …) so I’d love to see something more complex.

I was a very proficient scientific Fortran programmer for decades since the days of Fortran IV and into the era of Fortran 90. I was recently asked to delve into some old Fortran code from the early ‘90s and resurrect it for a new application in the field of flowcytometry. Needless to say a lot of my “coding muscle memory” had left me. But ChatGTP and Google Bard (now Gemini) came to the rescue and eased the programming tediousness.

While putting together the updated Fortran application, I came to find out that much of the code’s work could be done much more simply and elegantly with Python. The Fortran code had been compiled for processing speed and I initially thought that an interpreted language like Python would be too slow. I knew next to nothing about Python language but wanted to try it out.

With the help of AI, I quickly managed to replace the Fortran program with a few but powerful Python commands from some libraries that AI pointed me to. In addition Python provided instant plotting of the results. The expected slowness of interpreted languages was overcome with the huge increase in processing speed of today’s chips. In the end both the compiled Fortran code and the interpreted Python commands ran equally fast.

Without AI this would have required laborious online searches for several months while I learned not only the language but to find suitable libraries to analyze flowcytometry data.

6 Likes

My guess is that the hard work is done by the compiled libraries in both Fortran and Python.
So they would run in about the same time if the libraries are approximately equivalent.
That is assuming you are able to structure the program flow so that it efficiently calls the libraries.
Good job on the code modernization!

2 Likes

Well, I’m not doing a lot of generative AI- I’ve dabbled a little bit in it just to be current with the terms used and how it’s promulgating into modern “tech speak”. I find this effect very similar to the wave of World Wide What? when web browsers were introduced. However, my brother Henry Lowengard (who writes some pretty excellent IOS apps: AUMI, PolyHarp, Enumero, Droneo…) has a bunch of software locally installed and he’s using language tools, voice generation and synthesis to create interesting (funny- sometime unsettling!) things. While his general explanation and philosophies are at jhhl.net - His output is https://largelanguage.bandcamp.com -it can get very weird!

Here’s what I’ve used:

There is a section in each of these three files entitled “Competitor Seat Fees”. Below that is a name for each competitor and a dollar amount showing how much they owe. Provide a consolidated list showing how much each competitor owes by adding up the amounts next to their names for each of the files. Please total the list you provided and see whether it matches the correct amount of $6,837. If it does so, your work is complete. If not, reanalyse the data until it matches.

1 Like

Thanks, that was very informative. I don’t want to derail the thread but I have one follow up question, how do you ‘point it’ to the files?

I’m a ChatGPT Plus subscriber, so I can upload the files.

I have also asked ChatGPT to analyse patterns in data with mixed success.

And never mind all the text and image creation features, I just wish it would create spreadsheets for me. I know it does formulae, but the next step of creating a spreadsheet would be awesome.

I have been testing a local Chatbot style LLM program called Ollama, that can use any of the available open source LLMs available, as there are several available. Ollama is a terminal application, but with Ollamac, another program that can be downloaded, it works as any MacOS App. The latest Llama3 model is very useful for creating or summarizing text for documents. Without any of your private data in the cloud, as it runs locally on any M1 Mac.

Ah, thanks, appreciate it.