Jack Smith; w. piano; Jolson, Dreyer, Rose
It’s a lonely time with COVID.
And there are lonely people…
And there are lonely computers.
My foray into Artificial Intelligence (“AI”) convinced me AI was fraught with serious problems given that it hallucinated, e.g. made up facts that had no basis whatsoever on the Internet. For instance, my former wife’s grandfather Carl Franklin was inexplicably renamed to Christian Francis when recounting his supposed history which also was completely mangeled.
But then came the lure of artistry with the Dall-E 3 model (part of ChatGPT) where I had great fun creating images by simply providing a description in text. For instance, we have a Bernese Mountain dog named Josie. Her provenance is too much and too personal to blog about publicly, but suffice it to say her lineage traces back to her infamous ancestor who lead Hannibal and his elephants out of the Italian Alps to conquer Rome. History and posterity demands an artist’s depiction of the fateful moment when Hannibal emerged from the once-believed impassable Swiss and Italian Alps only to sack Rome.

Seriously, I’ve been down into the weeds coding and dealing with a fascinating data model concerning aircraft. Aircraft emit radio transmissions, i.e. packets of information, many every second, each containing an identification and a timestamp along with other data such as latitude, longitude, altitude and speed. These emissions are called ads-b (Automatic Dependence Aurveillance-Broadcast) packets. Here is an example of a type 3 “Position” packet containing 21 fields:
MSG,3,1,1,A03733,1,2024/04/25,01:04:25.404,2024/04/25,01:04:25.459,,400,,,44.649369,-123.059134,,,0,,0,
I gather millions of such packets each day from aircraft flying over Salem and have been doing so for almost a year. With all this data, I can perform various statistical analyses as well as isolating “aircraft of interest”. One of the processing steps involves translating a date and time value, i.e. “2024/04/25,01:04:25.404
“, into Linux’s epoch time which is calculated by seconds starting from January 1, 1970, in Greenwich, England. For example, here’s are conversions to “epoch” time value of two human readable date and time stamps one second apart:
jlpoole@ryzdesk ~ $ date -d"2024/05/30 21:03:46 UTC" +"%s"
1717103026
jlpoole@ryzdesk ~ $ date -d"2024/05/30 21:03:47 UTC" +"%s"
1717103027
jlpoole@ryzdesk ~ $
For one day, I had 377,000 packets relating to “aircraft of interest” which had flown below 1,500 in altitude and within an arbitrary fenced area (the blue rectangle below) which I felt signified Salem’s airspace:

I found calculating the epoch value for each day’s worth of packets, e.g. 377,000, was taking about 22 minutes, or .00349 seconds each. Such sluggishness would not be sustainable with all the other calculations I have to perform to manage/massage the ads-b data for each day. I remembered former Google engineer Scott Lamb who designed the superb software Moonlight-nvr which is a video surveillance monitoring and recording (which I use for my 12 security cameras). He programmed in Rust. He reasoned that using the programming language Rust is very efficient and bullet-proof. And for the several years I have been using it, I agree.
So I asked ChatGPT:

And lo, ChatGPT instantly created a program in Rust that accomplished the task 1.037 seconds. And, ChatGPT recommended an enhancement to such a script by using parallel processing and gave me the code for that, too. With the parallel processing, altering 377,717 took about 0.9xxx seconds!
I had tried out creating a small program in Rust, a program which if I written in Perl would have taken me 10 minutes. With Rust, it took me over 4 hours… but it did run much faster. The reason it took me four hours was that I am unfamiliar with the programming conventions an philosophy of Rust. So do to something again in Rust would be a major undertaking for me.
Upshot: thanks to ChatGPT, a processing step that took almost 22 minutes was reduced to less than 1 second. ChatGPT even offered an enhanced alternative which included a parallel processing paradigm to achieve a higher speed. I am certain I would have had to spend a day learning about parallel processing and deploying it in Rust. But in the matter of less than 10 seconds, ChatGPT delivered a solution (I did have to correct a few errors, but that took me less than 5 minutes) that gave me a performance boost of 1,320:1.
I also had a very complex data question which probably would have taken me days to work out using database programming language of SQL, and ChatGPT provided me a solution which I had to go back and forth with ChatGPT to refine for a couple of hours to finally arrive at a working and impressive solution. ChatGPT introduced to me certain methods in SQL I did not know existed and it grasped the root of the problem I was trying to solve. I would come up from my study to the kitchen with my jaw dropping saying to my wife, Juli, “My God, AI has done it again!” I have continually been impressed and have decided it is a high powered tool in my software development. I will pay for the service, but the problem is deciding which service to subscribe to: Google’s Gemini or OpenAI’s ChatGPT?
I’m sold… AI is a tremendous help to me when writing code. And I can have a lot of fun with it creating whimsical historic images.

“But, see: the cautious Google’s handling of my affection:

Leave a Reply