Tests that mimic user behavior help us create better software products

Image for post
Image for post
Photo by Ferenc Almasi on Unsplash

Testing is an important part of software development. Although testing is still sometimes regarded as an afterthought, especially in time-critical projects, methodologies like Test-driven development (TDD) and improved tooling for testing have done a lot in recent years to rectify this.

There are great testing frameworks out there for writing unit tests, component tests, and end-to-end tests in web projects. For UI testing end-to-end testing frameworks like Cypress or Selenium are often used. As with all things, there are good and bad things about end-to-end tests:

  • Initially, end-to-end tests seem easy to write. However, it’s easy to write brittle end-to-end tests that have to be adapted whenever there are UI changes. …

Making Angular aware of changes in component tests

Neon sign that reads “Change”
Neon sign that reads “Change”
Photo by Ross Findon on Unsplash.

The Angular framework does a lot under the hood to detect changes and update the UI accordingly. Similarly to other frameworks like React or Vue.js, Angular supports data binding to always show the latest data.

While Angular is already a fast framework, we can always improve things. One improvement idea is to reduce the amount of change detection work to keep the UI as smooth as possible. For Angular components, there are two change detection strategies available:

  • Default uses the default CheckAlways strategy in which change detection is automatic until explicitly deactivated. …

Receive less spam emails while still providing an email to your visitors

Image for post
Image for post
Photo by Miles Burke on Unsplash

Most web pages offer a contact form for visitors to reach out to them. Often, web pages also include the contact email and a contact phone number in plain text so you can directly call them or write them an email in your favorite email client.

This is not bad per se as you can provide people multiple ways to contact you. However, if you need to make your phone or email available as plain text on your web page, then you should guard it to avoid crawlers used by shady people to add you to their spam list.

Here are two basic ways I can think of to solve this…


Three ways to solve this problem which really shouldn’t be a problem in the first place

A table
A table
Photo by Markus Spiske on Unsplash

One disadvantage the web has compared to mobile platforms like Apple iOS and Android: without third-party libraries, developers only have rather basic UI controls to start with. While HTML5 provides a lot of semantic elements to express even complex layouts and respecting accessibility, the default UI controls haven’t kept up with time that well. Either it’s the style that looks outdated (though the Google Chrome and Microsoft Edge teams have started an initiative to improve the default UI controls) or the functionality is too limited by today’s standards.

Let’s take the<table> element as an example. Even if the default style is rather basic, a pure HTML5 table gets the job of displaying data in a tabular view done. However, it lacks functionality and usability that one might expect in a modern…


Great products can take years to build—here’s another solution.

Hand-drawn screens of a prototype for an app
Hand-drawn screens of a prototype for an app
Photo by Amélie Mourichon on Unsplash

There are constantly new products by fresh startups as well as big corporations coming to the market. Some of them took years to build while others have been built in a couple of weeks.

In an environment where the only constant is change (e.g. in the tech industry), you may not be able to afford to take too long to enter the market. But great products can take years to build and can cost a lot of money and resources. Some companies can afford this but many can’t.

This brings us to the idea of prototyping and creating an MVP.

In this post, I’m going to briefly explain the idea behind prototyping and MVPs. The, we’ll look at why a Lean Stack helps with creating a good prototype and converting it to a real product. …


Create Prototypes and MVPs that turn into great Products

Wall with many post-its.
Wall with many post-its.
Photo by Daria Nepriakhina on Unsplash

There are constantly new products by fresh startups as well as big corporations coming to the market. Some of them took years to build while others have been built in a couple of weeks. In an environment where the only constant is change (e.g. in the tech industry) you may not be able to afford to take too long to enter the market. But great products can take years to build and can cost a lot of money and resources. Some companies can afford this but many can’t. This brings us to the idea of prototyping and creating a MVP.

According to Wikipedia, a minimum viable product (MVP) is a version of a product with just enough features to satisfy early customers and provide feedback for future product development. Unlike a MVP, prototypes usually do not make it to the market, but they still get to be in the customer’s hands. Building a prototype helps you get a sneak-peek at how real people will interact with your product. The development team can gather the customers’ feedback and make changes to the prototype or just create a new one. …


Speed up your builds and reduce used disk space

Speedometer
Speedometer
Photo by Chris Liverani on Unsplash.

Many JavaScript projects rely on a lot of third-party packages. Some of them are required (e.g. a component library like Bootstrap), while others are only useful for developing (e.g. tooling like ESLint). Many packages depend on other libraries that are often referenced in famous memes about the node_modules folder being way too big sometimes. After all, some projects include dependencies that are barely used (e.g. for one custom NPM script), but they are still installed every time.

node_modules is often big
node_modules is often big
Meme from Reddit.

Not only can bigger projects consume a lot of disk space, but as a consequence, the installation times can be longer. Some popular packages like Puppeteer or Cypress may download large binaries in order to work. As long as you are not resetting your development environment every day and you have enough disk space, this may not be a problem at all. …


People working on a prototype using digital and classic tools
People working on a prototype using digital and classic tools
Photo by Amélie Mourichon on Unsplash

There are constantly new products by fresh startups as well as big corporations coming to the market. Some of them took years to build while others have been built in a couple of weeks. In an environment where the only constant is change (e.g. in the tech industry) you may not be able to afford to take too long to enter the market. But great products can take years to build and can cost a lot of money and resources. Some companies can afford this but many can’t.

This brings us to the idea of prototyping and creating a MVP.

Why can Prototyping be helpful?

According to Wikipedia, a minimum viable product (MVP) is a version of a product with just enough features to satisfy early customers and provide feedback for future product development. Unlike a MVP, prototypes usually do not make it to the market, but they still get to be in the customer’s hands. Building a prototype helps you get a sneak-peek at how real people will interact with your product. The development team can gather the customers’ feedback and make changes to the prototype or just create a new one. …


Avoid this issue when working with style sheets in your web app

Two horses.
Two horses.
Photo by Graham Ruttan on Unsplash.

Recently, a few customers ran into a problem in an Angular web application where an exception was thrown. Because of this problem, you couldn’t use a major part of the application. As a developer, I want to have clear instructions on how to reproduce an issue to not waste time. Good customer support or customers willing to share more details beyond “It isn’t working for me” can provide meaningful information to make the life of developers easier. Customer support wasn’t able to reproduce the issue on their devices, yet it was consistently happening for a few customers.

When this issue was brought up, I did what I typically do when encountering issues like this. This article is about this particular problem as well as debugging critical issues. …


Image for post
Image for post
Photo by Anastasia Dulgier on Unsplash

A beta customer once approached us because he was unable to login in to our Angular web application. The page was loading but any HTTP requests to our API failed. After talking to the customer we found that their company is using IP restrictions. Therefore, he wanted to know if we could provide static IPs which they could add on their side to allow using our application in their company.

Unfortunately, our cloud platform of choice (Render) did not directly support this feature yet at that point of time. Hence, we could not provide a definite list of IPs that would never change. That’s why we had to look for a product which could provide static IPs. Changing our cloud platform was off the table as we are quite happy with it even to this day. …

About

Ali Kamalizade

Senior Software Engineer @LeanIX. Co-founder of Sedeo. Passion for software engineering and startups. Looking forward to build great things. 有難うございます。🚀

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store