User not logged in - login - register
Home Calendar Books School Tool Photo Gallery Message Boards Users Statistics Advertise Site Info
go to bottom | |
 Message Boards » » Modulo operator is so HARD :( Page 1 2 [3] 4, Prev Next  
ScHpEnXeL
Suspended
32613 Posts
user info
edit post

3

3/8/2009 5:55:11 PM

joe_schmoe
All American
18758 Posts
user info
edit post

someone get Tiberius a cab home.






[Edited on March 8, 2009 at 5:59 PM. Reason : ]

3/8/2009 5:56:35 PM

Tiberius
Suspended
7607 Posts
user info
edit post

It's amazing how long a discussion can continue when you ignore every point raised and resort to personal attacks to avoid acknowledging your mischaracterizations.

[Edited on March 8, 2009 at 5:59 PM. Reason : ^lolol nice quadruple edit there chief]

3/8/2009 5:58:42 PM

joe_schmoe
All American
18758 Posts
user info
edit post

ive addressed your "points"

but you still think a basic arithmetic operator is unnecessary and poor programming practice, because you've found some stats showing that it is used less often than other arithmetic operators.

you can continue to fling poo around your cage all you like. everyone else has moved on.

this is a shameful thread.

3/8/2009 6:02:37 PM

Tiberius
Suspended
7607 Posts
user info
edit post

Quote :
"everyone else has moved on."


Good call, considering the topic of this thread was you personally attacking me and most of the respondents didn't give a fuck from the first post...

Quote :
"you still think a basic arithmetic operator is unnecessary and poor programming practice, because you've found some stats showing that it is used less often than other arithmetic operators."


Yep, I rarely use it and neither do the contributors to some of the largest source bases available for analysis. In support of your point that it is vital to computer science, however, there's the example of RSA. It's interesting that the OpenSSL package had the lowest occurance of modulo operations.

joe_schmoe: qualifying personal attacks with minor errors and ignoring reality wherever possible

[Edited on March 8, 2009 at 6:25 PM. Reason : .]

3/8/2009 6:15:53 PM

joe_schmoe
All American
18758 Posts
user info
edit post

you still here?

3/8/2009 6:16:37 PM

Tiberius
Suspended
7607 Posts
user info
edit post

joe_schmoe: qualifying personal attacks with minor errors and ignoring reality wherever possible

3/8/2009 6:17:52 PM

joe_schmoe
All American
18758 Posts
user info
edit post

I have a cookie for you

3/8/2009 6:18:53 PM

Tiberius
Suspended
7607 Posts
user info
edit post

I, too, will not let the thread go

3/8/2009 6:19:34 PM

Tiberius
Suspended
7607 Posts
user info
edit post

% is CLEARLY

MOST CLEARLY

a basic arithmetic operator: +, -, /, *, and %!

not because it fits in the set of basic arithmetic operators, which are defined for all reals (except / on 0 ) while the % approximation is well-defined only for positive integral dividends and divisors, but because it sounds more insulting to imply someone made an error with a basic arithmetic operator!

[Edited on March 8, 2009 at 7:04 PM. Reason : joe_schmoe: facts come second to a well-worded insult!]

3/8/2009 6:57:13 PM

Wyloch
All American
4244 Posts
user info
edit post

Third party arbitration: Tiberius wins.

/thread

3/8/2009 7:29:36 PM

joe_schmoe
All American
18758 Posts
user info
edit post

perhaps you remember modulus from the third grade. we called it "remainder" then.

im sorry it's so hard for some of you cable pullers, but here's a helpful hint: don't be fooled by the fancy name, http://www.google.com/search?q=modular+arithmetic, its essence is still just the remainder of integer division.








[Edited on March 8, 2009 at 7:50 PM. Reason : ]

3/8/2009 7:41:51 PM

Tiberius
Suspended
7607 Posts
user info
edit post

yes, and it was only well-defined for positive integer quantities in third grade too...

nor was it taught as an arithmetic operator, it was expressed as the remainder of the division operation. quite possibly due to its non-congruence with the other basic arithmetic operators... I am not a math instructor, however.

[Edited on March 8, 2009 at 7:57 PM. Reason : joe_schmoe: the only person in the world to realize that % implies remainder!]

3/8/2009 7:50:54 PM

joe_schmoe
All American
18758 Posts
user info
edit post

then perhaps you should learn to properly use it in basic cyclical applications, before worrying about the complexities of negative divisors.

3/8/2009 7:52:38 PM

Tiberius
Suspended
7607 Posts
user info
edit post

perhaps you should retreat from all claims you've made and continue to derive personal attacks from an admitted mistake

[Edited on March 8, 2009 at 7:56 PM. Reason : oh wait -- you have~!]

3/8/2009 7:55:51 PM

joe_schmoe
All American
18758 Posts
user info
edit post

thanks for your recent full-time effort in googling "modulus" for us.

It certainly makes up for your demonstrated inability to use it properly, then followed by a full day of chestbeating trying to convince everyone (posts % 50) is indeed correct

because googling is worth far more than the ability to code properly in the first place, or at least to be able to self-correct a mistake without shitting all in your pants about it.

Quote :
"*snicker*"






[Edited on March 8, 2009 at 8:07 PM. Reason : ]

3/8/2009 8:04:35 PM

Tiberius
Suspended
7607 Posts
user info
edit post

Quote :
"It certainly makes up for your demonstrated inability to use it properly, then followed by a full day of chestbeating trying to convince everyone (posts % 50) is indeed correct"


I knew my function was incorrect immediately the other night. You even commented on (and insulted) the fact that I was editing it at the time, as I was essentially using the thread as scratch paper. It would have been corrected in the original thread if you hadn't began spamming it with personal attacks as I was constructing the function. Further, I immediately admitted my mistake on the first page of this thread.

Quote :
"because googling is worth far more than the ability to code properly in the first place, or at least to be able to self-correct a mistake without shitting all in your pants about it."


The last three pages of the thread have been about 1. my claim that modulo is infrequently used, and 2. my claim that it is often poor practice, both of which you insulted and dismissed. I've provided ridiculously many examples to support these claims, and you've dismissed this as "motivated Googling". I suppose your insulting and hollow arguments look better when not contrasted with authoritative sources.

[Edited on March 8, 2009 at 8:14 PM. Reason : pathetic fucking troll]

3/8/2009 8:11:22 PM

Solinari
All American
16957 Posts
user info
edit post

Quote :
"Why assume the compiler is going to do the correct translation to account for your poor form, when you can perform the correct operation from the beginning?"


My answer would be that oftentimes having clear code that is self-documenting is more of a priority than squeezing a half a millisecond total runtime out of your code. Modulo operator is a lot more clear to the average user than using a bitwise-and function the way you've described.

I frequently use inefficient coding structures simply because they more clearly present the idea that I'm implementing. If your code isn't performance critical, who gives an F how fast it runs? In that case, I'd say ease of maintainability comes first.

[Edited on March 8, 2009 at 8:16 PM. Reason : s]

3/8/2009 8:13:56 PM

joe_schmoe
All American
18758 Posts
user info
edit post

^^ nice try.

but unfortunately, the post record doesn't match this new story of yours.

your "correction" went from bad to worse. instead of fixing the incorrect conditional boundaries you reversed the divisor and dividend.

which made it immediately apparent you really had no clue what you were doing.

but im glad you've taken this opportunity to finally educate yourself on what everyone elsel learned in CSC 114.








[Edited on March 8, 2009 at 8:18 PM. Reason : ]

3/8/2009 8:15:21 PM

Tiberius
Suspended
7607 Posts
user info
edit post

^^So "the number has the only non-even bit set" is less clear than "the number has a remainder of 0 when divided by 2" when determining evenness? I don't think either is particularly more expressive of the test.

^ please find an example of me wasting a single post in this thread defending the function. really.

[Edited on March 8, 2009 at 8:18 PM. Reason : lulz]

3/8/2009 8:15:46 PM

Solinari
All American
16957 Posts
user info
edit post

Oh god, I knew you were gonna pull some bullshit on how bitwise-and is omfg so obvious. I'm not saying that you can't figure it out, but if it slows you down for even a little bit while you're reading through code, then its an unnecessary distraction, assuming performance is not an issue.

bitwise-and is used for many different functions. modulo operator is used for one. when someone comes across your mega-super-optimized bitwise-and, they're going to have to pause for a second as opposed to just, "ok he's grabbing the remainder here"

You'll learn these types of lessons with time and (a lot of) industry experience, though... I hope you get tasked with maintaining someone else's punctuation riddled perl code. You'll learn to hate cute little programming tricks pretty fast after an experience like that.


[Edited on March 8, 2009 at 8:24 PM. Reason : s]

3/8/2009 8:18:39 PM

joe_schmoe
All American
18758 Posts
user info
edit post

^^ im talking, of course, about the original chit chat thread where you "snickered" all the way through, and even attempted to "prove" it was correct by scripting the (incorrectly placed) divisors up to 50

it was only after it was finally brought here that you became suspicious that you were, in fact, wrong.





[Edited on March 8, 2009 at 8:22 PM. Reason : ]

3/8/2009 8:19:40 PM

scud
All American
10804 Posts
user info
edit post

arguing to use a bitwise operators is almost always going to be a premature optimization.

Unless you're in a really tight loop or in real-time priority code there's almost never a need for the obfuscation.

3/8/2009 8:23:35 PM

Wyloch
All American
4244 Posts
user info
edit post

^^ He's admitted that, about a dozen times.

3/8/2009 8:29:41 PM

Tiberius
Suspended
7607 Posts
user info
edit post

Quote :
"which made it immediately apparent you really had no clue what you were doing."


Yes... I had no clue what I was doing, that's why I went immediately to the correct test and merely had incorrect boundary conditions with an infrequently used operator. GOOD ONE TROLLFACE

Quote :
"but im glad you've taken this opportunity to finally educate yourself on what everyone elsel learned in CSC 114."


I can't find the class credits awarded for old AP tests right now, but I'm pretty sure CSC114 was one of the classes I got credit for with my 5 on the AP CS BC test. One of I believe 9 5's earned in the entire state of NC that year for the BC test, which was in C++ at the time. Guess I missed out.

Quote :
"it was only after it was finally brought here that you became suspicious that you were, in fact, wrong."


No, I realized I was wrong when it was demonstrated that the test failed at 51. I just didn't respond to it because it was embedded in a brick wall of assumptions and personal attacks that I didn't want to glorify. That takes me back to my point about respect being critical to working relationships in programming which you also ignored -- I don't think you'll find too many people that'll pat you on the back after you spent an hour deriding them for something they were in the process of confirming independantly.

[Edited on March 8, 2009 at 8:34 PM. Reason : .]

3/8/2009 8:30:57 PM

joe_schmoe
All American
18758 Posts
user info
edit post



Quote :
"One of I believe 9 5's earned in the entire state of NC that year for the BC test, which was in C++ at the time. "


sort of a sad indictment of NC's AP program if someone can ace a test and not even be aware of how to use basic arithmetic operators





[Edited on March 8, 2009 at 8:36 PM. Reason : ]

3/8/2009 8:32:04 PM

joe_schmoe
All American
18758 Posts
user info
edit post

one thing that hasnt been asked

if modulus is such an obfuscated, deprecated, and generally piss-poor operation that "real" programmers never use ...

then why was it Tiberius's immediate (if incorrectly applied) solution in the first place?

3/8/2009 8:36:51 PM

Tiberius
Suspended
7607 Posts
user info
edit post

Testing for evenness != testing for divisibility by 50. I never said modulo was inappropriate when testing for divisibility by 50?

[Edited on March 8, 2009 at 8:37 PM. Reason : .]



sort of a sad indictment of NC's AP program joe_schmoe if someone can ace a test and not even be aware of how to use basic arithmetic operators have to use a single modulo operation on the entire fucking thing, and I still have my code for the case study if you'd like to refer to it

PS: NCSU has nothing to do with the design of the CS test, it's done by the College Board and presumably by a committee including institutions that are actually reputable in Computer Science circles...

[Edited on March 8, 2009 at 8:41 PM. Reason : .]

3/8/2009 8:37:15 PM

joe_schmoe
All American
18758 Posts
user info
edit post

Quote :
"No, I realized I was wrong when it was demonstrated that the test failed at 51. I just didn't respond to it because [of a case of butthurt] "


so .... you instead continued to insist that it was right because.... you didnt think anyone else would notice??



goddamn, son, i hope you never work in a federally-regulated industry. you'll get a business shut down if you dont kill somebody first.

3/8/2009 8:40:50 PM

Solinari
All American
16957 Posts
user info
edit post

I always thought it was funny in my early engineering classes because all the kids who had taken AP classes thought they were some hot shit until about halfway through the class when they realized they had no clue what was going on.... You know the type.... answering questions and arguing with the professor the first few weeks, then you don't see them for a while after the first test, and by the midpoint they've completely dropped the class or are failing it and resigned to taking it in summer session

that shit was always funny because I would pick those kids out the first week of class and was usually dead-on

[Edited on March 8, 2009 at 8:42 PM. Reason : s]

3/8/2009 8:41:39 PM

Tiberius
Suspended
7607 Posts
user info
edit post

I didn't insist it was right even a single time after you demonstrated it failed at 51. Period. And I explicitly admitted it was wrong a dozen times since then.

Quit trying to glorify yourself because you caught a minor error, you trolly piece of shit!

^ LOLOL generalizations. I never argued with instructors, or really much cared about what went on in class. I always sat in the back and played on my computer in college. I was runner up for most likely to sleep in class in HS, but was pushed to take AP classes in spite of it by various faculty members, so I did

[Edited on March 8, 2009 at 8:45 PM. Reason : k]

3/8/2009 8:41:59 PM

joe_schmoe
All American
18758 Posts
user info
edit post

Final question, and then I will leave.

Quote :
"if modulus is such an obfuscated, deprecated, and generally piss-poor operation that "real" programmers never use ...

then why was it Tiberius's immediate (if incorrectly applied) solution in the first place?"

3/8/2009 8:46:24 PM

Tiberius
Suspended
7607 Posts
user info
edit post

Quote :
"Testing for evenness != testing for divisibility by 50. I never said modulo was inappropriate when testing for divisibility by 50."


The equivalent test for divisibility by 50 is not as transparent as the test for evenness, and runtime is not relevant in a message board post

3/8/2009 8:47:50 PM

joe_schmoe
All American
18758 Posts
user info
edit post

Quote :
"Tiberius: I always sat in the back and played on my computer in college. I was runner up for most likely to sleep in class"


well, that explains a lot. it's pretty [FAIL] if someone who prides themselves on slack, can't even win a goof-off contest.

welcome to the world of CAT5 and office furniture.






[Edited on March 8, 2009 at 8:51 PM. Reason : ]

3/8/2009 8:49:00 PM

Solinari
All American
16957 Posts
user info
edit post

^ yea it does explain a lot, actually, lol... "I'm so smart I didn't need to pay attention in class.... now I'm an IT monkey (sadface) I wonder how that happened"

[Edited on March 8, 2009 at 8:50 PM. Reason : s]

3/8/2009 8:50:04 PM

Wyloch
All American
4244 Posts
user info
edit post

3/8/2009 8:50:28 PM

joe_schmoe
All American
18758 Posts
user info
edit post

^ aha

well, at least i actually won my H.S. class contest for "most likely to be dead or incarcerated by 23".

cause, you see, i do shit right. not half assed like Mr. "modulus is stupid, but ill mangle it anyhow" Tiberius, there.







[Edited on March 8, 2009 at 8:57 PM. Reason : ]

3/8/2009 8:52:49 PM

Solinari
All American
16957 Posts
user info
edit post





[Edited on March 8, 2009 at 8:59 PM. Reason : s]

3/8/2009 8:58:17 PM

Tiberius
Suspended
7607 Posts
user info
edit post

Hey guys: I'm still not a sysadmin, I am a full-time student currently. Don't let that distract you from your attempts to self-glorify with sweeping generalizations, though. You're definitely the coolest people in the world because of whatever the last post said.

[Edited on March 8, 2009 at 9:21 PM. Reason : .]

3/8/2009 9:08:30 PM

joe_schmoe
All American
18758 Posts
user info
edit post

Final question, and then I will leave.

Quote :
"if modulus is such an obfuscated, deprecated, and generally piss-poor operation that "real" programmers never use ...

then why was it Tiberius's immediate (if incorrectly applied) solution in the first place?"

3/8/2009 9:11:54 PM

Tiberius
Suspended
7607 Posts
user info
edit post

I have responded to that twice. If you repeat it enough maybe one of the riders of the hate-train will pat you on the back, though.

Quote :
"well, that explains a lot. it's pretty [FAIL] if someone who prides themselves on slack, can't even win a goof-off contest. "


The black guy won. There were pretty distinct voting blocs in our high school... 'nuff said.

[Edited on March 8, 2009 at 9:20 PM. Reason : so many jokes to play off of that, so unrelated to the thread ]

3/8/2009 9:15:57 PM

joe_schmoe
All American
18758 Posts
user info
edit post

^
Quote :
"The black guy won. "


oh, okay. i see now.

the black folks are keeping you down.

i guess it was black folks who prevented you from learning how basic arithmetic operators function, too.









[Edited on March 8, 2009 at 9:23 PM. Reason : ]

3/8/2009 9:21:15 PM

Tiberius
Suspended
7607 Posts
user info
edit post

Joe "One-Trick Pony" Schmoe

[Edited on March 8, 2009 at 9:25 PM. Reason : ]

3/8/2009 9:22:47 PM

Stein
All American
19842 Posts
user info
edit post

All you dudes are arguing over the modulo, when Tiberius made a clear point of saying "If you do the math" and then fucked up subtraction.

Thinking before he posts obviously isn't his specialty.

3/8/2009 9:45:57 PM

Tiberius
Suspended
7607 Posts
user info
edit post

Quote :
"Major : Communication - Media"


STEP OUT DA BAR SON

3/8/2009 9:50:21 PM

Stein
All American
19842 Posts
user info
edit post

If you want to call out the degrees people have, maybe you should get one first.

[Edited on March 8, 2009 at 9:55 PM. Reason : Oh wait, you got AP credit years ago. My bad!]

3/8/2009 9:55:12 PM

Tiberius
Suspended
7607 Posts
user info
edit post

Stein: still butthurt about all those jew jokes

I wouldn't even think to call out your degree, except you do realize you're the only person in 3 pages of hate-train to bother nitpicking the subtraction right? I wonder if there's any connection.

[Edited on March 8, 2009 at 10:00 PM. Reason : .]

3/8/2009 9:56:59 PM

Stein
All American
19842 Posts
user info
edit post

Yes, Tiberius. My three (now four!) post hate-train.

Lets play a game. If you took the number of idiotic posts you've made in this thread and then subtracted the number of posts that I've made in this thread:

How many extra cars would be on your "hate-train"?

[Edited on March 8, 2009 at 10:05 PM. Reason : .]

3/8/2009 10:04:57 PM

Tiberius
Suspended
7607 Posts
user info
edit post

ooh ooh I know *raises hand*

the answer is... one lame-ass retort

wait, what was the question again?

3/8/2009 10:05:55 PM

smoothcrim
Universal Magnetic!
18966 Posts
user info
edit post

code monkey's slingin shit at IT guys

sad day, tech talk, sad day.

you're all monkeys unless people work for you

3/9/2009 12:23:30 AM

 Message Boards » Tech Talk » Modulo operator is so HARD :( Page 1 2 [3] 4, Prev Next  
go to top | |
Admin Options : move topic | lock topic

© 2024 by The Wolf Web - All Rights Reserved.
The material located at this site is not endorsed, sponsored or provided by or on behalf of North Carolina State University.
Powered by CrazyWeb v2.39 - our disclaimer.