Gutenberg Contributors Call on Theme Authors to Test Using Block-Based Template Parts in Classic Themes

If you watched Matt Mullenweg’s Q&A session at WordCamp US last weekend, it’s evident that there are significant parts of the community still clinging to the Classic Editor who would be happy for it to be supported indefinitely. For whatever reason, millions users are not ready to switch – some prefer the old editor, don’t like blocks, don’t want to learn a new system, or simply find the newer versions of WordPress too confusing.

In recognition that some users may need a transitional bridge over to the block editor, with an opportunity to dip their toes into it without breaking their whole site design, Gutenberg 14.1 will introduce the ability for theme authors to use block-based template parts in classic and hybrid themes.

Anne McCarthy, who coordinates the FSE outreach program and Gutenberg testing, posted to the Make Themes blog, calling on theme authors to test it out.

“Gradual adoption options remains a focus for the project and, increasingly, there are more ways to adopt parts rather than the whole of a feature coming to the latest version of WordPress,” McCarthy said. “The aim is to allow folks to adopt what they need as they are ready in a way that is still future forward.”

Theme authors will need to specify block-template-parts theme support and use Gutenberg trunk or Gutenberg 14.1 when it’s released on September 15th, 2022. Then they can add block-based template parts as HTML files placed into the parts directory inside the root of the theme. These can then be output inside the theme’s PHP templates using the block_template_part function.

“Users will see a new ‘Template Parts’ menu visible under ‘Appearance,’ which displays a list of template parts,” McCarthy said. “From there, all theme blocks are available, but the environment is inherently limited compared to block themes. For example, users can edit existing template parts but not delete them or create new ones.”

McCarthy suggested a few use cases for adding block-based template parts to classic themes – enabling authors to offer a header template part that allows users to set a video or image background, adjust the focal point, move blocks around, or offer a footer with design blocks locked but content that is easy to edit.

“While this feature is currently aimed at providing options for themes, plugins can also explore extending this functionality to enable the same UI for users,” McCarthy said.

Block themes represent just 2.5% of WordPress themes in the directory, so this new capability is applicable to the majority of themes. Motivating classic theme authors to support this in their themes is another challenge if they don’t see the benefit to users or determine that the different editing experience would be too confusing. It may have an easier entry point through plugins, as users may be more likely to embrace a different editing UI for plugin functionality.

For more technical details and code examples for adding theme support, check out the post outlining how to test using block-based template parts in classic themes.

Save Time and Increase Your Production With WPMU DEV Templates

Whether you prefer to build sites from scratch, use a theme/page builder, or a combination of the two, WPMU DEV’s site template features can save you considerable time and needlessly repetitive efforts. Learn how in this post.

Minimize efforts and maximize profits when building new client websites by harnessing time-saving templates…even if you’re a die-hard, from-the-ground-up coder!

In this article, we’re showing how easy it is to create and use WPMU DEV site templates for instant availability on your web development jobs.

You’ll learn how to create your own or use our pre-made templates as a starting point – all of which are perfectly suited for eCommerce stores, portfolio sites, professional services, and more.

We’ll also cover how to bring templates from Elementor and other page builders, saving designs you’ve tailor-made to use for future site builds.

Here’s what we’ll be covering:

Skip ahead if a particular section sounds more relevant to you.

What’s Your Web Development Approach?

How you use and get the most out of our site templates will largely depend on what kind of web development approach you take.

When polling our 50,000+ strong web dev members, results showed there are three distinct types when it comes to profiting as a WordPress website builder:

  1. Custom web development
  2. Template web development
  3. Hybrid of both types

You probably already know which of these approaches resonates with you the most, but just in case you’re not sure what the pros and cons of the other approaches are, let’s review these briefly.

Custom Web Development

Custom WordPress development typically involves wireframing, designing, and building a website to the specific needs of a business.

As a web developer, the pros of providing custom WordPress development services include being in complete control of all aspects of the website, and tailoring the site to your client’s unique needs, goals, & preferences.

Because you are building the site to spec, only essential features are included, eliminating the bloat caused by having unnecessary elements added to the site — resulting in a better product overall.

“I build custom websites from scratch. I don’t use themes or page builders. I have found my clients don’t want a raft of features and bloat they neither understand nor are able to update themselves. So I build with Gutenberg blocks and they have features and flexibility for only what they need. This obviously makes each website very specific to each case.” David (WPMU DEV Member)

The cons of this approach are that it takes a lot longer to plan and build a custom website from scratch.

Also, because custom development is time intensive, it can drive up the cost for your clients significantly.

Template-based Website Development

Template-based web development typically involves starting with a ready-made free or premium WordPress theme purchased from a marketplace such as ThemeForest, or using a page builder like Elementor, Divi, WP Bakery, etc, then modifying and customizing the theme and its settings.

The pros of using ready-made themes to build a WordPress site include saving money.

It typically costs less than $100 to buy a pre-built theme, which means that you can mark up your costs and make higher margins), saving time (you are using pre-built pages and elements that may only need some tweaking), and being able to choose from thousands of ready-made WordPress themes. Sites built using existing themes are less costly and faster to build.

“Having a starter theme that I can launch a new website from each time is hugely beneficial. The current option of templates is a great idea and will definitely help…” David (WPMU DEV Member)

The cons of working with pre-built themes include having to learn how the theme and its options work, “bloating” from unnecessary code (themes usually cram loads of features you may not need), performance issues due to poor coding quality (affecting security and page speed), and lack of support if the theme developer doesn’t keep up with new WordPress releases or goes out of business.

Hybrid Website Development

“A good thing for page design (which is what takes me most of my time) will be to have pre-set “modules” that I can use, duplicate, modify, and then insert them into my pages.” Guigro (WPMU DEV Member)

The hybrid approach involves starting with custom-built time-saving presets or pre-built/boilerplate templates to help speed up your custom development work.

These templates then act as springboards for building fully customized and uniquely designed sites for clients.

This approach can involve fine tuning or creating customized templates using a “page builder” framework application (e.g. Divi, Elementor).

You can also use preset wireframes (like Elementor’s Wireframe Kits), wireframe patterns or block plugins like Kadence Blocks or Spectra (formerly Addons For Gutenberg).

Or, depending on the kind of sites you build, integrating ready-made processes like sales funnels or eCommerce workflows into your custom-built structures.

The pros of using the hybrid model are that you can target your services to specific niches and offer your clients unique sites built on proven designs or processes shown to be effective with previous clients, at a lower pricing point and faster delivery timeframe than building full custom websites from scratch.

The cons of the hybrid model are the time you will need to invest into learning to use whatever application you choose to build your customized templates with and building your templating processes.

“I would need to invest time in building out various templates that could be reused.” Phil M. (WPMU DEV Member)

How All Web Developer Types Can Benefit From WPMU DEV Templates

All these approaches have advantages and disadvantages and no matter what your preference is, we have an option to complement your site builds.

Here’s a look at how different web development approaches can benefit from using our templates:

Doing It Yourself from Scratch with a Boost from WPMU DEV

If you prefer to take the custom approach to web development, you can create, save, and reuse your very own custom templates, essentially acting as your own master to use on any sites going forward.

And when we say save, we mean it in the fully encompassing sense.

It’s not just a snapshot of the surface view. Yes, we save the theme, placement of elements, customizations, etc. But beyond that, our templates create a full backup of your existing site, meaning they include everything.

From plugins, user settings, and configs, to license keys, and data – every detail is preserved at the moment you save it.

Let’s create a new site from a template now. You can follow the video walkthrough, or the written tutorial below it.

Note that you’ll need a hosting account to follow along. You can take WPMU DEV Hosting for a free, no-risk trial right now.

Creating your very own custom template in The Hub.

  1. Navigate to The Hub > Sites > Site Templates.
    (If you’re unfamiliar, The Hub is WPMU DEV’s unified dashboard to monitor, optimize, and update unlimited sites from one location.)
  2. Here you will see two tabbed sections: My Templates, and WPMU DEV Templates. Click on My Templates.
  3. Click Create Template.
  4. Select a hosted site, add a template title, and a description (if desired).

It’s that easy!

In a matter of minutes your template will be created, and ready for use in your My Templates section.

Whenever you want to create a new site from this template, simply click on its Create Site button, then follow steps 5-8 below for Creating A New Site From A Template.

templates_my templates
Creating your own site template in WPMU DEV.

Creating your own templates gives you two major benefits:

  1. You can create a library of up to 25 of your own custom templates  – completely free – making new site creation a breeze.
  2. These have zero impact on your hosting storage.

Click here for more FAQs on WPMU DEV Custom Templates.

Starting on Your Own Then Joining WPMU DEV

The My Templates method explained above will easily fit the needs of someone taking a hybrid approach.

When you get to step 4, selecting a WPMU DEV hosted site, simply choose one that you created using any WordPress page/theme builder tool (e.g., Elementor, Divi, Kadence, WP Bakery, etc), and create your template from that.

The site selector allows you to choose any of your WordPress sites, regardless of what method, theme or builder plugin you used to create it.

templates_my templates hybrid (from elementor site)
Creating a template from a site made with Elementor.

Voila… you’ve got a quick template for any future site builds, based on a blended creation where you put your own special touches on a page builder or theme builder base.

Creating with WPMU DEV From the Onset

“…Having a starter theme that I can launch a new website from each time is hugely beneficial. The current option of templates is a great idea and will definitely help… The plugin settings and saving a default setting is already in operation so that is nice.” David (WPMU DEV Member)

For those who prefer to work with templates, we have over two dozen site templates with diverse visual and structural appeal for various industries, like Freelancer, Blogger, and eCommerce.

templates_wpmudev templates
WPMU DEV has plenty of options when it comes to ready-made site templates.

Let’s create a new site from a pre-made template now. You can follow the video walkthrough, or the written tutorial below it.

Creating a new site with WPMU DEV’s pre-made templates.

  1. Navigate to The Hub > Sites > Site Templates.
  2. There are two tabbed sections: My Templates, and WPMU DEV Templates.

Click on WPMU DEV Templates. You’ll see the Template collection here.

Note that you can see a full, multi-page preview of any template by clicking its Preview button.

  1. Once you’ve selected the template you want, click the Create Site button.
  2. On the next screen, you’ll select what hosting plan you want for this site. There are details and prices listed for each, visit the WPMU DEV Hosting page if you’d like to learn more. Once you’ve selected a plan, click the Continue button.
  3. Create your temporary website URL by typing a name (appended by .tempurl.host). While you’ll be able to name your site what you want, and you’ll be able to point it to a custom domain, this temp URL will be permanent, so make sure you choose a naming convention you are comfortable keeping.
  4. On the next screen, you’ll create your WordPress administration account. Enter the email address, username, and password you’ll be associating it with.
  5. Finally, you’ll choose the server location for your site. Select the one closest to you geographically

That’s it! In a few minutes, your template-based site will load up, and be ready and waiting in your list of Hub sites.

From here, you can click on it any time to view or adjust settings, or open the site in WordPress to tweak and customize as desired.

With templates covered, we’ll take a look at a few other site building, time-saving features available through WPMU DEV.

3 Additional Time-Saving WPMU DEV Tools

This section will spotlight the other web development game changers included with our platform.

These additional features are helpful to all of the Web Developer types we highlighted.

Apply Plugin Settings To All Sites Fast With WPMU DEV Configs

Part of your WPMU DEV Hosting or membership benefits is full access to our a full suite of reliable WordPress plugins.

WPMU DEV Configs allow you to create specific preset settings for WPMU DEV plugins, and apply them to any or all of your sites instantly. This saves you a lot of setup time, as you only have to create your ideal plugin settings once, then apply to unlimited sites

Applying a preset config immediately overwrites all settings and options on the chosen site for any given plugin.

As well as creating and tweaking your own Config settings, you can also apply our recommended configs – which our plugin experts have curated specifically. Saving you even more time if you’re unsure of the ideal settings for any plugin.

Here’s a quick walkthrough and example on creating and applying Configs:

Navigate to The Hub > Sites > Configs.

From the Default Configs tab, you’ll see six plugins listed. Each has had configurations set by our expert development team.

To inspect the details of any of these, click on the vertical ellipsis icon, then click on Details.

You will see the full list of specific configurations listed here, along with the date it was created.

Configs - default config details
Default configurations for Hummingbird Pro.

If you want to apply these settings from detail view mode, simply click the Apply button.

On the next screen, select the site (or sites) you’d like to apply these configs to, then finish by clicking on the Apply to # sites button.

To apply any of these defaults from the main Default Configs tab, click on the text Apply to site(s) >, and select any or all sites to apply these configs to.

Click on the Apply to # sites > to finish.

configs - default configs
Default Configs are a quick way to apply the basic tech-recommended plugin settings.

To make your own configs, go to the WP Dashboard of your site first, and customize any of the settings for any plugins that you want to create custom configs for.

Afterwards, head back to The Hub > Sites > Configs > My Configs.

Click on the Create config button. Input a name, select a site, and a plugin or service; click Save.

You’ll get a notification that the config has been created, and you’ll see it populate in your My Configs tab.

configs - my configs
My Configs are saved and ready to apply to any sites from The Hub.

Applying your own configs works in the exact same manner as applying default configs.

You will have some additional menu items when you click on the vertical ellipsis icon for any of your Custom Configs. In addition to Details, you’ll also see options to Rename, and Delete.

New configs can be created in WordPress or The Hub, and they will automatically sync from one to the other.

Make Identical Copies with Cloning

We saw the positives of being able to create your own site templates. There are times when it would be really handy to duplicate entire websites.

WPMU DEV’s Cloning feature generates an exact copy of a site’s files and database (including themes, plugins, content, and site settings), then uses them to create a brand new WordPress installation. The new site is identical to the original, but with a different domain name.

Once the cloning process is complete, you can use our Adding Domains guide to point to the new site’s permanent domain.

Cloned sites can be added to your account with any hosting tier, which can be upgraded or downgraded at any time from your account.

In addition to not copying domains, cloning does not copy SFTP/SSH users or staging configurations.

You can clone any existing WPMU DEV hosted site, or create and use your own custom templates. You can even clone pre-configured WPMU DEV templates with theme and plugins pre-installed.

Here’s a walkthrough of how easy cloning sites is.

There are three different menu access points to get to the Cloning process.

All begin with navigating to The Hub > Sites > My Sites.

Option 1 – Clone From Your Hub Dashboard

  1. Click on the +Add Site button at the top right of the page.
  2. From the next modal window, click on the Clone button.
  3. From here, you can Clone from a site or a template. For this tutorial, we’re going to click on Clone from my sites.
  4. Choose the site you want to clone from the dropdown menu.
  5. Type in a name for your temporary URL.
  6. Select your server location from the dropdown.
cloning--option 1
The cloning process is super simple, and only takes a few minutes.

Aaaand you’re done. In just a few minutes your cloned site will be created and ready for action.

Option 2 – Clone Directly From a Selected Site:

Click on the vertical ellipsis icon at the right of the row of any of your listed sites, then click Clone site from the dropdown menu.

Then follow the same steps 3-6 from above.

cloning--option 2
Cloning directly from a selected site.

Option 3 – Clone From The Hosting Area

Click on any of your sites, then click Hosting, then click Clone in the top menu bar. Follow steps 3-6 from above.

cloning--option 3
Cloning from your hosting area.

Managing and Installing WordPress Plugins Directly From Your WPMU DEV Dashboard

Gone are the hours of jumping from the WordPress Dashboard to the WordPress repository, hunting for your must-have plugins, and installing each one individually.

WPMU DEV’s built-in plugin manager comes complete with upload, installation, and activation capabilities.

You can mark your favorite plugins – all of ours, plus any from the WordPress Repository – and quickly select, install, and activate them from one place via The Hub.

Here’s how quick and easy this is:

Navigate to The Hub > Plugins.

From the Add New tab, you will see a sub header with five options: WPMU DEV, WP.org, Favorites, ZIP, and URL.

Click on any WPMU DEV, WP.org, or Favorites to see the plugins specific to each section.

Click on ZIP or URL to add plugins by uploading a zip file or from a URL link.

plugins - add new
Plugin management in The Hub saves so much time and aggravation.

From the Manage Existing tab, you can handle a slew of plugin actions, such as:

  • Favorite – click any star icon in the far left column to favorite that plugin
  • Status – see exactly which sites have what plugins installed, activated, deactivated, or not installed
  • Manage – click the vertical ellipses icon to manage the plugin, see related plugin info, or remove it from favorites
plugins - manage existing 1
Manage existing plugins from a single spot in The Hub.

You can also hover your cursor over any of the plugin status columns, and the popup will display site-specific activations for that plugin — including what version it is.

plugins - manage existing 2
Viewing plugin status & version number in The Hub.

If you select Manage from the above menu dropdown, you can Add configs or Deactivate that particular plugin from any of your sites.

plugins - manage existing 3
Config & Deactivation options are available per plugin.

See below video for a quick walkthrough on Plugin options in The Hub.

Plugin options aplenty in The Hub.

Plugins that have been installed to your sites from a source other than WPMU DEV or WordPress.org can’t be installed to your other sites from the Hub’s plugin management section.

Use Templates To Improve Your Workflow No Matter Your Web Development Approach

No matter what your preferred site building method is, everyone can benefit from time saving tools.

Templates are a huge help in the field of web development work, whether you initially build your own creation, craft from a page or theme builder, or tweak a pre-made one.

Whatever your path, you can save your template(s) for handy use at any future date, using WPMU DEV’s template tools.

Add to that our one-click Configs, Cloning Tools, and Plugin shortcuts, and you’ve got an A+ process for building quality sites with speed, efficiency, and finesse.

Interested in using WPMU DEV Templates or any other tool mentioned in this article? The easiest place to start is taking WPMU DEV Hosting for a free trial. There’s no risk, plus, you also get access to our best site management tools, plugins, and support.

Using Pausers in Event Loops

Typically in low-latency development, a trade-off must be made between minimizing latency and avoiding excessive CPU utilization. This article explores how Chronicle’s Pausers — an open-source product — can be used to automatically apply a back-off strategy when there is no data to be processed, providing balance between resource usage and responsive, low-latency, low-jitter applications.

Description of the Problem

In a typical application stack, multiple threads are used for servicing events, processing data, pipelining, and so on. An important design consideration is how threads become aware that there is work to do, with some general approaches including:

C# question: Programming Exercise 11-2,

In C# ArgumentException is an existing class that derives from Exception; you use it when one or more of a methods arguments do not fall within an expected range.

Write the application SwimmingWaterTemperature containing a variable that can hold a temperature expressed in degrees Fahrenheit. Within the class, create a method that accepts a parameter for a water temperature and returns true or false, indicating whether the water temperature is between 70 and 85 degrees and thus comfortable for swimming. If the temperature is not between 32 and 212 (the freezing and boiling points of water), it is invalid, and the method should throw an ArgumentException.

In the Main() method, continuously prompt the user for data temperature, pass it to the method, and then display the following messages indicating whether the temperature is comfortable, not comfortable, or invalid:

X degrees is comfortable for swimming.
X degrees is not comfortable for swimming.
Value does not fall within the expected range.

Enter the value 999 to quit the program.

40
999

Output

Results
40 degrees is not comfortable for swimming.
Test CaseIncomplete

Invalid swimming temperature entered
Input

31
999

Output

Results
Value does not fall within the expected range.
Enter another temperature or 999 to quit
0.00
out of
10.00

Program runs until user quits

0 out of 1 checks passed. Review the results below for more details.
Checks
Test CaseIncomplete

Can enter more than one temperature
Input

77
69
999

Output

Results
77 degrees is comfortable for swimming.
Enter another temperature or 999 to quit
69 degrees is not comfortable for swimming.
Enter another temperature or 999 to quit

National Harbor, Maryland to Host WordCamp US and Community Summit, August 23-25, 2023

WordCamp US 2022 has concluded after two days of presentations and a contributor day last weekend. Some attendees are still making their way home with hearts full of good memories until the next time they can gather in person again.

Outside of the main event, attendees had many opportunities to network, connect with new friends, and finally meet people they have been working with on the web for years.

The event’s organizers have invited attendees to share their photos in the WCUS Community Photo Album on Google Photos.

The Job Posting board is back in business and shows several dozen agencies, product, and hosting companies hiring for roles across the WordPress ecosystem. Many of these companies were also sponsors of the event.

All the sessions from WCUS were recorded and will be coming to WordPress.tv soon. In the meantime, sessions can be viewed through the livestream recording on YouTube. There are separate videos for the Sun track (Friday and Saturday), and the Palm track (Friday and Saturday). The recording of Matt Mullenweg’s Q&A is available on WordPress.tv. He answered questions about improving contributor experience, accessibility, the timeline for multilingual features in core, and more.

At the end of his Q&A session, Mullenweg announced the location of the next WordCamp US. In 2023, the event will take place on the East coast at National Harbor, Maryland, a waterfront convention center located along the Potomac River, 20 minutes from Washington, D.C. The dates are set for August 23-25, which will include contributor days, presentations and workshops, and a WordPress Community Summit. Organizers said the event will focus on learning and creation.

How to Pass the AWS Certified Developer – Associate Exam

In this blog, I will explain how I passed the AWS Certified Developer – Associate exam. This might help you in your journey to pass the exam. Enjoy!

1. Why?

First of all, why did I want to pass the exam? It all started when I wrote a blog how to create a deployment pipeline in AWS. CI/CD tooling is one of my interests and I wanted to know how this was done in the cloud. Before that, I also experimented with some of the Google Cloud services. So, I got this idea that I wanted to learn more about one of these cloud offerings. After some investigation, it was clear to me that AWS is still the major cloud vendor although Google Cloud and Azure are on the rise. However, I made the decision that it was wise to learn more about AWS services. Note, that I did not have any hands-on experience in cloud development before and certainly not with AWS.

How to Make Data Anomaly Resolution Less Cartoonish

You know that cartoon trope where a leak springs in the dike, and the character quickly plugs it with a finger, only to find another leak has sprung that needs to be plugged, and so on, until there are no more fingers or the entire dam bursts?

Data engineers know that feeling all too well.

Unit Tests for SPs Using tsqlt Framework

Writing unit tests to test the code is an inevitable practice in programming. Testing stored procedures are as important as the other code. Often SPs are tested manually, and we avoid adding an automated test. In an agile environment, code without tests are prone to defects at some point. In this article, let's see about tsqlt framework - an open source Database Unit Testing framework for SQL Server.

Pre-Requisites

Attach your Editor to the running database. The database can be running either in the local, cloud or in any VMs. 

How Does Polygon Help Ethereum Scale?

Since its inception in 2014, Ethereum has established itself as the de facto leader of blockchain platforms capable of supporting Turing-complete smart contracts.

Ethereum has been instrumental in bringing about a revolution that we now know as Web3. The largest decentralized exchange, NFT marketplace, and yield farming protocol all reside on Ethereum. The chain is responsible for handling billions of dollars worth of value, and it has opened up avenues for creators and investors that were previously unfathomable.

Memcached getStats peculiarity

When I run getStats() on my PHP instance, it results in the following:

array (
  '10.143.27.235:11211' => 
  array (
    '' => '',
    'pid' => 3602,
    'uptime' => 49804,
    'time' => 1663088274,
    'version' => '1.5.22',
    'libevent' => '2.1.8-stable',
    'pointer_size' => 64,
    'rusage_user' => 30.254434,
    'rusage_system' => 62.188442000000002,
    'max_connections' => 4096,
    'curr_connections' => 2,
    'total_connections' => 23609,
    'rejected_connections' => 0,
    'connection_structures' => 3167,
    'reserved_fds' => 40,
    'cmd_get' => 40992,
    'cmd_set' => 449861,
    'cmd_flush' => 0,
    'cmd_touch' => 0,
    'cmd_meta' => 0,
    'get_hits' => 8371,
    'get_misses' => 32621,
    'get_expired' => 11,
    'get_flushed' => 0,
    'delete_misses' => 0,
    'delete_hits' => 0,
    'incr_misses' => 0,
    'incr_hits' => 0,
    'decr_misses' => 0,
    'decr_hits' => 0,
    'cas_misses' => 0,
    'cas_hits' => 0,
    'cas_badval' => 0,
    'touch_hits' => 0,
    'touch_misses' => 0,
    'auth_cmds' => 0,
    'auth_errors' => 0,
    'bytes_read' => 15221200168,
    'bytes_written' => 310816593,
    'limit_maxbytes' => 6442450944,
    'accepting_conns' => 1,
    'listen_disabled_num' => 0,
    'time_in_listen_disabled_us' => 0,
    'threads' => 8,
    'conn_yields' => 226,
    'hash_power_level' => 17,
    'hash_bytes' => 1048576,
    'hash_is_expanding' => 0,
    'slab_reassign_rescues' => 0,
    'slab_reassign_chunk_rescues' => 0,
    'slab_reassign_evictions_nomem' => 0,
    'slab_reassign_inline_reclaim' => 0,
    'slab_reassign_busy_items' => 0,
    'slab_reassign_busy_deletes' => 0,
    'slab_reassign_running' => 0,
    'slabs_moved' => 0,
    'lru_crawler_running' => 0,
    'lru_crawler_starts' => 10557,
    'lru_maintainer_juggles' => 2063686,
    'malloc_fails' => 0,
    'log_worker_dropped' => 0,
    'log_worker_written' => 0,
    'log_watcher_skipped' => 0,
    'log_watcher_sent' => 0,
    'bytes' => 4544738368,
    'curr_items' => 133847,
    'total_items' => 137181,
    'slab_global_page_pool' => 0,
    'expired_unfetched' => 97,
    'evicted_unfetched' => 0,
    'evicted_active' => 0,
    'evictions' => 0,
    'reclaimed' => 4,
    'crawler_reclaimed' => 110,
    'crawler_items_checked' => 3211510,
    'lrutail_reflocked' => 0,
    'moves_to_cold' => 130364,
    'moves_to_warm' => 434,
    'moves_within_lru' => 26,
    'direct_reclaims' => 0,
    'lru_bumps_dropped' => 0,
  ),
  '10.143.27.236:11211' => 
  array (
    'lru_bumps_dropped' => 0,
    'pid' => 4740,
    'uptime' => 51568,
    'time' => 1663088274,
    'version' => '1.5.22',
    'libevent' => '2.1.8-stable',
    'pointer_size' => 64,
    'rusage_user' => 31.862048999999999,
    'rusage_system' => 64.406024000000002,
    'max_connections' => 4096,
    'curr_connections' => 2,
    'total_connections' => 35973,
    'rejected_connections' => 0,
    'connection_structures' => 4048,
    'reserved_fds' => 40,
    'cmd_get' => 44847,
    'cmd_set' => 454104,
    'cmd_flush' => 0,
    'cmd_touch' => 0,
    'cmd_meta' => 0,
    'get_hits' => 9163,
    'get_misses' => 35684,
    'get_expired' => 7,
    'get_flushed' => 0,
    'delete_misses' => 0,
    'delete_hits' => 0,
    'incr_misses' => 0,
    'incr_hits' => 0,
    'decr_misses' => 0,
    'decr_hits' => 0,
    'cas_misses' => 0,
    'cas_hits' => 0,
    'cas_badval' => 0,
    'touch_hits' => 0,
    'touch_misses' => 0,
    'auth_cmds' => 0,
    'auth_errors' => 0,
    'bytes_read' => 15307804903,
    'bytes_written' => 352732366,
    'limit_maxbytes' => 6442450944,
    'accepting_conns' => 1,
    'listen_disabled_num' => 6,
    'time_in_listen_disabled_us' => 2229873734,
    'threads' => 8,
    'conn_yields' => 79,
    'hash_power_level' => 17,
    'hash_bytes' => 1048576,
    'hash_is_expanding' => 0,
    'slab_reassign_rescues' => 0,
    'slab_reassign_chunk_rescues' => 0,
    'slab_reassign_evictions_nomem' => 0,
    'slab_reassign_inline_reclaim' => 0,
    'slab_reassign_busy_items' => 0,
    'slab_reassign_busy_deletes' => 0,
    'slab_reassign_running' => 0,
    'slabs_moved' => 0,
    'lru_crawler_running' => 0,
    'lru_crawler_starts' => 10512,
    'lru_maintainer_juggles' => 2164258,
    'malloc_fails' => 0,
    'log_worker_dropped' => 0,
    'log_worker_written' => 0,
    'log_watcher_skipped' => 0,
    'log_watcher_sent' => 0,
    'bytes' => 4628120364,
    'curr_items' => 136702,
    'total_items' => 140446,
    'slab_global_page_pool' => 0,
    'expired_unfetched' => 82,
    'evicted_unfetched' => 0,
    'evicted_active' => 0,
    'evictions' => 0,
    'reclaimed' => 4,
    'crawler_reclaimed' => 82,
    'crawler_items_checked' => 2953530,
    'lrutail_reflocked' => 0,
    'moves_to_cold' => 132317,
    'moves_to_warm' => 511,
    'moves_within_lru' => 5,
    'direct_reclaims' => 0,
  ),
  '10.143.27.237:11211' => 
  array (
    'lru_bumps_dropped' => 0,
    'pid' => 16373,
    'uptime' => 51548,
    'time' => 1663088274,
    'version' => '1.4.15',
    'libevent' => '2.0.21-stable',
    'pointer_size' => 64,
    'rusage_user' => 39.035840999999998,
    'rusage_system' => 60.120074000000002,
    'curr_connections' => 19,
    'total_connections' => 36254,
    'connection_structures' => 4064,
    'reserved_fds' => 40,
    'cmd_get' => 45428,
    'cmd_set' => 455441,
    'cmd_flush' => 0,
    'cmd_touch' => 0,
    'get_hits' => 9028,
    'get_misses' => 36400,
    'delete_misses' => 0,
    'delete_hits' => 0,
    'incr_misses' => 0,
    'incr_hits' => 0,
    'decr_misses' => 0,
    'decr_hits' => 0,
    'cas_misses' => 0,
    'cas_hits' => 0,
    'cas_badval' => 0,
    'touch_hits' => 0,
    'touch_misses' => 0,
    'auth_cmds' => 0,
    'auth_errors' => 0,
    'bytes_read' => 15402562747,
    'bytes_written' => 333855851,
    'limit_maxbytes' => 6442450944,
    'accepting_conns' => 1,
    'listen_disabled_num' => 12,
    'threads' => 8,
    'conn_yields' => 0,
    'hash_power_level' => 17,
    'hash_bytes' => 1048576,
    'hash_is_expanding' => 0,
    'bytes' => 4674195333,
    'curr_items' => 137929,
    'total_items' => 141594,
    'expired_unfetched' => 1,
    'evicted_unfetched' => 0,
    'evictions' => 0,
    'reclaimed' => 1,
  ),
  '10.143.27.238:11211' => 
  array (
    'reclaimed' => 0,
    'pid' => 15280,
    'uptime' => 51538,
    'time' => 1663088275,
    'version' => '1.4.15',
    'libevent' => '2.0.21-stable',
    'pointer_size' => 64,
    'rusage_user' => 38.798851999999997,
    'rusage_system' => 65.026118999999994,
    'curr_connections' => 18,
    'total_connections' => 36494,
    'connection_structures' => 4064,
    'reserved_fds' => 40,
    'cmd_get' => 45197,
    'cmd_set' => 454172,
    'cmd_flush' => 0,
    'cmd_touch' => 0,
    'get_hits' => 9146,
    'get_misses' => 36051,
    'delete_misses' => 0,
    'delete_hits' => 0,
    'incr_misses' => 0,
    'incr_hits' => 0,
    'decr_misses' => 0,
    'decr_hits' => 0,
    'cas_misses' => 0,
    'cas_hits' => 0,
    'cas_badval' => 0,
    'touch_hits' => 0,
    'touch_misses' => 0,
    'auth_cmds' => 0,
    'auth_errors' => 0,
    'bytes_read' => 15340862218,
    'bytes_written' => 335691464,
    'limit_maxbytes' => 6442450944,
    'accepting_conns' => 1,
    'listen_disabled_num' => 11,
    'threads' => 8,
    'conn_yields' => 0,
    'hash_power_level' => 17,
    'hash_bytes' => 1048576,
    'hash_is_expanding' => 0,
    'bytes' => 4654658805,
    'curr_items' => 137242,
    'total_items' => 140672,
    'expired_unfetched' => 0,
    'evicted_unfetched' => 0,
    'evictions' => 0,
  ),
)

What is the peculiarity here with '' => '', in the first server in the list?

I am using a persistent pool with Memcached::OPT_REPLY set to true. When I set Memcached::OPT_REPLY to false, it doesn't happen, as so:

array (
  '10.143.27.235:11211' => 
  array (
    'pid' => 3602,
    'uptime' => 49959,
    'time' => 1663088429,
    'version' => '1.5.22',
    'libevent' => '2.1.8-stable',
    'pointer_size' => 64,
    'rusage_user' => 30.308837,
    'rusage_system' => 62.233024999999998,
    'max_connections' => 4096,
    'curr_connections' => 3,
    'total_connections' => 23633,
    'rejected_connections' => 0,
    'connection_structures' => 3167,
    'reserved_fds' => 40,
    'cmd_get' => 41053,
    'cmd_set' => 449907,
    'cmd_flush' => 0,
    'cmd_touch' => 0,
    'cmd_meta' => 0,
    'get_hits' => 8382,
    'get_misses' => 32671,
    'get_expired' => 11,
    'get_flushed' => 0,
    'delete_misses' => 0,
    'delete_hits' => 0,
    'incr_misses' => 0,
    'incr_hits' => 0,
    'decr_misses' => 0,
    'decr_hits' => 0,
    'cas_misses' => 0,
    'cas_hits' => 0,
    'cas_badval' => 0,
    'touch_hits' => 0,
    'touch_misses' => 0,
    'auth_cmds' => 0,
    'auth_errors' => 0,
    'bytes_read' => 15222793477,
    'bytes_written' => 311234016,
    'limit_maxbytes' => 6442450944,
    'accepting_conns' => 1,
    'listen_disabled_num' => 0,
    'time_in_listen_disabled_us' => 0,
    'threads' => 8,
    'conn_yields' => 226,
    'hash_power_level' => 17,
    'hash_bytes' => 1048576,
    'hash_is_expanding' => 0,
    'slab_reassign_rescues' => 0,
    'slab_reassign_chunk_rescues' => 0,
    'slab_reassign_evictions_nomem' => 0,
    'slab_reassign_inline_reclaim' => 0,
    'slab_reassign_busy_items' => 0,
    'slab_reassign_busy_deletes' => 0,
    'slab_reassign_running' => 0,
    'slabs_moved' => 0,
    'lru_crawler_running' => 0,
    'lru_crawler_starts' => 10559,
    'lru_maintainer_juggles' => 2069197,
    'malloc_fails' => 0,
    'log_worker_dropped' => 0,
    'log_worker_written' => 0,
    'log_watcher_skipped' => 0,
    'log_watcher_sent' => 0,
    'bytes' => 4546284827,
    'curr_items' => 133892,
    'total_items' => 137227,
    'slab_global_page_pool' => 0,
    'expired_unfetched' => 98,
    'evicted_unfetched' => 0,
    'evicted_active' => 0,
    'evictions' => 0,
    'reclaimed' => 4,
    'crawler_reclaimed' => 111,
    'crawler_items_checked' => 3212248,
    'lrutail_reflocked' => 0,
    'moves_to_cold' => 130427,
    'moves_to_warm' => 436,
    'moves_within_lru' => 26,
    'direct_reclaims' => 0,
    'lru_bumps_dropped' => 0,
  ),
  '10.143.27.236:11211' => 
  array (
    'pid' => 4740,
    'uptime' => 51722,
    'time' => 1663088428,
    'version' => '1.5.22',
    'libevent' => '2.1.8-stable',
    'pointer_size' => 64,
    'rusage_user' => 31.919661000000001,
    'rusage_system' => 64.440667000000005,
    'max_connections' => 4096,
    'curr_connections' => 3,
    'total_connections' => 36004,
    'rejected_connections' => 0,
    'connection_structures' => 4048,
    'reserved_fds' => 40,
    'cmd_get' => 44924,
    'cmd_set' => 454162,
    'cmd_flush' => 0,
    'cmd_touch' => 0,
    'cmd_meta' => 0,
    'get_hits' => 9179,
    'get_misses' => 35745,
    'get_expired' => 7,
    'get_flushed' => 0,
    'delete_misses' => 0,
    'delete_hits' => 0,
    'incr_misses' => 0,
    'incr_hits' => 0,
    'decr_misses' => 0,
    'decr_hits' => 0,
    'cas_misses' => 0,
    'cas_hits' => 0,
    'cas_badval' => 0,
    'touch_hits' => 0,
    'touch_misses' => 0,
    'auth_cmds' => 0,
    'auth_errors' => 0,
    'bytes_read' => 15309904804,
    'bytes_written' => 353273497,
    'limit_maxbytes' => 6442450944,
    'accepting_conns' => 1,
    'listen_disabled_num' => 6,
    'time_in_listen_disabled_us' => 2229873734,
    'threads' => 8,
    'conn_yields' => 79,
    'hash_power_level' => 17,
    'hash_bytes' => 1048576,
    'hash_is_expanding' => 0,
    'slab_reassign_rescues' => 0,
    'slab_reassign_chunk_rescues' => 0,
    'slab_reassign_evictions_nomem' => 0,
    'slab_reassign_inline_reclaim' => 0,
    'slab_reassign_busy_items' => 0,
    'slab_reassign_busy_deletes' => 0,
    'slab_reassign_running' => 0,
    'slabs_moved' => 0,
    'lru_crawler_running' => 0,
    'lru_crawler_starts' => 10514,
    'lru_maintainer_juggles' => 2169813,
    'malloc_fails' => 0,
    'log_worker_dropped' => 0,
    'log_worker_written' => 0,
    'log_watcher_skipped' => 0,
    'log_watcher_sent' => 0,
    'bytes' => 4630181944,
    'curr_items' => 136759,
    'total_items' => 140504,
    'slab_global_page_pool' => 0,
    'expired_unfetched' => 83,
    'evicted_unfetched' => 0,
    'evicted_active' => 0,
    'evictions' => 0,
    'reclaimed' => 4,
    'crawler_reclaimed' => 83,
    'crawler_items_checked' => 2954949,
    'lrutail_reflocked' => 0,
    'moves_to_cold' => 132398,
    'moves_to_warm' => 512,
    'moves_within_lru' => 5,
    'direct_reclaims' => 0,
    'lru_bumps_dropped' => 0,
  ),
  '10.143.27.237:11211' => 
  array (
    'pid' => 16373,
    'uptime' => 51702,
    'time' => 1663088428,
    'version' => '1.4.15',
    'libevent' => '2.0.21-stable',
    'pointer_size' => 64,
    'rusage_user' => 39.043318999999997,
    'rusage_system' => 60.140808,
    'curr_connections' => 18,
    'total_connections' => 36279,
    'connection_structures' => 4064,
    'reserved_fds' => 40,
    'cmd_get' => 45495,
    'cmd_set' => 455502,
    'cmd_flush' => 0,
    'cmd_touch' => 0,
    'get_hits' => 9036,
    'get_misses' => 36459,
    'delete_misses' => 0,
    'delete_hits' => 0,
    'incr_misses' => 0,
    'incr_hits' => 0,
    'decr_misses' => 0,
    'decr_hits' => 0,
    'cas_misses' => 0,
    'cas_hits' => 0,
    'cas_badval' => 0,
    'touch_hits' => 0,
    'touch_misses' => 0,
    'auth_cmds' => 0,
    'auth_errors' => 0,
    'bytes_read' => 15404658093,
    'bytes_written' => 334099718,
    'limit_maxbytes' => 6442450944,
    'accepting_conns' => 1,
    'listen_disabled_num' => 12,
    'threads' => 8,
    'conn_yields' => 0,
    'hash_power_level' => 17,
    'hash_bytes' => 1048576,
    'hash_is_expanding' => 0,
    'bytes' => 4676289024,
    'curr_items' => 137990,
    'total_items' => 141655,
    'expired_unfetched' => 1,
    'evicted_unfetched' => 0,
    'evictions' => 0,
    'reclaimed' => 1,
  ),
  '10.143.27.238:11211' => 
  array (
    'pid' => 15280,
    'uptime' => 51692,
    'time' => 1663088429,
    'version' => '1.4.15',
    'libevent' => '2.0.21-stable',
    'pointer_size' => 64,
    'rusage_user' => 38.808259999999997,
    'rusage_system' => 65.046334999999999,
    'curr_connections' => 18,
    'total_connections' => 36522,
    'connection_structures' => 4064,
    'reserved_fds' => 40,
    'cmd_get' => 45272,
    'cmd_set' => 454235,
    'cmd_flush' => 0,
    'cmd_touch' => 0,
    'get_hits' => 9158,
    'get_misses' => 36114,
    'delete_misses' => 0,
    'delete_hits' => 0,
    'incr_misses' => 0,
    'incr_hits' => 0,
    'decr_misses' => 0,
    'decr_hits' => 0,
    'cas_misses' => 0,
    'cas_hits' => 0,
    'cas_badval' => 0,
    'touch_hits' => 0,
    'touch_misses' => 0,
    'auth_cmds' => 0,
    'auth_errors' => 0,
    'bytes_read' => 15342489140,
    'bytes_written' => 336093091,
    'limit_maxbytes' => 6442450944,
    'accepting_conns' => 1,
    'listen_disabled_num' => 11,
    'threads' => 8,
    'conn_yields' => 0,
    'hash_power_level' => 17,
    'hash_bytes' => 1048576,
    'hash_is_expanding' => 0,
    'bytes' => 4656283703,
    'curr_items' => 137305,
    'total_items' => 140735,
    'expired_unfetched' => 0,
    'evicted_unfetched' => 0,
    'evictions' => 0,
    'reclaimed' => 0,
  ),
)

My page encoding is set to UTF-8.

Additionally, I have Memcached::OPT_BINARY_PROTOCOL set to true. If I try to set it to false, getStats() times out the page.

Here are all my settings:

$this->_memcached->setOptions(array(
    Memcached::OPT_NO_BLOCK => true,
    Memcached::OPT_BUFFER_WRITES => true,
    Memcached::OPT_TCP_NODELAY => true,
    Memcached::OPT_NOREPLY => true,
    Memcached::OPT_BINARY_PROTOCOL => true,
    Memcached::OPT_LIBKETAMA_COMPATIBLE => true,
));

The Maze of Python Dependency Management

For over 20 years, I've developed code for the JVM, first in Java, then in Kotlin. However, the JVM is not a silver bullet, e.g., in scripts:

  1. Virtual machines incur additional memory requirements
  2. In many cases, the script doesn't run long enough to gain any benefit performance-wise. The bytecode is interpreted and never compiles to native code.

For these reasons, I now write my scripts in Python. One of them collects social media metrics from different sources and stores them in BigQuery for analytics.

Project Quality Management: A Getting Started Guide for Agile Teams

You delivered the product/services, everything was on time, and everyone worked hard, but something is amiss. Maybe the product’s quality is lacking, or the project itself wasn’t very high-quality.

Often we are so focused on delivering the products/services on time that we forget a very essential aspect of the project. Project quality management.

WebKit Features in Safari 16.0

Whew boy, Safari 16 is officially out in the wild and it packs in a bunch of features, some new and exciting (Subgrid! Container Queries! Font Palettes!) and others we’ve been waiting on for better cross-browser support (Motion Path! Overscroll Behavior! AVIF!). I imagine Jen Simmons typing cheerfully writing out all of the new goodies in the roundup announcement.

A list of new WebKit features.
Source: WebKit.org

Just gonna drop in the new CSS features from the release notes:

  • Added size queries support for Container Queries. Chrome started supporting it in Version 105, so all we need is Firefox to join the party to get The Big Three™ covered.
  • Added support for Container Query Units. These units go hand-in-hand with Container Queries. Once again, we need Firefox.
  • Added support for Subgrid. Now it’s Safari and Firefox with support coverage. The good news is that Chrome is currently developing it as well.
  • Added support for animatable Grids. Very cool! Chrome has always had some implementation of this and Firefox started supporting it back in 2019.
  • Added support for Offset Path. This is also known as Motion Path, and we’ve had broad browser support since 2020. It’s nice to see Safari on board.
  • Added support for Overscroll Behavior. Now we can modify “scroll chaining” and overflow affordances with the overscroll-behavior property.
  • Added support for text-align-last. Now we’re all set with cross-browser support for this property!
  • Added support for the resolution media query. All set here as well!

There are quite a few nice updates to Safari’s developer tools, too. We’ve got a Flexbox inspector, a Timelines tab (with an experimental screenshots timeline), and Container Queries info, to name a few. There’s a full 32-minute video that walks through everything, too.

I thought Safari 15 was a pretty killer release, but 16 is pretty epic in comparison. I know there’s a “Safari is the new Internet Explorer” vibe in some circles, but I’m happy to see big jumps like this and appreciate all the forward momentum. Go Safari Team!

To Shared LinkPermalink on CSS-Tricks


WebKit Features in Safari 16.0 originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter.

Best Practices for Error Handling in .Net 6

Quick Microsoft .NET 6 Overview

Microsoft .NET 6 is a cross-platform framework that merges the .NET Core, .NET Framework, and  Xamarin/Mono technologies into a single framework. Continuing the unification that started with .NET 5 by unifying the runtime and SDK for desktop, web, mobile, and cloud applications.

Alongside C# 10 and Visual Studio 2022, Microsoft made .NET 6 generally available on November 9, 2021. There are many new enhancements to .NET 6, including:

Ultra-Fast Microservices: The Enterprise Integration Makes It Easy

When we talk about enterprise integration in the Java world, it brings a huge challenge, mainly in the news architecture trends such as microservices and the cloud age. We have several points to think about, such as a platform to integrate. This article will cover why and how to incorporate a persistence tool with the standard of Java enterprise applications. Then, we can explore and enjoy ultra-fast applications.

This rocket market is experiencing a vast revolution. Right now, the market is not exclusive to extensive and mature companies such as Red Hat, Google, etc. We can see even start-ups exploring this demand.

The Real Value of Microservices

Modularisation

Modularisation is one of the most important concepts of software development. A module forms a self-contained component of a system, which becomes exchangeable due to well-defined internal and external interfaces. A module’s internal bindings and the couplings between modules define the structure of a system. The bindings are a qualitative measure of a module’s compactness. The relationships between a module’s elements are of significance, and these should be as distinctive as possible.

The modules in good architecture all possess very strong bindings. The modules’ couplings are a qualitative measure of the interfaces between them. Important characteristics are the coupling mechanism, the interface width, and the nature of the communication. Low coupling between modules enables each module to be developed and operated independently. Moreover, loosely connected modules are easier to exchange, simplifying maintenance and further development.