Hiding js and js.map files in VS Code for your typescript projects

VS code is a nice IDE for typescript projects and is actually the fastest growing javascript and angular IDE. When working on typescript projects some of us do not like the explorer to be polluted with the transpiled js and the js.map files. Luckily VScode allows us to hide the js files from the explorer using workspace settings. To do this open workspace settings from File –> Preferences –> Settings. Click on the drop down box to select Workspace Settings. ...

December 23, 2017 · (updated January 16, 2022) · 1 min · Pradeep Loganathan

Non Static class with Static methods Vs Static class

During a design session a few folks in my team had questions on using a static class vs a class with static methods. We hit upon this when designing utility classes and extension methods.During the course of this discussion some of us were surprised about what I felt was basic knowledge and I was also caught out on a few which led me to documenting this down below. Static Class Marking a class as static means that a compile time check will be conducted to ensure that all members of the class are static. Since the CLR does not have a notion of static, marking a class as static translates it to an abstract sealed class. ( conversly you cannot mark a static class as abstract) Static classes always inhert from Object and you cannot have it derive from another class. You cannot inherit from a static class. Static classes cannot implement an interface. You cannot obviously instantiate a static class. It cannot have constructors and the compiler also does not create a default parameterless constructor. Defining extensions in C# requires us to implement the static extension methods in a static class. There is a minor performance gain to using static methods as documented in this code analysis performance tip. The performance gain is due to the fact that instance methods always use the this instance pointer as the first parameter which is a small overhead. Instance methods also implement the callvirt instruction in IL which also leads to a very small overhead. Non Static Class A non-static class can have static members. ( both methods and fields ). You can create an instance of a Non static class with static methods. Factory pattern is an example of a Non Static class implementing a static method to control object instatiation. Microsoft docs has an article on this topic here . ...

October 25, 2017 · (updated January 16, 2022) · 2 min · Pradeep Loganathan

Threat Modeling

In a world increasingly reliant on digital infrastructure, security is no longer a static state but a continuous process. Reactive security is a gamble no organization can afford. Proactive defense is paramount, and threat modeling stands as a crucial first line of defense. Threat modeling provides a structured approach to proactively identify and mitigate security risks. It’s about stepping into the mindset of an attacker, systematically examining your systems—whether a complex application, a sprawling network, or a cloud deployment—to pinpoint potential weaknesses. Threat modeling uncovers potential vulnerabilities, maps likely attack paths, and empowers teams to fortify their defenses preemptively. This process involves visualizing attack vectors, assessing potential impact, and prioritizing mitigation efforts. More than a mere checklist, it’s a dynamic process that blends analytical rigor with creative foresight, enabling you to anticipate and mitigate threats before they materialize. ...

August 21, 2017 · (updated December 21, 2024) · 9 min · Pradeep Loganathan

Blockchain Meetup - 1

https://www.facebook.com/pradeepl/videos/685380101645645/

August 5, 2017 · (updated December 21, 2024) · 1 min · Pradeep Loganathan

Blockchain Meetup - 2

August 5, 2017 · (updated December 21, 2024) · 0 min · Pradeep Loganathan
OWIN, Katana and Kestrel

What is OWIN? How does it relate to Katana and Kestrel

The Open Web Interface for .NET (OWIN) is a standard that defines an interface between .NET servers and web applications. Katana is an implementation of OWIN by the .Net foundation. Kestrel is a lightweight cross-platform web server that supports .NET Core and runs on multiple platforms such as Linux, macOS, and Windows.

August 2, 2017 · (updated December 5, 2023) · 7 min · Pradeep Loganathan

What is Blockchain

A blockchain is a fully-distributed, peer-to-peer software network which makes use of cryptography to securely host applications, store data, and easily transfer digital instruments of value. Originally proposed by Satoshi Nakamoto in 2008 as the back-end for the Bitcoin cryptocurrency.( Nakamoto, 2008 ), Blockchain is now distinct from Bitcoin as a platform and stands on its own right seperated from the cryptocurrency implemenations from where it was born. Satoshi Nakamoto married his distributed consesus protocol to Adam Backs Hashcash algorithm which pioneered the use of mining to send transaction creating a simple database that is decentralized and stored in the nodes of its network. ...

July 21, 2017 · (updated December 21, 2024) · 5 min · Pradeep Loganathan

OAuth 2.0 - Tokens, Client types, Endpoints and Scope

There are two types of tokens in OAuth 2.0, the access token, and the refresh token. Access token The access token represents the authorization of a specific application to access specific parts of a user’s data. Access tokens must be kept confidential in transit and in storage. The only parties that should ever see the access token are the application itself, the authorization server, and resource server. The access token can only be used over an https connection, since passing it over a non-encrypted channel would make it trivial for third parties to intercept. ...

July 13, 2017 · (updated January 16, 2022) · 5 min · Pradeep Loganathan
Consensus Algorithms

Consensus algorithms

Consensus is one of the most important and fundamental problems in distributed computing. Simply put, the goal of consensus is to get several nodes to agree on something. It is a distributed computing concept that is used to provide a means of agreeing to a single version of truth by all peers on the distributed network.

July 12, 2017 · (updated December 21, 2024) · 9 min · Pradeep Loganathan

Merkle Trees

A Merkle tree, named for its inventor, Ralph Merkle, is also known as a “hash tree". It’s a data structure represented as a binary tree, and it’s useful because it summarizes in short form the data in a larger data set. In a hash tree, the leaves are the data blocks (typically files on a filesystem) to be summarized. Every parent node in the tree is a hash of its direct child node, which tightly compacts the summary. ...

July 12, 2017 · (updated January 16, 2022) · 3 min · Pradeep Loganathan