Cheap Fast Good

You can make a great software but you have to choose 2 out of this above 3. There is no way to get around!

May 30, 2021

Python linked List implementation

class Node: def \_\_init\_\_(self, data): self.data=data self.nextNode=None class LinkedLIst: def \_\_init\_\_(self): self.head = None self.numberOFNodes=0 \# Here we get o(1) constant running time complexity for insertion. def insert\_start(self,data): self.numberOFNodes=self.numberOFNodes+1 new\_node = Node(data) if not self.head: self.head=new\_node else: new\_node.nextNode=self.head self.head = new\_node #Linear running time o(n) def insert\_end(self,data): self.numberOFNodes=self.numberOFNodes+1 new\_node=Node(data) actual\_node=self.head while actual\_node.nextNode is not None: actual\_node=actual\_node.nextNode actual\_node.nextNode=new\_node def size\_of\_list(self): actual\_node = self.head while actual\_node is not None: print(actual\_node) actual\_node=actual\_node.nextNode def traverse(self): actual\_node=self....

January 4, 2021

Custom annotations in Spring Boot

I had worked on spring framework extensively throughout my career. The one thing which I am always try to implement in any Spring project I work on is Custom annotation. Its a fancy stuff but useful in many ways. Say you have numerous micro services (Duplicate code bases which will f*** you up) running on your cluster, the best and first thing you do is - Build a common library to push all your model classes, so called util package of your organization :p and the fancy stuffs ....

October 1, 2020

Python Unit Test: Basics 1

When comes to any programming language what i check first is how to write a unit test on it. “Coding is not difficult- Bill Gates” So what is difficult? I would say testing is difficult. Here is a basic example on how to test a small piece of python code. The above snippet is a basic recursive program which will return the factorial of a number. Lets see how we can write a basic test case for this....

December 31, 2019