Welcome to curated list of handpicked free online resources related to IT, cloud, Big Data, programming languages, Devops. Fresh news and community maintained list of links updated daily. Like what you see? [ Join our newsletter ]

How to send emails with SendGrid in Next.js: Complete guide

Categories

Tags frontend web-development how-to javascript

As a developer, you may need to send emails from your application for a variety of reasons, such as sending notifications or user verification emails. In this article, we will explore how to send emails from a Next.js API using SendGrid. By @TechZilla.

This tutorial then covers:

  • Prerequisites
  • Setting up SendGrid
  • Setting Up a Next.js App
  • Installing Dependencies
  • Sending Emails from Next.js API

Sending emails from a Next.js API using SendGrid is a straightforward process that can greatly enhance the functionality and usability of your web application. By following the steps outlined in this guide, you can quickly and easily integrate SendGrid into your Next.js API and start sending customized, professional-looking emails to your users. Good read!

[Read More]

How to handle errors in React: full guide

Categories

Tags programming frontend web-development react javascript

We all want our apps to be stable, to work perfectly, and cater to every edge case imaginable, isn’t it? But the sad reality is we are all humans (at least that is my assumption), we all make mistakes, and there is no such thing as a bug-free code. By Nadia Makarevich.

So let’s take a look at error handling in React. What we can do if an error happens, what are the caveats of different approaches to error catching, and how to mitigate them:

  • Why we should catch errors in React
  • Remembering how to catch errors in javascript
  • Simple try/catch in React: how to and caveats
  • React ErrorBoundary component
  • ErrorBoundary component: limitations
  • Catching async errors with ErrorBoundary
  • Can I just use react-error-boundary instead?

Starting from version 16, an error thrown during React lifecycle will cause the entire app to unmount itself if not stopped. Before that, components would be preserved on the screen, even if malformed and misbehaved. Now, an unfortunate uncaught error in some insignificant part of the UI, or even some external library that you have no control over, can destroy the entire page and render an empty screen for everyone. Good read!

[Read More]

Various debugging methods in OpenResty

Categories

Tags programming performance devops distributed apis

In OpenResty’s communication group, developers often ask this question: How do debug in OpenResty? As far as I know, there are some tools in OpenResty that support breakpoint debugging, including a plugin in VSCode, but they are not widely used so far. Including the author agentzh and a few contributors I know, everyone uses the simplest ngx.log and ngx.say to do debugging. By @api7.ai.

In the OpenResty world, SystemTap and flame graph are the standard tools for dealing with tough problems and performance issues. If you have a question about this on a mailing list or issue, the project maintainer will ask you to upload a flame graph and ask for a graphical rather than a textual description.

This article copvers toolset OpenResty created specifically for debugging. We’ll start by looking at what’s available for debugging programs:

  • Breakpoints and print logs
  • Binary search algorithm and comment
  • Dynamic debugging
  • Systemtap
  • Other dynamic tracking frameworks
  • Flame graph

It is essential to know that even a non-intrusive technique like dynamic tracking is not perfect. It can only detect a particular individual process; in general, we only turn it on briefly to use the data sampled during that time. So if you need to detect across multiple services or for long periods, you still need a distributed tracing technique like opentracing. Excellent read!

[Read More]

How to transform time series for deep learning

Categories

Tags machine-learning app-development data-science how-to big-data iot

Forecasting with deep neural networks. A time series is a sequence of values ordered in time. So, it needs to be transformed for supervised learning. By Vitor Cerqueira.

In the article you will learn:

  • Supervised learning with time series
  • Auto-regression with deep learning
  • Hands-on
  • Univariate time series
  • From a sequence of values into a matrix
  • From a matrix into a 3-d structure for deep learning
  • Multivariate Time Series

Deep learning is increasingly relevant in time series applications. In this article, we explored how to transform a time series for deep learning. The input to traditional machine learning algorithms is a matrix. But, neural networks such as LSTMs work with three-dimensional data sets. So, time series need to be transformed from a sequence into this format. Nice one!

[Read More]

Content compliance: How to navigate data & privacy regulations

Categories

Tags web-development cio how-to miscellaneous

Content marketing includes more than developing relevant content to engage your audience consistently. Processes, policies, and regulations govern certain aspects of it. As such, it’s critical to establish a content compliance strategy. By Jonathan Hill.

In this post, we’ll discuss what content compliance is, how to develop a plan, and more tips for adhering to regulations:

  • What is content compliance?
  • How to develop a content compliance strategy
  • Understand the types of content with compliance requirements
  • Discuss the rules with compliance and legal
  • Create standardized, compliant language

The regulations that govern content are always apt to change. New legislation is currently in the works in many states, as is a national bill. Check in with legal and compliance at least bi-annually to stay on the right track. Doing so helps minimize your risk and protect your brand. Interesting read!

[Read More]

Build your own command-line replica with GTID aware mariadb binlog

Categories

Tags app-development sql database performance

This blog post begins a three part series to create and customize your own asynchronous MariaDB replication client. With the release of MariaDB Community Server 10.8.1, the mariadb-binlog command line utility now supports both 1) filtering events by GTID ranges, and 2) validating a binary log’s ordering of Global Transaction IDentifiers (GTIDs). By Brandon Nesterenko.

A large amount has been written that highlights the value of MariaDB’s Global Transaction IDentifiers (GTID), but to quickly summarize a few main ideas:

  • Using GTIDs to represent replication state allows for explicit crash safety and easy server topology changes.
  • Replay consistency can be validated by ensuring that sequence numbers are monotonically increasing within a given domain.
  • Event execution can be parallelized at the domain-level, as independent data streams can be tagged with different domain ids.

The article then goes over and explains:

  • Background on GTIDs
  • The design of components for command-line client
  • The replication client implementation

This blog post provided an overview on using GTIDs to maintain replication state for consistent event replay, as well as the workflow of replication on a mariadbd instance. We then used this information to build our own command-line replica using the mariadb-binlog and mariadb executables. Interesting read!

[Read More]

.NET programmer's guide to CancellationToken

Categories

Tags web-development programming how-to apis app-development

Microsoft created a standardized cancellation implementation that has far-reaching capabilities beyond its original use case. Sometimes canceling is a good thing. In many of my .NET projects, I have had plenty of motivation to cancel both internal and external processes. Microsoft learned that developers were approaching this common use case in a variety of complex implementations and decided there must be a better way. By Davit Asryan.

CancellationToken was introduced in .NET 4 as a means to enhance and standardize the existing solutions for canceling operations. There are some general approaches to handling cancellation that popular programming languages tend to implement. Details in the article:

  • CancellationToken Under a Microscope
  • CancellationTokens for Advanced Events
  • CancellationToken for Timeout
  • CancellationToken As a Notification Mechanism
  • An Expansive CancellationToken Toolbox

A common cancellation communication pattern was introduced as CancellationToken, which was built using lower-level multithreading and interprocess communication constructs. As part of author’s initial research into this pattern—and after having dug through the actual .NET source code for Microsoft’s implementation—I found that CancellationToken can solve a much broader set of problems: subscriptions on applications’ run states, timing out operations using different triggers, and general interprocess communications via flags. Good read!

[Read More]

Best practices for Java apps on Kubernetes

Categories

Tags java programming app-development devops kubernetes

In this article, you will read about the best practices for running Java apps on Kubernetes. Most of these recommendations will also be valid for other languages. However, I’m considering all the rules in the scope of Java characteristics and also showing solutions and tools available for JVM-based apps. Some of these Kubernetes recommendations are forced by design when using the most popular Java frameworks like Spring Boot or Quarkus.

Further in the article:

  • Don’t set limits too low
  • Consider memory usage first
  • Proper liveness and readiness probes
  • Choose the right JDK
  • Consider migration to native compilation
  • Configure logging properly
  • Create integration tests

Let’s consider which alternative forJDK we should choose. Different vendors provide several replacements. If you are looking for a detailed comparison between them you should go to the following site. It recommends using Eclipse Temurin in the 17 version. Interesting read!

[Read More]

Maximizing user experience: Strategies for improving frontend performance S01-E01

Categories

Tags cio frontend javascript app-development ux web-development

In today’s fast-paced digital world, the speed of your website can make or break the user experience. With abundant information at our fingertips, users expect websites to load quickly and efficiently. As frontend developers, it’s our responsibility to deliver a seamless experience for our users. By Gaurav Sharma.

This comprehensive tutorial on frontend performance optimization will be presented in a series of blog posts, exploring various techniques and strategies for enhancing the speed and overall user experience. Amongst others it deals with:

  • How do we measure the resource loading time of our website?
  • Compression
  • Conditional GET Requests
  • Expires
  • Keep-Alive

HTTP is built on top of Transmission Control Protocol (TCP).In early implementations of HTTP, each HTTP request required opening a new socket connection. This is inefficient because many HTTP requests in a web page go to the same server. Nice one!

[Read More]

What is changing for Vuejs developers in 2023

Categories

Tags cio frontend javascript cloud web-development

2022 saw some major changes in the Vue.js ecosystem from Vue 3 becoming the new default Vue version, to development environments pivoting to Vite, to a stable release of Nuxt 3. What do all these changes, and others, mean for Vue.js devs in 2023? By Daniel Kelly.

The article then summarises some topics:

  • Vue 3
  • Composition API
  • Lightning Fast Development with Vite*
  • Nuxt 3
  • State Management with Pinia
  • TypeScript

The changes brought about in 2022 have poised 2023 to be a great year for the modern Vue.js developer. Good read for any frontend developer.

[Read More]