> ## Content Index
> Fetch the complete content index at: https://www.autodidacts.io/llms.txt
> Use this file to discover other available public pages before exploring further.

# An extremely silly bug
- URL: https://www.autodidacts.io/an-extremely-silly-bug/
- Published: 2026-02-01T07:37:05.000Z
- Updated: 2026-02-01T07:38:41.000Z
- Description: 🐞
- Author: Curiositry
- Tags: 100DaysToOffload, Programming, JavaScript, Humour

It was one in the morning. I was coding a JavaScript front-end calling an API. Every time I hit the load data button, in addition to loading the data, the browser’s print dialogue would open. [Like this.](#1)  

I was suspicious, because I'd used a 3rd party slugify function with unicode regex that I didn’t really understand: 

```javascript
slug = slug.normalize('NFD').replace(/[\u0300-\u036f]/g, '')
```

Malware? I read about code almost this innocent-looking containing obfuscated malware-delivery, and also about researchers finding code snippets in the wild that display differently from what gets copy-and-pasted, so people might read them, and then paste and run them without *re-*reading them, and suddenly discover that they're curl-ing to bash and uploading all their SSH keys and crypto wallets.

I was also paranoid because I hand-code pretty much all my software without LLM assistance, but for this one-off script (gathering data for an Autodidacts newsletter, and not using any auth or non-public data) I'd generated the boilerplate code with an LLM. 

The answer, as foreshadowed by the title, was much more embarrassing and funny.

I had been writing a lot of Python. And I had added some logging to make sure the slugify function was working properly...

![🤦‍♂️](https://abs-0.twimg.com/emoji/v2/svg/1f926-200d-2642-fe0f.svg "Man facepalming")

![](https://www.autodidacts.io/content/images/2026/01/Screenshot_2026-01-27_00-02-46.png)

That’s right. I had used Python’s `print("Message")` for logging instead of JavaScript’s `console.log("Message")`. And, guess what `print()` does in JavaScript!