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 ]

Memory management in Java

Categories

Tags backend-development software-engineering devops-and-ci-cd

In this article, we will see how does the Java programming language is doing memory management, we will look at registers, stack, heap, constants, non-ram memory, and the famous Java garbage collector. Let’s start with the fastest storage in Java the register. By Aleksandar Vasilevski.

Garbage Collector in Java is running in the background and looks into all objects that are in the memory to find out objects that are not referenced. Every unreferenced objects that are found are deleted so the space can be allocated for other objects. Unlike other languages such as C where memory allocation and deallocation it’s manually, in Java it’s done automatically by default.

The article explains in clear manner following:

  • Register
  • Stack
  • Heap
  • Constant
  • Non-RAM
  • Java Garbage Collector

Memory management in Java is a very interesting topic but very broad topic too, Java itself will manage the memory without major interventions by the programmer, but knowing how memory work in will give you the advantage of writing good and optimized code in terms of memory usage, finding and fixing memory leaks. The article also provides example code together with explanation how Java memory management would work on selected piece of code. Nice and informative!

[Read More]

An introduction to the automation test wheel

Categories

Tags testing-and-quality software-engineering frontend-and-mobile backend-development

As a software tester, I like thinking about testing a product from a number of different angles. Over the last few years I’ve learned about security testing and performance testing, and I’ve come to see how important those activities are in validating software quality. By Kristin Jackvony.

As testers, we should be validating the quality of the entire application. In thinking about how to incorporate all test types into a traditional testing workflow, author conceived of the idea of an Automation Test Wheel.

Automation test wheel

Source: https://www.ministryoftesting.com/dojo/lessons/an-introduction-to-the-automation-test-wheel

Each section of the wheel should be considered when you are creating a test automation strategy. Author included a GitHub repository showing a working example of each test type. Additionally, the “Read Me” section of each repository has a link to a blog post that describes how to run the tests.

The article is split into following parts:

  • The traditional approach: the test automation pyramid
  • The sections of the automation wheel
  • What about the test pyramid
  • What about manual testing?
  • Why are the sections of the wheel all the same size?
  • What about monkey testing, data-driven testing, etc.?
  • Designing a test strategy with the automation test wheel

And remember manual testing always has a place in the tester’s tool belt. Great read!

[Read More]

5 reasons Elixir can be your competitive advantage

Categories

Tags backend-development frontend-and-mobile software-engineering architecture-and-apis

Elixir is a relatively new programming language. Release of v1.0 was announced on September 18, 2014. Elixir has been trusted by several companies to be part of their toolset. Some of those well-known companies that publicly shared they use Elixir to build their products are Pinterest, PagerDuty and Wistia. By Elvio Vicosa.

The Elixir language and the Erlang eco-system have a special relationship with a number of industries, which have been relying on and benefiting from it: telecoms, banking, e-commerce, advertisement, instant messaging, IoT,

Elixir has the concept of Supervisors, which goes hand in hand with the “let it crash” idea. As the name implies, “supervisors” are used to supervise other processes. When a supervised process crashes, a “supervisor” kicks in and take measures to handle the crash.

The article main focus is on:

  • Battle-tested environment with modern features
  • Concurrency
  • Performance
  • Scalability
  • Fault-Tolerance

Elixir is a unique, powerful and productive language. It includes features that enable development teams to build distributed, fault-tolerant and highly-available systems. Good one!

[Read More]

Introduction to Python SQL libraries

Categories

Tags backend-development data-and-analytics architecture-and-apis

All software applications interact with data, most commonly through a database management system (DBMS). Some programming languages come with modules that you can use to interact with a DBMS, while others require the use of third-party packages. In this tutorial, you will explore the different Python SQL libraries that you can use. You will develop a straightforward application to interact with SQLite, MySQL, and PostgreSQL databases. By Usman Malik.

  • Understanding the database schema
  • Using Python SQL libraries to connect to a database
  • Creating tables
    • Inserting records
    • Selecting records
    • Updating table records
    • Deleting table records

SQLite is probably the most straightforward database to connect to with a Python application since you don’t need to install any external Python SQL modules to do so. What’s more, SQLite databases are serverless and self-contained, since they read and write data to a file. By default, your Python installation contains a Python SQL library named sqlite3 that you can use to interact with an SQLite database.

Links to further resources also included. Straight forward good tutorial!

[Read More]

Get a LoadBalancer for your private Kubernetes cluster

Categories

Tags devops-and-ci-cd architecture-and-apis

In this tutorial, author will walk through how you can expose a Service of type LoadBalancer in Kubernetes, and then get a public, routeable IP for any service on your local or dev cluster through the new inlets-operator. By Alex Ellis.

The inlets-operator is a Kubernetes controller that automates a network tunnelling tool I released at the beginning of the year named inlets. Inlets can create a tunnel from a computer behind NAT/firewall/private networks to one on another network such as the internet. Think of it like “Ngrok, but Open Source and without limits”.

– Alex Ellis

First we’ll create a local cluster using K3d or KinD, then create a Deployment for Nginx, expose it as a LoadBalancer, and then access it from the Internet.

The article walks you through:

  • Prerequisites
  • Option A – Install your local cluster with k3d
  • Option B – Install your local cluster with KinD
  • Create a Cloud Access Token
  • Deploy the inlets-operator into your cluster
  • Create a test deployment
  • Expose Nginx as a LoadBalancer
  • Access your local cluster service from the Internet
  • Management and the CRD

… and more. Plenty of screen shots and good explanation of all the commands you will use to run your cluster. There is also link to video demo. By using inlets and the new inlets-operator, we can now get a public IP for Kubernetes services behind NAT, firewalls, and private networks. Exciting!

[Read More]

How to design for panic resilience in Rust

Categories

Tags software-engineering leadership-and-career

Don’t panic! Learn to build quality software resilient to errors. In this story, we discuss methods for panic resilience in Rust applications, to make quality software users can rely upon. By Luke I. Wilson.

If you consider your software a car driving at about 60 miles per hour, a panic is like hitting a brick wall.

Some newer languages designed after C use exceptions for error handling, which is a high-level abstraction to error codes. Calling a function which may fail and cause an exception requires a try and catch block – to execute code that may cause an exception, and to handle the error signaled by the exception. Exceptions are still not always explicitly handled, and thus some lazy programmers handle exceptions the same way as .unwrap() handles errors in Rust — print the error and fail.

A crash is not ever “appropriate” behavior, but it’s better than allowing your system to cause physical damage. If at any time it may be believed that the software could cause something deadly, expensive, or destructive to happen, it’s probably best to shut it down.

The article looks at three crucial sections about handling errors in Rust:

  • When to Panic,
  • Handling Errors,
  • And the additional section: Error Handling in a Library.

It is always better to exit with an error code than to panic. In the best situation, no software you write will ever panic. A panic is a controlled crash, and must be avoided to build reliable software. Rust empowers anyone to build highly robust, reliable, and efficient software. So don’t panic! Use the correct methods for writing reliable software with Rust. You will get links to further reading and example code to explain points mentioned in article. Well done!

[Read More]

How to deploy Deno applications to production

Categories

Tags frontend-and-mobile cloud-and-infrastructure backend-development devops-and-ci-cd

In this tutorial, you will be creating a simple Deno application to display hello world. Unlike NodeJS, you do not need to run npm init to create a new application. You can simply create a TypeScript file and start coding away. By Michael Okoh.

You will need Docker installed on your server and local machine, an Ubuntu server, you can get one from DigitalOcean, basic understanding of git, basic understanding of the command line interface.

The article covers the following topics:

  • Prerequisites
  • How to create a Docker configuration
  • How to build and run the container
  • How to deploy to production (using push to Github)

All the code is provided together with the commands to run on the remote server instance. Good read for anybody new to Docker, containers and app hosting!

[Read More]

How I created a coronavirus tracker app in just 3 days with Ionic and Firebase

Categories

Tags product-and-design frontend-and-mobile cloud-and-infrastructure

Kapil Raghuwanshi creted this tutorial for any fun of hybrid mobile apps. He is really fond of Hybrid App technologies – they help us achieve so much in a single codebase. Using the Ionic Framework, author developed a cross-platform mobile solution for tracking Coronavirus cases in just 3 days.

You are going to learn how to develop an Android, iOS, and Progressive Web App to track the cases around us with the latest related news, help, and feedback sections. Thus this tutorial is for everyone who has just a basic understanding of Web Fundamentals. So, let’s begin.

The author then describes everything in detail:

  • Idea, plan, and engineering
  • Technology stack
  • Tooling
  • Installation & scaffolding
  • Developing COVID19 dashboard and safety guidelines tabs
  • Developing country and news tabs
  • Developing the help tab and deployment

The article is very detailed and contains a ton of resources, detailed explanations of the code with multiple screen-grabs for all 3 targeted platforms (Progressive Web App (PWA), IoS and Android). Due to policy issues of the epidemic, Google Play Store, Amazon App Store, and others are not accepting app packages related to the Coronavirus. So until and unless you have authenticity proofs from any Government, Hospitals, or any designated Health Institution, no stores are accepting these apps. Still super useful and we recommend to bookmark the article for your future reference!

[Read More]

How to perform K-means clustering with Python in Scikit?

Categories

Tags backend-development data-and-analytics

While deep learning algorithms belong to today’s fashionable class of machine learning algorithms, there exists more out there. Clustering is one type of machine learning where you do not feed the model a training set, but rather try to derive characteristics from the dataset at run-time in order to structure the dataset in a different way. It’s part of the class of unsupervised machine learning algorithms. By Christian Versloot.

k-means clustering is a method (…) that aims to partition n observations into k clusters in which each observation belongs to the cluster with the nearest mean (cluster centers or cluster centroid), serving as a prototype of the cluster.

– Wikipedia

The article dives into:

  • What is K-means clustering?
  • Introducing K-means clustering
  • The K-means clustering algorithm
  • Inertia / Within-cluster sum-of-squares criterion
  • On convergence of K-means clustering
  • The drawbacks of K-means clustering – when is it a bad choice?
  • Implementing K-means clustering with Python and Scikit-learn
  • Generating convex and isotropic clusters
  • Applying the K-means clustering algorithm
  • Full model code
  • Results

In this blog post, we looked at K-means clustering with Python and Scikit-learn. You will also get good explanation of Python code, links to further reading and resources together with some video talks explaining the concepts and science behind the article. Nice one!

[Read More]

Functional error handling with Express.js and DDD | Enterprise Node.js + TypeScript

Categories

Tags backend-development frontend-and-mobile

How to expressively represent (database, validation and unexpected) errors as domain concepts using functional programming concepts and how to hook those errors up to our Express.js base controller. By Khalil Stemmler, a developer advocate at Apollo GraphQL.

In most programming projects, there’s confusion as to how and where errors should be handled. Do I throw an error and let the client figure out how to handle it? Do I return null?

When we throw errors, we disrupt the flow of the program and make it trickier for someone to walk through the code, since exceptions share similarities with the sometimes criticized GOTO command.

And when we return null, we’re breaking the design principle that “a method should return a single type”. Not adhering to this can lead to misuse of our methods from clients.

The article the deals with:

  • Why expressing errors explicitly is important to domain modeling
  • How to expressively represent errors using types
  • How to and why to organize all errors by Use Cases
  • How to elegantly connect errors to Express.js API responses

This is long article with detailed explanation of the code and design and you also get access to GitHub repository. Great read!

[Read More]