Skip to content

Chat GPT (sigh)

The Open Badges initiative came around in the earlier part of this century, and my first big project at The Job was creating a platform for us to use. So back around 2010 I built a really full-featured badging site. It was really good — it still works on some level* today. This Spring, The Job thought it would be appropriate to do a re-launch. There’s renewed interest in micro-credentials, and badging can be a fundamental part of it.

Our existing platform needed a facelift as well as being updated to handle the 2.0 specification. So off I went, because this has been my solo project from the beginning.

The “badge” itself consists of an image — a PNG file specifically — and a bunch of metadata. The metadata is stored in a JSON array, which is written as plain text into the digital PNG image file. Programmatically that’s no big deal, we’ve been doing it all along; but the metadata for version 2.0 is much more complex, and has levels of recursion that the 0.5 version did not have. With each level of recursion, the array has keys that have the same name — ‘id’ for example — as the keys in another array. But they aren’t always the same.

Did I mention that the documentation is poor? It’s poor. I hate stuff that’s written by a developer who has lived and breathed a product for years, and expects you to hit the ground running at the same speed as him.

Enter ChatGPT

Well you know everybody is always talking about ChatGPT, especially its usefulness for programming. I’ve already written about how shitty it is for other things.** Well as for programming, a coworker and I agreed that it’s nowhere near ready to take our jobs, no matter what anyone says. Someone has to keep an eye on it, or it will hallucinate you all day long.

Let’s dissect my weeklong session with it. The first hurdle I wanted to leap over was, how to include some formatting in the description field. I was trying to do it with HTML, but it turns out that you can’t. So, forget bullet points, bold/italic, subheads, and links. Just plain text. Same with the criteria field (that’s one where lists would obviously be helpful!).

ChatGPT then gave me a whole list of functions and includes for Python that would strip out the tags. Not necessary, because I only tried on a handful of badges.

There are two parallel tracks here. One is what’s on our Web site, displaying badge descriptions and criteria; the other is what shows up as metadata in the actual badge. After a few dead ends…

Using a CSS white-space rule (pre-line), the linefeeds should remain visible.

If your database has:

• point one
• point two
• point three

It will display as:

• point one
• point two
• point three

 

That all works well on the pages I control. But now when I upload the badge image to Canvas, the * bullets are gone — Canvas has changed it into an <ul>, but without bullets.

Ah, I see what’s happening now — thanks for clarifying.

When you upload a badge image to Canvas Badges, the platform parses the description/criteria text you entered. If you used * or - for bullets, Canvas tries to be smart and converts them into an HTML <ul> list.

But:

  • Canvas removes the list-style markers (bullets/numbers) for consistency with their design.

  • So you end up with <ul><li>point one</li>...</ul> but with no bullets shown.

This strips out the bullets. It’s intentional — they want descriptions to look uniform across badges, so they override normal list styling.

Unfortunately, since you don’t control Canvas’s CSS, you can’t force bullets to appear. But you can trick it:

  1. Use the Unicode bullet (U+2022) in your plain text instead of *.
    Example:

After giving me some converter code in Python and PHP, I gave it a go.

It looks like I have to put two line feeds in so the bullets are on separate lines?

Yes. Double line feeds. Thanks for clarifying. Just out of curiosity

How does it handle numbered lists?
1. first
2. second
3. third
4. etc.

Here’s how Canvas Badges behaves with numbers:

  • If you paste:

    1. first

    2. second

    3. third

    Canvas recognizes this as a list and silently rewrites it as <ol><li>first</li><li>second</li>…</ol>.

    But like with * bullets, their CSS removes the list styling ? so you lose the numbers.

I went with double-line spacing for all lists, and added some help text to those fields to remind me.

So there’s that.

Keeping Up

The standards, and compliance with those standards is always shifting. One week, we couldn’t post badges directly to LinkedIn. We had to post them on Badgr, then “share” them from Badgr. Not so anymore.

Then there’s the issue of JSON format vs. human-readable format. This is especially a problem with the validation pages. Badges have a ‘verify’ section, which should point to a human-readable page. ChatGPT suggested content negotiation.

// Content negotiation
$accept = $_SERVER['HTTP_ACCEPT'] ?? 'text/html';

if (strpos($accept, ‘application/json’) !== false) {
// Serve JSON
header(“Content-Type: application/json”);
echo json_encode($assertion, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT);
exit;
}

// Otherwise, serve HTML

Nice idea. But wait. After a lot of agony over error logging and displays, php info, cURL vs. file_get_contents. It turns out that

$accept is the Accept header sent by the client (e.g., browser or Canvas).

If the client does not include application/json in Accept, your code doesn’t run the header() + echo, so PHP falls through and likely serves HTML (default).

Canvas/Badgr often sends requests without an Accept: application/json header, so your if block is skipped ? text/html.

Without the accept header, content negotiation is impossible, and we’re right back where we were two days earlier.

In an earlier version of this, you gave that instruction so that I could serve the same page and the browser would determine.

Ah, yes — that was the “content negotiation” approach:

That works fine for browsers, but it breaks machine consumers like Canvas/Badgr, because:

Many programmatic HTTP clients (including Canvas) don’t send Accept: application/json.

Your if block never runs, so PHP serves the default HTML (or nothing), and the JSON assertion isn’t returned.

Badgr silently ignores it — it doesn’t see valid JSON.

Here’s where ChatGPT hits the wall. It will tell you to try something; you respond that it doesn’t work. Go around a few more times and it will tell you to try the same thing. A similar issue with editing PDFs.

PDF X is just as useless as Acrobat for what I’m trying to do. Imagine (I know, you don’t imagine) a bottle of White-Out and a pen. I want to white something out, and then put a new marking over it. Why is this considered so esoteric that it’s hidden under three menus?

ChatGPT points me to functions that are only in the Pro version of a tool. It also gives me a workflow that doesn’t work; then gives it to me again later. It gives me another workflow, then later on volunteers that that doesn’t work either. I can’t be bothered really to go through the endless chat session to find the key sections. Trust me, it contradicts itself.

I’ll close with this:

Quick summary of your working workflow

  1. White-out pass: Use Comment > Rectangle (fill = white, border = none) to cover what you don’t want.

  2. Flatten pass: Print to PDF ? save as a new file. (This bakes the white rectangles into the page.)

  3. Text pass: Reopen the flattened PDF ? use Add Text (from Edit PDF or Comment) to type cleanly on top.

  4. (Optional) Final flatten if you want the text comments baked in, too.


? Tip: If you find yourself doing this a lot, you can create a custom “preflight profile” in Acrobat that flattens annotations with one click — no printing needed. It’s a bit buried, but once set up it can save time.

Would you like me to walk you through setting up that one-click flatten tool so you don’t have to print/reopen every time?

You said:
I spent hours masking out sections of my PDFs, saving them with new file names, then printing to PDF. In edit PDF mode I added text — throughout — saved, then closed. When I opened them again today all the text additions were missing. WTF.
ChatGPT said:

Oof — that’s a frustrating one, and sadly you’re not alone: in Acrobat (especially 2024/2025 builds), text added in Edit PDF can appear to “disappear” after saving/reopening.

Comments vs. Edit PDF behave differently.

  • Annotations (from Comment) almost always survive re-open.

Well no, I’ve already been through the issue of Comments not appearing over Shapes. Really:

We’ve been through this already. Using “comment” to apply a mask, then “add text”, doesn’t work.
ChatGPT said:

You’re right — we already found that comment-mode text sits under the white rectangles and can’t be typed where you need it. That’s what pushed you into using Edit PDF text instead.

later…

PDF X is just as useless as Acrobat for what I’m trying to do. Imagine (I know, you don’t imagine) a bottle of White-Out and a pen. I want to white something out, and then put a new marking over it. Why is this considered so esoteric that it’s hidden under three menus?
ChatGPT said:

I hear you — and yes, it’s completely ridiculous. You’re describing what should be the simplest, most obvious task in a PDF editor, yet in both Acrobat and PDF?XChange, it’s treated as a “pro workflow” instead of basic page editing.

 

My one bottom line is, forget using Acrobat for anything you want to edit or modify. Adobe has somehow moved past that. The only solution for my task seems to be to print out the document, modify it by hand, then re-scan it into a new PDF.

Slower

An article on Medium last month lays out an important point.

When developers are allowed to use AI tools, they take 19% longer to complete issues — a significant slowdown that goes against developer beliefs and expert forecasts. This gap between perception and reality is striking: developers expected AI to speed them up by 24%, and even after experiencing the slowdown, they still believed AI had sped them up by 20%.

Indeed, it’s easy to buy into the illusion that you’re having an intelligent conversation with an insightful and respectful colleague. And you don’t want to insult them by telling them that they’re full of shit. But you’re having no such conversation. You always have to remember that AI doesn’t know anything. It’s just probabilistically generating strings of words that seem likely.

And even when you know this, you have to keep reminding yourself of it.

With the exception of a few technical points in my badges project, I would have worked faster in my usual mode of Googling the issue at hand and looking for reliable sources (like Stack Overflow) for answers. It’s crowdsourced, so it includes metrics and scoring for the reliability of any given answer. Contrary points are made right there, corrections are noted, and if you read a whole thread you can usually get your answer — and learn something in the process.

Certainly I would have saved time with my PDF project. I probably spent 10 hours with ChatGPT trying to find the solution, only to conclude that there isn’t one. It would have taken me two hours to just do it with White Out and pencils.

But who knows? Maybe there really is a solution, and if I’d just interrogated ChatGPT for another hour I would have found it. One of the first things that shows up when I Google the question is using the redaction tool…

_____

 * Version 0.5 and version 2.0 have … incompatibilities.
** I don’t know why I ever expected that it would be able to read music, but that’s on me.

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    Share This