Group work is a learning experience

Image via Helloquence (Unsplash)

Yesterday in class we had a coding evaluation which had us take in input from the user, compare it against a set of given requirements, and output it. As I don’t have explicit permission from the instructor to reproduce his work for this post, I’m going to make up an example.

The formula for converting Fahrenheit to Celsius is XYZ. Write a program that asks the user for the temperature in Fahrenheit and returns the value in Celsius. Along with this, write it so that depending on the range of the temperatures, these different statements are expressed:
-30C — -15C: Have you considered moving to Canada?
-14C — -5C: This too shall pass.
-4C — 5C: I hope you’ve invested in a decent windbreaker and toque.
6C — 12C: What a lovely spring day we’re having!
13C — 17C: This really could be the start of a lovely season.
18C — 22C: Goodbye sweatshirts, hello, t-shirts!
23C — 28C: For the average Canadian, this may be a bit much…
>29C: Anyone feel like heading up to the frozen north for a minute?

That’s the idea, really.

For the curious, we programmed in C#. Creating new objects or classes were not required (yet!), and as long as the output matched the test values that the instructor gave us, we would receive full marks. Finally, we were allowed to refer to our notes and heavily encouraged to consult with the individuals around us.

With the exception of a minor hiccup, my code ran well. The test data returned what it was supposed to. Everything was going great.

It was perfect timing for one of my biggest fears to pop up.

“Is your code working?” asked the student beside me.

“Yeah,” I replied. “Is yours good?”

“Almost,” she said. “My second output is returning the information from the first one, and I can’t seem to figure out why that is.”

“Oh. Um. Uh…do you want me to look at it with you?”

In response, she pulled her laptop over to me and put the second test data into her program.

I think that if I wasn’t sweating when she started talking to me, I was sweating then.

You know that old Jerry Seinfeld sketch about people fearing public speaking over death, about how they’d rather be in the casket than the one giving the eulogy?

For me, having to troubleshoot someone else’s code is a more terrifying prospect than public speaking.

Much like Mesut Ozil, I resort to prayer when someone asks me to troubleshoot their code.

It’s a combination of not being comfortable with development and a lack of faith in my own skills, but someone asking me to help them troubleshoot is a nightmare. I know it’s something I have to get more comfortable with in this field, and it’ll take practice.

My immediate response whenever someone asks for help is to say, “Here’s how I did it. This is the right way to do do it. Do it my way.” But that’s not how the people who’ve helped me have gone about it at all. They always sat me down and said, “Okay. What are you doing? Tell me what you’re trying to achieve. Why did you do this thing this way?”

Doing this helped me a lot because it focused less on the results of the small programs I was trying to create in class and more on the methodology behind them. So I tried the same with my new partner:

“Can you explain to me what you’re trying to do?”

We started talking about the problem she was solving. As we talked more, I looked through her code and we began commenting and adding lines here and there based on our logic. Another student pulled up beside us after he finished his assessment and joined in the testing.

In the end, we did solve the problem and she got her full marks. As it happens, when you initialize a variable and forget about it in a stream of code, it can mess with your final output.

Who knew?

It was a team effort. Sometimes you need people to come in and look at your code with fresh eyes. It doesn’t mean you’re dumb or not as strong in your skills as the individuals around you. It just means that you’re mature enough to ask for help, is all.

There won’t always be an instructor or professor to help us. I’ll have to get comfortable with reading through documentation or StackOverflow answers on the job. But there’ll always be developers around you that you can ask for help. And if they’re as any good of a debugging crew as our crew yesterday, then I think that we’ll be in good hands.

If you’re interested in checking out my go at the sample problem above, you can find the code here. It’s a simple console application for now — suggestions and tips are always welcome!

Like what you read? Give Kobe Amoh a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.