ITT we post Really Stupid quotes [asbestos req'd] (27)

1 Name: dmpk2k!hinhT6kz2E : 2007-01-24 22:58 ID:Heaven

Ever come across a statement that's just too dumb to be true? Copypasta here!

Today's catch:
"In the face of a programming error, you want as much 'undefined' behaviour as possible, to give the tools that detect such behaviour the most information possible."

2 Name: #!/usr/bin/anonymous : 2007-01-25 00:32 ID:/VBLTyr1

3 Name: #!/usr/bin/anonymous : 2007-01-26 06:05 ID:JFZYibnO

> Take-Your-Child-To-Work Day never made much sense to me. Unless you're someone cool like Tony Hawk or Batman, showing kids the reality of the workplace just seems outright cruel. Cubicles, meetings, TPS reports -- I mean really, while you're at it, why not just crush all of their hopes and dreams and tell them that Santa Claus died in a mid-air collision with the Tooth Fairy, the Easter Bunny was run over while trying to save the world's last candy factory, and that there would never be any birthday parties ever again. It's practically the same thing.

Priceless.

4 Name: dmpk2k!hinhT6kz2E : 2007-01-29 03:26 ID:Heaven

Person 1 says:
GC certainly is no panacea. But I've spent 25 years programming in C and C++, and the worst, nastiest, most time consuming bugs by far have been related to memory management.

Person 2 replies:
I agree that they are bad but the amount of times that they have occured in my code in 21 years has been very few, I can count on one hand.

Uh-huh.

5 Name: dmpk2k!hinhT6kz2E : 2007-02-08 04:12 ID:Heaven

I don't hate regex -- I just don't use it. It seems to me that to figure out regex syntax takes longer than writing quick for/while statements, and I usually forget cases in regex too...
<snip>
A while back, I needed something very quickly to remove whitespace. it took me much less time with loops than I ever could have done with a regex.

6 Name: #!/usr/bin/anonymous : 2007-05-18 10:34 ID:9X0n1toz

>>5
haha reminds me of my old pascal teacher

7 Name: #!/usr/bin/anonymous : 2007-05-21 09:26 ID:uokliR54

> I want you to use this photo. I want it to be in landscape, but changed so that the height is bigger than the width

8 Name: #!/usr/bin/anonymous : 2007-05-27 13:10 ID:u2sA4u6o

"1.) Why would you code an emulator in Visual Basic 6.0?

VB 6.0 applications are very stable. VB programs are designed to run as efficiently as possible on Microsoft Windows based operating systems for obvious reasons (Microsoft developed Visual Basic ^.^). VB 6.0 has also been around for a long time. It is fairly well developed in comparison to other programming languages.

2.) Why not code your emulator in VB .NET?

VB .NET requires the use of the .NET platform provided by Microsoft Corporation. The .NET framework is an additional piece of software that we do not want clients to have to manually install in order to run 'vbWoW' servers. VB .NET is also not as fully developed as VB 6.0.

3.) Doesn't VB 6.0 have runtime dependencies?

Yes, it unfortunately does. However, with the right code, necessary runtime files can be dropped with the program eliminating these dependencies."

9 Name: #!/usr/bin/anonymous : 2007-05-27 13:47 ID:Heaven

>>8
Languages with only one implementation = fail.

10 Name: dmpk2k!hinhT6kz2E : 2007-05-31 07:20 ID:Heaven

If any piece of code is complex enough to require a comment, make it its own function and comment the function. I believe the only thing that REQUIRES comments are classes and methods. Not pieces of code...

Since this is a pet peeve of mine, allow me to make this obvious to anyone who doesn't understand why this quote is idiotic: you should comment every paragraph of code, without exception, unless the code is particularly obtuse. If it's particularly obtuse, spend a paragraph or two of comments to explain it.

I've seen code that was almost literary. Authors of such code can get away with summaries alone at the top of their function or method. However, chances are that you (yes, you) aren't one of them. So comment well please.

I've had to work with a couple large codebases written like the quote above. It's a good thing the author(s) never came within my reach. >:(

11 Name: #!/usr/bin/anonymous : 2007-06-03 16:41 ID:vw1IbHvM

Every paragraph of code, huh?

That seems a bit excessive.

I find most of my "paragraphs" (i.e. runs of lines of code without a blank line between; I guess this is what >>10 means) are obvious enough that no comment is needed, and any I did add would just be a silly distraction. (This is in C.)

But I take a few steps toward code readability that I think many people don't. For instance, to convert from dB to a voltage ratio (formula: ratio = exp(dB * ln(10) / 20.0)), I define a constant M_LN10_OVER_20, instead of using the value 0.115129254649702284200899573 directly in my code.

I've found that in a lot of audio code, people will just slap values like that in their code directly, and it drives me up the wall when I'm trying to figure out what's being done.

I guess my standard is, if, while reading other people's code, it drives me up the wall, I won't do it in my code. And I read a lot of other people's code -- as well as rereading my code to make sure it meets this standard. So that really works well for me.

12 Name: dmpk2k!hinhT6kz2E : 2007-06-03 18:24 ID:Heaven

> That seems a bit excessive.

Sometimes it can be. However, having an inviolable rule ensures that people who don't know better have less chance of doing it wrong. For some reason doing it wrong seems to be the norm, not the exception. :(

An alternative may be Literate Programming. I've never seen anybody do that in practice, so I don't have an opinion. I imagine it'd be annoying to someone in a hurry though.

> runs of lines of code without a blank line between; I guess this is what >>10 means

Yup.

13 Post deleted by moderator.

14 Name: #!/usr/bin/anonymous : 2007-06-04 19:55 ID:MMGturLX

>>11

Audio code tends to be the very definition of bad programming practices, for some reason. Maybe because the people write it tend to be both educated more in audio / EE than software engineering, and write mostly numeric-oriented code, which has both actual ("need to fit as much as possible in one line") and traditional ("I'm writing like my mentors were always writing") reasons to be particularly unreadable.

15 Name: #!/usr/bin/anonymous : 2007-06-04 19:57 ID:MMGturLX

>>13

What other PHP implementations are there out there? ActiveSomething don't count, they're based on the official implementation to my knowledge.

16 Name: #!/usr/bin/anonymous : 2007-06-06 04:31 ID:+JlBtB4f

17 Name: dmpk2k!hinhT6kz2E : 2007-06-06 06:30 ID:Heaven

I'm not a fan of multiple implementations, most especially when they include a library. Witness the Lisp world: it's a horrible situation, and probably why Lisp is on the slow road to dead, dead, dead.

What I look for is a recognized canonical implementation that's open, portable, and well-supported.

18 Name: #!/usr/bin/anonymous : 2007-06-07 02:38 ID:vw1IbHvM

>>17
That Lisp situation does suck, but I like C. And I am glad there are multiple implementations of it. (Though sadly, in the Unix world, this seems to be almost academic; I wish there was a good alternative to gcc. nwcc for the win: http://nwcc.sourceforge.net/)

19 Name: dmpk2k!hinhT6kz2E : 2007-06-07 05:26 ID:Heaven

I'll go out on a limb here and argue that one reason why there is so much inertia with C as a language is because there are multiple implementations. Multiple implementations demand a spec, otherwise madness ensues.

Besides, if my memory serves me well, things were no fun before GCC became de facto. On the DOS side alone there was Borland, Zortech, Intel, Watcom, Microsoft, DJGPP, and others I've forgotten. Code written with one version from a vendor usually didn't work with another vendors or even different versions from the same vendor without liberal use of macros, and that was ignoring the real/protected divide as well. UNIX land was even nastier...

GCC quite possibly is the best thing to ever happen to C. Of course with ISO twiddling its thumbs over rather anemic revisions like C99, the language is also gradually on the way out. :(

20 Name: #!/usr/bin/anonymous : 2007-06-07 06:20 ID:+JlBtB4f

I wish D would take off personally. It's C plus OO plus types where you can reliably know how big it is without needing to know what platform you're on. It sucks less than C++ and less than Java, and still compiles to native code.

21 Name: #!/usr/bin/anonymous : 2007-10-15 16:39 ID:Heaven

>>1
Fucking Faggot, **_use_** WAKABAMARK.

22 Name: #!/usr/bin/anonymous : 2007-10-15 16:39 ID:Heaven

>>1
Fucking Faggot, *__use__* WAKABAMARK.

23 Name: #!/usr/bin/anonymous : 2007-10-15 16:40 ID:Heaven

>>1
Fucking Faggot, *__use__* WAKABAMARK.

24 Name: #!/usr/bin/anonymous : 2007-10-15 16:40 ID:Heaven

>>1
Fucking Faggot, * use * WAKABAMARK.

25 Name: #!/usr/bin/anonymous : 2007-10-15 16:41 ID:Heaven

>>1
Fucking Faggot, __*use*__ WAKABAMARK.

26 Name: #!/usr/bin/anonymous : 2007-10-15 16:42 ID:Heaven

>>1

> Fucking Faggot,
  • use WAKABAMARK.

27 Name: !3eyOGiTWIw : 2008-10-27 01:44 ID:Heaven

>>21-26
...wow...

This thread has been closed. You cannot post in this thread any longer.