I started this as an aside to my post about source files as harmful, but axed it as sort of awkward and too much of a digression. Like a weird sweater that you get for your birthday, though, I couldn’t bring myself to toss it, so I saved it as its own draft. Good thing too because it turns out that my surplus of ready drafts has run dry, and I have nothing else to publish. So, without further ado, please enjoy an admittedly weird bit of Friday humor.
Interviewer: Thanks for joining me, guys. Today I have with me, in alphabetical order, C# C++ and Java Compilers.
C++ Compiler: How does a pound come before a plus?
Java Compiler: (Guffaws)
C# Compiler: Don’t hate.
Interviewer: Because it has fewer characters…? Ok, amend that to in no particular order.
C++ Compiler: That’s better.
Java Compiler: I was last and I didn’t complain.
C# Compiler: You’re a good citizen.
Interviewer: So let’s get right to it. Should methods go above variable declarations or below?
C# Compiler: It doesn’t matter to me.
Java Compiler: Me neither.
C++ Compiler: Same here.
Interviewer: Okay, but surely you have some preference.
C# Compiler: I mean, our users seem to get pretty worked up about it, but we really don’t care.
Interviewer: What about declaring variables all at the beginning of a method or just declaring them where you need them?
Java Compiler: Up to the user, but I prefer the latter because users that do this have less of a tendency to get angry at me due to their mistakes cropping up at runtime.
C++ Compiler: Well, I don’t care these days, but that issue has some history for me.
C# Compiler: History?
C++ Compiler: Yeah… I don’t care, but my dad gets pretty worked up–
(Muffled voice from the other room): I heard that! You kids with your multi-pass compiling. Back in my day, we only needed one pass to compile and we we liked it!
C# Compiler: lol…C
C++ Compiler: Dude, not cool–that’s my dad.
Interviewer: So what about having multiple classes defined in a single file?
C# Compiler: Whatever, I don’t care.
Java Compiler: Not allowed. I don’t like this unless they’re nested or private.
C# Compiler: That’s pretty anal of you.
Java Compiler: I have standards, which is probably why my users don’t use awful variable names like lpstr_theThing.
C# Compiler: Yeah, the kind of standards that are responsible for checked exceptions.
Java Compiler: Wow, ouch. That was a pretty low blow.
C# Compiler: I’m sorry, that was uncalled for.
Interviewer: How about Camel casing versus Pascal casing? Underscores in method names? Underscores in front of fields? How methods and such are ordered?
Java Compiler: We don’t care about any of those things.
C++ Compiler: Yeah, as long as you don’t use illegal tokens that would confuse us, we really don’t care what you call things.
Interviewer: So why do people spend so much time arguing about which way is the right way?
C# Compiler: I can interpret millions of lines of code, but that’s beyond me.
Interviewer: Is it possible for those arguments to be productive?
Java Compiler: No —
C++ Compiler: Look what they did to poor C#!
C# Compiler: What’s that supposed to mean?
C++ Compiler: Regions, that’s what. I mean, dude, really?
Java Compiler: Yeah, I don’t mean to be rude, but that’s kind of gross.
C# Compiler: Yeah… I feel like the closet that a kid crams all of his stuff into when he’s supposed to clean his room.
Interviewer: How so?
C# Compiler: So I provide a language feature that I thought users would like, and they do. It lets them hide code they don’t want to look at, but I didn’t really anticipate all the consequences of that…
Interviewer: Meaning what, exactly?
Java Compiler: (Chuckles)
C# Compiler: Well, meaning people stuff tons of terrible code into my regions and then point at how nice and clean things look, like the kid with his room. He didn’t clean the room — he just crammed everything in the closet.
C++ Compiler: I don’t know if I have anything that egregious, but it does seem that we do a lot of weird things and field a lot of weird work-arounds because of the file-based nature of code storage and interaction.
Interviewer: So would you say that the continued use of files as the principle means for storing code is a problem?
C# Compiler: I don’t think it matters how the code is stored, but rather how users interact with it.
Java Compiler: Yeah, I mean the way the actual text of the code is stored is an implementation detail, but it doubles as data and user interface, even in sophisticated IDEs like Eclipse.
C# Compiler: (Snorts)
Java Compiler: Oh, sorry – I forgot that someone here likes to be invoked from IDEs that require no less than 12 gigs of memory.
C++ Compiler: You guys sicken me.
Interviewer: What do you think the future of source code is?
C++ Compiler: Separation of the storage details from the presentation to the user.
Java Compiler: Yeah, we’ve beaten around the bush long enough: syntax highlighting, quick navigation, automated refactoring–
C++ Compiler: Most IDEs and productivity tools do everything they can to hide the fact that you’re editing a file, like MS Word hides the fact that you’re more or less editing text.
C# Compiler: It might get more complicated with certain advanced language features: closures, lambda expressions–
Java Compiler: We’ve got those things too now, buddy. Quit showing off.
C# Compiler: What?
C++ Compiler: Those things don’t make it any more complicated — you just wanted to bring them up.
C# Compiler: They create scoping challenges! If you’re storing hierarchical structures of code elements, that stuff matters!
Java Compiler: Sure there are complexities with all kinds of features, but those aren’t significant barriers to the effort. This really should go forward.
Interviewer: Well, that’s about all of the time that we have, so I’d like to thank our interviewees. For their time. Gentle-compilers, always a pleasure.