Your Nonstick Pan Deserves Better. Stop Making These Mistakes

https://www.gearpatrol.com/wp-content/uploads/sites/2/2022/03/fried-eggs-are-fried-in-a-black-skillet-fried-eggs-royalty-free-image-1644439367-jpg.webp

Treat your non-stick pans with respect and they’ll continue to work wonders in the kitchen.

fried eggs are fried in a black skilletPhoto by Maryna Terletska

Like cast-iron pans, non-stick pans come with their own set of rules to ensure long-lasting longevity. If you want to keep getting those perfectly rolled French omelets and smooth, unblemished pancakes, then you’re going to have to make sure your non-stick pans stay in perfect, working condition.

Sadly, that means a little more work than just washing them between uses. As you might have noticed, your nonstick pans probably came with a user manual. Well, it turns out the info inside is actually pretty important. But don’t worry if you tossed it out with the packaging, even if you didn’t read it at all, because we’ve got you covered. Make sure you’re not making any of these following 10 mistakes and you’ll ensure your non-stick pans last for as long as possible.

Even metal tongs can scratch the surface of your pans when using them to pick up food. Opt for a silicon option instead, as seen on the left.
Photo by Sean Tirman

Using Metal Utensils

Arguably the most important, immediate rule to remember is to not use metal utensils on your non-stick pan. The last thing you want to do is to scrape off the non-stick coating that keeps everything, well, non-stick. And unfortunately, metal is very hard and abrasive to surfaces, especially those with a coating (like nonstick). Instead, opt for wooden utensils or those made out of silicone or nylon.

Preheating While Empty

When you heat an empty non-stick pan, the only thing getting heated is the non-stick coating. And that is not good. The non-stick coating will start to deteriorate and release harmful toxins in the air and could even release them into your food, which is definitely something you do not want to be breathing in or eating. Instead, you should put your oil (not cooking spray [more on that later]) into the pan, warm it up and add your ingredients as soon as it’s warm.

Don’t be tempted by the flame — high heat can cause irreparable damage to your nonstick pans.
Photo by Sean Tirman

Taking Things Too Hot

Even after you start cooking, avoid cooking on extra-high heat. Despite having food in the pan, the hotter temperature can still degrade the non-stick coating. Stick with medium-to-low temperatures — while they might not seem hot enough, the pans will heat up plenty. Furthermore, cooking with too-high heat could end up burning your pan — which you might think is staining from your food, until you try to scrub it off (it’s very difficult or even impossible without also scraping off the nonstick coating). It’s also why you shouldn’t expect to get amazing sears from your non-stick pan — that’s what cast iron is for!

Stacking Your Cookware

That precious non-stick material is very delicate. You may feel the urge to stack your cookware to save some space, but the bottom of other cookware will likely scratch your non-stick pan — much in the same way metal utensils would. Do your best to find ways to store your non-stick pans without stacking, but if it’s absolutely necessary to stack because of storage restrictions, keep something soft — like some sort of fabric (some major cookware brands even make pot protectors, like these from All-Clad) — between the cookware to avoid rubbing and abrasion.

Using It After the Coating Tears

We told you all the ways to avoid scratching your non-stick pan, but now it’s happened: the non-stick coating has started to tear away. Once you can see the non-stick coating lifting away, it’s time to throw away the pan. Parts of the pan will start to end up in your food, and you do not want to eat whatever it is that coats your non-stick pan. While it might not make you sick, per se, it’s definitely not going to be good for you (as Delish points out) — especially if its an older pan and/or made outside the USA (this may increase the likelihood of dangerous chemicals making it into your food).

Spending Too Much

Unfortunately, non-stick pans won’t last forever. After all, once it gets even a tiny scratch, the pan is practically done for. However, you don’t have to dump your bank account every time you need a new pan. You can find a great non-stick pan for around $20 (T-fal makes a pretty excellent one), so no need to shell out a few bills for something with a short shelf life.

Stick with Oil and Butter (and Never Cooking Spray)

After you realize you shouldn’t be heating up a non-stick pan without anything in it, it’s important to realize that non-stick still needs a little help being non-stick. Add some fat —whether it’s oil or butter — to your pan so things slide right out once they’re done cooking. Just don’t use cooking sprays, which are notoriously hard to clean off and will start to accumulate on your pan’s surface, creating a nasty, sticky residue and potentially ruining it in the process.

a pan being washed in a sink with a running faucet
Wait for your pans to cool before washing them off, and dry them with a cloth right after you’re done washing.
Photo by Sean Tirman

Throwing a Hot Pan Under Cool Water

This applies to pretty much all cookware, but the quick transition from hot to cold can warp a pan rendering it close to useless. Worse, with enough of a temperature shock, the pan could even chip or crack entirely, rendering it completely broken. Let that hot pan cool before washing it to avoid ruining it for good. And dry it off with a towel or other fabric once you’re done washing — you don’t want water sitting on/in it for too long.

You Use the Dishwasher

Dishwashers feel like a godsend, but they’re the exact opposite when it comes to non-stick pans. From the cleaning solutions to the stark temperature fluctuations, a dishwasher can easily warp and distort your non-stick pan. And even though some non-stick pans say they’re safe to put in the dishwasher, it’s really not that hard to hand wash. After all, that non-stick coating should come in handy or swiping out all the leftover grime in the pan.

Putting in Too Much Elbow Grease

Since you’re (hopefully) hand-washing your non-stick pan now, it’s a good time to tell you to take it easy with the scrubbing. Definitely don’t scrub your pan with an abrasive cleaner — including both gritty soaps and tools, like steel wool — and avoid scrubbing so hard that the coating rubs off. Some nonstick pans come with a microabrasion scrubber, which should be fine when used properly — just make sure to check that user manual for proper instructions.

Gear Patrol

Agent Orange damages the brain like Alzheimer’s

https://www.futurity.org/wp/wp-content/uploads/2024/02/agent-orange-brain-damage-alzheimers-disease-1600.jpgAn orange cloud in front of trees in the background.

Exposure to Agent Orange damages brain tissue in ways similar to Alzheimer’s disease, according to a new study.

Agent Orange, an herbicide used during the Vietnam War, is a known toxin with wide-ranging health effects.

Even though it has not been used for decades, there is increasing interest in its effects on the brain health of aging veterans.

The new study reveals the mechanisms by which Agent Orange affects the brain and how those processes can lead to neurodegenerative diseases.

“These chemicals don’t just affect veterans; they affect our entire population.”

The research shows that exposures to Agent Orange herbicidal chemicals damage frontal lobe brain tissue of laboratory rats with molecular and biochemical abnormalities that are similar to those found in early-stage Alzheimer’s disease.

The findings, published in in the Journal of Alzheimer’s Disease, could have important implications for military veterans who were exposed to Agent Orange during the Vietnam War, says study author Suzanne M. De La Monte, a professor of pathology and laboratory medicine and neurosurgery at Brown University’s Warren Alpert Medical School.

“If we can show that prior exposure to Agent Orange leads to subsequent neurodegenerative disease, then that gives veterans a chance to get help,” De La Monte says.

But the study’s findings have much broader significance, she adds, because the toxins in Agent Orange are also present in lawn fertilizers.

“These chemicals don’t just affect veterans; they affect our entire population,” De La Monte says.

Agent Orange and Alzheimer’s

Agent Orange is a synthetic defoliating herbicide that was widely used between 1965 and 1970 during the Vietnam War. Members of the US military were exposed to the chemical when stationed close to enemy territory that had been sprayed by aircraft.

Government reports show that exposure to Agent Orange also caused birth defects and developmental disabilities in babies born to Vietnamese women residing in the affected areas. Over time, studies showed that exposure to Agent Orange was associated with an increased risk of some cancers as well as cardiovascular disease and diabetes.

Research also revealed associations between Agent Orange exposures and later development of nervous system degenerative diseases, and significantly higher rates and earlier onsets of dementia. However, in the absence of a proven causal link between Agent Orange and aging-associated diseases, there has been a need for studies that improve understanding of the process by which the herbicide affects the brain.

“Scientists realized that Agent Orange was a neurotoxin with potential long-term effects, but those weren’t shown in a clear way,” De La Monte says. “That’s what we were able to show with this study.”

The analysis was conducted by De La Monte and Ming Tong, a research associate in medicine at Brown; both are also associated with Rhode Island Hospital, an affiliate of the Warren Alpert Medical School. The research builds upon their recent studies of exposure to Agent Orange chemicals on immature human cells from the central nervous system showing that short-term exposure to Agent Orange has neurotoxic and early degenerative effects related to Alzheimer’s.

The researchers investigated the effects of the two main constituents of Agent Orange (2,4-dichlorophenoxyacetic acid and 2,4,5-trichlorophenoxyacetic acid) on markers of Alzheimer’s neurodegeneration using the samples from the frontal lobes of laboratory rats. The mature, intact brain tissue samples included a full complex array of cell types and tissue structures.

The scientists treated the samples to cumulative exposure to Agent Orange, as well as to its separate chemical constituents, and observed the underlying mechanisms and molecular changes.

They found that treatment with Agent Orange and its constituents caused changes in the brain tissue corresponding to brain cell degeneration, and molecular and biochemical abnormalities indicative of cytotoxic injury, DNA damage, and other issues.

These chemicals are ‘everywhere’

The approach used by the researchers helped them better characterize the neuropathological, neurotoxic and neurodegenerative consequences of Agent Orange toxin exposures in young, otherwise healthy brains, as would have been the case for Vietnam War-era military personnel and many local residents in Vietnam.

“Looking for the early effects tells us that there is a problem that is going to cause trouble later on and also gives us a grip on the mechanism by which the agent is causing trouble,” De La Monte says. “So if you were going to intervene, you would know to focus on that early effect, monitor it, and try to reverse it.”

Del La Monte hopes to be involved in additional research on human brain tissue to evaluate the long-term effects of Agent Orange exposures in relation to aging and progressive neurodegeneration in Vietnam War veterans.

The use of Agent Orange was prohibited by the US government in 1971. However, the chemicals remain in the environment for decades, De La Monte says. According to the study authors, the widespread, uncontrolled use of Agent Orange in herbicide and pesticide products is such that one in three Americans has biomarker evidence of prior exposure.

Despite growing recognition of the broad toxic and carcinogenic effects of 2,4-dichlorophenoxyacetic acid, the researchers note that concern has not achieved a level sufficient for federal agencies to ban its use.

The researchers conclude that the results of this study and another recent publication support the notion that Agent Orange as well as its independent constituents (2,4-dichlorophenoxyacetic acid and 2,4,5-trichlorophenoxyacetic acid) exert alarming adverse effects on the mature brain and central nervous system.

“That’s why it’s so important to look into the effects of these chemicals,” De La Monte says. “They are in the water; they are everywhere. We’ve all been exposed.”

The National Institute on Alcohol Abuse and Alcoholism at the National Institutes of Health supported the work.

Source: Brown University

The post Agent Orange damages the brain like Alzheimer’s appeared first on Futurity.

Futurity

A Green Beret Shows You How to Shoot a Pistol…in 8 Minutes

Learn how to shoot a pistol…fast. In this video, James Reeves trains with experienced Green Beret, Jimmy Cannon alongside @daniellevalkyrie in Austria. This video offers a unique opportunity to learn fundamental skills in pistol handling, all presented in a concise, easy-to-follow format. Whether you’re a beginner seeking a strong foundation or a seasoned enthusiast looking […]

Read More …

The post A Green Beret Shows You How to Shoot a Pistol…in 8 Minutes appeared first on The Firearm Blog.

The Firearm Blog

Conditional query in Laravel Eloquent

https://tkacz.pro/wp-content/uploads/2024/01/laravel.webp?w=640

Laravel Eloquent is very powerful and we can use it in many cases to get or filer data. One very common situation is to build query according to some statements and conditionals. The most common way to achieve that is to build id step by step: 

$onlyUnread = $request->only_unread ?? null;

$query = Article::query()->where('active', true);
if ($onlyUnread) {
    $query->where('unread', true);
}

$articles = $query->get();

Last time I checked some old documentation and found different method – when. It allows us to simplify that process a lot and include are conditionals and additional query steps in just one command: 

$articles = Article::query()->where('active', true)
    ->when($onlyUnread, function (Builder $query): Builder {
        return $query->where('unread', true);
    })
    ->get();

It’s much cleaner than build step by step, and because we still use Builder object, we can do exactly the same things like on higher level. Of course, it may be necessary to use some additional params – of course it is not a problem, we only must send them to function inside:

$articles = Article::query()->where('active', true)
    ->when($myCondition, function (Builder $query) use ($param1, $param2): Builder {
        return $query->where('unread', true)
            ->orWhere('param1', $param1)
            ->orWhere('param2', $param2);
    })
    ->get();

It is also possible to use when more than once – if you need set some steps with separate conditions, no problem. I do not know, why this is not present in current documentation, but when method is available in current Laravel version and can be used without additional steps.  

Laravel News Links

DuckDuckGo’s Browser Adds Encrypted, Privacy-Minded Syncing and Backup

DuckDuckGo keeps adding new features to its browser; and while these features are common in other browsers, DuckDuckGo is giving them a privacy-minded twist. The latest is a private, end-to-end encrypted syncing service. There’s no account needed, no sign-in, and the company says it never sees what you’re syncing. From a report: Using QR codes and shortcodes, and a lengthy backup code you store somewhere safe, DuckDuckGo’s browser can keep your bookmarks, passwords, "favorites" (i.e., new tab page shortcuts), and settings for its email protection service synced between devices and browsers. DuckDuckGo points to Google’s privacy policy for using its signed-in sync service on Chrome, which uses "aggregated and anonymized synchronized browsing data to improve other Google products and services." DuckDuckGo states that the encryption key for browser sync is stored only locally on your devices and that it lacks any access to your passwords or other data.


Read more of this story at Slashdot.

Slashdot

11+ Laravel Tips: Optimize Database Queries (2024)

https://websolutionstuff.com/adminTheme/assets/img/11_laravel_tips_optimize_database_queries_2024.jpg

Hey developers! If you’re like me, constantly striving to make your Laravel applications faster and more efficient, you’re in for a treat. In this guide, I’m excited to share 11+ game-changing Laravel tips to supercharge your database queries as we step into 2024.

Database optimization doesn’t have to be a head-scratcher, and with these simple tips, we’ll explore ways to enhance your Laravel projects, ensuring they not only run smoothly but also deliver top-notch performance.

In this article, we’ll see 11+ laravel tips: optimize database queries (2024), the best 11 tips and tricks to improve database queries in laravel 8/9/10, and query optimization in laravel 2024.

Ready to dive into the world of optimized database queries? Let’s make our Laravel applications faster and more responsive together.

1. Minimizing Unnecessary Queries

Sometimes, we end up running database queries that aren’t really needed. Take a look at the example below.

<?php
 
class PostController extends Controller
{
    public function index()
    {
        $posts = Post::all();
        $private_posts = PrivatePost::all();
        return view('posts.index', ['posts' => $posts, 'private_posts' => $private_posts ]);
    }
}

The provided code fetches rows from two distinct tables (e.g., "posts" and "private_posts") and then sends them to a view. Take a peek at the corresponding view file presented below.

// posts/index.blade.php
 
@if( request()->user()->isAdmin() )
    <h2>Private Posts</h2>
    <ul>
        @foreach($private_posts as $post)
            <li>
                <h3></h3>
                <p>Published At: </p>
            </li>
        @endforeach
    </ul>
@endif
 
<h2>Posts</h2>
<ul>
    @foreach($posts as $post)
        <li>
            <h3></h3>
            <p>Published At: </p>
        </li>
    @endforeach
</ul>

As you can see above, $private_posts is visible to only a user who is an admin. Rest all the users cannot see these posts.

We can modify our logic below to avoid this extra query.

$posts = Post::all();
$private_posts = collect();
if( request()->user()->isAdmin() ){
    $private_posts = PrivatePost::all();
}

 

2. Consolidate Similar Queries for Improved Efficiency

Sometimes, we find ourselves needing to create queries to fetch various types of rows from a single table.

$published_posts = Post::where('status','=','published')->get();
$featured_posts = Post::where('status','=','featured')->get();
$scheduled_posts = Post::where('status','=','scheduled')->get();

Instead of this 3 different queries:

$posts =  Post::whereIn('status',['published', 'featured', 'scheduled'])->get();
$published_posts = $posts->where('status','=','published');
$featured_posts = $posts->where('status','=','featured');
$scheduled_posts = $posts->where('status','=','scheduled');

 

 

3. Optimizing Performance: Adding Index to Frequently Queried Columns

When you’re filtering queries using a condition on a text-based column, it’s a smart move to slap an index on that column. Why? Because adding an index makes your queries way speedier when sifting through rows.

Think of it like a well-organized filing system – it just makes finding what you need a whole lot faster!

$posts = Post::where('status','=','published')->get();

In the example above, we’re fetching records based on a condition added to the "status" column. To boost the query’s performance, consider enhancing it with the following database migration.

Schema::table('posts', function (Blueprint $table) {
   $table->index('status');
});

 

4. Optimize Pagination: Switch to simplePaginate Over Paginate

When it comes to paginating results, our typical approach would be:

$posts = Post::paginate(10);

When using pagination in Laravel, the typical approach involves two queries: one to retrieve paginated results and another to count the total number of rows in the table. Counting rows can be slow and impact query performance.

But why does Laravel count the total number of rows?

It does so to generate pagination links. By knowing the total number of pages beforehand, along with the current page number, Laravel facilitates easy navigation. You can jump to any page with confidence.

On the flip side, using simplePaginate skips the total row count, making the query faster. However, you sacrifice the knowledge of the last page number and the ability to jump to specific pages.

For large database tables, favor simplePaginate over paginate can significantly improve performance.

$posts = Post::paginate(20); // Generates pagination links for all the pages

$posts = Post::simplePaginate(20); // Generates only next and previous pagination links

 

5. Optimizing Database Queries: Avoiding Leading Wildcards with the LIKE Keyword

When aiming to retrieve results that match a particular pattern, our usual go-to approach is to use:

select * from table_name where column like %keyword%

The previous query scans the entire table, which can be inefficient. If we’re aware that the keyword appears at the start of the column value, a more efficient query can be formulated as follows:

select * from table_name where column like keyword%

 

6. Optimizing WHERE Clauses: Minimizing the Use of SQL Functions

It’s advisable to steer clear of using SQL functions in the WHERE clause, as they can lead to a full table scan. Take a peek at the example below: when querying results based on a specific date, the typical approach involves:

$posts = POST::whereDate('created_at', '>=', now() )->get();

This will result in a query similar to below.

select * from posts where date(created_at) >= 'timestamp-here'

The initial query causes a full table scan because the where condition isn’t applied until the date function is evaluated.

To improve this, we can restructure the query to eliminate the need for the date SQL function, as shown below:

$posts = Post::where('created_at', '>=', now() )->get();
select * from posts where created_at >= 'timestamp-here'

 

7. Optimizing Table Structure: Minimizing the Addition of Excessive Columns

To enhance performance, it’s wise to keep the number of columns in a table to a minimum. In databases like MySQL, you can optimize by breaking down tables with numerous columns into multiple tables. These tables can then be linked using primary and foreign keys.

Including excessive columns in a table extends the length of each record, leading to slower table scans. This becomes evident when executing a "select *" query, as it fetches unnecessary columns, causing a slowdown in retrieval speed

 

8. Separating Columns with Text Data Type into Their Own Table

When dealing with tables that store substantial data, especially in columns like TEXT, it’s wise to consider separating them into their own table or into a less frequently accessed table.

This practice proves beneficial because columns with extensive information can significantly inflate the size of individual records, impacting query times.

For instance, picture a table named "posts" with a "content" column storing hefty blog post content. Given that this detailed content is typically required only when someone is viewing that specific blog post, extracting this column from the main "posts" table can dramatically enhance query performance, especially when dealing with a multitude of posts.

 

9. More Efficient Method for Retrieving the Latest Rows from a Table

When we aim to fetch the most recent rows from a table, our usual approach often involves the following:

$posts = Post::latest()->get();
// or $posts = Post::orderBy('created_at', 'desc')->get();

The above approach will produce the following SQL query.

select * from posts order by created_at desc

Instead of this, you can do like this:

$posts = Post::latest('id')->get();
// or $posts = Post::orderBy('id', 'desc')->get();
select * from posts order by id desc

 

10. Optimizing MySQL Inserts

So far, we’ve focused on making select queries faster for fetching data from a database. Usually, our attention revolves around optimizing read queries. Yet, there are instances where we need to speed up insert and update queries as well.

// Instead of inserting records one by one like this:
foreach ($data as $record) {
    DB::table('your_table')->insert($record);
}

// You can optimize it by using the insert method with an array of data like this:
DB::table('your_table')->insert($data);

 

11. Inspecting and Optimizing Queries

When it comes to optimizing queries in Laravel, there’s no one-size-fits-all solution. After all, who knows your application better than you do? Understanding its behavior, the number of queries it churns out, and which ones are necessary is key.

By inspecting these queries, you gain valuable insights and can work towards reducing their overall number.

To aid in this crucial task, several tools are available to help you scrutinize queries on every page.

However, a word of caution: refrain from running these tools in your production environment. Doing so might compromise your application’s performance and expose sensitive information to unauthorized users.

Here are a few tools to inspect and optimize your queries:

  1. Laravel Debugbar:

    • Laravel Debugbar features a handy "database" tab, revealing all executed queries when you navigate through your pages. Visit each page in your application to observe the queries in action.
  2. Clockwork:

    • Similar to Laravel Debugbar, Clockwork provides debug information. However, instead of injecting a toolbar into your website, it displays the details in the developer tools window or as a standalone UI accessible at yourappurl/clockwork.
  3. Laravel Telescope:

    • Laravel Telescope serves as an excellent debugging companion during local Laravel development. Once installed, access the dashboard by visiting yourappurl/telescope. Navigate to the "queries" tab to view and analyze all the queries executed by your application.

Remember, these tools are best suited for your development environment to fine-tune your queries without risking your production’s performance and security.

Happy optimizing!

 


You might also like:

Laravel News Links

Superman & Batman vs. Darth Vader

https://theawesomer.com/photos/2024/02/superman_batman_vader_t.jpg

Superman & Batman vs. Darth Vader

Link

The Dark Knight takes on the Dark Lord of the Sith in a quest to release his Justice League teammate from an Imperial prison cell. Batinthesun’s live-action fan film pulls out all the stops as Batman dons a lightsaber and other Wayne Enterprises gadgets on a quest to take down Darth Vader.

The Awesomer

Deadpool 3’s Trailer Is Here to Save the Marvel Cinematic Universe

https://i.kinja-img.com/image/upload/c_fill,h_675,pg_1,q_80,w_1200/e88bbe770aef551ed635c3449e39cb66.jpg

The first trailer for Deadpool 3 is here.
Image: Marvel Studios

Marvel Studios is only releasing one movie this year—but, from the looks of it, it’s going to be unforgettable. That movie, of course, is Deadpool & Wolverine, which brings the R-rated, fourth-wall-breaking hero from Fox’s X-Men Universe into the Marvel Cinematic Universe. Ryan Reynolds stars and, this time, he’s bringing along his friend Hugh Jackman as Wolverine.

io9 Interview: Oscar Isaac Was ‘All In’ on Moon Knight

Directed by Shawn Levy, Deadpool 3 is one of the most highly anticipated Marvel films in years and now the first trailer is here.

Filming only wrapped a few weeks ago, so the fact that we’re getting a trailer at all for this is pretty incredible. So, what do you think?

Deadpool 3 opens in theaters July 26.

[Editor’s Note: This article is part of the developing story. The information cited on this page may change as the breaking story unfolds. Our writers and editors will be updating this article continuously as new information is released. Please check this page again in a few minutes to see the latest updates to the story. Alternatively, consider bookmarking this page or sign up for our newsletter to get the most up-to-date information regarding this topic.]

Read more from io9:


Want more io9 news? Check out when to expect the latest Marvel, Star Wars, and Star Trek releases, what’s next for the DC Universe on film and TV, and everything you need to know about the future of Doctor Who.

Gizmodo