daily-email: add 2023-08-18
Types vs tests
This commit is contained in:
parent
80e4104660
commit
0caf486d4e
28
src/content/daily-email/2023-08-18.md
Normal file
28
src/content/daily-email/2023-08-18.md
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
---
|
||||||
|
title: >
|
||||||
|
Types vs tests
|
||||||
|
pubDate: 2023-08-18
|
||||||
|
permalink: >
|
||||||
|
archive/2023/08/18/types-vs-tests
|
||||||
|
tags:
|
||||||
|
- automated-testing
|
||||||
|
- test-driven-development
|
||||||
|
- static-analysis
|
||||||
|
---
|
||||||
|
|
||||||
|
Today, I saw a Twitter poll - "Poll: Imagine your team has to build a project with either types or tests. You can't have both.".
|
||||||
|
|
||||||
|
The results were:
|
||||||
|
|
||||||
|
- Types - 50.9%
|
||||||
|
- Tests - 49.1%
|
||||||
|
|
||||||
|
I was surprised by this.
|
||||||
|
|
||||||
|
If I can't add type declarations (type hints) or return types, I can still write tests to check what happens when different types are used.
|
||||||
|
|
||||||
|
I can also perform checks and throw errors or Exceptions if something isn't what I'd expect.
|
||||||
|
|
||||||
|
## Here's the thing
|
||||||
|
|
||||||
|
I use types heavily, but I'd be more confident that my application would work if I had tests and that's the main objective when writing code for myself or clients and for my clients' customers.
|
Loading…
Reference in a new issue