Article

Use a Directed Acyclic Graph (DAG) to Structure Developer Focused Content

Matt Pocock
Matt Pocock ยท 15 November, 2022

Matt Pocock explains how he uses a directed acyclic graph for creating a workshop for Total TypeScript

Full

Transcript

I wanted to break down some of the process that I've been using for building out total type scripts here. What I like to do is take all the information that I want to include in a module and put it into a dag, a directed acyclic graph. The reason I choose a DAG is because, You know, first of all, it kind of looks nice, right?

You get to sort of say, Okay, I want to include all of these pieces. And then you work out which bits of information, each piece of information depends on. So I know that k and k of our depends on, you know, like, um, to understand why it's useful, you probably need to know a little bit about template literals to understand why.

Um, Why it even works. You need to understand key and key of, to understand how that works. You need to understand key of, then you need to understand unions at the base of it. There's probably more information, I'm, I'm sort of forgetting there or aligning, but this gives you a sense of it. And so basically all of this stuff then, um, gets put all together and then I divide it into groups, you know, groups that feel natural to teach together.

And like the first groups that I'm sort of looking at, you know, Kind of like unions, discriminated unions. Then I've got this sort of index access type object values, and these are groups that I'm sort of finding in my head to, You know, like it's good to have groups in general, like chunks of information that people can walk away with that's all connected.

If you trying to teach this all sort of too disparately, then. The connections might not be made that well. So once you've then got the groups altogether, then you can then just order the groups. So what I've done is I've just taken all of these different colors and I've just put them to the side here, and I've now got the list of all of the things I want to teach.

This last one here, challenges. Some of the stuff just doesn't really fit into groups, right? Like in order to understand object to discriminated union, you need to be able to understand quite a lot of information. I generally like to sort of take those really, really big leaf nodes at the end and stick them in one big block.

So we've got basically a challenges section is what I like to call it. And this I think actually is the genuine, or very close to the, the way I landed on this for this module, like the, the format for this module. So this is pretty nice. Um, there's one more thing to discuss, which is obviously, Stuff you need to know before you even get to the module.

And I like to have this sort of double red line here and have a few things in the DAG that are above that line. And that line is basically prerequisites. In order to understand this module, you need to understand what is generics and tax and types and what is a union. And both of those I think are covered in my beginner's course.

So you probably need to take the beginner's course before you take this, but it's really. Two, to just to map out the things that you want to, that you know you're not going to cover. And sometimes I'll even have another one down the bottom, which is gonna be like, uh, future material, you know, stuff that I'm not even going to cover in this section.

And that gives you a really nice window into what you are actually covering. And make sure that when you structure it, you are structuring it with those ideas in mind. And you don't need to re-explain them.

Lets work together on your strategy to design, produce, and sell your course online.

You're an expert with an idea for a course you'd like to sell, but don't know where to start.

You've got a full internet of options for designing and selling your course.

Narrow down your options and get on the right path to successfully selling your course.

Get direct expert feedback on your course idea by entering your email below.

Subscribe Form image

There's no obligation. This isn't a sales pitch. We respect your privacy. Unsubscribe at any time.