Right Working Romantic Related Learning Friendly Healthy Legal Inspirational Unfiltered

Not Speaking The Same Programming Language

, , , , | Working | October 13, 2017

(It is the mid 80s, and I have a coworker come to me with two full pages of computer programming source code.)

Coworker: “Hey, can you help me with this? This function is not working right.”

Me: “Sure. What’s it do?”

Coworker: “Well, on the first line I copy…” *drones on for a few seconds about stuff I can clearly read*

Me: “Wait! Let me interrupt for a moment. I can read the code. In 20 words or less, what does this do?

Coworker: *long pause that tells me he’s having trouble seeing the forest for the trees* “It, um, converts a date that’s a string to three integers: month, day, and year.”

Me: “Ah! Excellent. And by the time you get the string, has it been sanitized? You know, guaranteed to be pairs of digits with a slash in-between, not blanks or words or other garbage?”

Coworker: “Oh, yeah, all the user input is cleaned up.”

Me: “Okay, good.”

(I scribble “sscanf(text, “%02d/%02d/%02d”, &month, &day, &year);” in a blank spot on the page.)

Me: “Throw out everything and replace it with that.”

Coworker: “You’re kidding.”

Me: “Not at all. Use that. It’ll work. Trust me.”

Coworker: *not sure* “Well, okay.”

(Half an hour later he’s back and looking a bit sheepish.)

Coworker: “That worked. Thanks.”

Me: “No problem.”

(It’s been 30 years. Unfortunately, the new generation of programmers is in the same spot.)

Question of the Week

Have you ever served a bad customer who got what they deserved?

I have a story to share!