freeipmi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Freeipmi-devel] code cleanup/auditting for libfreeipmi


From: Anand Babu
Subject: Re: [Freeipmi-devel] code cleanup/auditting for libfreeipmi
Date: Wed, 15 Feb 2006 10:42:46 -0800
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux)

,----[ Albert Chu <address@hidden> ]
| I just thought I'd give a heads up about some of the code
| cleanup/auditing I'm doing for 0.3.0.
| 
| 1) Some of the fiid templates are inconsistent with each other.  I've
| been personally hit by bugs b/c some templates used "user_name" as a
| field name while others used "username".  I've also seen "num" vs.
| "number", and "addr" vs. "address".  So a number of templates/fields may
| be changing soon as I try to create consistency through the library. 
| Most of the time, I simply rename fields to exactly what is in the spec.
`----
Following exactly in the spec is the best way to go. Even if it is
lengthy it doesn't matter. It is more readable, meaningful and
predictable. 

,----[ Albert Chu <address@hidden> ]
| 2) Likewise for function names and template names.  For example, 
| "fill_hdr_session" vs. "fill_lan_msg_hdr". "fill_hdr_session" is 
| now "fill_lan_session_hdr".  ipmi-sessions.[ch] are now gone too, with 
| code moved into ipmi-lan files.
`----
We initially intended to have fill_xxx as static functions. So strict
naming conventions were not followed. Now that we have a need to
expose even the low level driver APIs, fill functions also
important. Please cleanup.

,----[ Albert Chu <address@hidden> ]
| 3) Code ordering.  This is just me being anal.  But I'm making sure
| templates, functions, etc. are ordered in the files correctly.  It makes
|  it easier for reading the code along with the spec.
`----
You mean ordering the code within a file. If so this is a good
idea. It makes code reading easy.

,----[ Albert Chu <address@hidden> ]
| 4) Of course there is duplicate code, unused code, random crapola that 
| I'm cleaning up / removing along the way.
`----
Lets check size of the freeipmi tarball after cleanup to see if
there is any weight lost :p. Not at all going below 1MB.

--
Albert Chu
address@hidden
925-422-5311
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory








_______________________________________________
Freeipmi-devel mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/freeipmi-devel

-- 
Anand Babu 
GPG Key ID: 0x62E15A31
Blog [http://ab.freeshell.org]              
The GNU Operating System [http://www.gnu.org]  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]