Apologies for the choppy audio in this episode – moving computers sucks.
Today I talk a little about the SOLID princples of programming, and how these principles can apply to your life.
Functional programming – Basically a top down to do list. Collections of mathematics.
What is an object? – a data representation of a real life object.
Single responsibility – object that should have 1 responsibility. In code, a doorknob should only be a doorknob.
Open/closed – Open to extensions, closed to modifications. – think a refridgerator that can have a freezer attached but can never freeze food, because then it isn’t a fridge any more.
Liskov Substitution – an object parent can be treated as a child. Think a racecar (which is a palindrome by the way) that can also be treated as just a car.
Interface Segregation – objects that can interface with each other through a common set of parameters.
Dependency Inversion – Instead of the object being told what to do, the object asks for what it needs when it is run.
DRY = don’t repeat yourself.
My principles – the 4 eyes.
Immutability principle – things that cannot be changed. Bitcoin also known as the blockchain algorithm.
Indelibility principle – things that are “stuck” but can be changed with use of energy or force. A swale is permanent like a permanent marker is permanent.
Intrepid principle – things that are resiliant and perserverent. A flexible piece of fiberglass for example or fiberoptics.
Interoperability principle – things should interact with each other. For example. So called “smart” devices should work together, people of a country should be able to interact without being tightly coupled. Practical example is a truck car SUV can all drive on American roads…. for the most part. You can’t drive up a highway with a broken down car but you can with a semi etc. The edge effect in permaculture.
Take it, make it your own, make it a great day.
#Mentions
https://en.wikipedia.org/wiki/SOLID
http://butunclebob.com/FrontPage
AD
https://www.3fittheory.com/hi5/xzkshw
Reverse Sponsor of the day
Sunshine Acres – https://sunshineacres.org/
Podcast: Play in new window | Download
Leave a Reply