| View previous topic :: View next topic |
| Author |
Message |
Aviar³ Grandmaster Cheater
Reputation: 50
Joined: 03 Jan 2008 Posts: 655 Location: Canada
|
Posted: Tue Apr 03, 2012 5:28 am Post subject: |
|
|
Oh god, Ill never understand IOC. Ever.
_________________
This is the inception of deception, checking the depth of your perception.
 |
|
| Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Tue Apr 03, 2012 5:31 am Post subject: |
|
|
| I wouldn't worry too much. Many students become aware of high level concepts like this early on but fail to see the value because they are used to working with relatively minuscule codebases that likely have very little or no tests. As a start, mocking might be a concept you'll find more immediately understandable and applicable.
|
|
| Back to top |
|
 |
Aviar³ Grandmaster Cheater
Reputation: 50
Joined: 03 Jan 2008 Posts: 655 Location: Canada
|
Posted: Tue Apr 03, 2012 5:35 am Post subject: |
|
|
I literally don't understand its purpose. I get using test driven design for ensuring that code fufills system requirements, but the way I see IOC, it allows you to replace certain classes for other classes, sort of like drop-ins or something. Not sure.
_________________
This is the inception of deception, checking the depth of your perception.
 |
|
| Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Tue Apr 03, 2012 6:18 am Post subject: |
|
|
from rot1's derep comment:
| rot1 wrote: | You probably don't know how the compiler handles casting... stupid fuck.
stop talking shit before thinking you're better than someone, especially x0r.
you didn't do anyshit (not even close to 0.5%) from what he did, so all of the sudden you think you're an expert programmer ? lol. you're abit too late, sorry to inform you.  |
if you left out your technical rebuttal, it would've been fine, just your regular deluded self. instead now you make yourself look like a fool/'stupid fuck' by actually posting something concrete. the casting has nothing to do with the compiler lol. the C language standard mandates that void pointers can be implicitly cast to any other pointer type. the promotion is both safe and automatic. the question i linked to gives an example of why casting malloc is bad.
here is another example of where unnecessary and redundant casting will fuck you over:
| Code: | #include <stdlib.h>
#include <stdint.h>
int main(void)
{
uint32_t * cock;
uint64_t * rot1;
rot1 = cock;
return EXIT_SUCCESS;
} |
compiling with:
| Code: | | gcc -std=gnu99 lala.c -o lala |
will give the following warnings:
| Quote: | lala.c: In function ‘main’:
lala.c:9: warning: assignment from incompatible pointer type |
adding a cast (uint64_t *)cock removes the warning but now you have hidden an error. at best you now have unsafe code that could crash. at worst you have undefined behaviour from accessing random memory. consequentially, this can result in far worse things.
| rot1 wrote: | | stop talking shit before thinking you're better than someone, especially x0r. |
i am better than x0r lol. you know i did preemptively apologise for debunking your great hero because i knew you'll take an emotional hit from it. so if you're fishing for another apology, it ain't coming. if you're looking for a shoulder to cry on, here's a nice big one
|
|
| Back to top |
|
 |
Cryoma Member of the Year
Reputation: 198
Joined: 14 Jan 2009 Posts: 1819
|
Posted: Tue Apr 03, 2012 9:28 am Post subject: |
|
|
| Oh look, mike's back.
|
|
| Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Tue Apr 03, 2012 11:36 am Post subject: |
|
|
| Since when was I on first name terms with an idiot?
|
|
| Back to top |
|
 |
Cryoma Member of the Year
Reputation: 198
Joined: 14 Jan 2009 Posts: 1819
|
Posted: Tue Apr 03, 2012 11:38 am Post subject: |
|
|
| Oh, are you mike?
|
|
| Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Tue Apr 03, 2012 11:44 am Post subject: |
|
|
| This is why girls don't like you. Because you're annoying in the same way a 12 year old boy who keeps pinching girls is. And you wonder why you're single? Of course your ridiculous hair and face does not help matters
|
|
| Back to top |
|
 |
Cryoma Member of the Year
Reputation: 198
Joined: 14 Jan 2009 Posts: 1819
|
Posted: Tue Apr 03, 2012 11:45 am Post subject: |
|
|
I have a waifu.
|
|
| Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Tue Apr 03, 2012 11:46 am Post subject: |
|
|
| That's why you think seeing a boob is like winning a small lottery. Yes. Yes
|
|
| Back to top |
|
 |
Cryoma Member of the Year
Reputation: 198
Joined: 14 Jan 2009 Posts: 1819
|
Posted: Tue Apr 03, 2012 11:50 am Post subject: |
|
|
| Slugsnack wrote: | | That's why you think seeing a boob is like winning a small lottery. Yes. Yes |
Tell me hotstuff, have I rustled your jimmies?
|
|
| Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Tue Apr 03, 2012 12:00 pm Post subject: |
|
|
| Yep. Sure. My jimmies are rustled. Are your fudges packed?
|
|
| Back to top |
|
 |
Cryoma Member of the Year
Reputation: 198
Joined: 14 Jan 2009 Posts: 1819
|
Posted: Tue Apr 03, 2012 12:11 pm Post subject: |
|
|
| Packed and ready to go, seeya.
|
|
| Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Tue Apr 03, 2012 12:18 pm Post subject: |
|
|
| yep i guessed you didn't really know what that meant but would reply in a retarded way regardless
|
|
| Back to top |
|
 |
Sui Expert Cheater
Reputation: 7
Joined: 04 Sep 2008 Posts: 119
|
Posted: Tue Apr 03, 2012 12:21 pm Post subject: |
|
|
The force is strong with this one.
Send him to 4chan, he'll ruin everything for everyone.
_________________
|
|
| Back to top |
|
 |
|