Debug Like a Senior Developer

My book on debugging is already on preorder, and I’m super thrilled to announce I’m doing a full online course to go along with it. The course website isn’t ready yet, but I already have the full outline and a lot of recorded material. I will try to drop videos at a rate of two per week in the next few months until the full course will be online. It’s shaping up to be a very detailed course. I recorded the first module and half of the second module, and I’m already close to three hours of dense recorded material!

I’m publishing the course on a new YouTube channel, and I would very much appreciate likes and subscribes. If you like the video, please subscribe there or to one of the mailing lists, e.g. here, to get notified about new videos and about access to the full course as it becomes available.

Test an IoT Platform With Open-Source Tools

Introduction

The IoT industry is developing explosively. As the scale of endpoints continues to grow and business logic becomes more complex, it is necessary to verify the availability and reliability of the platform when a large number of devices are connected before the IoT platform is officially launched so as to ensure system quality. Therefore, the value and necessity of IoT performance tests are gradually highlighted. If you're delivering services, then testing your IoT system can help you find bottlenecks in performance and help you plan ahead for scalability.

IoT can consist of any number of different devices using diverse protocols strung together with complex integration architecture. This can make it challenging to design effective and meaningful tests for it. This series of articles will take the IoT platform based on EMQX as an example to introduce how to use performance test tools to verify and test platform-related quality indicators.

(Deep) Cloning Objects in JavaScript

Even when you pass an object to a function or method, you are passing this object by reference, not the value.

If you pass (or copy) an object by reference and then change any property, the ‘source’ object’s property also changes.

Sending Sensor Data From Raspberry Pi Pico W to HiveMQ Cloud

In a previous post, "MQTT Messaging With Java and Raspberry Pi," I described how data could be sent from a Raspberry Pi Linux board and Raspberry Pi Pico microcontroller to HiveMQ Cloud.

Raspberry Pi Pico W

On June 30, 2022, Raspberry Pi released a new product: the Pico W, a new version of the original Pico, but with Wi-Fi onboard. The new board is for sale for $6, compared to the $4 of the original Pico. The new Pico W has the same form factor as the original Pico. There is a minor change in the wiring as the connection of the onboard LED has changed. You should be able to swap to the new version in most existing projects without any problems. With this new Pico W, we can simplify the setup of the previous article, as the separate Wi-Fi module is no longer needed.

Using NLP To Uncover Truth in the Age of Fake News and Bots

The modern political landscape is full of division. This is nothing new, and there have always been a number of factors contributing to the cut and thrust of political discourse. But today, political sentiment is influenced by more dynamic and immediate forces that can be used as tools in the information war. Traditional modes of communication, such as print media, political campaigns and advertisements are, of course, still prominent, but the modern information landscape contains the added variables of the web and, more significantly, social media. 

We are now in an age in which sentiment on any number of topics can be uncovered through the analysis of enormous amounts of data, ranging from the traditional, such as polls, election results and expert analysis, to alternative data sets, such as social media platforms. To ensure we get a true picture of any sentiment, however, we must be confident that the information we analyze is credible, which is becoming increasingly difficult to identify. As a data scientist with extensive experience in building sentiment models using natural language processing (NLP), I’d like to share my experience in uncovering the truth in today’s increasingly challenging information landscape. 

Dockerizing a MERN Stack Web Application

The MERN stack is becoming increasingly popular and could be a powerful stack to figure in. Therefore having the ability to build and deploy good MERN applications, greatly helps career prospects as a developer.

What Is the MERN Stack?

The MERN stack is a JavaScript stack that is designed to make the development process smoother. MERN includes four open-source components: MongoDB, Express, React, and Node.js. These components offer an associate end-to-end framework for developers to work in.

Recruitment Strategies Starter Guide: Learn the Basics

When hiring for your company, having a recruitment strategy brings in more qualified candidates. It saves you time and money while increasing efficiency among your hiring staff and helping you find the right applicants sooner. You need a recruitment strategy tailored to your company, so knowing how to create one by using the right tools and taking the right steps is vital to how your hiring process will go.

What Are Recruitment Strategies?

A recruitment strategy is a hiring plan that works to target and attract your ideal candidates for the role. It opens more opportunities to hire exceptional talent that fits your business needs and company culture.

The right recruitment strategy varies based on your business and hiring goals. Your strategy should lay out important parts of the hiring process to clearly define the role you’re hiring for, where you want to post the position, when to list the job online, and how you’ll evaluate each candidate. A recruitment strategy works to standardize the hiring process so that all candidates and criteria get evaluated equally.

A screenshot showing a heading on the left that reads “Recruit quality candidates with Zoho’s all-in-on talent acquisition solution” with text and buttons to sign up or request a demo below. On the right is a person sitting cross-legged with a laptop on one knee, a crown drawn on their head, and a steaming drink at their side.
Zoho Recruit is an asset to your recruitment strategy as a powerful ATS.

The same recruitment strategy won’t work for every business, so it’s important to take the elements that benefit yours most and use them to your advantage. For example, you’ll want to consider which platforms and methods work best for finding candidates in your industry.

Many recruitment strategies involve hiring a contract recruiter as an expert who knows where and how to find the right people for your company. You can also use recruiting software, like Zoho Recruit, to make the process even easier.

A good recruitment strategy will connect you with passive candidates and let them know you need their skills and talents. It will also attract high-quality applicants who are actively searching for positions like the one you’re hiring for. Instead of throwing your posting into the void, a recruitment strategy customizes your hiring process.

Benefits of Having a Recruitment Strategy

You’ll see immediate benefits throughout the hiring process with a proactive recruitment strategy. The right one will drastically cut down the time you spend searching for qualified candidates, as well as the time spent on repetitive tasks like sorting resumes.

Because you will have more accurate knowledge of which candidates fit your company, you’ll spend less time conducting interviews. You’ll likely have to interview fewer candidates before you find a good fit. By clarifying the role and your expectations in the job posting early on, your candidates will come in with a better understanding of what you want, leading to better communication during your interviews.

A screenshot showing a header on the left that reads “Find talent and let talent find you” with text beneath it against a white background. On the left are colorful bubbles with portraits of three different people in them.
Zoho finds your talent fast with its advanced recruitment tools.

Along with greater efficiency, you’ll have more successful interviews that give you a better idea of which candidates have the most experience and compatibility with the position and company. You can also ask better questions, evaluate candidates more accurately, and set clearer expectations.

A recruitment strategy gives you access to more candidates in niche spaces to create more lasting connections. For example, if you connect with prospects at a job fair and they sign up for your newsletter, they are more likely to remember you when you’re hiring for another position.

Perhaps most importantly, you make better hiring decisions. As a result, your recruitment strategy has the lasting benefit of employee retention. When you hire an employee who is a good fit, they stay with the company longer because they know what to expect when they accept the job.

Recruitment strategies help you hire new talent faster and prevent other employees from burning out. That means those employees are also more likely to stay with your company. You create an environment where employees feel valued by fulfilling their expectations and being consistent with your processes, including hiring.

What You Need to Get Started with Your Recruitment Strategy

Whether you hire a contract recruiter or keep things internal, recruiting software helps you keep track of what you post, where you post it, and when you posted it. Zoho Recruit is a great Applicant Tracking System (ATS) that shows your progress and organizes the hiring process.

Zoho Recruit shows you who’s applied, where they are in the process, their skills, and other relevant information. This becomes an asset when you have a lot of applicants, as it saves time for hiring staff and improves productivity.

A screenshot showing a header in the top left corner that reads “Hiring Pipeline” with text below it. On the bottom right are several tabs representing different parts of the hiring process with a table beneath to show how many applicants are at these different stages.
Zoho Recruit has tools to kickstart your hiring process, no matter what stage you’re at.

When you first create your recruitment strategy, determine your hiring needs before anything else. This gives you insight into what you should put in the job listing, helps you find the best job boards, and leads you to the most qualified candidates. You’ll want to include the hours, salary, benefits, and duties for the position, along with relevant company information and anything else your candidates need to know before they apply. Have this information on hand when you speak to potential contract recruiters, too.

Make sure you choose the right contract recruiting firm if you go this route—and it does benefit you to work with an expert. Each firm has different niches and specialties within those niches. Choosing the best fit not only for your industry but for your company is a game changer.

How to Find the Right Software for Recruitment

A good ATS helps you process applicants more efficiently and shows you the best ones based on the skills you’re hiring for. It keeps your applicants organized in its system, sorts resumes, and tracks the interview process for each person.

Your recruiting software should simplify your hiring process and solve the problems you spend the most time correcting manually, like resume screening. It should also integrate seamlessly with other tools you use in order to streamline the process. 

A screenshot showing a header on the left that reads “Sharpen your social recruiting game” with text and statistics below. On the right are layered bubbles depicting different job titles and locations below various social media logos.
Zoho Recruit makes it easy to meet your candidates where they’re at online with social media recruiting tools.

When searching for the best software for recruiting, consider a solution that helps you source applicants, increases candidate engagement, and keeps candidates informed during the hiring process. You’ll want a system that can screen applicants and resumes to help you choose the most qualified candidates to interview. Some software even manages the actual hiring stages for new employees.

Zoho Recruit is one of the best ATS solutions to support your recruitment strategy. It keeps track of everything for you with features that keep you and your candidates in the loop. With its more advanced packages, you can also send out job offer letters, organize onboarding paperwork, and generate reports for your hiring process.

Zoho Recruit has a Standard package for $25 per user per month, and you can upgrade with a $25 jump in price to its Professional and Enterprise plans. Standard has plenty of hiring resources to make the process more efficient, including candidate sourcing and resume management. It also integrates well with other platforms for a cohesive candidate search.

The more advanced plans add more in-depth capabilities, including portal management, candidate assessments, and custom functions. It’s designed to bring in more qualified candidates, so you hire the cream of the crop.

Best Strategies for Recruitment

Not all recruitment strategies work for every company. For example, a business looking for a manager at an IT company will probably need to use a different approach than a biotech company hiring for an entry-level lab position.

A contract recruiter can help you determine the best places to search for your candidates and the right approach for your specific company. The best recruitment strategies involve combining a few different tactics for a comprehensive approach.

Before you post your job, create a description that stands out among the others in your field. Have a specific job title that interests applicants while immediately offering basic relevant information about the position.

A screenshot showing a header on the left that reads “Impact the world” with text beneath it. On the right is a person wearing virtual reality goggles and tapping a cube with colorful circles inside it.
Zoho Recruit has solutions to tailor your recruitment strategy to your industry.

Write an overview of the position that provides information about your company and the role you’re hiring for. Don’t forget to include the core responsibilities and expectations of the role. Many applicants also want to know about the company culture, so be sure to include that, too, as it narrows the playing field and encourages people who want to work in that environment to apply.

Use social media to find applicants on LinkedIn, Twitter, or Instagram. Your strategy should also include checking resumes that potential candidates have posted online. Look at people who are already working in similar roles, and circle back to past candidates if you had applicants that weren’t right for other positions.

You should claim your company page on sites like Indeed to demonstrate engagement and a more official presence. Attend industry meetings and events, such as job fairs, where you’ll find more candidates looking for work in your field.

Lastly, your presence as a company matters even while you’re interviewing. It’s not just about having an official stamp online.

When your candidates come in to interview, treat them like you want them there. Be enthusiastic, respectful, and hospitable. Offer your contact information at the end, so they can reach out with questions during the hiring process, especially if you invite them to take further steps. Covering all your bases with a recruitment strategy means you’re more likely to see success faster and spend less time searching for your ideal employee.

Recruitment Strategy Trends

As with the job market itself, recruiting goes through trends over time. What worked for your company a few years ago may not be as effective now, and it’s important to research these trends—or hire someone who knows them—before you start recruiting. Catering to these trends makes the hiring process faster and shows more applicants your posts.

Right now, recruitment marketing matters. We touched upon it in the last section, but this strategy essentially uses broad marketing strategies, like social media and SEO, to attract and find ideal candidates while enticing them to apply to your company or organization. More employers today are targeting younger generations, too, which means meeting those people where they are online and in the world.

A screenshot showing a header that reads “Targeted recruitment demands targeted solutions.” Below the header are two images, each taking up half the space. On the left is a blue box that reads “For Staffing Agencies” with a hand holding pages with portraits on them. On the right is a peach-colored box that reads “For Internal HR Teams.” It shows two people’s hands clasped. One hand is coming out of the middle of a page.
Zoho Recruit works for staffing agencies and HR teams to keep up with changing recruiting trends.

Companies are also implementing more practices that will attract employees, including remote work opportunities, flexible schedules, and payroll, and using virtual, AR, and AI technology to onboard, train, and support employees in their work. More employers have shifted their focus to ethical leadership, inclusion, and equity in the workplace. This shows many applicants which companies they may feel safer and more comfortable working for as they devote attention to employee needs. Throughout the pandemic, the gig economy boomed, so more companies are now hiring for project-based work, too.

Paying attention to these recruitment strategy trends and how they evolve will keep you ahead of competitors so that more people see your jobs and apply. Using recruiting software like Zoho Recruit is vital to keeping up with these trends, and it’s part of the supportive technology more companies are adopting.

Zoho Recruit helps you sort applications, automate hiring tasks, and directs you to the best candidates who then become star employees. While some people view technology as detrimental to the workforce, platforms like Zoho Recruit make a difference in hiring the right talent where it’s needed and take the guesswork out of the hiring equation.

How to Know if Your Recruitment Strategies Are Successful

If your recruitment strategies succeed, you’ll see it in your hiring efficiency, candidate quality, and even employee retention. Your hiring team will spend less time screening and filtering resumes, in part thanks to software like Zoho Recruit that does it for you. This software is one of the easiest changes you can make to improve your recruitment strategy, and it will help beyond the hiring process.

With a more tailored recruitment strategy, you’ll see more qualified candidates who suit the role and your company or organization culture come through. The hiring process will feel less like a drag and more like you’re making real progress on your search based on your candidates and interviews.

A screenshot where the left side are two pages with portraits and lines indicating text on them. They are stamped with a smiley face and have four stars above them. A hand is holding one page. On the right is a header that reads “Benefits of a robust recruitment solution” with benefits listed below.
Zoho Recruit is a comprehensive recruitment strategy solution that leads your hiring team to success.

Hiring candidates best suited to the position increases the likelihood of the employees you hire staying with your company. As a result, you have to hire for fewer positions and less often, as employees feel they fit their roles and your company meets their expectations.

It saves your business money when you spend less of it on recruitment, and you free up more time for your employees to work on more important tasks. You pay less to keep your job on job boards and have fewer expenses related to hiring new employees when the same ones stick around for years.

Final Thoughts about Recruitment Strategies

Recruitment strategies take your hiring process to the next level by showing your job postings to the right candidates and making it easier to seek out high-quality applicants. They bring in more qualified employees, make the hiring process more efficient, and boost employee retention when your strategies target the right people. Plus, with some simple changes, including using recruiting software like Zoho Recruit, you can transform your hiring process immediately.

Implementing a recruiting strategy means researching current recruiting trends, doing recruitment marketing, and sometimes hiring a contract recruiter, especially if you don’t have in-house staff dedicated to these tasks. A recruitment strategy will save your business time and money while allowing your staff to focus on other tasks. It works to make your hiring process and your business more cohesive while putting you ahead of your competition.

Synchronizing Basic Product Data From MySQL With DolphinDB Cached Tables

DolphinDB is a high-throughput distributed time-series database, specially designed for big data analysis scenarios in industrial IoT (IIOT) and finance.

Data analysis in DolphinDB is often conducted based on the basic product information (such as the SKU, size, and storage of a device) from an external business platform, which conventionally runs on a relational database. To associate external product information with the time series data in DolphinDB, you can use the cached tables to save the external data fetched through plugins (MySQLMongoDB, CSV file, etc.) in memory with regular synchronizations.

CSS Infinite Slider Flipping Through Polaroid Images

In the last article, we made a pretty cool little slider (or “carousel” if that’s what you prefer) that rotates in a circular direction. This time we are going to make one that flips through a stack of Polaroid images.

Cool right? Don’t look at the code quite yet because there’s a lot to unravel. Join me, will ya?

CSS Sliders series

The basic setup

Most of the HTML and CSS for this slider is similar to the circular one we made last time. In fact, we’re using the exact same markup:

<div class="gallery">
  <img src="" alt="">
  <img src="" alt="">
  <img src="" alt="">
  <img src="" alt="">
</div>

And this is the basic CSS that sets our parent .gallery container as a grid where all the images are stacked one on top of one another:

.gallery  {
  display: grid;
  width: 220px; /* controls the size */
}
.gallery > img {
  grid-area: 1 / 1;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 10px solid #f2f2f2;
  box-shadow: 0 0 4px #0007;
}

Nothing complex so far. Even for the Polaroid-like style for the images, all I’m using is some border and box-shadow. You might be able to do it better, so feel free to play around with those decorative styles! We’re going to put most of our focus on the animation, which is the trickiest part.

What’s the trick?

The logic of this slider relies on the stacking order of the images — so yes, we are going to play with z-index. All of the images start with the same z-index value (2) which will logically make the last image on the top of the stack.

We take that last image and slide it to the right until it reveals the next image in the stack. Then we decrease the image’s z-index value then we slide it back into the deck. And since its z-index value is lower than the rest of the images, it becomes the last image in the stack.

Here is a stripped back demo that shows the trick. Hover the image to activate the animation:

Now, imagine the same trick applied to all the images. Here’s the pattern if we’re using the :nth-child() pseudo-selector to differentiate the images:

  • We slide the last image (N). The next image is visible (N - 1).
  • We slide the next image (N - 1). The next image is visible (N - 2)
  • We slide the next image (N - 2). The next image is visible (N - 3)
  • (We continue the same process until we reach the first image)
  • We slide the first image (1). The last image (N) is visible again.

That’s our infinite slider!

Dissecting the animation

If you remember the previous article, I defined only one animation and played with delays to control each image. We will be doing the same thing here. Let’s first try to visualize the timeline of our animation. We will start with three images, then generalize it later for any number (N) of images.

Diagramming the three parts of the animation.

Our animation is divided into three parts: “slide to right”, “slide to left” and “don’t move”. We can easily identify the delay between each image. If we consider that the first image starts at 0s, and the duration is equal to 6s, then the second one will start at -2s and the third one at -4s.

.gallery > img:nth-child(2) { animation-delay: -2s; } /* -1 * 6s / 3 */
.gallery > img:nth-child(3) { animation-delay: -4s; } /* -2 * 6s / 3 */

We can also see that the “don’t move” part takes two-thirds of the whole animation (2*100%/3) while the “slide to right” and “slide to left” parts take one-third of it together — so, each one is equal to 100%/6 of the total animation.

We can write our animation keyframes like this:

@keyframes slide {
  0%     { transform: translateX(0%); }
  16.67% { transform: translateX(120%); }
  33.34% { transform: translateX(0%); }
  100%   { transform: translateX(0%); } 
}

That 120% is an arbitrary value. I needed something bigger than 100%. The images need to slide to the right away from the rest of the images. To do that, it needs to move by at least 100% of its size. That’s why I went 120% — to gain some extra space.

Now we need to consider the z-index. Don’t forget that we need to update the image’s z-index value after it slides to the right of the pile, and before we slide it back to the bottom of the pile.

@keyframes slide {
  0%     { transform: translateX(0%);   z-index: 2; }
  16.66% { transform: translateX(120%); z-index: 2; }
  16.67% { transform: translateX(120%); z-index: 1; } /* we update the z-order here */
  33.34% { transform: translateX(0%);   z-index: 1; }
  100%   { transform: translateX(0% );  z-index: 1; }  
}

Instead of defining one state at the 16.67% (100%/6) point in the timeline, we are defining two states at nearly identical points (16.66% and 16.67%) where the z-index value decreases before we slide back the image back to the deck.

Here’s what happens when we pull of all that together:

Hmmm, the sliding part seems to work fine, but the stacking order is all scrambled! The animation starts nicely since the top image is moving to the back… but the subsequent images don’t follow suit. If you notice, the second image in the sequence returns to the top of the stack before the next image blinks on top of it.

We need to closely follow the z-index changes. Initially, all the images have are z-index: 2. That means the stacking order should go…

Our eyes 👀 --> 3rd (2) | 2nd (2) | 1st (2)

We slide the third image and update its z-index to get this order:

Our eyes 👀 --> 2nd (2) | 1st (2) | 3rd (1)

We do the same with the second one:

Our eyes 👀 --> 1st (2) | 3rd (1) | 2nd (1)

…and the first one:

Our eyes 👀 --> 3rd (1) | 2nd (1) | 1st (1)

We do that and everything seems to be fine. But in reality, it’s not! When the first image is moved to the back, the third image will start another iteration, meaning it returns to z-index: 2:

Our eyes 👀 --> 3rd (2) | 2nd (1) | 1st (1)

So, in reality we never had all the images at z-index: 2 at all! When the images aren’t moving (i.e., the “don’t move” part of the animation) the z-index is 1. If we slide the third image and update its z-index value from 2 to 1, it will remain on the top! When all the images have the same z-index, the last one in the source order — our third image in this case — is on top of the stack. Sliding the third image results in the following:

Our eyes 👀 --> 3rd (1) | 2nd (1) | 1st (1)

The third image is still on the top and, right after it, we move the second image to the top when its animation restarts at z-index: 2:

Our eyes 👀 --> 2nd (2) | 3rd (1) | 1st (1)

Once we slide it, we get:

Our eyes 👀 --> 3rd (1) | 2nd (1) | 1st (1)

Then the first image will jump on the top:

Our eyes 👀 --> 1st(2) | 3rd (1) | 2nd (1)

OK, I am lost. All the logic is wrong then?

I know, it’s confusing. But our logic is not completely wrong. We only have to rectify the animation a little to make everything work the way we want. The trick is to correctly reset the z-index.

Let’s take the situation where the third image is on the top:

Our eyes 👀 -->  3rd (2) | 2nd (1) | 1st (1)

We saw that sliding the third image and changing its z-index keeps it on top. What we need to do is update the z-index of the second image. So, before we slide the third image away from the deck, we update the z-index of the second image to 2.

In other words, we reset the z-index of the second image before the animation ends.

Diagramming the parts of the animation with indicators for where z-index is increased or decreased.

The green plus symbol represents increasing z-index to 2, and the red minus symbol correlates to z-index: 1. The second image starts with z-index: 2, then we update it to 1 when it slides away from the deck. But before the first image slides away from the deck, we change the z-index of the second image back to 2. This will make sure both images have the same z-index, but still, the third one will remain on the top because it appears later in the DOM. But after the third image slides and its z-index is updated, it moves to the bottom.

This two-thirds through the animation, so let’s update our keyframes accordingly:

@keyframes slide {
  0%     { transform: translateX(0%);   z-index: 2; }
  16.66% { transform: translateX(120%); z-index: 2; }
  16.67% { transform: translateX(120%); z-index: 1; } /* we update the z-order here */
  33.34% { transform: translateX(0%);   z-index: 1; }
  66.33% { transform: translateX(0%);   z-index: 1; }
  66.34% { transform: translateX(0%);   z-index: 2; } /* and also here */
  100%   { transform: translateX(0%);   z-index: 2; }  
}

A little better, but still not quite there. There’s another issue…

Oh no, this will never end!

Don’t worry, we are not going to change the keyframes again because this issue only happens when the last image is involved. We can make a “special” keyframe animation specifically for the last image to fix things up.

When the first image is on the top, we have the following situation:

Our eyes 👀 -->  1st (2) | 3rd (1) | 2nd (1)

Considering the previous adjustment we made, the third image will jump on the top before the first image slides. It only happens in this situation because the next image that moves after the first image is the last image which has a higher order in the DOM. The rest of the images are fine because we have N, then N - 1, then we go from 3 to 2, and 2 to 1… but then we go from 1 to N.

To avoid that, we will use the following keyframes for the last image:

@keyframes slide-last {
  0%     { transform: translateX(0%);   z-index: 2;}
  16.66% { transform: translateX(120%); z-index: 2; }
  16.67% { transform: translateX(120%); z-index: 1; } /* we update the z-order here */
  33.34% { transform: translateX(0%);   z-index: 1; }
  83.33% { transform: translateX(0%);   z-index: 1; }
  83.34% { transform: translateX(0%);   z-index: 2; } /* and also here */
  100%   { transform: translateX(0%);   z-index: 2; }
}

We reset the z-index value 5/6 through the animation (instead of two-thirds) which is when the first image is out of the pile. So we don’t see any jumping!

TADA! Our infinite slider is now perfect! Here’s our final code in all its glory:

.gallery > img {
  animation: slide 6s infinite;
}
.gallery > img:last-child {
  animation-name: slide-last;
}
.gallery > img:nth-child(2) { animation-delay: -2s; } 
.gallery > img:nth-child(3) { animation-delay: -4s; }

@keyframes slide {
  0% { transform: translateX(0%); z-index: 2; }
  16.66% { transform: translateX(120%); z-index: 2; }
  16.67% { transform: translateX(120%); z-index: 1; } 
  33.34% { transform: translateX(0%); z-index: 1; }
  66.33% { transform: translateX(0%); z-index: 1; }
  66.34% { transform: translateX(0%); z-index: 2; } 
  100% { transform: translateX(0%); z-index: 2; }
}
@keyframes slide-last {
  0% { transform: translateX(0%); z-index: 2; }
  16.66% { transform: translateX(120%); z-index: 2; }
  16.67% { transform: translateX(120%); z-index: 1; }
  33.34% { transform: translateX(0%); z-index: 1; }
  83.33% { transform: translateX(0%); z-index: 1; }
  83.34% { transform: translateX(0%); z-index: 2; } 
  100%  { transform: translateX(0%); z-index: 2; }
}

Supporting any number of images

Now that our animation works for three images, let’s make it work for any number (N) of images. But first, we can optimize our work a little by splitting the animation up to avoid redundancy:

.gallery > img {
  z-index: 2;
  animation: 
    slide 6s infinite,
    z-order 6s infinite steps(1);
}
.gallery > img:last-child {
  animation-name: slide, z-order-last;
}
.gallery > img:nth-child(2) { animation-delay: -2s; } 
.gallery > img:nth-child(3) { animation-delay: -4s; }

@keyframes slide {
  16.67% { transform: translateX(120%); }
  33.33% { transform: translateX(0%); }
}
@keyframes z-order {
  16.67%,
  33.33% { z-index: 1; }
  66.33% { z-index: 2; }
}
@keyframes z-order-last {
  16.67%,
  33.33% { z-index: 1; }
  83.33% { z-index: 2; }
}

Way less code now! We make one animation for the sliding part and another one for the z-index updates. Note that we use steps(1) on the z-index animation. That’s because I want to abruptly change the z-index value, unlike the sliding animation where we want smooth movement.

Now that the code is easier to read and maintain, we have a better view for figuring out how to support any number of images. What we need to do is update the animation delays and the percentages of the keyframes. The delay are easy because we can use the exact same loop we made in the last article to support multiple images in the circular slider:

@for $i from 2 to ($n + 1) {
  .gallery > img:nth-child(#{$i}) {
    animation-delay: calc(#{(1 - $i)/$n}*6s);
  }
}

That means we’re moving from vanilla CSS to Sass. Next, we need to imagine how the timeline scale with N images. Let’s not forget that the animation happens in three phases:

Showing the three parts of the animation in a series of lines with arrows.

After “slide to right” and “slide to left”, the image should stay put until the rest of the images go through the sequence. So the “don’t move” part needs to take the same amount of time as (N - 1) as “slide to right” and “slide to left”. And within one iteration, N images will slide. So, “slide to right” and “slide to left” both take 100%/N of the total animation timeline. The image slides away from the pile at (100%/N)/2 and slides back at 100%/N .

We can change this:

@keyframes slide {
  16.67% { transform: translateX(120%); }
  33.33% { transform: translateX(0%); }
}

…to this:

@keyframes slide {
  #{50/$n}%  { transform: translateX(120%); }
  #{100/$n}% { transform: translateX(0%); }
}

If we replace N with 3, we get 16.67% and 33.33% when there are 3 images in the stack. It’s the same logic with the stacking order where we will have this:

@keyframes z-order {
  #{50/$n}%,
  #{100/$n}% { z-index: 1; }
  66.33% { z-index: 2; }
}

We still need to update the 66.33% point. That’s supposed to be where the image resets its z-index before the end of the animation. At that same time, the next image starts to slide. Since the sliding part takes 100%/N, the reset should happen at 100% - 100%/N:

@keyframes z-order {
  #{50/$n}%,
  #{100/$n}% { z-index: 1; }
  #{100 - 100/$n}% { z-index: 2; }
}

But for our z-order-last animation to work, it should happen a bit later in the sequence. Remember the fix we did for the last image? Resetting the z-index value needs to happen when the first image is out of the pile and not when it starts sliding. We can use the same reasoning here in our keyframes:

@keyframes z-order-last {
  #{50/$n}%,
  #{100/$n}% { z-index: 1; }
  #{100 - 50/$n}% { z-index: 2; }
}

We are done! Here’s what we get when using five images:

We can add a touch of rotation to make things a bit fancier:

All I did is append rotate(var(--r)) to the transform property. Inside the loop, --r is defined with a random angle:

@for $i from 1 to ($n + 1) {
  .gallery > img:nth-child(#{$i}) {
    --r: #{(-20 + random(40))*1deg}; /* a random angle between -20deg and 20deg */
  }
}

The rotation creates small glitches as we can sometimes see some of the images jumping to the back of the stack, but it’s not a big deal.

Wrapping up

All that z-index work was a big balancing act, right? If you were unsure how stacking order work before this exercise, then you probably have a much better idea now! If you found some of the explanations hard to follow, I highly recommend you to take another read of the article and map things out with pencil and paper. Try to illustrate each step of the animation using a different number of images to better understand the trick.

Last time, we used a few geometry tricks to create a circular slider that rotates back to the first image after a full sequence. This time, we accomplished a similar trick using z-index. In both cases, we didn’t duplicate any of the images to simulate a continuous animation, nor did we reach for JavaScript to help with the calculations.

Next time, we will make 3D sliders. Stay tuned!


CSS Infinite Slider Flipping Through Polaroid Images originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter.

Simplifying A/B/n Testing of Backend Services

A/B/n testing, or split testing, is a testing process by which user traffic is randomly distributed between two or more versions of an application (or application component). Business metrics are evaluated to identify a winning version —  the version which results in the greater profit or business value. For example, a shopping application might use revenue and user engagement as business metrics.

We focus on A/B/n testing of backend services deployed in Kubernetes. For example, in the figure below, the frontend might be a Node.js based online store. It relies on a backend recommendation service to make product suggestions to users. We are interested in A/B/n testing multiple versions of the recommendation service. In the figure, we have two versions, v1 (the current or default version) and v2 (the candidate version). 

The State of Deepfakes in Cyber Attacks

AI-generated deepfake content is all over the internet today and is getting harder to spot. These fake photos, videos, or audio clips can feature real and fictional people. Hackers and scammers have begun using this technology in elaborate cyber attack campaigns, from phishing attacks to interfering in national security matters. Here is a look at what deepfakes are, how they are made, and how AI systems are fighting deepfake cyber attacks.

What Are Deepfakes?

Deepfakes are heavily-doctored fraudulent video or audio clips that closely match a real person’s appearance, voice, intonation, and speaking patterns. Typically, the deepfake creator will use a machine learning algorithm to train an AI system using numerous video and audio samples. The AI essentially becomes an expert on the subject’s mannerisms to such a degree that it can create a believable fake clip of the person saying or doing things they have never actually done.

Secure Shell Protocol: Everything You Need to Know

Secure shell is a common term often used when studying computer networks. In simple terms, SSH secure shell refers to a secured network protocol that helps access remote computers securely in a network. However, it is much more complicated than it sounds.

So in this blog, we will study all about secure shell protocol. Also, we will explore its working, its concepts, and the mechanisms it leverages for safe remote access. Let us start!

How to insert my ip into database PHP

I am trying to insert the current time() and $_SERVER['REMOTE_ADDR']; into my database
I have this code

<?php
    require_once("../core/core.php");

    $user_time = time();
    $ip = $_SERVER['REMOTE_ADDR'];
    $sql = "SELECT * FROM userinfo WHERE ip = $ip";
    $result = $conn->query($sql);

    if(!$result) {
        trigger_error('Wrong SQL: ' . $sql . ' Error: ' . $conn->error, E_USER_ERROR); <-- line 10
        echo "Database connection failed.";
    } else {
        if($result->num_rows == 0){
            trigger_error('Wrong SQL: ' . $sql . ' Error: ' . $conn->error, E_USER_ERROR);

            $sql = "INSERT INTO userinfo (ip, time) VALUES ('$ip', '$user_time')";
            $conn->query($sql);
            echo "IP ADDRESS SAVED successfully";
        } else if($result->num_rows >= 1) {
            $sql = "UPDATE userinfo SET time = '$user_time' WHERE `ip` = '$ip'";
            $conn->query($sql);
            echo "IP ADDRESS UPDATED successfully";
        }
    }
?>

But i get an error Fatal error: Wrong SQL: SELECT * FROM userinfo WHERE ip = my_real_ip Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '.103.25' at line 1 in /home/appunloc/domain/folder/index.php on line 10

14 Best Team Communication Tools for Small Business (2022)

Are you looking for the best team communication tools for your small business?

As businesses move to remote work, they need tools to communicate with team members. Choosing the right tools can boost productivity, enhance morale, build community, and enhance efficiency among your team.

In this article, we have hand-picked some of the best team communication tools for small businesses.

These tools are based on our hands-on experience because we have been a remote company since we started in 2009, and now we have over 200+ team members across 45 different countries. As a remote company, our teams use several of these tools to collaborate.

Communicatiion tools for small businesses

How to Choose The Best Team Communication Tool for Your Business?

There is a growing need for better team communication tools as more and more businesses adapt remote and hybrid work culture.

For a small business website, these tools improve employee communication and enable them to work more efficiently.

However, there are just so many different communication tools available that it becomes hard to decide which one to choose without spending too much money.

First, you need to decide what kind of tools your team needs to work better.

For instance, if your sales team needs to make calls and follow up on leads, then you need a virtual business phone system like Nextiva and RingCentral.

Similarly, if you need to make sure that teams can collaborate on different projects, track progress, and get work done, then Slack + Asana may be the right tools for your business

You can save money by not opting for separate tools for the same tasks.

For instance, if you are using Google Workspace, then Google Meet is the perfect alternative to Zoom. Similarly, Office 365 with Microsoft Teams will save money on Slack + Zoom.

Tip: See our comparison of Google Workspace vs Office 365 to see how they stack up against each other.

1. Nextiva

Nextiva - Best Business Phone Service

Nextiva is the best omnichannel communication toolkit for businesses. It combines phone, chat, audio/video meetings, contact management, and more in one communication suite.

Employees can collaborate via chat, SMS, and video calls. Their business phone service offers toll-free numbers and teams can share the same phone numbers to easily manage contacts and leads.

Nextiva offers easy-to-use automated reminders for teams and customers around forgotten tasks, follow-ups, or check-ins to increase workplace productivity.

Plus, it integrates with popular calendars, email, Google Workspace, Microsoft teams, and many more.

We use Nextiva in our own business because it helps us get a virtual business phone number that can be shared across our team members, so we can help our customers. The auto-attendant feature helps guide the call to the right person.

Pricing: $18.95 per user per month

2. Slack

Slack

Slack is the most popular small business team communication tool on the market right now.

It is used by many Fortune 500 companies like IBM, T-Mobile, NASA, Target, and more.

Slack offers a digital HQ for businesses and teams. You can organize your virtual workspace in channels. These are chatrooms where your teams can collaborate and post updates. Team members can also do 1:1 chats.

Slack also comes with audio calls, video updates, and integration with almost all top productivity tools, CRM software, virtual phone services, and more.

We use Slack in our management company, Awesome Motive, because it allows for asynchronous communication across teams. Slack has notification features that respect timezones considering we have team members in 45 different countries.

Pricing: Paid plans start from $7.25 per user per month.

3. Google Workspace

Google Workspace

Google Workspace is Google’s business productivity suite of applications. It includes Google Drive, Gmail, Calendar, Google Meet, Chat, Forms, Sites, and more.

You can use your own domain name for your Google Workspace account and create a professional business email address for yourself, your teams, and your employees.

Your team space will be hosted on Google’s cloud infrastructure which makes it very fast, reliable, and an extremely secure internal communication tool.

We have been using Google Workspace for over a decade for our business email address. It gives you the familiar Gmail and Google calendar interface which your team will love. We use the Shared Drive feature for cloud storage which is really good for access control on documents & files.

This year the quality of Google Meet calls have improved drastically, so we have cancelled our Zoom subscription and are using Google Meet for our group meetings.

Pricing: Starting at $6 per user per month

4. HubSpot

HubSpot

HubSpot is a business communication suite that offers a Sales platform, marketing tools, CRM software, and more.

It allows your teams to easily manage leads and customers using a robust dashboard. Improving communications between team members and customers to ensure that nothing slips through the cracks.

Unlike other communication tools on the list, HubSpot doesn’t offer team chat, audio, or video calls. However, as sales software it allows sales and marketing teams to communicate and work together more efficiently.

We use HubSpot to organize our partnership contacts, and it acts as a single source for our various teams.

Pricing: Limited free account, paid plans for marketing, sales, and customer services software with different pricing for each.

5. Asana

Asana

Asana is the best project management software for remote teams on the market.

For remote teams, keeping up with their projects and goals is where most communication takes place. Asana makes it super easy for teams of all shapes, sizes, and industries to collaborate and communicate.

Asana doesn’t have chat, SMS, or video conferencing features. All team communication takes place in comments, tasks, projects, and forms. Each task can have its own thread and nothing slips through the cracks.

You can organize work among teams and projects, set long-term goals, add tasks, and then view them in lists, timeline, or card views.

It comes with brilliant tools like templates, rules, forms, and approvals to automate the workflow.

Plus, it integrates beautifully with other popular productivity tools your organization may already be using.

In our business, Asana is an absolute must have. We have tried many other project management solutions like Basecamp, Trello, etc and nothing comes close to Asana. It has provided us with a great way to streamline our internal workflows while giving greater visibility on the progress of each project.

Pricing: Free and paid plans start at $10.99 per user per month.

6. RingCentral

RingCentral

RingCentral is one of the top business team communication toolkits available that offers virtual phone numbers, phone calls, and SMS for teams.

Their business communication suite includes phone, SMS, Fax, Messaging for internal team communications, and video meetings.

For sales and marketing teams they offer rich insights, quality of service reports, comprehensive alerts, and customizable dashboards.

Integrations are also available for Google Workspace, Office 365, popular CRM software, and marketing platformss.

Pricing: Starts at $19.99 per user per month.

7. Microsoft Teams

Microsoft Teams

Microsoft Teams is the Slack alternative created by Microsoft. It supportss multiple teams, channels, one on one chats, private channels, audio/video calls, and video conferencing features.

It works well with Office 365 and you can get it with Office 365 subscription as well. Team members can open, edit, and view files within teams and projects.

Microsoft Teams have superior video conferencing features baked in. Each team member can view that a video conference is happening with an icon on the top and can join in if they are invited.

Teams also have shift management feature which allows managers to create shift, manage time-offs, assign members to shifts, and more.

Pricing: Free and paid plans start $4 per user per month or $6 per user per month with Office 365.

8. Zoom

Zoom

Zoom is one of the most popular video conferencing software on the market. It allows you to run video meetings with chat feature.

It is widely used in business, education, government, and finance sector. Zoom also offers business phone services, mail, and calendar to connect your teams under one platform.

We were big users of Zoom, but as the quality of Google Meet has improved, we have switched away from Zoom to reduce costs in our business.

The cost of Zoom really adds up once you go above 10 users in your organization, and then again when your organization grows to 100+ users.

What Zoom is really good for is large 100+ people meeting especially if you want to do random breakout rooms. It’s also really good for customer webinars because Zoom calls are very reliable and quality is top-notch.

Pricing: Limited Free plan, paid plans start at $149 per user per year but the per user pricing increases after 10 users.

9. Chanty

Chanty

Chanty is another excellent employee communication platform with video conferencing, chat, and project management features.

You can create chatrooms or channels for your teams and view all things happening across your organization under the teambook.

For task management you can create tasks on the fly, view them in lists or kanban view, assign them to team members, and more.

Pricing: Limited free forever plan, paid plans start at $3 per user per month.

10. Ryver

Ryver

Ryver is another business communication platform that combines various functionalities into one app.

It comes with messaging, task management, and audio/video calls under one roof. It comes with SSO Single Sign-on which allows team members to sign in with the single account used by your organization.

Integrations are also available for many popular productivity and CRM software.

Pricing: Starting at $69 per month for up to 12 users.

11. Flock

Flock

Flock is another good alternative to Slack. It offers voice / video conferencing, chat, to-dos, file-sharing, and more.

Teams can be organized into groups with their own to-dos, video conference, and in-line file sharing.

It has integrations available for all top producivity suites so you can collaborate in real-time in channels.

Pricing: Limited free plan, and paid plans start at $4.50 per user per month.

12. Zoho Cliq

Zoho Cliq

Zoho Cliq is the Slack interactive created by the folks behind Zoho software suite. The company offers Zoho CRM, Notes, Calendar, Email, and several other tools for businesses.

Zoho Cliq offers team chat for real-time collaboration. It includes chats, group chats, project management, video conferencing, voice calls, and more.

It integrates well with other Zoho applications as well as many other third-party software.

Pricing: Limited free plan, paid plans start from $2.7 per user per month.

13. Dialpad

Dialpad

Dialpad offers a collaboration platform for teams and customer support. It includes VoIP service for calls, messaging, group chat, and video conferencing.

It offers omni-channel customer engagement platform as well. Which comes in handy for sales teams to follow up with leads.

It supports Google Workspace and Office 365 integrations. If you operate in multiple countries then Dialpad offerss local number for upto 70 countries.

Pricing: Starting from $15 per user per month.

14. GoTo Meeting

GoTo Meeting

GoTo Meeting is a popular webinar software and video conferencing platform. It makes it super easy to conduct video meetings with teams, clients, and customers.

Their GoTo Connect suite provides phone, text, and meetings. It allows teams to follow up with leads, offer customer support, and stay in touch with chat and text.

The company offers several addon solutions for businesses particularly those providing remote IT support to customers.

Pricing: Free trial for some products, for paid plans you’ll have to contact sales.

Frequently Asked Questions (FAQs)

Unlike most other businesses in the world, we have been remote since we started in 2009. This means we have 13+ years of experience running a distributed team and managing team communication. Over this period, we have helped thousands of users choose the best team communication tools.

Below are the answer to some of the most frequently asked questions.

What communication tools are most effective in working closely with the team?

Whether you’re working closely with a remote-team or an in-house team, here are the best team communication tools.

  1. Google Workspace – Email is essential for working closely with a team. Google gives you gmail, calendar, and Google Drive for file sharing.
  2. Nextiva – Essential for phone calls and SMS.
  3. Slack – Best for group chat. Although for smaller groups, you can get away with just a simple WhatsApp group.
  4. Asana – Great for project management.

What is the most effective communication method for remote teams?

For remote teams, the most effective communication method is a combination of written communication along with verbal face-to-face communication over video calls.

For remote team check-ins, the most effective method is virtual check-in software like Standuply that integrates seamlessly with Slack, and it’s completely asynchronous.

What is the best team communication tool for online collaboration?

For online collaboration, the best team communication tools are Google Workspace and Zoom. With Google Suite, you get Google Doc, Spreadsheet, and Slides all of which allow for collaborative work, and their built-in comment feature is really good.

You can also use Zoom whiteboard which is an excellent virtual communication tool for collaboration.

What is the best team communication tool for asynchronous communication?

The best asynchronous communication tool are:

  1. Slack – great for instant messages and group messages. It gives users full control over their time zones and notification preferences. You can also schedule messages to send at certain time in different team member’s timezone.
  2. Email – great for asynchronous communication.
  3. Loom – allows you to easily record videos and screencasts that can be watched by your team members.
  4. Droplr – allows you to create screenshots or quick screen recording to communicate with team members.

Which is the best team communication tool for small business?

In our opinion, the best team communication tool for small business are Nextiva, Google Workspace, Asana, and Slack.

We hope this article helped you find the best team communication tools for your business. You may also want to see our guide on must have tools to manage and grow your business and follow our guide on how to grow a small business on a shoe-string budget.

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 14 Best Team Communication Tools for Small Business (2022) first appeared on WPBeginner.

need help with airline ticketing school project

i have an airline ticketing project and i cant figure it out, i need to take the name and age of passengers and depending on their ages they will get a discount (2% for 13 below and vat exemption + 20% discount for 60 above) and also the prices changes for the group
my friends told me to put the ages in an array but i dont know how to do it properly and my compiler doesnt seem to be calculating it at all and i think its because of me not knowing how to use arrays properly

here is my code

#include <iostream>
#include <string>

using namespace std;
int main()
{


    string fly,cls,trip,name;
    int des,fare,price;


    cout <<  "/////////////////////////////// WELCOME TO MERC AIRLINES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ";
    cout << endl;
    cout << "                               " << endl;
    cout << "/////////////////////////////// Please note that payment is only in cash basis \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" << endl;
    cout << "   " << endl;
    cout << "Please indicate if you are in an international flight or local flight" << endl;
    cin >> fly;
    if (fly == "local")
    {
        cout << "Please choose your destination <1-4>" << endl;



    cout <<       "   DESTINATION\t   TO\t        Private Class Fare\tBusiness Class Fare\t";
cout << endl;
cout << "1.   Manila\t Batanes\t P8,650 per person \t P15,500 per person";
cout << endl;
cout << "2.   Manila\t Bacolod\t P4,543 per person \t P9,500 per person";
cout << endl;
cout << "3.   Manila\t Palawan\t P5,882 per person \t P13,200 per person";
cout << endl; 
cout << "4.   Manila\t Davao  \t P4,096 per person \t P4,096 per person";
cout << endl;
    }




    else if (fly == "international")
    {
        cout << "Please choose your destination <5-9>" << endl;
    cout <<       "   DESTINATION\t   TO\t        Private Class Fare\tBusiness Class Fare\t";
cout << endl;
cout << "5.   Manila\t Malaysia\t P6,199 per person \t P12,150 per person";
cout << endl;
cout << "6.   Manila\t Indonesia\t P5,699 per person \t P10,850 per person";
cout << endl;
cout << "7.   Manila\t Singapore\t P6,899 per person \t P13,110 per person";
cout << endl; 
cout << "8.   Manila\t South Korea  \t P12,500 per person \t P23,850 per person";
cout << endl;
cout << "9.   Manila\t Japan \t         P24,800 per person \t P31,450 per person";
    }


int localp[4]={8650,4543,5882,4096};    // local fare prices
int localb[4]={15500,9500,13200,4096};




cin >> des;
if (des = 1)
{
    cout << "\t DESTINATION: BATANES \n" << endl;
    cout << "" << endl;
    cout << "\t FARE: PRIVATE P8,650 per person \t BUSSINESS P15,500 per person" << endl;
    cout << "\t [P] OR [B] \n" << endl;

            loop: cin >> cls;
            if (cls == "P")     
            fare =localp[0];        
            else if(cls == "B")     
            fare = localb[0];
            else 
            {           
            cout << "ERROR: PLEASE INPUT A VALID OPTION" << endl;
            goto loop;
        }
        price = fare * 1.12;                 // 12% vat


                int num1;

        cout<<"Enter Number of Reservation: ";
        cin>>num1;
        char name [num1][10];



        if(num1>10 ){
           cout<<"\t Exceed the number of passenger reservation, Try again\n";
           return 0;



           } else {
            cout<<"\tNAMES OF PASSENGERS \n";
            for(int a = 0; a<num1; a++)
            {
            cout<<"Passenger "<<a+1<<": ";
            cin>>name[a];
            }


            int age[10];

            cout<<"\tAGE OF PASSENGERS \n";
            for(int b = 0; b<num1; b++)

            {
            cout<<"Passenger "<<b+1<<": ";

            cin>>age[b];

                if (age[b] < 14) || fare = price - price * 0.02;



                else if (age[b] > 13)
                {
                    fare = price;
                }
                else if (age[b] < 60)
                {
                    fare = price;
                }
                else if (age[b] > 59)
                {
                    price = price - (price * 0.12);
                    fare = price - price * 0.2;
                }


        }







            cout << "\t ONE WAY OR ROUND TRIP \n" << endl;
            cout << "\t [O] OR [R]" << endl;

            cin >> trip;

            if (trip == "R")
            fare = fare * 2;

            for (int z=0; z < num1; z++){
            cout << name[z] << endl;
            cout << age[z] << endl;
            cout << fare << endl;

        }


}





    return 0;
}
}

sorry if i suck im still learning as a student