datacarpentry / spreadsheet-ecology-lesson

Data Organization in Spreadsheets for Ecologists
https://datacarpentry.org/spreadsheet-ecology-lesson
Other
37 stars 141 forks source link

Refer to CR and LF as CR LF not \r \n #267

Closed remram44 closed 4 years ago

remram44 commented 5 years ago

To not confuse instructors and learners, who might think a literal backslash and r character appear in the file.

hoytpr commented 5 years ago

Hi @remram44 and thanks for the pull request. This topic has been discussed in a couple ways, and your suggestions are good! A new Genomics Workshop release in June will cover this topic, and it's best to wait and see how it gets finalized before making more changes here.

hoytpr commented 4 years ago

This issue appears to be modified in the newer lesson, and although I cannot reproduce these unwanted characters, the authors apparently want the lesson to remain as stated. Thanks @remram44 for your feedback (it is good feedback!) and we might revisit this issue in the future.

remram44 commented 4 years ago

I am not sure what you mean by "cannot reproduce" as the section has not changed in the lesson?

hoytpr commented 4 years ago

I mean that no matter what the lesson says, I cannot get 'actual' \r characters to show up in my spreadsheets, no matter which program I use, or how hard I try. The lesson shows actual "\r" appearing in a spreadsheet cell.

Your PR changes the lesson text, but (and I could be wrong) the lesson seemed to warning against actual "\r" characters showing up in your spreadsheet cells (or other files). If that's possible, then the lesson is correct to warn against this. Then the lesson was updated and this was left intact. I have a Windows machine, and my (possibly wrong) assumption was that it must occur but on other operating systems. I was concerned about this in early 2018 (see issue #223 ).

I'll reopen this as it would be great to have more discussion about this specific wording.

hoytpr commented 4 years ago

Hi @remram44 I just taught this lesson today, and asked everyone in the room with macs, PCs and others, if anyone actually got literal "\r" or "\n" characters in their exported spreadsheets (re-opened in the spreadsheet) or opened in a text file editor. nobody saw anything. I believe this section is obsolete and should be omitted. A brief discussion of the differences between Mac, Windows, Linux EOL formatting is appropriate, but these characters do not show up in any modern software. I will ask for help from @cbahlai and @tracykteal (if Tracy is still around) @ErinBecker , then we'll need to rewrite this ourselves. Are you willing to help @remram44?

Thanks very much!

remram44 commented 4 years ago

Hi,

That's my point, you will never see literally the characters backslash then R. What you might see is whatever representation your editor chooses for the carriage-return character, for example in VI:

Screenshot_20191216_151032

In notepad++:

Screenshot_20191216_151340

Or get confused by the wrong line endings, for example Windows Notepad (doesn't go to a new line at all unless CR is present):

Screenshot_20191216_151443

The representation with backslashes is very unlikely to ever show up in an application. It is used by some programming languages, like C and Python. I tested both pandas and csv.reader in Python and didn't get it to show \r either however.

This is why I think it is confusing to refer to "the ASCII carriage-return character" as \r when that does not mean anything to readers :wink:

hoytpr commented 4 years ago

Those are excellent examples, and I'm in agreement with you now 100%. Let me get back to you tomorrow as I'm swamped today, but we'll need to get this fixed because it was obviously unclear to me as well.

Thanks again!

@remram44 I'm just wanting to get this figured out. So when I use Notepad++ and Windows notepad, I get the following:

np++notepad_LF-only

So is this related to vi? Notepad seems to be handling the LF with no problem.

hoytpr commented 4 years ago

To all, This has been unreproducible, and as far as I can tell, by teaching this lesson, by researching this topic, and by feedback from contributors, the problem no longer exists. If the original intent was to warn against different end-of-line (EOL) characters from different operating systems, then @remram44 has addressed this. With respect to the maturity of this lesson, I am merging.

tracykteal commented 4 years ago

Thank you very much @remram44 for the PR and @hoytpr for the thorough evaluation.