[lkml]   [2001]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Coding style - a non-issue
"Raúl Núñez de Arenas Coronado" wrote:
> >Hungarian notation???
> >That was developed by programmers with apparently no skill to
> >see/remember how a variable is defined. IMHO in the Linux community
> >it's widely considered one of the worst coding styles possible.
> Not at all... Hungarian notation is not so bad, except it is only
> understood by people from hungary. So the name }:))) I just use it
> when I write code for Hungary or secret code that no one should
> read...

I prefer Pig Latin myself. ;)

> >> - Short variable/function names that someone thinks is descriptive but
> >> really isn't.
> >not all variable names need their purpose obvious to complete newbies.
> >sometimes it takes time to understand the code's purpose, in which case
> >the variable names become incredibly descriptive.
> Here you are right. The code can be seen really as a book: you
> can start reading at the middle and yet understand some of the story,
> but it's far better when you start at the beginning ;))) Moreover,
> most of the variable and function names in the kernel code are quite
> descriptive, IMHO.

There's no way on earth I would ever start reading at the beginning of 3
million lines of code just so I can understand bobsdriver.o, which is
only 10,000 lines. I should not have to start at the beginning of
bobsdrvier.o either if I only needed to solve one problem in one
function somewhere near the end of it.

I have worked on several large projects and have rarely known how every
piece of any of them worked. I didn't have to. I only needed to know
about the portion(s) I was responsible for. I was able to do that with
the better projects because they were commented correctly and were
rather self documenting.

> Of course, more comments and more descriptive names doesn't harm,
> but some times they bloat the code...

Actually it bloats the source (we all know C++ bloats the resulting code
;), but what's wrong with that? At least a person can understand what's
going on and get to coding, instead of deciphering.

Paul G. Allen
UNIX Admin II ('til Dec. 3)/FlUnKy At LaRgE (forever!)
Akamai Technologies, Inc.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:13    [W:0.143 / U:1.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site