Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-8081-

CamelCase

Name: Anonymous 2009-05-19 16:06

WhoTheFuckThoughtThisIsAGoodIdea?

It's an unreadable mess. No real programmer would use that shit.

Name: Anonymous 2009-05-19 16:19

/thread

Name: Anonymous 2009-05-19 16:34

It doesn't look so bad WithAProportionalFont.
Also, nobody uses that many words for identifiers. Aside from JAVA programmers.

Name: Anonymous 2009-05-19 16:34

Real_Programmer_Use_Camel_Space

Name: Anonymous 2009-05-19 16:37

alternaCAPSisTHEbestWAYtoNAMEtheVARIABLES

Name: Anonymous 2009-05-19 16:41

Please use underscores to separate words in a name, so that the Emacs word commands can be useful within them.

gnu_style_is_the_standard!

Name: Anonymous 2009-05-19 16:42

go back to /g/

Name: Anonymous 2009-05-19 16:42

M-x glasses-mode

Name: Anonymous 2009-05-19 16:48

L337v@r!@8|3~@^^E5

Name: Anonymous 2009-05-19 17:44

HaXXeRCaSeiSTHeSTaNDaRD

Name: Anonymous 2009-05-19 17:50

this_IsTheStandard_inPHP_orSoIt_seems();

Name: Anonymous 2009-05-19 17:54

>>6
Please use underscores to separate words in a name, so that the Emacs word commands can be useful within them.
This may surprise you, but c-subword-mode.

Name: Anonymous 2009-05-19 18:21

[code](lisp\ spaces\ are\ the\ standard\ !)[code]

Name: Anonymous 2009-05-19 18:23

>>13
> ぬるぽ
ガ!!


(lisp\ spaces\ are\ the\ standard\ !)

Name: Anonymous 2009-05-19 18:31

>>3
Yeah, the real problem is stupid verbose languages and stupid verbose programmers that leads you to stuff like:

StupidLongTypeName stupidLongVarName = new StupidLongSubTypeName(anotherStupidLongVarName, yetAnotherStupidLongVarName);

And then they consequently fail to stick to 76 characters per line causing me to [spoiler]Rage!11!! and[/spoiler] question their suitablity for the enterprise.

Name: Anonymous 2009-05-19 18:33

>>15
76 characters per line
Why not 80?

Name: Anonymous 2009-05-19 18:59

>>16
I suppose 76 makes it easy to send the code in an email with the Quoted-Printable encoding¹. Though your mail client should do that for you anyway.

References                            
¹ Freed, N.; Innosoft; Borenstein, N.; RFC 2045, Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies pp.19, November 1996 (Retrieved 19 May 2009)

Name: Anonymous 2009-05-19 19:03

>>16
80 is ok. However, it's fucking pushing it. 76 gives you another indentation level before you hit the hard limit of 80. In decent and humane imperative languages (FIOC, JavaScript, See, Ruby) long lines are a code smell. Long lines are common in PHP as it is mostly coded by people who will happily shit on a floor, your floor.

There should be a punishment system for long lines that goes something like this:
1-72 Yeah! We rockin'!
72-76 Careful now. Maybe think about refactoring.
76-80 Oooh! You're pushing the limit there! you should definitely think about refactoring.
80-90 A stern warning should be issued to the miscreant.
90-100 A written reprimand should be issued. For a second offence employment should be terminated.
100-120 Removal of fingers. This ``person'' should not code again.
120+ Removal of penis. This ``animal'' should not be allowed to breed.

Name: Anonymous 2009-05-19 19:09

It is more important that code is readable, is maintainable, and works than that someone comes up with some cryptic fucking variable name. "Oh, of course db_con_hn is the database connection host string. Almost hit 80 characters there!"

wtf

Name: Anonymous 2009-05-19 19:19

>>18
I have my notepad++ set to display a line at 80 characters. But sometimes I just can't be bothered to add an additional line break, because I have a widescreen monitor so I can see nearly twice as much, and the code is far from finished so I don't care if it's aesthetically pleasing. I never went over 120 characters on a single line though.

Name: Anonymous 2009-05-19 19:24

>>19
If you can't keep line length below 80 characters without sacrificing readability you are doing it wrong or using an overlyVerboseAndShittyLanguage. db_conn is more readable than databaseConnection. If db_conn refers to something else than a database connection you are obviously dealing with PHP programmers and I advise you to have a mop handy to clean your floor!


for(int loopIndexCounter = 0; loopIndexCounter < 100; loopIndexCounter++)
    printf(">>19 is disproved by contrived counter example");

Name: Anonymous 2009-05-19 19:30

>>18
I agree with the spirit of this post. I cried myself to sleep when I found out that coding in Objective-C often mandates such long lines.

Name: Anonymous 2009-05-19 19:43

>>21
loopIndexCounter? Enterprise quality variable name.

Name: Anonymous 2009-05-19 19:45

>>21
My floor is carpeted, so I don't really need a mop...

Name: Anonymous 2009-05-19 19:46

CamelCase is the standard!!!

Underscores look silly and just add more characters. All lowercase in one word is even worse as it's usually unreadable.

Name: Anonymous 2009-05-19 20:37

>>25
JavaCase is not the standard.

Name: Anonymous 2009-05-19 22:51

>>25
Hyphens are superior.

Name: Anonymous 2009-05-20 0:49

I just try to use SINGLE words all the fucking time if I even need words. Also, 80 chars is standard. I break the limit if it's for something stupid that is better done all in one line because there is nothing to read, just spammed shit.

Name: Anonymous 2009-05-20 2:25

Even pulling out a handy trick in Sepples, I was barely able to keep this line under 80 characters.

typedef unordered_map<int, int> bjarne;
for (bjarne::iterator i = stroustrup.begin(); i != stroustrup.end(); ++i) {

}


In short: Fuck off. Your standards are antiquated. Get real editors and computers.

Name: Anonymous 2009-05-20 2:46

try a real language

Name: Anonymous 2009-05-20 3:18

My VT100 supports 132 characters per line.

Name: Anonymous 2009-05-20 3:33

>>29
You mean Sepples is incompatible with good style.

Name: Anonymous 2009-05-20 3:36

Also, 80 chars is standard.
For Hollerith punch cards.  Wow, 1970's acid flashback time, man!

>>29
typedef unordered_map<int, int> bjarne;
for (bjarne::iterator i = stroustrup.begin();
     i != stroustrup.end();
     ++i)
{
 // shit happens here
}


HTH, HAND

Name: Anonymous 2009-05-20 3:40

>>32
You might be surprised to learn this but it is not bad style to split long lines up in to multiple lines. In fact- that example is ironic in that good style would dictate he move the iterator declaration out of the loop, yet it is being given as reasoning why an eighty character limit is ``antiquated''.

Name: Anonymous 2009-05-20 7:21

Do me

$string=~s/[\x{fdd0}-\x{fdef}\x{fffe}\x{ffff}\x{1fffe}\x{1ffff}\x{2fffe}\x{2ffff}\x{3fffe}\x{3ffff}\x{4fffe}\x{4ffff}\x{5fffe}\x{5ffff}\x{6fffe}\x{6ffff}\x{7fffe}\x{7ffff}\x{8fffe}\x{8ffff}\x{9fffe}\x{9ffff}\x{afffe}\x{affff}\x{bfffe}\x{bffff}\x{cfffe}\x{cffff}\x{dfffe}\x{dffff}\x{efffe}\x{effff}\x{ffffe}\x{fffff}]//g;

Name: Anonymous 2009-05-20 8:11

>>34
move the iterator declaration out of the loop
And pollute a larger scope with the iterator variable? HIBT?

Name: Anonymous 2009-05-20 8:30

>>36
No, actually it is better to declare it before the loop, since it won't be redeclared every iteration.

Name: Anonymous 2009-05-20 8:39

>>28
if I even need words
I hate your kind so so much. You are what makes maintenance of old code so fucking difficult. Please never program for anyone other than yourself. Don't even add your code to open source projects.

>>37
What?!

I am definitely being trolled here. And it's working.

Name: Anonymous 2009-05-20 11:51

>>38
Declaring it outside the loop saves a constructor call if the copy constructor is declared explicit. Please refer to the C++ FAQ.

Name: Anonymous 2009-05-20 12:32

>>33
Happen to have one for people who don't like PIG DISGUSTING syntax such as the one you display?

Name: Anonymous 2009-05-20 13:10

>>37
I lol'd, nice one ;)

Name: Anonymous 2009-05-20 14:46

>>39
I've been searching the C++ FAQ for a while now, and I can't find something like that. Plus, it's better to keep the iterator only in the scope of the loop since it shouldn't be used anywhere else.

Regardless, even if you were right, it certainly isn't being ``redeclared every iteration'' like >>37-san said.

Name: Anonymous 2009-05-20 17:19

>>42
Hello! I've noticed that you are using faggot quotes. Please refrain from this practice.

Name: Anonymous 2009-05-21 5:35

>>43
``Quote'' ``Quote'' ``Quote'' ``Quote'' ``Quote'' ``Quote''
``Quote'' ``Quote'' ``Quote'' ``Quote'' ``Quote'' ``Quote''
``Quote'' ``Quote'' ``Quote'' ``Quote'' ``Quote'' ``Quote''
``Quote'' ``Quote'' ``Quote'' ``Quote'' ``Quote'' ``Quote''
``Quote'' ``Quote'' ``Quote'' ``Quote'' ``Quote'' ``Quote''
``Quote'' ``Quote'' ``Quote'' ``Quote'' ``Quote'' ``Quote''
``Quote'' ``Quote'' ``Quote'' ``Quote'' ``Quote'' ``Quote''
``Quote'' ``Quote'' ``Quote'' ``Quote'' ``Quote'' ``Quote''

No thanks, I enjoy my ``proper quotes''.

Name: Anonymous 2009-12-23 12:06

>>44
IHBT

Name: Anonymous 2009-12-23 14:33

Code should be understandable to someone reading it for the first time.  No one should have to move to a different file to understand what "db_con_fn" is.  "db" is generally understood to be database, but the rest is terrible.  dbConnectionFile, db_connection_file, databaseConnectionFile, etc. are understood by anyone reading it.  If it isn't completely legible, a comment explaining what it is should be made at the first instance of using it in any function.  For looping, "i,j,k" are understood iterators.  fileName[i] is understood as the current file name in this loop.  If more than one iterator is used, "i,j,k" are fine as long as comments explain what each variable represents.

80 character limits were abandoned many years ago.  Today, people have monitors with over 800x600 resolution.  If you use a program that limits you to 80, you need a new program.  Try any text editor made in the last 20 years.  It should work just fine.

Name: Anonymous 2009-12-23 14:51

80 character limits are perfectly reasonable and work well with literate programming. If you're having trouble staying under 80 characters:
1) you're using C++ and should pick a decent language
2) you need to refactor
3) your variable names are too descriptive, try commenting some time.

Name: Anonymous 2009-12-23 15:02

>>47

Rationale: If the code is often incapable of explaining itself, then perhaps it should be written in a more expressive language. This may mean using a different programming language altogether, or, since we are talking about Lisp, it may mean simply building a combinator language or a macro language for the purpose. `Literate programming' is the logical conclusion of languages incapable of explaining themselves; it is a direct concession of the inexpressiveness of the computer language implementing the program, to the extent that the only way a human can understand the program is by having it rewritten in a human language.

Name: Anonymous 2009-12-23 15:38

>>44
RFEAQGUGIORTE SQ UFOETWEESR

Version 2.0, released under the Noncommercial Creative Commons License.

Name: Anonymous 2009-12-23 16:17

>>47
Good point, definitely a good point.

Name: Anonymous 2009-12-23 18:07

Name: Anonymous 2009-12-23 19:51

>>51
It's good practice to keep a precise difference between function declaration and function call.

Name: Anonymous 2009-12-24 1:04

>>6,12
How about NO. I fucking *hate* when editors do this, and most of the new ones do. It's easy to instantly count the number of letters in a subword or identifiers in a line, so I can easily jump wherever with #l and #w in vi; conversely it takes a lot more time to count the subwords + non-identifier symbols. And it takes even longer if you just tap whatever your fucking skip word button is over and over until you get where you want to be.

>>18
Why do people care about line lengths so much? Don't you have monitors from this century? Not one person here has given a good reason for having such incredibly short lines. Honestly now, what is the advantage of a line length 1/3 the width of your screen?

I often break the 120-character limit in sepples, and the 160-character limit on objective-C *shudder*. I greatly prefer to read code that is highly compressed vertically. You've got at least 120 characters per line; why not use 'em?

For example, if I write a one-line (or sometimes even two line) function with obvious behaviour, it is usually compressed entirely on one line (including the declaration and postfix comment via //!<), inline in the class definition (yes for convenience, I don't give a fuck if it's faster or slower or bigger or smaller), and it is grouped together with similar functions without any blank lines (except a blank line above and below the whole block). For this I mean functions with obvious behaviour: trivial accessors/mutators, operator wrappers, very simple constructors, etc. This to me looks very nice, and it's very obvious what is happening. Your eye can skip right over the block if you're not interested in it (instead of scrolling through pages of spaced out garbage), and you still get proper doxygen comments, etc.

In particular I *hate* extra word pollution (typedefs, temporaries, etc) just for the sake of breaking up lines, as in >>29. It makes sense if you're going to use the type/value multiple times, but once? With a temporary you're deliberately breaking apart the logical flow of the program, storing an arbitrary value in a named identifier outside the actual place where it is being used. Even if you buy the argument that it's easier to read (I don't), it certainly makes it harder to understand.

>>47
1) you're using C++ and should pick a decent language
We aren't all working on toy projects; some of us have jobs, and those jobs require us to use certain languages.

Name: Anonymous 2009-12-24 7:50

>>53
I smell a troll

Name: Anonymous 2009-12-24 11:18

>>51
Why should I orient my code style around faggots who use ancient terminals?

Name: Anonymous 2009-12-24 11:48

I agree.

Name: Anonymous 2009-12-24 13:20

>>55
*homosexuals
*legacy terminals

Name: Anonymous 2009-12-24 21:02

I just break apart my code base on what it's doing. I keep it under 80 most of the time so I don't piss any one else off.

Name: Anonymous 2009-12-24 21:27

Well I see character line length limits as like speed limits. I mean only faggots keep it  under 80 on the freeway. real men do 100 no problem, and 120 if the conditions are right.

Name: Anonymous 2009-12-24 22:17

All I can say to this is lol. This is basically the exact experience that I have had with the post-secondary institutions within the United States. I can honestly say that for the majority that professors and the institution wish to stifle creativity and independent thought. The narrow minded answers they want completely disregard the plethora of other choices that would reveal the correct answer. Whether or not the story is true, this is the attitude of the American educational institute, for those that think outside the box continue to. Revolutionist, non-conventionalist, and the blatant disregard for normalcy are the fundamentals to continuing our species in the area of science.

Name: Anonymous 2009-12-24 22:20

>>60
Hello FrozenVoid ;)

Name: Anonymous 2009-12-24 22:24

>>59
EXPERT MAT DICKIE

Name: Anonymous 2009-12-24 23:47

>>62
Can't be Mat Dickie. Mat Dickie talks about himself a lot and also ends everything he writes with an ellipsis...

Name: Anonymous 2009-12-25 8:58

>>55
Because sometimes you must work on sucky technologies or communicate with different worlds.

Of course you are the typical windows programmer (or user?) stuck on bullshit sold by microsoft. Your entire world is a PC with microsoft windows, so you continue producing your management accounting software, interfacing it with m$ access and producing code which cannot be handled by anything except your fricken IDE.

If you need to communicate with someone else you have to riduce to the lowest common factor.

Name: Anonymous 2009-12-25 9:32

Do you guys browse the web by sending a mail to your daemon which will then fetch the page at a later time, too?

Name: Anonymous 2009-12-25 12:14

>>1
I believe you mean camelCase and whoTheFuckThoughtThisWasAgoodIdea (two capital letters in a row are not allowed)

Name: Anonymous 2009-12-25 12:46

>>65
Why are you asking?

Name: Anonymous 2009-12-25 14:07

>>65
Not since 1994. Prior to that I had to do something quite similar much of the time.

Name: Anonymous 2009-12-25 15:29

rEVERSEcAMELcASEiSsUPERIOR

Name: Anonymous 2009-12-25 16:03

>>69
that would be /pROG/cASE

Name: Anonymous 2009-12-25 16:34

>>67
Hmm, I wonder.

Name: Anonymous 2009-12-25 17:38

“For personal reasons, I do not browse the web from my computer. (I also have not net connection much of the time.) To look at page I send mail to a demon which runs wget and mails the page back to me. It is very efficient use of my time, but it is slow in real time.”
http://stallman.org/small-RMS.png

Name: Anonymous 2009-12-25 17:50

>>72
Doesn't he still need a web browser to render the returned page?
Or is it ´´very efficient use of [his] time`` to skim through the html manually?

For extra efficiency, maybe he could write a program that takes a URL as input, sends the email, waits for a response, then strips the html and prints it to stdout.

Name: Anonymous 2009-12-25 19:37

>>73
One word text mode web browser thread over.

Name: Anonymous 2009-12-25 20:30

>>74
THAT'S STILL A WEB BROWSER

Name: Anonymous 2009-12-25 21:13

>>73
Why don't you ask him: mailto:rms@gnu.org

Name: Anonymous 2009-12-26 2:22

>>76
For personal reasons, I do not send email from my computer.  Does he have a web form by which I might submit my questions?

Name: Anonymous 2010-08-12 22:20

ugg

Name: Anonymous 2010-08-13 0:48

>>33
This must be why all of you faggots hate C++. You try to fit it all under 80 columns and the result is ass. So you think the language is ass, instead of realizing that 80 columns is ass.

Name: Anonymous 2010-08-13 0:52

>She is super cute!she so beauty!!!
She is super ugguu~

Name: Anonymous 2010-11-27 12:39

Name: Anonymous 2011-02-03 7:43


Don't change these.
Name: Email:
Entire Thread Thread List