Had a simple but annoying task today: take a massive block of text (no spaces) and split it into 5-character chunks.
You’d think AI could handle this easily, right? Wrong. Ask ChatGPT or Claude to manually split a long string into 5-character blocks and watch it hallucinate, drop characters, or just give up halfway through.
I hard working engineer would whip up a function and put it on a web page or in the javascript console. I’m lazier. I asked DeepSeek (my AI for trash usage) “give a javascript function that will split a block of text into 5 char blocks”
And it delivered this gem:
function splitIntoFiveCharBlocks(text) {
const cleanText = text.replace(/\s/g, '');
return cleanText.match(/.{1,5}/g) || [];
}
Then I asked it to write that as an HTML page that would write teh results to the page with my text block. I pasted it into JSFiddle, and BOOM – perfect output in seconds. Click here to see the results.
The lesson?
- Don’t ask AI to do repetitive manual work (it will fail)
- Ask AI to write tools that do the work for you
- Pair it with quick prototyping tools like JSFiddle, CodePen, or even the browser console
Sometimes the smartest solution isn’t the most complex one. It’s just knowing how to combine the right tools.
Ever used AI + JSFiddle for a quick win? Share your story below!
Leave a Reply