What happens when your program crashes?

K

Kelsey Bjarnason

It seem to me that source code size is a perfectly valid (though
imprecise) metric for the complexity and maintainability of a piece of
softwre, whether the source code is available or not.

Rather depends on the coding style of the developer, no?

Given the same problem, one developer may produce a small program, say
20-30 lines, while another produces 200-300 lines. Which is more
maintainable? No way to tell without seeing; the 200+ line program may
be excessively bloated, or the 20+ line program may be unmaintainably
terse. Or both, or neither. :)
 
J

jacob navia

Kelsey said:
Rather depends on the coding style of the developer, no?

Given the same problem, one developer may produce a small program, say
20-30 lines, while another produces 200-300 lines. Which is more
maintainable? No way to tell without seeing; the 200+ line program may
be excessively bloated, or the 20+ line program may be unmaintainably
terse. Or both, or neither. :)

For a single program yes. But for the source code of several programs,
each of them of a certain complexity, that is no longer the case.

The code is terse, yes, I do not like bloated code, but it is much more
maintainable than 10 times more code *of course*

Have you looked into gcc's code?

Have you ever tried to debug it?

Go ahead and you will find why lcc-win is much more easy!
 
R

Richard

Kelsey Bjarnason said:
Rather depends on the coding style of the developer, no?

Given the same problem, one developer may produce a small program, say
20-30 lines, while another produces 200-300 lines. Which is more
maintainable? No way to tell without seeing; the 200+ line program may
be excessively bloated, or the 20+ line program may be unmaintainably
terse. Or both, or neither. :)

That is rather stating the obvious.

But size of the C source is probably quite relevant, generally, to how
difficult or large the job of maintaining it is.

As Keith said "imprecise" - but to ridicule it as being applicable is
being ridiculous.
 
R

Richard Heathfield

Kelsey Bjarnason said:
On Sat, 22 Mar 2008 18:33:03 -0700, Keith Thompson wrote:


Rather depends on the coding style of the developer, no?

Given the same problem, one developer may produce a small program, say
20-30 lines, while another produces 200-300 lines. Which is more
maintainable? No way to tell without seeing; the 200+ line program may
be excessively bloated, or the 20+ line program may be unmaintainably
terse. Or both, or neither. :)

Whilst that is true, such differences will in most cases be swamped in
larger systems.

I have found, *in general*, that the complexity and maintenance cost of a
system are roughly in proportion to its size. This is hardly surprising.
Nor is it surprising that there are occasional exceptions.
 
S

santosh

jacob said:
For a single program yes. But for the source code of several programs,
each of them of a certain complexity, that is no longer the case.

The code is terse, yes, I do not like bloated code, but it is much
more maintainable than 10 times more code *of course*

Have you looked into gcc's code?

Have you ever tried to debug it?

Go ahead and you will find why lcc-win is much more easy!

But comparing gcc with lcc-win isn't really fair is it? Quite apart from
the fact that we have no access to lcc-win's source to *make* a
comparison at all, gcc is bigger and more complex source-wise, probably
because it does a whole lot more. It's backend has been ported to
dozens of chips and it does a lot more optimisations than lcc-win. It's
probably also been designed to be more extendable than lcc-win.
 
K

Keith Thompson

Kelsey Bjarnason said:
Rather depends on the coding style of the developer, no?

Given the same problem, one developer may produce a small program, say
20-30 lines, while another produces 200-300 lines. Which is more
maintainable? No way to tell without seeing; the 200+ line program may
be excessively bloated, or the 20+ line program may be unmaintainably
terse. Or both, or neither. :)

Of course. The word "imprecise" was intended to cover all that.
 
M

mrhassell

I guess the point of having a fair idea about what you are trying to
acheive before setting out to write a singlew line of code, would be
prudent to assume in the first instance?
 
K

Kelsey Bjarnason

[snips]

For a single program yes. But for the source code of several programs,
each of them of a certain complexity, that is no longer the case.

Really. You never looked at Jeff Relf's code, then, saw all the screwed-
up macros and whatnot, which made virtually everything he did
unmaintainable?

Oh, right, there's a magic force which prevents those macros being used
in other programs, I forgot. Silly me.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,754
Messages
2,569,525
Members
44,997
Latest member
mileyka

Latest Threads

Top