On Sunday 04 January 2009 22:03, Frank D - [EMAIL PROTECTED] wrote:

> I'm trying to help some friends learn C, I am rusty. Very rusty. I'm
> currently working on a quick book to get them going. Can anyone that
> actually writes code chime in on a couple projects I'm preparing for
> them? The first one is a tie-it-together project, and has some dirty
> stuff in it (namely the way console I/O is being handled).. but anything
> else look too terrible in there? Too much/too little in the way of
> content for being after about a 60 page explanation? The second one is a
> datafile library, I might have to start that one again from scratch, I'm
> not entirely sure I like how I started laying it out. See comments for
> details.
>
> http://home.hvc.rr.com/johnnysdawg/project_x.txt
>
>
> http://home.hvc.rr.com/johnnysdawg/dfs.txt
>
> Thanks for your time!
>

What is really missing are comments. I see the code, I understand it, but I 
don't know what you are trying to achieve, so I cannot tell if the code is 
adequate.

You might want to give a short overview of each function's role (in 
comments) and document each function's usage. The best way to document the 
usage of a function, BTW, is to write a main that contains a set of unit 
tests. Put the main in a separate file, have a "test" target in your 
Makefile that compiles your main and links it to your lib, then run the 
tests.

  --Fred Mora
_______________________________________________
Mid-Hudson Valley Linux Users Group                  http://mhvlug.org          
   
http://mhvlug.org/cgi-bin/mailman/listinfo/mhvlug                           
Upcoming Meetings (6pm - 8pm)                         MHVLS Auditorium          
        
  Dec 3 - Lightning Talks & Swap Session
  

Reply via email to