Have you ever come across a class or method with so much going on that your head starts to spin?
The Single Responsibility Principle (SRP) is a best practice methodology that states that a function, method, or class should have one main specific purpose.
Having classes or functions which have a lot of purposes makes your code hard to read, understand, difficult to trace bugs, and hard to maintain in the long run.
Creating smaller classes, functions, or modules that are geared for some specific purpose will lead to more robust, and maintainable code. …
The software you have on your PC tells a lot about what you work with or what you love to do. We use software for a wide range of purposes e.g., for education, productivity, or just mere entertainment.
Because software is so central to what we do, software management is one of the most common tasks you will do on your Linux machine or as a Linux admin.
In this guide, we will take a look at managing software packages from the command line using the Advanced Package Tool (APT) on Debian based Linux distros such as Ubuntu, Mint, and Kali, etc. …
From the very beginning, the Linux operating system was designed to be a multi-user OS. As such, one of the most common administrative tasks performed on a Linux machine is managing user accounts. It’s a critical part of keeping a healthy and secure Linux machine.
You might think that it is overwhelming to manage users from the command line. On the contrary, it is not at all. There are only a few basic commands that you need to know, and I will cover them in this article.
A user account in Linux is the primary way of gaining access to a system — whether locally or remotely. …
As 2020 draws to a close, I am thrilled to share with you a selection of the best software engineering books that I have read during the past 12 months.
If you are a software engineer, data scientist, or one of those people who work in the tech or software industry, you will agree with me that you have to constantly keep learning if you are to remain relevant in the game.
When you decide to become a software engineer, you essentially sign up for a journey of lifelong learning.
There are many ways of learning or acquiring knowledge, but books still remain a dominant force in that sphere. …
In Angular, pipes are used to transform or format data in a template without writing any boilerplate code in the component. Pipes are extremely handy because you only declare a pipe once and can use it throughout the entire applications’ templates.
In this guide, I will show you the power of Angular pipes by implementing a simple custom unit conversion pipe. Here are some of the advantages of pipes in Angular.
If you want to follow along or test the code in this post. You can simply, use your web browser’s console to do so.
In Chrome and Firefox, you can access the web browser console by clicking the
F12 button on your keyboard.
console.log('log message ...!')
In this guide, I will discuss the alternative ways of logging to the web console so that you can be more efficient in your development workflow, for debugging purposes in particular.
Before we look at the alternatives, let’s look at what the
console.log() is really good at.
The most common method of logging to the web console is via the
console.log() method. …
The web is used by a wide range of people that have unique physical and or mental abilities.
In this guide, I will walk you through the steps that you can take to make your Angular applications more accessible to a wide range of people regardless of their impairments.
A website is said to be accessible when its content can accommodate all users and can be operated by almost anyone.
When creating websites it is important to realize that not all users have the same access or ability to use a mouse, or touch screen.
Some of the underlying principles that should form the foundations of an accessible website are outlined in the Web Content Accessibility Guidelines (WCAG). …
Counting down to some special event is something we do a lot.
In this guide, I will show you how to implement a simple and effective countdown timer in Angular using RxJS.
So far, 2020 has been a roller coaster year. How about we implement a countdown timer to the year 2021? The countdown timer we will implement will be updated to the second.
Without further ado, let’s jump into the code.
We will get started by creating a simple Angular application via the CLI with the following command.
$ ng new count-down-timer --defaults
Once the application is created go into its root directory. …
In this guide, we will take a look at the different ways in which you can provide a service in an Angular application. The method you choose to provide your service will determine the scope and visibility of your service to its dependents.
In Angular, a service can be anything from a simple value, a function, or a feature that your application needs. In most cases, however, services in Angular are classes that perform some specific function.
To be able to use a service via dependency injection you must register it with at least one provider.
In Angular, there are three main ways in which you can make your service available to its dependents. …