SOLID principle is an acronym created by Robert C Martin also unknown as Uncle Bob. It represents five principles for OOPS.
Now the first thought that came to my mind is Why do we need this? Here is the answer, using these principles we can solve the problems of a bad architecture.
Fragility where A small change may break complete module it’s really very difficult to find this if you don’t have good test cases.
Immobility where A component is very hard to reuse in another project or we can say multiple places in the same project because of too many dependencies.
Rigidity where Single change requires lots of developer efforts because it affects several parts of the project.
Here I want to add principles will not turn a bad programmer into a good programmer you need a better judgment there. Principles have to apply with judgment and you must be smart enough to understand when to apply what.
I have also written one blog where they have mentioned one more acronym like SOLID and it’s STUPID. This may hurt your feeling but yes if you are following this you are writing stupid code.
Thank you for reading the quick introduction, In next blogs, I will try to define all principles with Swift Code.
Yesterday, I have posted about How to response Authentication Challange but thoughts came in mind that if you are going with the first options Provide authentication credentials is it really secure and safe? how is client sharing the credentials with the server?
After lots of Google, I have found, how’s NTLM works and it’s pretty interesting to see that client don’t share the password with the server. here are the steps as follow.
- The client makes the request to the server.
- The server needs to validate the user because there is no identity so server generates 16 bytes random number called as the challenge and sends it to the client.
- Client hash this challenge with the user’s password and return it back to the server that is called the response it also includes username as plain text and challenge sent to the client.
- The server sends everything to the domain controller and it uses the username to retrieve the hash of the user’s password from security account manager database and hash the challenge.
- Domain controller shares the response back to the server if they are identical then authentication is successful otherwise a failure.
So the interesting part is here that Network API doesn’t share the password with the server it means it very secure.
Thank you for reading.
Share your thoughts and feeback.
Handling people is one of the biggest deal, because different peoples different views so for making long lasting relationships in personal or professional we need to add few things. Today I was learning new book `How to win friends and influence people by ` so sharing quick note here.
Fundamentals Technique for Handling Peoples.
- Don’t Criticize or Complain
Human nature does not like to admit fault, when people are criticized they rarely response you well so never ever criticize or complain because it will never result in the behavior what we want.
- Give Honest Appreciation
when it comes to appreciation, it’s the powerful key to win heart. Honest appreciation brings out their best and it must be sincere, meaningful and with love.
- Listen to them
To get what we want from other people we have to first listen them careful and see things from the point of view of others. So if you are a better listener it will already solve lots of conflicts.
- Mutually Achievement
So follow the 3rd point and then we can combine our desires with their wants after that they will become eager to work with you, now you can mutually achieve out objectives.
Thank you for reading! If you really want to read more please share your feedback it will help a lot and it will be appreciated.