Messages in this thread |  | | Date | Fri, 30 Nov 2001 12:17:43 -0800 | From | "Paul G. Allen" <> | Subject | Re: 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.
PGA -- Paul G. Allen UNIX Admin II ('til Dec. 3)/FlUnKy At LaRgE (forever!) Akamai Technologies, Inc. www.akamai.com - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |