473,465 Members | 1,922 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

code reading

Hello all:
I'm a student learning procedure-oriented programming(use C). I want to
read some smart programs that perform important aspects of structure
programming.so I'm eager to obtain some advices about such codes? BTW,
the best are middle-scale and not too complex. I'm willing to elevate
my design level of procedure-oriented programming by reading code.
Thank you.

Nov 15 '05 #1
4 1413


sabads wrote:
Hello all:
I'm a student learning procedure-oriented programming(use C). I want to
read some smart programs that perform important aspects of structure
programming.so I'm eager to obtain some advices about such codes? BTW,
the best are middle-scale and not too complex. I'm willing to elevate
my design level of procedure-oriented programming by reading code.
Thank you.

I recommend the book "Code Reading--The Open Source Perspective" to
you!
It is very good!More info about it is:
Author:Doimidis Spinellis
Publisher:Addison Wesley
ISBN 0-201-79940-5
Most of the code in it is written in C.Enjoy it!

Nov 15 '05 #2
"sabads" <sa****@163.com> wrote

I'm a student learning procedure-oriented programming(use C). I want to
read some smart programs that perform important aspects of structure
programming.so I'm eager to obtain some advices about such codes? BTW,
the best are middle-scale and not too complex. I'm willing to elevate
my design level of procedure-oriented programming by reading code.
Thank you.

The methodology is called "structured programming". In contrast to
object-oriented programming there are few books on it. This is partly
because it is much simpler to master, which is a strength not a weakness.

Basically the program should form a call tree (C as good as imposes this
requirement on you) with each function having only one point of entry and,
arguably, one point of exit.

As you move down the hierarchy, functions should become simpler and more
general. Each function should be short ebough for a human to understand, and
should do one clearly-defined task, whether that is "pilot ship to Mars" (a
high level function) or "calculate distance between two points" (a low level
function the first will probably call).

There should be few or no global variables. There should be no jumps between
functions, strictly speaking you shouldn't have function pointers either,
though this requirement isn't usually very useful.
The structure shouldn't degenerate into a list (all functions called
directly from main) or a pole (each function called from the other). It
should be a roughly balanced tree.
Nov 15 '05 #3
"Cong Wang" <xi************@gmail.com> writes:
sabads wrote:
Hello all:
I'm a student learning procedure-oriented programming(use C). I want to
read some smart programs that perform important aspects of structure
programming. [...]


I recommend the book "Code Reading--The Open Source Perspective" to
you!

It is very good!More info about it is:

Author:Doimidis Spinellis
Publisher:Addison Wesley
ISBN 0-201-79940-5
Most of the code in it is written in C.Enjoy it!


FWIW, the author's name is ``Diomidis Spinellis''.
I'll agree It's true that this is a great book :-)

- Giorgos
Nov 15 '05 #4
Giorgos Keramidas wrote:
"Cong Wang" <xi************@gmail.com> writes:
sabads wrote:
Hello all:
I'm a student learning procedure-oriented programming(use C). I want to
read some smart programs that perform important aspects of structure
programming. [...]


I recommend the book "Code Reading--The Open Source Perspective" to
you!

It is very good!More info about it is:

Author:Doimidis Spinellis
Publisher:Addison Wesley
ISBN 0-201-79940-5
Most of the code in it is written in C.Enjoy it!

FWIW, the author's name is ``Diomidis Spinellis''.
I'll agree It's true that this is a great book :-)

- Giorgos


Obviously Greek, like urself! :)
Nov 15 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Vinayak Raghuvamshi | last post by:
I have a file that has been created using shared read/write access. But C# code never is able to open this file for read and keeps throwing "...cannot open file as it is being used by another...
245
by: Vortex Soft | last post by:
http://www.junglecreatures.com/ Try it and tell me what's happenning in the Microsoft Corporation. Notes: VB, C# are CLS compliant
93
by: Phlip | last post by:
C++ers: Feast your eyes: void Home:: inherits (IdentifierPtr const& id) { ... }
239
by: Eigenvector | last post by:
My question is more generic, but it involves what I consider ANSI standard C and portability. I happen to be a system admin for multiple platforms and as such a lot of the applications that my...
232
by: robert maas, see http://tinyurl.com/uh3t | last post by:
I'm working on examples of programming in several languages, all (except PHP) running under CGI so that I can show both the source files and the actually running of the examples online. The first...
3
by: kaens | last post by:
Hey everyone, I'm relatively new to python - I actually picked it up to see how quickly I could start building non-trivial apps with it. Needless to say, I was quite pleased. Anyhow, I'm...
10
by: Jani Järvinen [MVP] | last post by:
Hello, for your information in case you didn't yet notice the news: Microsoft has announced plans to give developers the ability to view .NET class library source code. This is announced here: ...
1
by: dwaterpolo | last post by:
Hi Everyone, I am trying to read two text files swY40p10t3ctw45.col.txt and solution.txt and compare them, the first text file has a bunch of values listed like: y y y y y y y
8
by: Brad Walton | last post by:
Hello. First post, but been doing a bit of reading here. I am working on a project in Java, but decided to switch over to C# after seeing some of the additional features I can get from C#. One of...
3
by: melbourno | last post by:
I have a Perl script that I run and the out come as showing below: Log chain 1: Reading: server 2\08120700.mls Reading: server 2\08120900.mls Reading: server 1\08121100.mls Log chain 2: ...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.