Engineering Patterns & Principles
Lets raise the little 'a' (Agile Engineering) in agile to the same standing as the bigger 'A' (Agile Project Management)

Engineering Patterns & Principles

In my years of working in software development one thing has always stayed constant, namely that stakeholder time pressure and constraints has always lead to the release of poor quality code and resulted in code that looked more like a ball of mud than a intricate integration of well designed units of code.

Now, I will not be solving the Stakeholder or the weak development managers issue in this blog except to say that the agile framework has given us tools to manage this problem so do a bit of research find the solution which is at your fingertips. What I will be speaking about is trying to demystify agile engineering and how it can be used within a well managed agile project to ensure the code being delivered is at the highest possible standard.

I was and still am a creature called a Developer , I am also a Designer and therefore I have a foot in both worlds and can hopefully bring across some useful information that both camps will find relevant and helpful.

As a developer I want to dive straight into coding to get to the point as quick as possible where I can show a working piece of code(LOOK WHAT I HAVE CREATED). As a designer I want to spend time in thoughtful analysis to design a solution that can flex as the solution grows and changes overtime. To bridge the gap between the two worlds we have design principles and practices which are known solution to problems as well as coding standards and best practice which are guidelines and helpers for our developers.

Lets unpack these concepts.

Coding Standards

A coding standards document's purpose is to make sure that all code is designed, written and laid out the same to make it easier for a developer to switch from one persons work to another without the needed change of mindset to try understand someone else's style.

  • These are specific to the development team
  • They align with enterprise standards
  • They are created and maintained by the development team
  • They ensures code is readable and understandable by the rest of the team
  • They ensure code follows an agreed structure and format
  • They are enforced by peer programming and code review

High Level Coding Standard Structure:

Naming Conventions
Indentation
Layout
Exception Handling
Logging
Commenting
Exposure

Keep it short and to the point or else developers will not bother to follow the standards (K.I.S.S)

Best Practices

Coding best practices are a set of informal rules that the software development community has learned over time which can help improve the quality of software.

  • Similar to patterns but are not generic rather domain and technology specific
  • These are community and development team gold standard solutions or recommendations for solving domain specific problems
  • These are proven ways to solve problems that ensures quality and performance
  • Used as quick starts for newb's
  • Normally recorded in a team manifest per project
  • Expanded and refined through the project lifetime

Design Principles

These are principles that have been proven, if followed and applied iteratively and incrementally in an evolutionary manner, through continues code refactoring. They will eventually lead to quality code that is changeable and extendable without introducing risk. The end result of this evolutionary process is Design Patterns which I will discuss later.

The most well know design principle uses the acronym "SOLID":

S = Single Responsibility: One class should have one and only one reason to change

O = Open Closed Principle: Software components should be open for extension but closed for modification

L = Liskov’s Substitution Principle: Derived types must be completely substitutable for their base classes

I = Interface Segregation Principle: Clients should not be forced to implement unnecessary methods they will not use

D = Dependency Inversion Principle: Depends on abstraction not on concretions

Nice read to dig a bit deeper into the principles: SOLID

Design Patterns

NB PLEASE READ THIS NEXT STATEMENT VERY CAREFULLY

if

(

(You would like to shortcut the above process) &&

(You would like to jump straight to the end result) &&

(You understand why you need the pattern) &&

(You understand when to use the pattern)

)

{

Use a pattern where the value out ways the inherent complexity;

}

else

{

Do yourself and everyone else on your team a favor and just follow SOLID;

}

Now that the warning is out of the way lets understand design patterns:

  • A design pattern is a proven, reusable solution structure to a problem
  • They provides a structure that is tailored to meet the specific requirements of the given problem
  • They where developed by looking at the common characteristics of solutions to related problems
  • Popularized by the Gang of Four’s 23 design patterns (GoF Patterns)

Types of Design Patterns

Creational - creation of objects

Structural - organizing classes and objects into larger structures

Behavioral - algorithms and assignment of responsibilities between objects

There are allot more patterns out there in the cosmos, the ones I have highlighted above are the most commonly used.

As good as these engineering practices are, if they are not enforced through peer programming and code review they will just remain words on a page. My next blog will look at how Source Control can be use to help enforce these practices to ensure the code being merged into the working branch is clean and of a high quality standard.




Eamonn Hegarty

Senior Engineering Manager at Liberty IT

6 å¹´

Milestones are important. But if you don't give teams the time they need to do their job, they don't work harder and deliver faster, they just cut corners on quality. You also invite your best people to start looking for the exit. Who wants to deliver junk code for a living? Unmaintainable code and staff turnover will cost much more than any savings on squeezed timelines. A balance must be struck.

要查看或添加评论,请登录

Richard Fisher的更多文章

  • Data Insights - Security vs Utility

    Data Insights - Security vs Utility

    Companies across all industry sectors are under increasing pressure to expand their customer data analytics initiatives…

    1 条评论
  • Architect as a Technical Leader

    Architect as a Technical Leader

    As per InfoQ info graphic above we can see that, "Architect as a technical leader" is one of the trends in Software…

    3 条评论
  • Why Not Start Modular Then Go Micro

    Why Not Start Modular Then Go Micro

    Why not start with a Modular Application Architecture and when you can justify the added complexity then move to Micro…

    2 条评论
  • DevOps CI & CD

    DevOps CI & CD

    DevOps has moved from a buzz word / new trend to a critical component of all new modern software development projects!…

  • Source Code Management

    Source Code Management

    Code doesn’t exist unless it’s checked into a version control system! Version Control Version control is a system that…

  • Agile Architecture

    Agile Architecture

    Agile and Architecture are not traditionally seen as kindred spirits. When viewed separately in their natural state…

    1 条评论
  • Agile Engineering Foundation

    Agile Engineering Foundation

    What does a solid foundation look like that can support a end to end test automation implementation? We need to…

  • Agile Engineering

    Agile Engineering

    How do we achieve this level of software test automation by applying Agile Engineering practices? This a start of a…

社区洞察

其他会员也浏览了