Inspired by a book about Silicon Valley before the reign of software, I wanted to explore programming concepts closer to the hardware.
I planned on using a retired MacBook Pro as my kernel OS development machine. And that's how I re-encountered the short-lived MacBook touchbar.
genesis
In What the Dormouse Said ↗, a history of the Silicon Valley hardware scene that pre-dates the famous garage days of Jobs and Woz, I was inspired by how many user experience decisions early hardware engineers were making.
Douglas Engelbart's wooden mouse prototype—primitive yet functionally similar to modern versions—resonated with me.
After some discussion of the principles of kernel-level programming, I asked Claude to write up a learning journey for me to build my understanding of the layers of software that more directly interact with a machine's hardware.
This project stems from an interest in understanding the fundamental relationship between hardware and software in computing systems. Inspired by early computing pioneers and works like "What the Dormouse Said" by John Markoff, the goal is to develop a deep understanding of how computers work from the ground up.
1. Understand the fundamentals of computer architecture
2. Develop a working knowledge of bootloader and kernel development
3. Gain practical experience with low-level system programming
4. Build a simple operating system from scratch
5. Understand the hardware-software interface
Hardware: 2020 MacBook Pro
Primary Development Platform: Virtual Machine
Tools Required:
UTM/Virtualization Software
Linux Distribution (Ubuntu/Debian)
Development Tools (NASM, GCC, QEMU, GDB)
Text Editor/IDE (VS Code recommended)
Configure development virtual machine
Install necessary development tools
Set up backup and version control
Configure debugging tools
Implement basic bootloader
Learn about:
BIOS/UEFI interfaces
Real mode to protected mode transition
Memory segmentation
Basic assembly programming
Develop minimal kernel
Implement:
Basic terminal output
Memory management
Interrupt handling
Device I/O
Create command interface
Implement:
Keyboard input
Basic command parsing
Simple shell commands
User interaction
File system implementation
Process management
Memory protection
Device drivers
User space programs
Primary Books:
1. "Operating Systems: Three Easy Pieces"
2. "Operating Systems: Design and Implementation"
3. "Writing a Simple Operating System from Scratch"
4. "xv6: a simple, Unix-like teaching operating system"
Online Resources:
OSDev Wiki
Architecture documentation
Community forums and discussions
1. Successfully boot custom bootloader
2. Display text on screen through kernel
3. Implement basic shell
4. Handle keyboard input
5. Create simple file system
6. Run basic user programs
x86/x64 architecture
Memory management
I/O systems
Interrupt handling
Assembly language
C programming
Device drivers
Memory management
Process management
File systems
Device management
System calls
Development environment setup
Build process documentation
Architecture decisions
Debugging procedures
Testing protocols
Focus on educational understanding rather than production usage
Emphasize clean, well-documented code
Prioritize learning fundamental concepts
Build incrementally with working milestones
1. Working bootloader
2. Functional basic kernel
3. Interactive shell
4. Basic file operations
5. Understanding of core OS concepts
6. Documented learning journey
Technical guidance on architecture
Debugging assistance
Code review and feedback
Resource recommendations
Progress evaluation
1. Confirm development environment setup
2. Begin bootloader development
3. Implement basic kernel features
4. Create simple shell interface
5. Add advanced functionality incrementally
Provide step-by-step guidance
Focus on foundational understanding
Explain technical concepts clearly
Help debug issues
Recommend resources as needed
Track progress against milestones
Adapt plan based on learning pace
Flexible and learning-focused, with emphasis on understanding rather than speed. Each phase should be considered complete when concepts are fully understood and implemented successfully.
After working through the initial stages of this learning journey I realized two things. First, my initial insipration was wearing off with the steep learning curve of Linux (no surprise there).
Second, the TouchBar on my 2020 MacBook Pro was driving me insane. I began to wonder if there was a way to scratch my recent curiosity-itch while also doing something useful with the TouchBar.
Discussing how I might tinker with the TouchBar in another chat with Claude felt entirely natural. The concept we landed on was visualizing my CPU processes with a colorful shader in the TouchBar display.
My initial thought was to prototype gathering and representing CPU data with a web app, then sending that to the TouchBar.
With Claude's help, I used Express.js and Three.js to collect CPU data and represent it as a multi-colored shader. I had it in the back of my head that I could put this functionality inside an Electron app to run on MacOS.
But after some old-fashioned research in StackOverflow, I discovered a critical limitaiton. JavaScript via an Electron app would not be able to access the NS TouchBar provider function for native TouchBar control.
pivots
I created a new XCode project and used Claude to scaffold a Swift app that visualized the same CPU data as I had done in the Javascript POC. As I dug into the TouchBar Provider, I grew hungry to explore a more interactive project.
I thought, what if I replicated the gradient and links on my portfolio homepage on the TouchBar? This required me to embed my portfolio as a webview inside the Swift app and program each TouchBar button as if it were a traditional HTML link tag.
reflection
A few years ago when I was contemplating where I wanted to take my career, I came across the title Creative Technologist for the first time. Whether or not this is a practical, marketable, or realistic role, I have always admired the ethos of the phrase.
I like to think that this TouchBar journey embodies a creative technologist approach. It combines intellectual and technological curiosity with practical implementation, leveraging AI tools to overcome my knowledge gaps in unfamiliar territory.