Soketi is a simple, fast and resilient open-source WebSockets server written in Typescript. It’s fully compatible with the Pusher v7 protocol which makes it a great replacement to Pusher when using Laravel Echo.Laravel
Cashier Stripe v13 Released
We’re very excited to announce the immediate availability of Cashier v13.Laravel
Vapor: "Learn Laravel Vapor" is now available on YouTube
The video series "Learn Laravel Vapor" has been completed and is now available for viewing on YouTube. With 2 hours of content, our team will help you launch your Laravel infrastructure on Vapor and fall in love with the scalable simplicity of serverless.Laravel
Laravel: Parallel Testing Is Now Available
We’re excited to announce that Parallel Testing is now available in Laravel. Starting Laravel v8.25, you may use the built-in `test` Artisan command to run your tests simultaneously across multiple processes to significantly reduce the time required to run the entire test suite.Laravel
The problem with homeowners being more likely to vote
https://www.futurity.org/wp/wp-content/uploads/2022/08/home_ownership_voting_1600.jpg
Homeownership boosts voter turnout. But is that a good thing?
Buying a home is a cornerstone of the American Dream, and the US government has long encouraged it with generous subsidies. As far back as the early 20th century, defenders of this policy have argued that it fosters a contented middle class and an engaged electorate.
Indeed, it’s a truism of American politics that homeowners turn out to vote in higher numbers than people who rent their homes. It’s no surprise, then, that politicians tend to court their favor.
But is the link between homeownership and electoral participation one of causation or correlation? Does buying real estate cause a person to plod through the voter guide? Or could it be that those who are more likely to own a home—perhaps due to age, education, or other demographic factors—are simply more prone to vote?
This actually matters. For one thing, subsidizing homeownership to foster a healthy democracy makes sense only if it does so; otherwise, it’s a giveaway to those least in need. And on the flip side, if homeownership does prompt people to vote, that might suggest they’re driven partly by self-interest—specifically, the desire to boost their property values.
In that case, those voters will presumably favor things like restrictive zoning laws that exclude lower-income people and prevent new construction, thus making it harder for others to break into the housing market and worsening social inequalities.
To get to the bottom of this, Andrew B. Hall, a professor of political economy at Stanford Graduate School of Business, and Jesse Yoder collected two decades’ worth of election records on 18 million people in Ohio and North Carolina. Then they combined that with deed data to see if people’s behavior changed when they became homeowners.
The result? They found that buying a home really did cause people to vote substantially more in local elections—and the bump in turnout was almost twice as big when zoning issues were on the ballot. What’s more, the effect increased with the purchase price. The greater the asset value, the more likely people were to vote.
“Taken together, these findings strongly suggest that the increase in voting is driven, at least in part, by economic considerations,” Hall says. “People are clearly paying more attention and turning out in larger numbers to weigh in on policies that affect their investment.”
Their findings appear in the Journal of Politics.
Voting rates of homeowners and renters
The idea that voters are spurred by pecuniary motives might seem obvious in these disenchanted times. But it’s hardly in line with our ideals as a nation, nor is it universally accepted by scholars of politics or psychology.
For one thing, Hall points out, voting is costly. Researching the issues, watching debates, suffering doorstep canvassers, getting to the polling station on a workday, standing in line—it’s kind of a pain. (If it were fun, there’d be no distinction in sporting “I voted” buttons.)
And the kicker is that your effort has an infinitesimally tiny effect on the outcome. Don’t tell the kids, but no election is decided by one person’s vote. On a narrow, individual cost-benefit basis, voting is not a great value proposition.
Yet the fact remains that homeowners vote at higher rates than renters. A different theory, Hall says, is that both homeownership and voting rates reflect preexisting differences. People who own their homes are wealthier and more educated, and are therefore more likely to identify with social and governmental institutions—and less likely, perhaps, to be alienated and disengaged.
“Both of those stories are plausible,” Hall says, “and you can’t disentangle them with cross-sectional data. You need to look at individuals’ behavior over time.”
Also, although wealthy people vote more, it’s important to be clear that buying a home does not instantly raise someone’s net worth, so any immediate effect would not be driven by wealth. But does converting assets from cash or stocks to real estate increase one’s interest in local politics?
Apparently so. Using data on all registered voters and homeowners in Ohio, Hall and Yoder found that buying a home boosted an individual’s turnout rate in local general elections by 5 percentage points on average, to 31%. Since the baseline turnout rate in the sample was only 26%, that’s an almost 20% increase in propensity to vote.
The researchers then sliced up the data by home price and found that people with more expensive homes increased their turnout even more. The effect rose sharply as home prices increased, being more than twice as large in the top decile than in the bottom decile.
“This certainly suggests, though it doesn’t prove, that the increase in voting by homeowners is driven by economic self-interest,” Hall says, “because the motivation to protect and enhance an investment would naturally tend to increase with the value at stake.”
Why homeowners vote
The researchers next gathered data on local ballot initiatives in Ohio to see what kind of issues galvanized homeowners. Here, they found that the increase in turnout was greatest when zoning measures were being decided—the effect of home ownership on election turnout was nearly doubled in such cases.
Of course, the data doesn’t show how people voted, but it seems unlikely that they made a special effort to vote against their own interests. And that raises a troubling issue. “This tells us that encouraging homeownership doesn’t just incentivize people to vote,” Hall says, “it also likely changes how they vote and the kinds of policies they support.”
In particular, he says, buying a home may instill a preference for restrictive housing policies, and that may help explain the chronic housing shortage that has plagued the US for decades.
“We don’t have direct evidence of this in the paper, but the results are consistent with the story that homeowners capture the local political process and resist the building of more residences,” Hall says. “Depressing the local supply of homes raises prices, and it makes it harder for people to move to where there are economic opportunities.”
That reduces economic growth and deepens social inequalities by making it harder for low-income families to break into the housing market and accumulate wealth of their own. The interests of homeowners can also result in NIMBYism—resistance to public works and job-creating investments that might alter their neighborhood’s character or demographics.
Support for home ownership is deeply ingrained in American politics, partly because it’s believed to give people an investment in the democratic process. President George W. Bush made this explicit when he extolled the benefits of an “ownership society” in 2004. “When citizens become homeowners, they become stakeholders as well,” the White House declared.
But the ownership society contains a paradox: While the possession of property does encourage civic participation—as this study uses large-scale data to document for the first time—it may do so in a way that is ultimately self-limiting, by excluding those who failed to get in on the ground floor.
Source: Lee Simmons from Stanford University
The post The problem with homeowners being more likely to vote appeared first on Futurity.
Futurity
NEW Smith & Wesson M&P9 M2.0 METAL Pistol
https://www.thefirearmblog.com/blog/wp-content/uploads/2022/08/NEW-Smith-Wesson-MP9-M2.0-METAL-Pistol-3-180×180.jpg
Smith & Wesson has just announced the release of a new iteration of their M&P9 M2.0 pistol dubbed M&P9 M2.0 METAL. As the model name suggests, the new pistol features a metal frame. The aluminum frame of the new M&P9 M2.0 METAL pistol is externally similar to its polymer counterpart and is compatible with standard M&P9 M2.0 […]
The post NEW Smith & Wesson M&P9 M2.0 METAL Pistol appeared first on The Firearm Blog.
The Firearm Blog
Laracon Online Schedule Announced
https://laravelnews.imgix.net/images/laracon2022-summer.jpg?ixlib=php-3.3.1
The largest Laravel event of the year streaming on September 14th on YouTube.
The post Laracon Online Schedule Announced appeared first on Laravel News.
Join the Laravel Newsletter to get Laravel articles like this directly in your inbox.
Laravel News
Athena (Trailer)
https://theawesomer.com/photos/2022/08/athena_trailer_t.jpg
After a soldier loses his youngest brother in an apparent police altercation, he returns home to help bring justice to the fallen. But things quickly escalate as the community wants revenge. Director Romain Gavras’ immersive Athena drops us smack-dab into the middle of a tense and chaotic scene. Coming to Netflix 9.23.2022.
The Awesomer
Two Extremely Useful Tools (pt-upgrade and checkForServerUpgrade) for MySQL Upgrade Testing
https://www.percona.com/blog/wp-content/uploads/2022/08/MySQL-Upgrade-Testing.png
My last blog, Percona Utilities That Make Major MySQL Version Upgrades Easier, detailed the tools available from the Percona toolkit that assists us with major MySQL version upgrades. The pt-upgrade tool aids in testing application queries and generates reports on how each question performs on servers running various versions of MySQL.
MySQL Shell Upgrade Checker is a utility that helps in compatibility tests between MySQL 5.7 instances and MySQL 8.0 upgrades, which is part of the mysql-shell-utilities. The util.checkForServerUpgrade() function checks whether the MySQL 5.7 instance is ready for the MySQL 8.0 upgrade and generates a report with warnings, errors, and notices for preparing the current MySQL 5.7 setup for upgrading to MySQL 8.0.
We can run this Upgrade Checker Utility in the current MySQL 5.7 environment to generate the report; I would recommend running it on any of the replica instances that have the same configuration as the production.
The user account used to execute the upgrade checker tool must have ALL rights up to MySQL Shell 8.0.20. The user account requires RELOAD, PROCESS, and SELECT capabilities as of MySQL Shell 8.0.21.
How to generate a report using Upgrade Checker Utility
To generate a report using Upgrade Checker Utility we may either login to the shell prompt or execute directly from the command prompt.
mysqlsh -- util checkForServerUpgrade 'root@localhost:3306' --target-version=8.0.29 --config-path=/etc/my.cnf > CheckForServerUpgrade_Report.txt Please provide the password for 'mysqluser@localhost:3306':
$ mysqlsh MySQL JS > util.checkForServerUpgrade('root@localhost:3306', { "targetVersion":"8.0.29", "configPath":"/etc/my.cnf"}) Please provide the password for 'mysqluser@localhost:3306':
To quit the mysqlsh command prompt, type \exit.
MySQL JS > \exit Bye!
Do pt-upgrade and Upgrade Checker Utility do the same tests? No!
Don’t confuse the Upgrade Checker Utility with the pt-upgrade tool since they are used for different kinds of major version upgrade testing. The Upgrade Checker Utility performs a variety of tests on the selected MySQL server to ascertain whether the upgrade will be successful; however, the tool does not confirm whether the upgrade is compatible with the application queries or routines.
Does it check both my.cnf file and the MySQL server variables?
The utility can look for system variables declared in the configuration file (my.cnf) but removed in the target MySQL Server release, as well as system variables not defined in the configuration file but with a different default value in the target MySQL Server release. You must give the file path to the configuration file when executing checkForServerUpgrade() for these checks. However, the tool is unable to identify the variables that have been deleted in the my.cnf file but are set in the MySQL server.
Let us remove query_cache_type from /etc/percona-server.conf.d/mysqld.cnf and run the command.
]# mysql -uroot -p -e "SHOW VARIABLES WHERE Variable_Name IN ('query_cache_type','query_cache_size')" Enter password: +------------------+---------+ | Variable_name | Value | +------------------+---------+ | query_cache_size | 1048576 | | query_cache_type | ON | +------------------+---------+ ]# cat /etc/my.cnf # # The Percona Server 5.7 configuration file. # # # * IMPORTANT: Additional settings that can override those from this file! # The files must end with '.cnf', otherwise they'll be ignored. # Please make any edits and changes to the appropriate sectional files # included below. # !includedir /etc/my.cnf.d/ !includedir /etc/percona-server.conf.d/ ]# Remove query_cache_type variable from mysqld.cnf: ]# sed -i '/query_cache_type/d' /etc/percona-server.conf.d/mysqld.cnf ]# ]# grep -i query /etc/my.cnf /etc/percona-server.conf.d/mysqld.cnf /etc/percona-server.conf.d/mysqld.cnf:query_cache_size=5058320 ]#
As the query cache type variable has been deleted from my.cnf, the tool is unable to detect it.
# mysqlsh -- util checkForServerUpgrade 'root@localhost:3306' --target-version=8.0.29 --config-path=/etc/my.cnf | grep -B 6 -i "query_cache" 15) Removed system variables Error: Following system variables that were detected as being used will be removed. Please update your system to not rely on them before the upgrade. More information: https://dev.mysql.com/doc/refman/8.0/en/added-deprecated-removed.html#optvars-removed query_cache_size - is set and will be removed ERROR: 1 errors were found. Please correct these issues before upgrading to avoid compatibility issues.
In JSON format, the report looks like this:
Note: To make the blog more readable, I shortened the report.
# mysqlsh -- util checkForServerUpgrade 'root@localhost:3306' --target-version=8.0.29 --config-path=/etc/my.cnf --output-format=JSON { "serverAddress": "localhost:3306", "serverVersion": "5.7.39-42 - Percona Server (GPL), Release 42, Revision b0a7dc2da2e", "targetVersion": "8.0.29", "errorCount": 1, "warningCount": 27, "noticeCount": 1, "summary": "1 errors were found. Please correct these issues before upgrading to avoid compatibility issues.", "checksPerformed": [ { "id": "oldTemporalCheck", "title": "Usage of old temporal type", "status": "OK", "detectedProblems": [] }, { "id": "reservedKeywordsCheck", "title": "Usage of db objects with names conflicting with new reserved keywords", "status": "OK", "detectedProblems": [] }, … { "id": "sqlModeFlagCheck", "title": "Usage of obsolete sql_mode flags", "status": "OK", "description": "Notice: The following DB objects have obsolete options persisted for sql_mode, which will be cleared during upgrade to 8.0.", "documentationLink": "https://dev.mysql.com/doc/refman/8.0/en/mysql-nutshell.html#mysql-nutshell-removals", "detectedProblems": [ { "level": "Notice", "dbObject": "global system variable sql_mode", "description": "defined using obsolete NO_AUTO_CREATE_USER option" } ] }, { "id": "enumSetElementLenghtCheck", "title": "ENUM/SET column definitions containing elements longer than 255 characters", "status": "OK", "detectedProblems": [] }, … { "id": "removedSysVars", "title": "Removed system variables", "status": "OK", "description": "Error: Following system variables that were detected as being used will be removed. Please update your system to not rely on them before the upgrade.", "documentationLink": "https://dev.mysql.com/doc/refman/8.0/en/added-deprecated-removed.html#optvars-removed", "detectedProblems": [ { "level": "Error", "dbObject": "query_cache_size", "description": "is set and will be removed" } ] }, { "id": "sysVarsNewDefaults", "title": "System variables with new default values", "status": "OK", "description": "Warning: Following system variables that are not defined in your configuration file will have new default values. Please review if you rely on their current values and if so define them before performing upgrade.", "documentationLink": "https://mysqlserverteam.com/new-defaults-in-mysql-8-0/", "detectedProblems": [ { "level": "Warning", "dbObject": "back_log", "description": "default value will change" }, { "level": "Warning", "dbObject": "innodb_max_dirty_pages_pct", "description": "default value will change from 75 (%) 90 (%)" } ] }, { "id": "zeroDatesCheck", "title": "Zero Date, Datetime, and Timestamp values", "status": "OK", "detectedProblems": [] }, … ], "manualChecks": [ { "id": "defaultAuthenticationPlugin", "title": "New default authentication plugin considerations", "description": "Warning: The new default authentication plugin 'caching_sha2_password' offers more secure password hashing than previously used 'mysql_native_password' (and consequent improved client connection authentication). However, it also has compatibility implications that may affect existing MySQL installations. If your MySQL installation must serve pre-8.0 clients and you encounter compatibility issues after upgrading, the simplest way to address those issues is to reconfigure the server to revert to the previous default authentication plugin (mysql_native_password). For example, use these lines in the server option file:\n\n[mysqld]\ndefault_authentication_plugin=mysql_native_password\n\nHowever, the setting should be viewed as temporary, not as a long term or permanent solution, because it causes new accounts created with the setting in effect to forego the improved authentication security.\nIf you are using replication please take time to understand how the authentication plugin changes may impact you.", "documentationLink": "https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password-compatibility-issues\nhttps://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password-replication" } ] }
Please read Daniel Guzmán Burgos’ blog post to find out more about the Upgrade Checker Utility and click the link to learn more about the pt-upgrade testing.
Prior to a major version upgrade, application query testing and configuration checks are an inevitable task, and the pt-upgrade and “Upgrade Checker Utility” are quite helpful.
Planet MySQL
Mining the MySQL Performance Schema for Transactions
The MySQL Performance Schema is a gold mine of valuable data.
Among the many nuggets you can extract from it is an historical report of transactions: how long a transaction took to execute, what queries were executed in it (with query metrics), and idle time between queries.
Mining this information is not trivial, but it’s fun and this blog post shows how to start.
Planet MySQL