DEV Community

Abdelrahman Ali
Abdelrahman Ali

Posted on • Edited on

1 1

Short Technical Tips / Highlights for Better Design and Coding

Pay high attention to choosing the right name for every thing [variable, method, class, test, package, .. ]

  • Apply SRP principle in all levels
  • Favor Composition over Inheritance
  • The OPP and Reflection don't mix
  • Avoid using Static class
  • Follow "Tell, Don't Ask" principle
  • Abstract the commonality and eliminate redundancy
  • IF-Else is potentially anti-pattern
  • The better, The code-base evolve diagonally (More details: https://abdo-emad.medium.com/tall-and-thin-or-wide-and-short-software-fce3ad2e1826 , https://www.linkedin.com/pulse/design-maintainability-insight-beauty-abdulrahman-gaber)
  • We will not hit the functionality from one shot, develop it in rounds "in Agile" [Happy path scenario, enhancement, fault scenario, boundaries, ..]
  • Study the anatomy of the problem carefully. The analysis should not only from technical perspective, do the analysis semantically.
  • Diagram the design then document the achieved implementation and learnt lessons
  • The refactoring gives a new live to the solution
  • Always align
  • Avoid hard coding and strings, develop over configurable business rules and meta-data.
  • Design for Testability
  • At the end, It depends!

open question: We should ask ourselves when writing a code, to what extent will this code live or survive? Have we taken into account the possible changes? How will the code absorb a thrown stumbling-block and afford the growth?

"The first principle of software engineering isn't DRY or YAGNI or one of the SOLID principles; it's common sense."
-Tim VanFosson

Heroku

Deploy with ease. Manage efficiently. Scale faster.

Leave the infrastructure headaches to us, while you focus on pushing boundaries, realizing your vision, and making a lasting impression on your users.

Get Started

Top comments (0)

AWS Q Developer image

Your AI Code Assistant

Automate your code reviews. Catch bugs before your coworkers. Fix security issues in your code. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Get started free in your IDE

👋 Kindness is contagious

Engage with a wealth of insights in this thoughtful article, valued within the supportive DEV Community. Coders of every background are welcome to join in and add to our collective wisdom.

A sincere "thank you" often brightens someone’s day. Share your gratitude in the comments below!

On DEV, the act of sharing knowledge eases our journey and fortifies our community ties. Found value in this? A quick thank you to the author can make a significant impact.

Okay