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 ]

Working with a JSONB array of objects in PostgreSQL

Categories

Tags json database sql app-development

Get, add and remove JSON objects from an array. By Rob Tomlin.

CREATE INDEX idx_purchases_name
 ON public.purchases
 ((items_purchased ->> 'name'));

In this article, author will work with a jsonb column containing an array of objects and explore how to:

  • Get all objects in the array
  • Get a specific object from the array by position in the array. When the position is known and when we have to discover it
  • Add a json object to the array
  • Remove a specific object from the array
  • Indexing including indexing a key in the JSONB column

PostgreSQL has many functions and operators for JSON data. Links to further reading also provided in the article. Nice one!

[Read More]

6 best practices to improve Node.js security

Categories

Tags infosec app-development javascript web-development nodejs

Today, Node.js is widely used in web and mobile applications, for it fills the gap between front-end and back-end applications. Unfortunately, increased usage of Node.js has opened new doors for attackers to exploit misconfigurations and vulnerabilities. By Lahiru Hewawasam.

The article main content is split into:

  • Validate user inputs
  • Using a reverse proxy to add a layer of security
  • Managing application secrets
  • Using HTTP response headers
  • Server-side logging and monitoring
  • Using security linters that capture vulnerabilities in code

Code linters help developers identify various issues in the code before compiling. They can detect the most common issues and force developers to follow best practices.Good read!

[Read More]

How to abort API requests in JavaScript

Categories

Tags app-development javascript web-development nodejs

Did you know that you can abort an API request in JavaScript? By aborting, I mean canceling a request before it is completed (before you get a response or before the request gets to the server). By Dillion Megida.

There are many reasons why you may want to do this. One of them is to prevent a request from being sent to the server if the user has already navigated away from the page the request was made.

The article the focuses on:

  • The AbortController interface
  • Aborting API requests in fetch
  • Aborting API requests in axios

Even for new methods of making API requests, by accepting a signal property in their request options object, you can abort requests using the abort() method. Good read!

[Read More]

Separate stateful infrastructure with Serverless Compose

Categories

Tags app-development serverless web-development agile devops

One of the most significant benefits of serverless is that the development teams can fully own and manage all of their infrastructure themself. Keeping all of that infrastructure in the same CloudFormation stack can sometimes be troublesome however, and there are many reasons why you might consider having parts of it in a separate stack. By Sebastian Bille.

services:
  infrastructure:
    path: infrastructure

  application:
    path: application

A common approach is to keep stateful infrastructure, such as your DynamoDB tables or S3 buckets, in one stack, and stateless infrastructure, such as your Lambda functions or API gateways, in another.

This post will show you how you can use Serverless Compose to easily separate your stateful infrastructure into a separate stack and deploy it without the hassle! Serverless Compose is a feature of the Serverless Framework that simplifies orchestration and configuration when you have multiple related CloudFormation stacks. Apart from providing a simple configuration format for orchestrating and defining the services and their respective dependencies, it also provides CLI tooling to interact with those services once deployed, for example to stream the logs of those services directly to your stdout at the same time. Good read!

[Read More]

Guide to Reinforcement Learning with Python and TensorFlow

Categories

Tags cio learning big-data data-science python

In reinforcement learning, self-learning agent learns how to interact with the environment and solve a problem within it. In this article, we present complete guide to reinforcemen learning and one type of it Q-Learning (which with the help of deep learning become Deep Q-Learning). We learn about the inspiration behind this type of learning and implement it with Python, TensorFlow and TensorFlow Agents. By Nikola M. Zivkovic.

In supervised learning, an agent learns how to map certain inputs to some output. The agent learns how to do that because during the learning process it is provided with training inputs and labeled expected outputs for those inputs. Using this approach we are able to solve many types of problems, mostly the ones which are classification and regression problems in nature. This is an important type of learning and it is mostly used commercial approach today.

Here are the topics that author covers in this article:

  • Introduction to Reinforcement Learning
  • Q-Learning Intuition
  • Q-Learning implementation with Python
  • Deep-Q Learning Intuition
  • Deep-Q Learning implementation with TensorFlow

In this article we explored Deep Q-Learning. This is the first type of reinforcement learning that utilize neural networks. Plenty of code examples in Python in the article. Good read!

[Read More]

5 tips for managing high-performing teams (remotely!)

Categories

Tags cio learning teams career

Today’s workplace is more digitized than ever before – especially in tech. Work-from-home adjustments and nearshore outsourcing has surged in the last two years, requiring the modern manager to adapt quickly. By Steve Taplin.

Working remotely hasn’t changed the core of good management practice but has inspired reevaluating priorities and updating traditional methods. These 5 top tips will help you navigate this new digital workspace with grace and poise:

  • Focus on the destination
  • Preserve the workday
  • Keep it personal (within reason)
  • Follow up consistently
  • Build a culture of innovation

Modern hybrid workspaces and digital offices offer opportunities never before seen in business. With skill, the right team can deliver exceptional project results from traditional offices, homes and nearshore without compromising the standard workday. Good read!

[Read More]

Linked Lists explained in PHP

Categories

Tags php web-development learning app-development programming

As one of the most common data structures, the linked list has to be one of the simplest in concept; yet still very powerful. In this post we will be looking at what linked lists are; what types of linked lists there are; when to use a linked list; and whether or why a linked list might be better than an array. By Doeke Norg.

A linked list is a data structure; a way of organizing data that can be used in a particular way. In its most basic form a linked list is a single node that holds a value, as well as an (optional) reference to another single node.

The article main parts are:

  • What are Linked lists?
  • Types of lists
  • Strengths of (singly) linked lists
  • Weaknesses of (singly) linked lists
  • Circular linked lists
  • When to use linked lists

A Singly Linked List is the most basic linked list. With this type every node has a single pointer to the next node. This makes it uni-directional, as you can only traverse from the head to the last node.

The goal of this post is to introduce the linked list as a data structure. I think it is useful for any programmer to know and recognize these basic data structures. Because by recognizing it in code, it can help you optimize your code; making it faster, and more readable. Excellent read!

[Read More]

The importance of model versioning in machine learning

Categories

Tags machine-learning big-data cio data-science learning

Version control is an essential concept in software development. Version control tools, such as Git, are used to manage and track source codes. Developers and organizations alike value source code because it is the backbone of their product(s), from which they earn revenue. By Oghenefejiro Esosuota.

Machine learning and artificial intelligence offer an edge to businesses and developers over their competitors, motivating the competition to push to build the best model as it provides a business advantage. As developers optimize for speed and accuracy, minimizing errors also becomes a priority. Model versioning is a great tool for all of those purposes.

The article then walks over:

  • What is model versioning?
  • Benefits of model versioning
  • Best practices for model versioning
  • Limitations
  • Tools for model versioning

Model versioning is a valuable part of the development process for machine learning projects because of the need for collaboration, tracking changing codes, and monitoring the model’s performance over time. Good read!

[Read More]

Create a blog with Clojure, nbb, and MarkDoc

Categories

Tags programming web-development app-development

This endeavor is my first adventure with Clojure(script). Meaning this is from a Clojure beginner perspective. By Alexander Carls.

For me, scripting is the perfect middle ground when going from small book exercises to more significant projects while learning the language. I’d argue that a static site generation is on the larger side of “scripting”.

The article then explains this plan:

  • Create a minimalistic blogging site to get started blogging about my Clojure journey
  • Write blog posts in Markdown
  • Use functionality from MarkDoc with React
  • Tailwind CSS
  • Create static HTML for each Markdown post
  • Deploy with Netlify
  • Must work without JavaScript on the browser
  • RSS Feed
  • Comments support with GitHub
  • No CI/CD. Given the short scope of the project. Running commands on my local machine is OK
  • No Analytics

You will also find plenty of Clojure code examples. Good read!

[Read More]

Building a websocket server in a Microservice architecture

Categories

Tags software-architecture microservices app-development

Designing a WebSocket server in a microservice architecture for real-time communications. This article was written to share author’s exploration of real-time communication between frontend and backend using WebSocket. In recent years, microservice is an architectural approach that many developers have adopted, and one of the key principles of microservice architecture is the “Single Responsibility Principle.” By KBryan.

We will look into designing and implementing a WebSocket server that is responsible for establishing a WebSocket connection with the frontend (web application) and also acting as a middleware (or proxy) for real-time communications between the frontend and backend.

The article is mainly about:

  • Background context
  • WebSocket server design
  • Building a websocket server
  • Testing websocket connection
    • Test #1: Send message from backend to frontend (via API)
    • Test #2: Send message from backend to frontend (via Pub/Sub)
    • Test #3: Send message from frontend to backend (via Pub/Sub)

In summary, we have run through a possible design of a WebSocket server in a microservice architecture. Having a WebSocket server greatly aligns with the “Single Responsibility Principle” of microservices, where it manages all WebSocket connections to the web application (frontend) as well as handles real-time communications between the web application (frontend) and other microservices (backend). Nice one!

[Read More]