<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/techniques-for-wielding-data-and-behaviors---mike-shah---ndc-toronto-2026-icovd1iap" -->

---
title: Techniques for Wielding Data and Behaviors - Mike Shah -...
description: A conference talk traces the evolution of programming languages from the theoretical Turing machine through B, C, and D, showing how programmers can...
canonical: https://daily.dev/posts/techniques-for-wielding-data-and-behaviors---mike-shah---ndc-toronto-2026-icovd1iap
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Techniques for Wielding Data and Behaviors - Mike Shah - NDC Toronto 2026 | daily.dev
og:description: A conference talk traces the evolution of programming languages from the theoretical Turing machine through B, C, and D, showing how programmers can...
og:url: https://daily.dev/posts/techniques-for-wielding-data-and-behaviors---mike-shah---ndc-toronto-2026-icovd1iap
og:image: https://api.daily.dev/og/posts/iCOvd1IAp.png
og:image:alt: Techniques for Wielding Data and Behaviors - Mike Shah - NDC Toronto 2026
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Techniques for Wielding Data and Behaviors - Mike Shah - NDC Toronto 2026

**[NDC Conferences](https://daily.dev/sources/ndc)** · 51 min read · 0 upvotes · 0 comments

## Summary

A conference talk traces the evolution of programming languages from the theoretical Turing machine through B, C, and D, showing how programmers can 'unconstrain' themselves from static type systems. Techniques covered include casting and reinterpreting bits, bit swizzling for pixel data, unions and tagged unions (with SDL as a real-world example), object-oriented patterns like factory and strategy patterns, function pointers for dynamic behaviors, runtime structs using a custom 'var' union type, and building a mini bytecode virtual machine using the command pattern. The talk emphasizes that programs and data are fundamentally just bits, and that flexibility gained from these techniques trades off against performance and type safety.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=9fIAqEnUKUw>

## Questions this post answers

### What is a tagged union in C and how do libraries like SDL use it?

A tagged union pairs a type field with a union payload so code can safely determine how to interpret the stored bits at runtime. SDL's event system places the type field at the start of every event union, followed by fields specific to that event type, matching this layout in memory so the same union can represent many kinds of events compactly.

_Developers designing event systems or protocols can find pattern breakdowns like this on daily.dev._

### How can you build a simple bytecode virtual machine using the command pattern in a systems language?

You encode a program as a stream of integers where each value is either an opcode index into a lookup table of commands or an argument for the preceding command. A loop reads the next integer, looks up the associated function pointer and payload structure, pops the required number of arguments, and executes the function, effectively reinventing a minimal interpreter similar to Python's bytecode model.

_Anyone exploring interpreters or scripting layers for games can track pattern deep dives like this via daily.dev._

### What is bit swizzling and why would you use it when working with pixel data?

Bit swizzling means rearranging the individual byte components packed inside an integer, such as reordering RGBA pixel data into BGRA, without changing the underlying bits, only their position. It is done using bit shifting and masking operations and is commonly needed when a video decoder, network protocol, or hardware pipeline expects a different byte ordering than the one you started with.

_Developers optimizing graphics or network code can follow low-level techniques like this on daily.dev._

## Similar posts on daily.dev

- [What are your programming "hunches" you haven't yet investigated?](https://daily.dev/posts/what-are-your-programming-hunches-you-haven-t-yet-investigated--ye8oavk2s) · Lobsters · 1 upvotes · 0 comments

---

Tags: [#infrastructure](https://daily.dev/tags/infrastructure), [#c](https://daily.dev/tags/c), [#data-structures](https://daily.dev/tags/data-structures), [#design-patterns](https://daily.dev/tags/design-patterns)

[View this post on daily.dev](https://daily.dev/posts/techniques-for-wielding-data-and-behaviors---mike-shah---ndc-toronto-2026-icovd1iap)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Techniques for Wielding Data and Behaviors - Mike Shah - NDC Toronto 2026","url":"https://daily.dev/posts/techniques-for-wielding-data-and-behaviors---mike-shah---ndc-toronto-2026-icovd1iap","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/techniques-for-wielding-data-and-behaviors---mike-shah---ndc-toronto-2026-icovd1iap"},"datePublished":"2026-08-13T11:07:14.177Z","dateModified":"2026-08-13T11:07:38.713Z","description":"A conference talk traces the evolution of programming languages from the theoretical Turing machine through B, C, and D, showing how programmers can...","image":"https://i.ytimg.com/vi/9fIAqEnUKUw/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/9fIAqEnUKUw/sddefault.jpg","isAccessibleForFree":true,"articleSection":"NDC Conferences","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"NDC Conferences","logo":"https://media.daily.dev/image/upload/s--SiIyojEj--/f_auto/v1748760369/logos/ndc","url":"https://daily.dev/sources/ndc"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/techniques-for-wielding-data-and-behaviors---mike-shah---ndc-toronto-2026-icovd1iap","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"infrastructure,c,data-structures,design-patterns","timeRequired":"PT51M","video":{"@type":"VideoObject","name":"Techniques for Wielding Data and Behaviors - Mike Shah - NDC Toronto 2026","description":"A conference talk traces the evolution of programming languages from the theoretical Turing machine through B, C, and D, showing how programmers can...","thumbnailUrl":"https://i.ytimg.com/vi/9fIAqEnUKUw/sddefault.jpg","uploadDate":"2026-08-13T11:07:14.177Z","duration":"PT51M","url":"https://api.daily.dev/r/iCOvd1IAp","embedUrl":"https://www.youtube.com/embed/9fIAqEnUKUw"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"NDC Conferences","item":"https://daily.dev/sources/ndc"},{"@type":"ListItem","position":3,"name":"Techniques for Wielding Data and Behaviors - Mike Shah - NDC Toronto 2026"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/techniques-for-wielding-data-and-behaviors---mike-shah---ndc-toronto-2026-icovd1iap#faq","mainEntity":[{"@type":"Question","name":"What is a tagged union in C and how do libraries like SDL use it?","acceptedAnswer":{"@type":"Answer","text":"A tagged union pairs a type field with a union payload so code can safely determine how to interpret the stored bits at runtime. SDL's event system places the type field at the start of every event union, followed by fields specific to that event type, matching this layout in memory so the same union can represent many kinds of events compactly. Developers designing event systems or protocols can find pattern breakdowns like this on daily.dev."}},{"@type":"Question","name":"How can you build a simple bytecode virtual machine using the command pattern in a systems language?","acceptedAnswer":{"@type":"Answer","text":"You encode a program as a stream of integers where each value is either an opcode index into a lookup table of commands or an argument for the preceding command. A loop reads the next integer, looks up the associated function pointer and payload structure, pops the required number of arguments, and executes the function, effectively reinventing a minimal interpreter similar to Python's bytecode model. Anyone exploring interpreters or scripting layers for games can track pattern deep dives like this via daily.dev."}},{"@type":"Question","name":"What is bit swizzling and why would you use it when working with pixel data?","acceptedAnswer":{"@type":"Answer","text":"Bit swizzling means rearranging the individual byte components packed inside an integer, such as reordering RGBA pixel data into BGRA, without changing the underlying bits, only their position. It is done using bit shifting and masking operations and is commonly needed when a video decoder, network protocol, or hardware pipeline expects a different byte ordering than the one you started with. Developers optimizing graphics or network code can follow low-level techniques like this on daily.dev."}}]}
```

