• High-level modules should not depend on low-level modules. Both should depend on abstractions.
  • Abstractions should not depend on details. Details should depend on abstractions.
  • components should depend on abstraction.

module need to manage high-level functionality with zero implementation details this allows the module to be used for any type of…

  • Developers shouldn’t be forced to depend upon interfaces that they don’t use.
  • Example:
public interface someInterface{public int methodOne(){
// Do something
}public int methodTwo(){
// Do somthing diffrent
}}

if you want to implement this Interface

public someClass implements someInterface{public int methodOne(){
// logic to do…
  • A subclass should behave in such a way that it will not cause problems when used instead of the superclass.
  • LSP is a definition of a subtyping relation, called strong behavioral subtyping.
  • if S is a subtype of T, then objects of type T may be replaced with objects of…
  • Software entities should be open for extension but closed for modification.
  • The OCP states that the behaviors of the system can be extended without having to modify its existing implementation.
  • New features should be implemented using the new code, but not by changing the existing code.
  • reduces the risk of…
  • A class should have only one reason to change.
  • this means that a class should not be loaded with multiple responsibilities and a single responsibility should not be spread across multiple classes or mixed with other responsibilities.
  • The reason is that the more changes requested in the future, the more…

One of the most common User Experience (UX) issues in the Mobile Development track, is when you have input filed and the user finishes typing inside it and need to close the keyboard to continue with another thing, he/she can’t do simply with tapping out of input instead he/she forced…

as in the previous part, we discussed the rules of choosing names for variables, functions, class ...etc, let us take another step to something more important which is Functions, Function is the basic building block and the core of any system.

But first Let’s give an example to show the…

As mention in the previous part of the clean code, we discuss the problems of the speed coding and the desire to finish the product and bringing it to the market as fast as possible.

one of the most common issues that programmers make is Bad Naming.

chose appropriate names…

Hussein Reda

Software engineer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store