Talk:Bin given limits: Difference between revisions

→‎Input data re-formatting?: added some comments.
(/* Input data re-formatting? +/)
 
(→‎Input data re-formatting?: added some comments.)
 
(4 intermediate revisions by 2 users not shown)
Line 3:
Hi, I don't normally put so much data into a task description so took pains to carefully format it as 10 items by 20 lines. It has been reformatted as 20 items by 10 lines, which I personally like, but goes against the 80 character maximum line length guideline, (not rule), for idiomatically formatted Python code, (and may do the same for other languages too).<br>
--[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 05:47, 7 February 2021 (UTC)
: Insomnia. I thought the task description itself looked better. Then I worried people would hate me. I tried to make it so that each change is clearly labelled and would be individually undo-able. I forgot about the 80-char rule, my bad (pep8 does state that up to 99 is ok). Apart from Go at 112, I believe the other modified examples now have some lines in the 88 to 93 range. --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 06:01, 7 February 2021 (UTC)
 
:: (Shh, I prefer the change :-)
:: --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 06:24, 7 February 2021 (UTC)
 
 
::: One of the programming examples has the data formatted with a 171 byte-wide image, &nbsp; and I have no issue with that. &nbsp; It's nothing complicated to read, and being data, &nbsp; there isn't anything complicated to assimilate. &nbsp; But as far as the 80-character rule, &nbsp; I don't see why data &nbsp; (and especially comments) &nbsp; can't exceed that even in normal circumstances. &nbsp; Programming has come a long way since being limited to punched card images and/or terminals with an 80-byte width. &nbsp; Reading code longer (wider) than a certain amount of bytes is normally a sensible idea &nbsp; (and there are always exceptions), &nbsp; and of course there are cases where compound '''IF'''s can be extended to multiple lines &nbsp; (possibly with continuations, depending upon the computer programming language), &nbsp; so there isn't a clear and concise rule what makes a computer language statement more or less readable than another, &nbsp; not withstanding coding norms and some programming languages that use a lot of syntactic sugar and liberal use of blanks. &nbsp; I used to program my REXX programs with statements (more or less) being contained within 38 bytes, &nbsp; with comments almost invariably starting in column 40 through 80, &nbsp; (essentially leaving 36 bytes for commentary within an 80-byte "card" image. &nbsp; (For boxed comments, I used the entire coding width). &nbsp; Then I started commenting almost all of the REXX statements &nbsp; (and adding whitespace liberally to make perusing easier), &nbsp; and it was clear that 38 columns wasn't going to cut it. &nbsp; So I increased my coding-width acreage for comments to columns 50 through 90 &nbsp; (but it wasn't a hard and fast rule, however). &nbsp; I like to indent compound statements and other coding grouping --- '''DO''' loops and '''DO''' groups, &nbsp; '''SELECT''' groups (aka '''CASE'''), &nbsp; and mostly, &nbsp; nested '''DO''' loops. &nbsp; Also, sometimes when the logic was hard to follow, &nbsp; for instance, &nbsp; '''IF ---&nbsp;THEN;&nbsp;---ELSE''' &nbsp; clauses. &nbsp; I also like to eschew Egyptian indentation for '''DO''' groups and have the statements and '''END''' statement match the "start" of the '''DO''' group. &nbsp; However, the one thing that I don't mind extending (width-wise) is '''data''', &nbsp; there is nothing complicated about widening imbedded data within source code, &nbsp; but when there is a "largish" amount of data, &nbsp; I prefer to have that data in an external file and simply read in the data. &nbsp; Some data would make sense in bringing it in-line, &nbsp; such as almost never-changing data, &nbsp; like US state names, &nbsp; state abbreviations and capitals, &nbsp; a list of the periodic table of the elements, &nbsp;---&nbsp;although the latter does get updated from time-to-time. &nbsp; And Rhode Island citizens &nbsp;''did''&nbsp; vote to change it's (official) state name &nbsp; (it used to be: &nbsp; Rhode Island and Providence Plantations, &nbsp; but I don't know when it will become official). &nbsp; &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 17:20, 7 February 2021 (UTC)