Skip to main content
pcloadletter

Defending myself against defensive writing

I write this blog because I enjoy writing. Some people enjoy reading what I write, which makes me feel really great!

Recently, I took down a post and stopped writing for a few months because I didn't love the reaction I was getting on social media sites like Reddit and Hacker News.

On these social networks, there seems to be an epidemic of "gotcha" commenters, contrarians, and know-it-alls. No matter what you post, you can be sure that folks will come with their sharpest pitchforks to try to skewer you.

I'm not sure exactly what it is about those two websites in particular. I suspect it's the gamification of the comment system (more upvotes = more points = dopamine hit). Unfortunately, it seems the easiest way to win points on these sites is to tear down the original content.

At any rate, I really don't want to continue modifying my behavior to accommodate bad faith actors. This is called defensive writing and is an unfortunately common occurrence giving how people tend to behave on the Internet, especially in software development circles on these social networks.

Some might argue I need thicker skin. I don't think that's really true: your experience on the Internet is what you make of it. You don't have to participate in parts of it if you don't want.

Also, I know many of you reading this post (likely RSS subscribers at this point) came from Reddit or Hacker News in the first place. I don't mean to insult you or suggest by any means that everyone, or even the majority of users, on these sites are acting in bad faith.

Still, I have taken a page from Tom MacWright's playbook and decided to add a bit of javascript to my website that helpfully redirects users from these two sites elsewhere:

try {
	const bannedReferrers = [/news\.ycombinator\.com/i, /reddit\.com/i];
	if (document.referrer) {
		const ref = new URL(document.referrer);
		if (
			!/bad-networks/i.test(window.location.href) &&
			bannedReferrers.some((r) => r.test(ref.host))
		) {
			window.location.href = "https://www.pcloadletter.dev/blog/bad-networks";
		}
	}
} catch (e) {}

If any users are sent to this website from Reddit or Hacker News, they'll be send directly to this here blog post. That will get the link removed pretty quickly from these sites as the link will not take users to the intended content.

After implementing this redirect, I feel a lot more energized to write! I'm no longer worried about having to endlessly caveat my work for fear of getting bludgeoned on social media. I'm writing what I want to write and, if for those of you here to join me, I say thank you!