# Interfaces 101 : Interface Design Considerations Ep. 7

- Published: March 13, 2023
- Author: Ardan Labs
- URL: https://www.ardanlabs.com/blog/2023/03/interfaces-101-interface-design-considerations.html

### Introduction

In episode 6, Miki built a logger package with the aim of making it as versatile as possible. To achieve this, he constructed his logger object with a function that would: accept the `io.Writer` interface as a parameter and perform type assertions to retrieve other interface types as needed. By building this, Miki demonstrated how polymorphism is achieved with Go by changing the type of a variable with type assertions.

![](../../../images/blog/interfaces-07.jpg?v=1)

In this video, Miki will shift his attention towards the theory side of programming and give a lecture on interface design. The first idea he’ll introduce is that *interfaces state what need, not what we provide*. To build on this idea, Miki will give a detailed overview of Go’s `io.Copy` function, its intended use and how the function states that it needs to have a variable to read from and another to write to. The next idea he’ll propose is if an *interface has more than five functions, something may be wrong*, which can be strongly correlated to the Go proverb *the bigger the interface, the weaker the abstraction*. Watch and learn more about Go interfaces and the design considerations to keep in mind when writing one.  

Things you will learn in this video

- Criteria to determine the effectiveness of an interface.
- Quick overview of Go’s io.Reader and io.Writer interfaces.

--- 

### Video

<div class="post-video-container">
	<iframe
	    width="640"
	    height="480"
	    src="https://www.youtube.com/embed/I4uBfflqbFY"
	    frameborder="0"
	    allow="autoplay; encrypted-media"
	    allowfullscreen
	>
	</iframe>
</div>
