Re: Brian Kernighan, maybe I'm not worthy, maybe I'm scum




"spinoza1111" <spinoza1111@xxxxxxxxx> wrote in message

Nilges?
Because I don't use C (it's a pernicious language) I may have missed
something.

Mere structs are proudly labeled objects in Web hacks. In general,
people are proud to be members of in-groups, not to evolve a global
computing language.

That's certainly a force.
C is the closest thing we had to a universal programming language. However there are entirely legitimate criticisms you can make of it, and it is not clear how to evolve a "D" - C++ was a good attempt, but ultimately seems to have failed. I think you have to acknowledge that there are technical issues about what makes a good programming language, commercial issues of companies or organisations wanting to control standards, and social issues of programmers wanting to feel part of an elite and exclusive group, and even cultural issues 'no, I will never use a period for a decimal point' and all four are important.

The privatized industrial *milieu* in which I fear Kernighan operates
unquestioningly, preparing his students at Princeton for a lifetime in
which there's never owing to profit pressures enough time to do it
right, but plenty of time, and job opportunities, to do it over, is
shown by the fact that to Kernighan, it's a Good Thing that Rob only
took an hour.

That's interesting, isn't it?
Private enterprise programming for profit is horribly inefficient, but it is probably the most efficient method of organising effort known. Certainly money in always exceeds money out, except in the shortest term, sometimes by a large margin. Why is this the case?

A constant feature of programming is the after
hours free labor of "valuable" programmers, where the worthlessness of
their free time varies inversely to the market price of their billable
time.

What I found in games was that, at first, the programmer liked the games and would happily spend every waking hour working on them. Then companies wised up to this and began to expect it. For a while people continued to happily put in the time. But not forever. I left the industry, other people started jsuat doing their hours. The last company I worked for then introduced paid overtime. So people were padding their time out to get the overtime payments.

Yes, Brian, I understand that in C the programmer can use a name as a
Von Neumann address to a byte now and forever, amen. I understand that
test is passed as are all variables in C by value, therefore on a
stack implementation (yes, the only possible implementation) the
programmer is "free", o happy day, to use the stack copy, test itself,
oh frabjous day, as the index itself.

Recursive functions inherently need a stack in some shape or form, which in practise always means a standard contiguous memory structure. Non recursive functions don't, and as optimisers become more aggressive stacks are beginning to fade away.

But I question the right of the C programmer to use something so
idiomatic as confusing a value parameter, something which is not
normally modifiable, as modifiable.

There's certainly a strong case for keeping parameters constant, maybe a case for making them constant. But the decision went the other way.

I understand your point that in Java and in C Sharp, the programmer
would have been compelled (boo hoo) to use a string object, and this
would be perhaps more time costly...at least on an unoptimized
platform.

The most straightforwards interface to a string is to read the bytes. That's also usually the most machine efficient. As we do in written text - you can read these letters individually if you want.

In 1998, it was painfully arguable that the world was still interested
in scanning strings o' bytes using regular expressions that are also
strings o' bytes.

Byte and character in C are the same thing, which was a big mistake. However Unicode is another mistake. The problem is the burden of producing a font that encodes absolutely every glyph - the the characters are not accessibe via a keyboard. In fact HTML, which is the emerging standard, uses ascii-encoded foreign characters.

As a relatively minor cavil, I know that it has been very hip, since
the days of the PDP8, to use lower case. The problem is that matchhere
is ugly because it uses double h in a way that doesn't occur in
English: it's Klingon, and why not bite the bullet and use matchHere?

We need better namespace conventions, absolutely. I use lower case for functions that depend only on the standard library, mixed case for those which depend on X on Windows or other platform-specific code. However that means there is no visual break to words in the portable section of the code. You can't win on all points.

Also, why couldn't Rob have returned an index to the place where the
regular expression returns, and, to be consistent with zero origin
indexing, -1 for no hit? It's not elegant in a real timesaving way to
do all the work you do, and return such a thin cold response to
callers whose next question will be where the heck does the string
start!

By convention a C string starts at the address passed. It means there is only one variable, and it has the same semantics as any other address.

I like the way you show how to use recursion simply in the real world;
too many programmers say "ooooo recursion, scarey and time wasting,
don't make me think, aaaargh".

Recursion is more elegant, but has certain dangers. The program can become extremely inefficient. eg a recursive fibonnacci function will take about ten minutes to calculate the highest possible fibonnaci number in a 32 bit variable, an imperative version will execute in about a hundred machine instructions.

This is a computing culture dominated by American private corporations
which use computing to obscure. I have learned, for example, that the
securitized mortgages which are creating a global economic crisis
cannot be reverse engineered in such a way as to find the original
debtors, and reprice the security by determining the best risks.

This was probably because the programmers were under orders to do
things in an hour or less, as Rob Pike was praised for, and they
appeared to have discarded the idea of keeping keys in new tranches.
I'm not an expert on this, but I have enough experience to somehow
intuit that during the Big Party, yuppie scum who were getting rich
were bullying programmers to emulate Rob, and discard "unnecessary
features", whether international strings, or an audit trail.

Yup. But I think you are deluding yourself if you think technical changes to computer programming, however desireable in themselves, can be used as a sort of lever to change freemarket capitalism. What might be more fruitful is to try to start a buzzword-type fad, with yourself as expert. Then you will clean up whilst the good times last. Eventually it will be replaced by somethign else, but doesn't matter, because the money you earned from your books and trainign courses is safely banked.

--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm




.



Relevant Pages

  • Re: Brian Kernighan, maybe Im not worthy, maybe Im scum
    ... C is the closest thing we had to a universal programming language. ... programmer is "free", o happy day, to use the stack copy, test itself, ... The most straightforwards interface to a string is to read the bytes. ... Recursion is more elegant, but has certain dangers. ...
    (comp.programming)
  • Re: Letter to US Sen. Byron Dorgan re unpaid overtime
    ... put them in stupid places. ... Programming is difficult (as you must surely appreciate, ... > strings will be in the range 1...1000 characters. ... impose an artificially small limit on string length." ...
    (comp.programming)
  • Re: PL/I string representations (was Re: To Richard Heathfield: enoughs enough)
    ... > I apologize in advance to the expert PL/I programmers if this is all ... dedicated to string processing with PL/I. ... > as well as appendices on "Revised Report on the Algorithmic Language ... Also NPL (New Programming Language) was an early name ...
    (comp.programming)
  • Re: Letter to US Sen. Byron Dorgan re unpaid overtime
    ... The MAXIMUM size of a working string, accessed in its entirety, is ... compiler would generate a loop), ... > natural incompetence in the field of programming. ...
    (comp.programming)
  • Re: Is this good use of Properties?
    ... >> nor in the business of programming as a backing of design-heuristic ... >>>Assuming some class external to string needed to know it's length How would you get it? ... >>>I need to send it across the pipe to another process (I don't control the format).. ...
    (microsoft.public.dotnet.languages.csharp)