Style Police (a rant)

T

Tom Anderson

2011-09-11 18:42, Lew skrev:

I would copy the code and use Emacs to format it.

I'd just get over it.

Since we're talking about illegibility, someone posted this elsewhere the
other day:

http://ideone.com/hE5rn

You have to wonder about the mental processes that led to that. If it was
deliberate, it would be up there with Jackson Pollock, but i don't think
it was.

tom
 
L

Lew

Lars said:
(Not quite: s/smarta/smart/.) I sometimes forget to replace the Swedish
word in attributions.

My apologies. I don't speak Swedish, so I used Google Translate to make myjoke.
 
T

thoolen

On 12/09/2011 8:46 AM, murphy wrote:
NaN> Newsgroups: comp.lang.java.programmer

NaN> On 12/09/2011 7:20 AM, Cthun did not write:

What does your classic unsubstantiated and erroneous claim have to do
with Java, murphy?

NaN> > On 12/09/2011 6:42 AM, Cthun did write:

Cthun didn't write that, murphy, yet you attributed it to him anyway.
Classic dishonesty on your part, murphy.

NaN> oh dear Boy Paul swore!

Who is "Boy Paul", murphy? There is nobody in this newsgroup using that
alias.

NaN> god will punish you priest fucker!

Who is "priest fucker", murphy? There is nobody in this newsgroup using
that alias.

NaN> 0!

What does that have to do with Java, murphy?

NaN> 0!

What does that have to do with Java, murphy?

NaN> 0!

What does that have to do with Java, murphy?

NaN> 0!

What does that have to do with Java, murphy?

NaN> hallucinate much?

What do your hallucinations have to do with Java, murphy?

NaN> must have been those 'shrooms from down Binbrook way!

What does your possession of illicit substances have to do with Java,
murphy?

NaN> phone a friend for quality 'shrooms!

What does your bad advice to Cthun have to do with Java, murphy?

NaN> preferably one on the same planet as you!

What does your planet have to do with Java, murphy?

NaN> shek my names again.

What is "shek", murphy, and what does it have to do with Java?

NaN> anything else is forgery!

What do your forgeries have to do with Java, murphy?

NaN> --- . ... ..- ... <[email protected]>
NaN> 00101010 <[email protected]>
NaN> 3k7e4intna <[email protected]>
NaN> 3x+r4v4g4n <[email protected]>
NaN> Alice <[email protected]>
NaN> Arne Këndoj <[email protected]>
NaN> Boojum <[email protected]>
NaN> B1ll Gat3s <[email protected]>
NaN> Canuck <[email protected]>
NaN> Cthun <[email protected]>
NaN> Chad Carmichael <[email protected]>
NaN> dark-zark-fark <[email protected]>
NaN> Deep Green <[email protected]> (forgery)
NaN> Deeyana <[email protected]>
NaN> De Lurker <[email protected]>
NaN> Derek Yancey <[email protected]>
NaN> Extravagan <[email protected]>
NaN> Ferdinand the -14th <[email protected]>
NaN> Fuschia, President-Elect of the Bright Purplish-Green Council
NaN> <[email protected]>
NaN> George Arctos <[email protected]>
NaN> Greg Kelly <[email protected]>
NaN> Greg Sandoval <[email protected]>
NaN> Gheerax IV <[email protected]>
NaN> Handkea fumosa <[email protected]>
NaN> Hieronymus S. Freely <[email protected]>
NaN> Hydrocon <[email protected]>
NaN> Henry Harrison <[email protected]>
NaN> Henderson <[email protected]>
NaN> Heike Svensson <[email protected]>
NaN> Harry Greer <[email protected]>
NaN> Janie Zanie <[email protected]>
NaN> Jerry Gerrone <[email protected]>
NaN> John Kirkpatrick XVII <[email protected]>
NaN> Katie Gerrolds <[email protected]>
NaN> Kevin Hadron <[email protected]>
NaN> kensi <[email protected]>
NaN> KitKat <[email protected]>
NaN> Meerkats <[email protected]> (forgery)
NaN> Mister Scott <[email protected]>
NaN> Mrs. Danforth <[email protected]>
NaN> Mike Faramis <[email protected]>
NaN> Mamac <[email protected]>
NaN> Nancy 3 <[email protected]>
NaN> Nancy 4 <[email protected]> (forgery)
NaN> Nebulous <[email protected]>
NaN> Nightcrawler <[email protected]>
NaN> Nougat Surprise <[email protected]>
NaN> Orange Green <[email protected]> Paul Derbysh!re
NaN> <[email protected]>
NaN> Purpleswandir <[email protected]>
NaN> RichB <[email protected]>
NaN> (e-mail address removed)
NaN> SFTV_troll <[email protected]>
NaN> Sulfide Eater <[email protected]>
NaN>
<supercalifragilisticexpialadiamaticonormalizeringelimatisticantations@averylongandannoyingdomainname.com>

NaN>
NaN> Spock <[email protected]>
NaN> Series Expansion <[email protected]>
NaN> Seamus MacRae <[email protected]>
NaN> Snicker-snack! <[email protected]>
NaN> Tim <[email protected]>
NaN> Thursday's Leftovers <[email protected]>
NaN> thoolen <[email protected]>
NaN> thoolen <[email protected]>
NaN> thoolen <[email protected]>
NaN> <[email protected]>
NaN> Willy Wonka <[email protected]>

What does your long list of names and email addresses of random internet
users have to do with Java, murphy? Starting your own spamming business,
murphy? Look closely, murphy. Many of the email addresses are obviously
invalid, murphy.

NaN> got fries to go.

What does your dinner have to do with Java, murphy?

NaN> I am so clever!

What does your classic unsubstantiated and erroneous claim have to do
with Java, murphy? Indeed, it's quite possible that you're the stupidest
man alive, murphy.
 
R

Retahiv Oopsiscame

And what, pray tell, is wrong with Lisp, Oopsiscame? Let alone *so*
wrong as to be deserving of foul language for emphasis?

Parentheses everywhere. Prefix instead of infix math. Auto-uppercasing
variable names. And of course the big thing the Lispers always keep
hyping are the macros. Anyone who's had to maintain a large C codebase
inherited from someone else learns to dread macros. Besides the
problems with name capture and shadowing there's their use to create
silly and lawyer-requiring new syntax to parse. Both C and Lisp macros
look like function calls, deceptively, but have different rules of
evaluation that can trip you up. And don't get me started on Common
Lisp's boondoggle known as the LOOP macro ...
 
R

Retahiv Oopsiscame

Lew skrev.  It says right there.

It's short for «Lew skrev ett ganska smarta inlägg.»

It's short for whatawhatwhatwhat?!
What, you like vi better?

Heaven forfend. That's, if anything, even worse. I mean, you fire it
up, try to type in some text, and it goes bonkers, beeping and doing
random stuff. And both of them can't easily be quit, can't easily be
help-browsed, and don't have the normal cut, copy, and paste keys.

Meanwhile, take something like Notepad, Notepad+, Notetab, or any
similar thing. The basic, text editing functionality works out of the
box, with no surprises; a child can use them. For Notepad, that's
pretty much all you get but the others have more sophisticated
features *without* these impacting on the ease of use for basic text
editing tasks. And then, of course, for serious programming it's hard
to beat Eclipse (and maybe Netbeans). Some setup headaches, depending
on the language, but programming language environments are like that.
Emacs and vi would also have to know where to find the compiler, what
to set the classpath to, and so forth, and they'd make it a lot harder
to find out how and set that stuff up, to boot. The actual text
editing itself, in Eclipse at least, "just works" with no headaches
from idiosyncratic, non-industry-standard key bindings, wonky
selection, copy, cut, paste, undo, or redo semantics, or any other
such cause.
 
R

Retahiv Oopsiscame

The [implied insult deleted] gives us hints to his true identity:
Hates Lisp. Hates Emacs. Hates vi.
Who could that be?

None of the nasty things that you have said or implied about me are at
all true.
 
L

Lars Enderin

My apologies. I don't speak Swedish, so I used Google Translate to make my joke.

You're excused. Other clues to the identity of the nym-shifter are his
idiotic rewrite of my email address and the way he reacts to foreign
words. And he practically confirms his identity in later comments.
 
C

Cthun

As you were it was doubtful you owned a full basket of fruit.
You now tell us it is all nuts.

Hey, murphy. What part of "**** the hell off" did you not understand?
I see you are quite correct.
Winter at hand I will be sure to send all my squirrels off to Montreal
and google for nuts.

You're being even more illucid than usual, murph. It's as if you went
off your meds a few months ago, went off them some more a couple days
ago, and went off them some more again this morning, if that's possible.
 
C

Cthun

Parentheses everywhere.
So?

Prefix instead of infix math.
So?

Auto-uppercasing variable names.

Icky Common Lisp has that problem. Clojure doesn't.
And of course the big thing the Lispers always keep hyping are the
macros.

With good reason.
Anyone who's had to maintain a large C codebase inherited from
someone else learns to dread macros.

Learns to dread C macros, perhaps.
Besides the problems with name capture and shadowing

which are avoidable, if you know what you're doing.
there's their use to create silly and lawyer-requiring new syntax
to parse.

All language features can be misused. C++ operator overloading is just
as capable of being used to make unreadable code, but doesn't involve
macros.
Both C and Lisp macros look like function calls, deceptively,

Everything in Lisp looks like (operator arg1 arg2 ...); so?
but have different rules of evaluation that can trip you up.

Beats the hell out of memorizing long lists of operator precedence
rules, or all kinds of corner-cases in the parser and lexer of a syntaxy
language.
And don't get me started on Common Lisp's boondoggle known as the
LOOP macro ...

The Common Lisp LOOP macro does, in fact, suck. It's ... unLispy.
 
R

Retahiv Oopsiscame

My apologies.  I don't speak Swedish, so I used Google Translate to make my joke.

You're excused. Other clues to the identity of the [implied insult
deleted] are his [insult deleted] rewrite of my email address

No. None of the nasty things that you have said or implied about me
are at all true.
and the way he reacts to foreign words.

This is an English-language newsgroup.
And he practically confirms his identity in later comments.

I never concealed it.
 
R

Retahiv Oopsiscame


If you need to ask, then you simply do not understand.

If you need to ask, then you simply do not understand.
Icky Common Lisp has that problem. Clojure doesn't.

Never heard of it.
With good reason.
Poppycock.


Learns to dread C macros, perhaps.

Macros are macros are macros.
which are avoidable, if you know what you're doing.

If I call a variable in a macro "x" and it contains a code fragment
supplied at the invocation site, there could be an "x" at the
invocation site as well, in scope around the invocation, that that
code fragment tries to reference. Replace "x" with any other name and
the same thing remains true. I suppose you could add some klunky
system that allows module-namespacing locals, and then use that in
macros to make collisions less likely, but that's one hell of a
kludge.
All language features can be misused. C++ operator overloading is just
as capable of being used to make unreadable code, but doesn't involve
macros.

If all language features were *equal* in their proneness to be
misused, why would we find macros to be a particularly frequent
culprit in C codebases, and macros and operator overloading in C++
codebases, as compared to, say, switch statements or for loops or
ordinary function calls?
Everything in Lisp looks like (operator arg1 arg2 ...); so?

If you need to ask, then you simply do not understand.
Beats the hell out of memorizing long lists of operator precedence
rules, or all kinds of corner-cases in the parser and lexer of a syntaxy
language.

Most operator precedence rules you'll need will have been ingrained in
grade school math class, and you can always *elect* to parenthesize
when you want to be sure of a particular order of execution and don't
remember the precedence rule (or it goes the wrong way for your needs
in that case).

And what is wrong with "syntaxy" language, exactly? Without syntax,
you don't even have a language, just a formless soup.
The Common Lisp LOOP macro does, in fact, suck. It's ... unLispy.

Merely being unLispy would be a good thing. The problem is that it's
COBOLy, BASICy, and borderline INTERCALy.
 
A

Andreas Leitgeb

Arne Vajhøj said:
Many years ago I saw a person that liked Pascal do the following
in C:
#define begin {
#define end }

Probably it did look better and easier maintainable to the
respective author than "all those braces".

I've seen a terminal font where braces looked almost the same
as parentheses. Were I ever forced to work with such a terminal,
I might even have done the same... Can't tell if the author
you wrote about had a reason like that...
 
A

Andreas Leitgeb

Arne Vajhøj said:
And 1/3 new code is probably above industry average.

The distinction between "new code" and "maintenance" doesn't quite cut it.

A more interesting percentage might be: maintaining one's own code versus
maintaining someone else's code.

(And for "someone else's very ugly code" one could further distinguish for
whether running it through a (standard or specific) beautifier is an option.)
 
E

Eric Sosman

The distinction between "new code" and "maintenance" doesn't quite cut it.

A more interesting percentage might be: maintaining one's own code versus
maintaining someone else's code.

This is important. If you advocate code re-use, it follows that
you advocate spending more time maintaining and less originating. If
your preferences run the other way, you are not re-using enough code.

When I was young (shovelling coal into the furnaces of the early
steam-powered computers, and leering lasciviously at Lovelace), memory
was short and CPU cycles long: Both were scarce and hence expensive.
Programmer labor (sometimes called human labor, but that's debatable)
was cheap in comparison. The product of that labor was therefore also
cheap, easy to discard and re-write. "Re-doing it better" was laudable.

But memories have grown and CPU cycles have shrunk. I recall a
machine whose time was billed at $100/hour, during which time it could
perform maybe 0.3 billion instructions (if it never had to wait for
I/O and there wasn't too much floating-point in the mix). Today's
machines can get through 0.3 billion instructions in a second or two:
That's more than three decimal orders of magnitude faster. That same
machine deployed 1/8 MB of memory; nowadays even a bare-bones El Cheapo
laptop has 2 GB, four decimal orders of magnitude more. And the old
machine cost maybe $500,000 instead of $700 (which is about $125 in
1970 dollars), for another three-plus decimal orders of magnitude
improvement.

Meanwhile, the appetite for code -- the demand for programmer
output -- has risen, and although the supply of programmer labor has
increased and the tools of programmer productivity have improved, they
have not kept pace with demand. The balance is reversed: Programmer
time is scarce and expensive, CPU time and memory are plentiful and
cheap.

So if you want to produce software cost-effectively, it follows
that you *must* re-use existing code. And if you must re-use code,
it follows that you must maintain it -- and the really cost-effective
programmer, the one who will get to market first and with lower
overheads than the competition, will be the one who writes *no*
original code at all. It's too slow and expensive, and too last
millennium.

Ponder this, while thinking about the average Computer Science
curriculum. "Students, today you will implement an AVL tree." Bah!
 

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

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,811
Messages
2,569,693
Members
45,477
Latest member
IsidroSeli

Latest Threads

Top