By Daniela Sirtori-Cortina

Before starting her session on programming languages, Lindsey Cook asked attendees to put away their laptops and use a piece of paper.

For the next hour, she illustrated programming concepts through interactive activities reminiscent of a grade-school environment.

“Welcome to the NICAR session that’s run like a fifth grade classroom,” Cook, data editor at U.S. News & World Report, said.

Cook and Ashlyn Still, news application developer at The Atlanta Journal-Constitution, introduced attendees to programming concepts such as variables, functions, loops and conditionals. Code varies among computer programs, but the concepts have a wide application, Cook said.

In an interview before the session, Cook said using jargon to teach programming could lead people to think the endeavor is too difficult for them. There are no real benefits to teaching programming in a boring way, she said.

Cook, who teaches at American University, uses interactive approaches in her classes and says it works.

“You’re learning the concepts and you’re not getting immediately turned off,” Cook said before the session.

Conditionals perform operations or actions based on whether a statement entered into a computer program is true or false.

To illustrate the concept, Cook ran a game of “green light, red light.” She asked attendees to line up, shoulder to shoulder, facing the front of the room. Then she read a series of statements and asked attendees to step forward — or “green light” — if the condition was true for them. For example, some people stepped forward after hearing the statement: “first time at NICAR.”

“The game of ‘green light, red light’ is just conditionals all over the place,” Cook said.

Another activity explained functions by asking attendees to pretend Cook was a coffee-making robot. Functions are a collection of computer statements that can be run numerous times without rewriting the code.

Cook asked members of the audience how many lumps of sugar they’d like in their coffee, what kind of roast they prefer and whether they’d want a lid on their cups. With Cook’s help, attendees then came up with a function that could run numerous times to brew coffee regardless of changes in variables, such as lumps of sugar.

To close the session, Still suggested follow-up steps for attendees based on what they’d like to do with programming.

Reporters, for example, would benefit from learning how to work Excel, SQL and R, Still said. Programs useful for people interested in graphics, data visualization and interactives include D3 and JQuery. Journalists interested in programming or news apps would profit from learning about Python or Ruby.

View Cook and Still’s presentation here.

 

Daniela Sirtori-Cortina is an Assistant City Editor at the Columbia Missourian, helping coordinate state government coverage. Politics is her favorite sport.