Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > alt.os.development > #8905

Re: Smaller C

Path csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail
From "Rod Pemberton" <boo@fasdfrewar.cdm>
Newsgroups alt.os.development
Subject Re: Smaller C
Date Mon, 12 Oct 2015 20:33:01 -0400
Organization Aioe.org NNTP Server
Lines 86
Message-ID <op.x6e45bjoyfako5@localhost> (permalink)
References <1debc959-af42-490a-ac12-568e59fa441a@googlegroups.com> <163b3e27-19a9-406b-8d65-e21a1b5c110d@googlegroups.com> <9e8d0137-ac84-44df-8c30-b68359d25391@googlegroups.com> <91546be3-19a4-48f0-9a47-8d5d8e82d314@googlegroups.com> <0e0bffb0-2082-4832-9bb0-8e66b64bc0b3@googlegroups.com> <op.x57purfuyfako5@localhost> <b3c0f7f5-bc42-497c-8aa8-657dc37e5a0a@googlegroups.com> <op.x59p1konyfako5@localhost> <1dd54776-d592-42e7-884c-5df5660ba483@googlegroups.com> <op.x6do9tlbyfako5@localhost> <50a1b6b7-d6d4-40c7-939b-e55463a0c50e@googlegroups.com>
NNTP-Posting-Host n4wpt9zq8xR26Ttf9mo2BA.user.speranza.aioe.org
Mime-Version 1.0
Content-Type text/plain; charset=iso-8859-1; format=flowed; delsp=yes
Content-Transfer-Encoding 7bit
X-Complaints-To abuse@aioe.org
User-Agent Opera Mail/12.16 (Linux)
X-Notice Filtered by postfilter v. 0.8.2
Xref csiph.com alt.os.development:8905

Show key headers only | View raw


On Mon, 12 Oct 2015 02:49:47 -0400, Alexei A. Frounze <alexfrunews@gmail.com> wrote:

> On Sunday, October 11, 2015 at 10:52:24 PM UTC-7, Rod Pemberton wrote:

>> 2) You just argued for more complexity to be introduced into
>> the libraries due to their necessity, but also stated above
>> that "code complexity is more than enough already."  So,
>> which is it?
>
> Consider two pieces of code, one using the implementation of
> algorithm/container X from the standard library and the other
> implementing its own, most likely poorly documented. Which
> one would be easier to understand?

You're probably not going to like or accept my answer to that.

It's the poorly documented custom solution, at least 85% of
the time.  Why?  The custom solution is likely to have reduced
functionality, be short, and simple to understand.  The code
for the custom solution also is included with the program.  This
means it doesn't have to be searched for and found.  The code
for the C libraries aren't present with the program and can take
a while to search.  The code for the C libraries were coded by
someone skilled in C to work for the specific host.  So, they
have many qualifiers, typdefs, recursive declarations (which
you just complained about), #ifdef's, #undef's, and other,
sometimes complicated, stuff happening.

> Imagine now

At this point, I'm assuming you meant the poorly documented
code would be more difficult to understand.

> Imagine now you routinely have to look at custom implementations,
> not just once, but many times, because there're many projects
> and subprojects.  Wouldn't you save time and effort by dealing
> more with known and less with unknown?

It's very likely the custom implementation uses the same parameters
as the library implementation, e.g., when standard C libraries aren't
present.  So, if it functions correctly for the code in question,
I don't see where the problem arises.  AIUI, the problem is when
someone assumes the custom implementation is more complete, or has
capability which it doesn't.

there're ... ?

I'm a bit unsure about the validity of that contraction.

> If it's the teacher's intent to make their students do X
> and not Y, they should communicate that clearly and set the
> rules to follow (N points given/taken for BLAH). Sometimes
> you do X and not Y because it's an exercise. But we digress.
>

The English teachers I had from second grade through the end
of high school wanted their students to compose sentences for
a word which used that word correctly.  I.e., the sentence
was to express the word's definition accurately.  They simply
stated: "Write down a sentence." or "Write down a sentence
for each word." without any further instruction.  There was
never any directive that the student must compose their own
sentence and write that down.  There was no constraint on
where the sentence came from or who wrote it.  So, from second
grade through eleventh, I wrote down the sentence which was
in our dictionary at home.  It was only in eleventh grade when
I copied down the sentence from a dictionary available to our
class when I found out that doing so wasn't accepted.  The
teacher still attempted to claim that "Write down a sentence."
meant that I must compose a sentence of my own and write that
down, despite the given command saying no such thing.  This
wasn't revealed sooner because we had a rather rare dictionary.
There were roughly twenty different teachers, not one of whom
clarified the situation with sufficient information to any
class which they taught.

So, while I agree with you that teacher's should be more
precise and clarify, it's clear to me that people simply
can't communicate clearly, even if it's their job to do so.


Rod Pemberton

-- 
Just how many texting and calendar apps does humanity need?
Just how many food articles from neurotic millenials do we need?

Back to alt.os.development | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Smaller C Peter Cheung <mcheung63@gmail.com> - 2015-10-07 00:10 -0700
  Re: Smaller C "Alexei A. Frounze" <alexfrunews@gmail.com> - 2015-10-07 00:52 -0700
    Re: Smaller C Peter Cheung <mcheung63@gmail.com> - 2015-10-07 02:51 -0700
      Re: Smaller C "wolfgang kern" <nowhere@never.at> - 2015-10-07 21:01 +0200
        Re: Smaller C "Alexei A. Frounze" <alexfrunews@gmail.com> - 2015-10-08 00:25 -0700
          Re: Smaller C "wolfgang kern" <nowhere@never.at> - 2015-10-08 10:50 +0200
            Re: Smaller C "Alexei A. Frounze" <alexfrunews@gmail.com> - 2015-10-08 02:06 -0700
              Re: Smaller C "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-10-08 19:39 -0400
                Re: Smaller C "Alexei A. Frounze" <alexfrunews@gmail.com> - 2015-10-09 01:00 -0700
                Re: Smaller C "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-10-09 20:28 -0400
      Re: Smaller C "Alexei A. Frounze" <alexfrunews@gmail.com> - 2015-10-08 00:22 -0700
        Re: Smaller C "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-10-08 20:19 -0400
          Re: Smaller C "Alexei A. Frounze" <alexfrunews@gmail.com> - 2015-10-09 02:50 -0700
            Re: Smaller C "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-10-09 22:18 -0400
              Re: Smaller C "Alexei A. Frounze" <alexfrunews@gmail.com> - 2015-10-10 01:48 -0700
                Re: Smaller C "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-10-12 01:52 -0400
                Re: Smaller C "Alexei A. Frounze" <alexfrunews@gmail.com> - 2015-10-11 23:49 -0700
                Re: Smaller C "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-10-12 20:33 -0400
              Re: Smaller C James Harris <james.harris.1@gmail.com> - 2016-01-16 16:50 +0000
                Re: Smaller C Rod Pemberton <NoHaveNotOne@bcczxcfre.cmm> - 2016-01-23 13:19 -0500
                Re: Smaller C "Alexei A. Frounze" <alexfrunews@gmail.com> - 2016-01-23 13:54 -0800

csiph-web