[Openocd-development] Who is using a teletype terminal for code development ?

2009-08-28 Thread Magnus Lundin
Hello list.

Maybe this is my fault that I have not paid enogh attention to some of 
the style discussions.

But I have stopped to regularily print out code before working on it, 
and my screen can easily support 1000-1200 pixel wide edit windows.
That is 120-140 characters before line wrapping.

So why this totally idiotic requirement on 72-80 columns 
My punched card writer is brokens so it does not really care any longer.

And IMHO this breaking up of single commands that fit into 120-140  into 
a lot of shorter lines does neither  improve  readibility or stability 
or code quality.
And all those formatting rewrites does make code comprisons very difficult.

I would like to se a situation where code quality is not equivalent to 
whitespace handling and code is routinely truncated to 80 char columns ( 
we did that in the 80/90ties because equipment did not support any 
longer lines) , but actual analysis of code structure and performance.

That might motivate me to once more take a more active part in OpenOCD 
development.

Happy hacking.
Magnus


___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] Who is using a teletype terminal for code development ?

2009-08-29 Thread Øyvind Harboe
Now that the reformatting is done, comparisons and patches
should be easy.

Hopefully it will become increasingly rare that we need to
compare current code and patches against pre 0.2.

I *will* object to extensive reformatting again, but I appreciate
that the style is consistent now. Actual style isn't that important
to me.

I think that 80 columns is pretty strict, but I don't particularly
care actually.

If some patch didn't strictly adhere to the whitespace/coding
standard but was otherwise good, I wouldn't discard it.

If a patch tries to *change* the coding style significantly,
then I would have objections as I'd like to see a stable
and consistent coding style.

Coding style is meant to help and not hurt development,
so if it's hurting development we should look at it.

-- 
Øyvind Harboe
Embedded software and hardware consulting services
http://www.zylin.com
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] Who is using a teletype terminal for code development ?

2009-08-29 Thread David Brownell
On Friday 28 August 2009, Magnus Lundin wrote:
> So why this totally idiotic requirement on 72-80 columns 

Far from "idiotic"...

It's a widely adopted policy which, among other things, supports
side-by-side display windows and two-column-per-page printer output.
In the same way, I've noticed many IDEs like to tile windows, and
that includes text edit or source stepping.  Long lines work poorly
there too; it's another case of not-enough-space.

Plus it has good side effects.  Indents stay more reasonable,
encouraging more modular code with more manageably bite-sized
functions; and there's less hassle reviewing patches.

If I were going to throw abusive words around I'd apply them
to lines so long that they *require* use of extra-large windows,
which prevent a lot of very common development techniques.

Say what you will about 80 character conventional line sizes,
but they aren't going to *FORCE* everyone else to adopt any of
the idiosyncracies of your particular work style and toolset.

- Dave
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] Who is using a teletype terminal for code development ?

2009-08-29 Thread Duane Ellis
David Brownell wrote:
> On Friday 28 August 2009, Magnus Lundin wrote:
>   
>> So why this totally idiotic requirement on 72-80 columns 
>> 
>
> Far from "idiotic"...
>   
I second this.

The Linux Kernel "coding standards" also has a few very good rules about 
indentation width.

(a) Tabs are 8 - not 4.
(b) Keep lines less then 80.
(c) one function one screen (ie: 80x24)

Those three things have a dramatic effect on understanding and readability.

Tabs & Width = mean you do not suffer indentation sickness.
The Nlines - limit make it so you can read everything on one screen.

Or as David points out, "you can fit it inside one IDE tiled window".

Some screens are nice and wide, tiny fonts, mine is not - I have to have 
larger fonts so I can see.

-Duane.


___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] Who is using a teletype terminal for code development ?

2009-08-30 Thread David Brownell
On Saturday 29 August 2009, Duane Ellis wrote:
> David Brownell wrote:
> > On Friday 28 August 2009, Magnus Lundin wrote:
> >   
> >> So why this totally idiotic requirement on 72-80 columns 
> >> 
> >
> > Far from "idiotic"...
>
> I second this.
> 
> The Linux Kernel "coding standards" also has a few very good rules about 
> indentation width.
> 
> (a) Tabs are 8 - not 4.
> (b) Keep lines less then 80.
> (c) one function one screen (ie: 80x24)

Worth pointing out that (c) is more goal than reality, and then
often for "helper" functions not certain core code.  There are
state machines where the "case" for one state fits on one screen
but there are a dozen such cases per function.  The overriding
goal is clear and clean code.

A better way to put (c) is to keep functions conceptually clean,
since limiting to four or five levels of nesting, combined with (a)
and (b), nudge "deeper" function into helpers.

Folk familiar with cognitive psychology understand that "chunking"
is important in how minds work ... it structures long and short term
memory.  When a function needs more chunks than fit into (human)
working memory, it's harder to understand and debug:  complex and
error prone.  Code complexity metrics work on similar notions.


> Those three things have a dramatic effect on understanding and readability.
> 
> Tabs & Width = mean you do not suffer indentation sickness.
> The Nlines - limit make it so you can read everything on one screen.
> 
> Or as David points out, "you can fit it inside one IDE tiled window".

Not that kernel developers use IDEs, as a rule.  ;)

But they *do* regularly use adjacent windows, where the window
manager does whatever tiling is needed (minor overlaps OK, but
completely obscuring the reference code is counterproductive).

 
> Some screens are nice and wide, tiny fonts, mine is not - I have to have 
> larger fonts so I can see.

Yeah, that too.  Some peoples' eyes are born weak; other
people have to age into eyes that need large fonts.  Yet
others have both problems.  I use larger fonts too. :)

- Dave

___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] Who is using a teletype terminal for code development ?

2009-09-01 Thread Nicolas Pitre
On Sun, 30 Aug 2009, David Brownell wrote:

> On Saturday 29 August 2009, Duane Ellis wrote:
> 
> > Some screens are nice and wide, tiny fonts, mine is not - I have to have 
> > larger fonts so I can see.
> 
> Yeah, that too.  Some peoples' eyes are born weak; other
> people have to age into eyes that need large fonts.  Yet
> others have both problems.  I use larger fonts too. :)

... And some people are simply entirely blind, relying on devices such a 
braille displays to actually write code.  Their usage is much more 
optimal with 80-columns text mode screen content, thank you very much.  
;-)


Nicolas
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development