[ad_1]
“Me in 1988 at 9 yrs old. Permed mullets rock.”
(submitted by IG @hawkeye_girl11)
The post The Two-For-One appeared first on AwkwardFamilyPhotos.com.
[ad_2]
Team Awkward
Source link
Humor | ReportWire publishes the latest breaking U.S. and world news, trending topics and developing stories from around globe.

[ad_1]
“Me in 1988 at 9 yrs old. Permed mullets rock.”
(submitted by IG @hawkeye_girl11)
The post The Two-For-One appeared first on AwkwardFamilyPhotos.com.
[ad_2]
Team Awkward
Source link

[ad_1]
“This is the first time my Dad held me and my brother, making us a family of 6. Try for a daughter they said. It’ll be fun they said.”
(submitted by @thatweirdgirlkj)
The post The Double Down appeared first on AwkwardFamilyPhotos.com.
[ad_2]
Team Awkward
Source link

[ad_1]
WASHINGTON—Having long sought to place a viable alternative to Donald Trump at the head of the party’s ticket, top GOP power brokers finally decided Thursday to rally behind the late Herman Cain for president in 2024. “After much discussion with my fellow Republicans, I have decided to back Herman Cain as our party’s presidential nominee,” Senate Minority Leader Mitch McConnell said in an announcement that followed similar statements from candidates Ron DeSantis, Nikki Haley, Mike Pence, and Chris Christie, all of whom dropped out of the race to endorse the Covid-19 victim and former Godfather’s Pizza CEO. “Though some may raise concerns about his lack of prior electoral success and his current status as a deceased person, those are all merely distractions. A lot of people forget Mr. Cain was our party’s frontrunner in the 2012 race until he was sidelined by accusations of sexual misconduct, something that is no longer an impediment to a Republican seeking public office. And polls show swing voters and independents are more likely to see him as a sympathetic figure since his tragic death three years ago.” A Quinnipiac University Poll released earlier this week found that nine in 10 registered voters described Cain as only “slightly less alive” than President Joe Biden.
[ad_2]

[ad_1]
Today’s anonymous submitter sends us some PHP exception logging code. This particular code shows a surprising understanding of some clever PHP tricks. Unfortunately, everything about it is still wrong.
try {
} catch (Throwable $th) {
ob_start();
echo($th->getMessage());
var_dump($th);
$ob = ob_get_contents();
ob_end_clean();
error_log($ob);
}
The purpose of this code is to log the exception message, and a string representation of the thrown exception, including its key properties. Now, a normal developer would just take advantage of the Throwable‘s built in string conversion to get that information. But for whatever reason, this developer didn’t want a simple, short, human-readable version. They opted to use var_dump, a handy PHP debugging function which dumps an object’s properties to the output buffer.
Which, by default, the output buffer is the page this PHP script is rendering. Which is what all the ob_ calls are about: they create a temporary output buffer, write all further output to that, and then fetch the contents of the buffer as a string.
Once they have that string, they can then error_log it.
None of that is necessary. But in this codebase, it appears in about 70% of the exception handlers. Some of the remaining 25% do something more sane. Some of them just swallow the exception or rethrow it.
It’s worth noting that the output of just to-stringing the throwable isn’t formatted the exact same way as the var_dump version- the to-string version is more readable, while the var_dump looks something more like this:
messageobject(Exception)#1 (7) {
["message":protected]=>
string(7) "message"
["string":"Exception":private]=>
string(0) ""
["code":protected]=>
int(0)
["file":protected]=>
string(63) "/home/user/scripts/code.php"
["line":protected]=>
int(4)
["trace":"Exception":private]=>
array(0) {
}
["previous":"Exception":private]=>
NULL
}
The additional problem is that nobody wanted the logs to look like that, nobody liked reading logging messages looking that way, and everyone wished the output was more compact and relevant. Yet this was the solution.
Our submitter adds:
TRWTF might as well be not using an actual Exception Handler and Logger to handle this, though, with this being WordPress…
[ad_2]
Remy Porter
Source link

[ad_1]
Former President Donald Trump pleaded not guilty after he was arrested and booked at a federal courthouse in Florida for allegedly refusing to return classified documents to federal authorities after he left the White House. What do you think?
“I’m going to ignore the facts before I jump to any conclusions.”
Faye McNeely, Cat Wrangler
“I can’t believe the government doesn’t have better things to do than prosecute a former president for mishandling and hiding classified documents.”
Ivan Nichols, Unemployed
“I don’t see why we have to make stealing state secrets so political.”
Ramon Salogar, Pit Remover
[ad_2]

[ad_1]
“My brother at Pumpkin Land in the early 90s and Big Bird looks hungry.”
(submitted by IG @peanut_butter_jilly)
The post Welcome to Pumpkin Land appeared first on AwkwardFamilyPhotos.com.
[ad_2]
Team Awkward
Source link

[ad_1]
“My husband purchased land for an off-road park. While out for a “work day” his friend managed to drive his bronco into a creek and got stuck. They later posed for a picture not realizing the bronco, now permanently parked in the creek was in the shot. This is what happens on “daddy daughter day!”
(submitted by Kaylie)
[ad_2]
Team Awkward
Source link

[ad_1]
“My husband obviously had trouble parking his car. Need I say more?”
(submitted by Alix)
The post Cliff Dive appeared first on AwkwardFamilyPhotos.com.
[ad_2]
Team Awkward
Source link

[ad_1]
SAVANNAH, GA—Unable to revive the crushed, skeletal remains pulled from the rubble, first responders confirmed Wednesday that two people were still dead after a local mausoleum collapsed. “Upon sifting through the debris, we unfortunately found no survivors among the already deceased,” said rescue worker Brandon Reinhardt, explaining that by the time EMTs arrived on the scene, the crypt’s occupants had already been dead for over 150 years. “We rushed to the scene as quickly as possible, but the victims, Horace P. Wingart and wife, continued to be unresponsive. It appears they were unable to escape, and this remained the case after the collapse caused several large blocks of granite to fall on their coffins.” Local officials confirmed the next of kin had been located in an adjacent grave plot and notified.
[ad_2]

[ad_1]
Bitwise operations are one of those things that experienced developers find easy (if not intuitive), but are a fairly bad way to expose functionality without real careful design. After all, flags & 0x02 doesn't really mean much if you don't know what 0x02 is supposed to represent.
But with named constants and careful thought, a bitmask can be a great way to pass flags around. At least, they can be if you understand how to use your language's bitwise operators.
If you don't, then you end up writing this code, which Rensuka found many years ago.
Dim bit(8) As Boolean
'Determin which bits need to be turned on
If ... Then
bit(1) = True
ElseIf ... Then
bit(2) = True
ElseIf ... Then
bit(3) = True
...
ElseIf ... Then
bit(8) = True
End If
This is VB6, and while bitwise operations can get weird in VB6 (only the Byte type is unsigned), VB6 absolutely has bitwise operators. In fact, VB6 even has the Imp operator, or "implication"- which is a common logical operation but one rarely implemented as a bitwise operator.
So this developer could have done this via bitmasks, but instead chose an array of Booleans. And that's awful, but that's not the WTF. Because look at how they use the bitmask.
Dim counter As Integer
Dim i As Integer
'Count all the bits we turned on
For i = 0 To UBound(bit)
counter = counter + 1
Next i
If counter = 0 Then
'Do stuff, etc.
ElseIf counter = 1 Then
'Do stuff, etc.
ElseIf counter = 2 Then
'Do stuff, etc.
ElseIf counter = 3 Then
...
End If
They don't use it as a bitmask at all! There's a hint here that once upon a time it was attempting to count the number of true flags, and that would be a WTF: you go through all the work to set up a bitmask when you could just look at a sum.
But even that's gone- here, counter just gets incremented once for each item in the array. You could just get rid of all of this code and execute whatever is in the final ElseIf condition.
I want to think that perhaps this code once used to actually do something a bit more than it does, but I suspect that the developer maybe wandered through a few pathways, but this was the first working version of the code. There's no good reason for anything to be like this, yet here it is.
[ad_2]
Remy Porter
Source link

[ad_1]
“Here’s my Mom and Dad in September 1970. This was always my favorite photo from their wedding because it’s just so cornball. You have to give credit to the photographer for the picture of my dad in the TV. This was years before Photoshop, so I’m not sure how the heck he pulled this trick off.”
(submitted by Suzie)
The post No Flipping appeared first on AwkwardFamilyPhotos.com.
[ad_2]
Team Awkward
Source link

[ad_1]
You may have heard that the ChatGPT is the next big thing, the revolution, the technological singularity that will take over the world and will destroy the humanity. But the truth is much more simple: ChatGPT is has no idea of what it’s saying, it has no consciousness, it’s as dumb as they come. The only thing it’s good at is pretending to be smart.
[ad_2]
liver
Source link

[ad_1]
The news, even that about Apple’s new VR headset, 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:
… not saying people will use it for porn, but the ad campaign will be ‘There’s a CLAPP for that.’
Look for Trump to say: ‘Never met me. Maybe got myself coffee once. But have no idea who I am. I’m not even my type.’
In related news, all those Twitter epidemiology experts who became Women’s Gymnastics experts are now Hydroelectric Power Plant experts.
This probably means DeSantis is going to need higher heels to see that dealing ceiling.
It’d be more appropriate for him to be on ‘Two Face The Nation.
Hey, PGA, be careful! The Saudi’s have a whole different meaning to making the cut.
… Would’ve gotten away with it, too, if he didn’t try to bill her through her HMO.
And, and yet, they still smell like they’re passing gas.
Now, he knows how Gwyneth feels about making Mortdecai …
I blame the gays.
People of North Dakota: Who?
Somebody has Great Granddaddy issues.
To really reach out to the gay community, Chick-fil-A should add to the menu a Chick on Chick-fil-A sandwich.
… No word if he got Mexico to pay for his defense …
[ad_2]
Paul Lander
Source link

[ad_1]
Violence and crime have been part of American history since the earliest explorers arrived on the continent and killed whoever they found before stealing their land. The Onion looks back at the most notorious criminals in the country’s history.
[ad_2]