michaela-damm.jpg
blocshop
January 11, 2021
0 min read

Software development principles you should know about

Software development principles you should know about.jpeg

What exactly are the principles of software development?

Software developers and engineers created or adapted several acronyms and idioms to help them stay focused. Some of these acronyms come from the fields of philosophy or science. Others engineers and project managers coined themselves to guide the software development process. Let’s take a close look at these principles, starting with the principles that developers adapted from other fields.

First off, let’s examine measure twice, cut once.

Measure twice, cut once

This principle originated sometime in the middle ages. Back then, the expression was, “mark seven times and cut once.” This is the version still used in Russia today. Regardless of how many times we measure, the principle remains the same: proper planning methods will yield the best results.  The literal meaning comes to us obviously.  If we have a piece of wood that needs cutting, it’s better to double-check our measurements so we don’t waste wood making mistakes. When applied to the world of software development, we use the term a little more broadly. When we measure twice and cut once in software development, we plan comprehensively, putting together the right team and mapping out our steps in detail. Developing within agile methodology we plan our sprints and prepare for testing.

Occam’s razor

Occam’s razor comes to us from an early medieval English Franciscan friar, William of Occam. The principle that William of Occam espoused was "entities should not be multiplied without necessity.” But what’s with the word “razor?” In philosophy, a razor allows us to eliminate unlikely answers to a problem.  Occam’s razor states that the simplest solution is usually the best solution. We should not try and apply complex answers when a straightforward answer will work as well or better. In software development, we use the principle of Occam’s razor to question adding complexity to a software solution. We can make code function as required by keeping it simple and easy to understand. Straightforward, clear code works better and proves easier to test.

KISS (keep it simple stupid)

This principle was coined in the US Navy in the 1960’s by Kelly Johnson. Johnson coined the acronym to describe how designers of aircraft should work. They should make their designs simple enough that an average mechanic with limited tools could repair the aircraft. KISS directs us to avoid unnecessary complexity, to design with simplicity as a goal. In software development we use the KISS principle to remind us to make our code easy for others to understand and navigate. Testing and debugging simple code will always be better than combing through byzantine structures to find errors. We must create code that shows simplicity and elegance, not code that shows off how dense and knotty our developers can write.

Now let’s take a look at principles created in the software development world

LOD (law of Demeter)

The law of Demeter guides developers to divide classes into independent entities. These entities should not connect with other entities unless they are closely related. The idea is that each class in code should communicate with related classes, but not with those they are not related to. In the original law, this meant “talk to your friends, don’t talk to strangers.” The law was first proposed by Ian Holland in 1987 while he was working at the Demeter Project. Demeter allows developers to keep systems organized and limits the possibility of bugs.

DRY (Don’t repeat yourself)

Andrew Hunt and Dave Thomas stated this principle in 1999 in their book The Pragmatic Programmer. "Every piece of knowledge must have a single, unambiguous, authoritative representation within a system." At its core, DRY discourages engineers from repeating code in more than one place. This sort of repetition causes trouble when troubleshooting. 

A good example of DRY on a meta-level is HTML 5’s separation of HTML from CSS. Before HTML 5 CSS code would be embedded in the HTML itself, so every time a heading tag’s style would change, designers would have to comb through all the HTML to make changes. Often they would miss a tag or two, leading to messy designs and incoherent page layouts. When all the styling elements went into the CSS, designers had just one place to look to make the changes.

Avoid premature optimization

Donald Knuth played out this principle as a serious issue for programmers in the 1960’s. He wrote, “The real problem is that programmers have spent far too much time worrying about efficiency in the wrong places and at the wrong times; premature optimization is the root of all evil (or at least most of it) in programming.”  Developers need to make sure their code functions and proves useful before the team optimizes it. Otherwise, they will waste valuable time and resources on code that might not meet requirements.

YAGNI (You aren’t going to need it)

This principle guides developers to create the code that the team needs at the moment. They should not anticipate extra functions or try to code with a very broad agenda. Instead, the developers should create exactly what the software needs, extending functionality later as necessary.

Big Design Up Front (BDUF)

BDUF asks developers to plan thoroughly before coding. Typical for waterfall method software development, in agile we can also use the principle of BDUF. We can make sure we completely understand the requirements and the needs of the end-users before we begin coding.

SOLID

Solid stands for: 

S  -   SRP (Single responsibility principle)

O -   OCP (Open closed principle)

L  -   LSP (Liskov substitution principle)

I   -   ISP (Interface segregation principle)

D -   DIP (Dependency inversion principle)

Let’s take a brief look at each element of SOLID:

SRP (Single responsibility principle)

SRP calls on developers to ensure that each element of code does one and only one thing. 

Our code should not act as a multi-tool, but rather as specialized tools meant for specific jobs. We should not use a hammer to change a pipe.

OCP (Open Closed principle)

OCP asks developers to finish sprints with the mindset that the code is open to expansion or extension but closed to modification. We do not want to re-invent the wheel with every iteration.

LSP (Liskov substitution principle)

The LSP principle states that code elements in a subclass should behave in the same manner as the elements in the superclass above them. Barbara Liskov described the principle in 1987.

ISP (Interface segregation principle)

ISP leads developers to code interfaces small enough that end users can focus on what they need, leaving out functionality that they don’t.

D -   DIP (Dependency inversion principle)

DIP encourages developers to focus on the interface level, not the implementation. Agile encourages DIP by asking for user stories. If we keep our eyes on what end-users and stakeholders require, we design simple, elegant solutions.

Here at Blocshop, we follow these software development principles to make solutions that work for our customers. If you’d like to see our implementation of these principles in action, please get in touch!


Learn more from our insights

roro665_hands_working_with_a_laptop_in_a_modern_office_there_is_20dca307-c993-4539-99d7-fd5ca264248c.png
April 14, 2024

Enhancing ERP Systems with AI Chatbots

Explore how AI chatbots can transform ERP systems, enhancing efficiency, decision-making, and user interaction.

best large language models for ERP systems.png
March 31, 2024

Language Models Best Suited for Integration into ERPs

Four prominent large language models stand out for their compatibility and effectiveness in ERP system processes and automation. See what they are.

hybrid ERPs.png
March 21, 2024

Hybrid ERP: An Innovative Approach to Enterprise Resource Planning

Hybrid ERP is a blend of cloud and on-premise solutions. With expertise in both, Blocshop is uniquely positioned to help you with hybrid ERP development and implementation.

0-4 cover.png
October 03, 2023

IT Staffing: Individual Hiring vs. Specialized Developer Teams

Should you hire individual developers or go for a specialized, custom-built developer team?

chatgpt-35-limitations.jpg
July 17, 2023

ChatGPT-3.5: An Overview and Limitations

In this article, we'll take a closer look at the capabilities and limitations of ChatGPT-3.5, providing you with a comprehensive overview of what it can do and what its boundaries are. So, let's delve into the inner workings of this large language model.

gpt4 vs gpt3-5 and the key differnces.png
June 15, 2023

A Deep Dive into GPT-4 vs GPT-3.5 Differences and Ability to Revolutionize Software Development

There are key differences between ChatGPT-3.5 and ChatGPT-4 that software developers and companies procuring software solutions alike should be aware of. Let's see how these differences affect the output generated by these models on specific examples.

ai-development-cto-2023.jpg
May 09, 2023

AI-powered software development: What CTOs need to know in 2023

As technology continues to evolve at a rapid pace in 2023 and beyond, CTOs must stay ahead of the curve by utilizing predictive analytics, automated testing processes, and deployment solutions.

ai-web-development.jpg
May 05, 2023

How Artificial Intelligence is changing web development

AI technology is now being used in many different industries, including web development. It’s important to understand the impact that AI can have on web development as it can help companies to create more efficient and user-friendly websites.

cto-ai-software-development.jpg
May 05, 2023

How AI-powered software development is changing the role of the CTO

As AI-powered software development becomes increasingly commonplace, CTOs must prepare themselves to take on a new set of responsibilities that require more than just technical know-how.

build-mvp.jpg
April 17, 2023

How to build a minimum viable product (MVP)

The MVP is the version of a new product that allows Blocshop and your team to collect the maximum amount of validated learning about customers with the least amount of effort. The essence of your core idea is delivered as a barebones solution. The solutions is, however, sufficient for usage by early adopters. As a product, it has tangible qulities that express a look and feel.

ai-tools-developers.png
March 21, 2023

10 AI tools for developers you should know about in 2023

For developers, programmers, and data scientists, AI coding solutions can free up thinking time, allowing such professionals to focus on the fundamentals of their projects, and complete such projects much faster.

web-app-ideas.png
February 14, 2023

17 Ideas for Web Apps in 2023

Gazillions of web apps and ideas for web apps are floating around the metaverse - so creating one that properly represents a unique brand is a huge challenge. Our list provides a number of areas of simple app ideas to help businesses transform their online presence through a web app.

Top 15 micro-SaaS ideas for your startup in 2023.png
December 06, 2021

Top 15 micro-SaaS ideas for your startup in 2022

What exactly do we mean by micro SaaS? Micro Saas solutions use a web browser or mobile app interface. Micro SaaS solutions usually come about through the effort of an individual or very small team. It aims to solve precise problems. Micro SaaS projects have small budgets and overhead. Customers use Micro SaaS solutions on a monthly or yearly subscription basis. Micro SaaS projects target a small niche of the consumer market.

Software engineer hourly rates in 2021 (based on experience and location).png
November 22, 2021

Software engineer hourly rates in 2022 (based on experience and location)

Region influences salary more than any other factor. Taxes rates, cost of living, and government benefit programs affect the rates software developers charge. Software developers in the USA  and Canada earn more than software developers in other countries.

The best programming languages for app development in 2022.png
November 15, 2021

The best programming languages for app development in 2022

Software developers usually have three main ways to create an app. They can choose to code a native app, a hybrid app or a progressive web app. Developers create native apps to function on one specific platform, usually either iOS or Android. They create these apps using Swift or Objective C for iOS. For Android they use C++, Kotlin or several other languages. 

Cross-platform mobile app development: Tools & frameworks for 2022.png
November 09, 2021

Cross-platform mobile app development: Tools & frameworks for 2022

The cross-platform development project aims to create apps compatible with several operating systems. Cross-platform apps work on iOS, Android, and Windows. Cross-platform apps look and feel like apps developed specifically for the operating system.

App development cost breakdown in 2022.png
November 08, 2021

App development cost breakdown in 2022

Your business needs an app, but you aren’t sure about the cost of creating an app. Without some figures, you can’t even begin to estimate the potential budget, so let’s get you sorted with the information you need to make your app a reality.

unnamed.png
November 04, 2021

Web app development: a detailed guide

The best web apps give a responsive and engaging user experience through a browser instead of a single application. Think of web app development as a super-charged website. Web apps have many features of mobile apps coded for iOS or Android without the need to code for specific platforms. Developers create web apps using HTML, javascript, Python and CSS.

15 useful web app development tools for 2021.png
October 29, 2021

15 useful web app development tools for 2022

Web development vs app development: Choose the best for your business.png
October 19, 2021

Web development vs app development: Choose the best for your business