Python - Multithreaded web crawler

I recently had written a web crawler in Python for crawling through a database website. It was a very interesting experience. I needed to crawl through 6850+ pages and extract data from each page, which required some conditions to be met. I used Python for this task, and it was very easy to write a web crawler in Python. First approach I wanted to make sure it works with a single page ( with 50 links ) properly....

Blazor - Overview

C# ASP.NET offers a way to build highly interactive web UIs using C# and .NET. Blazor helps us to make the app interactive via different modes such as Static Web Apps Interactive Server ( Blazor Server ) WASM (Web Assembly) A Blazor app is based on Components with .razor extention. It is a combination of C# and HTML. Example: // Counter.razor @page "/counter" @rendermode InterativeServer <PageTitle>Counter</PageTitle> <h1>Counter</h1> <p role="status">Current count: @currentCount</p> <button class="btn btn-primary" @onclick="IncrementCount">Click me</button> @code { private int currentCount = 0; private void IncrementCount() { currentCount++; } } // PageTitle....

Mirrord - Overview

When we have a large project with a kubernetes cluster, it’s sometimes difficult to debug and test certain parts of the application. Mirrord allows us to bind a local port to a remote server. flowchart TB request --> mirrord subgraph Pod mirrord -.-x|intercepted| live_server:3000 end mirrord -->|db connection| db[(Database db:5000)] mirrord -->|forwarded| local_machiene(local:3000) local_machiene -.-|connects db:5000 via mirrord| db You can run a local server for example on port 3000 and bind it to a remote server....

Client - Server Patterns

Client-Server is a common architecture pattern in software systems. It is a distributed system architecture that partitions tasks or workloads between the providers of a resource or service, called servers, and service requesters, called clients. There are different patterns in which client and server can communicate with each other. Request-Response The client sends a request to the server and waits for a response. The server processes the request and sends a response back to the client....

Testing - Finding Errors Early

Errors in software systems are inevitable. They can be caused by a variety of factors, including human error, hardware failure, or software bugs. Testing a software helps in finding errors early, It is important to find errors as early as possible to avoid any sort of issues in production. Let’s explore some checkpoints in which errors can be found early. Build Time Compiler performs a syntax check on the code and reports any errors....

Bash - Overview

Bash Scripting is a handy and powerful tool for automating tasks on a Unix-like operating system. It is a command language interpreter that executes commands read from the standard input or from a file. Bash also incorporates useful features from the Korn and C shells (ksh and csh). Variables Variables in Bash are used to store data. They can be used to store strings, numbers, and other types of data. Variables are defined using the = operator....

API Patterns

API is a common concept among software systems. Different software systems require to communicate with eachother to invoke some functionality or to exchange data. Since it’s a frequent requirement, it’s important to have a set of standards. There are different patterns and best practices that can be used to design and implement APIs. RESTful API REST APIs are designed around resources, which are any kind of object, data, or service that can be accessed by the client....

Razor Pages - Overview

Razor pages provides a way to build web applications using a page-focused approach. Under the hood, it uses the same routing and middleware as MVC, and it provides directory-based conventions for views. Pages can have a viewmodel where we can define page data and actions. Pages: Pages are the main part of a Razor Pages application. Pages are created in the Pages directory and are named with the .cshtml extension. Each page can have a corresponding ....

Dotnet MVC - Overview

C# asp.net MVC is a web application framework that provides a model-view-controller architecture. The MVC pattern separates the application into three main components: the model, the view, and the controller. This separation of concerns makes it easier to manage and maintain the application. This structure also makes it easier to test and debug the application. Model: The model represents the data and core business logic related to data of the application....

Scala - Testing

Scala supports testing using the JUnit and ScalaTest frameworks. These frameworks provide a way to write and run tests for your Scala code. JUnit is a popular choice for unit testing in Scala due to its simplicity and extensibility. Writing Tests JUnit provides a set of annotations that can be used to write tests. The @Test annotation is used to mark a method as a test method. The @Before and @After annotations are used to mark methods that should be run before and after each test method, respectively....