What Makes “Minimum” in Minimum Viable Product?

What Is an MVP?

The Minimum Viable Product (MVP) is a product without any additional features and, at the same time, comes with all the essential features that users want.

Think of it as a test drive. It is a lean, agile model that allows you to maximize learning about your business with minimal development effort and the shortest possible time, resource, and cost commitment.
Unlike a prototype or the traditional business model canvas, which are usually created once the idea generation stage of one's startup is finished, the

Scroll Animation Ideas for Image Grids

Today I’d love to share some experimental scroll animations with you! The idea is simple: when scrolling a grid of images, animate the images that enter or leave the viewport in an interesting and creative way ๐Ÿ™‚

For these effects I’m using the super helpful ScrollTrigger plugin of GSAP and the new smooth scroll library Lenis by the amazing folks of Studio Freight.

When scrolling a grid layout, we can move, scale or rotate the images, there’s really endless possibilities! In this demo, we squeeze them:

In the following demo we add a 3D rotation effect, creating the illusion of something like a roll:

I really hope you enjoy this set of experiments and find it useful for your projects!

Thanks for checking by ๐Ÿ™‚

The post Scroll Animation Ideas for Image Grids appeared first on Codrops.

How to Limit the Number of WordPress Form Entries

Do you want to limit the number of form entries on your WordPress website?

Limiting form entries is useful if you’re running a contest or event that have a cap on the number of participants, want form entries from a specific region, or can’t accept more forms after a particular date.

In this article, we’ll show you how to limit the number of WordPress form entries.

How to limit the number of WordPress form entries

When Should You Limit WordPress Form Entries?

There are many situations where limiting the number of form entries on your WordPress site can be beneficial.

Whether you need to create an event RSVP form with limited seats, to restricting feedback form for registered members only, WordPress forms have the flexibility to limit form entries based on your needs.

Here are few ways that you can restrict WordPress form entries:

  • Limit total number of form entries allowed – great for RSVP forms or contests / giveaways.
  • Restrict form submissions by a deadline date – great for scholarship forms, event RSVPs, job application forms, and more.
  • Restrict form entries to logged-in users only – great for those who have a membership sites or online store.
  • Limit one WordPress form entry per person – really helpful when creating a feedback form to ensure double feedback aren’t submitted.
  • Limit WordPress form entries by age verification – really helpful when you need to be in compliance with local laws.
  • Restrict WordPress form entries by user location or IP address – great for blocking out specific regions or preventing spam.

Depending on your needs, WordPress form plugins give you the flexibility to customize your workflows to save you time.

That said, let’s look at how you can limit form entries in WordPress.

Limiting the Number of WordPress Form Entries

The best way to limit form entries is by using WPForms. It’s the best WordPress contact form plugin, and over 5 million websites use it to create smarter forms.

WPForms offers a Form Locker addon that allows you to manage permissions and control who can access your forms. Plus, it lets you set up different types of form entry limits on your website.

Note: you’ll need WPForms Pro because it includes the Form Locker addon. There’s also a WPForms Lite version that you can try for free.

First, you’ll need to download and install the WPForms plugin. If you need help, then please see our guide on how to install a WordPress plugin.

Upon activation, you’ll need to go to WPForms ยป Settings from your WordPress admin panel and then enter the license key. You can easily find the key in your WPForms account area.

Visit the WPForms ยป Settings Page to Enter Your License Key

Next, you need to activate the Form Locker addon in WPForms.

Simply head to WPForms ยป Addons and navigate to the ‘Form Locker Addon.’ Then click the ‘Install Addon’ button.

Enable the form locker addon in WPForms

After that, you’ll need to create a WordPress form.

Simply head over to WPForms ยป Add New from the WordPress dashboard.

Add a new form in WPForms

On the next screen, you’ll see the WPForms form builder. Go ahead and enter a name for your form at the top.

Next, you can select from pre-built form templates to get started quickly or use a blank template to start from scratch. For this tutorial, we’ll use the ‘Contest Registration Form’ template.

Select form template

After that, you can edit your form using the drag and drop form builder.

The form template will have default form fields already in place. However, you can add more fields by simply dragging them from the menu on your left and dropping them onto the template. There are plenty of fields available, including checkboxes, dropdowns, address, phone number, and much more.

Edit form template

You can further edit any form field and set up form entry limits.

For example, let’s say you don’t want the same user to submit multiple forms on your WordPress blog. To create this form limit, simply click the Email field in the form template.

After that, you can click the ‘Advanced’ tab from the menu panel on your left and enable the ‘Require unique answer’ option.

Make a form field require unique answer

You can do the same for other form fields like name and username. This way, people will be limited to one entry and cannot use the same email or name to submit a form.

Next, go to the ‘Setting’ tab in the form builder and select the ‘Form Locker’ settings.

Go to form locker settings

You’ll see different settings under Form Locker that you can use to limit the number of form entries.

You can enable all of the options if you want. However, we’d recommend enabling 1 or 2 options to limit form entries so it doesn’t hurt the user experience and improves engagement.

Let’s see each of these settings in detail.

1. Limit WordPress Form Entries through Verification

If you enable the ‘Form Verification’ option in the Form Locker settings, you’ll see more options appear.

You can limit form entries by requiring users to enter a password, email, or age. Simply click the Type dropdown menu and select an option.

Limit form entries based on verification

For example, if you select ‘Age,’ then you can specify how old a user has to be to access the form.

You can set a minimum, maximum, or an exact age verification for your form entries.

Set age based form entry limits

2. Add a Start and End Time and Date for Form Entries

Next, you can enable the ‘Form Scheduling’ option.

This will let you add a start time and date along with an end time and date for your form entries.

It’s really helpful if you’re running a time-sensitive campaign.

Enable form scheduling

You can also add a Closed Message that will appear when someone tries to submit a form after the end date and time.

3. Only Allow Logged-In Users to Submit Forms

WPForms also lets you limit form entries to only logged-in users.

Simply enable the ‘Logged in users only’ option. Then add a message that will appear for logged-out users that try to submit the form.

Only allow logged in users

4. Set Total Form Entry Limits and Restrictions

You can limit the total number of forms that can be submitted by enabling the ‘Enable total entry limit’ option.

For example, let’s say you have an order form for your online store and only have 1,000 of an item in stock. Simply enter the number in the Limit field and add a message when the form closes.

Set form entry limits

Similarly, you can also set up restrictions on your form entries by clicking the ‘Enable user entry limit’ option.

WPForms lets you restrict form entries based on IP address and email address. To set it up, go ahead and click the checkbox for ‘Restrict by IP address’ and ‘Restrict by email address’ options.

Then select an option from the dropdown menu and enter the number of form entries you want to limit.

Set up form entry restrictions

In our example, we’ve set the limit to 1 per day. You can change this to per week, month, or year.

After you’ve enabled the options you want to use to limit the number of form entries in WordPress, simply click the ‘Save’ button at the top.

Save your form settings

Adding Your Form to Your WordPress Website

Now that you’ve created a form, the next step is to add the form to your WordPress website.

The easiest way to do that is to click the ‘Embed’ button in the WPForms form builder. You can also add the form using a shortcode or the WPForms block.

Once you click the button, a popup window will appear asking you to select an existing page or create a new one.

Embed your form in WordPress

For this tutorial, we’ll click on the ‘Create New Page’ option.

Next, you’ll need to enter a name for your page and click the ‘Let’s Go!’ button.

Enter name for your new page

Next, you’ll see the form in the WordPress content editor, and you can make any final changes you’d like to your form.

After that, preview your page and publish it.

Preview your form and publish

You can also test the WordPress form entry limits you’ve set.

For example, if you’ve set an age restriction on your form and someone doesn’t meet the age limit, then they won’t be able to submit the form.

Set age limit example

On the other hand, let’s say you get the total number of form entries that are needed, or it’s past the end date and time for filling out the form.

In such situations, a user will be shown a message when they visit the form landing page.

Contest is closed message

WPForms allows you to have full control over your form workflows. You can add conditional logic, choose to send form entries to multiple recipients, or even connect your form with your favorite email marketing services.

This is the form builder plugin that we use on WPBeginner, and there’s a reason why over 5 million websites use it to build smarter forms.

We hope this article helped you learn how to limit the number of WordPress form entries. You can also see our guide on how to start your own podcast and our ultimate WordPress SEO guide for beginners.

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

The post How to Limit the Number of WordPress Form Entries first appeared on WPBeginner.

PHP page adding extra info from unknown source

I've converting my website to PHP from just static HTML. In the process, my PHP Index file is pulling old information from an unknown source Here is the specific problem. When I add a paragraph tag to my div id="main" section, I get "Get the Management Certification you need to make the next step in your career!" which isn't in my PHP file. When I inspect in Google Chrome, this is some how appears there

Adobe Dreamweaver Free Trial

Adobe Dreamweaver CC is a website builder and content management system for designing, developing, and deploying websites on the web. You can use it to build, connect and manage your sites. It gives you the power to design and publish websites that look great on any device. Adobe Dreamweaver CC allows web designers to edit...

The post Adobe Dreamweaver Free Trial appeared first on DesignrFix.

Smashing Podcast Episode 47 With Sara Soueidan: Why Does Accessibility Matter?

In this episode of the Smashing Podcast, we ask why accessibility really matters and why it is so important to get it right. Smashingโ€™s Vitaly Friedman talks in-depth to Sara Soueidan to find out.

Show Notes

Weekly Update

Transcript

Vitaly: Sheโ€™s an independent web user interface and design systems engineer, author, speaker, and trainer based in Lebanon. She worked with companies and agencies all around the world from Netflix, and Telus, and the Royal Schiphol Group at Amsterdam airport, just to name a few, where she built digital products with focus on accessibility performance and of course cutting edge tech.

Vitaly: Now, she also writes beautiful and very comprehensive, very, very comprehensive articles all around front-end SVG accessibility on her wonderful blog. And sheโ€™s also working, which might be a rumor; weโ€™ll find out on her very own video course on web accessibility. So, in all, sheโ€™s an expert in creating accessible and beautiful interfaces.

Vitaly: But did you know that she loves tea, drawings, and birds and has raised more than a dozen of them throughout her life? So, I shouldnโ€™t be surprised to hear the birds chirping when we have a call just now. My smashing friends, please welcome Sara Soueidan. Hello, Sara, how are you?

Sara: I am smashing. How are you?

Vitaly: Thatโ€™s wonderful. I donโ€™t know. I feel like coffee today. I had already three, and I feel like I should get forth, but youโ€™re not big on coffee, are you?

Sara: No. I have my matcha sitting right next to me right now.

Vitaly: Okay. That would be a very surprising start to the conversation. But what is your favorite tea, if I may ask?

Sara: My favorite tea, if weโ€™re not counting matcha as tea, even though it is actually tea, but if... okay. So, Iโ€™d say itโ€™s either a matcha or ginger tea. I love ginger.

Vitaly: Okay. Now, dear friends, if you ever want to ship any gifts to Sara, you know what to ship. Now, staying on the topic of food and drinks, and beverages, itโ€™s interesting, Sara, because I know weโ€™ve known each other for, I donโ€™t know how many years now. And we even shared pizzas on very different occasions in various parts of the world, that surely counts for something.

Vitaly: And one thing that really astonishes me when I think about our conversations and I think about you as a personality and just the incredible work that you put on the web, itโ€™s just incredibly difficult for me to find many people who are more passionate about accessibility as you are.

Vitaly: So, maybe you could give us a bit of a background of where this genuine empathy and excitement about accessibility comes from. Where did it all start, Sara? Where?

Sara: Do you want the long version answer or the short version answer?

Vitaly: The very long answer, if I can.

Sara: Are you sure?

Vitaly: No.

Sara: Yes.

Vitaly: Okay. But make a choice, whatever works for you works for me.

Sara: Okay. So, if you want some background, Iโ€™ve always been the kind of person who loves helping people, even if they donโ€™t directly ask for it. So, Iโ€™m just going to give you a quick example. Back when I was in college, I think it was my second year in college or in university, and it was the start of the year, and everyone was in the university, and we were registering and doing all the necessary paperwork that we needed to do to start going to class.

Sara: And there were a lot of people, basically. And there was this one old man, he was standing in the middle of the crowd, and he was carrying a few papers in his hand and a pen. And he looked absolutely clueless. I could tell from his facial expressions that he was lost. He had no idea what he was supposed to do.

Sara: So, I approached him and I asked him... I always do this, by the way. Iโ€™m not sure if this is a good thing or a bad thing, but I tend to do this with strangers a lot. So, I said, โ€œIs there anything I can help you with?โ€ He looked at me, and he said, โ€œI have no idea basically how to fill the paperwork in.โ€

Sara: He was there to register his son, who couldnโ€™t be there. So, he was registering him instead, and he didnโ€™t know how to do it. And I know how difficult it can be the first time. Because my first time, when I went to college for the first time, in the first year, it took me four days to register because there was no one there to help you.

Sara: You can either find your way on your own, or you would just have to ask people. And if you donโ€™t ask anyone, youโ€™re just kind of stand there like that old man did. So, I asked him if I could help him, and he welcomed my help. I took the paperwork. I took the pen. I started asking him questions and filling in the paperwork for him.

Sara: And then, when I finished, I told him exactly where to go next, exactly what to do. And I basically just helped him as much as I could. I do this with a lot of people. I donโ€™t know; I think itโ€™s just part of who I am. Helping people makes me feel amazing.

Sara: Even the smallest acts of anything that you do in your daily life makes them meaningful and gives them purpose. So, to know that I have contributed a positive thing, no matter how small, into someone elseโ€™s life is wonderful. And I want my work to have a purpose, as well.

Sara: So, when I started my career as a developer, I think it was in 2013, and this is something that Iโ€™m sharing for the first time, I went through a few years where I felt like what I was doing wasnโ€™t very meaningful, to be honest. So, I was just doing what I was doing just to make some money, make a living, and that was it.

Sara: But I would get designs someone made and turn them into something that worked, which is nice because I love doing that. But as always, I kept asking myself for years like, โ€œWhat good is this contributing to the world?โ€ I wanted to feel like the code that Iโ€™m writing can make a difference. And it took some time for me to finally get there.

Sara: So, I started changing my path, so to speak, by choosing the clients that I wanted to work with. I started choosing clients that did meaningful things in the world. That way, if I help them create a website to expand the reach, it meant that I was contributing to something good in this world, as well.

Sara: And I even expressed that on my Hire Me page, where Iโ€™m explicitly clear that Iโ€™m looking to do something meaningful in the world. So, there is that. And on the other hand, Iโ€™ve always been fascinated with design, in general. Iโ€™ve never taken a design class in my life, not in university, not outside of university, but Iโ€™ve always been interested in design because of how it directly impacted peopleโ€™s lives.

Sara: You can maybe start to see connection here. So, Iโ€™m going to give an example from the adjacent design field. Many people who have been following me for years know that Iโ€™m fascinated and very passionate towards interior design. And the best thing Iโ€™ve ever read about interior design is that interiors should be designed around how we live.

Sara: So, how do you decide what you put in the kitchen, for example? How do you decide how much space you give a certain feature or piece of furniture in the house? The answer is based on how often it is needed by the people who will live in this house.

Sara: A great interior designer will sit down with their client and ask them questions like, โ€œHow do you start your day? What does your typical day look like? What do you do when you wake up in the morning? Do you work from home? Do you like having people over? Do you like entertaining? What are your hobbies?โ€

Sara: And the answers to all these questions they asked creates the framework and guides the interior design decisions of the house that the client will live in. The house is designed and built around the clientโ€™s lives, not the other way around.

Sara: And I love that because if design isnโ€™t about people, then it is selfish, right? Then, youโ€™re not really designing for people anymore. And accessibility and inclusive design in general, but accessibility is not the same as inclusive design. Accessibility design is all about people.

Sara: There is no room for selfishness, in my opinion. So, what you design and build either works for the user or it doesnโ€™t. And if it doesnโ€™t, then it needs to change because what good is anything that you built for people if they canโ€™t use it?

Sara: So, connecting these two things, I love design, and I love designing for people, and I love helping people. So, when I first learned about accessibility, and I found out that some of the work that I was building prior to that was possibly creating barriers to access for people.

Sara: I felt horrible. And I started feeling more responsibility, and I started digging more into accessibility and learning more about it. And what I love the most about it is it makes me feel more like a designer. Why? Because, well, I do believe that all of us, we are designers, one way or another.

Sara: And the work that we do and the decisions that I make as a design engineer when I write code, these decisions have a direct impact on the user experience, and that makes me a designer. So, every decision that I make has a direct impact on the experience and the inclusivity and accessibility of the interfaces I built.

Sara: A decision such as, for example, what HDML element I choose to use, how do I apply the styles because CSS affects semantics, which affect accessibility, which development strategy I follow, which is a progressive enhancement or something else. Whether I use platform features or a third-party library, which library do I choose?

Sara: How does it perform? All of these things, they impact your work, and eventually, the user experience. And design should be about people. Accessibility is about people, which means that it gives code purpose. It gives the work that I do purpose, which brings me back... the first thing that I mentioned, I want to feel like what Iโ€™m doing has a purpose and is actually beneficial for people.

Sara: And this is why I love accessibility, in general, because it is a concrete, practical type of design, something either works or it doesnโ€™t. And there is no room for bad decisions because itโ€™s about the user, not about you. So yeah, Iโ€™m passionate about accessibility because-

Vitaly: I could tell. Yeah, thatโ€™s incredible to hear. And actually, a few things that have really connected the dots for me, as well, because when I think about the work that Iโ€™m doing, as well, I feel like... we donโ€™t even notice that sometimes, but all these minor decisions about the labeling of navigation and the way we design navigation, and the way we make buttons to look like buttons.

Vitaly: All those things can have tremendous impact. We might feel like, โ€œOkay, weโ€™re just moving pixels around.โ€ And weโ€™re just making things a little bit more nice, right? But I think that the right significant decisions that we end up, that we use to really help somebody in different situations, complete the task, to find information that they need, and so on.

Vitaly: And one thing that really comes up in my mind every time we have this conversation is that you often identify yourself with a design engineering role. And I see that some teams are moving towards that role now. Where in the past, it was just a developer, and then it was just a designer, and then it was a front-end developer and backend developer.

Vitaly: And if you have an interface designer, you have to use the experience designer. So, maybe you could share a little bit of light on how you see design engineering as a role. And maybe many of our listeners now actually are design engineers without even knowing that. So, how would you define it? And do you think that companies actually understand what it means?

Sara: I have actually an essay, not just an article, an essay that is all about just defining the role of a design engineer. And from my point of view, I even have a domain name that I purchased just to put that on it. If I try to describe it with just a few words because I already gave a super long answer to the previous question-

Vitaly: That was a wonderful answer. It wasnโ€™t long at all.

Sara: Thank you. Okay. So, as design engineers, we specialize in implementing designs. That is the general description, right? We specialize in implementing designs, but then, of course, there is how you implement it. So, I like to label myself as an inclusive design engineer, which is something that Iโ€™m doing on my new website, which is not public yet.

Sara: So, an inclusive design engineer is someone who, in my opinion, uses accessibility and progressive enhancement as a framework to build inclusive interfaces. But, as a design engineer, in general, is someone who works directly with designers, hopefully, because this is what I think the role should be.

Sara: We should be working directly with designers, helping them make decisions and informing design decisions with our accessibility and code knowledge, basically, because they complement each other. We write HDML. We write CSS. We write presentational JavaScript, mostly.

Sara: And with a strong focus on accessibility, hopefully, because that should be part of every design engineerโ€™s job. And then, of course, the strategy that you choose and the frameworks that you use, and Iโ€™m not talking about CSS frameworks or JavaScript frameworks here, but like I said, this... let me just call it the strategy.

Sara: Strategies that you use and what exactly you focus on, and how you do your job as a design engineer probably differs between people because like I said, Iโ€™m a progressive enhancement advocate, others are maybe not. So, we would differ in these small details.

Sara: But a design engineer is someone who works with designers, helps inform design decisions and makes sure that designs are implemented in a way that hopefully works for as many users as possible.

Vitaly: Right. So then, as a design engineer, at this point, how would you then actually work? So, what would your process be like? So, when you think about implementing a particular design, do you break it down into components? Do you think about navigation landmarks first?

Vitaly: How do you actually start building things? What is your maybe mindset in that framework of getting accessible results? Maybe you could describe it a little bit.

Sara: Okay. So, when you say that you divide the... you not divide, basically looked at the design and then start thinking in components, that very much depends on the process that you work with the designer. So, if Iโ€™m working with someone who has handed over a design, like an entire page, the process is different from when Iโ€™m working with the designer, like I did with Yan Persy.

Sara: Iโ€™ve mentioned him multiple times on Smashing Hour, by the way, because working with him was one of my favorite ways of working with the designers because he didnโ€™t have like a full finished design for me to implement. We worked in tandem. We worked together. And he changed some of the things in the design.

Sara: So, for example, he wasnโ€™t using a responsive type scale like we do in front-end development now using CSS variables and viewport units, et cetera. So, we had this discussion, and then he shifted the way the design process went. It was different.

Sara: So, we both started building the site in terms of components, and then assembling those components into what we called slices back then, and then assembling the slices into the entire website. So, how I start from whether itโ€™s components or not, depends on the process that I work with the designer.

Sara: But then, if I get a little bit more technical, like if I have a component that I want to build, how do I go about doing that in layers, I would say? Again, progressive enhancement, the first thing that I think about is how does this work? How does this look like?

Sara: How does someone perceive this if JavaScript is disabled? And what happens if there is no style? So, I just start with the bare minimum, HTML, because HTML defines the semantics. The semantics give meaning to the content that Iโ€™m creating.

Sara: So, which HTML elements do I need to tell the user what this thing is to give semantics? If HDML already contains an element that represents this component or this element that Iโ€™m building, I use that. If not, then I start to thinking about ARIA attributes; which ARIA attributes do I need?

Sara: How much ARIA do I need? ARIA is... itโ€™s not an enhancement; itโ€™s necessary for a lot of dynamic and interactive components. But I always try to think of it as a last resort, not a first one, so always semantic HTML first. How much can I get done with just semantic HTML?

Sara: How accessible is it? Do I need something? Do I need to polyfill some semantics using ARIA? If I do, then I start thinking about that. And then applying CSS, and how does CSS affect these semantics? Does it? Does it not?

Sara: Do I have to do something extra to make sure that something remains accessible after I style it? Like, for example, if you stripped away the default list styles on list elements, which is something you probably... and many people probably already know by now, if you set list style to none, for example, on an unordered list, then Safari or WebKit, WebKit, in general, is going to remove the semantics of the list.

Sara: And VoiceOver is not going to announce that anymore. So, what do I do in that case? Do I need those semantics? Do I go into the HTML and add them again using a role attribute or not? So, I think about this stuff in layers. Start with HTML semantics. Do I need ARIA? How do I style this? And then, interactivity is always the last layer that I think about and that I build into components.

Vitaly: Right. Makes sense. Itโ€™s interesting what youโ€™re saying that itโ€™s a process. It doesnโ€™t seem like a simple process, especially when you think about like literally implementing quite a complex interface, which may also have all kinds of different views and maybe single page application in the back and so on.

Vitaly: And one thing that Iโ€™m struggling with when Iโ€™m doing work with clients and trying to make things more inclusive and interfaces maybe a bit more usable is that very often web accessibility is still seen as this little thing. Like, โ€œOkay, thatโ€™s just semantics.โ€ โ€œOkay, so weโ€™re going to use buttons for buttons.โ€

Vitaly: But itโ€™s actually much, much, much more than that. And Iโ€™m wondering, what do you think... like, where do we actually stand in terms of accessibility today? Itโ€™s very hard for me, personally, for example, to imagine a new project being released without even considering accessibility.

Vitaly: I think that might have been possible maybe a decade ago. I think today, it would be very difficult to imagine a brand new project thatโ€™s going to be advertised everywhere on posters that is not accessible at all, some parts accessible, but maybe not everything.

Vitaly: So, what do you think, has accessibility not become just the natural part of every design implementation process, or are we way, way, way, far away from this yet?

Sara: I think we are not too far, but weโ€™re still far. So, there is definitely a lot more awareness on accessibility. I hope so, at least, because I only follow like less than 250 people on Twitter. And most of the people in my circle are people who either work with accessibility or care about accessibility.

Sara: So, if I were to judge the current situation based on my little circle, I would say that accessibility is doing great, and people care about it a lot. And they work to make their content more accessible. But I canโ€™t speak for everyone because I know that this isnโ€™t the case for everyone.

Sara: I know that there are still many developers who just simply donโ€™t care. Because with accessibility, you either care or you donโ€™t care; this is it. If you donโ€™t care, then you are basically not doing any accessibility work at all.

Sara: And then, on the other hand, those that do care about accessibility and try to implement it in their work, some of them are finding difficulty because they get lost in all of the resources out there, and where should they go? Where do they start? This is why Iโ€™m creating the accessibility course now, to hopefully help with that a little bit.

Sara: So, we are definitely doing much better than we did like five years ago, let me say, five. But I donโ€™t think weโ€™re just exactly there yet. No. I think itโ€™s going to take more time.

Vitaly: Yeah. But then, I also hear developers telling me all the time, โ€œWell, hold on. But the platform is evolving so beautifully at this point. We have not only the wonderful CSS feature coming along, but also we have these incredible things that common UI components, like input type date for a date picker, the dialogue for models, details, and summary for accordions.โ€

Vitaly: And very often, what I find is that they just use those things, and they think that, โ€œOkay, well, since these are native components available on the platform, they surely are accessible.โ€ And then, come eye along, and then there is trouble. Iโ€™m wondering, at this point, what would you say in this position?

Vitaly: Like, those things, would you recommend to use them ever? Or where are there? Ideally, it would be a very nice idea and situation where we ended up with all those native components just available out of the box, beautiful, accessible, inclusive, and all of that. Are we there yet?

Sara: No.

Vitaly: Are we again, far away from it?

Sara: No. No. Weโ€™re definitely not there yet. I know that the dialogue element, for example, has been pretty... I donโ€™t want to say completely inaccessible, but it has had a lot of accessibility issues for years now. And I think it only started getting better this year. And then, input type equal date, I rarely ever used it because, to be honest, I donโ€™t think that it offers the best usability anyway, even if it is accessible, which I think itโ€™s... I donโ€™t know.

Sara: I havenโ€™t used it in a very long time, so I canโ€™t even tell if itโ€™s fully accessible or not. But I think the last I heard was that it wasnโ€™t and that it was a usability nightmare. So, even if something is technically accessible, that doesnโ€™t mean that itโ€™s going to be usable. Definitely a lot of tests.

Sara: And I like this quote by my friend, Scott Oโ€™Hara, that he said in one of his talks. He said, โ€œTechnology and user expectations change rapidly. And we should always test to ensure not only emerging patterns work correctly but try untrue patterns continue to work as we expect.โ€

Sara: This is me, now, continuing. Sometimes even something that you know works may stop working as you expect. Browsers may create new heuristics, for example. And the way they... not interpret, the way they present something because the user may change on any day.

Sara: Also, a note about details and summary, which is something that I had a discussion about today, details and summary are not the best choice for an accordion. They can be used for an accordion, but even they... like, when you choose any component, the first thing you have to think about is the semantics.

Sara: What are the semantics that are going to be conveyed? Because the semantics determine the non-visual interface for a non-sighted user, for a screen reader, for a user, for example, assuming theyโ€™re a non-sighted screen reader, the user.

Sara: Details in summary, they have their own quirks when it comes to semantics. So, the summary has a button roll, which means that it is conveyed as a button to assistive technologies. And buttons eat up the semantics of the elements inside of them.

Sara: So, if you have a heading, which is what you would normally have in an accordion, and if you put that inside of a summary, then the heading is not going to be conveyed as a heading anymore. Of course, there are exceptions because sometimes browsers try to quote, fix our misuse of ARIA or our misuse of semantics.

Sara: And they try to help stream users by conveying things that we may have broken as developers, but it doesnโ€™t mean that all browsers do that. So, definitely, always, you need to test. And if details in summary, for example, if you use that, and if the headings are not exposed as headings, and then the user cannot use those headings to navigate, for example, anymore.

Sara: So, even if something is technically accessible, yes, they can access the contents of summary. Yes, they can access the contents of the details. But you have to think about what semantics you are conveying and how they affect the usability of the interface and sometimes maybe navigation, so there are a lot of things to keep in mind.

Vitaly: Yeah. So, itโ€™s interesting that you brought up the testing for accessibility at this point. Because when we run our workshops, and every now and then, we... in my workshop, I tend to just explain to people how security works. And I always ask the same question. And for the last, I donโ€™t know, two, three, four years, maybe now, Iโ€™ve been asking the same question.

Vitaly: So, who is hearing this VoiceOver for the very first time? And these are usually designers or developers coming to those workshops. And very often, you would see a vast majority of people hearing things for the very first time. So, maybe you could also share a bit of light in how do you actually test accessibility?

Vitaly: Do you always have screen reader or VoiceOver on or maybe any other tools? Could you also, maybe, run us through the process of testing your components for accessibility?

Sara: Okay. So, there are quite a few things that I like to use, and Iโ€™m going to mention them in no particular order; definitely browser DevTools to inspect the accessibility tree because you can get a lot of insight on the accessibility of the elements and components that youโ€™re building from the accessibility tree.

Sara: Because basically, the accessibility tree is the accessibility... contains the accessibility information that the browser has created for assistive technologies to announce. So, when you look at the accessibility tree, you can get an idea of how an element is going to be announced by a screen reader that accesses and gets that information from the browser via the accessibility API, of course.

Sara: So, the dev tools for accessibility tree. There are a lot of extensions that I like to use, for example, to see the document outline on a page or to see the landmarks on a page. If Iโ€™m doing an accessibility audit, I would definitely use an automated testing tool such as asking DevTools, for example.

Sara: As far as screen reader go, definitely like... you cannot just test on one screen reader. And I have been guilty of this. I mean, Iโ€™m not like preaching something that I donโ€™t practice now, but I know that I didnโ€™t practice this before. I donโ€™t have access to a windows machine.

Sara: So, I recently... not recently, like a few months ago, I started using Nvidia A on my windows virtual machine. And I also recently got a license for JAWS because JAWS is not free, but Nvidia is free. So, I used VoiceOver with Safari on iOS. Sometimes I test on other browsers, as well, just because sometimes, maybe a VoiceOver using may be using another browser.

Sara: But generally speaking, VoiceOver and Safari are the best combination, and users typically know that. And on windows, I test Nvidia A with Firefox, Nvidia A with Chrome. And the narrator is also built into Windows, so I use that for testing as well.

Sara: And JAWS is the most popular screen meter according to the WebAIM screen reader, user survey. So yes, you have to test using multiple screen readers and browser combinations because just like you cannot test your website only on one browser.

Sara: Like say, youโ€™ve built a website, and you want to test, if everything is working as expected, all your CSS and stuff, you donโ€™t just test it on one browser, right? You test it on most modern browsers and possibly even on IE if you still have to support that. Just like you test on multiple browsers, you also have to test on multiple screen readers, if you can. So, this is what I do, in general.

Vitaly: Yeah. So, you also mentioned in one of the Smashing Hours that tool.

Sara: Assistive labs.

Vitaly: Assistive labs, which is like browsers tech for screen readers, which is really need to see, as well. And I think, for me, itโ€™s really this really interesting world of other browsers, I would say because we tend to focus a lot on what are some of the fancy new features we get in Firefox and in Chrome, and in Safari.

Vitaly: Just in general, would you say that the development of screen readers is... the frequency of updates, is it similar or is it something like maybe there is a new version coming up every six months or only just once a year, because we have this comparability, right, stuff happening across browsers.

Vitaly: So, as much as it used to where youโ€™re using Firefox or Chrome, or Safari, or Edge, at this point, do you see that itโ€™s also moving in the world of screen readers towards this comparability mode... not mode, compatibility across different screens readers? Or is it... maybe you could share just a bit of light about that world and that universe of screen readers?

Sara: To be honest, Iโ€™ve never dug that deep into it. So, I havenโ€™t been monitoring, for example, screen reader updates, like how often Nvidia is updated and how often JAWS is updated. But I do know that even if JAWS or Nvidia is updated, not all screen reader users are going to update their software because theyโ€™re aware of... a lot of things may break for them.

Sara: And if they already have an environment that works, nobody wants to break something that works for them. So, I know that many screen reader users do not update their software as often as we may think that they do.

Vitaly: Right. Well, of course, talking about browsers, at this point, I do have to bring out the wonderful notion of wonderful CSS. And obviously, I do have some questions about CSS, as well. And one thing that I definitely have to ask, and I know what your answer is going to be, but I still like hearing it every single time.

Vitaly: So, I am going to bring this up. I have a feeling... well, I know that you have or maybe donโ€™t have strong feelings about CSS methodologies or frameworks, or JavaScript frameworks for that matter. Do you have any favorites, or do you not? Do you always just work with what the project requires?

Vitaly: How do you pick your battles? Would you ever use any framework or CSS framework library Tailwind, CSS and JS; I donโ€™t know. I mean, a short, no would suffice.

Sara: I canโ€™t just say no, because it depends on the project. If Iโ€™m working with a team and everyone on the team is using Tailwind, then I will definitely be using Tailwind with them. But Iโ€™ve never had to do that yet. And Iโ€™ve been super lucky with... actually, I would even say privileged with the projects that Iโ€™ve worked on so far.

Sara: So, no, I donโ€™t use any CSS frameworks. I prefer not to use them because they come with a lot of... and Iโ€™m not, not talking specifically about any particular framework here. Most of them come with a lot of overhead. And for me personally, I feel that trying to remove all the unnecessary CSS or learn something or learn it from... itโ€™s just so much faster for me to build something from scratch, literary.

Sara: Like, I have some CSS that Iโ€™ve created over the years that I moved from one project to the other, and of course, I constantly update that, and I used that. Itโ€™s like a mini, tiny framework that I used. Like, there are some utility classes that I used in there.

Sara: Some settings, I called them these settings files for setting up the type scale and the tokens for theming and all that stuff. But I would definitely rather not use a CSS framework. I donโ€™t have super strong feelings about them. I personally used a combination of BEM ITCSS and utility classes in my work.

Sara: And I only add as much CSS as I need. So, if I need a utility class, I add it to the utility class list that I have. If not, I donโ€™t just add it just in case Iโ€™m going to need it. Iโ€™m super minimal when it comes to writing CSS.

Vitaly: Right. Sorry, can you hear the voices of the wonderful people on the remote corners of the internet asking for that little framework that you have created to be open source, maybe?

Sara: I will. I do plan on doing that. Yes. The course has taken up most of my time. My website has been neglected. My blog has literally been abandoned for months, and Iโ€™m going to do... like, even the website that Iโ€™m using, I built the course website from scratch using 11T.

Sara: Iโ€™m even considering sharing that as a framework, if anyone wants to use it someday. So, a lot of stuff that I have on my to-do list, but Iโ€™m postponing all of it until after the course is released because I need to get this done.

Vitaly: Right. So, maybe letโ€™s just jump into the course. I think that weโ€™ve been speaking about it a couple of times already, but I could not be more excited to actually get this course finally released. Well, do you think you could actually share a bit of insight about whatโ€™s going to be about, when itโ€™s going to be released, and where wonderful people listening to this show can subscribe to updates to actually get it when it does get released?

Sara: Okay. Updates, subscription, e-mail, newsletter on practical-accessibility.today, that is the website for where the course is going to be hosted currently. It just includes an overview of what the course is about and a link to subscribe to the newsletter.

Sara: But hopefully next month, when the backend is finally ready... because weโ€™re doing everything from scratch, and I hired a friend of mine to build the backend and all the payment stuff into it. Once that is finished, the website is going to be updated with more details about the course. So, Iโ€™m going to introduce the course in a short video.

Sara: Thereโ€™s going to be a more detailed table of contents. I havenโ€™t shared a table of contents yet because it keeps changing a lot. Like, even yesterday I added a new section or a new chapter in between two other chapters. So, if I had shared the table of contents before, it wouldnโ€™t have been super accurate.

Sara: So hopefully, in a month... I think during the next Smashing Hour, Iโ€™m going to be making an important update on the course.

Vitaly: Oh, thatโ€™s cool. Thatโ€™s nice. Thatโ€™s nice. Can I ask you just on that point? I find it so difficult to record videos. I always see like, โ€œOh, no, no, no. I shouldnโ€™t have said that.โ€ I should brief rewind back, and then I should re-edit and then I should change.

Vitaly: And then, I keep going all the time, and it takes me, I donโ€™t know, hours to just record 10 or 15 minutes of stuff. Is it the same for you? Or do you just go?

Sara: Iโ€™m already worried about this because I havenโ€™t recorded anything final yet. Iโ€™ve only done a few, so like some testing and editing stuff. Iโ€™m starting with a course in reverse, actually. Iโ€™m not recording first. Iโ€™m going to give more details about the process and everything later, once itโ€™s finished.

Sara: But Iโ€™ve decided to do things in a different way so that when itโ€™s time to do the recordings and the editings, I hope will hopefully have eased things for myself, so that they donโ€™t take as much time. And something that I need to keep reminding myself of is because Iโ€™m a perfectionist, and that sometimes is a bad thing.

Sara: Iโ€™m just going to assume that Iโ€™m on stage in a conference and just like, I canโ€™t edit every single word I say on stage. Iโ€™m going to try to just ignore some things in the videos. Thatโ€™s going to be super difficult, especially because I know that I can edit them, but itโ€™s definitely going to take some self-discipline to do that.

Vitaly: Yeah. So, itโ€™s impossible for me. I always say like, โ€œOh, no, no, no, of course, I can go back,โ€ and surely I can come back. So, in the end, it just takes hours. But I think that we all cannot wait for the video course to be finally released and get our hands on the videos.

Vitaly: This is very, very exciting. Maybe talking about excitement, I know that there are so many wonderful new features coming to the web. I donโ€™t know when itโ€™s coming. Is it like Chrome 103 something, where we should be expecting the :has() pseudo-class coming in, container queries coming in? Itโ€™s like Christmas is coming early.

Sara: The year of CSS.

Vitaly: Yeah, the year of CSS. So, maybe you could just share a bit of light about what are you excited about at this point? What is the thing that keeps you awake at night where you think, โ€œOh, if it only was available today, I would use it all over in my projects.โ€ What would that be? Or what are you most excited about these days in CSS?

Sara: Well, CSS doesnโ€™t keep me up at night, but I do look forward to things like definitely subgrid. I know that I was one of the people who started requesting container queries years ago, and then we finally got them. But then, at this point, we were already doing a lot of intrinsic responsive design already and using flexbox and CSS grid to create responsive components that donโ€™t require container queries anymore.

Sara: Although, I mean, they are still important, and I will definitely still be using them. But probably what Iโ€™m personally more excited about is cascade layers and subgrid because almost every single project that Iโ€™ve used, especially since I worked on the Prismic Slices Project in 2019, that project changed the way I started building websites, at least for me.

Sara: It influenced the work that we did on the ?? website with Yan. And it also influences now, my own work on my website, for example. Instead of thinking of either pages or small components, there is this middle ground, which is slices.

Sara: And layout within slices always... like Iโ€™ve always wanted the ability to inherit the grit on the parent container of the parent container into the child. And so, subgrid is going to be one of the things that I will probably need even more than container queries in my work.

Sara: Cascade layers, I wouldnโ€™t say that I need it, but the way it allows me to organize my CSS, the same way the CSS is organized inside of my head, so to speak, that is one of the reasons why Iโ€™m excited about it as well.

Vitaly: Okay. And then, maybe just a few final questions to finally wrap up, just because Iโ€™m very, very curious, so Iโ€™m sure you have a couple of books lying around at this point; how do you organize your books? Are they organized by topic? Are they organized by color? I met some people doing that. How do you organize them?

Sara: By color, but not like the rainbow style color that other people do.

Vitaly: Okay. How many pencils or pens do you have on your table most of the time?

Sara: Probably two, like one or two.

Vitaly: And how many screens?

Sara: You mean for work?

Vitaly: Yes.

Sara: Right now, just two, the laptop and an external display, 32-inch.

Vitaly: Okay. Because for me, moving to a secondary display was really a deal-breaker, so itโ€™s just incredible. And then finally, one thing that I do want to ask, and itโ€™s totally unrelated, is, do you happen to have a printer?

Sara: No, I havenโ€™t had one in more than two decades, I think.

Vitaly: Yeah. Now, I feel just lonely because every time I bring this up, because I just got a printer, like what, two months ago. And Iโ€™m very proud of this because this is like me having a printer like the first time in two decades, seems like Iโ€™m the only person whoโ€™s buying printers at this point. That makes me very, very sad.

Sara: I mean, youโ€™ve lived in Germany, right, and you still do a lot of printed paperwork there, so you need it.

Vitaly: Yes, indeed. Youโ€™re absolutely right. Well, okay, now we know that. All right. So, weโ€™ve been learning a little bit about what it means to design and create more accessible interfaces today; what have you been learning about lately, Sara? Maybe one interesting insight or one unusual thing that youโ€™ve learned recently, which really changed your views, maybe itโ€™s just something that somebody said to you, which has influenced your work or just the way youโ€™re thinking about design or about development, anything in that department?

Sara: Nothing that big, but a lot of small detail.

Vitaly: Like what?

Sara: There is super technical thing.

Vitaly: Okay. So, when it comes to implementation of accessible components, and things like that.

Sara: Yeah. There are a lot of things that I learned from digging really deep into specifications. And I love that because my go-to resource to learn about almost anything starting with CSS and other things, is to go to the specifications first. And thereโ€™s so much Iโ€™ve learned from that recently.

Vitaly: All right. Excellent. Well, so, if you, dear listener, would like to hear more from Sara, you can follow her on Twitter, which is @SaraSoueidan. And also, find all her work on her website at sarasoueidan.com/.

Vitaly: And also, donโ€™t forget to subscribe to practical-accessibility.today, which as weโ€™ve heard today will be released soon. So, this is something Iโ€™m very, very much looking forward to.

Sara: In the summer, hopefully. Thatโ€™s what Iโ€™m aiming for.

Vitaly: Well, thatโ€™s fantastic news one way or the other. Well, thanks so much for joining us today, Sara. Do we have any parts in words?

Sara: Thank you for having me. Today is Global Accessibility Awareness Day. So, if there is something or one thing that you can do today, I would say go either learn something new about accessibility. Or, if you already have the knowledge, fix something on your own website or on somebody elseโ€™s website, like open a PR, or fix an issue that exists somewhere out there. Spread the word on accessibility, and subscribe to my newsletter.

vb6 form_keypress not reliable

I've got a picture box On a form in visual basic 6 and keypreview is set to true for the form. Keypress is being used to trap a letter pressed while the mouse is pointing at a particular object. A mouse version of cut and paste. But Keypress fails for most control keys. it sort of works for control C control L, control V end control L.
This ought to be trivial but apparently not.

How to Pass Arguments to Events Like On:Click in Svelte

Svelte events are the way we add interactivity to components in Svelte. A common issue with Svelte events is adding arguments to functions called within them. For example, suppose we have a basic counter, which increases any time the user clicks on it:

HTML
 
<script>
    // we write export let to say that this is a property
    // that means we can change it later!
    let x = 0;
    const addToCounter = function() {
        ++x;
    }
</script>

<button id="counter" on:click={addToCounter}>{x}</button>

This works fine, but let's say we want to change it so that we increase the counter by a certain amount whenever it is clicked. We might try changing the code to something like this:

Portfolio Architecture Examples: Data Engineering Collection

This article is a continuation of a series of posts about our project named Portfolio Architectures. The previous post, Portfolio Architecture Examples: Healthcare Collection, begins with a project overview, introduction, and examples of tooling and workshops available for the project.  You may want to refer back to that post to gain insight into the background of Portfolio architecture before reading further. 

Data Engineering Collection

The collection featured today is centered around architectures leveraging data engineering concepts and tooling. There are currently eight architectures in this collection and we'll provide a short overview of each, leaving the in-depth exploration as an exercise for the reader.

Flipping products on Amazon to Ebay

So I just released a video about flipping products on Amazon and selling them on eBay. Then use SwagBucks to recover a fraction of the cost.

The first question is about eBay listings.
Is there a limit to the number of eBay listings that you can have?
If so, how do you deal with the competition?

Second, will US citizens have an unfair advantage over people living outside the US?

I'm giving much more clarity and context about what I learned and what I mean in that video, but basically, if you're limited to the number of listings, then you really need to know that the demand is high enough and the supply is low enough to make it worth putting it on eBay.

Maybe it only works for people that already have a website and a decent following. For example, I use Fiverr and Etsy as examples. Fiverr has a limit on the number of gigs that you can have. People resort to, for example, sending fake visitors to manipulate Fiverr's algorithm.

I did some research on Etsy a while ago to give people a clear idea of how fierce the competition is. I created a tool to scan a couple of thousand accounts, and I found that less than 3% were actually able to sell anything on Etsy in a time span of about 6 months. So the failure rate is huge, and it is just ridiculous, in my opinion, how people haphazardly recommend Etsy and Fiverr as a way to earn extra cash.

What Is the Future of Manual Testing?

Manual testing is considered the preliminary testing phase which generally evaluates the behavior of the app developed, by performing the step-by-step assessment of the requirement specification analysis record. The prime objective of manual testing is to ensure that the app works extraordinarily and fine without any sort of bugs and functional defects and also as per the requirement specification documents.

Well, the future of manual testing tends to bit closer and closer to Software Development in functioning and requirements. The modification and operational developments in manual testing prove that it is necessary for manual testers for improving their skills and daily working styles.

Android Native – How to use CountingIdlingResource in Espresso tests

Introduction ##

When working with Espresso tests, you might have found it hard to make Espresso wait for background tasks to complete before performing other actions or assertions. Fortunately, the classes in the Espresso idling package exist to cover this use case.

In this tutorial, we will learn how to use one of those classes called CountingIdlingResource.

Goals

At the end of the tutorial, you would have learned:

  1. How to use CountingIdlingResource in Espresso tests.
Tools Required
  1. Android Studio. The version used in this tutorial is Android Studio Chipmunk 2021.2.1 Patch 1.
Prerequisite Knowledge
  1. Intermediate Android.
  2. Basic Espresso.
  3. Basic understanding of async operations.
Project Setup

To follow along with the tutorial, perform the steps below:

  1. Create a new Android project with the default Empty Activity.

  2. Add the dependencies below into your module build.gradle file.

     implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.1'
     implementation 'androidx.test.espresso:espresso-idling-resource:3.4.0'
     androidTestImplementation 'androidx.test:runner:1.4.0'
     androidTestImplementation 'androidx.test:rules:1.4.0'
  3. Replace activity_main.xml with the code below. We simply changed the textSize and added an android:id to TextView.

     <?xml version="1.0" encoding="utf-8"?>
     <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        tools:context=".MainActivity">
    
        <TextView
            android:id="@+id/textView_helloWorld"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Hello World!"
            android:textSize="32sp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />
    
     </androidx.constraintlayout.widget.ConstraintLayout>
  4. Replace the entire class ExampleInstrumentedTest with the code below. Besides the commented out lines, it is just a simple Espresso test that performs a click on the TextView, and then verifies that the new text content is correct. You do not have to understand the commented out parts for now.

     @RunWith(AndroidJUnit4::class)
     class ExampleInstrumentedTest {
    
        //Gets the IdlingRegistry singleton
        //private val idlingResourceRegistry = IdlingRegistry.getInstance()
    
        @get:Rule
        val activityRule = ActivityScenarioRule(MainActivity::class.java)
    
        @Test
        fun doAsyncTest(){
            //Register the CountingIdlingResource before click()
            //idlingResourceRegistry.register(countingIdlingResource)
    
            onView(withId(R.id.textView_helloWorld))
                .perform(click())
                .check(matches(withText("WorldHello!")))
        }
    
     /*    @After
        fun unregisterIdlingResources(){
            //Unregisters the CountingIdlingResource
            idlingResourceRegistry.resources.forEach {
                idlingResourceRegistry.unregister(it)
            }
        }*/
     }
  5. Create a new class called HttpClient using the code below. This class contains a single function that will suspend for three seconds, and then assign a new text value to a TextView object.

     class HttpClient {
        fun doLongAsync(textView: TextView) {
            //Incrementing counter when work starts
            //countingIdlingResource.increment()
    
            CoroutineScope(Dispatchers.Main).launch {
                delay(3000)
                textView.text = "WorldHello!"
                //countingIdlingResource.decrement()
            }
        }
     }
  6. In the same file, add the singleton below. You do not need to understand it for now.

     /*
     We can use a global singleton for this project because
     We don't have more than one test using this IdlingResourceCounter
     It is recommended to add IdlingResourceCounter directly into your
     Production code
     */
     object IdlingResourceCounter {
        private const val IDLING_RESOURCE_NAME = "GlobalIdlingResourceCounter"
        val countingIdlingResource = CountingIdlingResource(IDLING_RESOURCE_NAME)
     }
  7. Finally, append the code below to MainActivity#onCreate().

     val textView = findViewById<TextView>(R.id.textView_helloWorld)
    
     val httpClient = HttpClient()
    
     textView.setOnClickListener {
        //Don't pass a View to a Service in a real app!
        httpClient.doLongAsync(it as TextView)
     }
Project Overview

The tutorial app contains a single TextView, after clicking on it and waits for 3 seconds, then its value will change to WorldHello! from Hello World!.

WorldHello.gif

Now let us look at the instrument test doAsyncTest() in ExampleInstrumentedTest.

Failed_Instrument_Test.gif

doAsyncTest() will fail because Espresso is not aware of the background task.

androidx.test.espresso.base.DefaultFailureHandler$AssertionFailedWithCauseError: 'an instance of android.widget.TextView and view.getText() with or without transformation to match: is "WorldHello!"' doesn't match the selected view.
Expected: an instance of android.widget.TextView and view.getText() with or without transformation to match: is "WorldHello!"

It tries to check for the WorldHello! value immediately after clicking on the TextView. There are only three conditions where Espresso will wait:

  1. The MessageQueue is empty.
  2. There is no running AsyncTask.
  3. There is no idling resource. CountingIdlingResource is one of such resources that we are learning about in this tutorial.
Creating the CountingIdlingResource object

The object IdlingResourceCounter contains a public field called countingIdlingResource, which is an instance of CountingIdlingResource. The only argument that the CountingIdlingResource constructor requires is a String value that explains what the instance of CountingIdlingResource is used for.

object IdlingResourceCounter {
    private const val IDLING_RESOURCE_NAME = "GlobalIdlingResourceCounter"
    val countingIdlingResource = CountingIdlingResource(IDLING_RESOURCE_NAME)
}

We are only able to use a global object in this tutorial because we only have one test. It is recommended that you provide a CountingIdlingResource for each instance of your async-worker class.

CountingIdlingResource and Service class

Your Service or Repository classes should increment() the counter when starting long-running async work and decrement() the counter when the work is complete. To achieve this, uncomment the respective lines in the HttpClient class, so it should look like the code below.

class HttpClient {
   fun doLongAsync(textView: TextView) {
       //Incrementing counter when work starts
       countingIdlingResource.increment()

       CoroutineScope(Dispatchers.Main).launch {
           delay(3000)
           textView.text = "WorldHello!"
           countingIdlingResource.decrement()
       }
   }
}
Register CountingIdlingResource to IdlingResourceRegistry

Simply having a working CountingIdlingResource is not enough. We still have to register the CountingIdlingResource instance to the IdlingResourceRegistry. IdlingResourceRegistry is a singleton. We already have the code to retrieve it in ExampleInstrumentedTest, so retrieve it by uncomment the line of code below.

private val idlingResourceRegistry = IdlingRegistry.getInstance()

Now that we have the IdlingResourceRegistry, we can register CountingIdlingResource to it by uncommenting this line of code inside doAsyncTest().

idlingResourceRegistry.register(countingIdlingResource)

We also have to unregister the idling resource after the test is done, so uncomment the function unregisterIdlingResources() as well.

@After
fun unregisterIdlingResources(){
   //Unregisters the CountingIdlingResource
   idlingResourceRegistry.resources.forEach {
       idlingResourceRegistry.unregister(it)
   }
}

We should have everything we need for a working test. If we run the test now, we can see that Espresso will wait for 3 seconds before performing the check().

Passed_Idling_Resource_Test.gif

Solution Code

ExampleInstrumentedTest.kt

@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {

   //Gets the IdlingRegistry singleton
   private val idlingResourceRegistry = IdlingRegistry.getInstance()

   @get:Rule
   val activityRule = ActivityScenarioRule(MainActivity::class.java)

   @Test
   fun doAsyncTest(){
       //Register the CountingIdlingResource before click()
       idlingResourceRegistry.register(countingIdlingResource)

       onView(withId(R.id.textView_helloWorld))
           .perform(click())
           .check(matches(withText("WorldHello!")))
   }

   @After
   fun unregisterIdlingResources(){
       //Unregisters the CountingIdlingResource
       idlingResourceRegistry.resources.forEach {
           idlingResourceRegistry.unregister(it)
       }
   }
}

HttpClient.kt

class HttpClient {
   fun doLongAsync(textView: TextView) {
       //Incrementing counter when work starts
       countingIdlingResource.increment()

       CoroutineScope(Dispatchers.Main).launch {
           delay(3000)
           textView.text = "WorldHello!"
           countingIdlingResource.decrement()
       }
   }
}

/*
We can use a global singleton for this project because
We don't have more than one test using this IdlingResourceCounter
It is recommended to add IdlingResourceCounter directly into your
Production code
*/
object IdlingResourceCounter {
   private const val IDLING_RESOURCE_NAME = "GlobalIdlingResourceCounter"
   val countingIdlingResource = CountingIdlingResource(IDLING_RESOURCE_NAME)
}

MainActivity.kt

class MainActivity : AppCompatActivity() {
   override fun onCreate(savedInstanceState: Bundle?) {
       super.onCreate(savedInstanceState)
       setContentView(R.layout.activity_main)

       val textView = findViewById<TextView>(R.id.textView_helloWorld)

       val httpClient = HttpClient()

       textView.setOnClickListener {
           //Don't pass a View to a Service in a real app!
           httpClient.doLongAsync(it as TextView)
       }
   }
}

activity_main.xml

<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
   xmlns:app="http://schemas.android.com/apk/res-auto"
   xmlns:tools="http://schemas.android.com/tools"
   android:layout_width="match_parent"
   android:layout_height="match_parent"
   tools:context=".MainActivity">

   <TextView
       android:id="@+id/textView_helloWorld"
       android:layout_width="wrap_content"
       android:layout_height="wrap_content"
       android:text="Hello World!"
       android:textSize="32sp"
       app:layout_constraintBottom_toBottomOf="parent"
       app:layout_constraintEnd_toEndOf="parent"
       app:layout_constraintStart_toStartOf="parent"
       app:layout_constraintTop_toTopOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>

Module build.gradle

plugins {
   id 'com.android.application'
   id 'org.jetbrains.kotlin.android'
}

android {
   compileSdk 32

   defaultConfig {
       applicationId "com.example.daniwebandroidcountingidlingresource"
       minSdk 21
       targetSdk 32
       versionCode 1
       versionName "1.0"

       testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
   }

   buildTypes {
       release {
           minifyEnabled false
           proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
       }
   }
   compileOptions {
       sourceCompatibility JavaVersion.VERSION_1_8
       targetCompatibility JavaVersion.VERSION_1_8
   }
   kotlinOptions {
       jvmTarget = '1.8'
   }
}

dependencies {

   implementation 'androidx.core:core-ktx:1.7.0'
   implementation 'androidx.appcompat:appcompat:1.4.1'
   implementation 'com.google.android.material:material:1.6.0'
   implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
   implementation 'androidx.test.espresso:espresso-idling-resource:3.4.0'
   testImplementation 'junit:junit:4.13.2'
   androidTestImplementation 'androidx.test.ext:junit:1.1.3'
   androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
   androidTestImplementation 'androidx.test:runner:1.4.0'
   androidTestImplementation 'androidx.test:rules:1.4.0'
   implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.1'

}
Summary

We have learned how to use CountingIdlingResource to make Espresso wait in this tutorial. The full project code can be found at https://github.com/dmitrilc/DaniwebAndroidCountingIdlingResource.

The Most Useful Twitter Bots

Useful Twitter Bots

Set reminders with @RemindMe_OfThis

An open-source Twitter bot that lets you easily set reminders for public tweets. Mention @RemindMe_OfThis in the reply of any tweet and specify the time in natural English when you would like to reminded of that tweet.

You could say things like in 2 days or in 12 hours or next week or even in 5 years. Check out the source on Github.

Save Twitter Threads with @ThreadReaderApp

The gurus on Twitter have figured out that threads are the best way to extend the reach of their tweets and @ThreadReaderApp makes is really easy for you read and save these threads.

To get started, reply to any tweet of a thread and mention @threadreaderapp with the โ€œunrollโ€ keyword. and they create a single page with all the tweets arranged in chronologicusefual order. Blog posts anyone?

Also see: Search Twitter Like a Pro

Capture Screenshots with @pikaso_me

Reply to a tweet with the word โ€œscreenshot thisโ€ and mention @pikaso_me in the reply. Youโ€™ll receive a reply tweet with a screenshot image of the original tweet.

The twitter bot capture images in tweets but you can also use Screenshot Guru for that.

Download Videos with @DownloaderBot

You can easily download any video or GIF image from tweets with the help of this Twitter bot.

Mention @DownloaderBot in a reply to any tweet that contains either a video or a gif image, and you will receive a reply with the direct link to download the media.

Twitter, like YouTube, may have a love-hate relationship with bots that allow downloading videos off their platform so it is always a good idea to bookmarks some alternatives. Thereโ€™s @GetVideoBot, @SendVidBot and @Get_This_V.

Also see: Create your own Twitter Bots

Current Launches Financial Technology API platform

Current, a financial technology platform serving Americans working to create a better future for themselves, today announced the launch of its platform API, built to facilitate seamless integrations and embedded banking experiences.

Plaid is the first-ever partner and will provide Current members access to a credential-less open finance experience.

How to Secure Webhook Endpoints With HMAC

Webhooks are ubiquitous in SaaS integrations, and thereโ€™s a good reason for that. They are a simple and speedy way to transfer data via HTTP callbacks between systems based on changes to data in those systems. 

In this post, weโ€™ll describe the recommended approach. But first, letโ€™s lay some groundwork.

Top 7 Unique WordPress Hosts: Best WP Hosting in 2022

WordPress is arguably one of the greatest inventions in the history of the world wide web! It has enabled anyone, including total beginners, to easily create and manage websites on their own and without doing any coding work. And the best part of it is that itโ€™s completely free and open source.

Most websites nowadays are powered by WordPress, and it shouldnโ€™t take a lot of thinking to go with this highly flexible and customizable content management system for any type of website you intend to create. But what does require a lot more careful consideration is the web hosting service youโ€™re going to use for your WP website, and thatโ€™s what this article is all about.

If you are tired of seeing the same old, oversold hosts on most review sites, this might just be the right place for you to discover some of the truly outstanding companies that may have been hidden from you in case you didnโ€™t dig deep enough.

Without any further ado, the following are seven of the best WordPress hosting providers that are worth checking out this year.

Quick List: Top WP Hosts

ScalaHosting โ€” Best all-around for professional sites

KnownHost โ€” Best managed WP hosting for beginners

Rocket โ€” Fastest managed WordPress for small business

ChemiCloud โ€” Extra helpful support team

HostArmada โ€” Best built-in security features

Krystal โ€” Best UK-based provider

Ethernet Servers โ€” Best budget plans

Letโ€™s have a closer look at each of these companies and discuss their main pros and cons.

1. ScalaHosting: Best all-around for professional sites

ScalaHosting offers solid shared and VPS hosting services, but itโ€™s the latter that they really stand out for. If you have an established business site or just launching a new one, you should seriously consider getting a VPS from these guys. They have customizable and scalable plans that suit any website of any size.

If you are starting small, you probably want to go with one of the shared WordPress hosting plans they offer, which come with plenty of resources. But if you want a more powerful solution, their managed VPS service with the LiteSpeed web server (add-on) would be a great choice. This also comes with the option to use their own free SPanel control panel instead of cPanel.

As for technical support, ScalaHostingโ€™s 24/7 live chat team does an excellent job at providing quick answers and solutions to any technical issues you may be facing. While senior engineers may only be available during business hours, you will always find someone via live chat to handle urgent requests no matter what time of the day it is.

Pros

  • Solid infrastructure with fast SSD storage
  • Free domain for the first year
  • Free Letโ€™s Encrypt SSL certificate
  • Unlimited bandwidth
  • Daily remote backups
  • 1-click WordPress installation
  • 99.9% uptime guarantee
  • Responsive live chat support

Cons

  • Monthly billing only available for VPS
  • Phone support is only for sales

Pricing

The entry-level WP Mini plan costs $9.95 per month with annual billing. A discounted price of $6.95 per month applies to the first invoice only. Automatic discounts are applied to biennial and triennial billing cycles.

Visit the official ScalaHosting website to learn more!

2. KnownHost: Best managed WP hosting for beginners

KnownHost is a highly reputable company among the webmaster community with plenty of positive experiences shared by real users on Reddit, Web Hosting Talk, and other community/social sites. They have several types of hosting services including regular shared plans, managed WordPress, VPS, cloud, and dedicated servers.

The managed WP option is perfect for beginners as most of the technical aspects of installing, updating and securing WordPress are taken care of by the support team. Their servers are powered by the LiteSpeed web server, which results in significant improvement in performance and loading speed when used alongside the free LS Cache plugin. Advanced security scanning and protection by Imunify360 is provided for free.

And one of the top reasons to choose this company is their professional support team that is based in the US. This is something a lot of their customers appreciate, especially those who have had frustrating experiences with the typical outsourced, poorly-trained support agents that other โ€œpopularโ€ hosts have.

Pros

  • Managed WordPress hosting
  • Fast LiteSpeed server and cache
  • Free SSL certificate (Letโ€™s Encrypt)
  • Malware and DDoS protection
  • Unlimited bandwidth
  • Staging environment
  • 99.99% uptime
  • Expert 24/7 US-based support

Cons

  • No free domain name
  • Live chat not always available

Pricing

The entry-level plan costs $11.95 per month. You get a one-time 50% discount if you sign up for a yearly billing term.

Visit the official KnownHost website to learn more!

3. Rocket: Fastest managed WordPress for small business

Rocket isnโ€™t one of those gigantic โ€œanything goesโ€ hosting companies, but rather a fully managed WordPress hosting platform that is exclusively built and optimized for this content management system. Because they only host WordPress sites, theyโ€™ve fine-tuned their servers to provide optimal performance, speed, and security right out of the box.

If youโ€™re looking for super-fast WordPress hosting, Rocketโ€™s Edge network with the build-in Cloudflare Enterprise CDN offers you one of the fastest solutions youโ€™ll ever find. And the support team is just as impressive with their quick responses and helpfulness. Even the CEO of the company himself can sometimes get involved with answering live chat requests.

On the downside, they donโ€™t currently offer email hosting, so if youโ€™d like to create custom email addresses for your domain name, youโ€™ll have to use a third-party email service, such as Google Workspace, Microsoft 365, Zoho, etc. Youโ€™ll also have to use a third-party DNS service since they donโ€™t offer DNS services either.

This premium solution is mainly targeted at small business, e-commerce, and agency sites that receive a substantial amount of traffic. If you only have a small blog/site, you probably want to consider another more affordable provider since this one may be an overkill.

Pros

  • Fully managed WordPress hosting
  • Fast global network (20+ locations)
  • Built-in Cloudflare Enterprise CDN
  • Real-time malware protection
  • Website firewall
  • Automatic daily backups
  • Staging sites
  • Transparent company
  • Excellent 24/7 live chat support

Cons

  • Not for those on a tight budget
  • No DNS services
  • No email services

Pricing

The Starter plan costs $30 per month and includes 10 GB disk space and 50 GB bandwidth. Discounts are automatically applied to annual billing terms. All plans come with a 30-day money-back guarantee.

Visit the official Rocket website to learn more!

4. ChemiCloud: Extra helpful support team

ChemiCloud may not have been in business for as long as some of the other big names in the industry, but theyโ€™ve steadily built a reputation as one of the most reliable web hosting providers out there. They particularly appeal to beginners who have limited technical skills because of their extremely helpful and friendly support team.

Their shared hosting plans include generous resources, advanced security protection, free backups, and the premium LiteSpeed web server. The redundant cloud infrastructure they utilize comes with a 99.99% uptime guarantee and proactive server monitoring to ensure optimal performance.

Pros

  • Fast servers using LiteSpeed
  • Cloud technology with 99.99% uptime
  • Free domain for first year
  • Account isolation
  • Daily backups
  • Network firewall and monitoring
  • Multiple server locations
  • Friendly live chat support

Cons

  • No discounts on monthly terms

Pricing

The WordPress Starter plan offers 20 GB SSD storage and costs $12.95 per month. If you pay annually, you get a 50% one-time discount on the first invoice.

Visit the official ChemiCloud website to learn more!

5. HostArmada: Best built-in security features

HostArmada is another trustworthy company you donโ€™t often hear much about on review sites, not because they arenโ€™t worth a mention (they sure are), but because they donโ€™t engage in aggressive affiliate marketing campaigns like many of their competitors do. They seem more focused on maintaining a stable and secure hosting environment, and they do a great job at that.

The WordPress plans by HostArmada are powered by highly available cloud technology and fast SSD storage. Each plan includes comprehensive real-time security protection by Imunify360 at no extra cost.

The high-end plan (Speed Reaper) comes with the LiteSpeed web server, dynamic caching, and increased server resources (RAM and CPU), making it a very decent choice for small business sites. If you have a large e-commerce store and need something more powerful with dedicated server resources, they also have outstanding cloud VPS services.

Pros

  • Cloud servers with ample resources
  • Free domain for one year
  • Malware scanning and removal
  • Security firewalls
  • Static and dynamic caching
  • Daily offsite backups
  • Different server locations
  • Knowledgeable support team

Cons

  • No money-back guarantee for monthly billing

Pricing

Plans start from $12.95 per month with 15 GB SSD disk space in the Start Dock plan. Their regular one-time discount offerings can save you a considerable amount of money if you choose an annual, biennial or triennial billing cycle.

Visit the official HostArmada website to learn more!

6. Krystal: Best UK-based provider

Krystal is one of the most professional web hosting companies in the UK, with managed WordPress hosting being one of their main strengths. Most of their customers are apparently from the UK, but they also accept customers from Europe, North America, and a few other locations.

With a robust cloud infrastructure and fast NVMe SSD storage, Krystalโ€™s managed WP solution is highly recommended for small business websites that receive a considerable number of visitors. They do have normal shared hosting plans, but the managed WP option comes with everything fully configured and ready to go right away.

Pros

  • Fast and redundant cloud servers
  • NVMe SSD storage
  • Daily and hourly backups
  • Staging environment
  • DDoS protection
  • 99.99% uptime guarantee
  • Skilled UK-based support team

Cons

  • Email is a paid add-on
  • Managed WP only available in UK data center
  • Not open to all countries

Pricing

The Personal plan costs ยฃ17.99 per month (including VAT) and itโ€™s good for one or two websites that receive up to about 20K monthly visitors.

Visit the official Krystal website to learn more!

7. Ethernet Servers: Best budget plans

If your quest is for a relatively cheap hosting service that is reliable and comes with excellent technical support, you wonโ€™t find many companies that do it better than Ethernet Servers! This is another UK-based company, but you can pick from seven worldwide server locations that include the USA, UK, Germany, France, and others.

Their NVMe SSD-powered servers run the CloudLinux OS with LiteSpeed, in addition to full account isolation by CageFS and real-time malware protection by Imunify360. On top of that, their around-the-clock support service is simply amazing at quickly responding and fixing issues.

You wonโ€™t likely get a better service elsewhere at such a low price, so if youโ€™re starting out with a small budget, this is one of the best places to consider hosting your website with.

Pros

  • Cheap and reliable shared hosting
  • Super fast NVMe SSD storage
  • LiteSpeed web server and cache
  • Free SSL certificate
  • Full account isolation
  • Premium malware protection
  • Multiple payment options
  • Quick and helpful support team

Cons

  • No managed WordPress plans
  • Site design is a little outdated

Pricing

The Silver plan costs $2.95 per month and provides 15 GB SSD storage. If you pay annually, the price becomes $2.51 per month or about $30 per year.

Visit the official Ethernet Servers website to learn more!

What to Look For in a WordPress Hosting Service

Trying to settle on one web hosting company can be a tedious task with so many options out there, each of which claiming to be the best. There are some general factors that you should keep in mind while sifting through different providers in order to narrow down your choices and eventually pick the most suitable service.

The following are a few of the most crucial criteria to consider when searching for a host for your WordPress website.

Cloud infrastructure: Cloud computing is the future and most modern web hosts build their services on cloud technology. The high availability, redundancy, flexibility, and scalability of cloud servers make it imperative for professional website owners to seek this type of hosting.

Uptime guarantee: Frequent downtime isnโ€™t only frustrating for the siteโ€™s owner and visitors, it can also negatively impact search engine rankings. Any company that doesnโ€™t give you an uptime guarantee of at least 99.9% isnโ€™t worth your time and money these days! And with the help of a content delivery network (CDN), you can expect 100% guaranteed uptime.

Fast storage: As websites become more complex and dynamic, the speed at which data is read from and written to the serverโ€™s storage device can have a dramatic impact on the websiteโ€™s loading speed. HDD storage wonโ€™t quite cut it if you want to stay competitive in terms of user experience. Opt for the much faster SSD storage, or better, NVMe-based SSD.

Server caching: Properly configured server-level caching systems can significantly reduce the load on your serverโ€™s precious resources and result in noticeably faster loading of your websiteโ€™s content. The LiteSpeed web server offers a big advantage in this regard with the help of its free WP-optimized caching plugin.

Automatic backups: The importance of keeping daily backups of your websiteโ€™s files and databases cannot be overstated. A simple glitch in the hardware or software of your server, or an unintended human mistake can wreak havoc on your website. It is critical that your hosting service includes automatic daily backups with the ability to instantly restore your site to a recent backup point.

Security: There are different measures and tools that can be implemented at the network level, server level, and website level to ensure optimal security. Features such as a firewall, malware scanning and removal, DDoS protection, brute force protection, and others are quite standard with managed hosting services. Some companies also provide custom WordPress-specific security enhancements.

Support service: Almost every company nowadays boasts about their 24/7 technical support service, but there are two key questions to ask here: Is it really 24/7 or is that just a marketing cliche, and, how helpful is their support team? Try to contact them outside of their normal business hours with some highly technical questions to see how quickly and how thoroughly they answer.

The Benefits of Managed WordPress Hosting

There has been increasing demand for managed WordPress hosting in recent years as opposed to normal shared hosting. There are a few advantages that a managed service offers, but itโ€™s important to note that this term is used loosely and so the specific features you get may greatly vary from one company to another.

Generally speaking, most of the technical aspects of installing, updating, securing, and optimizing the performance of a WordPress site will be handled by the company when you go with a managed plan. This usually also comes with hands-on technical support that involves fixing various issues related to WordPress (code, plugins, themes, etc.)

Managed WP is an ideal choice for beginners who lack the technical knowledge to install and maintain the system on their own, as well as small business owners who prefer to spend their time on growing their business rather than worrying about routine technical tasks.

On the negative side, managed platforms often have certain restrictions on server access and the ability to make changes to specific server systems or configurations. Itโ€™s also more costly than normal hosting, which is why many price-conscious and tech-savvy users shy away from it.

Developers and experienced webmasters may not mind spending some extra time doing the technical tasks themselves, so a lot of them usually prefer the more cost-effective option of normal shared or VPS hosting. If you are interested in growing your skills while learning how to do things on your own, you probably want to do the same. Ultimately, itโ€™s a matter of priorities and determining whatโ€™s more important to you and your project.

Disclaimer: This branded story was provided by Geeky Way. Some of the links in the post above are affiliate links, which may result in a commission paid to the author at no additional cost to you. All opinions expressed herein are those of the author and were not paid for by any of the mentioned companies. Your support is much appreciated and helps us continue researching and creating useful content for website owners.

The post Top 7 Unique WordPress Hosts: Best WP Hosting in 2022 appeared first on Codrops.