JumpstartLab/curriculum — Issue #36: JSattend confusing pseudocode
Author: DonSchado
Created: 2012-01-22 21:18:00+00:00
State: open

Iteration 3: Outputting Cleaned Data, Step 1:
I'm really confused by the pseudocode in the comment:

```ruby
def output_data
output = CSV.open("event_attendees_clean.csv", "w")
@file.each do |line|
# if this is the first line
# output the headers
output << line
end
end
```

I think it's not worth it checking in each iteration if that's the first line over and over again.
The easiest way to add the header is to configure that in the option hash:

```ruby
@file = CSV.open(filename, {:headers => true, :return_headers => true, :header_converters => :symbol})
```

Should I rework that in form of a Pull Request?
Greetings!