d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > New To Programming > I Would Like To Learn How
Prev14567Next
Add Reply New Topic New Poll
Member
Posts: 23,862
Joined: Aug 16 2006
Gold: 20.00
Oct 18 2012 07:09pm
Quote (irimi @ Oct 18 2012 07:48pm)
The amount to which you can take almost everything personally continues to amaze and astound me.

Someone posts a thread offering some fairly solid/useful advice for people who want to become better programmers ---> you take it as an affront to the way you learn.
Someone calls out your "advice" for being terrible ---> you take it as an attempt to undermine your efforts in helping someone (or at least, to undermine the recognition of you helping someone).
Someone says you can barely program ---> you think this is about you.

Hey, that sounds familiar.  You think this is about you.  I've said it before, and I'll say it again: it isn't about you.  It never was.


Nobody's said anything about them being screwed for the rest of their lives.  That's more stuff that's just all in your head.


sigh...

1: That is the surface that you see. What I saw? Some guy who apparently is failing trying to give advice to the next gen. That is like a drunkard saying DON'T DRINK KIDS, DON'T BE LIKE ME. I don't think that is helpful at all. I don't need life advice from someone who is failing a class.

2: I already explained this. You chose to believe that I apparently only think about myself. How can I possibly defend anything I say ever if your only response is YOU THINK THIS IS ABOUT YOU. Uhhhh, if you are talking about me, to me, then yes, I daresay it is about me!

3: The OP found what he needed and left by this point. You all chose to ignore his post and keep fighting FERVENTLY against what I posted. The OP didn't ask you to fact check me.

Member
Posts: 11,637
Joined: Feb 2 2004
Gold: 434.84
Oct 18 2012 07:14pm
Quote (Eep @ Oct 18 2012 08:09pm)
sigh...

1: That is the surface that you see. What I saw? Some guy who apparently is failing trying to give advice to the next gen. That is like a drunkard saying DON'T DRINK KIDS, DON'T BE LIKE ME. I don't think that is helpful at all. I don't need life advice from someone who is failing a class.

2: I already explained this. You chose to believe that I apparently only think about myself. How can I possibly defend anything I say ever if your only response is YOU THINK THIS IS ABOUT YOU. Uhhhh, if you are talking about me, to me, then yes, I daresay it is about me!

3: The OP found what he needed and left by this point. You all chose to ignore his post and keep fighting FERVENTLY against what I posted. The OP didn't ask you to fact check me.


1. What are you talking about?

2. Lol.

3. What I hear is "I'm never wrong, so don't dare fact check me."
Member
Posts: 23,862
Joined: Aug 16 2006
Gold: 20.00
Oct 18 2012 07:18pm
Quote (rockonkenshin @ Oct 18 2012 08:14pm)
1. What are you talking about?

2. Lol.

3. What I hear is "I'm never wrong, so don't dare fact check me."


1: something not this topic

2: Lol

3: Find the part where I ever said I was never wrong about anything ever at all in this forum. Just one example, and I will shut up forever.
Member
Posts: 4,605
Joined: Sep 15 2011
Gold: 9,464.00
Oct 18 2012 10:02pm
If I actually gave a shit I would actually feel sorry for you.

But instead I am just entertained.
Member
Posts: 23,862
Joined: Aug 16 2006
Gold: 20.00
Oct 18 2012 10:06pm
Quote (irimi @ Oct 18 2012 11:02pm)
If I actually gave a shit I would actually feel sorry for you.

But instead I am just entertained.


you get entertained in perverse ways

I share the giving a shit sentiment though
Member
Posts: 13,425
Joined: Sep 29 2007
Gold: 0.00
Warn: 20%
Oct 18 2012 10:35pm
why are you kids fighting

if this was a battle of wits youd both lose to me

kthnx <3
Member
Posts: 4,605
Joined: Sep 15 2011
Gold: 9,464.00
Oct 18 2012 11:04pm
Quote (AbDuCt @ Oct 18 2012 09:35pm)
if this was a battle of wits youd both lose to me


OH NO HE DINT

Member
Posts: 13,425
Joined: Sep 29 2007
Gold: 0.00
Warn: 20%
Oct 18 2012 11:16pm
Quote (irimi @ Oct 19 2012 01:04am)
OH NO HE DINT


OH YES I DID.

im just fucking around with pointers and strings atm lol shit gets confusing to follow if you dont have a debugger.

thats just step 1 of the command parsing lol. step 2 is to strtok the deciphered command and launch functions based on the strtok'd arguments

Code
int DecipherCommand(char *CommandToParse)
{
   char *p, *q, *t;
   int i = 0;

   while(Commands[i].CommandName != 0)
   {
       p = strstr(CommandToParse, Commands[i].CommandName);

       if(p != NULL)
       {
           for(q = p; *q != '\0' && *q != ' '; q++);

           while(*++q != '\0' && *q == ' ');

           for(p = q; *q != '\0' && *q != ' '; q++);

           t = malloc(q - p);
           ZeroMemory(t, q - p + 1);

           strncpy(t, p, q - p);

           Cypher(t);

           Printf("%s\n", t);

           free(t);

           break;
       }

       i++;
   }

return 0; //no command
}

void Cypher(char *str)
{
char *p = str;

   while(*p)
   {
       if(*p >= ' ' && *p <= 'O')
       {
           *p = ((*p + 48) % 127);
       }
       else if(*p >= 'P' && *p <= '~')
       {
           *p = ((*p - 48) % 127);
       }

       p++;
   }
}
Member
Posts: 4,605
Joined: Sep 15 2011
Gold: 9,464.00
Oct 18 2012 11:22pm
Reminds me of an interview question a colleague of mine once shared -- near the end of the interview, he'd ask the interviewees to rate their own C knowledge on a scale of 1-10. Anybody who answered in the range of 7-9 would get this question popped on them:

What does this function do?
Code
void
doit(a,b)
char *a, *b;
{
   char *c, **d;
   for( d = &b; *d; d++ )
   {
       c = *d;
       while( *a++ = *c++ )
       ;
       a--;
   }
}


Though in fairness, the variable names for p, q, and t all make sense given that it's in the context of cryptography.

In other news, I just got the new retina MBP from work today. And it is sweeeeeeet.

This post was edited by irimi on Oct 18 2012 11:28pm
Member
Posts: 13,425
Joined: Sep 29 2007
Gold: 0.00
Warn: 20%
Oct 18 2012 11:28pm
Quote (irimi @ Oct 19 2012 01:22am)
Reminds me of an interview question a colleague of mine once shared -- near the end of the interview, he'd ask the interviewees to rate their own C knowledge on a scale of 1-10. Anybody who answered in the range of 7-9 would get this question popped on them:

What does this function do?
Code
void
doit(a,b)
char *a, *b;
{
   char *c, **d;
   for( d = &b; *d; d++ )
   {
       c = *d;
       while( *a++ = *c++ )
        ;
       a--;
   }
}


Though in fairness, the variable names for p, q, and t all make sense given that it's in the context of cryptography.


i wouldnt even start to know how to answer that without plugging it into a debugger >.>
Go Back To Programming & Development Topic List
Prev14567Next
Add Reply New Topic New Poll