Engineering Manager: Continuous Feedback

Featured Imgs 26

Feedback is one of the most valuable tools to support people and company growth. What is feedback? It is any information about the product, workplace, company culture, team, workmates, or managers used as a basis for improvement. The feedback comes from many sources, but in this article, we focus on feedback between engineers and their engineering managers.

The feedback goals, frequency, and methodology to achieve them are good indicators of the company's culture. For example, there are many companies where the goals are only focused on performance delivery and not on the growth of the people's career path or skills.

How to Get a Domain Name for Free: 4 Methods That Still Work

Featured Imgs 26
how to get a domain name for freeGetting a domain name is most people’s roadblock when trying to release a new website to the world. Basically, you cannot even start working on a website until you have a domain name at your disposal. But what if you could actually get your domain without paying anything for it? In this guide, we’re going to show you four very real methods of how to get a domain name for free.

Get Rid of Micromanagement: Introduce Project Ownership to Save the Day

Featured Imgs 23

One of the most challenging management tasks for new and seasoned leaders is understanding how to delegate appropriately. Those struggling with delegation frequently appear as micromanagers, making their staff feel watched and distrusted.

Most employees dislike being micromanaged. Thus it is in your best interest as a leader to stop this behavior before it has negative consequences such as low morale, lack of motivation, and staff turnover.

Treating Dev Bandwidth as Your Most Valuable Resource

Featured Imgs 23

The unofficial first rule of engineering: When the minds behind the world’s most valuable startup, Stripe, want to talk about making better dev orgs, you listen.

In this episode of Dev Interrupted, Stripe’s Head of Engineering Smruti Patel joined us to talk about the daily, weekly, and yearly engineering decisions that have engineered the company’s meteoric success.

Easy Fluid Typography With clamp() Using Sass Functions

Typography Definitions Cover

Fluid typography is getting a lot more popular, especially since the clamp() math function is available in every evergreen browser. But if we’re honest, it’s still a lot of mathematics to achieve this. You can use tools such as utopia.fyi, which are fantastic. But in large projects, it can get messy pretty fast. I’m a big fan of readable and maintainable code and always want to see what my code is doing at a glance. I’m sure there are many more of you like that, so instead of adding a full clamp() function inside of our code, maybe we can make this a bit more readable with Sass.

Why Should We Use Fluid Typography?

Usually, when designing for different screen sizes, we use media queries to determine the font size of our typographic elements. Although this usually gives enough control for the more conventional devices, it doesn’t cover all of the screen sizes.

By using fluid typography, we can make the typography scale more logically between all sorts of different devices.

This is now possible in all evergreen browsers because of the clamp() function in CSS. It is perfect for the job and reduces our media query writing, thus saving us a bit of file size along the way.

How Exactly Does This clamp() Function Work For Typography?

In short, the clamp function looks like this:

clamp([min-bound], [value-preferred], [max-bound]);

This takes into account three numbers: a minimum bound, preferred value, and a maximum bound. By using rem values, we can increase the accessibility a bit, but it’s still not 100% foolproof, especially for external browser tools.

If you want a more in-depth explanation of the math, I suggest you read this post from Adrian Bece “Modern Fluid Typography Using CSS Clamp ”.

However, there is a bit of a problem. When you read those clamp functions inside your CSS, it’s still hard to see exactly what is happening. Just imagine a file full of font sizes that look like this:

clamp(1.44rem, 3.44vw + 0.75rem, 2.81rem)

But with a little help from the sass function, we can make these font sizes much more readable.

What Do We Want To Achieve With This Simple Sass Function?

In short, we want to do something like this: We have a minimum font size, from the moment our breakpoint is larger than 400px, we want it to scale it to our biggest font size until the maximum breakpoint is reached.

The minimum and maximum font sizes are covered quite easily. If we want a minimum font size of 16px (or 1rem) and a maximum font size of 32px (or 2rem), we already have the two parts of our clamp function:

clamp(1rem, [?], 2rem)
Creating A Basic Automated Fluid Function

This is where things get tricky, and I suggest you follow the article by Adrian Bece, who gives a great in-depth explanation of the math behind this.

In short, the equation is the following:

(maximum font-size - minimum font-size) / (maximum breakpoint - minimum breakpoint)

Let’s get ready to do some mathematics for this to happen in Sass, so let’s create our fluid-typography.scss function file and start by adding sass:math and the function with the values we’ll need:

@use "sass:math";

@function fluid($min-size, $max-size, $min-breakpoint, $max-breakpoint, $unit: vw) {

}

Now, let’s add the calculation for the slope inside of our function with some sass:math:

@function fluid($min-size, $max-size, $min-breakpoint, $max-breakpoint, $unit: vw) {
 $slope: math.div($max-size - $min-size, $max-breakpoint - $min-breakpoint);
}

To get a value we can work with, we’ll need to multiply our slope by 100:

$slope-to-unit: $slope * 100;

All that is left is for us to find our intercept to build the equation. We can do this with the following function:

$intercept: $min-size - $slope * $min-breakpoint;

And finally, return our function:

@return clamp(#{$min-size}, #{$slope-to-unit}#{$unit} + #{$intercept}, #{$max-size});

If we call the created sass function in our scss, we should now get fluid typography:

h1 {
   font-size: #{fluid(1rem, 2rem, 25rem, 62.5rem)}
}

A Note About Units

In most cases, we will be using a viewport width when it comes to fluid typography, so this makes a good default. However, there are some cases, especially when using the clamp() function for vertical spacing, where you want to use a viewport height instead of width. When this is desired, we can change the outputted unit and use a minimum and maximum breakpoint for the height:

h1 {
   font-size: #{fluid(1rem, 2rem, 25rem, 62.5rem, vh)}
}
Updating The Function To Make The Calculations Feel More Natural

We got what we need, but let’s be honest, most of the time, we are implementing a design, and it doesn’t feel natural to pass our viewports as rems. So, let’s update this function to use pixels as a viewport measurement. While we’re at it, let’s update the font sizes so we can use pixel values for everything. We will still convert them to rem units since those are better for accessibility.

First, we’ll need an extra function to calculate our rem values based on a pixel input.

Note: This won’t work if you change your base rem value.

@function px-to-rem($px) {
    $rems: math.div($px, 16px) * 1rem;
    @return $rems;
}

Now we can update our fluid function to output rem values even though it gets pixels as input. This is the updated version:

@function fluid($min-size, $max-size, $min-breakpoint, $max-breakpoint, $unit: vw) {
    $slope: math.div($max-size - $min-size, $max-breakpoint - $min-breakpoint);
    $slope-to-unit: $slope * 100;
    $intercept-rem: px-to-rem($min-size - $slope * $min-breakpoint);
    $min-size-rem: px-to-rem($min-size);
    $max-size-rem: px-to-rem($max-size);
    @return clamp(#{$min-size-rem}, #{$slope-to-unit}#{$unit} + #{$intercept-rem}, #{$max-size-rem});
}

Now we can use the following input:

font-size: #{fluid(16px, 32px, 320px, 960px)}

This will result in the following:

font-size: clamp(1rem, 2.5vw + 0.5rem, 2rem);

At first glance, this seems perfect, but mostly that’s because I’ve been using very simple values. For example, when clamping to a maximum value of 31px instead of 32px, our rem values won’t be so rounded, and our output will get a bit messy.

Input:

font-size: #{fluid(16px, 31px, 320px, 960px)}

Output:

font-size: clamp(1rem, 2.34375vw + 0.53125rem, 1.9375rem);

If you’re like me and find this a bit messy as well, we could round our values a little bit to increase readability and save some bytes in our final CSS file. Also, it might get a bit tedious if we always have to add the viewport, so why not add some defaults in our function?

Rounding Our Values And Adding Some Defaults

Let’s start by adding a rounding function to our Sass file. This will take any input and round it to a specific amount of decimals:

@function round($number, $decimals: 0) {
    $n: 1;
    @if $decimals > 0 {
        @for $i from 1 through $decimals {
            $n: $n * 10;
        }
    }
    @return math.div(math.round($number * $n), $n);
}

Now we can update our output values with rounded numbers. Update the function accordingly. I would suggest setting at least two decimals for the output values for the most consistent results:

@function fluid($min-size, $max-size, $min-breakpoint, $max-breakpoint, $unit: vw) {
    $slope: math.div($max-size - $min-size, $max-breakpoint - $min-breakpoint);
    $slope-to-unit: round($slope * 100, 2);
    $intercept-rem: round(px-to-rem($min-size - $slope * $min-breakpoint), 2);
    $min-size-rem: round(px-to-rem($min-size), 2);
    $max-size-rem: round(px-to-rem($max-size), 2);
    @return clamp(#{$min-size-rem}, #{$slope-to-unit}#{$unit} + #{$intercept-rem}, #{$max-size-rem});
}

Now the same example as before will give us a much cleaner result.

Input:

font-size: #{fluid(16px, 31px, 320px, 960px)};

Output:

font-size: clamp(1rem, 2.34vw + 0.53rem, 1.94rem);

Adding A Default Breakpoint

If you don’t feel like repeating yourself, you can always set a default breakpoint to your function. Try updating the function like this:

$default-min-bp: 320px;
$default-max-bp: 960px;

@function fluid($min-size, $max-size, $min-breakpoint: $default-min-bp, $max-breakpoint: $default-max-bp, $unit: vw) {
    // ...
}

Now, we don’t need to repeat these viewports all the time. We can still add a custom breakpoint but a simple input such as:

font-size: #{fluid(16px, 31px)};

Will still result in:

font-size: clamp(1rem, 2.34vw + 0.53rem, 1.94rem);

Here is the full function:

@use 'sass:math';

$default-min-bp: 320px;
$default-max-bp: 960px;

@function round($number, $decimals: 0) {
    $n: 1;
    @if $decimals > 0 {
        @for $i from 1 through $decimals {
            $n: $n * 10;
        }
    }
    @return math.div(math.round($number * $n), $n);
}

@function px-to-rem($px) {
    $rems: math.div($px, 16px) * 1rem;
    @return $rems;
}

@function fluid($min-size, $max-size, $min-breakpoint: $default-min-bp, $max-breakpoint: $default-max-bp, $unit: vw) {
    $slope: math.div($max-size - $min-size, $max-breakpoint - $min-breakpoint);
    $slope-to-unit: round($slope * 100, 2);
    $intercept-rem: round(px-to-rem($min-size - $slope * $min-breakpoint), 2);
    $min-size-rem: round(px-to-rem($min-size), 2);
    $max-size-rem: round(px-to-rem($max-size), 2);
    @return clamp(#{$min-size-rem}, #{$slope-to-unit}#{$unit} + #{$intercept-rem}, #{$max-size-rem});
}
A Final Note: Be A Happy Clamper For All users Out There

If you followed this little tutorial and were amazed by it, you might want to add this clamp() method for everything, but there is an important side note when it comes to accessibility.

Note: When you use vw units or limit how large text can get with clamp(), there is a chance a user may be unable to scale the text to 200% of its original size.

If that happens, it is WCAG failure. As Adrian Bece mentioned, it’s not 100% foolproof. Adrian Roselli has written some examples on this, which you might find interesting.

We can use this method today because of the great browser support. By being smart on the usage, I’m sure it can be a beautiful addition to your upcoming project or as an upgrade to a previous one.

Inherent vs Residual Risk: Differences and Examples Explained

Featured Imgs 23

What Is Risk Management?

Risk management is one of the most essential processes that is carried out in companies and organizations. It can be explained as evaluating, recognizing, and managing the organization’s profits and resources risks. The concept is not new; however, how organizations look at risk has shifted.

The significant risks of any organization include financial security, regulatory liabilities, strategic management, natural hazards, and other incidents. Companies usually establish the risk without considering the risks and can fail the operations whenever unseen risks occur. The failure to manage these risks properly will make it quite difficult for the organization to determine its long-term goals.

Traditional vs. Modern Incident Response

Featured Imgs 23

What Is Incident Response?

An incident is an event (network outage, system failure, data breach, etc.) that can lead to loss of, or disruption to, an organization's operations, services or functions. Incident Response is an organization’s effort to detect, analyze, and correct the hazards caused due to an incident. In the most common cases, when an incident response is mentioned, it usually relates to security incidents. Sometimes incident response and incident management are more or less used interchangeably.

However, an incident can be of any nature, it doesn’t have to be tied to security, for example:

State of CSS 2022 Survey Now Open

Category Image 052

The State of CSS survey recently opened up. Last year, the survey confirmed everyone’s assumptions that TailwindCSS is super popular and CSS variables are mainstream. It also codified what many of us want from CSS, from Container Queries to a parent selector. (Spoiler alert, we now have both of ’em.)

While I wouldn’t say the results have been super surprising each year, this time I’m excited to start seeing more historical trends reveal themselves. The survey has been running since 2019, so that’s going to be four years (ancient in front-end years!) of data to see if certain frameworks came and went, specific features are gaining momentum, what general learning practices are out there, and just plain more context. It takes time for stuff to build up like this, so kudos to Sacha Greif for keeping this thing going.

And speaking of the team behind the survey, Lea Verou is new to the bunch and lead this year’s edition. Lea made some nice additions, including more open-ended comments, questions about browser inconsistencies, and a question that compares the amount of time you write CSS versus JavaScript.

Browsers actually use this stuff to help prioritize what features to work on — so definitely add your voice to the mix! The polls close on October 20.

To Shared LinkPermalink on CSS-Tricks


State of CSS 2022 Survey Now Open originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter.

How can you make your information credible?

Featured Imgs 20

The information we provide in our content must be trustworthy because it is the most crucial component of both traditional and digital marketing. It's utterly important to provide real information in your content if you want the readers to accept them. In other words, the data you use in your articles or blogs should come from reliable sources.

Data Quality Monitoring — You’re Doing It Wrong

Featured Imgs 23

Occasionally, we’ll talk with data teams interested in applying data quality monitoring narrowly across only a specific set of key tables. 

The argument goes something like: “You may have hundreds or thousands of tables in your environment, but most of your business value derives from only a few that really matter. That’s where you really want to focus your efforts.”

How to Manage WordPress Comment Notification Emails

Category Image 051

Do you want to improve your WordPress comment notification emails?

Comments drive discussion and user engagement on many blogs. However, WordPress doesn’t do such a great job when it comes to notifying users about comment activity.

In this article, we will show you how to better manage WordPress comment notification emails to boost user activity on your website.

How to manage WordPress comment notification emails

Why Improve WordPress Comment Notification Emails

Comments are an important element of many WordPress websites, particularly on news sites and WordPress blogs. More comment activity means a more engaged audience which results in more page views and ultimately more revenue.

However, the comment system that comes with every WordPress website is fairly limited. It sends comment notifications only to site administrators and article authors. Apart from that, there isn’t a default option for other site users to be notified of new comments.

Wouldn’t it be nice if users were able to get comment notifications for the posts they like or when someone replies to a comment they left?

That said, let’s see how you can enhance the default WordPress comment system and notification emails for a more engaging user experience on your website.

The Default Comment Notification Options in WordPress

By default, WordPress does not have an option to send notifications to commenters.

However, it does have an option to send email notifications to site administrators when a new comment is published and when a comment is held for moderation.

You can view these options by going to Settings » Discussion from your WordPress dashboard and navigating to the ‘Email me whenever’ section.

Email me whenever settings

Both these notifications are only sent to the site administrators. However, WordPress also sends an email notification to the post author about new comments.

If you get a lot of comments on your website, you might not want to receive email notifications for all comments held for moderation. You can simply uncheck the box here to disable those.

How to Let Users Know When Their Comment is Approved

If a user’s comment is held for moderation, they will see a message telling them so. However, they will have no idea whether you approve it or not without returning to your site.

Unfortunately, many of these users never return to your website to check, so they won’t ever know that you approved their comments.

You can fix this by using the Comment Approved Notifier Extended plugin. For more details, see our step-by-step guide on how to install a WordPress plugin.

Comment Approved Notifier Extended will notify users when their comment is approved. It works right out of the box, and there are no additional settings you need to configure.

You can also see our list of best plugins to improve WordPress comments.

How to Allow Users to Subscribe to Comments in WordPress

In addition to not knowing if their comment was approved, commenters will not be notified about replies, either.

Once they leave a comment, they will have to manually visit your website again to see if someone has replied.

To solve this, you need to install and activate Subscribe to Comments Reloaded plugin. For more details, see our guide on how to install a WordPress plugin.

It allows your users to subscribe to comments on any article with or without leaving comments. Users can also easily unsubscribe at any time.

StCr settings in WordPress

For detailed step-by-step instructions, see our article on how to allow users to subscribe to comments in WordPress.

How to Allow Users to Subscribe to Just their Own Comments in WordPress

Many users may not want to receive notifications for all comments on an article. However, they may want to know if someone replied only to their own comments.

You can add this feature as well using the same Subscribe to Comments Reloaded plugin. First, you’ll need to install and activate the plugin. If you need help, then please see our guide on how to install a WordPress plugin.

Next, simply visit the StCR » Comment Form in your WordPress dashboard. From here, click on ‘Yes’ next to the ‘Advanced Subscription’ option.

StCr settings in WordPress

Users will now see a new option under the comment box whether they’d like to subscribe to all comments or just their own comments.

For more details, see our article on how to notify users of replies to their own comments in WordPress.

How to Allow Authors to Subscribe to Other Author’s Posts

If you run a multi-author blog, then other authors may want to keep up with discussions across your website. If you already have comment subscriptions enabled, then each author can manually go and subscribe to comments.

However, if you want certain users to receive all comment notifications, then you can do this with Better Notifications for WordPress plugin. For more details, then please see our guide on how to install a WordPress plugin.

Once the plugin is active, you can head to Notifications » Add New from your WordPress dashboard and can enter a title for your notification at the top.

Next, you can select ‘New Comment’ from the ‘Notification for’ dropdown menu. After that, simply add the user roles that will receive these notifications in the ‘Send To’ field.

Comment notifications for certain user roles

The plugin also offers an option to send notifications to the post’s author and even exclude user roles from receiving email notifications for new comments.

How to Create Custom Comment Notification in WordPress

Want to create your own custom comment notifications in WordPress? Custom notifications can allow you to replace the default WordPress notification with your own.

First, you will need to install and activate the Better Notifications for WordPress plugin. For more details, see our step-by-step guide on how to install a WordPress plugin.

Upon activation, you need to visit the Notifications » Add New page from your WordPress admin panel to create your custom comment notifications.

Create a custom notification

You can edit the notifications for new comments, comments awaiting moderation, and comment replies. Additionally, you can send notifications to any user role or to individual users.

The plugin also lets you add email addresses manually that are not even connected to a user on the site.

You have the option to completely customize the comment notification sent by WordPress and use shortcodes inside the email text to add custom tags.

For more details, see our article on how to add better custom notifications in WordPress.

How to Improve Deliverability of WordPress Email Notifications

All the above tips will fail if your WordPress site fails to send email notifications or if those emails are marked spam by email providers.

To fix WordPress email issues and improve email deliverability, you need to install and activate the WP Mail SMTP plugin. For more details, see our step-by-step guide on how to install a WordPress plugin.

Upon activation, visit the Settings » WP Mail SMTP page to configure plugin settings.

WP Mail SMTP settings

This plugin allows you to use SMTP (Simple Mail Transfer Protocol) to send emails. SMTP is a much better and more reliable method than the default mail function used by WordPress.

It works with any email service that supports SMTP. This includes your free Gmail account as well as Google Workspace, Mailgun, and Sendgrid.

Choose Other SMTP as mailer

For details, see our article on how to use SMTP server to send WordPress emails.

We hope this article helped you learn how to manage WordPress comment notification emails. You may also want to see our ultimate step-by-step guide on improving WordPress speed and performance for beginners and how to start an online store.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Manage WordPress Comment Notification Emails first appeared on WPBeginner.