Log in

goodpods headphones icon

To access all our features

Open the Goodpods app
Close icon
Full Stack Radio - 144: Gary Bernhardt - TypeScript and Testing

144: Gary Bernhardt - TypeScript and Testing

08/05/20 • 84 min

Full Stack Radio

Topics include:

  • Why Gary decided to write Execute Program as a full-stack TypeScript application instead of using a Ruby or Python backend like he may have traditionally
  • Do you actually have to write less tests if you have a good type system?
  • What does a good type system give you that tests can't give you?
  • Using io-ts to type check incoming data
  • How to think about structuring your code to best take advantage of the benefits your type system gives you and minimize the need to write tests
  • Pushing conditional logic to the core of your system to reduce the number of tests you need to write at the edges
  • The correlation between type errors and behavioral bugs, and how a type system can help you catch mistakes you don't think to test for
  • Do type errors signal that you're missing a test?
  • Structural vs. nominal type systems, and the benefits of structural type systems like used by TypeScript and Go
  • Best practices for type-checking within a function in a structural type system like TypeScript
  • The power of supporting literal types like true or "active" in addition to traditional types

Links:

Supporting the show:
I decided to stop taking sponsors for the show because I think advertisements are annoying and no one wants to listen to them.

If you do want to support the show, the best way to do it is to purchase one of my products:

  • Tailwind UI, a collection of professionally designed, fully responsive HTML components built with Tailwind CSS.
  • Refactoring UI, a book and video series I put together with Steve Schoger on designing beautiful user interfaces, without relying on a designer.
  • Advanced Vue Component Design, a course on designing simpler, more flexible Vue components that are both more powerful and easier to maintain.
  • Test-Driven Laravel, a massive video course on designing robust Laravel applications with TDD. Learn how to build a real-world application from scratch without writing a single line of untested code.
  • Refactoring to Collections, a book and video course that teaches you how to apply functional programming principles to break down ugly, complex code into simple transformations — free of loops, complex conditionals, and temporary variables.
plus icon
bookmark

Topics include:

  • Why Gary decided to write Execute Program as a full-stack TypeScript application instead of using a Ruby or Python backend like he may have traditionally
  • Do you actually have to write less tests if you have a good type system?
  • What does a good type system give you that tests can't give you?
  • Using io-ts to type check incoming data
  • How to think about structuring your code to best take advantage of the benefits your type system gives you and minimize the need to write tests
  • Pushing conditional logic to the core of your system to reduce the number of tests you need to write at the edges
  • The correlation between type errors and behavioral bugs, and how a type system can help you catch mistakes you don't think to test for
  • Do type errors signal that you're missing a test?
  • Structural vs. nominal type systems, and the benefits of structural type systems like used by TypeScript and Go
  • Best practices for type-checking within a function in a structural type system like TypeScript
  • The power of supporting literal types like true or "active" in addition to traditional types

Links:

Supporting the show:
I decided to stop taking sponsors for the show because I think advertisements are annoying and no one wants to listen to them.

If you do want to support the show, the best way to do it is to purchase one of my products:

  • Tailwind UI, a collection of professionally designed, fully responsive HTML components built with Tailwind CSS.
  • Refactoring UI, a book and video series I put together with Steve Schoger on designing beautiful user interfaces, without relying on a designer.
  • Advanced Vue Component Design, a course on designing simpler, more flexible Vue components that are both more powerful and easier to maintain.
  • Test-Driven Laravel, a massive video course on designing robust Laravel applications with TDD. Learn how to build a real-world application from scratch without writing a single line of untested code.
  • Refactoring to Collections, a book and video course that teaches you how to apply functional programming principles to break down ugly, complex code into simple transformations — free of loops, complex conditionals, and temporary variables.

Previous Episode

undefined - 143: Rich Harris - Svelte and Defending the Modern Web

143: Rich Harris - Svelte and Defending the Modern Web

Topics include:

  • What is Svelte and how is it different than other JS frameworks in the space?
  • What special behavior does the Svelte compiler layer on top of vanilla JS syntax and why?
  • Why the lack of render functions in Svelte isn't a real problem in practice
  • What are you giving up when you choose to build your application with something like Rails instead of JavaScript?
  • Why should we be trying to write our applications in a single language, and why should it be JS?
  • What's wrong with striving to write an application entirely in a language like Ruby instead of entirely in JS?
  • Why HEY doesn't really make a good argument against the modern web
  • Thoughts on bundle sizes, code-splitting, and why aggressive code-splitting is still better than frequent round trips to a server-rendered app
  • How Svelte and Sapper handle SSR
  • Why page transitions are the killer argument for building SPAs if we want to be able to compete with native experiences
  • Should we be thinking about JavaScript applications as native applications in terms of offline-support and eventual consistency, or should we keep thinking of them as webpages that depend on the network?

Links:

Supporting the show:

I decided to stop taking sponsors for the show because I think advertisements are annoying and no one wants to listen to them.

If you do want to support the show, the best way to do it is to purchase one of my products:

  • Tailwind UI, a collection of professionally designed, fully responsive HTML components built with Tailwind CSS.
  • Refactoring UI, a book and video series I put together with Steve Schoger on designing beautiful user interfaces, without relying on a designer.
  • Advanced Vue Component Design, a course on designing simpler, more flexible Vue components that are both more powerful and easier to maintain.
  • Test-Driven Laravel, a massive video course on designing robust Laravel applications with TDD. Learn how to build a real-world application from scratch without writing a single line of untested code.
  • Refactoring to Collections, a book and video course that teaches you how to apply functional programming principles to break down ugly, complex code into simple transformations — free of loops, complex conditionals, and temporary variables.

Next Episode

undefined - 145: Statamic 3.0 and Tailwind CSS 2.0

145: Statamic 3.0 and Tailwind CSS 2.0

Episode Comments

Generate a badge

Get a badge for your website that links back to this episode

Select type & size
Open dropdown icon
share badge image

<a href="https://goodpods.com/podcasts/full-stack-radio-37457/144-gary-bernhardt-typescript-and-testing-10494521"> <img src="https://storage.googleapis.com/goodpods-images-bucket/badges/generic-badge-1.svg" alt="listen to 144: gary bernhardt - typescript and testing on goodpods" style="width: 225px" /> </a>

Copy