Syntax - Tasty Web Development Treats

844: TypeScript, Branded Types, Streaming vs Polling + More

· Summarized

Share this episode
Anyone with this link can open it.
Share Link
Start at 0:00

Key takeaways

  • Listener questions cover a wide range of topics in modern web development.
  • SvelteKit offers robust functionalities with specific use cases but comes with its quirks.
  • Branded types can help establish clearer data types in TypeScript but may add unnecessary complexity.
  • Implementing a queuing system can optimize email delivery processes in applications.
  • QA teams provide value beyond testing; they can significantly improve the development lifecycle.
  • Understanding and managing security permissions in applications is crucial, especially in banking.
  • Choosing the right payment integration can deeply impact user experience and development workload.
  • The correct handling and storage of tokens are essential for application security.
  • Not all TypeScript errors need to be resolved immediately; sometimes, it’s acceptable to leave them.

Summary

Introduction to Listener Questions

Justin and Wes welcome listeners to a potluck episode where various questions submitted by listeners are addressed. Topics include the acceptability of TypeScript errors, the concept of branded types in TypeScript, and how QA processes work, particularly in high-stakes sectors like banking.

Exploring SvelteKit's Limitations

The discussion dives into SvelteKit, addressing its functionalities, limitations, and scenarios where it may or may not perform adequately. The conversation is both personal and technical; Scott shares examples of successful deployments, suggesting that with skilled implementation, SvelteKit can handle diverse projects well.

Branded Types in TypeScript

Scott and Wes talk about branded types in TypeScript—what they are, potential use cases such as safeguarding IDs and validating data, as well as when they may not be necessary. The discussion includes practical examples and highlights their complexity without definitive need in all cases.

Handling Email and Queues in Applications

Discussing email handling, Scott describes his method of using a 'poor man's queue', contrasting that with using formal queuing systems. The crux of the discussion revolves around ensuring performance doesn’t suffer and emails are sent without causing user delay.

Value of a QA Team

Scott emphasizes the importance of QA teams, drawing on experiences shared by other developers. They argue that a dedicated QA team is crucial in high-stakes environments, as they provide insights that automated testing often misses, thus enhancing the development process.

Security and Permissions Concerns

The conversation shifts to security, particularly in the context of app security and managing user permissions. Suggesting tools like Little Snitch, they stress the importance of knowing what information share applications are making.

Evolving Checkout Flows and Payment Integration

Scott shares insights from his own recent experiences integrating various payment solutions such as Stripe and PayPal, noting substantial improvements and ongoing challenges with each. They explore the current landscape of payments and how these tools support modern needs.

Storing Tokens Securely

The discussion wraps up with a look at best practices for storing access and refresh tokens securely. This includes discussions about the merits of HTTP-only and secure cookies versus database strategies, providing practical guidance for developers.

Q&A on TypeScript Errors

Justin and Wes close out the questions with TypeScript errors, discussing when it’s okay to ignore these errors. They offer insight into understanding TypeScript’s role in code quality while acknowledging practical scenarios.

Sick Picks and Plugs

The episode wraps up with personal recommendations known as 'sick picks,' where Wes shares a charging solution for Apple Watch users and Scott promotes a natural deodorant brand.

Sponsors

  • Sentry · The performance tracking tools, one of my favorite things in the entire world, because when we first launched the syntax site, there were just some little things here and there that we did not see. You can discover that, fix it, find it, and make it better, make it faster, make it less miserable for your customers.
  • Little Snitch · An application that allows you to know any request going out from any application. It pops up a dialogue whenever someone tries to connect to a server.

Show notes

Scott and Wes serve up listener questions on everything from SvelteKit’s limits and the quirks of branded types in TypeScript to handling email queues and secure token storage in cookies. Plus, they get into app security, the evolution of checkout flows, and why QA teams can actually be game-changers for dev teams.
Show Notes 00:00 Welcome to Syntax!
00:50 Catching up.
01:52 Brought to you by Sentry.io.
02:56 What are the limitations of SvelteKit?
06:41 Svelte 5 updates.
07:53 Branded types in TypeScript. EggHead.io Blog.

11:56 Queue applications and a ‘poor man’s queue’.
17:20 The real value of a functional QA team.
21:34 Invoker commands. Invokers Explained.
Denver Script Talk.

26:29 Growing security and permissions concerns. Little Snitch.

33:03 Stripe vs PayPal in 2024.
38:24 Christmas gift guide.
38:39 Websockets vs streams vs polling.
41:04 Storing access and refresh tokens in a cookie.
45:41 Shipping with TypeScript errors.
49:34 Sick Picks + Shameless Plugs.
Sick Picks Scott: The Black Stuff Deodorant.
Wes: Apple Watch Charging Brick.
Shameless Plugs Scott: Syntax on YouTube.
Hit us up on Socials! Syntax: X Instagram Tiktok LinkedIn Threads
Wes: X Instagram Tiktok LinkedIn Threads
Scott: X Instagram Tiktok LinkedIn Threads
Randy: X Instagram YouTube Threads

Follow this show on AudioBrevity and new episodes get summarized for you. Create a free account

Couldn't load the audio. A blocker may be stopping the show's tracking links. Open the file