[ad_1]
[ad_2]
liver
Source link
Humor | ReportWire publishes the latest breaking U.S. and world news, trending topics and developing stories from around globe.
[ad_1]
Local trans teen Billy Johnson who was born Mary Lovelace devised steps in a hellish plot to secretly transition into a male.
Her dad Racoon Lovelace spoke of his struggles to adapt to his daughter’s condition, “My therapist advised me to allow her to use my oversized shoes, so she could identify as a guy, by walking in my shoes.”
She told reporters Tuesday that she had hatched a nefarious plot to undergo years of medical treatments and counseling to finally be allowed inside of the men’s bathroom, the sacred holy temple of transgenderism.
Her second mission in life is to travel an arduous journey to penetrate the world-renowned Vatican, the unspoiled holy ground of Christendom.
She said she would first flatter health care professionals, receive hormone therapies, and undergo complex gender-affirming procedures. Following this, she will build her resume for acceptance at the Westminster Abbey School for Choir Boys.
“I shall learn to sing like an angel at the school and like Juda I will be presented to the Pope at the Vatican. Then he shall allow me to live in the Vatican as a devoted servant. I will fetch him food in his favorite feed bowl. I will take away the dirty laundry and have it washed. I will be a personal courier and run secret messages for the Vatican like in gothic times. I will sing songs and rehearse bible stories in their great halls pretending to be Lucifer in repentance. I will wash the feet of visitors and tourist to channel Jesus. He will take me everywhere to sing for the churches like Farinelli once did. My dreams will finally come true, and my life will be complete,” says Mary.
Her mother tried to institutionalize her at the Arkham Asylum at an early age to save her from insanity, but her adoring dad Racoon intervened and stopped it.
He instead threw his wife in the Arkham mental Asylum, so he could free himself to marry a younger woman.
[ad_2]

[ad_1]
We've already picked on bad logging code this week, but we haven't picked on PHP in awhile, so let's look at some bad PHP logging code, from Kris.
$path = self::getPath();
if (file_exists($path)) {
$content = file_get_contents($path);
} else {
$content = "";
}
$content .= "n" . date('Y-m-d H:i') . " | " . $message;
file_put_contents($path, $content);
This is the interior of the log function, which takes a logging message and outputs it to a file.
The "magic" in this code is the call to file_get_contents, which loads an entire file into memory as a string. This is done for every log message. We load the entire file, append the new message, and then write the entire string back to the file. And, I'm not certain about PHP's concatenate implementation, but if it's like most languages, strings are immutable, and I suspect this makes a complete copy of the original file contents as part of concatenation.
For small log files, this is bad. This particular application frequently ended up with multi-gigabyte log files. This, as it turned out, wasn't good for performance, but was an excellent way to use as much RAM as possible and stress test their disk.
[ad_2]
Remy Porter
Source link

[ad_1]
A driver has been arrested on charges of threatening to kill or harm the president, vice president, or their family members after he allegedly plowed a U-Haul truck into security barriers near the White House while carrying a Nazi flag. What do you think?
“I just hope this doesn’t perpetuate the stereotype that all Nazis are bad drivers.”
Lance Boor, Unemployed
“Weirdly, that’s the only thing fully covered under U-Haul’s insurance.”
Debbie Harkonnen, Freelance Folder
“So now anyone with a Nazi flag trying to kill the president is automatically a Nazi?”
Jonas Rangel, Pet Haberdasher
[ad_2]

[ad_1]
Strings in C remain hard. They're complicated– they're complicated because of null termination, they're complicated because of memory management, they're complicated because of the behaviors of const. There's a lot going on in C strings.
But Alice had a simple case: convert a true or false value into the string "true" or "false". Let's see how her co-worker solved this:
char* __comps_num2boolstr(COMPS_Object* obj) {
char *ret;
char *_bool;
if (((COMPS_Num*)obj)->val) {
_bool = "true";
} else {
_bool = "false";
}
ret = malloc(sizeof(char) * (strlen(_bool)+1));
ret[0] = 0;
strcat(ret, _bool);
return ret;
}
The __ at the top leads me to believe this is their convention for making the function "private"- it's not meant to be called outside of this specific module. Also, this has the specific job of turning a boolean value into a string, so it seems awkward and weird to pass a whole structure, only to cast the structure into a different type and access a member. What could be a handy utility method has been overspecialized.
But that's not where things get weird.
This starts by assigning a static, hard-coded string into _bool. Then it allocates a buffer for ret, and uses strcat to place the contents of _bool into ret, so that ret can be returned.
We'll come back to why the entire premise of this method is absurd, but let's take the method at face value and look at what's wrong with the implementation as it stands.
Everything about how they fill the buffer is confusing and weird. First, they use strcat when they could have used strcpy, removing the need for the ret[0] = 0 (which terminates the string at the first character).
But even if they used strcpy, that'd be weird, because they could have gotten rid of the malloc and the null terminator, and just used strdup which does all that for you.
But all of that is completely unnecessary, because you can just do this:
char* __comps_num2boolstr(COMPS_Object* obj) {
if (((COMPS_Num*)obj)->val) {
return "true"
} else {
return "false"
}
}
String literals like this are implicitly static const char*, which means they live for the life of the program, and thus that pointer is always valid. Attempts to modify that literal would have undefined behavior, but given that this function's job is to create strings to be fed into printf calls, that's not a problem in this case.
[ad_2]
Remy Porter
Source link

[ad_1]
Chick-fil-A’s first-ever restaurant, located in a mall in Atlanta, GA, has closed after more than half a century in business. What do you think?
“And nearly all those years desegregated, too!”
Caroline Beeghley, Grievance Creator
“No doubt some massive fast food chain came along and put them out of business.”
Owen Jahlon, Unemployed
“A good reminder that no chicken sandwich can bring you eternal life.”
Wes Lankford, Zipper Inspector
[ad_2]

[ad_1]
Anything where I risk injury if I fall, crash, whatever.
I remember being so fearless on skis, roller skates, skateboards and all the things when I was younger. Now I just think of how I could fuck myself up.
Having a keener sense of your own mortality sucks.
[ad_2]
Bob
Source link

[ad_1]
The list of things never to write yourself contains some obvious stars: don't write your own date handling, your own encryption, your own authentication/authorization. It's not that no one should write these things, it's that these domains all are very complicated, require a great deal of specialized knowledge, and while easy to get almost correct, they're nearly impossible to get actually correct. If you embark on these tasks, it's because you want to create a product that solves these problems, hopefully not because you've got a terminal case of NIH syndrome.
While it's not as big a star on the list, another domain you probably shouldn't try and solve yourself is logging. Today's anonymous submission isn't the worst home-grown logging I can imagine, but it's got enough bad choices in it to merit some analysis.
#!/usr/bin/python
#
# A Logger to append text to a file
# No support for multiple processes sharing the same file (one to one for now)
# Add locking support later if we need it.
#
import datetime, traceback,os
class Logger:
"Simple logger to append text to a file"
def __init__(self, logFileName):
assert os.path.isabs(logFileName), "Path must be absolute path"
assert os.path.exists(os.path.dirname(logFileName)), "Directory: " + os.path.dirname(logFileName) + " doesn't exist"
self.LogFileName = logFileName
def log(self, msg):
try:
fh = open(self.LogFileName, "a+")
try:
now = datetime.datetime.now()
fh.write( now.strftime("%Y-%m-%d %H:%M:%S") + " " + msg + "n")
finally:
fh.close()
except:
print "Error: can't open file or write data"
print traceback.format_exc()
Right off the bat, I'm concerned about the shebang. It's not wrong, but when a file contains clear library code, I'm suspicious about the intent of running it as a script. It might be because it supports some unit testing, but… let's be realistic. Nobody wrote tests for this.
This particular code came from our submitter's senior devs, and it shows, because they add some asserts for defensive programming in the constructor. The requirement that the input in an absolute path is mostly a choice, but in my mind, a sane logging library should be able to handle relative paths, and while this code predates PathLib, even in older editions of Python, resolving paths wasn't a huge task. Still, that's not a WTF, and it's explicitly a "simple logger", so we shouldn't pick on it for missing features.
Let's pick on it for bad choices, instead.
For every message we want to log, we open the file, write the message, and then close the file. I know that, if we're using Python, we've already given up on high performance code, but every logging message has the overhead of opening a file. "No support for multiple processes" indeed.
Even better, however, is the exception handling behavior. If we try to open the file and fail, we print out an error message. But, if we succeed in opening the file but fail to write to it- the logging message is lost and no error is reported. Here's hoping this never runs when the disk fills up.
Remember how I, without evidence, said "nobody wrote tests for this"? This code also provides the evidence: the fact that the act of logging opens the file, fetches the current time, formats the message, writes the message, and closes the file all in one function makes it pretty much impossible to actually unit test this. Maybe, maybe they've written some kind of functional test that logs a bunch of messages and then checks the result. But it's far more likely that the developer just ran the program, visually confirmed the output, and said, "It's good."
Now, if you'll excuse me, I have to get back to implementing logging myself- using a set of well-tested and well-understood libraries.
[ad_2]
Remy Porter
Source link

[ad_1]
A new study has found that New York City is sinking 1 to 2 millimeters each year in part due to the extraordinary weight of its skyscrapers, worsening the flooding threat posed to the metropolis from rising seas. What do you think?
“Sorry, but Midtown needs 50,000 perpetually vacant apartments.”
Laszlo Gibbs, Allium Specialist
“I remember 50 years ago when we were floating 3.94 inches above sea level.”
Bradley Nelms, Systems Analyst
“It’s a good thing they’re so tall.”
Ophelia Andresen, Lunch Consultant
[ad_2]

[ad_1]
Drunken, disorderly, rodeo HOE – (Colorado’s embarrassment)- “Gun slinger slut” Boebert… promises to out scoot Wyatt Burp.
Bankrupt, broke in 2019- Lauren “side hustled” (GOP prostitution escort).
Pouring booze (and whatever else) for entitlement “cheap shots” like Senator Ted Cruz-
Cruz’s generosity- bounced “bankrupt Boebert”- $300,000.00 – (flea checking).
Rhinestone saddle$, Campaign BUMP$, Colorado whore…
hushola.
FACTS: (deceptively) hidden til now- under Boebert’s half pint sheriff’s hat.
PROOF: Godless evangelical’s DON’T care-
Boebert’s a failed prostitute, using
RELIGION as “tramp stamp” BRANDING.
Rumor is…UNEDUCATED Lauren Boebert terminated “embryonic Cruz” for her tin MAGA badge and golden Congressional feed trough credentials.
“Gump starting” Lauren’s RED LIGHT tanning bed.
BLAME- TED’S “TRUCKING” antics.
Boebert SHAMELESSLY LATE TERMED “embryo ted” at a Glenwood abortion clinic-
(Senator’s unclaimed saddle sore).
YOU Herd it hair FIRST folks… Cruz- financed Boebert’s “HOEdown” RIOT into Congress.
Ted Gump (and evangelical) scripture reads-
“SHIT HAPPENS”.
Insurrectionist trailer trash Lauren RESHUFFLES a cow pokered HISTORY with BORED AGAIN, FASCIST PIGSHIT -every trough.
Lauren’s arrest record husband- (industry owned petroleum consultant)-bone dry wells- GUARANTEED.
Boebert paid off her own in-laws to “keep quiet” about a near death ATV accident (she caused) in Utah.
Boebert STILL serves Colorado voters UNSANITARY, food poisoned, pork sliders- (HER -relentless diarrhea- rodeo- RERUNS).
Lauren TVs as Jerry Springer- vulture capitalism.
Jan 06 DC (line dancing) Boebert… Chuting GRIFT into Trump’s slaughterhouse.
Sack racing Cruz- Barebacked, buck STARVED Boebert.
BOTH pork barrel sliders- callEM…Hoe $ee Doh.
Their chomping “BIT”- convincingly, sassy, stupid, bitches-
Their “LEAD” –blinding hypocrisy-
Signed: Glenn Jones
[ad_2]
Glenn Jones
Source link

[ad_1]
The news, even that about stolen Bitcoin, doesn’t need to be complicated and confusing; that’s what any new release from Microsoft is for. And, as in the case with anything from Microsoft, to keep the news from worrying our pretty little heads over, remember something new and equally indecipherable will come out soon:
Really all you need to do is follow one simple rule: barely pay attention and jump to conclusions. So, here are some headlines today and my first thoughts:
… Which also is the closest Trump will get to ever becoming an actual billionaire.
But she didn’t phrase it as a question, so it doesn’t count.
Apparently, at Fox News, the Dominions keep falling!
In fairness, when he heard someone scream out G7, he thought he had won at BINGO.
Bad news: Fewer lobsters. Good news: They’ll be ready to eat.
Would’ve gotten away with it if she hadn’t asked them to break a couple of 100 thousand-dollar bills.
Don’t worry, good chance he doesn’t remember it, either.
Too bad it wasn’t Russ Westbrook, that dude can’t hit anything!
When DeSantis said he’d take care of Parks and Bridges… turned out he meant getting rid of Ruby Bridges and Rosa Parks!
Sounds like someone just wants to be JLo from the Blockbuster.
If your Mom saw her shadow that means six more weeks of guilt.
Ain’t that the stuff that almost killed Lois Lane?
Ironically, his luggage went to the correct location.
If you could turn back time, there’d be fewer plastic surgeons driving BMWs.
… Apparently, by Jesus, she meant the pool boy…
[ad_2]
Paul Lander
Source link

[ad_1]
Dispatches from SNN (Slobovian News Network)
SNN Continental Cuisine reporter Maters N. Taters reports that Slobovian billionaire Sir Upon Downstroke is suing the world’s most expensive and glamorous restaurant, The Diamond Fork and Spoon in New York City, over his dissatisfaction with a bowl of She-Crab Soup, which reportedly costs $2,374.00.
Last Saturday, Sir Upon flew in his private jet from Stanckt, Slobovia to NYC, to have lunch at the restaurant. He ordered a bowl of the soup, a plate of seafood biscuits that go for $1250.00 a piece and a $1400.00 beer.
When he received his order and tasted the soup, he complained to the management that the soup did not taste right. He then poured the soup into a thermos and told one of his footmen to take it to the world famous Harlem Shuffle Labs to have it analyzed. He waited in the establishment an hour until his man returned with the lab report.
When the servant returned with the lab analysis, Sir Upon was livid. The report stated that there was indeed a problem with the soup. Instead of using real She-Crab, the dish had been made using male crabs that gender-identified as female.
He informed the owners of the restaurant that he intended to sue for the price of the meal plus 76 million dollars for gastronomical pain and suffering.
Incidentally, the cheapest item on the menu at The Diamond Fork And Spoon is Diamond Peanut Burrer and Jelly sandwich, with real diamonds in the peanut butter, for just $972.50.
“The doctor told me if I didn’t stop drinking I would lose my hearing. I told the doctor the stuff I been drinking is a hell of a lot better than the stuff I been hearing.“ — Comedian W.C. Fields.
“Quit crying and start sweating.” — President Jimmy Carter.
“The reason Noah had two kinds of every animal on the Ark was because he liked to watch.” — Chuck Barris, The Gong Show.
[ad_2]
Ted Holland
Source link