Heads-Up Comparison: P365 vs. Hellcat vs. MAX-9 vs. M&P9 Shield Plus

https://cdn0.thetruthaboutguns.com/wp-content/uploads/2021/04/Quadfecta-SIG-SAUER-P365-Springfield-Hellcat-Ruger-MAX-9-Smith-Wesson-MP9-Shield-Plus.jpg

TTAG’s Managing Editor, Dan Zimmerman, and I took all four of the hottest, most in-demand concealed carry guns on the market — the four micro-compacts with double-digit capacity, flush-fit magazines — and hit the range. Shooting the SIG SAUER P365, Springfield Hellcat, Ruger MAX-9, and Smith & Wesson M&P9 Shield Plus (listed in order of when they were released) back-to-back-to-back-to-back, the following is our takeaways on how these four fantastic little pistols stack up.

The size and weight specs more or less tell the story of how these four pistols compare on paper, though there is some nuance that can’t be seen or felt in these figures.

In the Rumble-hosted video embedded above (direct link HERE), Dan and I both put a full mag through all four of these guns and provide some thoughts and feedback. Check it out!

As an example of an on-paper stat that may be misleading in real life, while the Hellcat is shorter in max height than the P365, its backstrap is longer so its heel sticks out a little farther than the P365’s. The Hellcat’s magazine baseplate is nearly parallel with the slide, though, whereas the P365’s angles downward toward the frontstrap, so the P365’s toe sticks out more than the Hellcat’s.

For the vast majority of concealed carriers, it’s the heel of the grip that prints (“pokes” into one’s cover garment, giving away the fact that an object is underneath) first, before any other part of the gun. So, while the Hellcat is technically shorter, the P365 with its more rounded (slightly “bobbed”), shorter heel will likely conceal like the shorter gun.

On the other hand, the frontstrap is where the shooter’s fingers do most of their gripping, and the lower toe of the P365 allows my men’s size large hands to place precisely half a pinky firmly on the frontstrap. That same pinky wraps underneath the grip of the Hellcat.

Even that, however, doesn’t really translate to what you might expect when going loud with these little pistols. Thanks to the larger grip circumference and different shape of the Hellcat’s grip, it feels and shoots like it’s larger than the P365 even if one’s pinky is wrapped under the mag.

Okay, onto our thoughts of how each micro-compact concealed carry handgun stacks up compared to the others:

SIG SAUER P365

SIG’s little P365 shook up the concealed carry market when it was released in early 2018. In a sea of slim, easy-to-conceal pistols with 6+1 and 7+1 capacities, the P365’s 10+1 capacity within the same tiny footprint was a full-on mic drop that gave it an immediate, huge leg up on the competition.

Shoehorning 10+ rounds into a skinny micro-compact was and certainly still is a fantastic recipe for sales success, and, as this very article shows, others have jumped into the fray.

All that said, I’d be remiss not to mention that the SIG SAUER P365 was the first to accomplish this feat only if you don’t count the KELTEC P11, which was released in 1995 and would absolutely belong in this group were it not discontinued in 2019.

At least, on paper the P11 belongs here (5.6″ length, 4.3″ height, 1.0″ width, 17.1 oz, 10+1 flush-fit with a 12-round and 15-round magazine available). Though specific units were rock solid, as a whole the P11 wasn’t reliable enough to be taken seriously by most concealed carriers and they — we — instead chose pistols with lower capacities but higher trustworthiness.

Anyway, three years later and the P365 still feels the smallest of these four handguns. Much of that can be chalked up to it having the smallest grip circumference. Sure, it’s the lightest of the four by a small amount and perhaps it balances slightly differently, but I think these differences are too small to really notice on the range.

What you do notice is more muzzle flip than the other guns. I’ve always considered my personal EDC since 2018, my P365 seen in these photos, to be a highly controllable gun and dang do I shoot the thing quickly and accurately, but without a doubt it has the most felt recoil and muzzle flip of the guns in this quadfecta. Next is the Ruger MAX-9, which is only very slightly less “flippy” than the P365, then there’s a jump to the Springfield Hellcat, which is noticeably softer, and then another solid leap to the Smith & Wesson M&P9 Shield Plus, which shoots like a well-tuned compact, not a sub-compact or micro-compact.

SIG’s X-RAY3 sights are fantastic; exactly what I prefer. A bright, eye-catching, tritium-illuminated front sight and an all-black, serrated rear. They’re steel, durable, quick, and accurate. One could argue that the tritium-illuminated fiber optic front sight on the MAX-9 is better, but my eye prefers the P365’s front dot.

There has been some variability in P365 trigger pull quality. For instance, my early P365 here has a slightly better trigger than my P365XL, which was made two years later. In either case, though, I’d describe both triggers as very good — well above the average for compact (or sub-compact or micro-compact) polymer pistols of its time.

The P365’s trigger has a fairly short travel, followed by a skosh of creep before a crisp break. The reset travel is fairly short and the reset is nicely tactile and audible. Pull weight is exactly what I prefer in a carry gun: about 5 pounds.

Grip texture on the P365 is just about perfect for me. It’s basically “pebbled” like sandpaper, but with the peaks softened just enough that it doesn’t cause too much irritation if it’s against your skin while being carried concealed. The grip is smooth in the nicely-shaped trigger guard undercut and the underside of the beavertail, which is the correct choice in both cases, and textured elsewhere.

The large magazine release is easy to use, but not so tall that it risks accidental activation. I appreciate the windows on each side of the bottom of the grip frame, which allow a jammed magazine to be stripped out more easily.

Front and rear slide serrations are traditional and simple.

But they’re also very grippy with 90-degree edges and enough depth to provide really solid purchase. The P365 ranks second for functional slide serrations.

After shooting all four guns, I won’t be trading in my P365. Without a question I shoot the Shield Plus a little bit better — again, it shoots like a compact — but it’s just enough larger and heavier and I’ve become so familiar and used to my P365 that it’s still my choice.

Springfield Hellcat

For an MSRP premium of just $30, you’d be silly not to buy the optics-ready Hellcat. As the first challenger to the P365, though, Springfield clearly wanted to undercut the SIG’s MSRP and the non-optics-cut base model allowed ’em to do that by $10.

Springfield also [literally] one-upped the P365’s capacity by squeezing 11 rounds into the Hellcat’s magazine. This gives it the highest flush-fit capacity of all four of these little gats, despite the fact that it’s the shortest of the quadfecta. Impressive.

As mentioned above, the Hellcat shoots pretty darn softly given its lilliputian size and light weight. It’s an easy gun to shoot well. It’s an extremely easy micro-compact to shoot well.

The Hellcat’s tritium front sight with bright green outline is great — a lot like the P365’s. I’m definitely not a fan of the rounded-notch rear with white outline, though obviously this is personal preference. No argument on the quality of the steel sights.

Dan swapped an Apex trigger into this Hellcat, which improved its trigger in all ways (obviously) but it’s fair to say that the Hellcat ships from Springfield with an extremely competitive trigger pull quality to begin with. It’s better than what we all became used to with polymer pistols of the past. It still isn’t the best trigger of this group, though.

While the grip texture on the Hellcat is similar to that of the P365, the grip shape is not — it’s quite blocky. Sides, front, and back are fairly darn straight and flat across and the edges between all four sides are rounded, yes, but make a sharper transition than on most pistols.

I do not like the feel of the Hellcat in my hand. It’s just too square for me. It’s still small, of course, so it’ll fit basically anyone’s hand (or at least shouldn’t be too large for anyone), but I just find it weird. Too flat across the backstrap, in particular, with too-sharp transitions to the sides.

Dan has smaller hands (and less hair on his head and he’s also shorter and, like, super old and stuff), though, and feels differently. He likes the size and shape of the Hellcat’s grip frame. I think the joints in his fingers and the shape of his palm and thumb joint and such align better with the edges of the grip.

One thing we certainly agree on is that the Hellcat’s slide serrations suck. They look good, but they’re so dang shallow they’re barely functional. Even with dry hands I worry about sliding off of the serrations while trying to manipulate the slide.

If this were my carry gun I’d put sandpaper style grip tape in-between, below, and behind the serrations (probably cutting my own from Talon Grips granulate material). Alternatively, it would be a further selling point to running a micro red dot and I’d karate chop that bad boy as my sole means of slide manipulation.

Dan has put a ton of rounds through this Hellcat and it has proven itself reliable and easy to carry. It’s a good shooting gun, too. Without a doubt, it’s a very good choice for concealed carry.

Ruger MAX-9

There’s no question whatsoever that Ruger’s new MAX-9 represents the best value of the pack. At an MSRP of just $499 (and when the market gets back to normal it’s going to retail for substantially less than the other three pistols) it includes the optics-ready slide and the tritium-illuminated fiber optic front sight. Heck of a deal.

The MAX-9 isn’t as flippy as my P365, but it has some snap to it. It’s the skinniest gun of the group with the second smallest grip circumference, but it’s taller than the SIG and Springfield, which pair very closely on height and then the Ruger and S&W pair closely at about a third of an inch taller.

Trigger pull on the MAX-9 feels far lighter than its approximately five-and-a-half-pound break weight. This is likely due to Ruger’s rotary sear, which gives the trigger a smooth, rolling break that lacks the more typical feel of take-up followed by a firm “wall.”

When the trigger does break it’s clean and crisp. If you ride the reset it’s a little shorter than the initial pull, but I did find the reset to be a bit on the light side in terms of its sound and feel. Overall this is a very good trigger, and doubly so for anyone who prefers a rolling style break.

Sights are great and allowed us to shoot rapidly and accurately. While the front is undeniably easy and fast to pick up, it just doesn’t snag my eye as well as the front sight on the P365 and Hellcat.

While it looks fairly square and blocky — and it is compared to the P365 or Shield Plus — the slimmer width and more rounded edges feel more comfortable and less blocky than the Hellcat. It’s also shorter front-to-rear, so it feels smaller in the hand than all but the P365.

Grip texture on the MAX-9 is the most love handle-friendly. Though very similar in appearance to the SIG’s and Springfield’s texture, the Ruger’s is smoothed out even more — flatter high points — and is therefore less aggressive, less grippy, and more comfortable. At least on the sides.

On the frontstrap and backstrap it has more bite than on the sides, which is how it should be. Frankly, if I made a pistol like this (and didn’t care about lefties) I’d design the left side of the grip to be extra comfortable and the back, front, and right side to be extra grippy.

Of the four guns in our quadfecta here, the MAX-9’s magazine release is the most shrouded and flush and, therefore, takes the most deliberate action to activate. The same goes for the MAX-9’s slide catch, which is gated by a polymer ridge that makes it difficult to engage manually. Overall its controls, including its takedown method, are the most difficult to use of the four guns.

That said, the manual safety on the Ruger MAX-9 is just right. It’s small yet easy to reach and use, with positive detent clicks in both positions. While all four pistols do offer a manual thumb safety as an option, the MAX-9 was the only gun in our test that was so equipped so we can’t compare this feature.

Ruger wins the slide serration contest. While relatively traditional like those on the P365, the MAX-9 provides more empty space between thinner ridges and it’s really grippy.

Perhaps that change in angle also helps, but whatever the secret is the end result is extremely effective slide serrations that you won’t slip off of. If the judges give the MAX-9’s slide serrations a 10, the P365 gets an 8, the Shield Plus a 4, and the Hellcat a DNF.

The Ruger MAX-9 is a good gun that, for whatever reason, doesn’t feel quite as nice or as refined as the others and is a little taller than the P365 and Hellcat, but shoots accurately and reliably and represents one hell of a good value.

Smith & Wesson M&P9 Shield Plus

Still a micro-compact, the Shield Plus represents a meaningful bump in backstrap length versus the P365 despite its identical 10+1 flush-fit capacity. It’s also the widest gun here.

While S&W officially states the Shield Plus’ width, exclusive of the controls, as 0.94 inches I must disagree. The widest part of the palm swell measures 1.06 inches in my calipers (and it does measure out at S&W’s stated 1.1 inches from the slide stop to the other side of the slide).

Front-to-rear length of the grip frame is also significantly longer than any of the other guns here. And the Shield Plus weighs two ounces more.

Still, it’s a half inch shorter and about 0.2 inches skinnier than most of the smaller sub-compacts out there, so I think it’s fair to say it still clearly belongs right here in the micro-compact category.

On the plus side, this small amount of additional size packs a large amount of prowess on the range. The Shield Plus is markedly flatter and softer shooting than the other three pistols in this roundup, and the larger grip circumference and curvier shape provide tons of confidence and control.

As mentioned previously, the Shield Plus shoots like a well-sorted sub-compact or maybe even compact pistol. I’d put it head-to-head with a GLOCK 19, for instance, and I expect most shooters would outperform on speed and accuracy with the Shield Plus.

Additionally, this bad boy has the best trigger of the bunch. Yes, it’s better than the aftermarket trigger in the Hellcat. Holy heck is it short and crisp with an insanely short, crisp reset as well. It feels like a competition trigger.

In fact, perhaps it’s too good? Trigger pull weight is right at three pounds. It’s awesome on the range, but it’s pretty dang light for concealed carry self-defense use. Following all safety best practices related to holster choice, holstering, and use it obviously won’t present any sort of issue, but it’s undoubtedly a deviation from the norm for a self-defense gun without a manual safety (though a thumb safety is an option).

On the base model, which is what Dan and I tested, the Shield Plus’ standard 3-dot sights are nothing to write home about. It’s your typical, white painted dot front and 2-dot rear. No tritium or other flavor of night visibility.

Night sights are an option, of course, but they raise the MSRP to $623 ($44 higher than the closest competitor) while the SIG, Springfield, and Ruger all sport tritium as standard.

Grip texture on the Shield Plus is just about dead-on perfect. It provides more grip and control than appearances might suggest, yet it won’t scratch up or overly irritate the tender princess skin on your hip. It’s the sharpest and most aggressive of these four pistols, though.

The tapered shape of the Shield Plus’ grip as it transitions from rounded palm swells down to a somewhat sharply rounded or tapered backstrap sets it apart in this group. As blocky as the Hellcat is, the Shield Plus’ grip might stand out even more in the other direction.

I’m a big fan of the texture, size, and shape of this grip frame and I found that the rounded/tapered backstrap gave me a really clear index point or frame of reference for where the muzzle was pointing. Sort of an intuitive feel for the exact orientation of the gun.

The backstrap, as sharply rounded as it is, isn’t as comfortable as the backstrap of the P365 as it focuses its force in a more distinct vertical line across my palm, but I love how functional it is. It gives me confidence and I really feel like I can “drive” the Shield Plus hard, with great control and intuitive knowledge of where the gun is pointing.

Dan, however, prefers the wider, flatter backstrap feel of the other pistols in our heads-up round-up quadfecta shootout. Bottom line: a lot of this stuff boils down to personal preference.

That said, there’s zero question whatsoever that the Shield Plus is the best shooting pistol here — in part, yes, because it’s the largest and heaviest — and that it has the best trigger.

What it doesn’t have, though, is the best slide serrations even if they might look the niftiest.

I’ve never thought of the M&P’s serrations as sub-par or anything, and they’re without a doubt plenty functional and nothing I would normally complain about, but in this heads-up comparison they simply don’t compete on the same level as the P365’s and MAX-9’s.

Granted, slide serrations aren’t an end-all-be-all feature and I wouldn’t necessarily discount carrying a gun due to mediocre slide serrations (though the Hellcat truly has a problem in this regard and needs an overhaul to achieve slide serration mediocrity). Again though, it was one clear area in which these four pistols differed so I chose to call it out.

Ultimately, I came close. Close to putting the Shield Plus on my hip in place of my P365. I simply love how the Shield Plus shoots.

It ended up being the extra size — namely the well over a half-inch more backstrap height and how the heel of the grip juts out much farther and to a sharper point — that kept the SIG in my holster. Frankly, it’s hollow, unused polymer in the heel of the Shield Plus and I think they should have bobtailed the thing hard.

We’re living in a golden age of concealed carry pistols, that much is for sure. In this heads-up comparison there really isn’t a loser. Every single one of these pistols is reliable, accurate, and easy to conceal. They all have great triggers, great sights (or at least the option of great sights), optics cuts (or the option for that), and double-digit capacities.

It’s remarkable, really, to pack so much into such small pistols. For me, I’m sticking with the “original” — I like the P365 the best. Dan prefers the Hellcat. In a competition stage we’d both shoot the Shield Plus. The MAX-9 knocks it out of the park on performance per dollar.

They’re all great guns.

 

The Truth About Guns

How to Spot a Good Bagel Recipe

https://i.kinja-img.com/gawker-media/image/upload/s–t3h9PCiw–/c_fit,fl_progressive,q_80,w_636/ds3a2ipkcgtzjccwkp3z.jpg

Of all the bakery-style bread products you can make at home, bagels might be the most intimidating. They really shouldn’t be. The dough is easy to handle and very hard to mess up; with the right recipe, even your first attempt will taste 10 times better than anything you can get outside of a legit bagel shop.

The hard part is finding that recipe. I’m here to help. I used to make bagels professionally from a recipe I developed and, nearly a decade later, it’s still what I use at home. (I haven’t published it. Yet.) But you don’t need to be a former pro to sling great bagels in your very own kitchen—you just need to know what works and what doesn’t. Here are my best tips for determining whether a recipe is worth your time.

Start with the ingredients list

On top of the obvious (bread flour, water, salt, yeast), you’ll want a recipe that calls for a thick liquid sweetener. Traditionally, New York-style bagels use barley malt syrup and Montreal-style bagels use honey. I’ve used both, and prefer molasses because it’s cheap, common, and works great.

Next, work out the hydration percentage. It should be about 50%, which is much lower than other types of bread. This produces a dense, sturdy dough that holds up to boiling water and gets super chewy in the oven. Slightly higher hydration is fine, but once you hit 60% it turns into pizza dough.

Next, look at the directions

This is where things tend to get hairy. Bagels aren’t technically difficult to make, but doing it right takes time. Lots of recipes try to get around the time commitment by taking shortcuts that always hurt the finished product. Treat them like the red flags they are—if you see one, move along:

  • No refrigeration: If a recipe doesn’t have you refrigerate the formed bagels overnight, it’s trash. A long, slow rise at a low temperature fully develops the gluten, locks the shape in place, adds some funky tang, and produces those iconic fermentation blisters on the crust. I can’t overstate the importance of this step.
  • Baking soda in the water bath: Baking soda is a weak substitute for lye, which is for pretzels. Bagels are famously not pretzels; they get their shiny, snappy crust from slow fermentation, boiling water, and a screaming hot oven—not lye, let alone baking soda.
  • Too much boiling: The longer you boil a bagel, the thicker and, well, crustier the crust gets. I’ve seen recipes call for 2 minutes per side, which causes me physical and emotional distress. Do you want sad, flat, rock-hard pucks? Didn’t think so. A quick dunk—20 to 30 seconds total—is plenty.

G/O Media may get a commission

Taking all of these criteria into consideration eliminates the vast majority of bagel recipes out there, but I can enthusiastically vouch for Becky Krystal and Alex Baldinger’s recipe in The Washington Post. (If you cut the boiling time in half, Peter Reinhart’s recipe is also good.) They take the time to do things right, and it shows: These recipes are easy to follow and always produce great results.

 

 

Lifehacker

6 Common Tools That Startups Use

https://static1.makeuseofimages.com/wordpress/wp-content/uploads/2021/03/Slack-Header.jpg

Are you really a startup if you don’t use Slack? It’s a question that’s been asked before. Startups, specifically tech startups as that’s what this article is about, often use particular software and tools to make life easier for the team and day-to-day running of the business.

If you are a startup that’s looking to improve its work efficiency, consider using one or more of the tools listed below.

Commonly Used Startup Tools

There is an abundance of software and tools on the market for startups to use. There’s no way we’re going to be able to look at them all in any kind of article. So, to consider some software as examples, these are some of the tools that are most commonly used.

1. Slack


Slack is one of the most common tools in the tech world. Everybody uses Slack from startups to YouTube teams.

The tool is for communication within your organization. Slack works as a channel-based messaging platform for organizations to use in order to improve communications. You can direct message other team members, and send messages to larger groups.

Related: What Is Slack and How Does It Work?

The tool is perfect for making it easy to talk to teams and staff instantly, without the need for emails. Slack also supports the integration of other software and tools so that you can have all of your workplace tools in one space.

For example, you can integrate your calendar so you can send reminders in messages about upcoming events or meetings. You can even integrate services like Google Drive to create Google Docs without leaving your Slack workspace.

2. Asana


Asana is a team and task management tool. Using the platform, you put tasks on To-Do lists for different teams. From here, you can assign tasks to certain team members, and set deadlines as well.

The tool makes it much easier for teams and management to keep on top of projects and tasks so that there’s less need for catch-ups. Reporting tools on Asana make it easy to see exactly what your teams have been getting up to, as well as the to-do list style making it easy for team members to keep track of their tasks.

3. Monday


Monday is another task management tool. The platform offers a very simple yet effective solution to task management. There are plenty of reasons that teams use Monday.

Uploading tasks in a to-do list style makes it easy to break larger projects down into smaller tasks. Monday uses a color-based status to monitor the progress of tasks with just a glance. The platform also allows for integrations with other tools to bring tasks directly to you without the need for manual input, saving time.

4. Intercom


Intercom is one of the most popular live chat platforms for companies to use on their website. Most websites use live chat now as it’s a quicker and more convenient way for users to contact the support team.

This tool probably has some of the most customizable and intuitive features. Not only can you build a live chat system with automation and a bot, but you can also use Intercom to communicate via email, and build a FAQ page for your website.

5. Zendesk


Zendesk is one of the tools available that does the most for a company. The platform has an all-in-one feel to it, and can often be used to cover the whole of the customer services team.

With Zendesk, you can add live chat to your website, manage and ticket your emails, build and upload an in-depth FAQ page, manage phone calls, and manage social media. With all the important customer communication channels being brought under one roof, a team can respond to users faster than ever.

6. Google Workspace


Google Workspace is the most comprehensive tool on this list. However, this is a platform that many users may not know a company actually uses.

The platform brings Google to your organization. Google Workspace allows you to create email accounts using your company’s domain name and turns these into private Google accounts.

Related: The Best Google Teamwork Tools for Online Collaboration

This gives you access to all the Google services such as Drive, Docs, Slides, Photos, and all the others while allowing the company to manage each account.

Many organizations use Google Workspace behind the scenes for their emails, and file storage on the cloud.

How Many Startups Actually Use These Tools?

When it comes to how many startups use productivity tools, you’d probably argue that every startup does to one level or another. All startups use email at the very least, so their email client makes at least one tool that the company is using.

In terms of the list we’ve focused on in this article, all these tools are widely used by startups. Slack is used by 750,000 companies (2020), Asana by 50,000 (2018), Monday by 100,000 (2020), Intercom by 30,000+ (2021), Zendesk by 150,000 (2020), and G Suite by 6 million (2020). Across the board, the six tools we’ve looked at are used by approximately 7.1 million organizations.


And these six tools are just some of the most popular platforms out there. There are hundreds of other tools out there with high user numbers as well. So, when you consider this, inarguably you can see that so many startups really do use these tools.

So Are You Really a Startup?

Using or not using certain software cannot determine whether or not you are a startup company. The definition of a startup is "A newly established business".

If a company meets that definition, they are literally a startup. But, when you consider how integral many of these tools have become for startups, you must wonder what they’d do without them.

Ultimately, the tool that will be talked about is one that helps to increase their bottom line, improve the overall experience at work, and contribute to seamless team collaboration.

MUO – Feed

Data Transfer Object V3 Modernizes DTOs With PHP 8 Features

https://laravelnews.s3.amazonaws.com/images/spatie-dto-v3-featured.png

Spatie’s Data Transfer Object (DTO) package makes constructing objects from arrays a breeze, giving you confidence in the data contained therein. I’ve been a fan of this package since learning about the initial V1 release, and I hope you’ll consider this package for passing around data in your application.

The DTO package just released V3 with all of the PHP 8 goodies we’ve only dreamed of up to this point. For those just starting to use or consider PHP 8 in your projects, the source code of the V3 DTO package is an excellent resource with real-world examples of helpful PHP 8 features.

I want to congratulate the principal author Brent Roose and Spatie for moving forward with this excellent package with the features in the V3 release.

Here are some of the main features taken from the readme available in V3:

  • Named arguments
  • Value Casts – convert properties typed as a DTO from array data to the DTO instance automatically
  • Custom Casts – you can build your custom caster classes
  • Strict DTOs
  • Helper functions
  • Runtime type checks are gone in favor of PHP 8’s type system

If you want all the details of the above features, check out the project’s readme.

While the DTO package readme delves into the more complex use-cases this package supports, here’s a simple example back from V1 of what you might expect from this package for those not familiar with the DTO package:

class PostData extends DataTransferObject
{
    /** @var string */
    public $title;
    
    /** @var string */
    public $body;
    
    /** @var int */
    public $author_id;
}

$postData = new PostData([
    'title' => '…',
    'body' => '…',
    'author_id' => '…',
]);

$postData->title;
$postData->body;
$postData->author_id;

As you can see, we can pass array data to the constructor, which (at the time of V1) checks types at runtime and constructs a PostData instance or fails in an exception if the data is not valid.

With the release of typed properties in PHP 7.4 and named arguments and union types in PHP 8, Spatie’s V3 of the DTO package leverages many new language features. Taking the simple example above, here’s what it might look like in a PHP 8 version:

use Spatie\DataTransferObject\DataTransferObject;

class PostData extends DataTransferObject
{
    public string $title;
    public string $body;
    public int $author_id;
}

// Named arguments FTW
$post = new PostData(
    title: 'Hello World',
    body: 'This is a test post.',
    author_id: 1
);

echo $post->title, "\n";
echo $post->body, "\n";
echo $post->author_id, "\n";

The above example is simple but illustrates well how this package’s basics have evolved since V1, which supports PHP ^7.0. Note: given the above example, you might not even need to leverage the DTO package as PHP 8 takes care of the typing concerns and allows named arguments making a plain old PHP object (POPO) just as practical for this simple example.

If you haven’t tried Spatie’s DTO package, I hope even this simple example illustrates how you can know more about the data you transfer between objects. Imagine the above as an array of data:

$post = [
    'title' => 'Hello World',
    'body' => 'This is a test post.',
    'author_id' => 1,
];

$someObject->doStuff($post);

Let’s say that your doStuff implementation looks like the following to keep the example simple:

function doStuff(array $post)
{
    $title = ucwords($post['title']);
    $author = findAuthorById($post['author_id']);

    echo $title, "\n";
    echo htmlspecialchars($post['body']);
    echo $author['name'], "\n";		
}

As a consumer of doStuff(), you have no idea the shape of the required data without referencing the implementation of doStuff(). That means when you need to call doStuff(), you have to look at the function to know what array data to pass.

The maintainer of a naive doStuff() implementation assumes that the consumer is sending required data. Sending malformed or missing data results in undefined key errors that might not crop up until after you’ve shipped a feature. Or, if you’re paranoid, you might need to check everything before you use it:

function doStuff(array $post)
{
    if (empty($post['title'])) {
        throw new \Exception('Missing title');
    }

    if (empty($post['body'])) {
        throw new \Exception('Missing body');
    }

    if (empty($post['author_id'])) {
        throw new \Exception('Missing author_id key');
    }
    
    $title = ucwords($post['title']);
    $author = findAuthorById($post['author_id']);

    echo $title, "\n";
    echo htmlspecialchars($post['body']);
    echo $author['name'], "\n";		
}

Instead, you could guarantee the shape of data with a POPO or DTO (back in V1). It’s just that in DTO V2 and V3, some things are now handled natively through PHP 8’s language features instead of runtime checks:

function doStuff(PostData $post)
{
    $author = findAuthorById($post->author_id);
    
    echo $post->title, "\n";
    echo htmlspecialchars($post->body);
    echo $author->name, "\n";		
}

IDEs understand PostData, making it easy to both use and construct new instances. In this naive example, we know what data to expect, and the DTO package ensures this data is structured as expected when the object gets constructed.

While structured, typed data might seem like a trivial boilerplate to the veteran Java developer, PHP developers are more prone to seeing associative array data passed back and forth in an application. PHP 8 and this DTO package go a long way in providing more assurances of the data passed around in your PHP applications, which I believe makes you more productive and your code more confident.

Learn More

You can learn more about this package, get full installation instructions, and view the source code on GitHub. Freek Van der Herten and Brent Roose also wrote details of the Data Transfer Object v3 features if you’re looking for a more in-depth explanation and examples of the DTO package.

Laravel News

WATCH: How an A-10 Warthog GAU-8 Avenger 30mm Cannon Works

https://cdn.athlonoutdoors.com/wp-content/uploads/sites/8/2021/02/SIG-Sauer-NGSW.jpg

Few things in life dominate their purpose of existence quite like the A-10 Warthog and its GAU-8 Avenger 30mm Cannon. The two remain forever, intrinsically linked in military lore. From tanks to terrorist convoys, the 30mm round simply decimates everything in its path. In a word, it is glorious. So BRRRRRRRT! Let’s watch how this marvel of military might works in action.

SIG just completed final delivery of the U.S. Army NGSW system.

RELATED STORY

SIG Sauer NGSW: US Army Receives Final Delivery of Complete System

GAU-8 Avenger 30mm Cannon

YouTuber 3D Mil-Tech posted an awesome animation recently of the GUA-8 Avenger. And the stellar video makes it at once clear, this isn’t a gun, it’s a machine. The behemoth aircraft cannon weighs in at 619.5 pounds, measuring nearly 20 feet down the belly of the beast that is the Warthog. The 90.5-inch barrel weighs a massive 71.2 pounds.

It spits out massive 30mm rounds at a whopping 4,200 rpm. The tank buster sends rounds downrange at 3,500 fps. And the maximum effective range extends to 3,660 meters.

Certainly, the U.S. military inventory commands more impressive firepower. But when combined with the unique flying ability of the A-10, the GAU-8 Avenger excels. The combination famously busted more than 900 Iraqi tanks in Desert Storm. Timeless footage abounds of the Warthog slowly crawling across the sky, reigning fire down on enemy material and emplacements.

The Avenger employs Armor Piercing Incendiary (API) rounds. Loaded with depleted uranium, these bad boys hit like the proverbial hammer of Thor. Ultimately, few enemy tanks or positions can withstand the punch of the A-10 Warthog and the GAU-8 Avenger.

The original contract specifications called for the cannon to be capable of destroying a wide variety of targets expected during a close air support mission. It must destroy light, medium and heavy tanks, armored personnel carriers and fixed or mobile artillery. It would also need to take down hardened targets, including bunkers.

At various times, the military expressed interest in moving on from the Warthog. But then we get into a fight, the combination proves its mettle all over again. Long live the GAU-8 Avenger!

The post WATCH: How an A-10 Warthog GAU-8 Avenger 30mm Cannon Works appeared first on Tactical Life Gun Magazine: Gun News and Gun Reviews.

Tactical Life Gun Magazine: Gun News and Gun Reviews

Female Firearms Ownership: Why Women Buy Guns

https://www.pewpewtactical.com/wp-content/uploads/2021/04/AGAG-New-Shooter-Survey-2020.png

If you’ve wandered into the gun store recently, you might have noticed it looks a little different.

Among the rows of black handguns and FDE colored rifles, pinks, purples, and teals peer out from the gun case. Bedazzled ear pro, lacey holsters, and other feminine accessories line the shelves.

Womens Brands Alexo Athletica Skirt
Holsters + skirt…maybe you’ve seen these?

While the gun industry often looks to capitalize on new shooters, one demographic in particular is getting a lot of attention — women.

But what shaped this dramatic increase in female gun owners?

Gun Ownership Among Women

According to a Pew Research Center survey, in 2005, women accounted for only 13% of American gun owners.

By 2020, that number almost doubled, with women representing nearly 25% of gun owners in the United States.

Women Guns NRA
(Photo: NRA)

Female gun owners are considered the fastest-growing demographic in the gun world.

But female gun ownership looks different than that of men.

On average, women opt into guns later in life. Women, on average, buy their first gun around the age of 27. In contrast, the average age for a man’s first gun is 19.

Self-defense is the most cited reason for gun ownership for both sexes. However, men typically list recreation, competition, or hunting alongside defense as reasons for purchasing firearms.

Home Defense Glock G19
Defense was cited as a primary reason for gun ownership.

On the other hand, self-defense can often be the only reason for gun ownership among women. 27% of female gun owners say they have no further interest in firearms outside of personal protection.

In the U.S., 19.3% of women experience rape while 43.9% face sexual violence other than rape. With more than half of adult women living alone in the U.S., it’s no surprise women stock up on safety tools.

And firearms offer a solution.

Women's Tac Pants 2
Single women make up 30% of firearms owners in the U.S.

“It’s a very helpless feeling knowing you can’t protect yourself or your family,” Terry Marsh told News & Observer after an intruder almost entered her home at 1 a.m. “If I had a gun or a way to protect myself, it would have given me a little bit of power, and I’d have felt secure.”

Marsh later went out and purchased her first handgun.

She’s not alone.

Women’s centric shooting organizations like The Well Armed Woman and A Girl & A Gun aim to encourage new shooters. They offer an alternative to all-male ranges and classes. Ultimately, these organizations emphasize safety thorugh training and education.

A Girl & A Gun boasts over 6,000 members with chapters in almost every state. The group noted a significant increase in interest and participation…especially in 2020.

Pandemic, Protests, and 2020

2020, a year renowned for COVID-19 and heightened social tensions introduced more Americans to guns, gear, and ammo.

The FBI recorded over 39 million background checks for firearms in 2020. Just months into 2021, that number already sits at 12 million.

But in a time where gun sales remained at an all-time high, not all gun purchases were made by men.

In fact, women accounted for 40% of gun purchases in 2020.

Even gun organizations experienced this influx, with A Girl & A Gun’s membership spiking over 150% just by July 2020.

Kat with Gloves and a Pistol

An examination of its new members showed that while most grew up in a home without guns, the fear of civil unrest pushed them to reconsider a gun-free home.

Kathryn, a woman from Texas, was one such gun owner. A trauma surgeon and admittedly anti-gun, she said the pandemic and unrest was a contributing factor in her decision to purchase a firearm for the first time.

“I’m a trauma surgeon and have treated a fair share of gunshot victims in Chicago and Houston. I have been pretty ‘anti-gun’ as a result up until COVID,” she told surveyors with A Girl & A Gun. “At that point, I figured I might as well get comfortable with at least handling firearms in case I had to use one.”

AGAG New Shooter Survey 2020
A Girl & A Gun New Shooter Survey 2020 (Photo: AG & AG)

Instructors and educators also faced an influx of new shooters signing up for classes, including the female demographic.

“We are seeing single moms, the elderly, and most surprising is middle age couples that have never seen the need to be armed,” said GW Ayers III, chief operating officer at Rainier Arms Firearms Academy, the training unit of Wichita, Kansas-based Rainier Arms Group.

In 2020, Rainier says enrollment for its CCW courses jumped 50%.

Womens Brands AA and AIS
Women continue to flock to guns…but why?

Cherie Hicks, a 58-year-old mother and yoga instructor from California told Pew Pew Tactical that though she is an experienced shooter, she plans on “amping up” her training.

“After the rioting and the looting started, that was it,’’ Hicks explained.

Though COVID-19 vaccinations are rolling out and riots have calmed, gun sales haven’t slowed down — nor does it look like they will.

COVID S&W Shield

The National Shooting Sports Foundation’s Mark Oliva said with enhanced gun laws potentially on the horizon, Americans continue to stock up — women included.

“It is clear that firearm sales in March were driven by gun control calls from politicians to ban entire classes of firearms and enact onerous gun laws,” Oliva told CNN Business.

Evolving Industry

With estimates in the millions, more and more American women are entering the gun community. While some bemoan the use of pinks and purples in gun stores, experts say it’s imperative the industry encourages ladies.

“Women are making a difference in the world of firearms,” Carrie Lightfoot, founder of The Well Armed Woman, said. “I believe there is no denying that women are here to stay and, therefore, need the industry to continue to understand who they are and what they want.”

Womens Brands AA and AIS
Brands like Alexo Athletica and Armed In Style bring choices to women.

And the industry seems to be trying. Every day more accessories aimed at women sprout up in online stores. Even more encouraging, women-owned brands continue to enter the firearms landscape. These niche businesses specialize in firearm-themed gear apparel and accessories for women.

This approach is smart, according to Lightfoot’s data. Her small sampling of 5,000 women revealed ladies poured over $3.5 million into guns in 2019.

“The female market offers enormous potential and dollars to the firearms industry,” Lightfoot said.

The earning potential for gear, guns, and accessories marketed towards women is endless, so long as the industry is willing to provide intelligent, safety-conscious designs.

Conclusion

Armed with cash and willing to invest in their safety, female gun owners represent a fast growing subset of the gun community.

CCW Range Practice

As long as the industry continues to support women through education, training, and gear, there are no indications lady shooters will slow down any time soon.

What are your thoughts on female gun ownership? Share your comments below. And make sure to check PPT every Wednesday for a new women-friendly article. In the meantime, check out our guide on the Best EDC Items for Women or read up on why gun publications should be including women.

The post Female Firearms Ownership: Why Women Buy Guns appeared first on Pew Pew Tactical.

Pew Pew Tactical

Project Appleseed Announces 2021 Schedule of Ohio Events

https://www.buckeyefirearms.org/sites/buckeyefirearms.org/files/styles/slideshow/public/field/image/project-appleseed.jpg?itok=e3-2hg3Q

Project Appleseed Ohio
by Steve Branam

As spring approaches, the Appleseed trail will soon start back up and we will begin building another group of Riflemen here in Ohio.

For those who don’t know about the Appleseed Project, we are a national 501(c)(3) non-profit organization that teaches the fundamentals of rifle marksmanship and combines this with a series of presentations on our shared heritage as Riflemen and Riflewomen.

Appleseed started thirteen years ago with the goal to reawaken America to the fading art of rifle marksmanship. We do that by teaching the fundamentals of field marksmanship and by sharing with our attendees the story of April 19, 1775.

Paul Revere’s ride, the events on Lexington Green, the engagement at the North Bridge, all have profound lessons for all of us on our shared marksmanship heritage and the price of liberty. Attending an Appleseed event will reacquaint you with our shared heritage and provide you with the rifle skills necessary to pass this heritage on to the next generation.

Our two-day events are staffed by skilled instructors who will share with you the skills needed to consistently hit targets out to 500 yards. Bring what you want to shoot. Open sights, scopes, centerfire or rim fire, we work with what our students bring.

Most of our work is done at 25 meters. Saturday at an Appleseed is heavy on instructions and drills. All this leads up to the Appleseed Qualification Test, the infamous AQT.

Our AQTs are a four-stage test to challenge your skills. We put you under some time pressure and ask you to execute 40 shots on targets that simulate ranges from 100-400 yards. It takes 210 points out of a possible 250 for you achieve your Rifleman’s patch and to leave with the pride of knowing that you are carrying on the great American Rifleman tradition.

Our events are open to all regardless of your skill levels. Youth are welcome as long as they can be safe on our line. We have worked with attendees from 8 to 80. Whether you are new to rifle marksmanship or are looking for a tune-up on your skills, we encourage you to join us for a weekend.

I can guarantee you will leave with a new appreciation for your skills, your country and the value of liberty.

Our 2020 schedule is available at appleseedinfo.org and we encourage you to come check us out. If you have any questions, feel free to contact me at ohio@appleseedinfo.org.

All of us at Appleseed would like to thank the Buckeye Firearms Association for supporting our program.

Buckeye Firearms Association

Carry a Concealed Firearm Because You Can Stop Mass Murder and Save Lives

https://www.ammoland.com/wp-content/uploads/2018/10/Concealed-Carry-500×282.jpg

Injunction Sought in Federal Lawsuit Over Riverside, California Sheriff Stan Sniff’s “Discriminatory and Unconstitutional” Handgun License Policies
Carry a Concealed Firearm Because You Can Stop Mass Murder and Save Lives

U.S.A.– -(AmmoLand.com)- Doctor John Lott is the president and one of the principal researchers at the Crime Prevention Research Center. Dr. Lott recently reminded us that guns save lives and stop mass murder. I’d forgotten about a few of these incidents, though I’m sure I read a little about them at the time. In contrast, the news media covers mass murderers for days on end. To help offset that media bias, let’s look back only 10 months to see what we did.

You might have forgotten, but you saved lives.

  • Do you remember the armed attack at a shooting range/ gun store in Metairie, Louisiana that happened only a few months ago? The murderer was carrying a loaded gun in his hands. The staff at the store asked him to put his gun away. Instead, the murderer attacked staff and customers. Two victims were killed before staff members and customers shot the murderer and ended the attack. Then, staff and customers called 911.
  • It was back in August of 2020 when an armed man saved lives in a Walmart in Weslaco, Texas. Our armed good guy saw another man walk into the store dressed in black and carrying a rifle. The armed citizen drew his firearm and pointed it at the intruder. A security guard also helped hold the would-be attacker. The attacker was furious because you stopped him from killing people. Police arrived and took the rifle. The attacker was shot by law enforcement officers when he drew his handgun and threatened the police.
  • You saved lives again last July in a sports bar in Dallas, Texas. A man was turned away from the bar due to restricted seating during the Covid epidemic. The angry customer came back and started shooting into the crowd. Four people were injured before armed patrons shot back and the attacker ran away. Police arrived minutes later.
  • It was the middle of July when you were stopped at a traffic light in Brownsburg, Indiana. You saw two men run across the intersection. These two men were being chased by a man with a gun. The attacker shot them. You stepped out of your car and then the attacker shot at you. You shoot back and ended his attack. Emergency medical services are able to save one of the attacker’s intended victims.
  • You saved lives in early July as you waited to get into a restaurant in Hummels Wharf, Pennsylvania. A stranger stopped his pickup truck in the middle of the parking lot. The driver got out and shot two people standing in line near. You draw your firearm and shoot back ending his attack. You call 911.

The list of armed defense incidents is much longer, but those are the ones that happened in the last 10 months. I suspect you are like me and forgot how often guns save lives. You forget the virtue of an armed society.

Give Dr. Lott a read.

The post Carry a Concealed Firearm Because You Can Stop Mass Murder and Save Lives appeared first on AmmoLand.com.

AmmoLand.com

MySQL 101: Basic MySQL Server Triage

https://www.percona.com/blog/wp-content/uploads/2021/04/MySQL-101-Server-Triage.pngMySQL 101 Server Triage

MySQL 101 Server TriageSo your MySQL server has crashed.  What do you do now?  When a server is down, in my opinion, there are two steps that are essential and both are extremely important and neither should be neglected:

  1. Save diagnostic information for determining the root cause analysis (RCA).
  2. Get the server back up and running.

Too many people rush to Step #2 and lose pertinent diagnostics from Step #1.  Likewise, too many people will spend too much time on Step #1 and delay getting to Step #2 and restoring service.  The goal is to collect diagnostics as quickly as possible for later review while getting service restored as fast as possible.

As a Technical Account Manager (TAM) and assisting on server restoration calls, I have seen both issues at play.  Technical resources have a tendency to get so bogged down in trying to understand the cause of the server outage that they forget that the downtime is costing the business money.  The desire to crawl through server logs, review metrics, pour-over system metrics, and so on, can be too tempting for some who are concerned that important diagnostic data will be lost when service is restored.  This is a valid concern, but there must be a middle ground.

Conversely, many, especially those in management, will demand service is restored immediately to continue business functions.  Of course, after the service is back up, the demand for an RCA will come.  Sadly, many metrics, and some logs, are lost when a server is bounced.  Below are basic guidelines on what metrics to collect for MySQL.  The steps are in no particular order.

  1. Save a copy of the MySQL Error Log.
    sudo cp /path/to/datadir/*.log /some/where/safe
  2. Make a copy of the MySQL configuration file.
    sudo cp /path/to/my.cnf /some/where/safe
  3. Make a copy of system logs and save them somewhere on persistent storage in a location that will not be overwritten.  Consider doing something like the following on Linux:
    sudo cp /var/log/syslog /some/where/safe/syslog
    sudo cp /var/log/messages /some/where/safe/messages
    sudo journalctl -e > /some/where/safe/journalctl.txt
  4. If MySQL is running still and you can log in, get some MySQL metrics.  You will want to save the output into files somewhere.
    sudo mysqladmin -i10 -c10 proc > /some/where/safe/mysql_procs.txt
    mysql> SHOW GLOBAL VARIABLES;
    sudo mysqladmin -i10 -c10 ext > /some/where/safe/mysql_ext.txt
    mysql> SHOW ENGINE INNODB STATUS\G
  5. If MySQL is running and you have Percona Toolkit, you should collect some pt-stalk output.
    sudo ./pt-stalk --no-stalk --iterations=2 --sleep=30 --dest=/some/where/safe -- --user=root --password=<mysql-root-pass>;
  6. If you have space and time, a copy of the database files (data directory in MySQL) could be helpful.  Certainly, for many installations, getting all of the data files will be impossible.  If it is a small database and space and time allow, it can be best to get all the files just in case.
    sudo cp -R /path/to/datadir /some/where/safe/datadir
  7. Copy database logs and save them somewhere safe for later review.  Systems like Percona XtraDB Cluster (PXC) will create GRA files during an issue which can be really helpful to look at to determine the root cause.  By combining the GRA header file with the contents of the GRA log files, you can use the mysqlbinlog command to get the records of transactions causing issues.  More information can be found in one of our older blogs here
    Percona XtraDB Cluster (PXC): what about GRA_*.log files?.
    sudo cp /path/to/data/dir/GRA* /some/where/safe/datadir/
  8. Save system metrics pertaining to CPU, I/O, and memory usage:
    sudo mpstat -a 1 60 > /some/where/safe/mpstat.txt
    sudo vmstat 1 60 > /some/where/safe/vmstat.txt
    sudo iostat -dmx 1 60 > /some/where/safe/iostat.txt
  9. Save system info.
    sudo cat /proc/cpuinfo > /some/where/safe/cpuinfo.txt
  10. If you have Percona Toolkit, the following would be very helpful:
    sudo pt-summary > /some/where/safe/pt-summary.txt
    sudo pt-mysql-summary > /some/where/safe/pt-mysql-summary.txt
  11. Get hardware diagnostics.
    # disk info
    sudo df -k > /some/where/safe/df_k.txt
    sudo lsblk -o KNAME,SCHED,SIZE,TYPE,ROTA > /some/where/safe/lsblk.txt
    sudo lsblk --all > $PTDEST/lsblk-all;
    
    # lv/pv/vg only for systems with LVM
    sudo lvdisplay --all --maps > /some/where/safe/lvdisplau-all-maps.txt
    sudo pvdisplay --maps > /some/where/safe/pvdisplay-maps.txt
    sudo pvs -v > /some/where/safe/pvs_v.txt
    sudo vgdisplay > /some/where/safe/vgdisplay.txt
    
    # nfsstat for systems with NFS mounts 
    sudo nfsstat -m > /some/where/safe/nfsstat_m.txt
    sudo nfsiostat 1 120 > /some/where/safe/nfsiostat.txt
    
    # Collect hardware information 
    sudo dmesg > /some/where/safe/dmesg.txt
    sudo dmesg -T free -m > /some/where/safe/dmesg_free.txt 
    sudo dmesg -T > /some/where/safe/dmesg_t.txt
    sudo ulimit -a > /some/where/safe/ulimit_a.txt
    sudo cat /proc/sys/vm/swappiness > /some/where/safe/swappiness 
    sudo numactl --hardware > /some/where/safe/numactl-hardware.txt

It goes without saying, it would be best to script the above into a useful bash script you can run when there is an issue.  Just be sure to test the script in advance of an issue.

Again, the goal is to preserve useful diagnostic data that could be useful for determining the root cause of the issue at a later time after the service is restored.  Just don’t get caught up in looking through the above diagnostics!  Certainly, more data is better but the above is a great starting point.  As time goes on, you may realize you wish you had other metrics and can add them to your script or Standard Operating Procedure (SOP).

Naturally, adding monitoring like Percona Monitoring and Management (PMM) would be a great option that can save you a lot of time and collect even more trends over time which can be extremely helpful.

With the above diagnostics, you would have a ton of information in the event of an issue to find the root cause.  Now, you can sort through the diagnostics.  Of course, if you need help with that, Percona can help you here as well.

Planet MySQL