Embedded - 320: Why Isn't This Working?
Episode Date: February 14, 2020Chris Gammell (@Chris_Gammell) of The Amp Hour and Contextual Electronics joined Christopher and Elecia to talk about firmware, learning, and books. Chris is the host of The Amp Hour, a podcast about ...electronics and electrical engineering. Chris is also the founder of Contextual Electronics, where you can go to learn how to create electronics. Chris has a long running blog called Analog Life, found on his webpage chrisgammell.com, Chris is learning firmware as part of his consulting business. He likes Elecia’s Making Embedded Systems book. KiCon is happening at CERN in September 2020. More information at 2020.kicad-kicon.com. We talked about Jay Carlson who was on Embedded talking about his Amazing $1 Microcontroller project (#226) and about teaching embedded systems (#303) We talked about book club books: The Practicing Mind Draft No 4 Drift into Failure The Science of Self-Learning And a fun book series called Bobiverse (the Audible version is especially good). (The outro music is Chris W.’s attempt to troll Chris G. with his “lightning” round answer)
Transcript
Discussion (0)
Welcome to Ampedded.
This is Elysia White with Christopher White and Chris Gamble.
Hello.
Sorry, was I not supposed to say that?
No, that's good.
We haven't done this very recently, so...
Just pop out with hello.
Hi, embedded listeners
i'm chris from the amp hour
amp hour listeners
yeah
well here we all are doing it yeah we all are okay
but this time we're going to talk about firmware right yeah i mean that's the plan
uh you have been doing firmware you're a hardware engineer engineer. You know that, Chris, don't you?
I do.
And you know what's really crazy is like I have, so I've been kind of the month of January has been me reviewing my yearly goals and just kind of like, you know, yearly goals or whatever they are.
But one of the things that's on there is just like more firmware projects.
And I've been consulting for about 18 months now, a little bit more.
And the thing about that with hardware is
it's really choppy, right? So unless you have like a client that just has lots and lots and lots of
boards, it's really choppy. It's you do a board, you, you build it, you test it, you know, assuming
you build it. And then if you have a firmware person you're working with, it's just like you
hand it off. And there really aren't any changes unless you mess something up, or, you know, you
have a revision. And then that's great for the client. That's like a best case scenario is you don't, you haven't messed it up and nothing, everything works as expected. But from a consulting standpoint, as you both know, it's choppy. And that means that income is also choppy. And I have to have a lot clients, and lining it all up is kind of just logistically really tough. Not to mention that I want to get better
and offer better services to clients.
And so I was like, well,
I should really be taking on more of the firmware aspect.
So I've been doing that, and it's been great.
This firmware stuff, it's got legs, I think.
Why'd you go for firmware instead of FPGA?
That's on the table, too.
I mean, it's just...
You're going to be a full-stack product designer?
I think it's just more, you know, doing more things and learning more things.
I had this great revelation recently within the consulting world that, like, I get to just, you know, like, I'm not learning from scratch and I'm not having a client pay me to learn, but there is so much to learn.
There is. And I feel like in the consulting world versus my previous corporate gigs, it's really varied.
I mean, you really, I mean, both, you know, you know, you're doing machine learning and
all of the various things that you're doing.
And it's, I mean, there's so much stuff out there.
Yeah.
I mean, it's kind of like working at startups.
I mean, I remember the difference between working at a startup
and working at the big corporate gigs was always,
the big corporate gigs you got to work on something,
but it was a very small little corner.
And maybe it was a small little corner of something
that had been around for a while.
So there wasn't really that much to learn,
except, you know, good programming practices
and all the high-level stuff.
But the first real startup I worked at,
it was like, oh, my God, there's,
okay, we need a motor controller. Oh, okay. We need, we need this,
this sensor hooked up with spy. Okay. We need this flash thing to work. Uh, and it was just one thing after another like that. And unless you get into the right startup, that's doing something
from scratch that, that has all these pieces, you're not going to get an opportunity to really
learn all those pieces unless you kind of have little jobs all over the place.
Yeah, I mean, from a business perspective, yeah.
There's less pigeonholing in startups. You have to do breadth,
but you also have to do depth, which is what makes them so hard.
I mean, they always turn into, if they're successful, then they quite often turn into the big
corporate things, and then you're responsible for A-lines of code for the rest of your career.
Optimize that, please.
That's painful, though.
Going from a startup where you're the third or fourth engineer to supposedly just being an engineer.
And you're like, but I designed this system.
What do you mean you want me to make another spy driver?
I already did that.
Okay, so you're doing firmware.
And you made a concentrated effort to learn, not just to modify what somebody else had done.
Yeah, so I've been hiring tutors.
And I started with a personal project, just kind of getting back into it.
I've obviously bugged both of you, bugged other people on the embedded Slack,
and have been just generally trying to put more focus on it because it's not something that just I could hop back into.
And so past projects, I've been doing – I've done firmware in the past.
It's not like I've never done firmware before.
But sometimes it's like, well, I'll just throw an Arduino IDE at this problem or that problem.
It just doesn't work at that point.
You don't get debugging.
You don't get a lot of things.
What was your personal project?
It was a light-up wristband.
It's still in progress, actually.
What I was really doing is I went on LCSC.
What is LCSC?
Oh, so you know JLC is like a PCB manufacturer?
Have you ever heard of them?
Let's go with no.
Okay.
So they're a very, very low-cost PCB manufacturer.
And they also have like a DigiKey equivalent.
But the interesting thing is that they have a lot of parts
that are Chinese only.
Like they're only available in mainland China,
but they'll actually export them.
And so a lot of brands you wouldn't know,
but a lot of like kind of weird data sheets
and maybe not super well-documented functions,
but just dirt cheap stuff.
I mean, like really, really,
it's stuff that goes into consumer goods.
So for example, one of the chips that I was looking at,
it's a 433 megahertz
transceiver not even transceiver it's sorry it's a transmitter and so it's a really simple like
i squared c style uh interface but it's called like just data stream or something very very
generic and um that's what goes into those really really cheap quad copters you can buy like the toy ones and not super well
documented but you can use that and it's like that's like 10 cents 15 cents in quantity like
not even local not even high quantity like like that's like an 100 quantity and so um i did that
and then i also grabbed like then like stm32 stuff is really low cost in there too and so i grabbed the lowest cost stm32 i could find which is a f030 and that's like 30 cents in 100 quantity selling just like really really low prices for
what i'm used to i just wanted to see what i could do with it and so the idea was making a
remote blinky thing uh that i could synchronize with lots of people so that's kind of
that's the thought um that's what i've been working on, and we'll see how it goes.
Is this for conferences or for raves?
This is for an event that I'm throwing, yeah, next summer.
Ah.
So, yeah, it's still in the works,
but that was kind of my platform for like,
oh, well, now I can dig into ST know stm32 and just arm cortex m0 so i'd used them before on like i said like using an arduino
id everything's kind of abstracted away it's not like i hadn't used similar kind of micros and
stuff but when you make that shift over and i think we've talked about it before it It's a drastic shift. It really is.
To be deep in the register sets and dealing with data sheets directly
and all the things that you talk about
in an embedded FM.
And the tools.
I mean, the tools are far more brittle.
They've gotten better,
but they've gotten better to the point of,
well, it should have been this way
like 15 years ago.
So it's got a long way to go um how what what parts are you finding the
most frustrating well um i went a little bit i swung a little bit too hard i think i um i went
to like oh i'm going to do everything with gdb and uh i'm going to do everything in vim and you know do compilation and it was really it
was a little overboard to be honest but the thinking there was i've you know i've used
i've used ids before and i never really knew what all the stuff scrolling by was
you know like you see and and so i always talk about the 2 a.m problem like what happens now
where i'm on a job working on something there's a deadline 8 a.m the
next morning it's two in the morning and i just need to get something working and there's just
some weird compiler flag that i i just don't understand because i've never used anything on
the command line prior to that and it felt like i really had to have that experience in order to
dig myself out of my own holes you know okay so Okay, so Vim, which I think when you told me that,
I laughed initially,
because there's only one real thing I know about Vim,
and it's escape colon Q.
Colon WQ, yeah.
You learn that one real fast,
or else you control Z and you back out the hard way.
The problem is I type so fast that every time I do that,
about 70% of the time I do colon W1 instead of Q.
So almost every directory on my computer has a file called 1 in it.
And I just come across them occasionally, delete them.
Oh, yeah, that was when I was in VI.
It's like a trail of, it's like breadcrumbs, you know?
I should have a script that periodically goes through and deletes everything called one.
Right, yeah, that probably wouldn't have disastrous consequences.
I like the idea of the 2am problem, that you want to be able to solve just about everything yourself.
But that's a hard thing.
Here's my problem with it.
Here's my problem with it.
And I think it's laudable.
Is it 2 a.m.?
No, no, no.
Because you don't see that time of night.
That goes without saying.
But there's always going to be a 2 a.m. problem
you don't remember having come across.
Like, there's so many things with, like you're saying,
with C flags or configuration or linker maps or whatever where there can be just a small error it's always going to take you hours to
figure it out i'm just i i see where you're going with that and i just wonder if it's the right
application of learning energy well i can say in the i could talk more about it later but in the
interim i have swung back hard the other direction okay and i think it's like it's really good for level setting right it's like oh okay
this is the way it used to be this is the way it can be and you can build up your own setup
and i will say that some of it is influenced by my tutors as well right so like they were doing
that anyway well one of one of the two was doing that anyways and he's really helpful but he's
like you know this is a a great way to learn this. And I agree it was.
I mean, and I knew I had – so it's not until the summer of this year.
I knew I have time to do that kind of thing.
And so I was like, okay, yeah, let's go for it.
I think it is good to have that baseline of experience, but, you know, it's arguable if it's the best way in general.
You know, like there's – all these tools are built around it around other uh other workflows
and it's kind of it would be kind of uh audacious of me to think that oh i i'm going to come up with
a better thing you know i'm going to customize myself i really need this because i'm so high
performance you know it's like that's not going to be the case i mean there's certainly reasons
to stay in the command line world but i and it's great to have seen all that stuff and i think i
think it is valuable to go through that and say,
okay, this is how this works,
just so you know what the things are
if you do have to eventually look into it.
And there is no one right way.
Of course, right.
And if you can see as many different ways as possible,
you can find a path that works best for you.
And I don't use VI,
but it's not like I don't respect people who do.
I just don't know those things.
And of all the things in the world to learn,
that hasn't been high on my priority.
Right, right.
And so I've always been,
so I made like a conscious effort
to do full Linux everything these days too.
And a lot of the traditional
tool makers, they just ignore it. They say,
well, sorry, switch to Windows.
I mean, you've talked about it on your show too.
Switch to Windows, that's what firmware
is. You're in Windows. And I kind of
reject that a little bit as well. I mean, I think that
I know that they're
definitely getting better about it, and I try
and support tools or support vendors
that are targeting Mac and all the options out there, Linux and everything.
But it's very frustrating to be told that, like, no, I'm sorry, you must conform to this entire worldview as well.
And I don't like that, but that's also kind of snobby, I guess, of me.
I don't know.
So what else have you learned from your tutors who I want to make this a thing I'm getting better at. And a lot of people were like, hey, just give me a call.
I'll tell you what's going on.
I'll help you out.
And that's super sweet, but it's actually on me.
If I don't have skin in the game, I don't think I'm going to – I don't know.
It's just like when you're not – when there's nothing – there's no value transfer, I feel like it's limited in terms of like – it's not like I'm thinking that they're dependent upon my dollars.
But I think it's more of a – it's like this clear exchange of value, their time for my dollars, and that is a two-way street. And also I'm going to work hard and go through with the assignments they give me and follow up with them because I'm paying for it.
Like otherwise it's just a big waste of money.
And, you know, that's – I just always think that's the right way to do it.
It's not like libertarian like, oh, everyone should, you know, whatever.
But it's – I just, I think,
I view it in the same way as the music world too.
You know, you wouldn't ask a piano teacher to just show you a couple things
because you need some help.
It's like, no, it's like,
there's a very strong lesson culture there.
And I was trying to structure my learning
in a similar way.
You have a podcast, right?
Uh-huh, yeah.
Where you talk and you give away
your information and insights for free to people who don't give you any skin in the game.
That's true. But when someone asks me, hey, Chris, can you actually show me how to do a layout
specifically? I say, yeah, I can actually. I have tutoring as part of my online course that I do.
And I also have an online course people can pay you know that's like
it's two-way street i think you know i i totally agree with that i i find that to be the same kind
of psychological thing with myself like i've taken online music courses before and the transition in
my mind from just fooling around to oh my god i have an assignment to do and this person this
nebulous person who runs this course who i I'm never actually going to meet, probably not even going to talk to
except over email, you know, they might grade my assignments, but it's not a, it's not a
conversational thing. I still feel like, okay, I have to, I have to do what they say and I'm paying
for this. Um, there's just something that shifts in your mind when you have a formal relationship
with, with instruction. Um, totally, totally. I totally totally i mean yeah i mean look at the numbers for moocs right so like massive online
open course like those are free and they're wonderful resources but i think even all these
years on they're still four percent completion rates and like and that's because that's about
how many people would follow through all the way when there isn't any monetary i don't know what it
is there's something psychological and um i think i've mentioned to both of you before i'm kind of a
self-help junkie so i think there was something i read in books about this too it's not like this
is my only my personal idea but like this is just i feel like that's the way to move forward
have you i mean chris you do music but alicia have have you ever done tutoring or similar stuff before? Not very much.
I learn out of books.
Right, yep.
And as far as when people ask me for help, or I definitely was one of the people who said, yeah, Chris, call me anytime.
And I did a couple times, yep.
But I mean, I'm kind of the first hours free if you want my attention, although I shouldn't really say that because.
Uh-oh.
Leave that out, Chris.
I mean, if there is going to be a client relationship perspective.
But yeah, I guess I don't take very many classes these days.
You did the, you did the Udacity course that I did this year.
That's the car driving one or the car, the ML one.
I see.
I was, I was paid in services for that cause I, I did some, uh, work for one of their other
classes.
Um, I used to take community classes all the time,
and I guess I am looking at taking
some makerspace stuff here.
Is this after Wendell and Lenore were on
and they were talking about their awesome classes they took?
Man, I still want to go to that CV.
It's less of a class and more of a science vacation class.
I don't know.
That was a really fun episode.
No, it's more from Robert Lang's origami episode
where he said he had a laser printer
or a laser cutter
and it made so much difference.
And I was like,
okay, I need to really do this.
I need to try that.
So I found a makerspace with a laser cutter.
Didn't you both almost get a laser?
What's that desktop one that you?
Yeah, didn't you get one?
Or you're going to?
We were signed up until the CEO said, I wouldn't buy it from us.
And then I canceled our order after many latenesses.
I think he was by way of apology for the delays.
It was very much an apology.
It wasn't to don't buy this. But, but the delays were long and it was expensive.
We had other expenses that were coming up.
3D printers.
3D printer was a fraction of what the Glove Forge cost.
Yeah, but I read so many books.
And I get them from the library, or I guess I do buy some of the books, but that's always how I've learned.
So it's not, I totally see the tutoring relationship, and I understand why paying for a class makes more sense, but I'm not wired that way, no.
I just need some guilt motivator, and it's either an instructor who I'm paying, or if I have a project that I'm working with with somebody else, like the album I'm working on with my brother, I'm highly motivated to work on music because we're both trying to finish it. And if it was just me trying to make a record, I think that would be bad. Probably take me 10 years. So, you know, having another person involved in a project or just...
We're having a goal, right?
Yeah, just having a goal.
I mean, I've got an event coming up in the summer.
I need to get something done for that event.
Like, that's a pretty hard deadline.
Yeah.
Nothing like a deadline to really motivate, right?
Yeah, that I do agree with.
And it is really nice to be able to talk to someone when you're learning something.
Either an expert or a
co-learner just to unsnarl those things that only takes them 10 minutes but takes you three hours
to work through yeah and i find another thing that uh so a lot of time when you're like nebulously
trying to figure out well i want to so i say like i remember i think i think either one of you two
said it or maybe someone on the the embedded slack said it i was, I want to, so I say, like, I remember, I think, I think either one of you two said it, or maybe someone on the embedded Slack said it. I was like, I want to get better
and better. They're like, what does that even mean, Chris? That doesn't mean anything, you know,
like, which is true. But I think it's more of you need direction then too, you know, you,
okay, well, you want to get better at writing C code great um maybe you want to you know have a better
people then help you form that and say like well maybe you want to get better at memory management
and understanding how memory structures work or whatever but have a project there you know have
something you're working towards and that's another thing that the the um that the tutors
really help with um so I had like a,
one tutor was a little bit less experienced,
about five, six years of experience, but I actually really appreciated that as well
because being closer to the beginning of their journey too,
if you read about like learning styles and stuff like that,
one of the first things that happens is you lose,
you lose the feeling of like being confused
and being kind of like lost. you've totally lost that haven't you
christopher i am confused and lost all the time we're gonna we're gonna talk a little bit in a
little bit because i'm actually engaged in a parallel effort to what you're doing chris but
please go on yeah and i think that like so having someone close – they talk about beginner's mind as well. And so that's like a nice thing that you can approach every problem with to be like, oh, well, I am a beginner.
And so you have this open mind around learning, and that's kind of what they're talking about.
But then they also say it from the teacher's perspective of you need to have that perspective because you don't remember the feeling of like struggle and like cluelessness
and so i'm not saying my tutor was clueless quite the opposite but he was closer to the beginning
of the process and so it wasn't like advanced topic it was more like well let's get you
blinking led and he was super helpful so okay so your project blinky lights um radio radio yeah
yeah oh that's yeah that's another problem is that
simultaneously i was like you know i should really do more rf stuff too so you're just
yeah real smart chris yeah well and so i went bought a three thousand dollar vna and you know
and uh learning i have like i have a lot of books as well and i we could talk about books and and
things like that but um it's uh these are deep you may may have noticed that firmware is a uh
this is a kind of a deep field so is rf uh so really i've heard this black magic there that
makes it yeah deeper right oh no you have to make little squiggles on your PCBs. Mm-hmm. Yeah, yeah, definitely that.
And if you're doing something worn, you have to deal with battery subsystems.
Are you just buying that off the shelf?
That actually I'm fine with, but it's a battery.
Batteries are easy for me.
I mean, that's kind of my background.
Well, but, I mean, there's not just the battery.
There's the how do you charge it and how do you tell people their battery's going low? that other stuff as well but um again that's kind of that's kind of my bread and butter every day so i i'm not that worried about that you know but if i was if someone was coming to me and be like hey
i really need help with a battery system then i'd have to like approach that with beginner's mind
and be like what is the hard part of of getting started with thinking about current flow and
you know that's kind of stuff i deal with with contextual electronics right how much are you still working on that uh contextual electronics
yeah that has been uh pretty background for me lately uh uh it's still going there are still
students i still you know do tutoring and helping and uh but there has not been any new coursework
in uh in a long while i've been really focusing on consulting and And yeah, that's been – it's basically – I was looking at contextual electronics and I didn't feel like I had a ton more to offer in terms of my knowledge.
It's kind of like cashing in on someone's background knowledge.
And I was like, I really need to go build up my skills so I can offer a course that has some firmware in it. Or, you know, um, when I did the first round of contextual electronics or the second, I suppose,
um, there was that exact same part, the STM 32 F zero three zero. And because it's a cheap,
cheap part and, but I hired, um, two people to help me with firmware and, um, and I don't want
to do that anymore. You also have a forum for consultants do you talk about that
uh i mean it's it's there there's an application well uh we can link it in and um but yeah so that
is actually the contextual electronics forum there's like a hidden semi-private section there
and uh yeah it's like invite only and so you gotta apply but if people are interested in
consulting or are consulting and want to you you know, interact on there. I started that because the 20 months ago,
or whatever, whenever I was deciding to go into consulting, I was just like, so scared and
wanted some free help, I guess, to contradict myself from before. But I just wanted to talk
to people and, you know, discuss things. And everyone I talked to was like, yeah, I really
had trouble when I was learning this.
And I obviously talked to both of you.
You have great experience there.
But, you know, just kind of like why have people ask these questions over and over again?
Why not make it kind of searchable but still private enough that people feel comfortable discussing some amount of details, maybe not every detail?
Well, community help is a different kind of help than focused individual help.
You get a lot of experiences that can contradict each other,
but if you get kind of reinforcing opinions, it's like, okay, that's probably meaningful.
Yeah, yeah.
Yeah, I mean, right now, I mean, so we have people that are doing firmware stuff
and FPGA stuff and RF stuff, and recently there was a big layoff at analog devices,
and so
a lot of chip designers are coming in now too and um which is unfortunate i was very sad about that
but um you know it's interesting just hearing how you know hearing a chip designer's consulting
efforts is going to be so radically different from someone who's like doing firmware maybe up
into the software layer and um it's all still technology. It's all still very complex work, of course,
but it's just, like, think about, like,
a chip designer has to have access
to, like, a $50,000 software license.
And a firmware person might be working
in completely open source, you know,
GCC and Vim and whatever else, right?
And so just the scale differences there
are quite stark sometimes.
Well, and the cost for firmware continue to drop sure i'm not sure that's happening on the chip design side things right yeah yeah yeah and i mean similar things rf i mean you buy equipment
like if you want to do microwave design my goodness like i i found uh i had a talk a couple
back in last aug, I suppose.
And I have a, I had thought I'd found this like great looking VNA and it was like, I was like, oh wow, it's only like $3,000 or something.
I don't know how my brain just like completely went sideways.
I was looking at this beautiful thing and then like I kind of zoomed out and I'm like,
oh, that says $564,000.
That's more than I had, you know, a house in many cities in the United States.
That's insane.
But it's a 60 gigahertz DNA that only very, very small amounts of people in the world need.
So back to firmware.
What was the hardest part that was a surprise?
What did you, I mean, you went in with you know arduino expectations
and some expectations that it was going to be harder than that because you've heard other
people talk about it what what was a surprise that was hard you know i feel like it's it came
in stages right i think that the the tool chain stuff and just like figuring out what's going on was hard to me.
And I feel like one thing that I think I expressed to both of you at some point on the Slack and I've said other places too is I'm always second guessing myself.
So it's confidence pieces, right?
It's like, this must be bad code.
This must be bad code.
This isn't compiling.
I don't know what's going on.
Oh, my God.
You're so stupid. Why are you doing this, Chris? And then it turns out the cable was broken, you know, or something like that, or the driver wasn't installed properly for the, so I think it's just the amount of assumptions on the way towards that first blink are so large and uh and because i was you know arguably this would be also because i was going
in a non-specified route i wasn't going like stm32 using cube software and using everything
and like following the instructions on windows i could have done that and i could have i arguably
should have done that but because i wasn't now i now I'm off. I'm out in the, you know, the wilderness
and just trying to like Google around for answers. And that is just that is a tough thing to do.
And would I go back and tell myself to do that? I don't know. I think it was valuable. I think
that hiring tutors was a result of that frustration. But I think also that kind of
learning sucks sometimes. And I think that that kind of learning sucks sometimes.
And I think that that is part of the understanding of like you're going to have some struggle.
But I forget who I talked to about it, but they're like, you know, part of the thing that you start to realize is that if I just stay calm and I keep trying new things and I keep stepping through problems, I'm going to figure this out because
there's no other, there's no other, there's no other option. And like that, so, so much of it
is just mindset at the beginning. Um, and the stay calm, they don't get frustrated. The it's
okay to assume it's your code, but it's also okay to give a 50% probability to it not being your
code or 25% or whatever percent you want. But that has to increase as you continue to check your code.
Right.
And actually, so I'm just now, it's just back in my head.
One of the problems that I had that Alicia was very kind and helped me with.
The NRI-52.
Yeah, yeah.
So I was working on NRI-52 and I was using a dev board and I, you know, try and like
the Dickens to just get this thing running.
And finally, I'm expressing so much frustration.
Alicia's like, why don't you just give me a call on Skype?
We'll talk through it.
And the end result was,
I was following an example for the wrong goddamn part.
It just wouldn't have worked, no matter how much I tried.
I was reading, I actually had gotten this board
from someone who was very kind who sent it to me,
and it said NRF 52.
And nope, it was an NRF-51, let me tell you.
Or it was, I don't remember, oh no, sorry, it was the NRF, I thought it was the NRF-52-840, and this was the NRF-52-832.
And every example I tried would not have worked on that.
And the thing was, I knew those examples, I had used them, so I knew how they should work and what you were telling me
were the right steps. So then you start thinking, okay, something else is wrong. But as a beginner,
if the steps don't work, it could be the way you did it. It could be the steps. It could be
cosmic rays. It's just hard. There's a thousand things like that.
That's right.
Because they're complete systems, right?
It's not like a little circuit.
It's not like a little program running on your desktop, you know, that you can fully understand.
It's a complete system with all these parts and memories and huge, I mean, we talk about firmware and it's not like 1982 where firmware was, where firmware was 500 bytes of code that somebody wrote.
It's huge amounts of code that are running on various pieces.
So it's this complete system, and lots of parts can break in a complete system through no fault of your own, even through things as ridiculous as mislabeling, right?
So there's always something.
I guess that was my point back with learning C-FLAG.
There's always something that can go wrong.
So don't bother learning anything.
It's not really a lesson I want to give.
It's a system on the edge of entropy, right?
I mean, that's kind of what it gets towards.
And this is the reason, right?
So, again, to go back to the, like, should you just follow the vendor's path?
And it's like, yeah, maybe.
You know, like, that is least sometimes entropic way towards getting
some dopamine in your brain you know and like for some people that is the right solution i i would
probably say that as well when i was said i wanted to learn gdb and all these other things people
kept telling me yeah use the nidd use this and this and it's like there are very very strong
arguments for that i ignore them and i paid the price for it but but then again you
know like i think about that too you know someone says do this the easier way and it's like okay but
all those skills that you have person telling me that it do the easy way all those skills you have
came from similar frustrations so do you skip those frustrations in order to to get something
done and it's like well sometimes you have to get something done. And it's like, well, sometimes you have to get something done, but sometimes you want the learning.
So I don't really know.
I don't know what to...
I wouldn't say it's do it the easier way anymore.
I think it was.
Now I would say it's do it the modern way.
Okay, yeah.
There's very few cases.
I mean, there's a few instances where I've been places
where we've gone to raw GDB and GCC and command line with people using IDs on top of that, of their choice.
Yeah, you're doing it for like revision control or continuous integration or something like that.
You're building like these stacks of tools for your whole company, right?
Right. But even there, it's usually to get away from a licensing fee.
It's not a technology decision.
You know, it's like, oh, we're paying $5,000 a month per seat
for whatever, for IAR.
That's a big cost center.
Let's take the pain and shift to something else,
and we'll support it.
Let's spend it in hours.
Yeah, we had people supporting that.
You know, we had a team of two or three people
who were like the GCC folks.
So it wasn't that every developer was a genius at running
command line tools. It was that it was a supported product within the company.
Yeah. And that's, and that's intellectual property that actually adds value to the
company and all these other things. But as a solo starting person, you're not going to get that,
you know, you're really going to lean on some company that may have done that for you. And
did you use how for your, your at all or just completely no i did yeah so the sm32 stuff i was
i ended up going into using the cube uh figure tool and um and then doing some house stuff too
okay and that's what uh nicholas my tutor um uh the the the less experienced but very helpful
tutor uh was kind of walking me through that and And it was just like super calm to like watch and like follow along as well.
You know, like there's also that.
And there's actually some really great YouTubers who do that stuff.
And I think there should be more of that.
You know, I'm very strong on the, I talk about apprenticeship and that kind of thing.
But just watching over someone's shoulder sometimes just gives you that,
oh, it's not
like oh i i can immediately do it but it's oh i think i can do it oh i i think i can struggle
through it and i can always go back to that example and that is i wish there was more of that
i've heard more people are programming on twitch which sounds awful to me. I mean, I hate it when people watch me type.
And yet, I can
see how that would be valuable
just to see how somebody else works.
Drive me
insane. But Chris and I worked
recently together, and I
use push
and popd to
store my directories when I'm in Linux, so
that I can change directories this is very not
important um i use a certain command yeah and he saw me doing it's like what's that and then a few
minutes later he used a command i'm like what's that yeah exactly it's it's like uh you know
workflow voyeurism you know like you don't know how other people work and you might you might find
something how do you figure out like how would you go and google for that functionality that you the push and pop d thing that you do i i don't know
like i don't even know what it's i don't know what you use it for like but once you learn it it's
really valuable and it could save you a lot of time yeah not to mention the the confidence piece
like i feel like so much of learning is a confidence game. So again, going back to piano, right? If, if I want to go and like learn how to play a D minor seven on the
piano, I can follow and look it up online and find a chart. But, but like having a teacher sit there
with you and be like, Oh, sometimes the seventh goes down below the root, you know, and then you
play the root on your left hand or, you know, just all these things that like yeah now i feel great about it but i i don't know like the way i used to play was very clunky and self-taught and and having
having that guiding hand is like a fast forward it's like a cheat code uh and and i think that's
worth paying for honestly you've gone you've said you've you've gone from from Arduino and then you went to GDB and Vim and
the hard way
and then you've gone
a little back.
Are you back to Arduino or do you
mean the cube and
sort of the center point?
No, I will, a little callback here
to the Jay Carlson shows on Embedded.
Also, Dibs on having Jay
on the show next.
You guys don't get him back.
I've talked to him about it.
I said, if they call you,
do not, do not go back on Embedded before you go on the Empire.
So Jay's,
if people haven't listened to Jay's shows,
I think they were both great.
I enjoyed his first show,
which was about the $1 microcontroller in depth.
But the real second one was about learning.
And man, everything he said was just like,
just the contextual electronics parts of my brain
just lit up.
They were just like a Christmas tree.
You know, everything just really fell into place.
But he has the $1 microcontroller page,
which is a great resource still.
And let me tell you,
his favorite part is the EFM uh lb1264e whatever it
is uh and wouldn't you know it i am using that part now and uh and it is it is a great little
part uh a lot of people give me sideways glances like 8051 huh in 2020 okay but uh uh i was looking
around for some uh parts that for a part that had a lot of DACs,
and this thing has four DACs and a whole bunch of analog inputs and other peripherals.
And it's just a peripheral machine with an 8051 core.
And I think the thing about STM versus things like that is
the STM has all this infrastructure behind it.
The clock tree, if you look at the configuration thing in
cube it's a poster you know there's a lot of complicated stuff so if you were to try to
bring up an stm without cube and without help by yourself that's like a year-long project for
somebody yeah right sometimes and i think it's just you're in front of a data sheet yeah yeah
right and i think the the 8-bit stuff usually it is a lot more friendly am i wrong or do you find
it more friendly uh parts of it uh as you may both recall uh i've been i've sought some help
on the embedded slack and uh uh there's been some quirky stuff yeah the interrupt stuff is
always a challenge uh not just interrupt stuff so like there's paging so there's a special function
register paging and so like i think that i'm writing to a register and it's like no chris you're on the
wrong page change the page before you write to a value but uh some stuff's really simple actually
so like the way you know that you're just reading and writing uh from registers sometimes it's just
super intuitive you know there's basically there's a macro that assigns a value or a register name to it, and it's just equals one, equals zero kind of stuff, and you're turning things on and off like that.
And I know that there are similar things in HALs and stuff, but it seems like there's less overhead to do some of that.
That's true.
I mean, the HAL's purpose is so that you can switch chips.
Right.
It's not really, I mean.
It's an abstraction and
abstractions come with costs yes and um you were saying earlier about well people didn't
are you supposed to go the path that the person who's teaching you went or are you supposed to go
the path that they say is easier and you should go your own way.
Copyright strike for that.
But a lot of us did do 80-50-1s.
And there
is a path that shows
that that's okay if you really
want to understand what C is doing.
Like I said, it's 6502.
And
I have brought up Cortex-M0
when they first came out from scratch from an 800-page data sheet that hadn't been printed yet.
We were pre-production of Cortex-M0.
Yeah, well, I feel completely inadequate now.
It was really hard, really.
I mean, but you bring up the clock tree.
You do it one step at a time.
You map it out with your electrical engineer.
Eight hours a day in an office.
Yeah.
I mean, there's a little bit of scope.
Difference of focus.
Push into a pin.
Yeah.
Difference of focus.
Maybe with some other people to bounce things off of.
No?
Was it all you?
That was...
Wow.
That was when I was consulting in that place in Union City.
So they didn't have any other firmware people
although my w was fantastic so chris i i'm doing a similar thing to you that you're doing i i have
been i have not written a line of c for work since uh early 2019 i think. Something like that. Oh, okay. That's only a year. A year, right?
Yeah.
Yeah.
Maybe a little longer.
I had to bring my bike in like two years.
No, no, no.
Late 2018.
It was late 2018.
Still only about a year.
A year and a half.
Yeah.
And now I'm doing, my current client is all machine learning.
So it's all Python.
And I haven't, so I've done no embedded and no C stuff.
We'll go to C eventually.
Sorry.
Sorry.
So I was starting to get worried that I was getting out of practice, skills were getting rusty.
And I said, well, you know, I've got some extra time.
I'm not doing a tremendous amount of hours.
I'll do a personal project and I'll do it the hard way.
The hard way.
Now listen to what I define as the hard way.
The hard way is what I would do for a client, for most clients, if they said, okay, I want to do something in STM32, and here's the project.
So I bought the dev board, I bought some peripherals and things, and what I'm making doesn't really matter, but it's a little MIDI thing that does some... And we'll probably talk about it last week. Some synthesis, maybe
some note processing,
maybe some sort of thing on a TFT display.
But it's got a MIDI interface
and a display and
I2S audio,
a bunch of peripherals.
But the goal was to just bring that up
from scratch and
relearn, re-experience
bringing up peripherals and writing code.
So I had never used STMs except, you know, far down the road of development.
Oh, yeah.
Right now at the beginning of the...
Yeah.
You're not architecting decisions.
You're just dealing with what was placed in front of you.
Yeah, yeah.
So I got their stuff.
I'm using their IDE, which is, you know, built on top of GDB and GCC, but it's Eclipse.
I've thought repeatedly about leaving
it, but every time I do, I'm like, it's working
fine.
Didn't they buy someone to it?
Yeah, Atolik.
That's the IDE they've got now.
It's got the cube thing built into it, so you just
hit another tab and you can go look at the whole configuration
and it'll regenerate code on the fly.
I saw that and it was pretty cute. It's pretty slick.
I mean, there's a lot of problems with it.
It's Eclipse, which I generally don't like very much, but it's working fine.
But, you know, I'm finding a lot of the same things you are, where it's just like, what
the hell is going on?
You know, what have I done?
So I got MIDI working pretty quickly because that was a UART and, you know, the support
in the HAL for the UART's's okay but i had a lot of trouble with
interrupt handling still do i have notes okay go back and look at this because this is stupid
the way hal deals with interrupts is just completely dumb
yeah and it's like it's really heavy-handed right it's usually like it's like oh well you know it
throws to a function and then there's like 30 lines of code. You're literally just turning off the interrupt flag.
And why, you know, but they're doing it for a reason.
Yeah, yeah.
I mean, it sort of works, but I got into this situation
where if I send it enough data,
eventually it doesn't reset the interrupt flag.
And so I had to add code to go and, you know,
hammer that if that was unclear.
At least you're just sitting in the background
giggling this is fun yeah but the the next thing i had i tried to bring up was the display
and that took me two weeks is a spy display and i got one from adafruit because it was like okay
this has an arduino library i can look well documented reference well documented and i got
into it i was like the interface is usually. Yeah. But the parts they buy are usually some obscure Chinese brand and it's...
It's actually an ST LCD controller.
Oh, okay. All right.
But it has like a 400-page data sheet.
So if you try to bring that up from scratch,
that's another many-month process if you're doing that.
So I kind of backed off on that and went and looked at what Adafruit was doing
and copied some of that code. It had like 400 instructions, you know, 400 commands that need
to be sent over spy. Anyway, long story short, that took me a huge amount of time to get working.
And I had my salient out doing spy. I'm like, God, I hate embedded as I'm doing this.
So it's, yeah, all this stuff is a challenge, and it's still a challenge for people who've been doing this a while.
The funny thing was, the last Perfor brought up was the audio interface,
and that was right after getting the display working.
I was like, well, this is going to take me forever.
And so I wrote like 10 lines of code that I thought might make it work,
plugged it all in, went out and soldered a header on, hooked it up.
Plugged his headphones in.
Plugged my headphones into the thing, put it on my head,
and I'd read the note in the Adafruit thing for their little codec thing.
It said, well, this audio amplifier is really low level,
so it's not going to be able to drive headphones very loudly.
And I'm like, oh, this isn't going to work anyway.
So I pressed go, and it was the loudest noise,
the loudest saw wave coming out.
Throw my headphones off.
But that came up in you know half an hour so you never know what's gonna happen with that stuff but i'm finding lots of frustrations and
i'm working through it because i'm like okay this is always frustrating i remember it being
frustrating four years ago when i was bringing up a display at fitbit you know similarly why isn't
this and it's i think a lot of it's because with things like that,
nothing works, right, until it does.
And you don't know why it doesn't work,
because you have no visibility.
You can't look inside the display controller chip and say,
oh, well, I was expecting you to be in this mode
with the chip select high and the command bit set to this,
but then you sent me this and I got confused.
You don't know. It just doesn't do anything.
I would like to note that I'm not allowed to help on this unless asked.
Oh, wow.
Okay.
How's that going?
It's making me crazy.
Yeah, right.
Well, because you'll just...
It's like listening to someone who they're having a fever dream and they're like, no,
no, no, get the bees away from me.
I've asked you for help and I've talked to you about it.
You know, you've given me good advice. Yeah. away from me you know i've asked you for help and i've talked to you about it you you know you said
you've given me good advice and yeah but at other times it's been yeah i don't know either right so
oh there was the well yeah of course it's only spent sending four bits you must have only said
well that was that was pretty dumb in cube that was that was pretty dumb i was just
my eyes were just skipping over the part where i had spy set to four bits but
well i think that that's uh i think that kind of rolls back to like the, okay, so what is the value of IDE and all these other things?
I think what some of the vendors are doing more, and definitely true for Silicon Labs with EFM8,
and I think the STM32 tool is doing better with this now too, and there's a lot of other tools that have similar things.
But one of the disservices I find with the Arduino ID and similar things is like
it's simple but then you
never get outside the
simple yeah and when you
start to have a break
point and you start to
have register inspection
all these other things
no one's there to tell
you how much that will
help you and you're not
when you're not just
spitting out double debug
to a serial port you
know like that that is
such a big shift and no
one listening i'm
very few listening are going to be surprised by this but i feel like uh people who are at
university level it's like are going to be working in the arduino ide and some more kind of reduced
interfaces like you need the leveling up to the to the breaks and the debugs and everything like
that that gives you the chance to go and see,
hey, I thought I set that CRC register. And then I figured out that no, I wasn't doing it. I had the wrong page selected, you know, and I can actually go and look at the register after I
step past that line of code, and it's not there. And, again, not surprising for many people
listening. But But again, how do you how do you know that if you don't Google for that, you know,
it's like, what is the best way to do firmware?
No one's going to tell you that basic thing, right?
Yeah, it's not a discipline.
Firmware is not a discipline.
It's a collection of lore over 30 or 40 years.
It's just, it's not like computer science.
It's a collection of all kinds of different things.
And most of it's things that have been developed by these hardware companies right yeah it's nobody's nobody's mathematically
backed this is the best way to do serial communication it's okay here's our peripheral
and here's the 50 registers that configure it and and oh and here's the exceptions to the rule and
yeah that's all i talked to uh i talked to someone from a very, very, very large web scale company who's doing some hardware.
And boy, are there software people perplexed by hardware.
And it's not just because it's hard and there's electrons involved.
But just like the methods.
They're like, what are you doing here?
Do you know what we can do with code?
It is so far afield.
And some people have tried to fix
it and I, these are great efforts. The, the chip companies are, I feel like more software people
coming into the, or more software, uh, um, background type people coming into the hardware
space and getting hired at like an ST or similar things. That is probably one of the best things
that will happen for the industry because there'll be more methods and, and similar, um, you know,
just how they develop these dev kits and similar things that is just
really really helpful yeah the tools have been getting better they need to get better faster
i do worry sometimes about the the software approach to writing software on small devices
because no memory yeah i mean there's always a tension between resources and cost and things.
And if you can afford it and it makes sense,
then that's fine.
But I always get worried when people are like,
well, you should do it this way.
Well, I really can't,
because then your application doesn't fit.
You know?
Right.
And that's a hard discussion to have sometimes,
because it's like, well, I can run, you know,
I'm running Python over here,
and it does all this stuff, and I can just put that on my microcontroller. You can, but then I can run, you know, I'm running Python over here and it does all this stuff and I can just put that on my microcontroller.
You can, but then you can do, you know, an eighth of what you could do otherwise and probably in eight times the time.
Yeah.
So there's that new, there's a new Arduino that just was announced at CES.
It's a $99.
It's got a Cortex-M7 and a Cortex-M4 on it, and it's H7, yeah.
It's a Raspberry Pi, okay, what are you doing?
Yeah, exactly. But I think that it's slightly a disservice because it's like,
part of me says, hey, look, computing is cheaper than ever, you know, you should throw resources
at the problem, but at the level they're talking about, I'm not sure where the balance point is.
It'll find out, right?
Yeah, I don't know who that's for
i guess i think that's for javascript developers who want to do javascript near the hardware i
think that's honestly going to be yeah um but it's you know it's expensive compared to i mean
raspberry pi is the same thing right that's not a problem for software people yeah i guess so
yeah not for me to get.
One thing that I wanted to bring up as well about all this too is that I used to open code.
Someone would send me some example code or some other things, and my first response was fear.
It would literally open up and be like, what am I looking at right now?
When you look at someone else's code, I'm not if there's uh yes there is gerbers i mean i do fine with schematics but if you send me a gerber and you
don't send me these schematics i am toast i'm just like i can't i can't right this is madness why
why would you do any of this stuff right yes and um i've i feel like it's getting better for me
and i think that's a positive a sign in the right direction.
Alicia, you have that resource on GitHub.
I forget what it's called now.
But it's like reusable code or something like that?
Yeah, reusable code.
I owe you some pull requests, by the way.
Yeah, and I need to actually do the pull requests.
I haven't done them.
Well, you have the other ones hanging out.
But that's like good example code, and that scared me.
And then Alvaro sent some code code as well and that scared me well the funny thing was that alvaro's
code and my code do the same thing in mostly the same way but they look different enough that it's
it would be a little like wow that's a lot of code to read yeah right right it's like it's meant to
be reusable right and that makes that's good code
that's a good library style approach to things and yet uh you know when you start passing around
void pointers and i don't know like you know like string passing anything with strings
function once you have function pointers yeah most people will go cross it yeah i'm still i'm still not quite there yet but um
you'll know you've made it chris when the when the reaction to to code that's not yours
that is given to you or to look at or that you find is not fear but anger
then then you will have ascended i'll be stroking my gray beard i always yes how dare they right whippersnappers uh yeah
um so i i don't know i think that that again that that's a lot of mindset stuff and i'm not sure if
that's like immediately helpful for people but um i think that the interesting thing about it i'm not
sure there's a way out of it like the only way out is to to do it you know you can't you can't read your way i mean like books are very helpful for
me as well but just reading it's not going to help you you know you have to put in time in front of a
debugger and you know just step through stuff and you have to make the mistakes yeah right um
enough to to know what things to kind of have a sense of, every time something's wrong, to have a sense of a handful of things that it might be.
And then once you eliminate those things, then you start getting worried.
So another thing that's been really, really helpful that Alicia talks about, I think, Chris, you have too. But I've been journaling a lot.
And as I go through,
because I would get into these kind of fury states
where I would, you know, I'd be trying something.
I'd have a program that's working.
I change something, nothing changes.
I change something, nothing changes.
Change something, nothing changes.
Change something, nothing changes.
You didn't plug it in.
No, it was plugged in. It was, yeah, that has happened too. But I change something nothing changes change something nothing changes plug it in no it was plugged in it was yeah that has happened too but i changed something and then it breaks and
then i say okay i can go back and undo that thing and then i go back and undo that thing and then
something else is broken and it's just like i've got myself so deep into a hole and yes i am using
revision control but the real thing is that i'm not thinking like experiments.
And that's really one of the most valuable things that I've been doing for myself is I'll write myself a journal, you know, just a bullet list on a day-by-day basis.
I call it a build log.
Like, what am I doing?
What am I stepping through?
What am I trying?
If I'm running an experiment, I'll indent the bullet list.
Hey, I'm going to go try and change the clock. I'm going to go and increase the clock speed and see if i break anything and this happened this happened this happened looks
like everything's okay but now i have a record a chronological record as well of what i've been
breaking uh and uh and that's been really helpful that's fantastic for two reasons um the first is
when i've taught people thing computer related things one of one of the
chief fears i found with people who don't have a lot less experience than any of us but but we're
just starting out as kind of i'm gonna break something right like yeah i'm gonna there's
like high cost of breaking something right i'm really gonna break something like i don't want to
and and getting over that and being, being, having permission to just
make changes experimentally and see what happens without fear of breaking anything.
That's, that's super important.
And the other is it's just a debugging technique, right?
When you've got these black boxes, like a spy peripheral that isn't talking to you.
Yeah.
At a certain point when you've run out of those five or six things that you know it usually is you you have
no choice but to start changing the inputs and just see if something changes or if you've got
something wrong uh in a configuration that you know maybe isn't documented correctly because
half the time okay not half the time but a fair number of the time the data sheets are wrong
and it may be that a flipped bit in a data sheet is what the problem
is and you're not going to find that without just exhaustively going through and saying okay well
let's change all the inputs and see if the outputs change at all yep yep the third reason to do it
is rubber duck debugging which is your notebook actually becomes something you're talking to sort of i mean not but i have
like this tone where i talk like it is i i'm like i'm like i find myself writing myself notes to
like future me you know yeah or even just laying out the problem as you would if you were laying
it out to a tutor or to a mentor or to a co-worker.
And that helps me so much because now I've organized my thoughts.
It's not just having run all of the experiments.
It's that feeling of I don't know what else to do.
And then you write out what you did and what you think.
And suddenly you get a bunch more ideas on what you should do because it's just you put
it all together in a different perspective.
Yep.
And listing your assumptions.
And I feel like that's usually when I get to the end of the five or six things, like Chris mentioned, that I think it could be.
It's because the seventh and through 15th thing that I should try is because my assumptions are completely off.
You know, it wasn't plugged in or I'm writing to the wrong register or something like that.
You know, I don't plugged in or I'm writing to the wrong register or something like that. You know,
I don't understand what a register does.
Or you've spent
the whole day
downloading the old
code image
and you never
actually updated it.
Something that,
of course,
never happened to me.
Too real.
Too real.
I heard that there
was a new
KiCat happening.
New KiCon.
KiCon.
Sorry. Or it is going to be in Europe so I'm okay calling it kikon because you know the french uh um yeah yeah that is going to be happening uh
september 11th to the 13th at cern oh wow are you going oh yeah i mean because this is your
conference this is you did this one pretty much by yourself last year.
I did the first one.
No, I had a lot of help.
But I was the organizer of the first one.
And then I was talking to the development team.
And Seth, who's on the development team, who started the KiCad Services Corporation, I think it's called, which is like a professional, kind of like a mini red hat for KiCad.
And Seth's like, I want to do a conference this year. I want to get people together.
And we started talking about, well, maybe we should have it at CERN. We had talked about that last year, dreamed about it last year. And it all fell into place. There's been like super,
like the folks at CERN are so helpful. And they're really well prepared to do conferences too.
That's great.
Yeah.
Yeah.
That'll be both a lot easier for you and a lot more fun for you and probably really educational.
Oh yeah.
And I mean, I might get to go, I don't know what the extent of the exploring we get to
do at CERN, but like, I mean, that's like a dream to go see the Hadron Collider, the Large Hadron
Collider, and probably bump a switch and, you know, reverse polarity on every electron
in the world.
Yeah.
That's the hope.
You know, it's really a dream.
It's a dream.
That's your dream.
That's good.
Yeah.
It's a weird one.
Chris, you were doing a little bit of KiCad, I i was yeah alicia have you tried it yet you tried at one point
yeah i did your welcome i did your blinky uh and it was funny it was it was really good
and kai cat wasn't that hard but it turns out despite my incredible ability to play games that look like Layout,
apparently I'm really bad at Layout.
Well, at the beginning, yeah.
But, I mean, I play these games, and I totally can untangle things, but not with parts.
No, no, Layout is tangling things intentionally.
Making them not smaller, that's right so um i didn't get too far with that and i i kind of realized as much as i like hardware
i prefer to buy it fully formed and then to do software on top of it or to apply it to things
so for a long time i wanted to learn how to do boards.
And it's not that I wouldn't mind that knowledge.
It's just I'm not going to invest in it.
Right.
And I think at the point where you can't get a sensor
that you really want to attach to a Teensy
or whatever the platform of choice might be,
that's when, unfortunately, that's the right time to learn.
The right time to learn was about three months prior to that, but that's when you're really going to be motivated to do it because
no one else is going to do it for you i think these days there are so many people that
are doing hardware tindy similar things i was thinking yeah tindy and um we have had at least
one listener offer to do offer and actually do a board, which I used recently.
So it may be a skill set I opt not to go towards because I'm more interested in machine learning.
Yeah, I think that's, it's all choice, right?
I mean, we all have so much time on this earth.
I can't learn clarinet in addition to piano,
in addition to firmware and RF and everything.
It's just, how deep do you want to get into each thing?
And if you want to get deep into machine learning,
there's going to be less time to skim the surface out of a hardware kind of thing.
Well, and then there's origami, which is a whole.
Of course.
Folded paper has no limits.
I'm surprised you weren't doing some now.
I'm not allowed to fold paper near microphones.
I heard that.
It is pretty loud, I've got to say.
Have you announced on
here that we do a book club no is it maybe we mentioned it yeah i i stepped away for this this
most recent book because i have some other stuff going on but uh yeah it's we did a book on learning
that both of you hated uh about practice rather i i liked things about it i liked the messages i think it could have been i liked
the messages i didn't like the author you didn't like the writing yeah i i get it it's i listened
to i think i listened to it and it was very um i listened to it while i walked the dog and that's
much less invested yeah yeah yeah and then we did one about writing that we all kind of
mostly liked yeah mostly about writing mostly about writing that we all kind of mostly liked. Yeah, mostly about writing.
Mostly about writing.
Also about bears.
Yeah.
It was draft number four.
The first one was The Practicing Mind.
The second one was draft number four.
And then you ditched us for Drift into Failure, which you would have liked because it's...
Which is wrinkling my brain.
It is, yes.
It is wrinkling the brains.
Maybe I'll do a catch-up.
We'll see if i can sneak in but it also
had a chapter which very detailed reconstruction of an airline disaster which uh ruined my sunday
last week oh this is a good advertisement chris well i have personal problems with airline and
airplanes but uh right right yeah okay but uh yeah it's it's very good, but it's a dense read.
Yeah.
Yeah, well, speaking of books too, so another thing that happens to me with firmware, so now I'm kind of, I feel like, you know, I'm feeling more confident.
And there's been a lot of great people helping me.
My tutors were wonderful.
I've actually stopped doing tutoring for now because I got so busy with the consulting stuff. Um, but, uh, this thing keeps happening
now where I'm kind of like moving up in the layers. I'm like, ah, well, I really need to,
you know, work on state machines. And I go into the embedded forum or embedded Slack rather.
And I'm like, you know, here's what I'm working on. Here's what I think about I should do.
And then like, but 15 minutes later of people being very helpful and chatting, they're like,
did you read that chapter in Alicia's book? I'm like you know i did i should read it again and then that happened about three
or four times and so i'm also rereading alicia's book i am too if it makes you feel any better
and i copy edited it so yeah i have it on my desk right there people should go reread that
and it's the thing like like so, so like you mentioned, like reading books to learn, you know, that first pass, that is an important thing.
But it's, it's also like, how deep are you going on things and how much, you know, I always talk about context, how much context you have for the thing that you're reading.
It's so easy for me to nod my head and be like, oh, yeah, yeah, state machines, I get state machines.
But when I'm like, elbows deep into a state machine and be like, why isn't this working? Why am I doing any of this?
It's a lot different, right? And then a guiding hand would be really helpful. And that's kind of
like a book chapter, acting like a very specified tutor. I could also hire a tutor to do that same
kind of thing. But a book is kind of put together to just be all these things at once.
Yeah, and I find with books like if you
have experience with the things that they're talked about in books but maybe you're just a
little bit away from it going back and reading those chapters while you're working with it
it's a lot easier and it's it's it's a different kind of value it's like
ah okay i remember now that kind of feeling oh here are the pieces i was forgetting which is
really really valuable to go back.
Instead of sitting there trying to re-remember or re-derive, you know,
a way to do state machines that you kind of remember but not quite.
It's just so nice to go back to a chapter that you may have already read.
Maybe you fully understood it at the time, but now you don't.
It's like, oh, okay, and refresh your memory.
Just look at the pictures.
Fine.
Yeah, well, sometimes that's all you need.
Yeah.
Yeah.
And with the machine learning books, a lot of them have Jupyter Pythons.
Oh, those are, yeah.
And I love going back and forth between running and reading their code and reading what they wrote about their code in their book and then modifying their code. So, I mean, I guess when I say I read things,
I do more than that.
And actually, I did email someone this week
with a very long, detailed question,
and I'm hoping he gets back to me.
And since I know it's his job, I did put in the email,
if this is too close to your job, feel free to tell me to go away.
So, yeah, okay.
I mean, the example I was going to use from your book was I needed a circular buffer,
which in my mind I've done a million times.
Haven't we all?
Yeah, I'm like, okay, I've got to do a circular buffer for this MIDI thing because it's going to interrupt and blah, blah, blah, blah, blah.
And I think I flippantly told you to use one on the Slack, Chris, at some point.
You did, yeah.
Hey, just go use a circular buffer, dude. I mean, it's mean it's no big deal right and i so i open her chapter and there's
like well i'll refresh my memory i'm like oh no i don't remember this at all double pointer
circular buffer which is a lot more complicated right but you did this trick with the with uh
you do a little trick with uh powers of two powers of two and there's there's all these
corner cases with circular buffers where you get in real trouble.
And you're like, oh, I don't remember any of these things.
So it was really great to go back to that because it was both a, wow, I'm full of crap.
And also, okay, now I remember, you know, these are ringing bells that, okay, this isn't as easy as I remembered it.
And so I apologize to sending you down that road. With just a circular buffer.
Well,
how hard could it be?
It's good to know,
but I feel like that that's a great example too,
where it's like,
okay,
I need to do this thing.
Talk about a thing for machine learning to really to do is like,
if I could just like talk out my problem and then a computer is like,
I know what this probably is,
you know,
because like right now my machine is the slack and,
you know,
people kindly listening to my being like, oh, I need to do this and this and this, and they suggest things.
There's nothing out there like that.
How do you know where to go?
Stack overflow is where I end up most of the time.
Yeah, but that's not always great either.
It's always sort of close to what I need but not quite yeah yeah i think that it's you know it's
imperative on all of us to have a knowledge base and keep building our knowledge base
and like truly a base right where we're we have a little bit of dip a toe into each little puddle
and you know not figure out how deep it goes but like know that it's there and you know the name
of a thing that is really helpful but sometimes that sometimes you don't have that. Circular buffers is one for me.
And it's really easy to say.
And then if you're in some languages,
it's really easy to implement.
But then when you go into C
and you realize,
oh, what about the first one and the last one?
Oh, that one.
Yeah, off by one.
The last thing I was going to... I mentioned this on the Amp Hour, I think, last week when this show airs, or two weeks ago.
But we're pre-recording.
We got you guys.
There's another self-help-y book that I listened to.
It was about, like, learning quickly.
And they had brought up a thing I'd never heard of before. And And again, another thing I never would have heard of if it wasn't
for this book, but it's called SQ3R. You've heard of that? I think I, I, I think I've heard that
acronym somewhere, but what is it? It is a reading comprehension thing. And basically it's a,
it's a way to teach yourself. And so basically it's survey question,
scrolling down the Wikipedia page, read, retrieve,. And so basically it's survey question, scrolling down the Wikipedia page,
read, retrieve, review.
But basically it's, you go through,
the main thing is you go through the tables of contents
and you create all these questions
based on that at the beginning.
So if the tables of content said,
chapter heading is PCB layout,
the first question you write,
what is PCB layout? That should be the answer you should
be able to answer by the end of that. And then chapter heading 1A is creating tracks on a PCB.
And so the question would be, how do I create tracks on a PCB? And again, you're just creating
these questions that sound really pedantic, but at the same time, that is what the outline of
this thing is supposed to be teaching you. And so if you can't do it by the end,
what would someone be actually be reviewing you on if it was a formalized setting? And so you're basically formalizing a setting for yourself. And then the idea is that you actively go and read
based on these questions, and then you maybe make flashcards and then you review them
so that you can have recall. How do you really generate recall instead of, I know what a circular buffer is.
It's like, well, you could go and do it, or you could go and, if you're reading Alicia's chapter on
circular buffer, there's a subheading on the
off-by-one problem, and then you could go and review what is the off-by-one problem.
Do you have that kind of in your long-term memory storage personally?
Yeah. you have that kind of in your long-term memory storage personally. And yeah, so that's kind of it.
It's a very, it's very tough.
I'm trying to do this with the Art of Electronics X chapters right now.
And it's very, the headings aren't very good on there.
And there's a ton of really in-depth information
that I would miss if I just did the headers.
So it's not a great book for that,
but there are some other books that I've been looking at.
And yeah, the RF books are insane.
So much to learn, you know?
I mean, it's a form of active reading.
Yes, exactly.
And I mean, taking notes alone is a form of active reading
that's pretty good for most people.
Yes, I agree.
And the questions give you another perspective.
So that makes sense.
I was not a particularly good student.
I think at least you were a very good student.
Such a nerd.
Chris, you sounded like you were a...
I became a good student.
Yeah, that's what I've gotten from the...
I did not start that way.
Right.
And I, you know,
many, many years
into my non-schooling world,
I think that this is,
you know,
if you're going to learn it
on your own,
I think that if you're not doing it,
you got to have some kind of
active reading like this.
And so that's what I'm trying.
And we'll see.
Cool.
Well, watching you go through all this
has definitely inspired me a bit too
over the last few months to,
to do some more learning and things.
So it's all right.
Thank you for opening the process.
Yeah.
Thanks for all the help.
Such as it is.
I'm not,
I'm not going to stop being on the slack.
Just so you know,
there's a lot more questions going.
A lot.
And now Chris,
I think you've,
you've got everything.
You're fine.
Click deleted.
Deleted.
It's nice to talk about
learning things because we
do get frustrated
and it's really nice to hear that other people get
frustrated too because you can
be in that
rage hole of, it should just
work and then realize,
oh wait, I heard that recently and
sometimes it's not what I think it is. It's just nice.
We're all on whatever social media
and seeing these, oh look what I did, this amazing
thing. It's like, oh great. So many amazing
things. Let me tell you, that guy.
People who listen
to the Amp Hour will know. He's been on the show recently
and he, but you know, him too.
Like I love having him on the show. He talks about
his learning process. He was on the first episode of the Amp Hour for 2020 and I had him on and he, you know,
posts these amazing projects, but you know what?
He, he came on and he was talking about what he struggles with too.
And we're all there.
We're all struggling with different things.
And, and I think it's okay.
I think it's a, it's, it's giving yourself permission to learn and struggle and, and
feel dumb sometimes, you know, like it's, it's okay.
And speaking of dumb, I think after this show of air.
I'm so worried about what's going to happen next.
After, I'm having Ben Krasnow back on the Amp Hour.
Oh, cool.
And so, you know, one of my shining beacons of like people who are like driven.
Whenever I think about like, oh, need to make my my process more of
experimental and like formalized uh if if people watch ben's video about making um he did like
laser cut traces on pcbs and he holds up a thing he's like oh on the 80th try this worked yeah
yeah holy crap that is amazing so i'm gonna be i probably will have already by the time this airs
uh asked him about his process and and things. Because I think that like people that are learning for a living, and I think Ben's a good example among many, that is you need that kind of that fortitude and that rigor. And Ben struggles too. He talks about it all the time. So he's a great example of that. So I'm excited.
If everything was easy, I don't think we'd enjoy it.
Yep.
We would have nothing to complain about.
It'd be like The Good Place, you know?
Exactly.
Yeah?
Yeah?
That last episode destroyed me.
All right.
Well, I think there's only one thing left to do.
You forgot to ask me lightning round questions.
No?
Beach or mountains?
I'm more of a prairie person myself.
What's your favorite fictional robot?
I just finished the Bobaverse.
So good.
All of the Bobs.
All of the Bobs.
Acoustic or electric guitar?
Electric piano.
What is your least favorite chord progression um seven seven seven two i can hear that in my head right now it's very disturbing
it's bad yeah what is your favorite flux um the one in front of me
if you could change you actually had these prepared
too i didn't actually i didn't know if they would have no we are making them up oh that's actually
you've really narrowed it down yeah if you could uh change one thing about the c programming like
which what would it be oh we didn't bring that up okay And now the rest of the episode. No, yeah. So I'm using the EFM8 and I was having this problem.
I was trying, I was in a for loop and I was like, you know, from my Arduino C++, all these other days, I had this error and it kept erroring out.
It was, you know, for parentheses int I equals zero semicolon I less than you know constant semicolon i plus plus
and parentheses and then the fourth loop right and it kept airing out i'm like what is going
on here and i talked to the slack and then we figured out that uh i what is the year it's
used it's not using c99 it's using c90 yeah c90 c C90. Oh my goodness.
Yeah, you can't do that little int in there.
Yeah, that's right.
You have to declare it outside the loop.
If you're using a programming,
if you're using a compiler
that's literally 30 years old,
you're going to have some paradigm changes,
I guess.
So I guess I'd change that.
All right.
Don't use C90.
They did.
They did change it.
A lot of people
have changed it.
Thanks for having
me back on.
This was fun.
It's great to hear
about your experiences
with firmware because
I think they map
well to a lot of
people's experiences
too.
It was good to talk
to you, Chris.
Yeah.
We'll talk soon.
Bye.
Bye.
Embedded is an independently produced
radio show that focuses on the many
aspects of engineering.
It is a production of Logical Elegance,
an embedded software consulting company
in California.
If there are advertisements in the show,
we did not put them there and do not
receive money from them.
At this time, our sponsors are Logical Elegance and listeners like you.