How to Validate and Geolocate an IP Address in Java

An IP Address is used as a unique identifier for network-connected hardware such as computers and smartphonesThese contain four sets of numbers that differentiate each device when it accesses network services such as the internetThis information can be very useful for businesses with websites, as they can verify their user’s various IP Addresses to gather important client-specific and audience information for various purposes.  

Some of the most important usages for IP Addresses is threat tracking and user data such as identifying Tor servers and providing location information that can assist with security and user-experience needs. The following four APIs are centered around these functions and can be used separately or in tandem. This will allow you to ensure the security of your site, as well as providing data that can help optimize your platforms for users. 

Increase the Default Process Variable Size in jBPM

Process variables in jBPM are limited to 255 characters by default. The number of characters in turn are also dependent on the character set that is being followed. So, it is always better to have an option to increase the default value.

This article is just an extension of the solution provided in the above link; simplifying things a little more for beginners.

Very Extremely Practical CSS Art

I’ve always enjoyed the CSS art people create, but I’ve never ventured into it much myself. I’m familiar with many of the tricks involved, but still find it surprising every time: the way people are able to make such fluid and beautiful images out of little boxes. I always end up digging around in dev tools to see how things are done, but I had never seen the process unfold.

Any time CSS art starts getting attention, there is always someone around to say “that’s not practical” or “just use SVG” or something similarly dismissive and boring. It’s a terrible argument, even if it was true — no one is required to be Practical At All Times. What a terrible world that would be.

In October, I took the time to watch Lynn Fisher (Twitter, CodePen), one of my favorite CSS artists, live-stream her single-div process. Somewhere in the back of my mind, I assumed single-div artwork relied on highly complicated box-shadows—almost a pixel-art approach. I’m not sure where that idea came from, I probably saw someone do it years ago. But her process is much more “normal” and “practical” than I even realized: a number of reasonably layered, sized, and positioned background gradients.

Examples of Lynn Fischer's single div projects: repeated polar bears, plants on a shelf, a blinking light, and a tiny electronic piano.

Wait. I know how to do that. It’s not the technique that’s magical—it’s the audacity of turning a few gradients into a block of cheese with cake inside!

I’ve used all these properties before on client projects. I’ve created gradients, layered images, sized them, and positioned them for various effects. None of that is new, or complicated, or radical. I really didn’t learn anything at all about the CSS itself. But it had a huge impact on my perception of what I could accomplish with those simple tools. 

Within a few weeks, I was using that in production. Again, it’s nothing fancy or complicated—the perfect low-hanging fruit where a custom SVG feels just slightly too bulky. Here’s the effect I created, for a personal project, with a few custom properties to make adjustment easier:

Last week we used a similar trick as part of a Very Practical & Official client component library. It was Stacy Kvernmo’s idea, and it worked great.

Thanks Lynn, and all you other fabulous CSS Artists! Thanks for showing us all how much farther we can push this language that we love so much, and the Very Serious tools we use every day.


The post Very Extremely Practical CSS Art appeared first on CSS-Tricks.

You can support CSS-Tricks by being an MVP Supporter.

WordPress 5.6 “Simone” Includes New Twenty Twenty-One Theme and Improved Editor

Nina Simone, American singer and songwriter.
Nina Simone
License: CC0 | Credit: Noord-Hollands Archief / Fotoburo de Boer

WordPress 5.6 “Simone,” named in honor of American performer and civil rights activist Nina Simone, was released today and is now available for download. The release was led by an all-women release squad, a first in WordPress history. The new version includes many enhancements for the block editor, accessibility improvements, application password support for the REST API, and a new default theme.

This release saw contributions from 605 volunteers who were involved with almost 350 Trac tickets and over 1,000 pull requests on GitHub.

The following women formed the release squad for the 5.6 release:

  • Release Lead: Josepha Haden. Cohort: Chloé Bringmann and Angela Jin.
  • Release Coordinator: Dee Teal. Cohort: Thelma Mutete and Laura Nelson.
  • Triage Lead: Tonya Mork.
  • Core Tech Lead: Helen Hou-Sandì. Cohort: Amy Kamala and Ebonie Butler.
  • Editor Tech Lead: Isabel Brison. Cohort: Chandrika Guntur, Anchen le Roux, and Rebecca Hum.
  • Design Leads: Ellen Bauer and Tammie Lister. Cohort: Anyssa Ferreira, Estela Rueda, Tracy Apps, and Sophia DeRosia.
  • Design Tech Lead: Shital Marakana.
  • Accessibility Lead: Sarah Ricker. Cohort: Hauwa Abashiya.
  • Marketing and Communications Leads: Abha Thakor and Yvette Sonneveld. Cohort: Nalini Thakor, Meher Bala, Olga Gleckler, Larissa Murrillo, Michelle Frechette, Breann McDede, and Afshana Diya.
  • Documentation Lead: Shawntelle Coker. Cohort: Daisy Olsen, Meher Bala, and Winstina Hughes.
  • Documentation Review Lead: Michele Butcher-Jones. Cohort: Nidhi Jain and Laura Byrne Cristiano.
  • Default Theme Design Lead: Mel Choyce-Dwan. Cohort: Ellen Bauer.
  • Default Theme Development Lead: Carolina Nymark. Cohort: Kelly Choyce-Dwan and Jessica Lyschik.
  • Default Theme Wrangler: Jessica Lyschik.
  • Test Lead: Monika Rao. Cohort: Allie Nimmons.
  • Support Lead: Bet Hannon.

At times, the 5.6 development cycle felt a bit rocky. Block-based widgets and nav menus, features expected to ship, were punted for a second time to a future release. These were hard decisions, but good leadership means making tough calls to hold off on features that are not ready for production.

“You know, I was really hopeful for it too, and that last-minute call was one I labored over,” said Josepha Haden after pushing block-based widgets back. “When I last looked, it did seem close to ready, but then more focused testing was done and there were some interactions that are a little rough for users. I’m grateful for that because the time to discover painful user experiences is before launch rather than after!”

Despite dropping what would have been major transitional features from the classic WordPress theming paradigm in preparation for WordPress 5.7’s expected site editor, the release still has a lot to offer.

Block Editor Enhancements

Block pattern categories dropdown select.
New dropdown for selecting block pattern category.

The Gutenberg plugin development team continues to make small but vital improvements to the block editor. They have also tacked on many new features in the past few months. Features from Gutenberg versions 8.6 – 9.2 are included in the update, along with bug fixes and performance improvements from 9.3 and 9.4.

Much of the work this development cycle has been focused on the upcoming site editor. There was some initial hope that a beta version of it would land in the 5.6 release. It was a part of the proposed scope. However, the feature is still months away from being ready. This is not a bad thing. It needs more time to mature, and there should be no rush in integrating a feature that affects so many pieces of the platform.

What end-users will see with this update is a more polished editor. Whether it is extra options for blocks or a dropdown select for block pattern categories, hundreds of minor changes have all led to a better overall experience.

WP Tavern has covered nearly every major Gutenberg plugin release this cycle — looks like we missed 8.8, sorry. Catch up with anything you missed about editor changes from the following posts:

Twenty Twenty-One Theme

Block patterns in the Twenty Twenty-One theme.
Inserting a Twenty Twenty-One block pattern into a post.

Twenty Twenty-One, the new default theme for the upcoming year, takes full advantage of all the latest and greatest features of the block editor. While last year’s Twenty Twenty theme had a successful launch, the development team behind the new default has had more time to explore building themes in the block era.

The theme makes use of more visual artistry. It will not be for everyone. It offers a wide range of color schemes for end-users, but it lends itself best to bloggers and other creators who prefer a bit of flair with their website’s design.

The best thing is that it pushes the envelope with the block patterns feature, which was not available when Twenty Twenty landed a year ago. Older default themes will be getting the block-pattern treatment. However, Twenty Twenty-One will be the first default built with custom patterns in mind from the get-go.

For users who cannot wait for the site editor to land in WordPress, expected in some form in the 5.7 release, there is an alternate Twenty Twenty-One Blocks theme to tinker with.

Application Passwords for the REST API

Despite being a part of the core platform since 2015, the REST API has lacked support for application passwords. Such a feature is vital for third-party applications to communicate with WordPress. Previously, requests had to be run through cookie and nonce-based authentication. Else, they would need to use the legacy XML-RPC API. This limitation has also affected the mobile WordPress development teams, making it tough to support the block editor, which relies on the REST API.

The application passwords feature will make it easier for applications to make API requests as well as request and revoke credentials.

The REST API promised a future for all types of applications built upon and around WordPress. However, this vision has not panned out over the years on a broad scale. With a major limiting factor removed, perhaps there is still hope for robust applications in the coming years.

Automattic Acquires MailPoet

Automattic has acquired MailPoet, a popular email marketing solution for WordPress, to give WooCommerce store owners more integrated email management capabilities in the admin. The plugin is used by more than 300,000 websites for everything from building a mailing list to managing transaction and abandoned cart emails. The nine-year old company is now a team of 11 that will be joining Automattic.

MailPoet launched in 2011 under the name WYSIJA (“What you send is just awesome”), a branding misstep that founder and CEO Kim Gjerstad readily acknowledged as “a terrible idea.” The name was difficult to spell and remember. It was changed early on but the company was stuck with the “WYSIJA” slug in the WordPress plugins directory, a common issue for many plugins that have rebranded.

When MailPoet version 3 was released in 2017, the company was finally able to get the “mailpoet” slug in the plugin’s URL on WordPress.org. Version 2, which still has more than 100,000 users, has support for multisite and uses the old email designer, among other differences. MailPoet 2 has received security updates for the past three years and plans to continue these following the acquisition.

Gjerstad reported that nearly a quarter of MailPoet users are running WooCommerce stores. The plugin’s developers have been expanding its WooCommerce functionality over the past three years with features that help store owners catch customers’ emails at checkout, measure revenue per email, send automated emails using purchase data based on products purchased or product categories, customize store emails, and recover abandoned carts.

Earlier this year MailPoet introduced its own SMTP solution to ensure emails sent from the plugin land in recipients’ inboxes, instead of flagged as spam. This silent background feature includes store emails as well, bringing higher deliverability without users having to depend on separate SMTP plugins.

In WooCommerce’s acquisition announcement, CEO Paul Maiorana said adding MailPoet “helps accelerate our roadmap toward a fully-integrated commerce experience.” Last year Maiorana and Gjerstad met at WordCamp U.S. and exchanged ideas about a partnership.

“As our conversation progressed in the following months, we came to realize that we shared a common vision for stores; with store owners being able to access email right in their dashboard,” Gjerstad said.

Maiorana said Automattic’s initial focus of the acquisition is to work together on improving the experience for WooCommerce users, but the company plans to “evolve our collaboration in a way that can benefit the entire WordPress community.” MailPoet’s FAQ’s on the announcement reiterate that all WordPress users will continue to be able to use the plugin, even if they do not have a WooCommerce store. There are no immediate changes planned for the plugin’s features.

Smush Pro Now Supports Local WebP Conversion (No CDN Required)

Until now, next-gen WebP images could only be served by activating Smush Pro’s CDN. But by popular demand, Smush Pro now also supports local WebP image conversion.

Our CDN is awesome, it really is. However, we’re all for giving people options.

This is exactly why we’ve now made it possible to convert your images to WebP format without needing to use our CDN.

It was also one of Smush Pro’s (and WPMU DEV in general!) most anticipated and requested features of the year.

You told us that…

  • If you were happy with your current CDN provider, you’d prefer not to have to switch to get WebP support.
  • You were also conscious that using Smush Pro’s CDN to serve images uses precious bandwidth – which might not be ideal for larger sites.

So, like any good company who actually listens to their audience, we’ve obliged, and made our award-winning image optimization plugin – even better!

Read on to find out the in’s and out’s of Smush Pro’s game-changing new feature.

Here’s a quick overview if you want to skip to a particular section:

1. Why Convert to WebP?
2. Activating Local WebP on WPMU DEV Hosted Sites
3. Enabling Local WebP Conversion on Third-Party Sites
4. Apache Server Configuration
5. NGINX Server Configuration
6. How to Check Your Image Format.

Why Convert to WebP?

The benefits of WebP images speak for themselves.

WebP image files are much smaller and load faster than JPEGs and PNGs – all while offering no perceptible difference in quality.

The proof is in the pudding – when YouTube switched their thumbnails to WebP, they saw a 10% reduction in load time!

Once you activate the Local WebP feature, Smush Pro will convert your images into the next-gen file type during regular Smushing.

And while not all browsers support WebP (we’re looking at you, Internet Explorer!), you can rest safe in the knowledge that Smush will serve up the JPEG and PNG equivalent to non-supported browsers.

Activating Local WebP on WPMU DEV Hosted Sites

First things first – the latest version of Smush Pro needs to be installed on your site.

Screenshot of the webp announcement page.
Non-CDN WebP support is just a few clicks away!

You can then head into the WebP settings.

Screenshot of the webp activation screen with the getting started buttoin.
Click “Get Started”.

If you host with us, you’ll be lucky enough to be greeted by this message on the next page:

Screenshot of the message that lets you know everything is already set up if you host with WPMU DEV.
If this is the case – you’re all set!

Everything is automatically configured for you, and all that’s left to do is run a Bulk Smush so that your images are converted.

From this page you can also see the supported media types, as well as delete all your WebP images.

Screenshot of the supported media types - png and jpeg.
It’s quick and easy to delete your WebP files if you change your mind.

So let’s get to the nitty gritty – what if your site is not hosted with WPMU DEV?

You have two options.

  1. Switch to one of our awesome (and affordable!) hosting plans.
  2. Follow our step-by-step configuration guide below.

How To Enable WebP Conversion On Non WPMU DEV Hosted Sites

Smush will try to automatically detect the type of server your site uses.

Screenshot of the drop-down where you can choose your server type for configuration.
Smush will try to detect whether your site is running on an Apache/Litespeed or NGINX server.

If the detected type is incorrect, you can change it manually using the dropdown box.

Apache Servers

If your server type is Apache, try the Automatic method first.

Screenshot of the automatic method screen.
Click the Apply Rules button.

This will hopefully add the needed rules to the .htaccess file located in the /wp-content/uploads directory.

If the Automatic method does not work, you can switch to the Manual option and add the displayed rules to your .htaccess file yourself.

Note that the rules must be added to the .htaccess file located in your /wp-content/uploads directory, not the main .htaccess file in the root of your WordPress install. If that file does not yet exist in that directory, you can create it to add the needed rules.

Smush talks you through what you need to do.

Screenshot of the configuration instructions within Smush.
Follow these instructions within Smush to manually configure the settings.

If neither of these methods are successful, you’ll be provided with a list of troubleshooting tips – and of course our 24/7 superhero support team is always on hand if you need extra help.

NGINX Servers

If your server type is NGINX, the required rules must be added manually to your configuration file.

Smush provides clear instructions on how to do this.

Screenshot of the configuration settings for NGINX servers.
Follow the steps within Smush to configure your NGINX server manually.

Just be aware that if your setup is running NGINX as a proxy for Apache, the Apache/Litespeed rules may not work in .htaccess, and you’ll want to add the NGINX rules manually using this method.

How to Check Your Image Format

Unlike the WebP Conversion option in the Smush Pro CDN, you won’t see the “.webp” format appear in source code.

Instead, if you want to verify that images are indeed served as WebP, you’ll want to pop open your browser’s developer tools and, under the Network tab, check the Response Headers for any image.

If you see “content-type: image/webp” there, that tells you that the browser is indeed serving up the WebP version of the image.

Screenshot of the developer tools tab showing proof of the images being webp.
You will be able to see whether images are served as WebP.

Are You Converted?

Hopefully, after reading this article, you’re confident that not only is WebP the right image format for your sites – but Smush Pro is the right plugin for the job.

Just remember that if you want to take full advantage of the full power of Smush, you can always use Smush Pro’s CDN too!

Not a WPMU DEV member? Check out Smush Pro’s 7-day free trial and take the new local WebP feature for a no-risk test drive.

What’s New in WordPress 5.6 (Features and Screenshots)

WordPress 5.6 was released earlier today, and it is the last major release of 2020.

This new release is packed with a lot of improvements and new features. It also includes a brand new default WordPress theme.

In this article, we’ll share what’s new in WordPress 5.6, and which features you should try after updating your websites.

Take a look at what is new in the new WordPress 5.6

WordPress 5.6 is a major release, and unless you are on a managed WordPress hosting service, you’ll have to manually initiate the update.

Important: Don’t forget to create a complete WordPress backup before initiating the update.

With that said, here’s all that’s new in WordPress 5.6.

Twenty Twenty-One – The New Default WordPress Theme

WordPress traditionally releases a new default theme each year which is usually named after the year. WordPress 5.6 comes with Twenty Twenty-One as the new default WordPress theme.

This new theme provides a canvas for the WordPress block editor and the site editing features. It is designed to be simple, aesthetically pleasing, un-opinionated, and refreshing.

New default WordPress theme Twenty Twenty-One

Twenty Twenty-One uses a pastel green background color, and two shades of dark grey for text. It also ships with colors for the dark mode which can be enabled by customizing the theme.

Twenty Twenty-One dark mode

You can also change the background color by choosing from several pastel color schemes or choose your own colors. The theme will automatically adjust text color as well.

Choose a background color scheme

Here is a preview of what these built-in color combinations would look like.

 Pastel color schemes in Twenty Twenty-One

For typography, designers opted to go with the default system fonts. This means no extra font files to load and easy to build child themes that have their own typography and fonts.

If you are testing the theme with a fresh WordPress website, then you can try out the new homepage layout. Simply go to the Appearance » Customize page and click on the Publish button to generate basic website pages including a homepage.

This sample homepage gives you an idea of what you can do with the block editor. You can simply edit the page and replace it with your own content.

Earlier this year, WordPress 5.5 introduced patterns for the block editor. Twenty Twenty-One utilizes this feature by adding new block patterns that you can use in your posts and pages.

Twenty Twenty-One patterns

Overall this is a beautiful WordPress theme, that is easy to customize and can be used to make any type of website.

The Block Editor Improvements

The WordPress content editor is where users spend most of their time writing blog posts, creating pages, and making layouts. WordPress 5.6 brings several improvements to the block editor.

Here are some of the most noticeable changes to the block editor in WordPress 5.6.

Video Position Control for The Cover Block

Previously cover block only showed position controls for images. With WordPress 5.6, the cover block now allows users to set video position inside the cover block.

Cover block with video focal point picker controls

Patterns Organized in Categories

The patterns panel under the ‘Add new block’ column now has a category switcher. This makes it super easy for users to find and use a pattern they need. Users will also be able to see the patterns available with their theme and distinguish them from the default patterns.

Pattern categories in WordPress 5.6

Keyword Variations to Improve Block Search

The block editor now allows developers to store keyword variations that may help users find a block. This would improve the block search feature and will allow users to discover blocks added by block libraries or third-party plugins.

Keyword variations make it easier to find common blocks

Characters in The Information Panel

The information panel will now show characters along with words, paragraphs, and blocks used in your content.

Information panel in WordPress 5.6

Color Support for The Lists Block

The lists block now has the option to choose text and background colors without adding the list into another block.

List block color settings

Social Icons Block

Social Icons block has two improvements. First, there is a new gray style for social icon buttons. Secondly, users can now choose to open all links in the block in a new window.

Social Icons block in WordPress 5.6

Bonus: want to add social share counts? Here’s how to add social share counts in WordPress.

Editor Options are Now Called Preferences

The default block editor has a settings panel where you can set up the editor to your own liking. In WordPress 5.6, this modal is now called ‘Preferences’ instead of ‘Options’.

Editor preferences setting

The modal itself now is more helpful with descriptions for different items. This would make it easier for beginners to decide which items they want to enable.

Editor preferences menu

Automatic Updates for Major WordPress Releases

Earlier this year, WordPress 5.5 made it easier for users to turn on automatic updates for specific plugins. WordPress 5.6 extended this by adding the option to turn on automatic updates for major WordPress releases as well.

You can go to Dashboard » Updates page inside WordPress admin area and click on the ‘Enable automatic updates for all new versions of WordPress’ link.

Enable automatic updates for major WordPress releases

This is totally optional for you to decide whether you want to enable this feature or not. If you are using a managed WordPress hosting, then you don’t need to worry about that as they will automatically update WordPress for you.

Support for PHP 8

PHP 8 support in WordPress 5.6

WordPress is written mainly with the PHP programming language. Just like WordPress, PHP also releases new versions to improve performance, add features, and fix bugs.

They were expected to release PHP 8 on November 26 closer to the release of WordPress 5.6. The core team planned and worked hard to catch and fix any known compatibility issues with PHP 8.

This will ensure that users who upgrade to the latest PHP version will not face any major issues. However, theme and plugin developers may still need to test their own code for compatibility.

Application Passwords for REST API

The REST API in WordPress allows developers to communicate with a website outside the WordPress installation itself.

To keep it safe, WordPress used cookies and nonce keys to ensure that only legitimate users can access the API. For developers, these methods were not very efficient to work with.

WordPress 5.6 will allow developers to use application passwords in WordPress. Just like popular platforms Facebook and Google, the users can now give apps access to their website and manage it from the Users » Profile page. Users can also revoke an app’s access at any time.

Application passwords in WordPress 5.6

Under The Hood Changes

WordPress 5.6 has arrived with tons of features and improvements targeted towards developers. The following are some of the most significant under the hood changes.

WordPress 5.6 continues the second phase of the three-step plan to upgrade the core jQuery bundled with WordPress. Theme and plugin developers relying on jQuery are already testing their code for any issues so it is not likely to affect large number of users. (See details)

The new 5.6 release also includes REST API Batch Framework for making a series of REST API calls in one request to the server. (See details)

A new action wp_after_insert_post is also available in WordPress 5.6. It allows theme and plugin developers to run custom code after a post and its terms and meta data have been updated. (See details)

WordPress 5.6 has replaced older-style PHP type conversion functions with type casts. (#42918)

WordPress 5.6 also introduced the ability to merge WP_Error objects into one another. This would allow developers to add more than one item of data to the WP_Error object. (#38777)

We hope this guide helped you explore what’s new in WordPress 5.6. We are particularly excited about the new default theme and the improvements made to the block editor.

What are you excited about? Let us know in the comments below.

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 What’s New in WordPress 5.6 (Features and Screenshots) appeared first on WPBeginner.

How Writing Skills Can Help Developers Grow

Let's face it: Soft developers rarely consider writing skills worthy of their note. They focus on computer science, coding, SQL databases or CI/CD structures understanding, and other technical knowledge they believe they'll need for professional growth.

Indeed, in today's data-driven, data-heavy world, when we have so much content to consume, there seems no place left for walls of text, articles, or paper books. Visual content calls the shots, and most of us would choose to listen to a podcast than read extended interviews or tutorials.

Getting started with Apache Kafka and Red Hat service registry

New projects require some help. Imagine you are getting ready to start that new feature your business has been asking for the last couple of months. Your team is ready to start coding to implement the new awesome thing that would change your business.

To achieve it, the team will need to interact with the current existing software components of your organization. Your developers will need to interact with API services and event endpoints already available in your architecture. Before being able to send and process information, developers need to be aware of the structure or schema expected by those services.

TypeScript & Relevance

In our wide world of building for the web, we have every opportunity to talk about tools. We lunge to fill every gap we find in our projects with a definitive technological approach. Some of us are given “a seat at the table” feasting on even the most minuscule of technological debates. This marketplace of opinion is founded upon a desire to arrive, at least for the moment, at an optimum. We postulate about tooling so that we might achieve efficiency, extend our exploratory reach, or pave the quickest path to viability.

If you have read anything on this website, you are likely more than aware of the notion of Imposter Syndrome—the debilitating reflection that you do not deserve to be in the position you hold or know what you think you should know. Those of us that have learned to deal with Imposter Syndrome are at risk of slipping into (what I recognize in myself as) Relevance Syndrome—a mid-career complication of Imposter Syndrome. It is what happens when you spend years repeating the mantra, “I deserve to be here,” but have never truly accepted its premise. It happens when you attempt to counteract the softening of your hard skills and end up hardening your soft ones. Maintaining relevance sure is a great reason to opine about tooling.


With that, I will casually lean against this brick wall, slide my shades to the tip of my oh-so-relevant nose, and dismissively mention that yes, I too, have learned TypeScript. One year into the experience, and I can say that I have grown quite fond of it.

I’d like to use TypeScript’s purpose to make a separate point, so if you will, please bear with me through this quick example.

TypeScript, among other things, enforces the types of things you send around. Take this JavaScript function that multiplies two numbers:

const product = (x, y) => x * y;

Imagine you broke your rules by calling this function without numeric arguments like, product('A', 'B'). There are many ways you could validate this function to catch this scenario, but your validation would only occur at the time of execution—while the script is running, often in a browser. You can’t really debug this until those events occur. What TypeScript can do is tell you that you are breaking the rules before execution — as you are writing your code. To do this, you state which types of things you are using.

const product = (x: number, y: number) => x * y;

Here, we specify types for the two arguments, saying that variable x and y are both a number. Now, if you were to use this function with the wrong types of arguments, your application script would loudly fail to build. Because your script must work before it can be built, you never need to worry about these sorts of errors ever occurring in the wild. It takes a lot of effort to achieve this, however. You must define your types, everywhere.

You may find writing TypeScript types to be like organizing a bookshelf. You set some rules that, when followed, achieve an optimal organization that is easily-referenced.

Or, you may find writing TypeScript types to be like forcing your child into extracurricular activities against their will. It is rigidly unforgiving and doesn’t let your code figure out who it is and where it is going! You’re stunting its development by imposing your will upon it!

I’d like to think there is as much capacity for value in a well-organized bookshelf as there is for ingenuity in an independent spirit, and there is so much to learn from both.


Let’s end with considering relevance again.

You may feel pressure to know what you are doing before you do it—to type yourself before your code executes. You may feel pressure to account for all your failures and learnings before you give it a go in public. That, my friends, is an immense effort you have taken on to maintain your type. It is a pressure and rigidity that, at times, is great to put upon our software, but is unfair to apply to yourself or others.

We all have our "1" + "1" = "11" moments. They are relevant and entirely human, if not a form of genius. Embrace them. To strictly prevent them is unscalable.

I feel in this moment that I may have learned how to learn TypeScript this year, and hope to hold on loosely to whatever type that makes me.


The post TypeScript & Relevance appeared first on CSS-Tricks.

You can support CSS-Tricks by being an MVP Supporter.

How To Grow From a Software Developer To a Software Architect

The journey from developer to software architect is a difficult path full of challenges and doubts. Many developers start as juniors and progress into senior and team lead roles. But there’s more than one direction to grow as a software engineer, for example, a software architect. In this article, I would like to give you some ideas on becoming an effective software architect. 

First of all, let’s discuss who a software architect is. In one of our articles, “The role of a software architect,” written by the software architect of Apiumhub. 

How to Keep Elasticsearch in Sync with Relational Databases?

This article was published in Java Advent Calendar on December 6, 2020

Many businesses are looking to take advantage of Elasticsearch’s powerful search capabilities using it in close relationship with existing relational databases. In this context, it’s not rare to use Elasticsearch as a caching layer. At this point, a basic and important need arises which is synchronizing Elasticsearch with the database.

The Impact on Business Formation Because of Covid-19 Coronavirus

The global pandemic has had an enormous impact on large and small businesses alike.

Not only have day-to-day operations had to change for many businesses (e.g. regular sanitation, social distancing), but some are seeing large-scale changes come into effect—and a lot of them may be permanent, such as remote working.

These changes are going to have short and long-term implications for economies across the world. In the United States, one great example of that is in business formation.

For business owners, the way you ultimately decide to form your business is one of the most consequential ones you could possibly make. It determines everything from how you’re taxed and how you seek funding (if you do at all) to the profits you’re able to make and the type of services you’re able to provide to customers.

But with everything that has happened because of the global pandemic, is it the right time to start a business? If so, what’s the best type of business to start in this uncertain period?

That’s what inspired us to write this guide.

We want to go deep into the numbers behind business formations and how COVID-19 has impacted them while giving context to how they’ll impact you. Later, we’ll also give you some resources to help your new business grow, no matter what business formation you choose.

Let’s dive in.

Disclaimer: All of the information we will cover in this article will focus primarily on the United States. Apologies to our international readers! However, if you work with business partners in the United States or you have a client or vendor based here, you will be able to gain a lot more context on the economic and business landscape they’re working in with information and data we’ll provide in this piece.

COVID-19 and Business Formations: 4 Key Pieces of Data

Data is crucial when it comes to your business, helping to guide your business decisions and provide context for the world you’ll be working in.

However, this information only tells part of the story. That’s why we want to give you a few crucial data points about business formation and how COVID-19 has impacted them—as well as reasons for why they’re important.

Data #1: Business formations dropped significantly due to lockdown measures in 2020

In March 2020, the United States was just beginning to come to grips with the fact that the novel coronavirus was a deadly serious issue. When that happened, we saw a rush of new protective measures, as well as mandates from states across the country to lock down and enforce mandatory stay-at-home orders.

When that happened, businesses were forced to make the tough decision to shut their doors, lest they add to the spread of COVID-19. As such, we also saw a significant drop in business formations.

In fact, the United States saw a 20% decrease in new business applications from March 1, 2020 through April 11, 2020 compared to the previous year.

Source: Economic Innovation Group

Data from the United States Census Bureau also discovered that different regions of the country were impacted in different ways.

For example, the northeast region of the country saw a 31% reduction of business registrations, whereas the western region “only” got hit with a 15% reduction. Altogether, the United States saw a bigger drop off in business applications than any other time during the Great Recession of 2008-2009.

This depicts a grim picture of business formations. But, it makes sense—after all, these are grim times. And when the number of applications dropped over a “sustained time period” during the Great Recession, they never rebounded to their pre-recession levels, according to the Economic Innovation Group.

So things looked bad across the board at the beginning of the pandemic in spring 2020. But does that mean things have stayed that grim or will be as bad again? Not necessarily…

Data #2: Business formations bounced back in a big way in 2020

As the year went on and summer arrived, people began to get more confident in applying for businesses. By Q3, the United States saw more business applications than it had in the previous 15 years.

Nearly 1,600,000 businesses applied for formation since the year began!

Source: U.S. Census

By October 2020, we saw an increase in business applications to the tune of 38.5% compared to the same time frame in 2019.

Source: U.S. Census

Altogether, 2020 is on track to be the year with more new, high-propensity business applications than any year in recent history. And that’s even with the drop-off in applications in the spring.

Source: Brookings

There are a few theories to why this is:

  1. Unemployment. Many people lost their jobs in the wake of the pandemic. With no consistent career to go to each day, many might have taken this as an opportunity to start their own business ventures.
  2. Stimulus. The $1,200 stimulus check as well as the Paycheck Protection Program rolled out by Congress in 2020 might have done its job in spurring confidence in entrepreneurs to start their own businesses.
  3. Backlog. Certain states and cities require business applications to go through the courts for approval. When the initial lockdowns happened, that meant that courts needed to be closed as well. When they opened back up, they were likely addressing a big backlog of business applications.
  4. New opportunities. With the pandemic came new needs in the market. Products and services from masks and sanitizers to home deliveries are seeing a boom in consumer demand. Many people might have recognized these demands and gaps in the market, and sought to fulfill it with their own businesses.
  5. Gig economy. This point ties into the first one. There is evidence to suggest that mass unemployment has led to many turning to become independent contractors via services such as Uber, Lyft, Grubhub, and Postmates. Most independent contractors fall under the “sole proprietorship” business formation (though they can be corporations, LLCs, or partnerships, too).

Regardless of the reason, many people should be heartened by the fact that business formations are now on the rise again. In fact, strong business formation numbers are a big indicator for an economy’s growth. It represents more jobs and income for the people within that economy.

Think of the economy right now as a powder keg. Each day, more and more gunpowder (i.e. businesses) gets added to the keg. It’s all waiting for the right time—when the pandemic is over or, at least, when a vaccine is widely available— for us to light it up.

Data #3: Business formations are looking better than the Great Recession

We’ve mentioned the Great Recession already. And it’s a pertinent thing to mention.

The housing market crash of 2008 brought with it a recession that many Americans are still suffering from. We’re seeing a lot of similar impacts, such as mass unemployment and sustained joblessness, due to the current global pandemic.

However, one area where it’s not the same is in business formations. In fact, business formations are doing much better than they were at a comparable time during the Great Recession.

Below is a chart showing the change in business applications through week 45 (November 2-8, 2020):

Source: Economic Innovation Group

In 2008, the United States dropped by 16.4% in business applications. However, in 2020, we saw a 14.3% increase in business applications when compared to the previous year.

One big factor that has helped in this (aside from the four points we outlined above) is because the economic foundation of the country is still pretty good. Housing prices are stable, as are most asset classes.

All things being equal, the United States is in okay shape.

The state of U.S. business formation is like a house that is currently going through a very bad storm. Our windows are broken. A tree crashed through our ceiling. And we probably can’t sleep in a few bedrooms. But the foundations of the building are still good, and we will be able to rebuild once the storm is over.

Data #4: Sole proprietorships are popular (and the pandemic likely made them moreso)

Even before the pandemic hit, sole proprietorships were the most popular type of business formations. That’s due to a combination of how easy it is to start and its lack of double taxation.


Source: Tax Foundation

In fact, you don’t even have to register as a sole proprietorship unless you’re going to conduct business under a different name (i.e., your “Doing Business As” name).

Sole proprietors encompass a lot of different types of businesses. For this data point, we’ll be focusing on freelancers in varying capacities and industries.

Freelancers are often sole proprietors because of how easy it is to get started. You just find a client, fill out a 1099 form, and you’re on your way.

And while we don’t have a lot of hard data on exactly how many sole proprietors have emerged because of the pandemic, we can make educated guesses based on a few factors:

  1. More people are freelancing now than ever before. In fact, 36% of the U.S. workforce is made up of freelancers. That’s an increase of 2 million people since the year before.
  2. Since 2019, freelancers have contributed $1.2 trillion dollars to the U.S. economy. That’s a 22% increase compared to the year before.
  3. 88% of current freelancers say they’re likely to keep freelancing in the future. That means there will likely be more sole proprietorships in the future.

Does this mean you should become a sole proprietor or that sole proprietorships are the best method of business formation? Not necessarily. It’s just an indicator of how people across the country have been coping with the impact of the pandemic.

However, it does tell us that there’s a demand for freelancers out there—especially since the vast majority of current freelancers intend to keep doing it in the future. In fact, 75% of freelancers who quit their full-time job to freelance say they earn more now than they did when they were employed by another entity.

How to Form a Business During a Pandemic

Starting a business in the middle of a pandemic is no small task. Heck, starting a business when we’re not in a pandemic is difficult enough.

However, there are plenty of people starting their own businesses right now to great success. So as long as there is demand for your products or services, there will be business for you.

To that end, here are a few tips for you to keep in mind when forming your business during a pandemic.

If you don’t know where to start, start small

There are five different types of business formations your business can take:

  • Sole proprietorship
  • Limited liability company (LLC)
  • Partnership
  • S-corporation
  • C-corporation

Some of them require you to file the business with your state or city. However, if you don’t have a lot of startup money or if you just aren’t sure where to start, we recommend you start smaller with a sole proprietorship. It’s the simplest type of business formation and it’s the easiest one to start.

You can get started as soon as you find customers. Plus, you don’t have to worry about filing fees or documents to sign (other than your tax documents).

However, a word of caution: Sole proprietorships mean that you are open to liability.

That means if you get sued by a disgruntled client and you lose the lawsuit, you’re going to have to pay for the damages out of your own pocket. That opens up your personal assets for seizure by courts, including your car, house, or savings account.

That might seem scary, but the chances of that happening are very small. So, as long as you provide good service and treat your clients fairly, you shrink the window of risk for that happening.

Starting small also refers to practically every other aspect of your business, including the website, marketing, and the products/services you provide. In fact, to get a business running you really only need a website and a good way for your customers to get into contact with you (which can be a function of your website!).

Go deeper: For a comprehensive list of resources to help you start your business, check out our articles on entrepreneurship.

Find an evergreen business

It’s no secret that many businesses that were thriving before the pandemic are suffering greatly now. From loss of income and letting employees go to catastrophic supply chain troubles, the list is endless.

However, there are plenty of businesses out there that are actually in fine fettle. In fact, there are many that are doing even better than they were before.

Take this chart for example:

Source: McKinsey and Company

As you can see, those that are experiencing the greatest financial risk and impacted the most by the pandemic are industries like food service, transportation, education, and entertainment.

The ones that are doing well are those such as finance and insurance, company management, real estate, healthcare, and construction.

Does this mean that you should run and start up an insurance company right now? Not at all. It’s just an indicator of the type of businesses that are more resilient than others in our current situation. These evergreen industries last a long time and can persist through bad periods like a global pandemic.

If you’re looking for some inspiration, the US Chamber of Commerce provides a great list of business types that thrive during the pandemic. They include:

  • Delivery services. From groceries, to meals, to home goods, delivery services of all stripes are in high demand as people stay at home during lockdowns and for fear of catching COVID-19.
  • Cleaning services. This includes commercial sanitation of offices and other workplaces, along with medical-grade sanitation for medical facilities.
  • Liquor and wine stores. Crack open a cold one with the boys (over Zoom, of course). Alcohol suppliers of all stripes are doing well as people turn to the world’s oldest way of taking the edge off.
  • Virtual tutoring/education. As schools shift to online learning, parents are hiring virtual tutors at a high rate. Also, online courses for adults are seeing a boom as people stay indoors and need a way to occupy their time.
  • Home health services. Looking to avoid clogging up hospitals with non-emergency visits, people are looking to bring healthcare home with home health services. These are medical providers who will consult you online and/or come to your home to assist you. It doesn’t just have to do with physical health either. Mental health providers are also in high demand.

Basically any business that allows your customer to be at home and receive your products or services is a good one for the pandemic.

It’s also worth mentioning that the marijuana industry is also booming right now. With the stress of the pandemic as well as the rise in marijuana legalization, people are turning more and more to Willie Nelson’s favorite pastime. A (legal) startup centered around getting people their jazz cigarettes is one that has the potential to do really well.

(Talk about evergreen business. Am I right?)

Nail your digital marketing

Digital marketing played a big role in modern businesses well before the pandemic. Now, it’s downright essential that you nail all facets of it if you want your business to be discovered and successful.

After all, traditional methods such as subway ads, newspaper ads, and billboards are seeing a dramatic decline due to the pandemic. And while digital advertisements have seen a similar decline, we would argue that it’s more important than ever to know how to position yourself on the internet to draw in more customers.

That’s because when people can’t go out for entertainment, they turn online. If you have a service that they can do from home, your digital marketing efforts will have an impact.

To that end, there are three areas you should focus on to start laying the groundwork for your digital marketing strategy:

  • Know your brand’s story. This is one of the most powerful ways you can win the hearts and wallets of customers. Being able to effectively tell your company’s story is a good way to connect emotionally with your customers. When you connect with them emotionally, they’re going to be more willing to click through, sign up for a newsletter, or purchase a product. Learn more about developing a brand story here.
  • Create your marketing framework. This is the overall system you will be building in order to create a sustainable marketing practice. Remember: Your marketing is more than just one campaign or one funnel. It’s an entire framework you build in order to create a sustainable, scalable revenue engine for your business. After all, you wouldn’t start building a house without the blueprints—why should you jump into marketing without a plan? Learn more about creating a marketing framework here.
  • Find where your customers live. No, I don’t mean literally (unless you want a sweet restraining order). The best way to increase traffic to your website (and, therefore, customers to your business) is by going to where they are online and letting them know you exist. Identify the Facebook groups they like to frequent, the subreddits they subscribe to, or the Quora communities they ask questions on. Of course, that’s not the only way to build web traffic. You can also draw them in by offering great and helpful content on your website using the principles of inbound marketing. Learn more about increasing web traffic here.

Only by developing a good digital marketing strategy can your business succeed in attracting customers in the pandemic age and beyond.

Conclusion

The SARS-CoV-2 pandemic has changed the way we form and conduct business. While there is a lot of pain around, there are also signs of good things to come.

The best thing for you to do is to take action on the things that you can control and ignore all the rest. That means creating a business and positioning it for success.

No matter what type of business you choose, Quicksprout is here with the resources to help you through this time. Remember, we’re all in this together. We want to be there for you when you need us the most.

ASP.NET Core Structured Logging — Introduction

Hi all! In this post, we'll see what's the difference between "standard" and "structured" logging and how the latter can help us tracing down issues in our systems.

But first, let's begin with a question. Ever had to go through countless log messages to find a single tiny entry?