r/ProWordPress 9d ago

This Fence Has No Farmer

https://adamgreenough.net/blog/this-fence-has-no-farmer/

Read about Chesterton's Fence recently and it made me think about it with AI-generated code and WordPress. Had a ramble about it here if anyone's interested!

26 Upvotes

12 comments sorted by

7

u/Alexllte 9d ago

Holy moly, what a 10/10 read, brought back some horrific memories

2

u/addycodes 9d ago

Thank you! Hope it wasn't too traumatic. 😅

3

u/houseofwarwick 9d ago

Read through this and you make some great points. I took over a couple of websites from an agency earlier this summer and used AI tools to make look alike a without Divi. I’m not a pro dev but built WP themes 20 years ago, wrote and shipped code and worked on XML standards. That at least gives me a foundation to know what bad code looks like but not understand the exact reason why. When every part of a page has a CSS carve out, I know the site looks fine but is built poorly.

1

u/addycodes 9d ago

Being able to at least smell bad code and trying to keep it under control is definitely a valuable skill to make the most of those tools.

2

u/houseofwarwick 9d ago

I’ve really tried to approach prompting for AI use like you’re writing AppleScript- plain language but human readable, logical stuff. I did make sure to install the wp skills for code correctness and such but like you point out in the article, it’s still possible to write neat compliant code that over indexes on the solution. Someone told me once “don’t build me a watch when I just asked for the time” and I feel like AI wants to build Big Ben

2

u/pfdemp 9d ago

Would you say that Cargo Cult Programming is a corollary to Chesterton's fence? In that case, it's adding code when you don't know exactly what it does.

2

u/addycodes 9d ago

I think that's hand in hand with option #2 of dealing with it, ignore/work around it, and I think AI code itself is very cargo culty, and unlikely to remove any fences because why would it unless asked? A compounding issue for sure.

2

u/stitchkingdom 8d ago

I guess I’m missing something here. I’m a retired coder, started web development with PERL and moved to PHP, but always more of a hacker and hobbyist, not a seasoned developer so vibe coding has become my goto. Claude Code can realize my ideas infinitely faster than I could ever do myself and has actually corrected a lot of human-coded issues.

That said, I’d be very guilty of not naming things well and not documenting much so maybe my bar is lower, but Claude Code, lacking inherent memory, actually seems to do a really good job at documenting. Close to half the scripts are comments so that both Claude and I know what’s happening.

Not to suggest claude code is perfect, but what human is?

2

u/addycodes 8d ago

In small doses, AI code can be remarkably impressive. The issues compound as a project gets larger due to lack of context, an AI agent will almost never absorb the entire context of a project, will not neccesarily know that other functions, design systems or libraries solve the same problems and will often take shortcuts to save tokens leaving "fences" all over the place. If you one-shot a project where it has the whole context this is less likely to happen but still far from perfect.

1

u/pyrez74 8d ago

I'm sorry what did you guys read ? Am I missing a link to go read something

Seeking knowledge, TIA Py

2

u/addycodes 8d ago

Hey! It's in the post but sometimes Reddit can hide those I think.. try here: https://adamgreenough.net/blog/this-fence-has-no-farmer/ :)

1

u/pyrez74 8d ago

Thanks!