News for hackers. Stuff that matters.

mpetrovich

Here's a JS bookmarklet I use to apply dark mode to any website. It tries to preserve colors and avoids inverting graphics. Add a new bookmark to your toolbar and paste in that JS in place of the link. I hope you find it useful!

https://gist.github.com/mpetrovich/b3e4ec291d21bbdbe17b1adf4...

Re:Fuck it, make it anyway on Saturday September 12, 2026 @10:42AM (#49672815)
You took the words right out of my mouth. Writing code used to force you to understand it, but now the former doesn’t guarantee the latter. And most attempts to replicate the latter in other ways (more reviews, self-quizzes, etc) seem to be far less effective at producing deep understanding.
You can also taper off by reducing dosage one day of the week at a time. Thats how I tapered off a 10mg Escitalopram prescription: every 4 weeks, I added another day of the week where I reduced my dosage by 5mg. Took about a year to fully taper off and had to pause for a month here and there to stabilize, but it was worth it.

However, it was equally important that I had a support structure & tools to replace what the SSRI was doing. For me that was mindfulness and therapy.

Re:Half-Baked Product on Friday July 03, 2026 @07:10AM (#48773612)
The classic solution-in-search-of-a-problem.

If the founder had started by talking with people in the problem space, he could have discovered what problems were actually worth solving before investing any money and effort into a product.

Everything after that happened were downstream effects of creating something without a defensible reason why and for whom.

Re:The Website Specification on Sunday May 31, 2026 @06:58AM (#48344713)
I suspect they ask for email first in order to determine whether to log you in via SSO vs. require a password.
Re:PHP's Oddities on Sunday May 24, 2026 @02:44AM (#48255021)
I found php’s array methods lacking as well. The inconsistencies are a pain. I ended up porting many of the methods from lodash, underscore, etc. to php: https://github.com/mpetrovich/dash

Maybe you’ll find it helpful

Seems inferior to C2PA, which is actually an open standard: https://contentauthenticity.org/
If that’s true and they do intend on shredding their copy on sale, what stops GitHub from buying it back themselves? (through a proxy, obv)
Re:You need to calm down on Wednesday May 13, 2026 @08:12AM (#48120896)
AI isn't changing the fundamentals of building software. It's changing the speed. Don't confuse the two.
Some feedback: show example input & output without requiring me to create an account.

Looks interesting, best of luck!

Reminds me of this open source library I wrote to do the same thing: https://github.com/nextbigsoundinc/imagely

It uses puppeteer and chrome headless behind the scenes.

Good point. What if we combined the best of both: more realistic images from tpdne.com and API-accessible metadata from your site?

Seems like a matter of crawling the former to get all the images and then tagging them and serving them via your API.

Anyway, I think your approach is great and only wanted to propose a possible approach to the original feedback above :)

Perhaps something powered by thispersondoesnotexist.com would better for that. That site returns completely AI-generated faces that seem much more realistic and candid.
The demos on the Jolly Roger site are hilarious. The bot sounds so realistic, and the bot even had the audacity to ask the scammer, “Are you a real person?!”

“Hold on, there’s a bee on my arm”

Re:Is ORM still an anti-pattern? on Tuesday June 27, 2023 @04:56PM (#36498526)
In my career, the biggest problem with ORMs I’ve used is something the author touched on:

They can be terribly leaky abstractions. It seems that many ORMs end up re-implementing SQL in their own domain-specific language.

However, an understanding of SQL is often needed to debug and optimize ORM queries.

So why not just use SQL directly then?

My goodness, this describes me perfectly as well. The countless choices of a blank slate brings anxiety to a recovering perfectionist like me. Do I choose A or B or Z?

I prefer improving things rather than creating them from nothing. I’ve come to a similar conclusion as the author as far as how to get out of the fog of greenfield: Satisfice instead of optimize.

In this context, optimizing refers to choosing the best among N options. In contrast, satisficing means choosing the first option that’s good enough. Often, the opportunity cost saved from satisficing is greater than the marginal value gained from optimizing.

No, he’s talking about the movie. You know, the one with the sub.
Oh, so you’re saying that omitting the version from the header will ALWAYS return this specific version, NOT the latest version?

That certainly addresses the footgun I mentioned.

EDIT: From the docs: Requests without the X-GitHub-Api-Version header will default to use the 2022-11-28 version.

You’re saying that it’s LESS likely to specify the API path at the callsite than the HTTP header? o_O
I agree with you, so then why not stick with the previous /api/v2 url approach?

And it would annoy me far more if my app that talks to GitHub inexplicably breaks in a few years because of a release I wasn’t aware of.

These changes make no sense to me.

Making the version optional is a bad idea, IMO. It lets consumers use your API without versioning, which is like telling them, “here, create a time bomb that may or may not explode when the next breaking api change is released.”

There’s zero practical user benefit to NOT specifying the version, so why not enforce it? You’re creating a footgun otherwise.

Furthermore as others have pointed out, this is a purely cosmetic change. Using /api/$UNIQUE_STR in the URL vs. X-GitHub-Version: $UNIQUE_STR in the header are functionally equivalent, so…

Why bother making this change then? What was suboptimal about the previous way? What benefit does this bring?

Re:Intentionally Making Close Friends on Monday November 28, 2022 @03:25PM (#33779042)
The systems angle mentioned later in the article may seem a bit …engineered, but it works!

I’ve moved a ton in my life, and I have an annoying habit of losing touch with friends when I move away. Out of sight, out of mind, ya know?

Anyway, to combat this annoying habit, I started scheduling monthly phone/video calls with each of those friends. It’s been a game changer, especially as folks have kids and busy lives.

Re:Show HN: I made a sliding puzzle game on Saturday November 26, 2022 @12:41PM (#33754782)
I hadn’t considered it since it’s mobile-first, but that’s a great idea to try!

I imagine that the arrow keys would control the movement of the empty space, right?

Show HN: I made a sliding puzzle game

https://tileslide.com/

Inspired by another recent puzzle game [1] and bored at home while sick with the stomach flu, I decided to create a mobile-friendly version of the sliding-tile puzzle game that I once played as a kid.How to play:1. Tap a square to move it to the empty square.2. Repeat until you've unscrambled the image.Options:- Allow swapping: Any image square can be moved to the empty square. (Easier)- Only...

( Read More... | 3 comments | 2 points | on HN )
Re:Show HN: I made a pretty relaxing puzzle game on Wednesday November 23, 2022 @08:14PM (#33726713)
Really fun! This inspired me to create my own version of the sliding-tile puzzle game that I used to play as a kid: https://tileslide.com/
Re:Apple Interview – 1995 on Tuesday July 26, 2022 @07:50AM (#32237020)
Anyone else remember playing Glider? As a young kid, I gladly lost countless hours trying to navigate a paper airplane through a Rube Goldberg mess of obstacles. What a fun, imaginative game.

Would be cool if there was an emulated version somewhere. Or we could borrow the author’s book and transcribe it to a modern language, ha.

Re:Implementing strict three-point perspective on Saturday June 05, 2021 @06:03PM (#27408788)
Back in college I wrote a 3D rendering engine using what seems to be a similar method as the OP. I always thought the results looked a little strange... https://github.com/mpetrovich/CUB3D
Re:Ask HN: Who is hiring? (June 2021) on Friday June 04, 2021 @02:54PM (#27397557)
Pandora + SiriusXM | Product Manager | Remote | Full Time

Product Manager, Data Platform & Enablement

Want to be a product manager on a team that helps the largest audio entertainment company in North America understand and act on its listenership?

Apply here: https://jobs.jobvite.com/careers/siriusxm/job/oU6KffwJ

100% remote friendly. NO formal product management experience required. Folks with non-traditional backgrounds should apply!

Re:New in PHP 8 on Monday February 03, 2020 @08:45AM (#22224049)
You might also be interested in Dash: https://github.com/mpetrovich/dash

Older »