Aditya Chatterjee's Blog, page 75
August 29, 2022
Singleton Pattern in Python

In this article, we have explored the concept of Singleton Design Pattern in Python. Singleton Pattern is one of the most common design patterns.
ObjectivesDefine Design Patterns and list the types.Define Singleton PatternImplement Singleton Pattern and apply it in various applications and systems using Python and Similar OOP Languages.Write reusable code using Singleton Pattern.What are Design PatternsDesign patterns are reusable formatted best practices that programmers can use to solv...
August 28, 2022
Zeckendorf's theorem
The Zeckendorf's theorem states that every positive integer can be represented uniquely as a sum of one or more distinct non-neighboring or non-consecutive Fibonacci numbers. The sequence of Fibonacci numbers which add up to N is called the Zeckendorf representation of N.
Fibonacci numbers form a Fibonacci sequence where each number is the sum of the two preceding numbers. The first two terms of the sequence are 0 and 1.
First 20 Fibonacci numbers are: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 14...
Game Tree
In this article, we have covered the concept of how Backtracking help us to solve Game Tree. We will solve the Game Tree Problem by making use of the Minimax Algorithm. We have presented the Time and Space Complexity for various cases.
Table of contents:
IntroductionSolving Game TreeTime and Space ComplexityGame tree of other gamesConclusionIntroductionSearching through Game Tree is the core of board-game artificial intelligence. Consider how humans play a game of strategy. A possible mo...
5 Future Trends of Software Testing
The software testing industry is on the cusp of big changes. It is already undergoing a metamorphosis of sorts. With new technologies and trends emerging every day, it's hard to keep up with everything happening in the software testing world. The future of software testing looks very exciting.
Where is software testing headed? These are 5 trends to watch out for in the coming years:
1. Increased focus on automation for testingWith the ever-increasing pace of software development, manual testing...
August 27, 2022
How Spotify use DevOps to improve developer productivity?
I'm sure you've all heard of Spotify - the music streaming service that has taken the world by storm. You may not know that Spotify is a prime example of how effective DevOps can be in improving developer productivity.
Spotify achieved massive growth quickly due partly to its use of DevOps principles. But how did they do it?
How does Spotify use DevOps to improve developer productivity? Well, here's a little insight:
1) Spotify placed a strong emphasis on automationThey used various automation ...
August 25, 2022
Dynamic Queue
In this article, we will see what a dynamic queue is and how it is implemented. In short, Dynamic Queue is a Queue whose allocated memory may increase or decrease depending on the number of elements being inserted or deleted in Queue.
Table of contentsIntroduction to the problemProperties of QueueQueue OperationsQueue Implementation with an arrayLimitations of array usage for queue implementationDynamic Queue: Queue Implementation with Linked ListComparison of Linked List and Array in th...Live streaming to 25.3M concurrent viewers: Deal with traffic spike
In 2019, Hotstar created a global record for live streaming to 25.3 million concurrent viewers. What all happened?
During the ICC 2019 World Cup Semi-Final between India and New Zealand, Hotstar set a new world record for live streaming to 25.3 million concurrent viewers. That's more than any other platform has ever managed before!
How did Hotstar achieve this? And what things happened during this process? Let's take a look.
What happened?On day 2 of the match, the first spike witnessed was fro...
August 22, 2022
Get IP Address in Python
In this article, we have developed a Python script to get private, public IP address along with other details.
Table of Contents
What is an IP AddressPrivate vs Public IP AddressesDomain Name System (DNS)Use CasesHands On: Have fun with IP AddressesWhat is an IP AddressEvery node(computer) on a network is assigned a unique number that identifies it on the network. This unique number is encoded with in each packet sent and destined for that node across the network.
Private vs Public Addre...Fibonacci Hashing
Table of Contents:
IntroductionFibonacci HashingCode ImplementationTime ComplexityComparisonsApplicationsReading time: 20 minutes
IntroductionIn this article an underlooked kind of hash function is to be discussed, the Fibonacci Hashing. It is another form of multiplicative hashing function that is related to the golden ratio. This can be used as an alternative to other hashing functions; it's faster than sequential and binary searching. We will discuss how it works and implemented.
Fib...Fastest and Smallest Fixed width integer types in C++ (int_least8_t, int_fast8_t, ...)
In this article, we are going to learn about the Fastest and Smallest types of Fixed width integer types in C++ such as int_least8_t, int_fast8_t and more.
The basic data types in C or C++ are char, short, int, and long, each of which allows 1, 2, or 4,8 bytes in memory, respectively. However, this byte can vary depending on the compiler, operating system, or hardware used.
On a 32-bit compiler, the Long data type allocates 4 bits in memory, whereas, on a 64-bit compiler, it allocates 8 bytes in...