Embedded - 453: Too Dumb to Quit
Episode Date: June 22, 2023Nathan Jones has been talking about building command line interfaces, good design practices in C, creating MCU boards, wielding the PIC of destiny, and going beyond Arduino. As we are too lazy to atte...nd the conferences, we asked him to give us the highlights. Nathan is giving two conference talks at Crowd Supply’s Teardown 2023 June 23-24 in Portland, Oregon: Make Your Own MCU Board Build HackerBox #0040 and Wield the PIC of Destiny! He spoke recently at the Embedded Online Conference about Object Oriented Programming (well, really good design practices). He has a related github repository so you can look at the examples for yourself. He also gave a workshop on creating a simple command line interface (another excellent github repo full of examples). Probably the best place to start is his Embedded for Everyone Wiki where he collects all the bits and pieces you might want to know about getting into embedded systems. Transcript
Transcript
Discussion (0)
Welcome to Embedded. I'm Alicia White here with Christopher White. Our guest this week is Nathan
Jones. We're going to talk about speaking and teaching. Hi, Nathan. Welcome. Hey, Chris. Hey,
Alicia. Thanks so much for having me. Could you tell us about yourself as if we met at the West Point Open House Parents Day?
Do they have that?
I assume so.
They've got lots, yeah.
Yeah, I'd say I'm Nathan Jones.
I'm probably wearing my uniform, but for those of you that can't see me,
I'm an active duty Army officer in the rank of major and an instructor at West Point. And if
it's a parent I'm meeting, I'd probably say that I'm actually probably teaching your student either
this semester or the one next in either cyber fundamentals or intro to physics.
I have more questions about that, but you also are giving a few talks in the next month, next week. Oh,
next week. Yeah, coming up. What are your talks about? I'll be speaking at the Teardown Conference
in Portland, Oregon. And the two proposals that they accepted were a talk called Make Your Own
MCU Boards, where I'm just going to share some tips that I picked up in
taking a microcontroller and just putting it on a breadboard or on a printed circuit board.
And I wanted to hit the easy button, so I submitted a workshop proposal to just take
some folks through a HackerBox kit where they're playing around with the PIC microcontroller. So
thankfully, HackerBox is donating all the kits. I just got to show up and
help folks play around with PICs. Will you show up in your uniform?
No, I'm not really going in an official capacity. This is kind of more just,
you know, it's the reason I'm in bed. I just love learning myself and love sharing what I learn.
Are you ready for Lightning Round?
Has anyone ever?
We're never ready let's go we're not very
good at it largest vehicle you've ever driven driven it's probably nothing crazy just a personal
vehicle but i've been able to ride in c-130s and chinooks and um i'm airborne qualified so i've
got to fall in out of a couple of helicopters, that's the big one with the double rotors. Largest vehicle, ground vehicle you've ever sat in?
Probably just a coach bus.
I mean, nothing huge.
I got a beat.
Christopher's been in a tank.
Yeah, you do.
Very nice.
Maximum number of push-ups you've given a student for getting something wrong or doing something
wrong in your classroom? You know, the grads I find are way more strict in the classroom.
But since I didn't go to West Point, I'm a very laid-back individual. I've told my students
before, like, if they walk in and they're like, hey, sir, it's going to help me study better if
I just take my boots off and get comfortable, I'd be like, drive on, let's do it.
So probably zero.
What is the proper pronunciation of Hua?
Hua!
What's your favorite embedded processor for use by college students?
For like a college course?
Yeah.
Honestly, I think I would go with either the pick of the msp430 um i think
the the architecture is simple enough that you can kind of really get your teeth into the data
sheet and understand it but there's still lots of support i'm sorry worst mre you've ever tasted
oh god you know it wasn't as bad as people thought it was, but the cheese omelet was really bad.
It's every bit as bad as you think of it right now.
Oh, what's your favorite fictional robot?
Okay, I want to let you know, I thought long and hard about this.
Listeners are the best.
It's Debra Bot 3000 from Mitchell's Versus the Machines.
Oh, gosh.
That's a new one.
I don't remember that one.
We saw that movie, but I don't remember that particular robot.
I have to go back and look at it.
It's one of the two comic relief robots that follows with the family.
Oh, that was a good movie.
Yeah, stupendous.
What is your favorite tool for schematic capture i am most familiar with
eagle um but i've had the luxury i think of the last five years of being able to lean on a lot of
like educational licenses um so i hear really good things about key cad and honestly i i end
up liking a lot of just like browser-based tools i know it's not like the most the heaviest lift but they're just so it takes away a lot of the pain of having to install
anything and do you have a tip everyone should know yes although i'll tell you chat gpt stole
mine the one i was going to go with which was just take a break that was like i called that my
superpower in grad school because there's a lot of really good science behind that.
But the one I'll go with instead is
if you take a public Git repo
and you change the first part of the URL
from github.com to github1s.com,
you'll open what looks like an instance of VS Code
in your web browser.
You can navigate the repository.
I've got an addition to that, which is a very good tip.
Really? But if you are on
a page, if you're on a GitHub repo,
and you're in github.com, and you
just type period, it does
that. Yes, it's beautiful. No way.
Yes, it's awesome.
All right, let's
first of all, I mean, we know
what West Point is,
and your brother went there for a little while.
No, he went to the Air Force Academy for a little while.
I suck so much.
And then he did ROTC for the Army.
Okay.
But I knew the tanks for the Army.
So he did do, okay.
He was in the Army.
What is West Point for folks who don't know?
West Point, the full name is the United States Military Academy. So it is a part of the Army
where students go to earn
not only a college degree,
but also to commission
as second lieutenants.
And it's kind of a neat institution
that the whole place is set up
to take high school graduates
and turn them into officers.
So for, they call it the 47-month experience from when they show up to when they graduate,
they've got their time kind of all planned out, taking college courses and doing military training.
And when they exit, just like our ROTC cadets will,
they'll put on the rank of second lieutenant and uh and perform some job in the
military and it's very competitive yeah extremely okay so how did you how did you become an instructor
there i i think i got cold called like i'd like a like a blanket email as a um as a first lieutenant
when i just been in the military for a couple years, based on just my degree, getting the engineering degree from Harvey Mudd.
And so I always knew, I always had a thought that I would enjoy teaching, but I needed to try it out.
So it was kind of on my radar for a long time.
And when I finally sort of got in that window in my career where it was going to make sense, I worked as hard as I could to get it.
And the stars aligned, and I was able to go to grad school on the Army's dollar and then spend the last three years here.
Alicia is just remembering that you were a mutter. Somehow that slipped her mind.
Otherwise, you would have gotten a lot worse lightning round questions.
What did you go to grad school for?
I ended up getting my degree in computer engineering,
but I wanted to do embedded system stuff.
And really, there's a professor there where I went at NC State named Alex Dean.
And he's got a couple of trio courses that are just very, very embedded-focused
using the KL25Z, at least it was when
I was there. And then another one kind of getting into embedded Linux. And so it just really worked
out that I was in that area at the time. I was stationed at Fort Bragg and my wife was working
in Raleigh. And so it really worked out well to do that for my master's. And what was your degree
at Mudd? It was in engineering.
All right.
And for those of you wondering
how you can get a degree in engineering,
it's a good question.
But you can.
What's wrong with getting a degree in engineering?
You get electrical engineering,
mechanical engineering,
computer engineering.
Just engineering.
Well, there's only a half dozen to choose from.
You never know when you're going to have to combine electrical, civil, and chemical engineering in a single job.
Yeah.
Yeah.
All right.
Well-rounded engineers and scientists who understand the impact of their work on society, you know?
Oh, come on.
You sound like an ad now.
I gave two words for a year or two.
I mean, I love that school.
So you have been giving a lot of talks recently.
You have the two upcoming for Teardown, which are very close.
And you recently gave two for the Embedded Online Conference.
For a total of four totally different talks.
Yeah.
That seems like a lot.
I mean, I know how long it takes me to prepare talks. That seems like a lot. I know how long it takes me to prepare
talks. Are these part of your
lectures for class
or are these fully prepared talks?
Fully prepared.
I try often to make
the work stuff align,
but at this point,
I'm still really new to the whole conference stuff.
The first time I presented was at Hackaday last November. At this point, I mean, I'm still really new to like the whole conference stuff. I mean, the first time I presented was at Hackaday last November.
So at this point, I think I'm still really just like, you know, I'm like the guy on the red carpet that's just happy to be there.
Like, I'm trying to find the proposal that I think has the highest possible chance of being accepted.
And I'm as good as a school kid when I get, you know, an email that says, hey, we're happy to have you.
What has driven you to start doing speaking in public?
When I was in grad school, I think I discovered that there was a desire to do that.
I mean, I didn't do too much embedded stuff, really, when I was in the military, even though
it was still, you know, kind of a latent hobby, a latent interest.
And when I got to go to grad school, you know, my job full, full time was to just go to school, get my degree and play around
with electronics. And so it kind of reawakened just that love of putting stuff together and
tackling difficult challenges. And Chris Svek came to talk to the embedded systems class that
I took from Alex Teen. And that's when I first heard about the Embedded Systems class that I took from Alex Teen and that's when I first
heard about the Embedded FM podcast
and yeah so I started reading a lot
and just you know
wanted to do that
wanted to be you know
be able to see my name on a speaker
panel and
you know maybe not
in any tremendous way but be able to
say I was contributing to the body of Embedded Systems knowledge so I applied to a couple you know, maybe not in any, any tremendous way, but be able to say I was contributing to the body
of, of embedded systems knowledge. So, um, I applied to a couple, you know, uh, when I was
in grad school and it all got turned down. And I think it's just one of those things you just,
you know, you, the, the world rewards those who, um, are too dumb to quit and, uh,
you know, uh, yeah. So I just, just just kept applying kept trying to think of fun talks that
would be accepted and um hackaday was the first one that was just a dream come true what'd you
talk about for hackaday um i led a workshop uh called beyond arduino so trying to get folks just
set up with like the stm32 environment and kind of blink some LEDs and maybe talk to a I2C light sensor
using kind of the
Cubemex software and
I think a couple folks
got there. It was maybe
a bit ambitious to bite
off in a couple hour workshop.
It is. When people bring their own computers
they have a base level
that is totally different
and it's hard to run around and try to help
everyone when maybe you don't have the experience in their particular brand of linux or mac or
yeah well and i ran into the issue too where um i was in order to get done what i wanted to get
done there was some stuff that i was thinking that to get done what i wanted to get done there were some
stuff that i was thinking that a lot of folks would do ahead of time in terms of at a minimum
sort of installing certain pieces of software and right you know being able to write so a lot of
folks showed up just kind of being like hey the title sounded cool here i am and i in and and so
not only are they trying to install software and i'm walking through stuff, but, um, there, I, I, I think I wanted folks, I wanted to
give them a little more than we had time for. And so, uh, instead of sort of, instead of saying,
here's this code, run it. And later on, you can kind of pick it, pick it apart and see how it
works. Um, I tried a little too much to help kind of walk people on to here's where you find the
data sheet. Here's where it is's where it shows you what it is,
here's how you pull up the reference manual
for the, you know, the Cubamix, like their HAL,
and how you find which functions are available to you
when you turn on a GPIO in the code configurator.
And I think that was not a good sort of format
for, like, the workshop.
I went to a workshop years ago
at one of the embedded conferences
where they had a bunch of Raspberry Pis hooked to monitors and they all had the tool set up.
And then you took your Raspberry Pi home.
Not the monitor, of course.
Right.
But that was kind of a genius way to solve the tools to me.
Because it's so hard to have everybody have the same thing
and yet most most things can compile i mean for an stm32 you can compile on a raspberry pi
takes a little longer but who cares yeah exactly and there's i mean i don't i'm not an expert in
any of them but i know that it's my understanding that there are lots of options too in terms of
docker environments or even sort of in browser kind of setups.
I think my big takeaway was just that, you know, you think of a workshop as being two to four hours
and you think, oh man, I can get a lot done in two to four hours, but it's not the time to like
try to push a lot of information, even though it seems like a long time. It's, you know, the
scope needs to be much more limited than you think it needs to be to give folks time
to kind of play around and experiment and try and fail
and still feel like they accomplished something.
How about your embedded online talks?
There was a short one and a long one.
Which was the long one?
That was object-oriented programming in C.
Okay, why is that still a talk?
I mean, no offense to you, but is that
news to anyone? I hope not. But I'll tell you, I did still get a lot of questions like why C and
not C++. For me, it was just, again, going back to the talks that I'm presenting, going through
grad school was learning some of these things.
I took some time to assimilate
a lot of the resources and techniques
that I'd read about
into something that I felt like
when I could say,
I could talk about object-oriented
programming techniques
using kind of strict C.
And I just thought it was a cool project,
so I proposed it and it got accepted.
Let's talk about that a little bit
in a little detail, because I think people do respond to that.
And people listening to this may respond to that.
Is it all just function pointers?
C isn't object-oriented.
How can you do object-oriented in a non-object-oriented language?
Yeah.
So what is the deal with that?
Give us the three-minute version.
Yeah.
Or the 10-minute version.
Well, I'll tell you, recently I was misguided in terms of, like, early in my programming career, I thought OOP was sort of like, you know, once you learned for loops and while loops, that was sort of the next step.
And I'm gradually learning that that's not necessarily the case.
It was only after I'd sort of picked all this up that I'd come to realize that.
But, you know, it's a paradigm.
One of the three big ones, right?
There's procedural, object-oriented, and functional.
And when you say object-oriented, people think of languages like C++ and Java that are, well, C++ and maybe both, you would say, are sort of multi-paradigm. But they have built-in language features that align well with the idea of being object-oriented.
But, you know, it's not the specific purview of those languages.
Object-oriented programming includes the principles of abstraction, encapsulation, polymorphism,
and inheritance.
And you can do all of those in C.
Of course.
And for embedded systems, it makes a lot of sense because you talk about an object and
you talk about an accelerometer.
There's your object.
Exactly.
I mean, it's a real physical object, so it makes sense.
Yeah.
When we talk about a sensor class that has an accelerometer that is a child of it, theits this, yeah, the accelerometer
inherits the sensor class.
When you're not using C++,
that does seem to be
mostly function pointers.
Yeah, at least,
I mean, in the notes
I've put together,
once you want to play around
with like runtime polymorphism
or inheritance,
it kind of comes down to that.
But it's my understanding
that that's exactly
what the C++ compiler
is doing under the hood anyways.
It's just you have to do it explicitly in C.
I mean, there's no free lunch.
Computers work the way they do.
You said you have notes about it.
I saw you had a GitHub repository with increasing levels of examples of object-oriented in C.
Yeah, that's how I think.
When I put my notes together, I want to sort of structure it in a way that makes sense.
And for me, at least, the way to kind of approach this topic is in terms of what's the easiest, simplest thing to kind of understand and implement and how do you build more capability from there?
And it turns out that, you know, it's not hard at all.
Most people are already incorporating some form of abstraction or encapsulation in their
C programs. In the repository, I sort of
break out polymorphism into polymorphism at build time
versus polymorphism at run time.
Even just doing sort of a build time polymorphism is not hard. The idea
that I can sort of write application code to talk to a temperature sensor,
even though I don't know exactly what temperature sensor I'm going to use,
and I can leverage either the preprocessor or the linker to, you know,
when I finally build my project, provide the necessary functions to complete the project.
And, you know, when I write my code in that way, I get a lot of benefits.
That makes sense.
But when I look at your site, it looks like you're doing design patterns.
Yeah, absolutely.
But that's not necessarily object-oriented programming.
No, not necessarily.
Hopefully I don't show my ignorance here, but it's my understanding that some of the traditional design patterns that are in the Gang of Four book, they sort of assume an object-oriented language.
Yeah, that's right.
Which is not to say that, like you said, Alicia, that's right. a solution to a commonly found problem. But I find it really cool to, you know,
once you start picking up some of the OOP techniques
and specifically the idea of being able to kind of substitute implementations
either at build time or run time,
that it does open up the possibility of the more classic design patterns.
And to me, that definitely kind of levels up your code,
your ability to write complex application software
when I know how to leverage the observer pattern
and the strategy pattern or the template method pattern
to get this done.
Do you think that design patterns are important more
because of the way people think about code,
the way people communicate with each other about code,
or the actual, I'm learning this because I need to solve this problem?
I want to say either the first or the third.
I mean, I feel like one of the interesting things to me about software is that it's possible to write
a thousand different
versions of source code
that all functionally do the same thing.
So I feel like it's easy when you're looking
at code and that's kind of like your main
interface to writing software.
It's easy to kind of get lost
maybe in
the details
and how to actually solve the problem.
But if you can look at a piece of code
and know that I'm going to apply the template method pattern here
or know that someone else, you know, they're using a callback,
this is a callback mechanism or it's an observer pattern,
then, you know, it's just sort of dozens of lines of text takes on more of an architectural view.
There's a good body of work that shows if you don't have the words for something,
you don't necessarily, you can't understand it as well.
So people who are challenged with language in one way or another don't understand the concepts.
And so having the words for the design patterns does help just making the concepts available to you.
Yeah, absolutely.
You're totally right that if something's kind of ineffable, then it's hard to think about it.
If you can't put words to it, then you can't construct a mental model around it. And so once you sort of master the basics of the language and just control flow
and, you know, some basic modules, learning how to build those up into architectural patterns
is one way to sort of start building larger and more complex pieces of software.
But you work with students who may have a little bit of computer background,
but aren't necessarily expert programmers or experts in embedded systems.
Where do you start teaching them these abstract patterns and methods
versus having them truly understand what a conditional is
for the classes i taught it's definitely much more of the the former uh or sorry the latter
in terms of just sticking with the basics um i think if if given the chance and had the opportunity
to teach more of the kind of upper level embedded systems courses um I wouldn't necessarily introduce it as like,
here's a design pattern, we're going to talk about this,
but just showing them the piece of sample code
and the benefits of the code being constructed the way it is
in terms of probably to start with just the idea
of kind of keeping details hidden behind an abstraction
and talking about how we're able to write code that doesn't interface with peripheral registers directly maybe,
but at least through sort of a wrapper layer so that if something changes in the future, it's not difficult.
Yeah, the wrapper, as far as design design patterns go the wrapper is by far the
easiest to understand and to communicate because it becomes obvious the second time you have to
port something and even then it's hard to even though it's easy to conceive of it's hard it's
often hard to do it right there's plenty of wrappers i've been i've i've seen implemented
implemented myself but yeah we did that and we hoped we'd be able to port stuff,
but when it came time to do that, that's not what we did.
You passed too much information or not enough.
Right, it just wasn't right.
Yeah, but Elise is right.
All it takes is having to make one change in your...
All it takes is having to change one value in your software
to be like, oh, okay, there's no magic numbers.
Everything's const or pound defined because I'm not control-lifting this thing again.
Yes.
How do you learn more about object-oriented and design patterns?
Do you have a way to stay current?
For the object-oriented stuff, my big resources were, there's a chapter in James Grening's book on TDD where he kind of builds up a couple of object-oriented techniques.
Mira Samick's got a PDF out there where he talksel Schreiner, where he actually, he builds up basically almost like the full C++ in C, which was really daunting.
So that definitely accrued kind of over time as I tried to kind of wrestle with this stuff.
There's a great book on design patterns called Head First Design Patterns.
Yeah, it's actually for Java.
That's my favorite, yeah.
Yeah.
But knowing what I knew about OOP and C, I was able to do everything in the book with C stuff.
That helped me kind of understand what those design patterns were doing.
How did your talk go over?
You know, I think it went over really well.
The Embedded Online Conference does some statistics tracking, and I think there were a lot of really positive responses.
I got a lot from this talk. I got a lot of very similar questions like, why are you doing this?
Even from my coworkers, I sent an email to one of them to ask for some assistance, and they were like, why aren't you just using C++?
Got a lot of these questions, but I think one thing I tried to really impress on folks was just, like we've been talking about that,
some of the simpler stuff of just kind of keeping stuff abstract
and being able to substitute modules, even just with a little linker flag to say,
Hey, pull in this source file, not this one really gives folks a lot of
benefits and, and, and those allow for a really good modular code,
which you know, is not the purview of C++.
It's been well studied since the sevents as being able to be easier to design and test and write and change.
So one thing I hope folks took away was just a couple of ways
that they can write really good modular code.
It's not like C++ makes you a magical object-oriented programming wizard.
I mean, there's nothing about C++
that makes you be able to see all of these things.
In fact, the conditionals are just the same.
So, I mean, I have on my list,
why don't you just use C++?
But the truth is,
you still need to understand the concepts. You can't just just use C++? But the truth is that you still need to understand the concepts.
You can't just go into C++ and expect to understand polymorphism and inheritance.
Those words may exist more there than in C,
but C++ compilers can be written in C,
so there's nothing you can do there that you can't do here.
Yeah, exactly. And I feel like even if it ends up just being sort of an educational exercise,
knowing how to set up the polymorphism and the virtual functions and what sorts of things you
can do makes what the C++ compiler is doing,
I think it makes a lot more sense.
Oh, yeah. Yes, understanding makes things make more sense.
That's sort of a tautology.
I would also argue that C++ is maybe not the language to learn
for object-oriented to start with, period.
It might have been the only game in town for a while.
Have the Rust people gotten to you rust is not object oriented
rust is rust is not an object it has some object stuff but it's not
it's more like c uh with some stuff with some object stuff but uh but no it's very it's gotten
you know it has the weight of i don't want to know, 20, 30, a lot of years.
And it's accrued a lot of stuff.
And so I think it's daunting to, you know, approach learning a new paradigm of programming with the most kitchen sink programming language with that thought behind it.
So, I mean, even Java's older, or not older, but it's in
similar vintage. It's newer, but I think perhaps that's an easier way to go. Python, I don't have
a good suggestion, but there are more streamlined object-oriented languages that have come along
since C++ that would be a better place to start
with. Especially since having come after C++, they de-emphasize some of the things that people
have come to realize were not necessarily things that should be commonly used. Let's put it that
way. Multiple inheritance, that kind of thing. Yeah. Well, and isn't inheritance itself just
sort of like kind of discouraged now?
Somewhat, yeah, but that's kind of a murky discussion.
It should have a has-a instead of an is-a.
Yeah, composition is preferred, but you still can't get around inheritance in certain cases.
Like Swift is a language that very much is against inheritance and would rather you do it different ways.
And yet there's, you know,
the foundation libraries are all using inheritance all over the place.
So,
and protocols,
which do stuff like inheritance,
but it's not inherent.
Yes,
there's ways around inheritance,
but I guess they're trying to push it to be something you do only when necessary,
instead of something you reach for immediately.
But C++,
that was kind of the thing, right?
When you first started using it.
And I think newer C++ is also de-emphasizing it,
but it's kind of hard now that it's this big giant language with this history.
Somebody's going to yell at me.
And there's so much, I mean, in order to do that,
from my understanding, I'm not an expert C++ programmer,
but in order to be able to do those things,
there's a lot that the compiler is doing for you.
A lot.
Yeah, and when you start talking about embedded systems,
that's when you start talking about which things do you not want to be doing
because it might take a lot of space or CPU time.
Okay, so you have a GitHub repository for that.
You also have a GitHub repository for that. You also have a GitHub repository
for your other embedded online course,
online talk, which was about command line,
which I have to say,
I feel like I've given that talk,
but I don't think I ever have.
But it was very familiar and I liked it a lot.
Didn't you write a chapter in your book?
So, I mean...
Part of a lot. Didn't you write a chapter in your book? So, I mean... Part of a chapter.
But you are getting
ready to give a couple of more talks.
You mentioned the HackerBox
Pick of Destiny, but what
I want you to tell me about is make
your own MCU boards, because it's weird to
go from object-oriented
programming to make your own boards,
where weird is
embedded systems. I take that as a huge
compliment uh i have a great memory of going to some army training and uh walking in one day with
my motorcycle helmet and having someone look up and say i really don't know who you are um
yeah you know i just uh the thing that i love about embedded systems is just
well you know what i think it's in i think it's in your book, Alicia, the first edition.
You say, the first time I turned a motor because I told it to, I was hooked.
Yeah.
And that's what I love.
I love the idea of just creating these enormously complex and amazing devices out of some circuits know, some circuits and, you know, some, some few lines of code.
So, um, so yeah, I've, uh, I try to make my, my projects kind of line up with work where I can,
but if not, I just, you know, you know, when I was in grad school, I thought, Hey, I need to learn
OOP. And so that kind of started this journey and, um, uh, of putting those notes together.
Um, I, uh, I had an experience in between my two years in grad school
where I sat down to,
because I was going to put a little project together
and realized that I had no idea where to start
if it wasn't on the development board
we'd used in our Inventive Systems class
in the IDE that we had been using.
And so that started a, you know,
multi-year kind of journey to sort of say,
okay, if I was starting from scratch,
where would I go? And part of journey to sort of say, okay, where, if I was starting from scratch, where would I, where would I go?
And part of that journey took me into, okay,
how do I actually put microcontrollers on a breadboard?
What is the circuit that I need to be able to kind of talk to these things?
And, you know, I'm, I'm no, no expert PCB designer, but in,
in, in playing around with stuff, I feel like I, you know,
I saw behind the iron curtain
and realized that it's there's a lot to it it's not as difficult as it seems like at first pass
uh you know was was able to just lay out a couple of really kind of cheap dev boards that
could get assembled by jlc for a couple bucks and wanted to be able to share that with uh with folks
so i'm going to take a half an
hour just to kind of hopefully help share with them that it's not as hard as it seems which mcus
are you talking about um i'm going to keep it really general because it turns out that um
i think unless you get into like application processors the the themes all that being very similar which is that
the microcontroller needs power it needs a clock needs a way to program it and a lot of that stuff
happens internally um so you can you can load code onto and run run code an SCM32 with nothing external to it except a regulated power supply.
So I kind of show, I'm going to use that one because that's
when I put together my last project, I was using that because I wanted to make
a sort of, not competitor,
but an alternative to the blue pill for folks that cared about whether or not
their electronic devices were counterfeit or not um and uh so i'll be using that and then i've just been
doing some stuff recently with the pics i kind of show that but i try to stay very general so it's
just i got a couple of notes that i'm going to walk folks through to kind of show them what in
general what that stuff looks like are you using documentation from the vendors primarily, or is it stuff you've synthesized?
It's primarily stuff I've synthes every manufacturer in some form or capacity when
you pick a microcontroller there's somewhere in the documentation where they say here's kind of
the recommended circuit and you know SC's got a bunch of great documentation so they like many
others have entire app notes devoted to just if you've got this microcontroller here are
recommendations for how to lay it out. Are you going to talk about Eagle or some other schematic capture for using this?
That's one of the things that I'm going to have to say,
hey, if you don't know PCB layout,
we're not talking about it here.
So I show, actually, I don't even think
I show any screen captures from my projects.
I think I just, I Googled for some generic PCB layout
for the spot where I'm saying,
here's where you take your circuit
and put it on a circuit board.
There's a couple other things like, you know,
hey, if you really got to deal with low noise analog stuff,
or, you know, you're trying to make a USB connection
and you're kind of worried about high speed signals,
that's a topic for a different day.
Antennas too.
Yeah.
Do you have a philosophy about slides?
I try to use them as little as possible.
I try to avoid words.
That's not very ARMY.
Sorry, I've seen some ARMY presentations.
Yes.
I try to avoid words, and I try not to have it be the outline.
But as soon as you said, I've seen some ARMY slides, and I'm like, you know me too.
And usually they're basically books in pdf form
yeah for as as difficult it is to get into west point to complete rotc you know there's
uh the army likes to cater to the lowest common denominator as do many of the military services
um and i've learned a lot over uh the last couple of years in just, um, you know, what are effective ways of communicating information to people and, um,
and, and in teaching that, um, it's, uh, I think it's a,
it's a really neat field is the idea of, um, science of learning pedagogy,
androgy, like how do people learn? And what I've, what I've read is just that,
um, uh, that that's actually pretty well studied that, you know, um that the text in very specific ways can kind of enhance a presentation, but otherwise, more often than not, it ends up competing with what the speaker is trying to say.
And it's much more effective to be able to present a visual to someone as you're speaking over it to try to relay information. I got really excited about a year ago with an organization called the Modern
Classrooms Project, which is just one method of teaching that tried to bring some kind of more
modern teaching practices to the classroom. And they really recommended short lessons,
as little as five or 10 minutes, because that's really all the attention span people have if they haven't specifically trained it and um what what i
ended up kind of doing is um uh i've gravitated towards taking a um a landscape eight and a half
sheet of paper in one note but you know effectively that same size and just kind of sketching out
graphically
what are the main points like if folks were to sort of take a step back and look at this
sheet of paper they might not get all the details but they could point to kind of the landmarks and
say yeah that's that was covered um sort of across between a mind map or um um you know something
the that would just take kind of the high points and kind of annotate them
in a more graphical way. And I try to keep myself because I feel like once I, if I find myself
spilling onto a second page, then that's an indicator that I'm trying to fit too much
content into my talk. I often will try to balance what's on the screen with what I'm saying.
For example, if I have a complicated slide, then what I'm talking about for a while is going to be more amusing, lighter, less technical.
And if I have a picture of a monkey on a slide, I'm probably talking about something very technical and I just want them to engage.
And the monkey is there so that they don't get too bored.
The monkey's on a slide? On the slide? Is the monkey on a slide? Never mind.
Oh, I don't have a picture of that, but I will be making one. Yes, the monkey will be on a slide, sliding down a slide, on the slide. I don't know where I, these techniques are very good.
And I don't know where I, maybe it was Elysia telling me what to do back in the early days of when I had to give presentations.
But being able to separate what you're saying from the slide was a revelation.
It's like, oh, my notes and what's on the slide can diverge.
I don't have to put all my notes on the slide and read them because what's the point of that?
If the people you're presenting to cannot read, then they're not likely to be able to use the
information you're giving. So only put stuff on the slide that cannot be conveyed in speech easily.
Things that need to be visual, connections, things like that.
And sometimes a list of bullet points if you're really, you know.
At the end, just to make sure they're remembered.
Yeah, I think that's how I think of it too.
You know, I think of what's the piece of information I'm trying to convey,
you know, for a talk?
Is it, here's how you construct a for loop?
You know, then i ask myself
what is the what is the thing that i would want to see that hearing the speaker say the thing that
i'm going to say what is the thing i would want to see that would help me go oh okay i get it you
know and it might be like a templated for loop or it might be a little you know gif of a for loop
in action watching someone kind of step through. Here's how the index variable changes.
And that we, you know, you can see the program counter kind of go back or the little finger that points to where we are in the code kind of iterate that many number of times.
Going back to West Point and you went to a college, you personally went to a college that prepares students for grad school or industry, often industry.
And at West Point, the students aren't being prepared to go to an industry job right away.
It's like they already have a five-year plan.
Whereas at most normal colleges, it's like, oh, I'm graduating this year and I
have to have a job. Oh, oh no. Does that make your job much different?
It does, definitely. I think the students, they still see themselves as engineers and many of
them have career goals that are not in the too distant future uh
the only requirement once i graduate west point unless this changes is five years on active duty
and then maybe some amount of time in the reserves so many of them are still kind of thinking about
you know really still being new professionals and and looking at these kinds of jobs um the
way where i think it affects it
the biggest um and one that i'm probably going to miss a bit when i leave this point is just the
idea that um even though i'm teaching them about uh programming or electronics or physics uh that And that education is serving the purpose of helping them become a qualified officer, someone who's going to be able their brother or their sister, and handle the tasks given to them in a way that honors a soldier.
So it's neat.
I picked up a technique from coming in from a couple of the older instructors that they called broadening, which was just kind of starting the, or some of them called the military minute, sort of start class with, you know, either a current topic or I ended up spending a lot of my time discussing with them just life skills that I feel like I picked up, perception, thoughts and thought patterns that have really helped me.
And a lot of students end up telling at the end that, you know, that those end up being the one thing that they can remember about the course.
You had some questions you were going to ask us.
Yeah, so let's, I want to maybe primarily to you,
Alicia, I want to ask first about how the book's coming.
So I've been seeing lots of fascinating discussions on the Slack, and I'm super excited for the second edition.
So how's it going?
It's going pretty well. Thank you for asking.
It's not a setup.
No, not exactly.
It is supposed to go into the early release process on Tuesday, which may mean that by the end of June,
it will be available on the O'Reilly website
as early release.
But that's just the first five chapters.
How terrified are you of that?
And I am adding two more chapters.
So there'll be a total of 12 instead of 10.
And yes, I do talk about it on the embedded Patreon Slack because it is so nice to be able to
ask people, like, do you have problems with this? Should I write about it? And I mean, when I first
wrote the book, I had all of the problems that I'd ever had, but it didn't occur to me some problems people have often didn't didn't penetrate what i had done
and it's so nice to be able to say okay so these are the titles which would you read
and does anybody care about localization have you found yourself like um like being able to draw a lot from just old projects and old notes
or are do you find that there are topics where you're like i really felt that i should have
included this in the first edition but it's not necessarily one that i know a lot about and and
need to sort of learn a little bit before i'm able to include this section in the book
um i knew i wanted to include more design patterns, and those actually fell in pretty easily.
Teaching the class per class helped a lot because people asked more questions and I prepared
lectures as they asked questions, and so I had more material that way. There wasn't a lot at the time that fell out that I wanted to put in.
I mean, I kind of just did
that was the state of my brain
entirely.
But there are new things now that
I wish I had known then,
even if it was just the terms.
So, yeah,
it's going
along. It should be out in the fall that's awesome of some year
no of this year of this year you know hedge your bets no no although i should have worked on it
today and yesterday the day before instead of having a weekend. This was mostly selfish.
I will be,
I think, transitioning out of the military in a couple
years because I love teaching
and building electronics way too much
not to do it.
That'll be the first time I've ever had to shop
for a job.
I did ROTC and for the last 13
years, the Army's just told me where to go.
I'm a little bit terrified of that what I'm curious the two of you looking back reflecting back on your careers
um what were what are some of the things maybe you look for in um in an employer I mean does
does the um the field really matter is it all just you know fun embedded, regardless of whether you're working for agri-space or automotive?
Or, you know, are there specific things that you didn't look for initially, like companies that would send folks to conferences or something like that, that you prioritize now?
I like applications.
If at the end of the day, I don't want to take home home the application even if it's something I can't take home
like a robot or something
I don't want to work on it
unless I really like the application
I don't manage to stay engaged
and
I wish I had stayed with some of my better bosses
I wish I had put a higher priority
on having a really good boss as opposed to having a
really fun job.
Yeah, it's a tough balance.
I echo her applications matter thing.
There's definitely some jobs with some applications that I wish I had not engaged with.
There were some that I was just sort of bored with,
and they're totally fine, but they were just jobs
and writing code for a nebulous black box
that moved bits from one place to another and that kind of thing.
But those were sometimes that the application
and the company culture were not aligned.
So you could have a very interesting-to-you application
that had some social impact that you were happy about,
and the company was totally toxic.
So that's really tough, and that's the thing in recent years
that I've become more concerned with.
I mean, I wouldn't take an application that I'm not comfortable with,
but I'm also concerned about,
let's just say executive staff.
Because I think some weird things have been happening in companies
in the last 10 years.
I think some,
lack of a better way to say it,
some weird people
have gotten into the upper ranks
of organizations. And having encountered
some of those people and had to deal with them closely, I am now much more wary of corporations
in general. And so if I were to go looking for a job, the full-time job or a large-scale contract
with a company that's sort of beyond the two- or three-person startup size, I would be looking very carefully at kind of what I could find out about the company culture, who's running it, what are their attitudes towards certain things.
Because I've become very cynical about that whole aspect of the industry.
That's not a positive thing. Sorry. What I would say is it reinforces just the idea that so much of the job is affected by the management, kind of at all levels, but at least you're saying too, just even, you know, your soldiers can openly dislike you,
but like the impact that you have on an organization
being the actual leader is still enormous.
Like you, the way your personality
and the things you value
are the things that matriculate down
through the organization.
Yeah, and there's,
if there are people who aren't comfortable with that,
they end up spending a lot of their time
protecting the people below them,
trying to deflect and diffuse some of that toxicity
or leadership gaps and things,
but maybe they're not in a role where
they're in a mid-level or lower-level leadership position
and they're not able to kind of right the ship
against a senior manager.
I would add to the list of things to consider when looking for a job.
There are all kinds of jobs out there.
And I have been pretty lucky that I generally have fell into jobs where they worked for me.
When I wanted to have a startup, when I was willing to put in a lot of work,
I went to a startup.
Even when things I didn't know I needed, I got from work.
But I've seen other people struggle because they're just in the wrong job
and they don't realize it. If I had gone to, after HP Labs,
I had the choice between going to a 50-person startup
that was all guys and I knew was going to have problems with that
or to a 300-person reasonably well-established medical device
dealing with chemicals, and
I had some weird ancillary skills that they were very excited about.
And I went to the startup, and I'm glad, because now that I think about how medical
companies work of that size, medical companies of that size particularly, they don't work fast. And I was
at a position that I wanted everything to go really fast. I wanted to be the hummingbird.
But now I'm working on science gear and they said, well, we need this by October.
And I'm like, okay, I could have it for you next week, but October's fine too.
2025.
And then the next thing was, and then we need to test it in the field in the spring.
And I'm like, why would you need so much time?
Once we get it in october we
should take it out you know next day because they only have three boats and they're all booked up
until spring this isn't deep sea so it doesn't have to go on the boat uh but yeah so if you find
you're in a job that isn't suited for you don't give up on engineering or embedded systems
there are fast jobs and there are slow jobs there are jobs where you learn a lot and there are jobs
where you can coast on your skills and still be useful to the company and you'll need more of
these throughout your career there are times when you do need to recharge and coasting
on what you've done is a good thing for six months. I wouldn't say it's a good thing for
five years, but you know, if you have a family and kids, maybe all you need is the paycheck.
And as long as you're doing enough to make them happy and enough to make you happy,
work does not need to be life.
Yeah.
And to add to the culture thing,
you know,
don't things change.
That's the other thing is you can get into a company that's awesome and be there for three years and super happy.
And then suddenly it's what happened to this place.
And that's okay.
And that's all right.
You don't have to stay.
Yeah.
You don't have to stay.
That's what I'm trying to say.
It's like you're coming from the army. it's like, okay, this is very stable.
I've been here for 10 years.
Maybe you're a person who stays at companies 10 years.
Maybe you're a person who, wow, you know, two years is enough at any given company.
And then I want to move on to something else.
And that's something else to figure out about yourself.
At that point, I've learned a lot and I've contributed a lot.
And I'm not learning anymore.
So I'm going to go find some place else to play yeah do you want an engineering job or do you want a teaching job yes ah that's a little harder i know i the the current kind of tentative plan is
um that eventually i definitely will teach.
But right now I feel like I would like to be able to say that I had some experience, you know, shipping products or equivalent. So the thought is that I would work for five or 10 years somewhere doing that.
And even that list of like things I'm looking at, you know, it's a lot of them are organizations that have a teaching component to them anyways. And then go back and get a PhD and find somewhere to settle in and teach.
Would you go back to Mudd and teach?
You know, if the school were not in Southern California, I would move in a heartbeat.
You mentioned that you teach your students and they become leaders.
They don't go into industry and become engineers.
They're already suited to basically management?
Yeah, pretty much.
It depends definitely on what they branch.
So there are lots of traditional branches, infantry and field artillery and military intelligence that folks go into. The Army, just a couple years ago somewhere, you know, helping prepare reports or briefing majors and lieutenant colonels and colonels. And so, yeah, the vibe I get is that when folks transition out of the military,
there's a concern from some of them that, you know,
they don't necessarily have marketable skills,
depending on kind of what their branch was.
But maybe way younger than they really has any business being.
The Army entrusts the officers with personnel and equipment
and the authority to get the tasks done that they've been assigned.
HP tried to make me a manager really young, and I'm so glad they failed.
But that was me. I wonder, part of me wonders if I had gone for the MBA master
engineering that they wanted, the split program that they wanted to sign me up for. And what
would my life have been like if I had done that? It seems, well, I mean, it's only been recently
that I have discovered how much of a people person I am not. Really? I always thought it
was just that I had a short temper. But the truth is, I don't like anybody. Wow. I'm sorry.
Where is this coming from? No, I mean, I think about the management that I've done, and I am happy with what I've done.
And realizing that what I needed to do was different in engineering than in management. And it's taken a lot for me to admit I am not necessarily the best person to be a manager because I do tend to get too attached to the people who work for me.
And I end up antagonizing the people I work for.
And so that's, you know, it's just not really the right spot for me.
But knowing that after college, I definitely did not know that.
Antagonizing the people I worked for was my brand.
Yeah, I know.
That's kind of the Harvey Mudd brand for me.
They deserve it.
Going back to executives.
It is.
You say I can't do this thing?
I'll prove to you I can do it.
It's usually the other way around.
You want me to do what?
When?
Legally?
Okay.
So let's see.
Did you have any more questions for us?
He probably regrets the ones he's asked already.
Yes.
Yeah, I got one more.
I mean, as long as I've got a captive audience.
Tell me about your Mudd experience.
I mean, I think when I was first on this, like, I mistook how much time there was between
our grad years, but I just love talking to Mudders.
I couldn't believe there are two Mudders in the EECS faculty.
I couldn't believe it because the place is so dang small.
When did you graduate?
2010.
So let's see,
when was the last time we were there for the walk around?
2011, I think.
So probably, okay.
So I think you guys had it good.
A cafeteria?
Man.
Your cafeteria was fantastic.
You had that giant maker space.
Yeah, that new maker space thing.
Basketball court. Oh my goodness. All we had there was a muddy field.
Some nice buildings. At least one more dorm that didn't smell like the 70s.
You're short a pool, but realistically, we could only swim in the pool when it was closed. And then eventually campus security would come and yell at you.
I never swam in the pool.
I was supposed to take the swim test, but I managed to evade it long enough that they took away the requirement.
Yeah, no, I think Mudd was definitely in a transition period when we were there.
Yeah, we still had Riggs.
And he was a very different president
you know it was a very you know legacy of the 80s kind of thing still i mean it was 1992 when we
started so it was basically the 80s so kind of the 70s 80s attitude to orange engineering was still
persisting some very uh uh how do i say this politely some Some very venerable and distinguished professors in many departments
teaching classes that perhaps they should have moved on from.
They were the OGs, the people who started when the college started in 1955.
Some of the people were people who started when calculus started.
I'm being really mean.
But no, when we started, there were definitely newer faculty
were just starting to come in who had, you know, fresh ways of teaching.
And, you know, it was very much a transition.
So some things were very good, but I think some things were beginning
to be on the upswing of improving, and we kind of missed it.
What was the gender ratio when you went?
My first year was Maria Clower's first year,
and that was a big, from what I understand,
big focus.
So it was climbing, I think,
the whole time we were there,
but it was, I want to say,
like in the 35-40% range.
I think it was...
15-20% for us.
15-20%, yeah, it was low.
Yeah, they made a lot of progress. Yeah, you know, 20%. Yeah. It was low. Yeah.
They made a lot of progress.
Yeah.
I, you know, I, I, there's many things I loved about Mudd and there's many things that took
me years to forget about.
And many of the Mudders I met then are still my best friends.
Yeah.
I married a Mudder.
That's the way to do it.
Um, yeah, yeah. And, and I mean, and you, when you were there were there they were they had already kind of revamped
the curriculum too because the way they did the core when we were there was much different i think
um yeah didn't they didn't they re redo all the core courses and stuff and put a greater emphasis on
gosh, I can't remember what they did
but there was more flexibility
about where you could take stuff.
There's a little bit more greater emphasis on some
humanity stuff, but also
I don't know if
there were some courses
they were thinking of not requiring for engineering
like PCAM
and other stuff. We didn't have like, PCAM and other stuff.
We didn't have to take PCAM.
Or OCAM.
Okay.
Those were on my list, but they could never fit in. All right.
Well, I know there was some revamp.
Because I remember going down there, and they were talking to alumni about, here's what we're going to do.
And alumni were like, you can't do that.
We had to suffer.
There's a phrase at Westmont called, the core has.
And it's just the idea that, like, or, like to go to the opportunity to go to ranger school and they keep
talking about like everyone went through the last hard ranger class.
Yeah.
So I try to keep an open mind about that stuff.
Yeah.
Yeah.
And for folks who don't know what Harvey Mudd is,
when we talk about the core,
the school has only a few official majors and they're science and
engineering based.
So when we talk about the
core these are the classes everybody has to take and they're things like physics and chemistry and
biology and math and cs calculus yeah um and so when when we meet other mutters we know that they
have that level plus one third of their courses were humanities of some variety
and so it's it's a weird engineering balance um but it also means that while nathan has an
engineering degree and chris has a math degree they they both can talk about that bucket lab
i didn't do no bucket lab was z54 i never took that ah nathan did i wasn't
no no i took one engineering class and noped out of that that major
i have to work in groups with people on projects no
what i loved about this school too is i used to tell folks on tours
the kind of the kind of individuals
who are just gonna
you know they're gonna run circles around me at the chalkboard
and then two hours later you know
they're gonna I'm gonna be seeing them zipping by
on their unicycle and we're gonna grab a beer after class
like they're individuals
who are crazy smart but
have not somehow lost that like social
side of them
yeah
expressive odd somehow lost that like social side of them yeah yeah expressive
odd okay let's just call it as it is
so do you have any ideas for future talks um yeah after the last embedded online conference
i kind of jotted down um you know some thoughts and but i i think it's it's going to be whatever whatever
the the project i've most finished and i'm most excited to kind of share um i i love you know
something that excites me that's just kind of who i am i want to be like hey check it out look what
i just did let me let me show you how to do it um but i i love that um um I just love that the continuing of the maker culture with, you know, more
Duminos and more Raspberry Pi variants and now, you know, MicroPython and CircuitPython.
I got to help take our CyberPython class from, into a CircuitPython-based project, which
I was really excited about to kind of get these students
some hands-on with the hardware so um uh anything that's just going to help folks build cooler stuff
faster that's kind of a motto build cooler stuff faster and nathan it's been really good to talk
to you do you have any thoughts you'd like to leave us with yeah i'll leave you with with one
which is um uh i think it's isaac newton who said something like, if I see so far, it's because I stood on
the shoulders of giants. So just a huge thank you to the two of you for the work you do in
helping folks learn embedded systems. A huge shout out to individuals that I've had the
opportunity to meet through the Slack, like Chris Feck and Phil Johnson and everybody on the Slack channel who's put up with my in-game questions.
Thanks for helping out me and other individuals.
Our guest has been Nathan Jones, an active duty Army officer and instructor at West Point.
Thanks, Nathan.
Thank you both so much. Thank you to Christopher for producing and instructor at West Point. Thanks, Nathan. Thank you both so much.
Thank you to Christopher for producing and co-hosting.
Thank you to our Patreon listeners lab group for all that they do.
And of course, thank you for listening.
You can always contact us at show at embedded.fm or hit the contact link on Embedded FM.
And now I have some facts, which may be of dubious quality, but I got them from a book,
so I'm going to call it Facts. The book is How to Speak Whale by Tom Mustil, and it's about
etymologies. So whales are cetaceans. That's dolphins and whales and orcas and all that. And cetaceans, if you go back to the Greek, means large fish or sea monster. And these are the odontoceti, which literally means sea monsters with teeth.
Makes sense.
And then there are the baleen whales, which a big part of the baleen whales are the mysticeti,
which according to the book means sea monsters with mustaches.
Anybody out there knows Greek, please let me know if that's true, because I want it to be true.
These are all the baleen whales.
They do the filter feedings.
You want to start some mustaches.
It's great.