Solid Architecture is the first five object oriented design pattern forwarded by Robert C. Martin also known by the name Uncle bob. This design pattern helps developer to maintain, extend their code base in more agile way during software development process.
Their exist quite references for solid architecture principle in different languages. But I am quiet interested in how this principle can be implemented in pythonic way. (Here, pythonic means idiomatic python . it refers to the style, as well as architecture and design of the code)
The architecture is not complex. It is pretty simple to grasp.
S = Single Repository Principle.
O = Open/Closed Principle.
L = Liskov Substitution Principle
I = Inversion segragration Principle
D = Dependency Inversion Principle
Must of the programmers, must have knowledge of Object Oriented Programming Concept. Here, we extensively used classed based view to create our programs. Its hard to move from classed based view to function based view in java. However, it is possible in python. In functional programming, Unlike object, the function provides the main logic in the program.
In python, we can use lambda to mimic the use of function with out defining def: function in our code. It is usually used to create the small anonymous function. i.e. function with out the name.
syntax : lambda argument_list: expression
In python, decorators are callable python object that is used to modify python function, method or class definition. Here, the object that are going to get modified is passed as argument to the decorators. Here I have provided the simple decorators with only one arguments.
print("Before calling " + func.__name__)
s = func(x)
print("After calling " + func.__name__)
Before calling succ
After calling succ
In above code snippet, What we did is used additional code to run before executing the function…
Hello and Namaste from the top of the World. I will be sharing new knowledge regarding how you can install and configure conky scripts in linux machine. At the end of the tutorial you will be able to configure my custom made conky scripts. Further more, you will be able to customize the scripts as your will.
Do ping the link above for complete guide.
Do feel free to comment for any problems that gets encounter. Any feedback is welcome. Do Subscribe my youtube channel, follow my github link. So, you will get notified whenever i shared the new contents.
In future , I am planning to write my own custom gmail , weather scripts and addition features in conky. So, stay tuned..