

Two Butterflies on a dull dry afternoon sandwiched between a wet morning and a wet evening.
Two Butterflies on a dull dry afternoon sandwiched between a wet morning and a wet evening.
I’ve been playing a little with WordPress yesterday. A while back I made the very simplest plugin to display my latest iNaturalist submissions. iNaturalist has a API so I made a short code that would then use JavaScript to pull in the pictures once the page loaded.
The only problem with that is that when the page loaded it just displayed a div with ‘loading’ then replaced that with the images when a script pulled that in. This appeared in the RSS feed too.
I thought that it might be better to do this server side so the images would show in an RSS feed.
This worked out ok once I had remembered lines need to end in semi-colons in php. It was still very basic so I ran it past Claude.ai and asked for security and caching advice. It made a couple of suggestions which I read up a little about and implemented.
I’ve tried using AI for a few code ideas and I am beginning to see what does and doesn’t work. What doesn’t work for me is to ask it to build a whole idea. This has nearly always ended up in problems which seem to loop around. What does work is to ask for somethings specific. In this case I uploaded the plugin to Claude and asked it to find any security problems. It did and suggested some fixes. I am sure that these are simple things that any WordPress developer would carry out without thinking about.
I’ve also found getting basic information around a function works well with AI. For example Claude suggested using the transient to cache the data from the API. Asking ChatGPT to explain transient gave me a quick handle on the function. (I am sure Claude would have explained too).
Anyway I have made some progress.
This was a good day:
The above produced with this shortcode:
[[inaturalist user="troutcolor" on="2024-07-30"]]
I’d now like to add some more ideas: names looking a little prettier than the description tooltip, maybe a lightbox view with more information and a link to iNaturalist. But I am not in any rush.
#silentsunday #butterfly
I saw this golden ringed dragonfly laying eggs in a tiny hill burn today.
Stonechats having a chat at Barassie Beach yesterday evening. Plenty of butterflies about too.
#SilentSunday #Flora #Bloomstrolling #Bloomscrolling
A group of harebell, one of my favourite flowers, out this evening in Ardinning. First I’ve seen this year.
Read: The Lying Room by Nicki French ★★★☆☆
As readably as usual, but I didn’t really get engaged with the characters at all.
Round the Finlas Loop, warm & cloudy.
Creagan hill flora:
Mostly grass & deer grass, sparkling with wee flowers today.
Heather both ling & bog.
Heath bedstraw, cow wheat, tormentil, bog asphodel, bog cotton. Blaeberries.
Sphagnum and many other mosses.
Yorkshire fog and other grasses.
A young looking fox, all long legs & ears, runs out of a garden across the road, doubles back from the traffic. It runs between a couple of gardens so I cross the road & keek, the fox is sitting in the border looking straight back. A quick blurry phone pic & I leave quietly.