lulz

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

User avatar
Arce
Jealous Self-Righteous Prick
Jealous Self-Righteous Prick
Posts: 2153
Joined: Mon Jul 10, 2006 9:29 pm

Re: lulz

Post by Arce »

Any questions?
<qpHalcy0n> decided to paint the office, now i'm high and my hands hurt
User avatar
avansc
Respected Programmer
Respected Programmer
Posts: 1708
Joined: Sun Nov 02, 2008 6:29 pm

Re: lulz

Post by avansc »

I dont wanna get involved in this little tiff, but wtf is "very legit, low-level C code" ?
Some person, "I have a black belt in karate"
Dad, "Yea well I have a fan belt in street fighting"
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

Re: lulz

Post by Falco Girgis »

avansc wrote:I dont wanna get involved in this little tiff, but wtf is "very legit, low-level C code" ?
I have seen it in code for drivers and a microkernel for an embedded platform, haha.
User avatar
Arce
Jealous Self-Righteous Prick
Jealous Self-Righteous Prick
Posts: 2153
Joined: Mon Jul 10, 2006 9:29 pm

Re: lulz

Post by Arce »

The topic is actually called "lulz."

C'mon.

Love circle. Now. ;)
<qpHalcy0n> decided to paint the office, now i'm high and my hands hurt
User avatar
k1net1k
Chaos Rift Maniac
Chaos Rift Maniac
Posts: 563
Joined: Sun Nov 07, 2010 2:58 pm
Contact:

Re: lulz

Post by k1net1k »

Arce wrote:
K-Bal wrote:There is more about code than efficiency and correctness. How about readability, maintainability, modularity? I think the examples in this thread are quite understandable, but I wanted to point that out.
Allow me to reiterate:
The reason for all the (unnecessary?) ternary statements is that it allows you to essentially ignore the "design" part and just speed code, "hacking" in extra conditions wherever necessary.
and
But the main thing I was referring to was this garbage:
as well as
Did that really save you any time? :roll:

Of course.
Also,
Hell no! I have seen some very legit, low-level C code using that kind of embedded ternary statement. I think that's perfectly acceptable.
'

was referring to

Code: Select all

           char letter =  ((average >= 90 && average<= 100 ) ? 'A' :
                          ( average >= 80 && average< 90   ) ? 'B' :
                          ( average >= 70 && average< 80   ) ? 'C' :
                          ( average >= 60 && average< 70   ) ? 'D' :
                          ( average <  60                  ) ? 'F' : 'X') ;
hence the
kind of embedded ternary statement.
In regard to
I was also unaware of the fact that Arce was required to write in straight C
Irrelevant? No, non-nonsensical and obviously the retort of somebody who misunderstood the original defense, or atleast drew wild deductions about the whole
I have seen some very legit, low-level C code

to imply anybody implied anything about nested ternaries requiring straight C?
I am also a naive fool
Clearly.
for assuming that including an abundance of the code that Arce's professor is specifically against, is clearly insulting their judgment.
But not for this reason. Perhaps you missed the "lighthearted vibe" of the topic, emphasized by
as "x-treeme nerd!" :)
,
pretty nifty, nonetheless. ;)
,
The ternary operator RULLZ! :worship: You should get a +1 for every ternary you use!
,
Please, direct your attention to the "showResults" mess, and tell me if you think she's going to flunk me? :lol:
pointed out by
Wow, my post might have warranted a sarcastic one-liner, but an entire paragraph complete with multiple emoticons to emphasize the sarcasm?
,
and under the circumstances of
I found myself waking up 15 minutes before an extra credit assignment was due
yet somehow managed to deduce that I was in some way intentionally trying to insult my instructor?

Impressively, you manage to contradict your own logic here
It is apparent that Arce's professor is dimwitted for enforcing that her students produce clean, readable and maintainable code.
with
Especially in a seemingly basic programming course, where the prerequisites would surely be a knowledge of the bare essentials of the language.
; would it not be illogical to argue the simplicity of a "bare essential" course, then swing your own definitions of
readable and maintainable code.
, which is, by and large, a complex topic beyond the scope of
knowledge of the bare essentials of the language
especially when, "showing off" the many uses of a ternary would be clearly demonstrating your
knowledge of the bare essentials of the language
? :roll:

And, finally,
There is more about code than efficiency and correctness. How about readability, maintainability, modularity? I think the examples in this thread are quite understandable, but I wanted to point that out.
this is not necessarily true in the circumstances of some very legit, low-level C code or cases of embedded systems (thought, obviously, this is not applicable here, and we're just arguing for the sake of argument. ;p )
Feel free to correct me, if I am wrong.
Done.

I have nothing to say on the matter as i have no idea what half of this is about, but figured it would be funny to quote this :)

Nested quotes FTW
User avatar
Arce
Jealous Self-Righteous Prick
Jealous Self-Righteous Prick
Posts: 2153
Joined: Mon Jul 10, 2006 9:29 pm

Re: lulz

Post by Arce »

O.o;;

As I scrolled down, before I read your post, I was thinking about how ridiculous it was that somebody quoted the whole thing. :P

Locked for the sake of sanity.
<qpHalcy0n> decided to paint the office, now i'm high and my hands hurt
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

Re: lulz

Post by dandymcgee »

How the HELL did you get phpBB to allow that many tags in a single post. :shock:
Arce wrote:Locked for the sake of sanity.
Since the OP requested it. :lock:
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
Locked