Megalextoria
Retro computing and gaming, sci-fi books, tv and movies and other geeky stuff.

Home » Digital Archaeology » Computer Arcana » Computer Folklore » Programmers Who Use Spaces Paid More
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Programmers Who Use Spaces Paid More [message #346883 is a reply to message #346869] Tue, 20 June 2017 15:32 Go to previous messageGo to next message
Peter Flass is currently offline  Peter Flass
Messages: 8375
Registered: December 2011
Karma: 0
Senior Member
Dan Espen <dan1espen@gmail.com> wrote:
> Peter Flass <peter_flass@yahoo.com> writes:
>
>> Dan Espen <dan1espen@gmail.com> wrote:
>>> Peter Flass <peter_flass@yahoo.com> writes:
>>>
>>>> Ahem A Rivet's Shot <steveo@eircom.net> wrote:
>>>> > On 19 Jun 2017 05:04:34 GMT
>>>> > Jorgen Grahn <grahn+nntp@snipabacken.se> wrote:
>>>> >
>>>> >> I've seen TABs being banned in several recent projects, because we
>>>> >> couldn't agree on how large they are[0]. They're also semi-banned in
>>>> >> Python, I think.
>>>> >
>>>> > It has been a long time since I've since a project/team/company
>>>> > coding standards document calling for anything other than n spaces for some
>>>> > value of n and banning tabs. Many places enforce the tab ban with
>>>> > pre-commit hooks.
>>>> >
>>>> >> [0] I think they're obviously 8, but IDEs seem to often set them to 4
>>>> >> by default.
>>>> >
>>>> > Therein lies a problem they should not be 8 or 4 or 57 or any
>>>> > other number, they should be jump to the next tab stop wherever it is set.
>>>> > Used that way they work, used any other way they tend to make a mess.
>>>> >
>>>>
>>>> The tab values should be stored with the program as metadata, which could
>>>> be interpreted by the editor when opening a file. They should also be
>>>> displayed as "tab line" so the programmer could see what the values are.
>>>
>>> Back at Bell Labs, we edited our S/360 source using Emacs on early
>>> versions of Unix. We inserted a "tabspec" comment in the source
>>> to set tabs where Assembler wanted them, something like:
>>>
>>> * <tabspec 10,16,40,72>
>>>
>>> Years later, and I mean almost 30 years later, the bulk of the
>>> Assembler source still contained the comment. Since Emacs
>>> no longer supported the comment and I was the only one editing
>>> HLASM source with Emacs I guess I was the only one qualified
>>> to know it was okay to remove the comment.
>>>
>>> Not sure if you meant comment when you said metadata, but
>>> a comment is clearly the ideal way to solve the issue since it
>>> meets all your requirements.
>>
>> Right, probably preferred. Why don't more editors support this? Nedit gives
>> you the choice of real or emulated tabs, and lets you set the positions.
>> All that's needed would be to interpret the tabspec. Extended attributes
>> would be an alternative method.
>
> Nedit seems to be in a maintenance only state.
> Suggest you try something else.

I'd like to do a Rexx interface to Nedit, then it could be made to so
anything.

>
> Emacs, of course, supports WAY more than just comments for
> setting tabs. One of my favorites is the compile command.
> Great when you can't remember how to test something:
>
> # Local Variables:
> # compile-command: "./s1.py -name test ~/.store/test.data" */
> # End:
>
> I have that bound to F1, so, make changes, hit F1, then return.
> Emacs asks "save changes y/n". It's idiot proof, something
> I've learned to value. I hate running tests when I forgot to
> save my changes.
>



--
Pete
Re: Programmers Who Use Spaces Paid More [message #346884 is a reply to message #346880] Tue, 20 June 2017 15:52 Go to previous messageGo to next message
Charlie Gibbs is currently offline  Charlie Gibbs
Messages: 5313
Registered: January 2012
Karma: 0
Senior Member
On 2017-06-20, Bob Eager <news0006@eager.cx> wrote:

> On Tue, 20 Jun 2017 09:59:13 -0400, Dan Espen wrote:
>
>> Richard Thiebaud <thiebauddick2@aol.com> writes:
>>
>>> On 06/20/2017 07:59 AM, jmfbahciv wrote:
>>>
>>>> Scott Lurndal wrote:
>>>>
>>>> > Huge <Huge@nowhere.much.invalid> writes:
>>>> >
>>>> >> On 2017-06-19, Scott Lurndal <scott@slp53.sl.home> wrote:
>>>> >>
>>>> >>> Charles Richmond <numerist@aquaporin4.com> writes:
>>>> >>>
>>>> >>>> A survey conducted by the Stack Overflow web forum folks found
>>>> >>>> that programmers who use spaces instead of tabs make considerably
>>>> >>>> *more* money!
>>>> >>>>
>>>> >>>> http://www.bbc.com/news/technology-40302410
>>>> >>>
>>>> >>> The methodology and conclusions of this study merit closer
>>>> >>> scrutiny.
>>>> >>
>>>> >> Original article at;
>>>> >>
>>>> >> https://stackoverflow.blog/2017/06/15/developers-use-spaces- make-money-use-tabs/
>>>> >
>>>> > As I said, the methodology and conclusions merit closer scrutiny. A
>>>> > stack-overflow reader self-selecting survey is not sufficient for the
>>>> > conclusions drawn. Correlation is not causation.
>>>>
>>>> One of the horrible things which happened at DEC in the 90s was that
>>>> programmers were evaluated based on the number of lines they wrote. If
>>>> the metric changed to number of characters they used in a program,
>>>> then spaces would be used intead of tabs. Personally, typing spaces
>>>> instead of a tab is a waste of productive time.
>>>
>>> How many spaces or tabs do you type in a day? I find it hard to believe
>>> that this adds up to significant time.
>>
>> Nobody types spaces instead of tabs. That's just nuts. You hit tab,
>> you get the right number of spaces.
>
> I agree. I've alwasy used tabs (except, for some strange reason, in REXX).
>
> I use standard tab stops (every 8). If the indentation goes too far, the
> program needs fixing.

Still, indenting 8 spaces per level introduces readability problems
of its own. (IMHO, YMMV, IANAL, LS/MFT...)

I prefer 4 spaces per level. However, this introduces problems of its
own when using tabs, and I've wound up with a horrible mix of spaces
and tabs. I hate it - but at least my code looks the same everywhere.

Still, those vim options mentioned elsewhere sound like they might be
useful. I could get rid of tab characters in my source code while still
using the tab key to indent, and if Stack Overflow is right I can get
ready for a new life of higher pay.

At least on Linux. Wait, there's a version of vim for Windows too?
That might be the excuse I need to get rid of Notepad, and be able
to jump to a paired brace on a Windoze box. Now if only vim could
do a GUI-style cut and paste on the few occasions I can use it...
or maybe there's a shortcut so that I don't have to count lines
before saying something like "47dd".

--
/~\ cgibbs@kltpzyxm.invalid (Charlie Gibbs)
\ / I'm really at ac.dekanfrus if you read it the right way.
X Top-posted messages will probably be ignored. See RFC1855.
/ \ HTML will DEFINITELY be ignored. Join the ASCII ribbon campaign!
Re: Programmers Who Use Spaces Paid More [message #346885 is a reply to message #346884] Tue, 20 June 2017 16:12 Go to previous messageGo to next message
scott is currently offline  scott
Messages: 4237
Registered: February 2012
Karma: 0
Senior Member
Charlie Gibbs <cgibbs@kltpzyxm.invalid> writes:

>
> At least on Linux. Wait, there's a version of vim for Windows too?

Yup. Gvim, in particular would be interesting to you because...

> That might be the excuse I need to get rid of Notepad, and be able
> to jump to a paired brace on a Windoze box. Now if only vim could
> do a GUI-style cut and paste on the few occasions I can use it...

gvim supports standard cut-n-paste (on linux sans keyboard, on windows
using the standard keystrokes).

> or maybe there's a shortcut so that I don't have to count lines
> before saying something like "47dd".

Position the cursor at the first line.
mark the position (m followed by a single letter), example 'ma'.

then position to the last line to delete, and type

:'a,.d

You can also cut & paste that way:

:'a,.d

then position to new insertion point and type 'p' (or 'P') depending
on whether you want it before or after the current line. You
also yank it into a named register and keep it around for a while.

["x]y yank <motion> text [into register x].

:help yank
Re: Programmers Who Use Spaces Paid More [message #346886 is a reply to message #346861] Tue, 20 June 2017 16:22 Go to previous messageGo to next message
hancock4 is currently offline  hancock4
Messages: 6746
Registered: December 2011
Karma: 0
Senior Member
On Tuesday, June 20, 2017 at 8:00:29 AM UTC-4, jmfbahciv wrote:

> One of the horrible things which happened at DEC in the 90s was that
> programmers were evaluated based on the number of lines they wrote.
> If the metric changed to number of characters they used in a program,
> then spaces would be used intead of tabs. Personally, typing
> spaces instead of a tab is a waste of productive time.

We used to hear rumors of companies that did that sort of thing, but
it was so stupid no believed it was true. We used to joke about
how we could pad programs to puff up the line count.
Re: Programmers Who Use Spaces Paid More [message #346887 is a reply to message #346863] Tue, 20 June 2017 16:28 Go to previous messageGo to next message
hancock4 is currently offline  hancock4
Messages: 6746
Registered: December 2011
Karma: 0
Senior Member
On Tuesday, June 20, 2017 at 9:21:19 AM UTC-4, Dan Espen wrote:

> Back at Bell Labs, we edited our S/360 source using Emacs on early
> versions of Unix. We inserted a "tabspec" comment in the source
> to set tabs where Assembler wanted them, something like:
>
> * <tabspec 10,16,40,72>

The ADR ROSCOE editor used a similar feature. We could set it
to expedite typing in new COBOL source programs to keep things nicely
lined up in neat columns.

However, once a program was entered, then it wasn't as useful as
we liked to line up columns with whatever the existing program
did.

Our site did not have coding standards. But some sites were very
picky about where the PIC clause would be, the VALUE clause, etc.
Re: Programmers Who Use Spaces Paid More [message #346889 is a reply to message #346886] Tue, 20 June 2017 19:14 Go to previous messageGo to next message
Charlie Gibbs is currently offline  Charlie Gibbs
Messages: 5313
Registered: January 2012
Karma: 0
Senior Member
On 2017-06-20, hancock4@bbs.cpcn.com <hancock4@bbs.cpcn.com> wrote:

> On Tuesday, June 20, 2017 at 8:00:29 AM UTC-4, jmfbahciv wrote:
>
>> One of the horrible things which happened at DEC in the 90s was that
>> programmers were evaluated based on the number of lines they wrote.
>> If the metric changed to number of characters they used in a program,
>> then spaces would be used intead of tabs. Personally, typing
>> spaces instead of a tab is a waste of productive time.
>
> We used to hear rumors of companies that did that sort of thing, but
> it was so stupid no believed it was true. We used to joke about
> how we could pad programs to puff up the line count.

I keep a maintenance log at the start of each source module. After
25 years of heavy evolution (the more volatile programs change once
or twice a week), I've noticed that in some modules it's becoming a
significant percentage of the line count. But I still think it's a
Good Thing to have, and keeping it in the source module ensures that
it won't get lost.

--
/~\ cgibbs@kltpzyxm.invalid (Charlie Gibbs)
\ / I'm really at ac.dekanfrus if you read it the right way.
X Top-posted messages will probably be ignored. See RFC1855.
/ \ HTML will DEFINITELY be ignored. Join the ASCII ribbon campaign!
Re: Programmers Who Use Spaces Paid More [message #346890 is a reply to message #346885] Tue, 20 June 2017 19:14 Go to previous messageGo to next message
Charlie Gibbs is currently offline  Charlie Gibbs
Messages: 5313
Registered: January 2012
Karma: 0
Senior Member
On 2017-06-20, Scott Lurndal <scott@slp53.sl.home> wrote:

> Charlie Gibbs <cgibbs@kltpzyxm.invalid> writes:
>
>> At least on Linux. Wait, there's a version of vim for Windows too?
>
> Yup. Gvim, in particular would be interesting to you because...
>
>> That might be the excuse I need to get rid of Notepad, and be able
>> to jump to a paired brace on a Windoze box. Now if only vim could
>> do a GUI-style cut and paste on the few occasions I can use it...
>
> gvim supports standard cut-n-paste (on linux sans keyboard, on windows
> using the standard keystrokes).
>
>> or maybe there's a shortcut so that I don't have to count lines
>> before saying something like "47dd".
>
> Position the cursor at the first line.
> mark the position (m followed by a single letter), example 'ma'.
>
> then position to the last line to delete, and type
>
> :'a,.d
>
> You can also cut & paste that way:
>
> :'a,.d
>
> then position to new insertion point and type 'p' (or 'P') depending
> on whether you want it before or after the current line. You
> also yank it into a named register and keep it around for a while.
>
> ["x]y yank <motion> text [into register x].
>
> :help yank

Thanks the the hints. Looks like vi has come a long way since SysV.

--
/~\ cgibbs@kltpzyxm.invalid (Charlie Gibbs)
\ / I'm really at ac.dekanfrus if you read it the right way.
X Top-posted messages will probably be ignored. See RFC1855.
/ \ HTML will DEFINITELY be ignored. Join the ASCII ribbon campaign!
Re: Emacs (was: Programmers Who Use Spaces Paid More) [message #346891 is a reply to message #346882] Tue, 20 June 2017 19:41 Go to previous messageGo to next message
Rich Alderson is currently offline  Rich Alderson
Messages: 489
Registered: August 2012
Karma: 0
Senior Member
Andreas Kohlbach <ank@spamfence.net> writes:

> On Tue, 20 Jun 2017 09:21:16 -0400, Dan Espen wrote:

>> Back at Bell Labs, we edited our S/360 source using Emacs on early
>> versions of Unix. We inserted a "tabspec" comment in the source
>> to set tabs where Assembler wanted them, something like:

> | User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

> I notice you still using it (so do I).

> Did it change a lot from back of the S/350 days?

Emacs never ran on the System/360 line of computers, and could not run on
their modern follow-ons had Linux not been ported.

He said he ran on "early" Unix, but I dispute that description, since early
Unix could not have supported Emacs, either.

> I only know it since about 15 years and barely have scratched the tip of
> an iceberg.

I've been using EMACS (the original TECO based version for the PDP-10) for the
last 40 years, and Unix-based variants (most commonly the GNU version) for the
last 30.

There are still a lot of things to discover yet.

Old .sig file included the following 2 lines:

Rich Alderson Last LOTS Tops-20 Systems Programmer, 1984-1991
Current maintainer, MIT TECO EMACS (v. 170)

--
Rich Alderson news@alderson.users.panix.com
Audendum est, et veritas investiganda; quam etiamsi non assequamur,
omnino tamen proprius, quam nunc sumus, ad eam perveniemus.
--Galen
Re: Emacs (was: Programmers Who Use Spaces Paid More) [message #346892 is a reply to message #346891] Tue, 20 June 2017 20:52 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: J. Clarke

In article <mddlgom5isz.fsf@panix5.panix.com>,
news@alderson.users.panix.com says...
>
> Andreas Kohlbach <ank@spamfence.net> writes:
>
>> On Tue, 20 Jun 2017 09:21:16 -0400, Dan Espen wrote:
>
>>> Back at Bell Labs, we edited our S/360 source using Emacs on early
>>> versions of Unix. We inserted a "tabspec" comment in the source
>>> to set tabs where Assembler wanted them, something like:
>
>> | User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)
>
>> I notice you still using it (so do I).
>
>> Did it change a lot from back of the S/350 days?
>
> Emacs never ran on the System/360 line of computers, and could not run on
> their modern follow-ons had Linux not been ported.

Check again. Z/OS has been a certified UNIX for nearly 20 years.
Re: Programmers Who Use Spaces Paid More [message #346893 is a reply to message #346872] Tue, 20 June 2017 21:28 Go to previous messageGo to next message
Dan Espen is currently offline  Dan Espen
Messages: 3867
Registered: January 2012
Karma: 0
Senior Member
scott@slp53.sl.home (Scott Lurndal) writes:

> Dan Espen <dan1espen@gmail.com> writes:
>> Peter Flass <peter_flass@yahoo.com> writes:
>>
>>> Charles Richmond <numerist@aquaporin4.com> wrote:
>
>>>> The shift commands >> and << can shift *blocks* of lines. If the cursor
>>>> is on line 10, and ou type the command 5>> -- lines 10 through 14 will
>>>> all be shifted shiftwidth spaces to the right. Judicious use of this
>>>> can help you re-align indented code that is mis-aligned.
>>>
>>> This was one of my favorite features in ISPF.
>>
>> My thought too, but of course completely unnecessary if the editor
>> is smart enough to know what the correct indentation really is.
>> Just hit tab and the line is indented as it should be.
>> If it doesn't go where you think it should be, look for the
>> syntax error.
>
> I think you misunderstand. The '<' and '>' keys in vi/vim are
> often used when refactoring. Move a set of lines from
> indentation level (e.g. by marking the start and end with
> the markers 'a' and 'b' and marking the insertion point with
> 'c' then executing the vim command ":'a,'bmo'c"). After
> executing the command, one can use ':10<<' to shift the
> 10 lines moved starting at the cursor one tab stop to the left.
> Hit the '.' key to repeat it for however many tab stops
> one needs to unindent.

Not really.

Move the same block of code with Emacs then indent-region
with C-M-\.

The region is auto-magically the block of code you moved/copied.

Of course Emacs has a whole bunch of shift commands too.
I bind:

(define-key global-map [(f7)] 'open-rectangle)
(define-key global-map [(f8)] 'kill-rectangle)

and use them somewhat.

--
Dan Espen
Re: Programmers Who Use Spaces Paid More [message #346894 is a reply to message #346885] Tue, 20 June 2017 21:35 Go to previous messageGo to next message
Dan Espen is currently offline  Dan Espen
Messages: 3867
Registered: January 2012
Karma: 0
Senior Member
scott@slp53.sl.home (Scott Lurndal) writes:

> Charlie Gibbs <cgibbs@kltpzyxm.invalid> writes:
>
>>
>> At least on Linux. Wait, there's a version of vim for Windows too?
>
> Yup. Gvim, in particular would be interesting to you because...

Both Emacs and vim are available on Windows in terminals and
as GUIs.

Editing source code with Notepad?
Isn't there some law against that?
There should be.

I wonder what the Notepad programmers get paid?

--
Dan Espen
Re: Emacs [message #346895 is a reply to message #346891] Tue, 20 June 2017 21:43 Go to previous messageGo to next message
Dan Espen is currently offline  Dan Espen
Messages: 3867
Registered: January 2012
Karma: 0
Senior Member
Rich Alderson <news@alderson.users.panix.com> writes:

> Andreas Kohlbach <ank@spamfence.net> writes:
>
>> On Tue, 20 Jun 2017 09:21:16 -0400, Dan Espen wrote:
>
>>> Back at Bell Labs, we edited our S/360 source using Emacs on early
>>> versions of Unix. We inserted a "tabspec" comment in the source
>>> to set tabs where Assembler wanted them, something like:
>
>> | User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)
>
>> I notice you still using it (so do I).
>
>> Did it change a lot from back of the S/350 days?
>
> Emacs never ran on the System/360 line of computers, and could not run on
> their modern follow-ons had Linux not been ported.
>
> He said he ran on "early" Unix, but I dispute that description, since early
> Unix could not have supported Emacs, either.

That would be way earlier than I ever saw.
Used Montgomery Emacs in somewhere around '79.
Added support for Tektronix 4025 and a friend figured out
the Textronix 4014.

Certainly not a standard part of Unix, but who cared.

--
Dan Espen
Re: Emacs [message #346896 is a reply to message #346892] Tue, 20 June 2017 21:49 Go to previous messageGo to next message
Dan Espen is currently offline  Dan Espen
Messages: 3867
Registered: January 2012
Karma: 0
Senior Member
"J. Clarke" <j.clarke.873638@gmail.com> writes:

> In article <mddlgom5isz.fsf@panix5.panix.com>,
> news@alderson.users.panix.com says...
>>
>> Andreas Kohlbach <ank@spamfence.net> writes:
>>
>>> On Tue, 20 Jun 2017 09:21:16 -0400, Dan Espen wrote:
>>
>>>> Back at Bell Labs, we edited our S/360 source using Emacs on early
>>>> versions of Unix. We inserted a "tabspec" comment in the source
>>>> to set tabs where Assembler wanted them, something like:
>>
>>> | User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)
>>
>>> I notice you still using it (so do I).
>>
>>> Did it change a lot from back of the S/350 days?
>>
>> Emacs never ran on the System/360 line of computers, and could not run on
>> their modern follow-ons had Linux not been ported.
>
> Check again. Z/OS has been a certified UNIX for nearly 20 years.

More correct to say Emacs never ran on a 3270.
IBM claims to have working ports of X-Windows to S/360 but
S/360 has never been a friendly home to character at a time
terminals.

I've often wondered what a read AND write CCW would look like.
The CCW only allows for one data address. (Yes I know something
else would be required.)

Spent a lot of time getting various Async printers working
but as simple as those printers are, the S/360 wasn't happy.

--
Dan Espen
Re: Programmers Who Use Spaces Paid More [message #346897 is a reply to message #346883] Tue, 20 June 2017 21:51 Go to previous messageGo to next message
Dan Espen is currently offline  Dan Espen
Messages: 3867
Registered: January 2012
Karma: 0
Senior Member
Peter Flass <peter_flass@yahoo.com> writes:

> Dan Espen <dan1espen@gmail.com> wrote:
>> Peter Flass <peter_flass@yahoo.com> writes:
>>
>>> Dan Espen <dan1espen@gmail.com> wrote:
>>>> Peter Flass <peter_flass@yahoo.com> writes:
>>>>
>>>> > Ahem A Rivet's Shot <steveo@eircom.net> wrote:
>>>> >> On 19 Jun 2017 05:04:34 GMT
>>>> >> Jorgen Grahn <grahn+nntp@snipabacken.se> wrote:
>>>> >>
>>>> >>> I've seen TABs being banned in several recent projects, because we
>>>> >>> couldn't agree on how large they are[0]. They're also semi-banned in
>>>> >>> Python, I think.
>>>> >>
>>>> >> It has been a long time since I've since a project/team/company
>>>> >> coding standards document calling for anything other than n spaces for some
>>>> >> value of n and banning tabs. Many places enforce the tab ban with
>>>> >> pre-commit hooks.
>>>> >>
>>>> >>> [0] I think they're obviously 8, but IDEs seem to often set them to 4
>>>> >>> by default.
>>>> >>
>>>> >> Therein lies a problem they should not be 8 or 4 or 57 or any
>>>> >> other number, they should be jump to the next tab stop wherever it is set.
>>>> >> Used that way they work, used any other way they tend to make a mess.
>>>> >>
>>>> >
>>>> > The tab values should be stored with the program as metadata, which could
>>>> > be interpreted by the editor when opening a file. They should also be
>>>> > displayed as "tab line" so the programmer could see what the values are.
>>>>
>>>> Back at Bell Labs, we edited our S/360 source using Emacs on early
>>>> versions of Unix. We inserted a "tabspec" comment in the source
>>>> to set tabs where Assembler wanted them, something like:
>>>>
>>>> * <tabspec 10,16,40,72>
>>>>
>>>> Years later, and I mean almost 30 years later, the bulk of the
>>>> Assembler source still contained the comment. Since Emacs
>>>> no longer supported the comment and I was the only one editing
>>>> HLASM source with Emacs I guess I was the only one qualified
>>>> to know it was okay to remove the comment.
>>>>
>>>> Not sure if you meant comment when you said metadata, but
>>>> a comment is clearly the ideal way to solve the issue since it
>>>> meets all your requirements.
>>>
>>> Right, probably preferred. Why don't more editors support this? Nedit gives
>>> you the choice of real or emulated tabs, and lets you set the positions.
>>> All that's needed would be to interpret the tabspec. Extended attributes
>>> would be an alternative method.
>>
>> Nedit seems to be in a maintenance only state.
>> Suggest you try something else.
>
> I'd like to do a Rexx interface to Nedit, then it could be made to so
> anything.

I've messed with Nedit a bit. Shallow learning curve, but what's the
fun in that?

--
Dan Espen
Re: Programmers Who Use Spaces Paid More [message #346898 is a reply to message #346889] Tue, 20 June 2017 21:55 Go to previous messageGo to next message
Dan Espen is currently offline  Dan Espen
Messages: 3867
Registered: January 2012
Karma: 0
Senior Member
Charlie Gibbs <cgibbs@kltpzyxm.invalid> writes:

> On 2017-06-20, hancock4@bbs.cpcn.com <hancock4@bbs.cpcn.com> wrote:
>
>> On Tuesday, June 20, 2017 at 8:00:29 AM UTC-4, jmfbahciv wrote:
>>
>>> One of the horrible things which happened at DEC in the 90s was that
>>> programmers were evaluated based on the number of lines they wrote.
>>> If the metric changed to number of characters they used in a program,
>>> then spaces would be used intead of tabs. Personally, typing
>>> spaces instead of a tab is a waste of productive time.
>>
>> We used to hear rumors of companies that did that sort of thing, but
>> it was so stupid no believed it was true. We used to joke about
>> how we could pad programs to puff up the line count.
>
> I keep a maintenance log at the start of each source module. After
> 25 years of heavy evolution (the more volatile programs change once
> or twice a week), I've noticed that in some modules it's becoming a
> significant percentage of the line count. But I still think it's a
> Good Thing to have, and keeping it in the source module ensures that
> it won't get lost.

Then you'd like:

;; Add modification history to a file.
(defun mod-hist ()
"Create or add to the Modification History."
(interactive)
(goto-char (point-min))
(if (looking-at "#!") ;Skip #! line...
(forward-line))
(if (re-search-forward "[mM]odification [hH]istory" nil t)
(progn
(forward-line)
(end-of-line)
(newline))
(let ((beg (point))) ;no history header, insert one.
(insert "Modification History")
(newline)
(newline)
(comment-region beg (point))))
(let ((beg (point)))
(insert "Changed on "
(format-time-string "%m/%d/%y" (current-time))
" by "
(user-full-name) " (" (user-real-login-name) "):")
(newline)
(comment-region beg (point))))

(global-set-key "\C-cm" 'mod-hist) ;ctl-c m is mod-hist


I've had them get so big, I've gone back and done some trimming.

--
Dan Espen
Re: Emacs [message #346899 is a reply to message #346891] Tue, 20 June 2017 23:45 Go to previous messageGo to next message
Joe Pfeiffer is currently offline  Joe Pfeiffer
Messages: 764
Registered: January 2012
Karma: 0
Senior Member
Rich Alderson <news@alderson.users.panix.com> writes:

> Andreas Kohlbach <ank@spamfence.net> writes:
>
>> On Tue, 20 Jun 2017 09:21:16 -0400, Dan Espen wrote:
>
>>> Back at Bell Labs, we edited our S/360 source using Emacs on early
>>> versions of Unix. We inserted a "tabspec" comment in the source
>>> to set tabs where Assembler wanted them, something like:
>
>> | User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)
>
>> I notice you still using it (so do I).
>
>> Did it change a lot from back of the S/350 days?
>
> Emacs never ran on the System/360 line of computers, and could not run on
> their modern follow-ons had Linux not been ported.
>
> He said he ran on "early" Unix, but I dispute that description, since early
> Unix could not have supported Emacs, either.

How early to you mean? I first encountered Emacs in the late 1970s,
when it was still a set of Teco macros. That may have been BSD 4.1, but
I'm pretty sure it would have run under V7.

>> I only know it since about 15 years and barely have scratched the tip of
>> an iceberg.
>
> I've been using EMACS (the original TECO based version for the PDP-10) for the
> last 40 years, and Unix-based variants (most commonly the GNU version) for the
> last 30.
>
> There are still a lot of things to discover yet.
>
> Old .sig file included the following 2 lines:
>
> Rich Alderson Last LOTS Tops-20 Systems Programmer, 1984-1991
> Current maintainer, MIT TECO EMACS (v. 170)
Re: Programmers Who Use Spaces Paid More [message #346900 is a reply to message #346880] Wed, 21 June 2017 01:25 Go to previous messageGo to next message
Jorgen Grahn is currently offline  Jorgen Grahn
Messages: 606
Registered: March 2012
Karma: 0
Senior Member
On Tue, 2017-06-20, Bob Eager wrote:
> On Tue, 20 Jun 2017 09:59:13 -0400, Dan Espen wrote:
>
>> Richard Thiebaud <thiebauddick2@aol.com> writes:
>>
>>> On 06/20/2017 07:59 AM, jmfbahciv wrote:
....
>>>> One of the horrible things which happened at DEC in the 90s was that
>>>> programmers were evaluated based on the number of lines they wrote. If
>>>> the metric changed to number of characters they used in a program,
>>>> then spaces would be used intead of tabs. Personally, typing spaces
>>>> instead of a tab is a waste of productive time.
>>>>
>>>> /BAH
>>>>
>>> How many spaces or tabs do you type in a day? I find it hard to believe
>>> that this adds up to significant time.
>>
>> Nobody types spaces instead of tabs. That's just nuts. You hit tab,
>> you get the right number of spaces.
>
> I agree. I've alwasy used tabs (except, for some strange reason, in REXX).
>
> I use standard tab stops (every 8). If the indentation goes too far, the
> program needs fixing.

I think Dan meant that your text editor translates the TAB key into
indentation, based on knowledge about the file type your editing.
(And inserts indentation when you press ENTER, and so on.)

That's useful even if you indent with TAB characters (although with
Emacs at least, I find it difficult not to end up with a mix of spaces
and TABs).

/Jorgen

--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .
Re: Programmers Who Use Spaces Paid More [message #346901 is a reply to message #346884] Wed, 21 June 2017 01:12 Go to previous messageGo to next message
Ahem A Rivet's Shot is currently offline  Ahem A Rivet's Shot
Messages: 4843
Registered: January 2012
Karma: 0
Senior Member
On 20 Jun 2017 19:52:49 GMT
Charlie Gibbs <cgibbs@kltpzyxm.invalid> wrote:

> I prefer 4 spaces per level. However, this introduces problems of its
> own when using tabs, and I've wound up with a horrible mix of spaces
> and tabs. I hate it - but at least my code looks the same everywhere.

If you have a mix of tabs and spaces your code won't look the same
everywhere - the minute I import it into an editor with tabs set at 7
spaces or 3/4" or 1cm or at 0.5i, 1i, 1.25i, 1.5i, 11i - it will mess up.

There is one and only one way to use tabs reliably in code. One
tab, one level of indentation and NO OTHER USE OF TABS ANYWHERE. Then you
can display the code with tab stops set any way you like and it all lines
up perfectly - if the indentation gets to 30 levels set the tab stops to
1mm and away you go. You can even print the code in a proportional font!

--
Steve O'Hara-Smith | Directable Mirror Arrays
C:>WIN | A better way to focus the sun
The computer obeys and wins. | licences available see
You lose and Bill collects. | http://www.sohara.org/
Re: Programmers Who Use Spaces Paid More [message #346902 is a reply to message #346890] Wed, 21 June 2017 02:17 Go to previous messageGo to next message
Jorgen Grahn is currently offline  Jorgen Grahn
Messages: 606
Registered: March 2012
Karma: 0
Senior Member
On Tue, 2017-06-20, Charlie Gibbs wrote:
> On 2017-06-20, Scott Lurndal <scott@slp53.sl.home> wrote:
....
>> then position to new insertion point and type 'p' (or 'P') depending
>> on whether you want it before or after the current line. You
>> also yank it into a named register and keep it around for a while.
>>
>> ["x]y yank <motion> text [into register x].
>>
>> :help yank
>
> Thanks the the hints. Looks like vi has come a long way since SysV.

Based on what colleagues do with vim, yes it has. (I'm an Emacs user
myself, so I only use vi for sysadmin tasks.)

/Jorgen

--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .
Re: Programmers Who Use Spaces Paid More [message #346903 is a reply to message #346866] Wed, 21 June 2017 02:25 Go to previous messageGo to next message
Jorgen Grahn is currently offline  Jorgen Grahn
Messages: 606
Registered: March 2012
Karma: 0
Senior Member
On Tue, 2017-06-20, Peter Flass wrote:
> Dan Espen <dan1espen@gmail.com> wrote:
>> Peter Flass <peter_flass@yahoo.com> writes:
>>
>>> Ahem A Rivet's Shot <steveo@eircom.net> wrote:
>>>> On 19 Jun 2017 05:04:34 GMT
>>>> Jorgen Grahn <grahn+nntp@snipabacken.se> wrote:
>>>>
>>>> > I've seen TABs being banned in several recent projects, because we
>>>> > couldn't agree on how large they are[0]. They're also semi-banned in
>>>> > Python, I think.
>>>>
>>>> It has been a long time since I've since a project/team/company
>>>> coding standards document calling for anything other than n spaces for some
>>>> value of n and banning tabs. Many places enforce the tab ban with
>>>> pre-commit hooks.
>>>>
>>>> > [0] I think they're obviously 8, but IDEs seem to often set them to 4
>>>> > by default.
>>>>
>>>> Therein lies a problem they should not be 8 or 4 or 57 or any
>>>> other number, they should be jump to the next tab stop wherever it is set.
>>>> Used that way they work, used any other way they tend to make a mess.
>>>>
>>>
>>> The tab values should be stored with the program as metadata, which could
>>> be interpreted by the editor when opening a file. They should also be
>>> displayed as "tab line" so the programmer could see what the values are.
>>
>> Back at Bell Labs, we edited our S/360 source using Emacs on early
>> versions of Unix. We inserted a "tabspec" comment in the source
>> to set tabs where Assembler wanted them, something like:
>>
>> * <tabspec 10,16,40,72>
>>
>> Years later, and I mean almost 30 years later, the bulk of the
>> Assembler source still contained the comment. Since Emacs
>> no longer supported the comment and I was the only one editing
>> HLASM source with Emacs I guess I was the only one qualified
>> to know it was okay to remove the comment.
>>
>> Not sure if you meant comment when you said metadata, but
>> a comment is clearly the ideal way to solve the issue since it
>> meets all your requirements.
>
> Right, probably preferred. Why don't more editors support this?

Because of what Charlie Gibbs wrote elsewhere in the thread: then
you'd want terminals, printers and so on to support it too, or be
inclined to do almost all of your work from inside the editor. It'd
slowly turn into an IDE, or a word processor.

I see these markers now and then, in the form of vi (vim?) "ts:4"
markers. I was only vaguely aware of Emacs having something similar.

/Jorgen

--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .
Re: Programmers Who Use Spaces Paid More [message #346904 is a reply to message #346865] Wed, 21 June 2017 03:14 Go to previous messageGo to next message
Ahem A Rivet's Shot is currently offline  Ahem A Rivet's Shot
Messages: 4843
Registered: January 2012
Karma: 0
Senior Member
On Tue, 20 Jun 2017 09:59:13 -0400
Dan Espen <dan1espen@gmail.com> wrote:

> Nobody types spaces instead of tabs. That's just nuts. You hit tab,
> you get the right number of spaces.

That depends on editor settings - you might get enough spaces to
move the cursor to the next tab stop or you might get a tab character. At
work I have the former in most languages and the latter in some, at home the
latter always - same editor different preferences file (the work one is
complex and embeds site conventions for all sorts of things).

--
Steve O'Hara-Smith | Directable Mirror Arrays
C:>WIN | A better way to focus the sun
The computer obeys and wins. | licences available see
You lose and Bill collects. | http://www.sohara.org/
Re: Emacs [message #346905 is a reply to message #346895] Wed, 21 June 2017 03:33 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: Bob Eager

On Tue, 20 Jun 2017 21:43:41 -0400, Dan Espen wrote:

> Rich Alderson <news@alderson.users.panix.com> writes:
>
>> Andreas Kohlbach <ank@spamfence.net> writes:
>>
>>> On Tue, 20 Jun 2017 09:21:16 -0400, Dan Espen wrote:
>>
>>>> Back at Bell Labs, we edited our S/360 source using Emacs on early
>>>> versions of Unix. We inserted a "tabspec" comment in the source to
>>>> set tabs where Assembler wanted them, something like:
>>
>>> | User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)
>>
>>> I notice you still using it (so do I).
>>
>>> Did it change a lot from back of the S/350 days?
>>
>> Emacs never ran on the System/360 line of computers, and could not run
>> on their modern follow-ons had Linux not been ported.
>>
>> He said he ran on "early" Unix, but I dispute that description, since
>> early Unix could not have supported Emacs, either.
>
> That would be way earlier than I ever saw.

I started using UNIX in 1975. No support for screens at that point, nit
until around 1977.



--
Using UNIX since v6 (1975)...

Use the BIG mirror service in the UK:
http://www.mirrorservice.org
Re: Programmers Who Use Spaces Paid More [message #346906 is a reply to message #346900] Wed, 21 June 2017 07:00 Go to previous messageGo to next message
Dan Espen is currently offline  Dan Espen
Messages: 3867
Registered: January 2012
Karma: 0
Senior Member
Jorgen Grahn <grahn+nntp@snipabacken.se> writes:

> On Tue, 2017-06-20, Bob Eager wrote:
>> On Tue, 20 Jun 2017 09:59:13 -0400, Dan Espen wrote:
>>
>>> Richard Thiebaud <thiebauddick2@aol.com> writes:
>>>
>>>> On 06/20/2017 07:59 AM, jmfbahciv wrote:
> ...
>>>> > One of the horrible things which happened at DEC in the 90s was that
>>>> > programmers were evaluated based on the number of lines they wrote. If
>>>> > the metric changed to number of characters they used in a program,
>>>> > then spaces would be used intead of tabs. Personally, typing spaces
>>>> > instead of a tab is a waste of productive time.
>>>> >
>>>> > /BAH
>>>> >
>>>> How many spaces or tabs do you type in a day? I find it hard to believe
>>>> that this adds up to significant time.
>>>
>>> Nobody types spaces instead of tabs. That's just nuts. You hit tab,
>>> you get the right number of spaces.
>>
>> I agree. I've alwasy used tabs (except, for some strange reason, in REXX).
>>
>> I use standard tab stops (every 8). If the indentation goes too far, the
>> program needs fixing.
>
> I think Dan meant that your text editor translates the TAB key into
> indentation, based on knowledge about the file type your editing.

Yes, in many Emacs modes, the tab key is
NOT bound to "self-insert-command".
Instead it is bound to indent-for-tab-command.

> (And inserts indentation when you press ENTER, and so on.)

Enter (ret) would be controlled by "electric-indent-mode" which I am not
that enamored of and mostly disable. I had it active on semi-colon for
a while, but couldn't adapt.

> That's useful even if you indent with TAB characters (although with
> Emacs at least, I find it difficult not to end up with a mix of spaces
> and TABs).

You should not get a mix if you don't want to.
In my .emacs c-mode-hook:

(setq indent-tabs-mode nil) # No tabs

Whereas, the fvwm project currently likes real tabs so
in the fvwm source tree I have a .dir-locals.el file containing:

((nil . ((indent-tabs-mode . t)
(fill-column . 80)))
(c-mode . ((c-basic-offset . 8)
(c-indent-level . 8)
(indent-tabs-mode . t))))

The doc string for indent-tabs-mode:

Documentation:
Indentation can insert tabs if this is non-nil.

You can _customize_ this variable.

So, you can set behavior globally for a language or
in a directory for a project or in a single file.

You can also arrange to have existing tabs removed or
used globally by messing with hooks:

https://www.emacswiki.org/emacs/UntabifyUponSave


--
Dan Espen
Re: Programmers Who Use Spaces Paid More [message #346907 is a reply to message #346901] Wed, 21 June 2017 07:01 Go to previous messageGo to next message
Dan Espen is currently offline  Dan Espen
Messages: 3867
Registered: January 2012
Karma: 0
Senior Member
Ahem A Rivet's Shot <steveo@eircom.net> writes:

> On 20 Jun 2017 19:52:49 GMT
> Charlie Gibbs <cgibbs@kltpzyxm.invalid> wrote:
>
>> I prefer 4 spaces per level. However, this introduces problems of its
>> own when using tabs, and I've wound up with a horrible mix of spaces
>> and tabs. I hate it - but at least my code looks the same everywhere.
>
> If you have a mix of tabs and spaces your code won't look the same
> everywhere - the minute I import it into an editor with tabs set at 7
> spaces or 3/4" or 1cm or at 0.5i, 1i, 1.25i, 1.5i, 11i - it will mess up.
>
> There is one and only one way to use tabs reliably in code. One
> tab, one level of indentation and NO OTHER USE OF TABS ANYWHERE. Then you
> can display the code with tab stops set any way you like and it all lines
> up perfectly - if the indentation gets to 30 levels set the tab stops to
> 1mm and away you go. You can even print the code in a proportional font!

There are actually 2 ways.

All tabs, or no tabs and all spaces.

--
Dan Espen
Re: Emacs [message #346908 is a reply to message #346905] Wed, 21 June 2017 07:08 Go to previous messageGo to next message
Dan Espen is currently offline  Dan Espen
Messages: 3867
Registered: January 2012
Karma: 0
Senior Member
Bob Eager <news0006@eager.cx> writes:

> On Tue, 20 Jun 2017 21:43:41 -0400, Dan Espen wrote:
>
>> Rich Alderson <news@alderson.users.panix.com> writes:
>>
>>> Andreas Kohlbach <ank@spamfence.net> writes:
>>>
>>>> On Tue, 20 Jun 2017 09:21:16 -0400, Dan Espen wrote:
>>>
>>>> > Back at Bell Labs, we edited our S/360 source using Emacs on early
>>>> > versions of Unix. We inserted a "tabspec" comment in the source to
>>>> > set tabs where Assembler wanted them, something like:
>>>
>>>> | User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)
>>>
>>>> I notice you still using it (so do I).
>>>
>>>> Did it change a lot from back of the S/350 days?
>>>
>>> Emacs never ran on the System/360 line of computers, and could not run
>>> on their modern follow-ons had Linux not been ported.
>>>
>>> He said he ran on "early" Unix, but I dispute that description, since
>>> early Unix could not have supported Emacs, either.
>>
>> That would be way earlier than I ever saw.
>
> I started using UNIX in 1975. No support for screens at that point, nit
> until around 1977.

Support for screens...
Do you mean no raw mode?
A quick look doesn't give me any dates.

'77 is way back there. I was on some other project still working in NYC.

--
Dan Espen
Re: Emacs [message #346909 is a reply to message #346908] Wed, 21 June 2017 07:35 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: Bob Eager

On Wed, 21 Jun 2017 07:08:55 -0400, Dan Espen wrote:

> Bob Eager <news0006@eager.cx> writes:
>
>> On Tue, 20 Jun 2017 21:43:41 -0400, Dan Espen wrote:
>>
>>> Rich Alderson <news@alderson.users.panix.com> writes:
>>>
>>>> Andreas Kohlbach <ank@spamfence.net> writes:
>>>>
>>>> > On Tue, 20 Jun 2017 09:21:16 -0400, Dan Espen wrote:
>>>>
>>>> >> Back at Bell Labs, we edited our S/360 source using Emacs on early
>>>> >> versions of Unix. We inserted a "tabspec" comment in the source to
>>>> >> set tabs where Assembler wanted them, something like:
>>>>
>>>> > | User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)
>>>>
>>>> > I notice you still using it (so do I).
>>>>
>>>> > Did it change a lot from back of the S/350 days?
>>>>
>>>> Emacs never ran on the System/360 line of computers, and could not
>>>> run on their modern follow-ons had Linux not been ported.
>>>>
>>>> He said he ran on "early" Unix, but I dispute that description, since
>>>> early Unix could not have supported Emacs, either.
>>>
>>> That would be way earlier than I ever saw.
>>
>> I started using UNIX in 1975. No support for screens at that point, nit
>> until around 1977.
>
> Support for screens...
> Do you mean no raw mode?
> A quick look doesn't give me any dates.
>
> '77 is way back there. I was on some other project still working in
> NYC.

No, I was thinking of termcap.

vi didn't arrive in 1975. ex (which was really vi) appeared some time in
1976.

I started with ed. Still use it sometimes!
--
Using UNIX since v6 (1975)...

Use the BIG mirror service in the UK:
http://www.mirrorservice.org
Re: Programmers Who Use Spaces Paid More [message #346913 is a reply to message #346889] Tue, 20 June 2017 22:03 Go to previous messageGo to next message
hancock4 is currently offline  hancock4
Messages: 6746
Registered: December 2011
Karma: 0
Senior Member
On Tuesday, June 20, 2017 at 7:14:43 PM UTC-4, Charlie Gibbs wrote:

> I keep a maintenance log at the start of each source module. After
> 25 years of heavy evolution (the more volatile programs change once
> or twice a week), I've noticed that in some modules it's becoming a
> significant percentage of the line count. But I still think it's a
> Good Thing to have, and keeping it in the source module ensures that
> it won't get lost.

Yes, that's an excellent idea.

Sometimes you'll even find it necessary to check something way back in
that full log and having the info will be helpful. It could explain
why someone made a particular change and what they did, or even something
you did years ago and forgot about.

Sometimes you'll learn something that will suggest double checking with
the client to see if their current request is really desired, because
of sommething already done in the past that was taken out later.
Re: Emacs [message #346915 is a reply to message #346896] Wed, 21 June 2017 08:36 Go to previous messageGo to next message
scott is currently offline  scott
Messages: 4237
Registered: February 2012
Karma: 0
Senior Member
Dan Espen <dan1espen@gmail.com> writes:


>
> I've often wondered what a read AND write CCW would look like.
> The CCW only allows for one data address. (Yes I know something
> else would be required.)
>

The Burroughs I/O controls (DLPs) that interfaced to
datacomm stations used 'write-flip-read' operations
with a single data address. The "ccw" (burroughs
were _much_ higher level ops) would first write from
the data address until the ETX character was transmitted,
then would read (up to ETX and/or an optional timeout)
into the data byte following the last character (the ETX) transmitted.

These were for block-mode stations on either a poll-select (multidrop)
or peer-to-peer line.
Re: Programmers Who Use Spaces Paid More [message #346916 is a reply to message #346886] Wed, 21 June 2017 08:47 Go to previous messageGo to next message
jmfbahciv is currently offline  jmfbahciv
Messages: 6173
Registered: March 2012
Karma: 0
Senior Member
hancock4@bbs.cpcn.com wrote:
> On Tuesday, June 20, 2017 at 8:00:29 AM UTC-4, jmfbahciv wrote:
>
>> One of the horrible things which happened at DEC in the 90s was that
>> programmers were evaluated based on the number of lines they wrote.
>> If the metric changed to number of characters they used in a program,
>> then spaces would be used intead of tabs. Personally, typing
>> spaces instead of a tab is a waste of productive time.
>
> We used to hear rumors of companies that did that sort of thing, but
> it was so stupid no believed it was true. We used to joke about
> how we could pad programs to puff up the line count.

Note that the code typed in didn't have to work. Previously, we were
evaluated on how much useful work we had accomplished.

We were also able to just sit and stare out the window while thinking.
Most of our projects required a lot of thinking before we wrote the
first line of the project plan. I was told that the later DEC
had supervisors checking to see if programmers were typing. If they
were not, they were called on the carpet.

/BAH
Re: Programmers Who Use Spaces Paid More [message #346917 is a reply to message #346862] Wed, 21 June 2017 08:47 Go to previous messageGo to next message
jmfbahciv is currently offline  jmfbahciv
Messages: 6173
Registered: March 2012
Karma: 0
Senior Member
Richard Thiebaud wrote:
> On 06/20/2017 07:59 AM, jmfbahciv wrote:
>> Scott Lurndal wrote:
>>> Huge <Huge@nowhere.much.invalid> writes:
>>>> On 2017-06-19, Scott Lurndal <scott@slp53.sl.home> wrote:
>>>> > Charles Richmond <numerist@aquaporin4.com> writes:
>>>> >> A survey conducted by the Stack Overflow web forum folks found that
>>>> >> programmers who use spaces instead of tabs make considerably *more*
money!
>>>> >>
>>>> >> http://www.bbc.com/news/technology-40302410
>>>> >>
>>>> >
>>>> > The methodology and conclusions of this study merit closer scrutiny.
>>>>
>>>> Original article at;
>>>>
>>>>
https://stackoverflow.blog/2017/06/15/developers-use-spaces- make-money-use-t
>> abs/
>>>>
>>>
>>> As I said, the methodology and conclusions merit closer scrutiny. A
>>> stack-overflow reader self-selecting survey is not sufficient for the
>> conclusions
>>> drawn. Correlation is not causation.
>>
>> One of the horrible things which happened at DEC in the 90s was that
>> programmers were evaluated based on the number of lines they wrote.
>> If the metric changed to number of characters they used in a program,
>> then spaces would be used intead of tabs. Personally, typing
>> spaces instead of a tab is a waste of productive time.
>>
>> /BAH
>>
> How many spaces or tabs do you type in a day? I find it hard to believe
> that this adds up to significant time.

Just counting to left-justify reduces the ability to think about what one
is typing. In my environment, I typed more tabs than spaces when coding
and debugging.

/BAH
Re: Programmers Who Use Spaces Paid More [message #346918 is a reply to message #346889] Wed, 21 June 2017 08:47 Go to previous messageGo to next message
jmfbahciv is currently offline  jmfbahciv
Messages: 6173
Registered: March 2012
Karma: 0
Senior Member
Charlie Gibbs wrote:
> On 2017-06-20, hancock4@bbs.cpcn.com <hancock4@bbs.cpcn.com> wrote:
>
>> On Tuesday, June 20, 2017 at 8:00:29 AM UTC-4, jmfbahciv wrote:
>>
>>> One of the horrible things which happened at DEC in the 90s was that
>>> programmers were evaluated based on the number of lines they wrote.
>>> If the metric changed to number of characters they used in a program,
>>> then spaces would be used intead of tabs. Personally, typing
>>> spaces instead of a tab is a waste of productive time.
>>
>> We used to hear rumors of companies that did that sort of thing, but
>> it was so stupid no believed it was true. We used to joke about
>> how we could pad programs to puff up the line count.
>
> I keep a maintenance log at the start of each source module. After
> 25 years of heavy evolution (the more volatile programs change once
> or twice a week), I've noticed that in some modules it's becoming a
> significant percentage of the line count. But I still think it's a
> Good Thing to have, and keeping it in the source module ensures that
> it won't get lost.
>
If you look at any PDP-10 non-monitor listing, you will find an
edit history. The edit history of the monitor was kept on paper
and the ones marked as publishable were typed in machine language
and put into the nnn.MCO file where nnn was the monitor version number
being released.

/BAH
Re: Programmers Who Use Spaces Paid More [message #346919 is a reply to message #346862] Wed, 21 June 2017 08:47 Go to previous messageGo to next message
jmfbahciv is currently offline  jmfbahciv
Messages: 6173
Registered: March 2012
Karma: 0
Senior Member
Richard Thiebaud wrote:
> On 06/20/2017 07:59 AM, jmfbahciv wrote:
>> Scott Lurndal wrote:
>>> Huge <Huge@nowhere.much.invalid> writes:
>>>> On 2017-06-19, Scott Lurndal <scott@slp53.sl.home> wrote:
>>>> > Charles Richmond <numerist@aquaporin4.com> writes:
>>>> >> A survey conducted by the Stack Overflow web forum folks found that
>>>> >> programmers who use spaces instead of tabs make considerably *more*
money!
>>>> >>
>>>> >> http://www.bbc.com/news/technology-40302410
>>>> >>
>>>> >
>>>> > The methodology and conclusions of this study merit closer scrutiny.
>>>>
>>>> Original article at;
>>>>
>>>>
https://stackoverflow.blog/2017/06/15/developers-use-spaces- make-money-use-t
>> abs/
>>>>
>>>
>>> As I said, the methodology and conclusions merit closer scrutiny. A
>>> stack-overflow reader self-selecting survey is not sufficient for the
>> conclusions
>>> drawn. Correlation is not causation.
>>
>> One of the horrible things which happened at DEC in the 90s was that
>> programmers were evaluated based on the number of lines they wrote.
>> If the metric changed to number of characters they used in a program,
>> then spaces would be used intead of tabs. Personally, typing
>> spaces instead of a tab is a waste of productive time.
>>
>> /BAH
>>
> How many spaces or tabs do you type in a day? I find it hard to believe
> that this adds up to significant time.

A line of code in my shop would be:

label:<tab>opcode<tab>arg,arg<1 or 2 tab>;comment

In addition, a tab character instead of 8 spaces saves disk and tape space.
You people have forgotten that distribution and storage was not infinite. :-)

/BAH
Re: Programmers Who Use Spaces Paid More [message #346920 is a reply to message #346889] Wed, 21 June 2017 08:47 Go to previous messageGo to next message
jmfbahciv is currently offline  jmfbahciv
Messages: 6173
Registered: March 2012
Karma: 0
Senior Member
Charlie Gibbs wrote:
> On 2017-06-20, hancock4@bbs.cpcn.com <hancock4@bbs.cpcn.com> wrote:
>
>> On Tuesday, June 20, 2017 at 8:00:29 AM UTC-4, jmfbahciv wrote:
>>
>>> One of the horrible things which happened at DEC in the 90s was that
>>> programmers were evaluated based on the number of lines they wrote.
>>> If the metric changed to number of characters they used in a program,
>>> then spaces would be used intead of tabs. Personally, typing
>>> spaces instead of a tab is a waste of productive time.
>>
>> We used to hear rumors of companies that did that sort of thing, but
>> it was so stupid no believed it was true. We used to joke about
>> how we could pad programs to puff up the line count.
>
> I keep a maintenance log at the start of each source module. After
> 25 years of heavy evolution (the more volatile programs change once
> or twice a week), I've noticed that in some modules it's becoming a
> significant percentage of the line count. But I still think it's a
> Good Thing to have, and keeping it in the source module ensures that
> it won't get lost.
>
Perhaps I should have qualified my comment. Lines of code is not
the same as lines of comments. What makes this flavor of metric
to evaluate performance is that it has nothing to do with the
acutal work and would only apply to modules which had never existed.
But, apparently, that wasn't considered. In addition, how would
the productivity involving deleting blocks of code be assessed?

It was just plain stupid. Instead of concentrating on making the
project work, half of the brain energy would have had to be used
on Big Brother. I'd have changed to the shift 0:00 to 08:00
after 3 days of that kind of management.

/BAH
Re: Programmers Who Use Spaces Paid More [message #346922 is a reply to message #346907] Wed, 21 June 2017 09:05 Go to previous messageGo to next message
Ahem A Rivet's Shot is currently offline  Ahem A Rivet's Shot
Messages: 4843
Registered: January 2012
Karma: 0
Senior Member
On Wed, 21 Jun 2017 07:01:53 -0400
Dan Espen <dan1espen@gmail.com> wrote:

> Ahem A Rivet's Shot <steveo@eircom.net> writes:
>
>> On 20 Jun 2017 19:52:49 GMT
>> Charlie Gibbs <cgibbs@kltpzyxm.invalid> wrote:
>>
>>> I prefer 4 spaces per level. However, this introduces problems of its
>>> own when using tabs, and I've wound up with a horrible mix of spaces
>>> and tabs. I hate it - but at least my code looks the same everywhere.
>>
>> If you have a mix of tabs and spaces your code won't look the
>> same everywhere - the minute I import it into an editor with tabs set
>> at 7 spaces or 3/4" or 1cm or at 0.5i, 1i, 1.25i, 1.5i, 11i - it will
>> mess up.
>>
>> There is one and only one way to use tabs reliably in code. One
>> tab, one level of indentation and NO OTHER USE OF TABS ANYWHERE. Then
>> you can display the code with tab stops set any way you like and it all
>> lines up perfectly - if the indentation gets to 30 levels set the tab
>> stops to 1mm and away you go. You can even print the code in a
>> proportional font!
>
> There are actually 2 ways.
>
> All tabs, or no tabs and all spaces.

The second one does not count as a use of tabs </pedant>

--
Steve O'Hara-Smith | Directable Mirror Arrays
C:>WIN | A better way to focus the sun
The computer obeys and wins. | licences available see
You lose and Bill collects. | http://www.sohara.org/
Re: Programmers Who Use Spaces Paid More [message #346923 is a reply to message #346916] Wed, 21 June 2017 09:09 Go to previous messageGo to next message
Ahem A Rivet's Shot is currently offline  Ahem A Rivet's Shot
Messages: 4843
Registered: January 2012
Karma: 0
Senior Member
On 21 Jun 2017 12:47:27 GMT
jmfbahciv <See.above@aol.com> wrote:

> hancock4@bbs.cpcn.com wrote:
>> On Tuesday, June 20, 2017 at 8:00:29 AM UTC-4, jmfbahciv wrote:
>>
>>> One of the horrible things which happened at DEC in the 90s was that
>>> programmers were evaluated based on the number of lines they wrote.

Yep that's daft - I often improve programs by removing code and
generally reducing the line count.

>>> If the metric changed to number of characters they used in a program,
>>> then spaces would be used intead of tabs. Personally, typing
>>> spaces instead of a tab is a waste of productive time.
>>
>> We used to hear rumors of companies that did that sort of thing, but
>> it was so stupid no believed it was true. We used to joke about
>> how we could pad programs to puff up the line count.
>
> Note that the code typed in didn't have to work. Previously, we were
> evaluated on how much useful work we had accomplished.

Instant productivity

if (impossible_condition()) {
... anything that will compile and plenty of it
}

> We were also able to just sit and stare out the window while thinking.
> Most of our projects required a lot of thinking before we wrote the
> first line of the project plan. I was told that the later DEC
> had supervisors checking to see if programmers were typing. If they
> were not, they were called on the carpet.

Urgh, thankfully many places are much saner these days.

--
Steve O'Hara-Smith | Directable Mirror Arrays
C:>WIN | A better way to focus the sun
The computer obeys and wins. | licences available see
You lose and Bill collects. | http://www.sohara.org/
Re: Programmers Who Use Spaces Paid More [message #346924 is a reply to message #346889] Wed, 21 June 2017 09:06 Go to previous messageGo to next message
Ahem A Rivet's Shot is currently offline  Ahem A Rivet's Shot
Messages: 4843
Registered: January 2012
Karma: 0
Senior Member
On 20 Jun 2017 23:14:03 GMT
Charlie Gibbs <cgibbs@kltpzyxm.invalid> wrote:

> I keep a maintenance log at the start of each source module.

I used to, these days I keep it in the version management system.

--
Steve O'Hara-Smith | Directable Mirror Arrays
C:>WIN | A better way to focus the sun
The computer obeys and wins. | licences available see
You lose and Bill collects. | http://www.sohara.org/
Re: Programmers Who Use Spaces Paid More [message #346925 is a reply to message #346916] Wed, 21 June 2017 11:37 Go to previous messageGo to next message
Richard Thiebaud is currently offline  Richard Thiebaud
Messages: 222
Registered: May 2013
Karma: 0
Senior Member
On 06/21/2017 08:47 AM, jmfbahciv wrote:
> I was told that the later DEC
> had supervisors checking to see if programmers were typing. If they
> were not, they were called on the carpet.
No wonder DEC went bankrupt.
Re: Programmers Who Use Spaces Paid More [message #346926 is a reply to message #346901] Wed, 21 June 2017 11:49 Go to previous messageGo to next message
Charlie Gibbs is currently offline  Charlie Gibbs
Messages: 5313
Registered: January 2012
Karma: 0
Senior Member
On 2017-06-21, Ahem A Rivet's Shot <steveo@eircom.net> wrote:

> On 20 Jun 2017 19:52:49 GMT
> Charlie Gibbs <cgibbs@kltpzyxm.invalid> wrote:
>
>> I prefer 4 spaces per level. However, this introduces problems of its
>> own when using tabs, and I've wound up with a horrible mix of spaces
>> and tabs. I hate it - but at least my code looks the same everywhere.
>
> If you have a mix of tabs and spaces your code won't look the same
> everywhere - the minute I import it into an editor with tabs set at 7
> spaces or 3/4" or 1cm or at 0.5i, 1i, 1.25i, 1.5i, 11i - it will mess up.

Yes, but that's assuming an editor with special settings. The standard for
terminal windows, hard-copy printers, etc. is 8 spaces, and assuming anything
other than that will bite you as soon as you step out of the sandbox (i.e.
try to view the file with more, etc.).

> There is one and only one way to use tabs reliably in code. One
> tab, one level of indentation and NO OTHER USE OF TABS ANYWHERE. Then you
> can display the code with tab stops set any way you like and it all lines
> up perfectly - if the indentation gets to 30 levels set the tab stops to
> 1mm and away you go. You can even print the code in a proportional font!

True enough, but if you stick to the standard of 8 spaces per tab,
indentation is way too much to read easily.

The only alternative is to not use tabs at all. In my copious free time
I plan to start re-working my code that way.

--
/~\ cgibbs@kltpzyxm.invalid (Charlie Gibbs)
\ / I'm really at ac.dekanfrus if you read it the right way.
X Top-posted messages will probably be ignored. See RFC1855.
/ \ HTML will DEFINITELY be ignored. Join the ASCII ribbon campaign!
Re: Programmers Who Use Spaces Paid More [message #346927 is a reply to message #346923] Wed, 21 June 2017 11:49 Go to previous messageGo to next message
Charlie Gibbs is currently offline  Charlie Gibbs
Messages: 5313
Registered: January 2012
Karma: 0
Senior Member
On 2017-06-21, Ahem A Rivet's Shot <steveo@eircom.net> wrote:

> On 21 Jun 2017 12:47:27 GMT
> jmfbahciv <See.above@aol.com> wrote:
>
>> hancock4@bbs.cpcn.com wrote:
>>
>>> On Tuesday, June 20, 2017 at 8:00:29 AM UTC-4, jmfbahciv wrote:
>>>
>>>> One of the horrible things which happened at DEC in the 90s was that
>>>> programmers were evaluated based on the number of lines they wrote.
>
> Yep that's daft - I often improve programs by removing code and
> generally reducing the line count.

Back in the old days I'd inherit programs written by less skilled people.
I would typically slash the line count by 30% (50% in extreme cases) -
and often the programs would run noticeably better because the cruft was
gone. (While doing a conversion at one site, a feature that the customer
had tried to add but which never worked suddenly started working. They
were suddenly less concerned about my overhauling of the code.)

>>>> If the metric changed to number of characters they used in a program,
>>>> then spaces would be used intead of tabs. Personally, typing
>>>> spaces instead of a tab is a waste of productive time.
>>>
>>> We used to hear rumors of companies that did that sort of thing, but
>>> it was so stupid no believed it was true. We used to joke about
>>> how we could pad programs to puff up the line count.
>>
>> Note that the code typed in didn't have to work. Previously, we were
>> evaluated on how much useful work we had accomplished.
>
> Instant productivity
>
> if (impossible_condition()) {
> ... anything that will compile and plenty of it
> }

Ah yes, that's the kind of "productivity" that I love eliminating.

>> We were also able to just sit and stare out the window while thinking.
>> Most of our projects required a lot of thinking before we wrote the
>> first line of the project plan. I was told that the later DEC
>> had supervisors checking to see if programmers were typing. If they
>> were not, they were called on the carpet.
>
> Urgh, thankfully many places are much saner these days.

I don't think I could survive in an environment like that.
The designs that come out of such shoot-from-the-hip tactics
are usually pretty dreadful.

--
/~\ cgibbs@kltpzyxm.invalid (Charlie Gibbs)
\ / I'm really at ac.dekanfrus if you read it the right way.
X Top-posted messages will probably be ignored. See RFC1855.
/ \ HTML will DEFINITELY be ignored. Join the ASCII ribbon campaign!
Re: Programmers Who Use Spaces Paid More [message #346928 is a reply to message #346894] Wed, 21 June 2017 11:49 Go to previous messageGo to previous message
Charlie Gibbs is currently offline  Charlie Gibbs
Messages: 5313
Registered: January 2012
Karma: 0
Senior Member
On 2017-06-21, Dan Espen <dan1espen@gmail.com> wrote:

> scott@slp53.sl.home (Scott Lurndal) writes:
>
>> Charlie Gibbs <cgibbs@kltpzyxm.invalid> writes:
>>
>>> At least on Linux. Wait, there's a version of vim for Windows too?
>>
>> Yup. Gvim, in particular would be interesting to you because...
>
> Both Emacs and vim are available on Windows in terminals and
> as GUIs.
>
> Editing source code with Notepad?
> Isn't there some law against that?
> There should be.

It is a big step down from a real editor. But at least Notepad
does exactly what you tell it to, and doesn't pull stunts behind
your back. For a real nightmare, try maintaining a CSV file with Excel.

> I wonder what the Notepad programmers get paid?

It was probably a one-shot contract - it hasn't been screwed with
enough in subsequent releases to make it look like an ongoing thing.

--
/~\ cgibbs@kltpzyxm.invalid (Charlie Gibbs)
\ / I'm really at ac.dekanfrus if you read it the right way.
X Top-posted messages will probably be ignored. See RFC1855.
/ \ HTML will DEFINITELY be ignored. Join the ASCII ribbon campaign!
Pages (5): [ «    1  2  3  4  5    »]  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: The most important invention from every state
Next Topic: Punched Card machine ad 1969
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Apr 20 06:21:24 EDT 2024

Total time taken to generate the page: 0.05425 seconds