Show HN: Preview Your HN Post Before Posting (Because I Messed Up Mine)

hnpostformatter.blancotech.com

4 points by blancotech a day ago

Hey HN,

I finally decided to stop lurking and posted on HN only to be discouraged by the confusing formatting rules. So I built a formatter https://hnpostformatter.blancotech.com.

Some backstory. When I went to post, I discovered a mysterious formatting system not known to the regular person https://news.ycombinator.com/formatdoc. Simple, I thought. I'm sure there are like 50 formatters other patrons like me on HN built, that I can use to format before posting.

I searched, and of course I found what I needed here. https://news.ycombinator.com/item?id=42820896. "Show HN: Preview your Hacker News post before posting (hackernewspreviewer.vercel.app)" by brightvegetable with sadly 3 upvotes.

But, upon visiting this, I realized it simply puts your title in a list of other posts like you're the top voted post. While I sat there admiring my top post in this simulated world, I wondered if this was all the satisfaction I needed. Did I really want to put my ego on the line and post, for real? I decided yes.

Thus I followed the formatting guide and posted. To my horror... everything was misformatted. My chances to reach the top of HN were doomed if I could not fix my err quickly. I felt the weight of millions of eyes viewing my misformatted post. I edited, saved, refreshed and it was still wrong. After a few more time I got it to look right. Crisis averted? Maybe not... that post got <9 upvotes https://news.ycombinator.com/item?id=43070686.. and it definitely wasn't because folks do not care about my product :).

Then I realized... I could waste an afternoon building a post formatter. To start, I spun up my Cursor AI, cracked my knuckles, and made an empty folder. Then I told the agent to make me a Hacker News post formatter following the formatting guidelines. Seconds later I had the app here built and deployed. The world no longer needs software engineers. All was well.

Except that’s not what happened. Cursor and my buddy Claude did a great job at making the scaffolding. They did a terrible job at writing the formatting code. It kept mixing in Markdown logic, writing regexs that didn’t fully meet my needs, and worst of all, not sanitizing the user’s inputs before rending them as html to preview.

But maybe I was a bad conductor of this AI Orchestra? It made me suspicious of the HN formatter guide and thus I needed to test out how this all really works on the site. So I posted this https://news.ycombinator.com/item?id=43105408 to test out formatting gotchas, and to my surprise a mod found it almost immediately and flagged it. Then, after some unknown time, I could no longer edit it to test my theories. Instead of giving up or spamming more fake posts on this beautiful site, I started scanning others’ posts to see how their formatting looked. This led to some discoveries in my (hopefully clearer) formatting guide on my site.

But, honestly, the mystery of HN formatting still whispers to me and taunts me in the night. I know I didn't get it perfect.

So, I ask you all, what weird HN formatting quirks have you discovered? Let’s document them together so nobody else has to wonder if their post flopped because of formatting instead of their idea.