A hard-charging, sleep-deprived new dad popped a squat on the floor of a subway train with his laptop to get some work done — only to end up the butt of a joke on the Internet.

“Being a workaholic is no excuse for being an assh—,” sniffed a holier-than-thou Reddit poster named GundamCheerios, who attached a photo of the Washington Heights dad typing on the floor of the No. 1 train.

Nasty commenters derided him as not a “true NYer” — because a local would never sit on a grimy subway floor.

Some 400 Reddit readers had weighed in by the end of the afternoon.

The dad, “David,” an exhausted 30-year-old student with a 4-month-old girl and a 2-year-old boy, took to the Web to defend himself after a friend spotted the post.

“My wife and I generally sleep 3-4 hours on a good night,” he said. “Usually I manage to get a [seat], but I got delayed at daycare this morning, hence this pitiful situation. I hope poor sods such as myself will be your greatest sources of consternation in life.”

David is pursuing a Ph.D. in computational biology, and told The Post he was reviewing comments from his adviser when the picture was taken. He claims he stood up when passengers boarded at 96th Street, and was able to nab a seat when the train reached 72nd Street.

“I apologize for inconveniencing you — personally, I did not feel that the train was so packed (the aisle was quite empty),” he added.

But his move to a seat enraged one critic named donat28.

“So he tracked all the s–t, puke, and everything else found on the ground in a city of 10 million+ and he brought it right to the seat,” he snipped. “Not to mention it’s hard enough as is to move on the subway without having to watch out for some douche huddled on the ground because he thinks his problems are more important than yours.”

David said he wasn’t upset by the mean comments, just amused that he generated so much buzz.

“Usually I have a seat, and don’t sit on the floor. All of the seats were taken,” he said. “And I thought: Should I raise my book, sit on the floor — what’s the worst that could happen if I sit on the floor?”

He said he didn’t expect a monster Reddit thread, and added that his friends and family were amused.

Other users were more forgiving of the stressed-out dad.

“I usually sit on the floor of a train, because I am drunk and cannot stand,” posted kingrobcot from Bushwick, praising the father’s dedication to his “extreme” life choices.

Many praised his work ethic.

“Cheers to you for sneaking in a few minutes of extra work where you can!” one poster said.