Hello World! And hello people of NativLang!
I'm Jessica from CompChomp and I'm so excited to be a guest here talking about the intersection
between language and code. I'm also really excited to be here at YouTube Space New York!
There are amazing cameras, this super talented crew, you even get to see me dance. You can
laugh at it, comment... Alright. Let's get down to business and find
out if computer languages even count as languages. I think they do! Spoiler alert.
I'm so jealous right now. I just found out that tenth graders like Sallie are going to
start getting foreign language credit for learning to program games on their iPhones.
No slogging through years of conjugating ser and estar like I had to do. But you know Sallie's
mom? She's a bit iffier about this because she says that programming languages with all
the curly braces and weird semicolons and strange mathy symbols are nothing like a foreign
language.
Is she right? Is mathy looking code like this really a language language?
Welcome to CompChomp, the only show on the internets where we crack jokes in binary!
011011001. Haha.
Don't get me wrong. I actually really enjoyed my time in high school Spanish. Maybe don't
ask me to order a meal when we're out because you are most likely going to end up with the
cabeza de chivo. Sorry!
Now I'm a programmer and I get to look back and wonder - when I was learning Spanish,
was I really doing anything different than when I was learning to code?
I mean, in my code I use words. I use syntax to put those words together. And I even use
related languages and dialects.
Oh that's right, in programming, there are language dialects.
It all sounds so languagey. But does it look languagey?
Facts Alert! *siren*
You know it's going to be good facts because these are my good facts glasses.
If you wanted to, how do you think you could tell whether learning to program was like
learning a foreign language? You could round up a bunch of programmers and just shove them
into an MRI and scan their brains while they're reading code. And that is exactly what Janet
Siegmund and team did.
Kudos guys! Actually, no. I'm a programmer and I really hate enclosed spaces. Don't put
me in there!
So let's say that you're a coder and your holed up in an MRI machine and they show you
this. What does it mean? Well let's read it together.
I'm a program. Stick the label var1 on the number 23 and another label var2 on the number
42. Now pull out a label temp but don't put it anywhere just yet. Now take temp and stick
it where var1 is. Then peel off var1 and stick it over there with var2. And you can now take
var2 and put it back where temp is.
After this whole runaround, which number did our label var1 end up on? That's right, we
switched 'em!
Alright, this is kinda fun. I like reading code! Let's do another one.
I'm a program, too. So this is "otto" who wears the nametag word. Give me a switch to
flip when I get the right answer and give that switch the nametag result. Start one
counter counting up from zero and another one counting down from the end of the word.
As the first counter counts up and the second counter counts down, you go until you reach
the middle of the word and at each count you compare the two letters. And if they are the
same, keep going, but if they're different, flip that result switch to false and stop
doing everything. You're done. Just tell us whether result is true or false.
Did you figure out what this did yet? Come on, I know one of you language guys has it
figured out. We just checked if "otto" is a palindrome. And for those of you that aren't
sure, "otto" is.
So what type of brain patterns do you think lit up when coders were reading code like
this? Probably just the ones that deal with math, right? Errrt! Totally wrong. It's the
ones that deal with language and memory. Basically, being a fluent coder looks a whole lot like
being a native speaker.
One-two punch! That's my uppercut, or, I don't know, my jab.
Go out right now and demand foreign language credits for your programming smarts. If your
goal is to teach someone to think in a new language, you pretty much can't go wrong with
programming. Unless you're teaching Basic. You need to stop teaching the kids Basic.
It is not a good idea. Details to come later - tragic, traumatic details.
But, you know, if your goal is to have a whole cultural experience, to read Don Quijote and
accidentally order cabeza de chivo, that's not really something you can do in C.
Alright. I hope you'll spend a few more videos with this programmer talking language. I'm
Jessica from CompChomp. Subscribe for more about how code is part of your everyday life,
and hang around here on NativLang where we're doing a short series of videos together about
the awesome overlap between code and language.
Chomp!