241. Programming Idioms

Each programming language has its own set of idioms or patterns of code used to express some standard kind of computation. Today on The Rabbit Hole, we’re talking about the programming idioms or expressions that we use on the regular; which are not to be confused with idiomatic programming or regular expressions! Tune in to learn what it means to shave a yak, boil the ocean, and grok a concept, as well as the difference between FUBAR and foobar, what turtles have to do with the problem of infinite regress, and so much more!

Key Points From This Episode:

  • We kick off with the term ‘yak shaving’, which has nothing to do with shaving a yak!
  • What it means to ‘boil the ocean’ and the context in which you might use that idiom.
  • The sci-fi slang term ‘grok’ and how it relates to intuitive understanding.
  • The use of ‘foobar’ in the IT world as a placeholder to refer to generic examples.
  • Insight into the cultural side of programming and other metasyntactic variables.
  • How the phrase ‘turtles all the way down’ represents the problem of infinite regress.
  • How you can share your weird and wacky programming idioms with us!
  • And much more!

{{addCallout()}}

Transcript for Episode 241. Programming Idioms

[INTRODUCTION]

[0:00:01.9] MN: Hello, welcome to The Rabbit Hole, the definitive developer’s podcast living large in New York. I’m rabbit number one, Michael Nunez. We have rabbit number two.

[0:00:09.8] DA: Dave Anderson. 

[0:00:11.2] MN: And rabbit number three.

[0:00:12.8] SC: Sophie Creutz.

[0:00:14.3] MN: Today, we’ll be talking about programming idioms, expressions we use on the regular. It’s not to confuse with idiomatic programming.

[0:00:24.5] DA: Or regular expressions.

[0:00:24.9] MN: Or regular expressions. No, these are expressions you would hear on the regular, this is – 

[0:00:30.2] DA: Right. 

[0:00:30.6] MN: This is things that we may have heard. 

[0:00:32.0] DA: Things that you would say that someone would have to be like, “Wait, back up for a second. Just tell me what did you say?”

[0:00:40.7] SC: Right, like you’re not really going to go to go shave a yak.

[0:00:48.4] MN: Or, am I?

[0:00:49.5] DA: Sometimes one must do what one must do.

[0:00:54.4] MN: If I have to go and get some clippers to shave a yak out here in Worcestershire County, so be it.

[0:01:01.9] DA: I actually really like yak shaving as an example because not only is it a really absurd thing to say in conversation that just stands out but, if you don’t know the meaning, you have to tell the story of what it means to shave a yak – to do a task – and that itself is an act in shaving a yak.

[0:01:26.4] SC: Oh yeah.

[0:01:28.6] MN: I mean, we’re here in the episode, can anyone give us the definition of yak shaving?

[0:01:33.8] SC: Well, the idea is, you’re going to have to do a lot of other tasks first in order to accomplish the task you actually want to accomplish, right? If the idea is, I don’t know, you want to build an inventory system then, before you do that, you’re going to have to do some yak shaving and actually host all of your icons in S3, right? Which is this whole other thing. For the actual shaving of the yak, perhaps you have to first befriend the yak, and then read it a story so that it’s in an amenable mood, then you go to charge the clippers. There’s just a lot of stuff you got to get out of the way first.

[0:02:13.0] DA: I really like that definition of a yak shaving and I feel like there should be like a kid’s book about this where you could tell your kid at night, the parable of having to shave a yak. I think, you could get to that point where you’re like, building a rapport with the yak and telling it a joke before you can shave it. I think, part of the thing that’s funny about that is that the task that you would do, that you want to do is that you would not want to shave a yak to start out with. 

You’re not setting out on the quest to shave a yak. You start out trying to build the inventory system and then you try to host the icons for these new products you're trying to sell in S3 and then you try to configure AWS and then you find you need to go get some grass. In order to get some grass, you got to find a good yak, but the yak is really dirty, so you got to shave the yak.

[0:03:07.0] SC: You got to shave the yak, it’s really like far away from the original idea.

[0:03:11.6] DA: Yeah, you're kind of just going astray, out in the field. You’ve climbed the mountain.

[0:03:19.4] SC: Yeah, so that’s yak shaving. 

[0:03:21.7] MN: I’m going to try to make that a goal. I’m going to make that children’s book and see if it’s possible if I can tell Gio in the form of a child’s book as to what I do for a living, which is pretty much yak shaving.

[0:03:38.5] DA: I feel like programming idioms actual just in general will be a great child’s book as well. A lot of them have very colorful phrases.

[0:03:46.2] SC: Yeah, like boil the ocean, what an idea.

[0:03:50.1] MN: What? No, someone’s going to have explain that one to me.

[0:03:52.6] DA: I’ve actually never heard this one in practice. This sounds too biblical, it’s too Charlton Heston, 10 Commandments or something.

[0:04:03.1] SC: Yeah.

[0:04:05.0] DA: What does it mean to boil the ocean? I feel like I have an inkling.

[0:04:09.2] MN: Does anyone know?

[0:04:10.5] SC: I mean, according to our sources, boil the ocean is like, when you're trying to do something that’s basically impossible, right?

[0:04:18.3] DA: Okay.

[0:04:20.3] SC: Yeah, although, I could see it meaning other things as well like just to go to great effort or something like that.

[0:04:27.3] MN: I had something different. Go ahead Dave, I want to hear what you have though.

[0:04:30.7] DA: Yeah, I’m trying to think of a context that I would use that in then. I guess, if my customer or my project manager is asking me that this inventory system that we’re building should just be populated with whatever products someone thinks of, I’d be like, “Okay, you’re asking me to boil the ocean because I cannot do telepathy.”

[0:04:58.0] SC: I feel like this has less power in an age of imminent global warming.

[0:05:04.7] MN: It’s too real.

[0:05:05.7] DA: Right, it’s just like – you just got to wait, it’s going to happen guys, you know? Because you know –

[0:05:09.1] SC: Right, we’re working on it.

[0:05:10.6] DA: Revelation’s on its way.

[0:05:13.2] MN: My weird analogy was going to be that it requires a brand-new system for you to do, so much so that by boiling the ocean, you kill the entire ecosystem that exists in the ocean and then you have a brand-new ocean that you can do whatever you want with it. So, it’s like yeah, the Legacies like, “Oh, I want to have a system that does X, Y, and Z” and it’s like, “Well, we can’t do that in our current system, we’re going to have to boil the ocean and start anew” is what I had in mind but I guess – 

[0:05:39.8] DA: Oh wow.

[0:05:41.4] MN: That’s what I had in mind but that was completely wrong, obviously.

[0:05:43.8] DA: That’s brutal, wow.

[0:05:45.4] MN: It really is.

[0:05:46.6] DA: I mean, we really can’t boil it, we like these fish, they’re great.

[0:05:49.8] MN: Yeah, exactly, no, we love the current – we need to save the coral reefs and stuff like that.

[0:05:55.4] DA: Cool, have you guys ever heard the term grok?

[0:05:58.9] SC: I love Grok, I’m always trying to grok things.

[0:06:03.1] DA: grok.

[0:06:03.6] MN: Only in programming, they’re just people that I’ve worked with that really like to use that word. That word rarely rolls out my face. I know what it means, it’s just to think, right?

[0:06:15.4] DA: It’s not a common phrase in the streets in the Bronx. Bobby’s not grokking.

[0:06:21.9] MN: Bobby ain’t grokking at all. Bobby’s never grokking, yeah, Bobby’s never grokking, I tell you right now, for sure.

[0:06:27.6] SC: Well, I’m sure Bobby groks, he just doesn’t know he’s grokking.

[0:06:30.5] DA: Right, he doesn’t.

[0:06:31.9] MN: Bobby groks.

[0:06:33.5] DA: Bobby groks.

[0:06:36.9] MN: Yeah, I’m sure Bobby grokking but he just don’t know he grokking, that’s kind of lit.

[0:06:41.6] DA: He doesn’t grok that he’s grokking.

[0:06:43.9] MN: It’s like a next level of thinking, right? I don’t – Sophie, is that what grok means? To think but more? 

[0:06:52.3] SC: Yeah, well, the way I’ve heard it like idiomatically used is the way I idiomatically use it where it’s trying to fully understand something, right? If I’m looking at a piece of code in the code base and I say, “I’m trying to grok this,” it means, “I’m trying to understand what it does,” but do people who use it differently than that?

[0:07:11.6] MN: I see.

[0:07:11.9] DA: Yeah, no, I think that’s 100 percent correct, it’s like to fully and completely understand it, something, a concept or an idea and kind of love that. Do you know the origin of this word.

[0:07:25.0] SC: I actually don’t.

[0:07:25.8] MN: No.

[0:07:26.5] DA: It is actually from a 1961 science fiction book.

[0:07:33.0] SC: Yes, I love that. What book?

[0:07:37.3] DA: It is from a book called Stranger in A Strange Land.

[0:07:40.9] SC: Oh, I’ve heard that book but not recently. 

[0:07:42.2] DA: By Robert –

[0:07:44.0] SC: Heinlein.

[0:07:44.4] DA: Heinlein, yeah. Cool, yeah, so you’ve read it. You have unintentionally experienced this in its first form. In the context of the book, it is about understanding aliens or aliens understanding humans almost telepathically, I guess, or on a deep level. I never read the book so I think that you might actually be the expert on that.

[0:08:11.2] SC: I love this description in the context of Stranger in a Strange Land, which is that grok means to understand so thoroughly that the observer becomes a part of the observed.

[0:08:23.3] DA: Wow, I mean, that’s great. I love that and I feel like if I read this science fiction book, then I will become grok and then, that will help me move on to grok other things perhaps.

[0:08:40.3] MN: Hey, I mean, Bobby’s going to have start grokking I guess.

[0:08:46.7] DA: Bobby on the streets.

[0:08:48.0] MN: Bobby on the streets grokking. No because every time I’ve seen that or heard someone use that phrase, it always meant – it was more impactful than them saying that they want to understand something. It’s like, “Oh wait, Bobby’s grokking, trying to grok this thing, cool. You take your time” it was always an emphasis on the understanding and I think that definition definitely shows that that’s what it actually means. It is to fully understand the concept.

One of the ones that I’ve seen, you know, this is like programming, you see it all the time, I didn’t know where it came from until I did a quick Google but we use FUBAR. I think we’ve mentioned it all the time when we talk about variables and you know, I’ve always heard the term FUBAR where it’s FUBAR where it’s like, “effed up beyond all repair” and I thought that’s just like a play on, I thought foobar was a play on that, like, “Oh, it’s programming effed up beyond all repair” right?

[0:09:55.3] DA: Yeah.

[0:09:55.8] MN: It’s like no, it’s just foo and bar and baz and I was like, “Oh okay, well I mean, I use it all the time,” but it is very interesting that any idea? You guys use it often, any thoughts on foobar? 

[0:10:08.2] DA: I always assume that too because that’s like kind of like Vietnam military kind of slang where it’s like, you know, “Oh man, game over.” 

[0:10:19.2] MN: Everything is effed up, yeah. 

[0:10:19.3] DA: Game over, man. 

[0:10:23.1] SC: But what comes after foo, bar, and baz? That’s the real question. 

[0:10:27.8] MN: Oh, I don’t know. I think at that point, it becomes like you know, these crazy words – crazy three-letter words that come up and looking at the history and the history on Wikipedia, it talks about the FUBAR as we discussed with the military slang. It says, “World War II era slang” I mean, that’s pretty FUBAR too, like those times were pretty crazy but it was used in 1965 in an MIT magazine and tech engineering use and it was just supposed to be a thing that’s like a place holder literally and it was used in various books at that time. 

There is a picture on Wikipedia where it’s like, “Smokey Stover driving a foo-mobile” or it’s like a weird car and it’s just like whatever kind of mobile it was but it was a foo-mobile kind of thing and then I guess you know, bar is just the next word that was used after that. But I use foobar for all my variables. I think we’ve mentioned it before, it’s got to, you know, just throw a foo in there before we rename the variable to the correct name. It is a call back to ubiquitous language and feel free to check that episode out. 

[0:11:39.0] DA: Right, it’s the opposite of ubiquitous language unless you’re doing like a foo based system. You were talking about this and I realized I never really thought about it very strongly because I just assumed I ended that place but there’s this whole written history.

[0:11:58.4] SC: It’s the whole cannon, yeah. 

[0:12:00.1] DA: There is a whole cannon, yeah, and it’s like in various – so there is a society called the Internet Society. In 2001, they wrote a little essay or paper about the origin of foobar and all of its uses in official documentation, building up all the technical infrastructure that we have today. 

[0:12:23.0] SC: I also found some resources that show what you’re talking about, like where they’re used in infrastructure but also other metasyntactic variables and where they’re used, which apparently is a term for foo, bar, and baz. For instance, Python programmers, so it seems like you might use ‘spam’ or ‘eggs’ or if you’re in New Zealand, you might use blarg or wibble or if you’re England – 

[0:12:48.4] DA: Blarg.

[0:12:50.1] SC: Yeah, you might use oogle, you can’t make this up, oogle, floogle, boogle, zork, gork, and bork, although I think bork is tone idiom now that I mention it. 

[0:13:03.7] MN: Right. Yeah, bork is like kind of a little Swedish Chef, a little Muppets situation going there. Oh my gosh, that’s amazing. I love all of this knowledge that you’re dropping about metasyntactic variables and the cultural aspect of programming too. I guess that’s kind of what this. Different phrases that programmers use are very cultural. 

[0:13:29.6] SC: Yeah. 

[0:13:30.6] MN: Yeah, I think the goal for me now is to not use foo, bar, baz but to use some of that oogle foogle. 

[0:13:38.1] DA: Yeah, zoogle. 

[0:13:41.0] SC: Fee-fi-fo-fum. 

[0:13:42.5] MN: Yeah, exactly. 

[0:13:43.3] DA: Yeah, why not? That’s great. Can I share another literary idiom or phrase? 

[0:13:49.6] MN: Sure. Let’s do it.

[0:13:50.5] SC: We love to hear it, yeah. 

[0:13:52.2] DA: Have you heard the phrase ‘turtles all the way down’?

[0:13:55.1] SC: I have. 

[0:13:55.5] MN: No. No. Where are they going? What’s happening? 

[0:14:01.3] DA: Ha-ha, Sophie do you want to give a stab at an interpretation of this? 

[0:14:07.7] SC: You know, I am not sure if the interpretation that I have used is the same as yours is, so I will defer to you for it. 

[0:14:15.9] DA: Well, no, I am curious, just go out there. 

[0:14:19.7] SC: Oh okay. Well yeah, I mean, my sort of perception of this is there’s this idea in the cannon of the world being carried on the back of turtles, right? 

[0:14:31.9] DA: Yeah. 

[0:14:32.7] SC: Then when you say it’s turtles all the way down, it’s this idea of you’re referring to the true nature of something, I guess? 

[0:14:42.7] DA: Yeah, I think that is definitely a part of it. Yeah, you are trying to understand deeper levels of abstraction for your model and the way that you are thinking about something, and so I think that is a correct interpretation and meaning of it. I think this particular phrase – there may be like some basis in legend or different mythologies of the world but the thing that I think most strongly of is the Discworld series of fantasy novels.

[0:15:16.0] SC: That’s what I’m thinking of, yeah, that’s it.

[0:15:17.3] DA: Yeah, exactly. It’s like there’s this world that is flat and is carried on the back of four elephants and then those four elephants are on top of a turtle and I’ve not read far in the series but I am assuming that when you really look at it closer, there’s actually another turtle underneath that turtle.

[0:15:41.1] SC: And then another. 

[0:15:42.3] DA: Yeah but you kind of think about that in terms of like computing when you’re like, “Oh, tell me what happens when you type the URL www.google.com into your browser?” If you keep peeling back the layers of abstraction, you’re going to find more turtles. You will never actually find the bottom of the abstraction. You just have to accept the model of the universe that is most useful to you, which may or may not involve turtles, maybe. That’s my interpretation. 

[0:16:15.8] MN: That was not what I had in mind, I had no idea. The thought that I had for turtles all the way down would be it’s a pattern that exists that – you know how you’re on your IDE, you can just command click something and then it will lead you to something else and then you just command – you could keep command clicking until you find the thing you’re looking for, if you look at a command click variable or a function that gets used. 

I thought that was the idea of like, “Oh you’re…” and trust me, it’s going to be all goofy the entire time because this code is written five years ago with no test and it’s just all turtles, running around loose, being crazy. 

[0:16:56.8] SC: Right, if you find a turtle on the code and so you try to look deeper into it and then you just finally get another turtle that makes up the code and then you look at that turtle and it turns out, in there, there is actually just another turtle. 

[0:17:08.9] MN: Yeah and I don’t know if turtle was a synonym for bad code or untested code or like slow code but like, “It’s turtles all the way down baby, it’s all slow for me here. We need to refact all of this.”

[0:17:21.8] DA: Yeah, I think that kind of carries the same meaning too because you’re looking for the true root of, “Okay, where is the business logic? Where do I have to change it? What is the fundamental thing?” and so you go to the next level and you’re like, “Oh wait, this thing is just being carried by these two other turtles,” and then you look at those turtles and you’re like, “Oh, these turtles are just deferring these other turtles,” and so you know, so on and so forth.

[0:17:50.3] SC: It’s the turtle in sheep’s clothing as it turns out. 

[0:17:52.7] MN: What? 

[0:17:53.7] DA: Oh no. 

[0:17:54.6] SC: I guess. I might have mixed my idioms up there. 

[0:17:58.4] DA: Maybe inviting.

[0:17:59.9] MN: I think the idioms we discussed just now are – well, they’re very interesting. I am sure there is a lot more out there on the field. I’d love to hear some of the crazy, wacky things that are currently happening on other’s people’s engineering teams because you know, boiling the ocean is wild and I am sure there are more crazier things out there that I may not have heard. 

[0:18:24.5] DA: Or things that programmers say in different countries even, like what bizarre things are they saying about turtles in eastern Europe or something? 

[0:18:37.3] MN: Yeah, it would be interesting for us to hear and understand and we can circle back to these idioms and we’ll have to elaborate that one too sometime. 

[0:18:49.0] DA: We’ve got business idioms too. 

[0:18:50.5] MN: Yeah, we’ll have to circle back on that particular episode and call out for more of these programming and business idioms in the future. Until then, feel free to share any of the words or idioms you all use in your teams and we’ll come back. 

[END OF INTERVIEW]

[0:19:06.1] MN: Follow us now on Twitter @radiofreerabbit so we can keep the conversation going. Like what you hear? Give us a five star review and help developers just like you find their way into The Rabbit Hole and never miss an episode, subscribe now however you listen to your favorite podcast. On behalf of our producer extraordinaire, William Jeffries and my amazing co-host, Dave Anderson and me, your host, Michael Nunez, thanks for listening to The Rabbit Hole.

[END] 

Links and Resources

Stranger in a Strange Land

Episode 240: Ubiquitous Language

The Rabbit Hole on Twitter

Stride

Michael Nunez on LinkedIn

Michael Nunez on Twitter

David Anderson on LinkedIn

David Anderson on Twitter

William Jeffries on LinkedIn

William Jeffries on Twitter

Sophie Creutz on LinkedIn

Sophie Creutz on Twitter