Working With URIs in Laravel

https://picperf.io/https://laravelnews.s3.amazonaws.com/featured-images/laravel-11-uri-featured.jpg

Working With URIs in Laravel

Laravel 11.35 introduced the Uri class powered by the PHP League’s URI library. Uri makes it easy to manipulate and work with URIs in your Laravel application and includes some conveniences around named routes.

Basic Manipulation

At the heart of the Uri class is creating and manipulating URI strings, including the query, fragment, and path:

use Illuminate\Support\Uri;

$uri = Uri::of('https://laravel-news.com')
    ->withPath('links')
    ->withQuery(['page' => 2])
    ->withFragment('new');

(string) $url; // https://laravel-news.com/links?page=2#new

$uri->path(); // links
$uri->scheme(); // https
$uri->port(); // null
$uri->host(); // laravel-news.com

Also, note the difference between getting the URI value and decoding the URI:

Example of URI manipulation
Example of basic URI manipulation, value, and decoding.

Query Assertion and Manipulation

Asserting and manipulating the URI query params has never been easier in Laravel, using the accompanying UriQueryString under the hood. The UriQueryString class uses the support trait InteractsWithData, which gives you a bunch of useful methods for asserting a query string:

use Illuminate\Support\Uri;

$uri = Uri::of("https://laravel-news.com")
    ->withPath("links")
    ->withQuery(["page" => 2, 'name' => ''])
    ->withFragment("new");

$uri->query()->all(); // ["page" => "2"]

$uri->query()->hasAny("page", "limit"); // true
$uri->query()->has("name"); // true
$uri->query()->has('limit'); // false
$uri->query()->missing('limit'); // true

$uri->query()->filled('page'); // true
$uri->query()->filled("name"); // false
$uri->query()->isNotFilled("name"); // true
$uri->query()->isNotFilled("page"); // false

$uri->query()->string("page", "1"); // Stringable{ value: 2 }
$uri->query()->integer("limit", 10); // 10

Learn about all the useful methods that InteractsWithData provides to the UriQueryString instances to assert and manipulate query data.

Get an Uri Instance from Named Routes, Paths, and the Current Request

The Uri class can also create a URI from a named route in your application, a relative URL, or even from the current Request instance:

// Using a named route
(string) Uri::route("dashboard"); // http://laravel.test/dashboard

// Using a root-relative URL
(string) Uri::to("/dashboard"); // http://laravel.test/dashboard

// From the current request
function (Request $request) {
    (string) $request->uri(); // http://laravel.test/dashboard
}

As of Laravel 11.36, the Uri class is aliased by default in Laravel applications, meaning you can use it without importing the Illuminate\Support\Uri namespace.

Learn More

We hope you enjoy using Uri in your Laravel applications! The Uri class was released in Laravel 11.35 in #53731. Also, read up on InteractsWithData, which provides a ton of useful methods for working with the Uri class, the Fluent class, and Laravel’s HTTP Request class (via InteractsWithInput).


The post Working With URIs in Laravel appeared first on Laravel News.

Join the Laravel Newsletter to get all the latest
Laravel articles like this directly in your inbox.

Laravel News

Elevation Lab has a gadget that gives an AirTag a ten-year battery life

https://photos5.appleinsider.com/gallery/62089-128623-elevationlabsairtag-xl.jpg

ElevationLab’s TimeCapsule AirTag Battery Case – Image credit: ElevationLab


Elevation Lab’s TimeCapsule is a case for AirTag that adds more battery life, extending the time between battery changes to up to ten years.

Apple’s AirTag is extremely useful when it comes to tracking down lost or stolen items, with many stories detailing how it’s helped reclaim personal property. However, while it’s small and handy, its battery life can be a problem.

The AirTag uses a CR2032 battery, and that cell lasts for about a year before you need to change it out. While this isn’t a massive problem when using it on a keyring, it can be a struggle to regularly replace if it’s in a well-hidden and hard to access spot, such as underneath a vehicle.

To solve this problem, ElevationLab has come up with the TimeCapsule AirTag Battery Case. A rectangular fiber-reinforced composite enclosure designed to encase the AirTag’s main body, and to supply power to it too.

Users have to remove the battery and door from an AirTag before placing it inside the case. Along with the AirTag, the case has space inside its 4.45-inch long, 1.57-inch wide, and 0.75-inch thick casing to hold two AA batteries, which supply power to the AirTag.

The result is a 14-times increase in battery life, with a claimed lifespan of up to ten years. However, this does rely on the batteries being good quality, and not degrading or otherwise failing for such a long period of time.

Using four CNC-machined screws to hold the case together, it’s also fully waterproof with an IP69 rating.

TimeCapsule is available now from the company’s store and Amazon, starting from $19.99 for one unit. A two-pack is available for $29.99, and a four-pack is $39.99.

AppleInsider News

The Case Of The Missing 15,000,000

https://www.battleswarmblog.com/wp-content/uploads/2024/12/SkinnerNose.gif

From Russiagate to the uselessness of masks to Hunter Biden’s laptop, the pattern we’ve all come to recognize is Democrat-controlled institutions lying to our face about something, then accusing people of being “conspiracy theorists” when people question the false narrative. Time after time, the “conspiracy theorists” were proven right.

So let’s hear Townhall’s Larry O’Connor talk about those missing 15,000,000 Biden votes from the 2020 Presidential election.

  • “It appears that upwards to 15 million or more Americans have been abducted.”
  • Then he shows The Chart.

  • “Starting all the way to the left, with Barack Obama versus Mitt Romney, and you can see there that Barack Obama just got over about 66 million votes. Then four years later, Hillary Clinton [got] about the same about 66 million votes as Barack Obama did. And then we get to 2020, in the middle of the pandemic, Joe Biden got, of course, famously, 82 million votes which is you know the difference of about 15-16 million votes.”
  • “That would be about 15 million votes that we believe disappeared. Because when you come back to this presidential election, you can see that Kamala Harris once again returns to form and gets that same sort of 66 million that Hillary Clinton and Barack Obama did.”
  • “We saw this drastic drop all of a sudden this year, where the same number of voters in 2012, 2016 and 2024 all voted for a Democrat. But there’s that that outlier Joe Biden.”
  • “They were either abducted by aliens, or they got taken up to heaven by Jesus in The Rapture, or the people suddenly became apathetic about politics, where they rallied to vote in 2020 but now they don’t care.”
  • “They loved Joe Biden so much that they came out of the woodwork by the level of 15 million, but then they don’t like Kamala Harris, so they’re just going to sit it out?”
  • “Or our last option is that they never actually existed in the first place. The people didn’t exist. The ballots certainly existed, but not the people.”

  • “Total votes cast: 2004, 121 million. 2008, big year, Barack Obama caught fire, built a huge momentum behind him, and people got excited about making history. That increased by about 8 million [129 million]. 2012 it went down a bit about two million, two and a half million [126 million]. 2016, we’re back up around the same level. Total votes cast 128 million, which is about the same as it was in 2008.”
  • “You pop down to 2024, again, slight increase about 129 million again, which puts us back to the Barack Obama levels.”
  • “But then it was four years ago. Four years ago you’re looking at total votes cast 155 million. Have we ever seen anything like this before?”
  • “Is there any possible explanation to that? Are we to believe that that many people wanted to vote in 2020, and only 2020, and then this year they just shrugged and said, ‘Ah, forget about it?’”
  • “Are you telling me that with a billion dollars in the bank, Kamala Harris only focusing on seven states, the same seven states, by the way, that Joe Biden focused on four years ago, that they were that inept?”
  • “This is criminal malpractice in the world of politics, that they were that incompetent that with a billion dollars, they couldn’t get out that vote?”
  • “Somebody posted going back to 1984…Bellweather counties in America are seen as counties that [the] way these counties vote generally speaking reflect the way the presidential election will go.” Rather than O’Connor describing the chart, here’s the chart itself:

    That seems…statistically unlikely.

  • “Donald Trump won every single one of those counties except for one. And yet that year (2020), the only year since 1984 the winner of these bellweather counties, which was Donald Trump, did not become the eventual winner of the Electoral College, the only one. And then we go to this last election, and you can see [in] 2024 Donald Trump won 88% of the counties, Kamala Harris won only two of them, and he was eventually the president.”
  • “So 2020 is the outlier. It’s the only year that Joe Biden ends up being the president, the winner of the Electoral College, by only winning 6% of these bellweather counties, just one of them, just one county, and it happened to be in his home state of Delaware.”
  • Roseanne Barr: “They still think Biden got 81 million votes at 4 a.m. Trump’s the most popular candidate of all time. He won three elections, two handily in a row.”
  • “It’s a fair observation. In fact, it’s hard not to reach this conclusion.”
  • “I’m curious as to how anyone is looking at these numbers and not asking this question.”
  • Democrats have been confronted by a whole lot of difficult truths following this election: A majority of Americans dislike their party, people hate wokeness, and Joe Biden was just as senile and corrupt as Republicans have argued all along.

    Now they should face up to the fact that President Lol81million’s 2020 “victory” was due to massive voter fraud.

    Just like all of us said four years ago.

    Lawrence Person’s BattleSwarm Blog

    Dynamic Page Updates with Laravel Blade Fragments

    https://picperf.io/https://laravelnews.s3.amazonaws.com/featured-images/12-12-2024-blade-fragment-cropped.png

    Dynamic Page Updates with Laravel Blade Fragments

    Blade Fragments enable partial page updates by returning specific template sections, ideal for use with htmx or Turbo frameworks.

    Using Blade Fragments

    Basic fragment definition and usage:

    // In your blade template
    @fragment('notification-list')
        <div class="notifications">
            @foreach($notifications as $notification)
                <div class="alert">
                    
                </div>
            @endforeach
        </div>
    @endfragment
    
    // In your controller
    return view('dashboard')
        ->fragment('notification-list');
    

    Real-World Implementation

    Example of a live notification system:

    <?php
    
    namespace App\Http\Controllers;
    
    use App\Models\Notification;
    use Illuminate\Http\Request;
    
    class NotificationController extends Controller
    {
        public function store(Request $request)
        {
            $notification = Notification::create([
                'user_id' => auth()->id(),
                'message' => $request->message,
                'type' => $request->type
            ]);
    
            if ($request->hasHeader('HX-Request')) {
                return view('notifications.index', [
                    'notifications' => auth()->user()->notifications()->latest()->get()
                ])->fragmentIf(
                    $request->hasHeader('HX-Request'),
                    'notification-list'
                );
            }
    
            return back();
        }
    
        public function clear(Request $request)
        {
            auth()->user()->notifications()->delete();
    
            return view('notifications.index', [
                'notifications' => collect()
            ])->fragment('notification-list');
        }
    }
    

    Template structure:

    <!-- notifications/index.blade.php -->
    <div class="container">
        @fragment('notification-list')
            <div class="notification-wrapper">
                @forelse($notifications as $notification)
                    <div class="alert alert-">
                        
                        <span class="timestamp">
                            
                        </span>
                    </div>
                @empty
                    <p>No notifications</p>
                @endforelse
            </div>
        @endfragment
    </div>
    

    Blade Fragments represent Laravel’s commitment to modern, interactive web development, offering a server-side solution that integrates seamlessly with progressive enhancement techniques while maintaining the simplicity developers expect from Laravel.


    The post Dynamic Page Updates with Laravel Blade Fragments appeared first on Laravel News.

    Join the Laravel Newsletter to get all the latest
    Laravel articles like this directly in your inbox.

    Laravel News

    MySQL with Diagrams Part One: Replication Architecture

    https://www.percona.com/blog/wp-content/uploads/2024/12/MySQL-with-Diagrams-Replication-Architecture-200×112.jpgMySQL with Diagrams Part One: Replication ArchitectureIn this series, “MySQL with Diagrams,” I’ll use diagrams to explain internals, architectures, and structures as detailed as possible. In basic terms, here’s how replication works: the transactions are written into a binary log on the source side, carried into the replica, and applied. The replica’s connection metadata repository contains information that the replication receiver […]Planet MySQL

    ‘The Dying Language of Accounting’

    Paul Knopp, KPMG US CEO, writing in an op-ed on WSJ: According to a United Nations estimate, 230 languages went extinct between 1950 and 2010. If my profession doesn’t act, the language of business — accounting — could vanish too. The number of students who took the exam to become certified public accountants in 2022 hit a 17-year low. From 2020 to 2022, bachelor’s degrees in accounting dropped 7.8% after steady declines since 2018. While the shortage isn’t yet an issue for the country’s largest firms, it’s beginning to affect our economy and capital markets. In the first half of 2024, nearly 600 U.S.-listed companies reported material weaknesses related to personnel. S&P Global analysts last year warned that many municipalities were at risk of having their credit ratings downgraded or withdrawn due to delayed financial disclosures. Our profession must remove hurdles to learning the accounting language while preserving quality. In October, KPMG became the first large accounting firm to advocate developing alternate paths to CPA licensing. We want pathways that emphasize experience, not academic credits, after college. Most people today must earn 30 credits after their bachelor’s degrees — the so-called 150-hour rule — work under a licensed CPA for a year, and pass the CPA exam to become licensed. Research by the Center for Audit Quality finds that the 150-hour rule is among the top reasons people don’t pursue CPA licensure. A December 2023 study found that the requirement causes a 26% drop in interest among minorities. There is a consensus for change, but we can’t waste time. Many state CPA societies are working on legislation to create an alternative path to licensure. State boards of accountancy should replace the extra academic requirement with more on-the-job experience. A person who is licensed in one state should be able to practice in another even if reforms create different licensing requirements.


    Read more of this story at Slashdot.

    Slashdot

    Its Official, Marines’ New MK22 Sniper Rifle Revolutionizes Precision Shooting

    https://www.ammoland.com/wp-content/uploads/2024/11/15th-Marine-Expeditionary-Unit-fires-a-Mk22-Mod-0-in-the-Philippines-October-2024-Cpl.-Joseph-Helms-Marine-Corps-500×333.jpg

    A Marine with the 15th Marine Expeditionary Unit fires a Mk22 Mod 0 in the Philippines, October 2024. (Cpl. Joseph Helms/Marine Corps)
    A Marine with the 15th Marine Expeditionary Unit fires a Mk22 Mod 0 in the Philippines, October 2024. (Cpl. Joseph Helms/Marine Corps)

    The U.S. Marine Corps has officially declared the MK22 Mod 0 Advanced Sniper Rifle (ASR) fully operational, a year ahead of schedule. Manufactured by Barrett Firearms, this cutting-edge system represents a monumental leap in sniper capabilities, offering unmatched precision, flexibility, and sustainability to Marines in the field.

    A Game-Changer for Marine Snipers

    The MK22 replaces the legacy M40A6 and Mk13 Mod 7 sniper rifles, consolidating their roles into a single modular platform. This bolt-action rifle supports multiple calibers—7.62x51mm NATO, .300 Norma Magnum, and .338 Norma Magnum—giving Marines the ability to tailor their weapon for specific mission requirements. With an effective range of up to 1,500 meters, the MK22 outpaces its predecessors while lightening the logistical load.

    Kevin Marion, a logistics specialist with Marine Corps Systems Command, highlighted the operational advantages: “Marines like the ability to conduct caliber conversions at their level and the fact that they only have one rifle instead of the two it replaced. This shift improves operational efficiency, reduces the logistical burden, and lightens the individual Marine’s load.”

    A U.S. Marine fires a MK 22 Advanced Sniper Rifle during a new equipment training range on Camp Schwab, Okinawa, Japan. (Photo by Cpl. Alex Fairchild)
    A U.S. Marine fires a MK 22 Advanced Sniper Rifle during a new equipment training range on Camp Schwab, Okinawa, Japan. (Photo by Cpl. Alex Fairchild)

    Barrett’s Commitment to Innovation

    Barrett Firearms, renowned for its contributions to military precision weaponry, played a pivotal role in the MK 22’s development. Bryan James, CEO of Barrett Firearms, emphasized the importance of this milestone:

    “The MK22 isn’t just another rifle; it’s a modular, mission-adaptable system that empowers the warfighter with unmatched precision and flexibility. We’re honored to contribute to this pivotal modernization effort for the U.S. Military and Marine Corps, and to support our nation’s elite forces.”

    Barrett’s design philosophy centered on creating a complete system for operational efficiency. Each MK 22 kit includes three barrels, a state-of-the-art M317 Precision Day Optic (7-35x variable magnification), 15 magazines, a cleaning and tool kit, a sound suppressor, and mission-specific components like a scout sniper tripod and anti-reflection device.

    Built for Versatility & Sustainability

    The MK 22’s modularity allows Marines to quickly convert calibers in the field, ensuring readiness for any mission. The rifle’s design also simplifies maintenance, enabling most repairs to be completed at the organizational level. Should a barrel fail, it can be replaced without sidelining the weapon, a critical improvement over older systems.

    “Maintenance is streamlined, and the ability to conduct caliber conversions in the field ensures that Marines are equipped for any mission, anytime, anywhere,” James added.

    Scout sniper with Battalion Landing Team 1/1, 31st Marine Expeditionary Unit, observes the USS Miguel Keith (ESB 5) with a MK22 AS Photo by Cpl. Elijah Murphy
    Scout sniper with Battalion Landing Team 1/1, 31st Marine Expeditionary Unit, observes the USS Miguel Keith (ESB 5) with a MK 22 AS Photo by Cpl. Elijah Murphy

    Collaboration Across Forces

    The MK 22’s journey began as part of a Special Operations Command (SOCOM) initiative and transitioned to the Marine Corps via the “Special Operations Forces (SOF) to service” process. Contracting was led by the U.S. Army, whose collaboration with Barrett and the Marine Corps helped fast-track the program to full operational capability.

    Maj. Michael Billings of Marine Corps Systems Command called the achievement a major win: “FOC a full year ahead of schedule is a testament to the teamwork and dedication of all parties involved. This milestone delivers enhanced sniper capabilities to the battlefield sooner than expected.”

    Preparing for the Future Fight

    The MK 22 exemplifies the Marine Corps’ commitment to staying ahead of near-peer adversaries like Russia and China. As Marines adopt this revolutionary system, they gain a tactical edge, ensuring readiness for the challenges of modern and future warfare.

    As Bryan James aptly put it, “The MK 22 Mod 0 Advanced Sniper Rifle exemplifies our dedication to precision, innovation, and mission success. As the Marine Corps ushers in this new era of sniper capabilities, Barrett stands ready to support their efforts and the future fight.”

    AmmoLand Shooting Sports News

    Flour, water, salt, GitHub: The Bread Code is a sourdough baking framework

    https://cdn.arstechnica.net/wp-content/uploads/2024/11/IMG_5426-Large-1152×648-1732650962.jpeg

    One year ago, I didn’t know how to bake bread. I just knew how to follow a recipe.

    If everything went perfectly, I could turn out something plain but palatable. But should anything change—temperature, timing, flour, Mercury being in Scorpio—I’d turn out a partly poofy pancake. I presented my partly poofy pancakes to people, and they were polite, but those platters were not particularly palatable.

    During a group vacation last year, a friend made fresh sourdough loaves every day, and we devoured it. He gladly shared his knowledge, his starter, and his go-to recipe. I took it home, tried it out, and made a naturally leavened, artisanal pancake.

    I took my confusion to YouTube, where I found Hendrik Kleinwächter’s “The Bread Code” channel and his video promising a course on “Your First Sourdough Bread.” I watched and learned a lot, but I couldn’t quite translate 30 minutes of intensive couch time to hours of mixing, raising, slicing, and baking. Pancakes, part three.

    It felt like there had to be more to this. And there was—a whole GitHub repository more.

    The Bread Code gave Kleinwächter a gratifying second career, and it’s given me bread I’m eager to serve people. This week alone, I’m making sourdough Parker House rolls, a rosemary olive loaf for Friendsgiving, and then a za’atar flatbread and standard wheat loaf for actual Thanksgiving. And each of us has learned more about perhaps the most important aspect of coding, bread, teaching, and lots of other things: patience.

    Hendrik Kleinwächter on his Bread Code channel, explaining his book.

    Resources, not recipes

    The Bread Code is centered around a book, The Sourdough Framework. It’s an open source codebase that self-compiles into new LaTeX book editions and is free to read online. It might have exactly one recipe, if you can call a 68-page middle-section journey a recipe. It has 17 flowcharts, 15 tables, and dozens of timelines, process illustrations, and photos of sourdough going both well and terribly. Like any cookbook, there’s a bit about Kleinwächter’s history with this food, and some sourdough bread history. Then the reader is dropped straight into "How Sourdough Works," which is in no way a summary.

    "To understand the many enzymatic reactions that take place when flour and water are mixed, we must first understand seeds and their role in the lifecycle of wheat and other grains," Kleinwächter writes. From there, we follow a seed through hibernation, germination, photosynthesis, and, through humans’ grinding of these seeds, exposure to amylase and protease enzymes.

    I had arrived at this book with these specific loaf problems to address. But first, it asks me to consider, "What is wheat?" This sparked vivid memories of Computer Science 114, in which a professor, asked to troubleshoot misbehaving code, would instead tell students to “Think like a compiler,” or “Consider the recursive way to do it."

    And yet, "What is wheat" did help. Having a sense of what was happening inside my starter, and my dough (which is really just a big, slow starter), helped me diagnose what was going right or wrong with my breads. Extra-sticky dough and tightly arrayed holes in the bread meant I had let the bacteria win out over the yeast. I learned when to be rough with the dough to form gluten and when to gently guide it into shape to preserve its gas-filled form.

    I could eat a slice of each loaf and get a sense of how things had gone. The inputs, outputs, and errors could be ascertained and analyzed more easily than in my prior stance, which was, roughly, "This starter is cursed and so am I." Using hydration percentages, measurements relative to protein content, a few tests, and troubleshooting steps, I could move closer to fresh, delicious bread. Framework: accomplished.

    I have found myself very grateful lately that Kleinwächter did not find success with 30-minute YouTube tutorials. Strangely, so has he.


    Sometimes weird scoring looks pretty neat.

    Kevin Purdy

    Sometimes weird scoring looks pretty neat.

    Kevin Purdy


    I have tried doing decorative "leaves" and other little scoring designs, with varied results.

    Kevin Purdy

    I have tried doing decorative "leaves" and other little scoring designs, with varied results.

    Kevin Purdy


    Cross section.

    Kevin Purdy

    Cross section.

    Kevin Purdy

    I have tried doing decorative "leaves" and other little scoring designs, with varied results.

    Kevin Purdy

    Cross section.

    Kevin Purdy

    The slow bread of childhood dreams

    “I have had some successful startups; I have also had disastrous startups,” Kleinwächter said in an interview. “I have made some money, then I’ve been poor again. I’ve done so many things.”

    Most of those things involve software. Kleinwächter is a German full-stack engineer, and he has founded firms and worked at companies related to blogging, e-commerce, food ordering, travel, and health. He tried to escape the boom-bust startup cycle by starting his own digital agency before one of his products was acquired by hotel booking firm Trivago. After that, he needed a break—and he could afford to take one.

    “I went to Naples, worked there in a pizzeria for a week, and just figured out, ‘What do I want to do with my life?’ And I found my passion. My passion is to teach people how to make amazing bread and pizza at home,” Kleinwächter said.

    Kleinwächter’s formative bread experiences—weekend loaves baked by his mother, awe-inspiring pizza from Italian ski towns, discovering all the extra ingredients in a supermarket’s version of the dark Schwarzbrot—made him want to bake his own. Like me, he started with recipes, and he wasted a lot of time and flour turning out stuff that produced both failures and a drive for knowledge. He dug in, learned as much as he could, and once he had his head around the how and why, he worked on a way to guide others along the path.


    Too thick to be a flatbread, too flat to slice for breakfast: The painful pancake.

    Kevin Purdy

    Too thick to be a flatbread, too flat to slice for breakfast: The painful pancake.

    Kevin Purdy


    You wanted avocado toast; now you’ve got… this.

    Kevin Purdy

    You wanted avocado toast; now you’ve got… this.

    Kevin Purdy

    Too thick to be a flatbread, too flat to slice for breakfast: The painful pancake.

    Kevin Purdy

    You wanted avocado toast; now you’ve got… this.

    Kevin Purdy

    Bugs and syntax errors in baking

    When using recipes, there’s a strong, societally reinforced idea that there is one best, tested, and timed way to arrive at a finished food. That’s why we have America’s Test Kitchen, The Food Lab, and all manner of blogs and videos promoting food “hacks.” I should know; I wrote up a whole bunch of them as a young Lifehacker writer. I’m still a fan of such things, from the standpoint of simply getting food done.

    As such, the ultimate “hack” for making bread is to use commercial yeast, i.e., dried “active” or “instant” yeast. A manufacturer has done the work of selecting and isolating yeast at its prime state and preserving it for you. Get your liquids and dough to a yeast-friendly temperature and you’ve removed most of the variables; your success should be repeatable. If you just want bread, you can make the iconic no-knead bread with prepared yeast and very little intervention, and you’ll probably get bread that’s better than you can get at the grocery store.

    Baking sourdough—or “naturally leavened,” or with “levain”—means a lot of intervention. You are cultivating and maintaining a small ecosystem of yeast and bacteria, unleashing them onto flour, water, and salt, and stepping in after they’ve produced enough flavor and lift—but before they eat all the stretchy gluten bonds. What that looks like depends on many things: your water, your flours, what you fed your starter, how active it was when you added it, the air in your home, and other variables. Most important is your ability to notice things over long periods of time.


    The Bread Code‘s depiction of how sourdough starters are born, developed, and refined.

    The Bread Code

    The Bread Code‘s depiction of how sourdough starters are born, developed, and refined.

    The Bread Code


    If you take nothing else from The Bread Code, take this: You can measure a sample of your dough in an easy-to-read container, rather than guess at a big bowl.

    The Bread Code

    If you take nothing else from The Bread Code, take this: You can measure a sample of your dough in an easy-to-read container, rather than guess at a big bowl.

    The Bread Code

    The Bread Code‘s depiction of how sourdough starters are born, developed, and refined.

    The Bread Code

    If you take nothing else from The Bread Code, take this: You can measure a sample of your dough in an easy-to-read container, rather than guess at a big bowl.

    The Bread Code

    When things go wrong, debugging can be tricky. I was able to personally ask Kleinwächter what was up with my bread, because I was interviewing him for this article. There were many potential answers, including:

    • I should recognize, first off, that I was trying to bake the hardest kind of bread: Freestanding wheat-based sourdough
    • You have to watch—and smell—your starter to make sure it has the right mix of yeast to bacteria before you use it
    • Using less starter (lower “inoculation”) would make it easier not to over-ferment
    • Eyeballing my dough rise in a bowl was hard; try measuring a sample in something like an aliquot tube
    • Winter and summer are very different dough timings, even with modern indoor climate control.

    But I kept with it. I was particularly susceptible to wanting things to go quicker and demanding to see a huge rise in my dough before baking. This ironically leads to the flattest results, as the bacteria eats all the gluten bonds. When I slowed down, changed just one thing at a time, and looked deeper into my results, I got better.


    Screenshot of Kleinwaechter's YouTube page, with video titles like "The last SOURDOUGH STARTER RECIPE you will ever need,' and "10 Tips to BECOME A BOSS" at dough handling.

    The Bread Code YouTube page and the ways in which one must cater to algorithms.

    Credit:
    The Bread Code

    The Bread Code YouTube page and the ways in which one must cater to algorithms.

    Credit:
    The Bread Code

    YouTube faces and TikTok sausage

    Emailing and trading video responses with Kleinwächter, I got the sense that he, too, has learned to go the slow, steady route with his Bread Code project.

    For a while, he was turning out YouTube videos, and he wanted them to work. “I’m very data-driven and very analytical. I always read the video metrics, and I try to optimize my videos,” Kleinwächter said. “Which means I have to use a clickbait title, and I have to use a clickbait-y thumbnail, plus I need to make sure that I catch people in the first 30 seconds of the video.” This, however, is “not good for us as humans because it leads to more and more extreme content.”

    Kleinwächter also dabbled in TikTok, making videos in which, leaning into his German heritage, “the idea was to turn everything into a sausage.” The metrics and imperatives on TikTok were similar to those on YouTube but hyperscaled. He could put hours or days into a video, only for 1 percent of his 200,000 YouTube subscribers to see it unless he caught the algorithm wind.

    The frustrations inspired him to slow down and focus on his site and his book. With his community’s help, The Bread Code has just finished its second Kickstarter-backed printing run of 2,000 copies. There’s a Discord full of bread heads eager to diagnose and correct each other’s loaves and occasional pull requests from inspired readers. Kleinwächter has seen people go from buying what he calls “Turbo bread” at the store to making their own, and that’s what keeps him going. He’s not gambling on an attention-getting hit, but he’s in better control of how his knowledge and message get out.

    “I think homemade bread is something that’s super, super undervalued, and I see a lot of benefits to making it yourself,” Kleinwächter said. “Good bread just contains flour, water, and salt—nothing else.”


    Loaf that is split across the middle-top, with flecks of olives showing.

    A test loaf of rosemary olive sourdough bread. An uneven amount of olive oil ended up on the top and bottom.

    Credit:
    Kevin Purdy

    A test loaf of rosemary olive sourdough bread. An uneven amount of olive oil ended up on the top and bottom.

    Credit:
    Kevin Purdy

    You gotta keep doing it—that’s the hard part

    I can’t say it has been entirely smooth sailing ever since I self-certified with The Bread Code framework. I know what level of fermentation I’m aiming for, but I sometimes get home from an outing later than planned, arriving at dough that’s trying to escape its bucket. My starter can be very temperamental when my house gets dry and chilly in the winter. And my dough slicing (scoring), being the very last step before baking, can be rushed, resulting in some loaves with weird “ears,” not quite ready for the bakery window.

    But that’s all part of it. Your sourdough starter is a collection of organisms that are best suited to what you’ve fed them, developed over time, shaped by their environment. There are some modern hacks that can help make good bread, like using a pH meter. But the big hack is just doing it, learning from it, and getting better at figuring out what’s going on. I’m thankful that folks like Kleinwächter are out there encouraging folks like me to slow down, hack less, and learn more.

    Ars Technica – All content

    Official Batman Tumbler Batmobile

    https://theawesomer.com/photos/2024/11/official_batman_tumbler_batmobile_t.jpg

    Official Batman Tumbler Batmobile

    Warner Bros partnered with a PR firm to create Wayne Enterprises, a company that sells luxury items inspired by Batman and his billionaire alter ego, Bruce Wayne. That includes ten fully functional replicas of the Tumbler, the version of the Batmobile from Nolan’s Dark Knight Trilogy. The $3M vehicles have a 6.2L 525 hp engine plus gun and jet engine effects.

    The Awesomer