stackabuse.com stackabuse.com

The Factory Method Design Pattern in Python

Introduction In this article, we'll be diving into the Factory Method Design Pattern, implemented in Python. Design Patterns define tried and tested solutions to various recurring problems in software development. They do not represent actual code, but rather ways in which we can organize our code for the optimum results. In a world of limited resources, Design Patterns help us achieve the most results with the least amount of used...

stackabuse.com stackabuse.com

Guide to MapStruct in Java - Advanced Mapping Library

Introduction As microservices and distributed applications quickly take over the development world - data integrity and security are more important than ever. A secure communication channel and limited data transfer between these loosely coupled systems are paramount. Most of the time, the end-user or service doesn't need to access the entirety of the data from a model, but only some specific parts. Data Transfer Objects (DTOs) are...

stackabuse.com stackabuse.com

Formatting Strings in Java

Introduction There are multiple ways of formatting Strings in Java. Some of them are old-school and borrowed directly from old classics (such as printf from C) while others are more in the spirit of object-oriented programming, such as the MessageFormat class. In this article, we'll gloss over several of these approaches. We'll show some specifics of how each of the techniques can be used and in which circumstances. Using this...

stackabuse.com stackabuse.com

Using SCP to Copy and Securely Transfer Files and Folders

Introduction SCP stands for Secure Copy Protocol. It is a tool that can be used to transfer files from a local host to a remote host, from a remote host to a local host, or between two remote hosts. In this article, we'll examine how to use SCP to copy between local and remote hosts. SCP is almost exclusively run from the command-line using the scp command. It uses the ssh (Secure Shell) to transfer data to and from remote hosts. As...

stackabuse.com stackabuse.com

Writing to a File with Python's print() Function

Introduction Python's print() function is typically used to display text either in the command-line or in the interactive interpreter, depending on how the Python program is executed. However, we can change its behavior to write text to a file instead of to the console. In this article, we'll examine the many ways we can write to a file with the print() function. Redirecting a Python's Script Output in the Terminal The quick and dirty...

stackabuse.com stackabuse.com

Using Risk Management and Mitigation in Web Development

Introduction Customers and key stakeholders place a lot of trust in the reliability of your web application. They trust that their data is secure from unwanted access on the servers, while still seamlessly allowing wanted access while they’re using it. Many things can happen to compromise data-safety and application reliability. Some of these are common and some are rare, but it’s a fact that they’re inevitable. You cannot avoid...

stackabuse.com stackabuse.com

Guide to the Future Interface in Java

Introduction In this article, we will overview the functionality of the Future interface as one of Java's concurrency constructs. We'll also look at several ways to create an asynchronous task, because a Future is just a way to represent the result of an asynchronous computation. The java.util.concurrent package was added to Java 5. This package contains a set of classes that makes the development of concurrent applications in Java...

stackabuse.com stackabuse.com

Encoding and Decoding Base64 Strings in Java

Introduction The process of converting data by applying some techniques/rules into a new format is called encoding. Decoding is the reverse process of encoding - turning the encoded data back to the original format. Encoding is all around us and computers heavily rely on different encoding formats to deliver and transfer information. From the latest cat image in your feed to the voice message you listened to over a messaging app - all...