Embedded - 256: Agglomeration
Episode Date: August 16, 2018Chris (@stoneymonster) and Elecia (@logicalelegance) celebrate the 256th episode with a confusing lack of cupcakes. IAmTheCalvary.org has an excellent Hippocratic Oath for Connected Medical Devices ...Make Magazine has some tips to tighten security on DIY IoT Projects. Rockstar Language Specification (and FizzBuzz example) The C++ episode discussed was #247 with Jason Turner. Topics and Times: 00:00   Zero 00:27   Intro and cupcakes 03:09  Patreon and Slack 04:24  Transcripts, chapter markers? 07:48  Listener question:  ST HAL, Cube, SPL, Bare Metal? 14:22  Hippocratic Oath for Connected Medical Devices 19:32  Make magazine article on DIY IoT Security 22:36  NYC Embedded and Engineering Meetup? 23:42  C++: Expressiveness, optimization vs. good code 30:21  C++: Spec size vs. C#/Java 32:22  A question of parentheses leads to mild violence and ranting 35:43  Rockstar: The Language! 43:59  Wherein we "discuss" Rust for some reason, again. 46:45  Elecia's Projects in Python and JSON 50:18  Elecia's available for gigs! 50:50  Elecia's ML overview blog post 51:38  The end of Embedded 52:42  Wrap up 54:04  Winnie the Pooh continues... Â
Transcript
Discussion (0)
Thanks for watching! Why aren't you going?
It's 256.
We've rolled over to zero.
And so I thought it would just be silence.
Right?
I mean, it's an 8-bit integer. So now it's 256, so therefore it's zero, and then that's just silence.
Why don't we just not release an episode?
Because then, how are we ever going to get to 257?
That doesn't fit in 8-bits.
There's a lot of problems with this logic.
Well, there was that, or release episode zero but we
never made an episode zero we foolishly started with one all right if you were still listening
welcome to why embedded uh as you can tell this is going to be a little bit of a silly show
where we answer listener questions and talk about how you can be a rockstar programmer.
Okay.
Okay.
And since it is episode 256,
the first order of business is lightning round.
No,
is the cupcakes.
You got cupcakes,
right?
I have this plan where I just mash them in my mouth,
cookie monster style and the, the sprinkles and the,
the confetti cake goes everywhere until my microphone is encrusted in frosting and sugar.
And that's how it will always be.
I don't think we're going to do that.
There's some astronaut ice cream on the desk, but that's all.
I don't have any cupcakes.
This is not a good start to the show.
We could go out for cupcakes after the show and then cut in the portion of you sounding like Cookie Monster.
Yeah, I don't think that's going to work.
That's just...
So you're saying you don't want cupcakes?
We don't need to record the cupcakes.
I'm not...
I'm never saying I don't want cupcakes.
Record the cupcakes.
It'll sound a lot like the first minute of the show.
With chewing sounds?
Okay, let's...
Yes. Hi, welcome to the show what a show is this this
is show 256 this is embedded i said i said embedded uh i haven't introduced you you're
you're chris chris white and i'm alicia white and we do this show about engineering and cupcakes
that's what it's about sometimes uh let's see, I have random news to get out of the way. First of the news
bits is that we have a newsletter. News about news.
You prefer email as the way to get information about the
show and blog. Apparently
RSS is dead. I keep hearing this, but
the newsletter is basically just RSS and email. Next, I'm
sure that now, having started this show, that now is when you say, you know what? I wish
I could support these people and the effort they put into this show. If you feel that
way, you are welcome to support us on Patreon
which is this little program
where you put in your credit card
and then every month they take out
a dollar or four or however many dollars
you tell them they can take out
and in return for that
you get the satisfaction of
knowing that our guests
have better mics
and
that you buy us cupcakes.
And they can join our embedded.fm Slack group, right?
That is true.
That is part of the posts in the Patreon, and things go on there.
Jobs are posted, conversations happen, and sometimes—
We're around sometimes.
We're around, and sometimes we're not. And I have to say they're a very interesting group of people for, yeah, about all kinds of things.
And it's a lot of people now, actually.
It's over a hundred, something like that.
Yeah.
And people have offered electrical help or software help or what chip should I use in this.
Yeah, it's been cool.
One other reason to support on Patreon is the idea that we might do transcripts.
Yeah.
Yeah, you can hear Christopher's excitement about that.
I'm against them.
But a couple of people have asked for various reasons,
and one of our listeners has offered to try out doing them.
And thank you, Fred.
And if it goes well, then we might do more pay for professional services.
So Fred's just going to do a couple to see if anybody actually uses them.
So if you want to say, yes, I would use them,
then go ahead and let me know on email or Slack.
You have to really want to use them, not, oh, that sounds like a great idea.
But, you know, so you have to think deep in your head,
would I actually use these?
Yeah, because Fred is doing it out of the goodness of his heart,
and I don't want to ask him to do a bunch because he's an embedded systems professional and has things to do.
But, I mean, it's pretty expensive once we start paying for it.
Like a dollar a minute, right?
It's like a dollar a minute.
Especially since our material is technical, so we can't want... We can't just do the
cheapest automated.
Right now, Google does automated on
YouTube, and it is pretty
bad. Every week,
I look to see exactly how
the intro is, how they spelled
my name, or what they
did instead of my name.
I liked the day we were
I'm Under the Sea White.
That was nice. But it would instead of my name. I liked the day we were, I'm under the sea white. Yeah.
That was nice.
But it would help people like Akash
who wanted us to put in time stops and markers in the show notes.
Kind of like chapters.
I can do chapters.
One of the programs I used to put the podcast together supports inserting chapter marks. I've thought about it. It requires me to pay a different kind of attention while we're recording or while I'm editing to actually generate topical chapter marks.
Because we often do random order and I would rather have a good conversation than have topics.
If people, again, if people really want this, we need to have some more volume of requests.
Because it is a pain in the neck.
And I think if we did transcripts, then that would solve some of his problems, too.
Sure.
Because his goal was to skip to something exciting mentioned in the show notes.
Right.
So if we had the transcripts, he could find that.
Of course, I don't know where to put the transcripts, but we'll figure that out when it comes to
it.
We'll have to get a web...
Wait, we have one.
A website.
A website?
Yeah.
Yeah, we do have a website.
You just link the transcript in the episode thing. Do you hear website? Yeah. Yeah, we do have a website. You just link the transcript in the episode thing.
Do you hear something?
Yeah, our cat wants to join the show.
She's like, it's 2.56, it's time for me to be on again.
But last I checked, she'd retired, so I don't know what she's going to talk about.
Okay.
Do you want to do listener questions first or rock star programming skills do like your
listener questions okay from bahati getago uh who enjoys our podcast has been tinkering with the st
micro f1 series that's one of their low end playing around with the hal and the standard peripheral library library is poorly
documented he said it not me uh or possibly uh yeah anyway well i should have read it out as
as uh bahati because i don't know right Right, fine. It's not great.
And Bahati wanted to know
what we use for programming
STMicro, bare metal or micro
libraries or what?
I don't use ST, so
I leave this to you.
Oh, okay.
It depends on which chip you have
and what you're doing with it.
I had a client recently who was a relatively inexperienced client, wanted a demo system, and wanted to be able to modify things after I was no longer part of the project.
I put them on Embed, which has an operating system.
It has a HAL, it has lots of
nice fun things, it has a compiler, and it is not something I would do for high production.
But it is a great place to start. It's more complicated than Arduino and less complicated
than any other option. For another client, I recently used Cube, which is ST's linked together all of the
IO pins and set up your clocks and it's all graphical. And then it spits out a bunch of code
and it has all your drivers written for you. And you can even set up DMA. It's actually really
great for setting up DMA because it makes it kind of easy and straightforward.
But that's not a replacement
for HAL.
That generates everything
you need to do to call HAL.
So it's actually
a hardware abstraction layer
made graphical
and then set up
according to how you want.
So you decide how you want your chip configured,
you answer a bunch of questions in this graphical thing,
and it spits out headers and some code that sets up the chip the way you want.
So I want this peripheral to be in this configuration,
I want these GPIOs to go do this in this configuration,
I want these clocks configured this way,
and then it spits all that out for you.
That seems very useful, but that doesn't bloat your code or anything it's just well set up code right as he's how is not the most efficient oh because cube calls the
how because cube calls the how gotcha and the standard prefer library, which, I mean, it's not bad,
but it does things like every time you toggle a GPIO,
it checks to see if the GPIO is valid.
That's great sometimes, but if you actually want to go fast,
you have to trust that your GPIO is valid
and just do the one clock cycle thing.
It also, because it does things like check to see that the GPIO is valid each time, that is code.
And it puts a lot of that code in.
A lot of code you don't need, a lot of code you maybe don't want.
And so, yeah, it bloats your code and it slows your processor.
It is very easy though. If you are running a Cortex
M0 with only a little bit
of flash space, you
probably want to go straight bare metal.
If you are running a Cortex M4
and it's twice as big as you need,
use Q. It makes it easy.
So, yeah, it depends.
That was a long way to say it depends.
Well,
good. Yeah. Bringing up Qubes, it depends. That was a long way to say it depends. Well, yeah, bringing up cube is
a lot of people are advocating for and against it, some of them
the same people at the same time. So it's kind of hard to decide.
But it seems like one of those things you could start with and
see what it does. Yes, it is
a good place to start with
because it shows you what it's doing.
It doesn't generate library code you can't read.
It generates C code you can read.
And even the how things it calls into,
you can read,
and then you can strip out what you don't want.
And even from my kind of osmotic experience with ST,
it seems like some of those configuration things
are really challenging
without something
like this. Like the clock setup. I've seen diagrams of the clock tree. You could put it
on your wall and it has 40 different nodes that you have to figure out.
It's true. And it does make it easier to set up. Like I said, I used a cube recently for a professional project
because it was a little simpler.
It was also simpler to explain to the client what I was doing.
Although later the client wanted to swap pins and I was like,
should I tell him to do it in cube?
Should I just go ahead and use the code and never regenerate?
Or should I just do this myself?
And I chose the latter.
That is the question with auto-generated stuff,
is do you use the auto-generation graphical tool
all the time whenever you make a change,
or do you use it to get your first cut of setup code
and then from then on maintain it as code?
I mean, there's arguments both ways,
but I would kind of like
cut and run after doing the initial setup and things were working and if you had to make changes
make them in the code it's a choice because you don't know and you should document what you're
doing because you don't want someone to come in later and then auto gen again right and you might
get a different version right they might update update it and then you go in and auto generate
it to make a small change and suddenly everything's changed and you've got this massive patch and you're not even sure if it's changed anything
substantive right so you have to be careful with auto-generated code well that's one reason that
in andre's blog he he very specifically says don't put any code in main like put like the one line
that calls your functions that there should be an init call and a loop call,
and you just call those and nothing else goes in main
because you never know what's going to change or what's going to get killed.
He's written a lot about this.
He really has.
So if you want to know more about Kube and ST and what's in there,
check out Andre's Embedded Wednesday blog.
Okay.
You highlighted the Hipp hippocratic oath for connected
medical devices i highlighted it so i could open it and look at it and see what it was because
there was no description so we might as well talk about it now now now yes so you have a link in
here uh and uh it's a long url i'm not gonna repeat but it'll be in the show notes. But basically, it's a document called
The Hippocratic Oath for Connected Medical Devices.
Where did this come from?
I am thecalvary.org, which is one of those organizations
that works to make security and privacy more understandable
to both the consumer and engineering communities.
How did you come by it?
I was looking around for trying to explain to a potential client
that their plan for BLE on their medical device was not kosher,
which they did eventually take that advice
and start to understand what the
HIPAA compliance would mean for them.
So the traditional Hippocratic oath,
I don't know if it's always laid out in its complete form,
but it seems rather simple and short.
I will do no harm.
First do no harm and let's look it up.
Yeah.
But you've read this one, I'm assuming.
Yes, yes.
So, okay, it's quite, it's actually, it's in ancient Greek, so I can't read it.
Sound it out, man.
Well, I don't know the alphabet either, so that makes it all a little bit more difficult.
Not to be confused with hypocrisy, by the way.
Yes, that's important. I Swear by Apollo the the way. Yes, that's important.
I swear by Apollo the healer.
Well, that's an interesting start.
Okay, well, basically, the core of it is first you no harm.
So this is a similar idea?
This is a similar idea in taking responsibility for the ethics of medical devices,
particularly connected medical devices. I will revere and protect human life and always act for
the benefit of my patients. I recognize that all systems fail. Inherent defects and adverse
conditions are inevitable. And it goes on from there, where it talks about how failure impacts patient safety
and how we have to be resilient against accidents and intentional adversaries such as hackers.
And it goes on to talk about cyber safety in the design and evidence capture so that you can figure out when something goes bad.
And I just, I wanted to bring this up as a, people wonder, well, what do I have to do?
What are my responsibilities?
You don't have to take this oath, but you should at least look at it.
It's rather long to take as an oath.
To say aloud.
But it goes through what all these things means um about working with third
parties and shared responsibilities and testing i just it's a pretty long document that talks about
as an engineer yeah what should your ethical responsibility be towards the people who maybe have your device implanted in them
the core of it is the same first do no harm and then they go on to describe
in several ways how to accomplish that yeah um that's that's excellent i wished i'd had that
many times at least at a minimum, to show to people.
Yes, this is even more convincing than, hey, I don't look good in orange.
Right.
I'm really glad that somebody put this together.
It's actually a few years old.
Yes, it is.
It's not new.
And I bet someone had pointed me to it.
I don't see any swearing to gods here, which is an oversight.
There's no Apollo here?
No Apollo, no Asclepius, no Hygieia, no Panacea.
So I think they need to add that.
Okay, what do you think the gods should be for a technology-related thing?
I mean, I don't want to swear to Woz, he's not really a god.
What book am I thinking of that had weird emergent cyber gods?
Like half of them that I've been reading.
Oh, you know what? I think it was the Hyperion series.
The later books in the Hyperion series, there were gods called the Loa or something
that lived in their equivalent of the universe-wide internet.
The Loa are usually a voodoo thing.
Yeah, that's what they were modeled after.
Okay.
Anyway, this is cool. You should check it out, especially if you work on medical devices.
And even if you don't work on medical devices, you know what?
Some of this applies to all kinds of things.
If you're working on automotive, airplanes, anything that involves safety,
take a look at this, please.
Let's see, from Paul, sort of in the related, but not really.
Make recently had an article where they talked about how to tighten security for do-it-yourself
iot gadgets so please stop putting those raspberry pies unprotected with no password on the uh raw
internet people do that intuitively people do that let's just punch an IP hole in. Make Magazine has top tips to tighten your security.
So I will link to that.
It's copyrighted, but it might be worth a discussion just going through all the lists and talking about each.
I don't think we're going to do that today, though, because we have a lot to do and we still have to buy cupcakes.
All right.
Or do you want to talk about it?
I read it at the time, but I don't have any particular memory of it.
I mean...
Well, we should just breathe through it real quick.
Change the default user password.
Obvious, but yes.
Perhaps people don't realize there are default user passwords.
Yes.
I mean, if it's Raspberry or Pi, it's default.
Disable password login with SSH, which, you know, we all use it for debugging.
It's another one you might not be aware is enabled.
Yeah.
Update your OS because they don't just make the updates for fun.
Sometimes they do.
Well, sometimes they do.
Have a firewall.
Yeah.
I mean, these are
motherhood and apple pie stuff.
This was like the time
that Chris and I
were having this long discussion
and I came down
strongly in favor of reading.
He pointed out to me
that this was
not news.
And then they have
some stuff for all devices.
Interestingly, they say use a VPN.
Oh, I see, to get into your home stuff.
That makes sense.
I would not recommend necessarily using a VPN
for your general use.
There's a lot of those out there.
And people make a big deal out of
protecting your security from the ISPs
by using a VPN for all of your surfing and whatnot.
I have mixed feelings about that because you're just transferring your trust to somebody else. Do you trust random
VPN company more than your ISP? Maybe, but it's at least a question you should ask.
Random VPN company has less vested interest in controlling you.
Yes, but you know nothing about them well there is that that that is that is a little nervous making their entire business model
could be stealing your stuff and selling it and they could be based in a country you're
not aware of so anyway just know what you're doing but yeah good stuff um
and it's worth it's worth at least especially with the Linux-based ports like the Raspberry Pi,
where you might not be aware of things that are open by default,
or at least more open than you want.
So, cool.
Tyler is a firmware engineer
working at a startup in New York City,
and is thinking about starting a meetup.
Tyler wants to attract other engineers
and people interested in embedded systems to attend.
Tyler's looking for people interested in joining,
presenting, something, something.
Yeah, it would have been good if i had replied to tyler and said okay
do you have a plan but at this point tyler has just said meet up let's let's do a meet up in
new york city you put this in the notes i know if you would like to speak at tyler's event or you
would like to be connected with tyler or something yes, feel free to email me.
show at embedded.fm I do eventually read all of the emails.
I don't reply to them all the time.
Well organized.
Yeah, well, there are still some sticker offers
that are like six months old,
so I will eventually get to you.
I promise.
Ah, and now we have a bunch of C++ questions.
These are your favorite.
Oh, God.
Yes.
Okay.
Just listen to number 247 on C++ with Jason Turner.
And was thinking that an interesting question of whether the language properties of C++ help the compiler generate optimal code
are also helpful for the programmer to write and understand
and maintain in a complex project.
Well, I guess we'd have to define what the language properties of C++
which help the compiler generate optimal code are.
Those are some of the things we talked about with Jason.
Some of the iterators, some of the libraries.
I think that my answer is generally,
yes, most of those things are helpful to the programmers.
They aren't necessarily helpful to C programmers
who don't know them because there's always a learning curve.
But... The whole idea behind C++
is to generate more structured code.
Right?
I mean, objects, the whole object-oriented mindset,
whether or not you like it or not,
the impetus behind it was to structure your code
in a more modular fashion.
So I think to the extent that those structural things
help the compiler, I'm not sure that some of them do,
that the answer is yes.
But smaller details like the newer features
like iterators and such,
they're more expressive.
And by expressive, I mean you're able to accomplish more complicated things in less code.
So it depends on how you feel about expressive languages.
If you feel that expressive languages help you organize your code better and produce better code,
then also yes.
But if you feel like expressive languages are hard to learn and complicated
from a syntactic standpoint, because you have to know all these weird idioms and ways of doing
things that maybe you could do and see quite easily because you only have to know a few keywords,
then no. You can be a bad programmer in any language. Right? Yes.
I think a lot of these arguments about which language is better
and people get in their minds that C++ is terrible
or you should all be using C Sharp or Haskell is the way to go or whatever.
You missed Rust and Erlang and Go.
We have to say those or people will email.
Rust is bad.
Thanks. I just want more email. I just want people
to love me.
If I say rust is bad, I'll get email. It doesn't have to be good email.
No, where was my point? My point was
it's, there's nothing magical about any of these things,
I feel. I mean, there's nothing great about C as a language, except it was, it's very old.
It's very easy to shoot your foot off. But, you know, there's good things about it,
and there's bad things about it.
And if you don't know what you're doing,
if you aren't using the language kind of the way it was intended,
then it's easy to write terrible code.
And people tell me, I've heard people say all the time,
oh, C++ just makes spaghetti code.
And not my projects that I've done C++ on.
You can make spaghetti code in any language.
And I do think it's, you know, it's all of our biases about what we've seen in a particular language.
And my bias against Rust has nothing to do with Rust.
I've never used Rust.
It's stupid.
It's just they named a language after something awful.
Decay.
No.
Yeah.
Rust maybe, you know, if i used rust i might
become an advocate for it so my my my my character persona playing a rust uh adversary is it's just
that i i tend to think that more lines of code are harder to maintain that's true but if they're
in a language you don't know, then they're impossible to maintain.
So if you're going to have expressive idiomatic C++, then you have to learn that language.
You can't, I mean, if you ever look at my Python code, I write C in Python.
It's not pretty.
I occasionally manage to do a dictionary slice that looks good.
But overall, no, not so much.
And yet I can read the Python that's pretty,
although once they get multiple lambdas in one line, I'm kind of lost.
Because I just get easily distracted.
I think we can talk about two different things, right? We can talk about that syntactic, we just don't know the language.
We don't know it with a facility to read it.
And it's easier to not know a language that's more expressive.
And it was those features of the language that Jason was talking about
as far as optimizing it to be better.
So to pull back from the yes a little bit,
in principle, you can generate cleaner, nicer code,
but it's harder to read for the completely uninitiated,
fluent, non-fluent programmer.
And you know what?
The same principles that make good code apply to all languages, right?
Modularity.
Testability.
Good interfaces.
Testability.
Keeping things small and tight.
Using the language to its best abilities.
Oh.
Sometimes. I mean, I have seen C, I've seen assembly written in C, basically.
Yeah.
I've seen C programmers who don't really bother with for loops, who only know that the while
loop is a thing.
There are ways in any language you can make it look terrible and illegible and
the best you can do oh well yeah let's just talk smack about pearl you really want some emails
don't you are you lonely uh yeah and c++ is not easy to learn no it's not i'm not gonna
not gonna deny that so let's go on to the next C++ question,
which
Jason
Turner stated that C Sharp
and Java have much bigger
code
specifications
than
C++. I would put that down
to my sugar crash, except Christopher didn't get
cupcakes.
I didn't know I was supposed to.
C Sharp and Java have much bigger
code specs than C++.
But surely, C++ and Java
are higher-level languages.
They are?
I think at this point, C++ is
pretty high-level.
I guess they have garbage collectors.
Does that make them higher-level?
I think they have big libraries of support stuff,
which makes their specs bigger.
Does that make them a higher level language?
I don't know.
Agglomerating libraries doesn't count as language to me.
Agglomerating?
Yeah, agglomerating.
Is that aggregation and conglomeration at the same time?
Agglomerating.
Agglomeration.
It's right here.
It's a word.
Did you just add it to the Wiki dictionary?
No.
All right.
Economies of agglomeration.
Anyway, it's a perfectly cromulent word.
Okay, so the answer here is, I don't know.
Yeah, I don't know.
I tend to think of C++, Java, C Sharp at around the same level.
And the reason Java and C Sharp have bigger specs
is because they have frameworks attached to them that C++ does not.
I don't count frameworks as part of a language.
Yeah, if you added C++ and OpenCV and C++ as a single spec, then it would be enormous.
Yeah.
Okay, so this question I believe we can answer.
Today on Questions We Won't and Can't Answer, but we will talk about it.
Yes.
Rayon, I am currently taking a c slash c plus plus programming class and my instructor
insists on us using not using parentheses unless they are absolutely needed
are you banging the table yes to paraphrase phrase the teacher's line of reasoning use of
unnecessary parentheses clutters the code and advertises the programmer's lack of knowledge, understanding, and experience.
Rayan says, I don't have a problem with this. It's his class, so I have to play by his rules. I tend to think it's just a balancing act. It's okay to use, quote, unnecessary parens judiciously, especially if you think there's a good chance your expression could be misread by others or the future you. After all, I doubt that the typical competent
professional programmer has memorized the entire operator precedence chart.
So, Rayan, your instincts are 100% correct in every way. And your professor, whomever they are,
doesn't listen to this is not a professional programmer
and they have a weird sense of aesthetics that has nothing to do with clean code or
maintainability parentheses cost nothing and while it is possible to use so many that it
becomes unreadable i think the likelihood of that is far less than using too few and getting into serious problems because you screw up an operator precedence.
Or some weird casting thing.
Use them.
There's no parent instruction being generated.
If you run out of parentheses, I believe Andre will...
Ship you some.
Ship you some from Canada.
Artisanal parentheses.
Yes.
Yeah, I was pretty sure we could answer that question.
I was shocked when I saw this.
It was like, who would argue for using the minimum parentheses necessary?
Why?
You don't do that in math.
You don't do that in math.
I remember doing reams of homework, right?
In like physics and math.
You write parentheses on stuff so you don't screw up.
I know.
I know.
I know.
I'm not.
Yeah.
Sorry. I know. I'm not. Yeah, sorry.
Anybody who wants to argue with the lack of parentheses being better,
you can send emails.
I mean, it's one thing to say you shouldn't wear socks with sandals.
And I actually want to know what happens if your professor tries to teach Lisp.
I believe his head will explode.
It's a CS professor?
Really?
What did the parentheses do to this person is what I want to know.
Yeah.
What's the story there?
What's the back story?
Yeah. Did he sit on one?
How did he get this opinion?
Okay. Now for the part you've all been waiting for what the end of the show
god we're like those muppets do you want to talk about the new muppet movie
no okay i don't know anything about it other than what I've told you.
Rockstar. Rockstar programming.
Something that is often termed as, you know, kind of
people put it on job recs. We want a rockstar programmer.
Or a ninja. Code ninja.
And then other people say, why don't we just have professionals developer
why don't we just have people who do their jobs why do we have to have unicorns and and do you
really want to work with the rock star they trash the hotel rooms constantly drug drunk
yeah um so but we want to to go beyond that on how you can be a rock star programmer
without trashing the hotel room so this this guy dylan beattie forgive me if i've mispronounced
your name uh has proposed the rock star programming language. It is turn-complete.
And the cool thing about it is
it seems like you could actually do it.
And how it works is
all of your language keywords and such
go together to construct lyrics.
So, yeah.
So he's got an
example of fizzbuzz in
the most poetic
implementation. You can
be less poetic. Well, do you want
to talk about what fizzbuzz is
and ruin all of the interviews that are
going to happen next week? Fizzbuzz is
a, okay.
Start over.
What was that S word going to be?
Fizzbuzz is a basic
programming interview question
on the complexity level of
stir copy or maybe a little less.
I think Fizzbuzz is a little more.
It's a very
reasonable, often used
programming question. You go through a loop
incrementing a value
and if it's modulo 3, I'm doing this from memory, incrementing a value and if it's modulo three i'm doing this
from memory you print fizz if it's modulo five you print buzz if it's modulo both you
do new line or put in the uh curse's character to shake the screen? I don't know. What does it do?
It's supposed to pronounce something like 1, 2, fizz, 4, buzz, fizz, 7, 8, fizz, buzz,
11, fizz, 13, 14, fizz, buzz.
Right, okay.
So if it's both, you do fizz, buzz.
Anyway, so yeah, it's a simple little problem.
So in C, you'd have for int i equals
zero to whatever, and then you'd have
if...
I could give the whole answer, but...
You know, if this is modulo 3, then we
print this. If it's modulo 5, we print this, and blah, blah, blah.
In Rockstar...
And you can do some clever things,
and people look for the clever things.
Anyway, in Rockstar,
they give an implementation
that is basic.
Modulus takes number and divider.
Yeah, yeah.
While number is as high as divisor.
Yeah, but that's no fun.
This is just the while loop.
And it goes through and it has a limit.
It has a counter.
Fizz is three.
Buzz is fives.
And it will shout things.
Boring. Boring.
Boring.
But you can...
There's idiomatic, poetic literals, and idiomatic rock star.
Who's going to say this?
I thought you would.
I'm not going to sing it.
I don't know the melody.
Do you want me to?
No.
Good, because I sang last time.
Midnight takes your heart and your soul while your heart is as high as your soul.
Put your heart without your soul into your heart.
Give back your heart.
Desire is a lovestruck lady killer.
My world is nothing.
Fire is ice.
Hate is water.
Until my world is desire.
Build my world up.
If midnight taking my world, fire is nothing.
If midnight taking my world, hate is nothing. If midnight taking my world, hate is nothing.
Shout fizz buzz.
Take it to the top.
If midnight taking my world, fire is nothing.
Shout fizz.
Take it to the top.
If midnight taking my world, hate is nothing.
Say buzz.
Take it to the top.
Whisper my world.
I'm waiting for the compiler to come out for this
so the great and clever thing that the little genius bit is how he did uh uh
numeric literals so like if you want a number right you want five or three for fizzbuzz so
the great thing about this is he's made it so you can put almost anything in to make
numbers up which allows you much more lyrical fun so uh so tommy was a love struck lady killer
initializes the value tommy with the value 100 because a is one love struck is 10, and Ladykiller is 10. So that's 1-0-0.
Sweet Lucy was a dancer.
Initializes Sweet Lucy with the value 16.
A has one character, and dancer has six.
Yes.
And you can do floats, too.
So he's got, my dreams were ice, a life unfulfilled,
waking everybody up, taking bills.
Initializes my dreams to pie um because there's a period after ice
so we're ice three or yeah ice is three three period one four yeah so it all works so there's
a whole specification that goes over how to how to do loops uh take it to the top uh take it to the top is genius it's part of the loop
and uh and you can it has neat uh keywords but it's less about the keywords and more about their
ability to use different variables and how they do it. And it's only a specification. There is no compiler for it yet, although there may be soon.
That's wrong.
The last time we looked at this was a couple of months ago,
and I've scrolled down.
It was only a couple of weeks ago.
All right.
There are now 12 implementations.
Oh, my goodness, there are.
JavaScript, Alexa, Java.
There's a whole subreddit now.
I said Alexa, Java. There's a whole subreddit now. I said Alexa, not Alexa.
ML, Python transpiler, Ruby transpiler.
You can build your career on this now.
Syntax highlighting for VS Code.
Anyway.
People are awesome.
Dylan, you've done a miraculous thing,
and I hope it brings you great fame and joy in your life,
because I love it.
There was the reasoning behind it,
and that was one of the...
But why?
Mainly because if we make Rockstar a real
and completely pointless programming language,
then recruiters and hiring managers
won't be able to say certified Rockstar developer.
I will buy one. I will buy 10.
So we talk about languages. We talk about C++ and having to know it and having to do it idiomatically. And then we look at these specifications of languages that are odd and created for their
oddness more than their utility.
Although the poetic nature of it, I like.
It would draw me to read more codes and to puzzle it out, which is not something I
necessarily want to do. You definitely would have to puzzle it out. This is not something
that you can read and say, oh, that's what this does. But it is pretty. And we don't usually have
a lot of languages that are pretty. Of course, we don't even have languages that are specified a lot of times. A real specification?
Really?
Rust, I'm looking at you.
I think you're going to get email about that.
There's no Rust specification?
I think there is.
I thought there wasn't.
A couple of the new languages, people
say, oh, you should learn that.
And it's,
and I look it up and I'm like,
yeah,
there is no official specification for that language.
Forgive me if I don't want to write something that is not only new,
doesn't run on any of my platform,
doesn't have a debugger.
I know how to use,
which is my fault.
Not theirs.
I just, I, yeah. It doesn't have a debugger I know how to use, which is my fault, not theirs. I don't believe any of this.
I just, I, yeah.
How do you not have a specification? I just don't.
Have you found it yet? I see you Googling over there.
No.
How hard is it? I mean, you just type in Rust specification.
Or maybe Rust language, because, you know, Rust is a thing.
I typed Rust specification.
I don't get anything about the language until, like know, Rust is a thing. I typed Rust specification. I don't get anything
about the language until
the 8th, and then I'm
in the Rust documentation, and then
there's the...
Why do we keep bagging on Rust?
I don't care.
I know nothing about it.
Other than people say we should learn it with such vehemence
that I just kind of walk away.
It gives me a reason to learn it.
Well, that's the other thing is that with these languages,
some people really enjoy learning new languages and more power to them.
But I have to get things done.
I don't like doing things.
Things are bad.
I got Christopher an outdoor couch.
Guess what he's working on.
What do you mean? Oh, I'm got Christopher an outdoor couch. Guess what he's working on. What do you mean?
Oh, I'm working physically on the couch.
Yeah, that was what I, sure, that was what I meant.
What am I working on?
You're tan, mostly.
Yeah, I moved from that sort of greenish glow to more of a light beige.
Anyway, sorry, Rust people.
We don't really mean it.
We don't mean it.
We really don't know anything about your language other than you like it quite a lot.
And it will only be karmic retribution when I'm forced to learn it when it finally takes over.
Yes, that is true. That would be perfect retribution when I'm forced to learn it when it finally takes over. Yes, that is true.
That would be perfect
retribution.
But no, I don't see a specification. Anyway,
so yeah, yeah, Rockstar, pretty cool.
Pretty cool. And I like
joke projects like this because
not only are they funny,
but they're good learning
experiences because I bet you could look at
some of those implementations
and learn a lot about parsing and lexing languages
and stuff like that.
And it's always more fun to learn about that stuff
with an example that's amusing
than sometimes a real example.
Yeah.
So, more power to you.
Oh, there's a subreddit.
Yeah, there's a subreddit.
And a developer's Discord group. Oh, there's a subreddit. Yeah. And a developers Discord group.
So, yes.
You've written some code and released it lately.
It's not on this list.
There's nothing else on the list, so I'm adding things.
Yeah.
After our conversation about Git... You've given up on embedded completely.
No, no.
Now you're a Python developer.
No, no. Tr you're a Python developer. No, no.
Tracer, JSON, actually.
I've been doing a lot of JSON, which isn't even a language.
Against the advice of practically everyone on Twitter.
People have opinions.
People really do.
Okay, so after our Git episode,
I realized that I don't often put my small projects in Git for reasons that I don't know.
You put them in Git, not GitHub?
I don't version control some of my personal projects.
Get out of town.
It's true.
If something is dumb and small, I'm like, why bother?
And one of those things that was on the why bother list
was my little tracery robot.
You can put together a JSON set of rules
that follow the tracery mapping,
and you can make a generative robot for Twitter.
So I think we've talked about this before,
but endless screaming is one of them
that puts in a random number of A's and R's and G's and H's.
Yeah.
Something like that.
I put in one that is the things you should, the things to remind me to say things to people
who are going through bad situations in their lives so that I don't feel overwhelmed with this feeling of,
I don't know what to say.
The little robot just kind of sends me things,
and if I like what it says and it applies to someone I know,
I will sometimes just, you know, go ahead and riff off what my robot wrote.
And it has things...
Using robots to humanize us, I think, is a good approach to life.
But it's just, I mean, it's a JSON set of things,
and it's a couple hundred lines long now,
and it lives on quick bots done cheap,
or cheap bots done quick, or whatever that is.
And so why do I need to commit it? Unless I
ever want to, you know, not trash everything or lose it. And so I finally committed that.
And then along those same lines, I wanted to, I wanted to read some old blogs,
but reading old blogs is kind of a pain. I can either page back and read them in
the wrong order, or I can start at the beginning and go to their website and try to never close
that tab as I update. So I wanted something that would reblog things, that would take a blog, an RSS feed,
and it would send me one post every day or every N hours. And then I could read the blog in order
at a rate that is faster than they published, but will eventually put me up to date.
And so I made that in Python.
Well, no, I made part of that in Python.
I'm still working on it.
But I also posted that code, and I used the readme as a bit of a chance for a creative writing project.
Not as creative as Rockstar programming, though.
And so I'm playing with python um yeah i'm between gigs right now
i have a a long slow gig starting soon but i'm gonna need either a couple of fast
uh short gigs or at least one more long slow gig to keep me am. So if you want me to program preferably in C or C++,
which I'm not terrible at.
Rust.
I can even do Python,
machine learning. Oh, you know, I do want
to mention, I put together
after some frustration with myself
with machine learning,
I put together a list of all the things I've learned
in the last year about machine learning.
And it came out as a really good blog post.
I'm very proud of it.
So if you are interested in machine learning or have been working on it or want to know more about it, check out the blog.
I think it's 17 Machine Learning Tools.
Yeah, it was a good post.
So that's what I'm working on.
No, it's my chair squeaking, not the headphones.
Sorry.
If I had cupcakes, it wouldn't squeak.
I don't have a chair squeak remover.
I have a lot of audio tools, but chair squeak remover, they haven't been made yet.
That's sad.
So sad.
Maybe we should just stop now.
Wasn't there something else?
No, I mean, it's 2.56.
Stop the podcast?
Yeah.
Just end it?
Well, I mean, it'd be kind of disappointing to other people I've scheduled through October, but eh.
We could just call it a different podcast after that and start over.
That'd be kind of fun.
It'd be kind of fun to not have any listeners again.
This is how my brain works, okay?
It just is.
So if you're still listening, please unsubscribe
so that at least you can feel the sense of fun
that we had back in May of 2013 when we had 20 people downloading our first episode and we were really excited.
I had to go out by myself yesterday.
I had to interact with strangers who literally demanded eye contact and chit chat.
It was horrifying.
When did you do that?
When I got the kitty litter.
All right, let's close this up, thank you to Christopher for
whatever
lack of cupcakes
go get some cupcakes, stop squeaking your chair
and breathe the meaning of the poo
meaning of the poo
this is why we don't record in the mornings
yes, thank you for listening
thank you for continuing listening
it has been a pretty fun ride with the last 256 episodes This is why we don't record in the mornings. Yes. Thank you for listening. Thank you for continuing listening.
It has been a pretty fun ride with the last 256 episodes.
Except this one.
We don't, well, there are a couple exceptions.
We don't plan on stopping soon.
So that was all not real.
And we do like hearing from you, except about Rust.
I just can't stop with the Rust.
I'm sorry. We need to find a new target of our ire.
We can go back to PIC.
Nobody cares about PIC.
If you would like to contact us, hit the contact link at embedded.fm.
If you would like to not contact us, hit the about link
on embedded.fm.
I don't know.
There will be show notes that will
take you to the
I Am Calvary Oath for
Medical Devices, the MakeScene
Homebrew IoT
projects, and of course
the Rockstar programming language.
And now Winnie the Pooh. You might remember last time
Winnie was holding a balloon and singing
hoping the bees would think he was a cloud.
The bees were still buzzing as suspiciously as ever.
Some of them indeed left their nest and flew all around the cloud
as it began the second verse of this song.
One bee sat down on the nose of the cloud for a moment and then got up again.
Christopher? Robin? called out the cloud.
Yes?
I have been thinking and I have come to the very important decision.
These are the wrong sorts of bees.
Are they?
Quite the wrong sort.
So I think they would make the wrong sort of honey, shouldn't you?
Would they?
Yes, so I think I shall come down.
How? asked you.
Winnie the Pooh hadn't thought about this. If he let go of the string, he would fall. Bump! And he didn't like the idea of that, so he thought for a long
time, and then he said, Christopher Robin, you must shoot the balloon with your gun. Have you
got your gun? Of course I have, you said. But if I did that, it would spoil the balloon, you said.
But if you don't, said Pooh, I shall have to let go and that would spoil me.
When you put it like that, you saw how it was and you aimed very carefully at the balloon and fired.
Ow, said Pooh.
Did I miss, you asked?
You didn't exactly miss, said Pooh, but you missed the balloon.
I'm so sorry, you said, and you fired again, and this time you hit the balloon, and the air came slowly out, and Winnie the Pooh floated down to the ground. But his arms were so stiff
from holding onto the string of the balloon all that time that they stayed up straight in the air
for more than a week. And whenever a fly came and settled on his nose, he had to blow it off.
And I think, but I'm not sure, that this is why he has always been called Pooh. 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.