As was foretold, we've added advertisements to the forums! If you have questions, or if you encounter any bugs, please visit this thread: https://forums.penny-arcade.com/discussion/240191/forum-advertisement-faq-and-reports-thread/
Options

YA[Programming]T :: Interview? That's an MVC thing, right?

194959698100

Posts

  • Options
    bowenbowen How you doin'? Registered User regular
    They'd probably hire you for your sense of humor.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    DietarySupplementDietarySupplement Still not approved by the FDA Dublin, OHRegistered User regular
    Or give the snipers providing cover the "go" signal.

  • Options
    TavTav Irish Minister for DefenceRegistered User regular
    edited September 2012
    Phyphor wrote: »
    Also, has anyone here gone through the Google interview process? Are they as crazy as the stories say?

    I know two folks who've taken them. The answer is yes.

    Tav on
  • Options
    EtheaEthea Registered User regular
    edited September 2012
    bowen wrote: »
    Ethea wrote: »
    I really should take a picture of my current setup just annoy @bowen :p

    I wouldn't be opposed @Ethea I like to see that stuff even if I get jealous.

    Here is the album of my setup http://imgur.com/a/13uYv#0.

    I use a 30 inch dell monitor on a Ergotron sit/stand desk, when I need to sit down I use a yoga ball since I am slightly crazy.
    Keyboard of choice is a Leopold cherry brown 10 keyless. The entire setup is routed into an iogear Dual-Link DVI KVM which is controlled with quick switches on the keyboard ( Scroll+Scroll+NUM).

    Current list of machines connected to the KVM:
    • Ubuntu 12 Dell T3500:
      • Quad Core Xeon @ 2.8HZ
      • 6GB Memory
      • Nvidia Quadro 1800
      • 512GB SSD RevoDrive
    • OSX Mac Book Pro Retina:
      • Quad Core i7 @ 2.6HZ
      • 16GB Memory
      • Nvidia GT 650M
      • 256GB SSD
    • Windows 7x64 Dell T1500:
      • Quad Core i7 @ 2.8HZ ( Old Gen )
      • 8GB Memory
      • Nvidia Quadro 800?
      • 1TB storage space
    • OSX1.6 Mac Book Pro (2007):
      • Only used to test Snow lepoard support

    Edit:
    @bowen here is the info you requested.

    Ethea on
  • Options
    urahonkyurahonky Registered User regular
    Wow I really just don't like C at all it seems. Even getting standard input through a for loop is frustratingly difficult for me. I have a char array (8 chars) that I want a user to type in a HEX location. And for some reason when they hit "ENTER" after typing in the 8 characters that gets appended to the char array so it goes through the while loop twice. Once for the 80000000 and then again for the "ENTER". How in the shit do I make it not do this?

    Man I can't believe that I prefer Java over C.

  • Options
    EtheaEthea Registered User regular
    edited September 2012
    urahonky wrote: »
    Wow I really just don't like C at all it seems. Even getting standard input through a for loop is frustratingly difficult for me. I have a char array (8 chars) that I want a user to type in a HEX location. And for some reason when they hit "ENTER" after typing in the 8 characters that gets appended to the char array so it goes through the while loop twice. Once for the 80000000 and then again for the "ENTER". How in the shit do I make it not do this?

    Man I can't believe that I prefer Java over C.

    show us the code! I guess you aren't properly null terminating your input strings.

    Ethea on
  • Options
    urahonkyurahonky Registered User regular
    I warn you: it looks fucking terrible. It's easily the worst code I've ever written.
    while(input[0] != 'q')
    				{
    					printf("Enter memory address (or 'q' to quit): ");
    					fgets(input, 9, stdin);	
    
    					if(input[0] == 'q')
    					{
    						CloseHandle(hFile);
    						ControlService(hService, SERVICE_CONTROL_STOP, &ss);
    						CloseServiceHandle(hService);
    						DeleteService(hService);
    						fclose(fp);
    						CloseServiceHandle(hSCManager);
    						return 0;
    					}
    					// tmp = input[0];
    					for(i = 0; i < 8; i++)
    					{
    						// printf("[%c] ",input[i]);
    						if(input[i] == '\0')
    						{
    							break;
    						}
    						switch(input[i])
    						{
    							case 'a':
    							case 'A':
    							case 'b':
    							case 'B':
    							case 'c':
    							case 'C':
    							case 'd':
    							case 'D':
    							case 'e':
    							case 'E':
    							case 'f':
    							case 'F':
    							case '0':
    							case '1':
    							case '2':
    							case '3':
    							case '4':
    							case '5':
    							case '6':
    							case '7':
    							case '8':
    							case '9':
    								good = 1;
    								break;
    							default:
    								// printf("%c is not hex. \n", input[i]);
    								good = 0;
    								break;
    						}
    						if(good == 0)
    						{
    							break;
    						}
    					}
    					
    					input[8] = 'q';
    
    					if(good == 1)
    					{
    						WriteFile(hFile, input, sizeof(input), &dwReturn, NULL);
    						ReadFile(hFile, &c, 256, &dwReturn, NULL);
    						printf("Output: \n");
    						fprintf(fp, "------------\n");
    						fprintf(fp, "Run started on: %s", asctime(localtime(&ltime)));
    						fprintf(fp, "------------\n");
    						fprintf(fp, "%s",c);
    						fprintf(fp, "------------\n");
    						fprintf(fp, "Run complete.\n");
    						fprintf(fp, "------------\n\n");
    						printf("%s\n\n", c);
    					}
    				}
    

  • Options
    urahonkyurahonky Registered User regular
    edited September 2012
    Basically I'm in a hurry because my CEO wants a demo of all the things we've worked on... And of course I abandoned actually fixing the above code because we were working on getting the SATA controller to actually work.

    e: Also fuck Powerpoint in its ass.

    urahonky on
  • Options
    agoajagoaj Top Tier One FearRegistered User regular
    edited September 2012
    if(input[i] == '\r' || input[i] == '\n')
    {
    input[i] = '\0'; //String now terminates at this character.
    break;
    }
    

    If you know that those will be at the end of the string, just set it to '\0' and end the loop.

    agoaj on
    ujav5b9gwj1s.png
  • Options
    urahonkyurahonky Registered User regular
    agoaj wrote: »
    if(input[i] == '\r' || input[i] == '\n') continue;
    

    That seems to make it run twice.

  • Options
    urahonkyurahonky Registered User regular
    edited September 2012
    Still running twice.

    Fuck it I don't think I'm going to show him this. It looks like shit and makes me look like shit.
    Fuck C.

    urahonky on
  • Options
    agoajagoaj Top Tier One FearRegistered User regular
    for(i = 0; i < 8; i++)
    					{
    						// printf("[%c] ",input[i]);
    						if(input[i] == '\0' || input[i] == '\r' || input[i] == '\n') //These all denote the end of useful information.
    						{
                                                            input[i] = 'q'; //set file terminator
    							break;
    						}
    						switch(input[i])
    						{
    							case 'a':
    							case 'A':
    ~
    

    ujav5b9gwj1s.png
  • Options
    urahonkyurahonky Registered User regular
    Tried the 'q' as well, didn't seem to change anything. It's alright agoaj I'm just going to run it and it'll output twice but it doesn't really matter.

  • Options
    PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    Try a bigger buffer - with size 9 fgets will probably give you your 8 characters and then a NUL. Then it will notice that it still has a newline in the buffer so it'll give you that. With a bigger buffer you'll get it all

  • Options
    bowenbowen How you doin'? Registered User regular
    @ethea I am most jealous of your medicine ball

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    bowenbowen How you doin'? Registered User regular
    Windows appends \r\n instead of just \r or just \n, it's both of them. Keep that in mind. @urahonky

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    Alternately, since it is user mode, compile as C++ and just cin to a std::string

  • Options
    bowenbowen How you doin'? Registered User regular
    edited September 2012
    bowen on
    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    bowenbowen How you doin'? Registered User regular
    Phyphor wrote: »
    Alternately, since it is user mode, compile as C++ and just cin to a std::string

    A better answer.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    bowenbowen How you doin'? Registered User regular
    Man there is like no room in here for that. I had contemplated getting a desk pedal for a little light aerobics during the day.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    JasconiusJasconius sword criminal mad onlineRegistered User regular
    i am waist deep in XNA

    my game has buttons

    and console readout

    and absolutely zero graphics

  • Options
    StarfuckStarfuck Registered User, ClubPA regular
    So it's an indie game...

    jackfaces
    "If you're going to play tiddly winks, play it with man hole covers."
    - John McCallum
  • Options
    Joe KJoe K Registered User regular
    @urahonky - alternatively to using cin, sscanf() is your friend.

  • Options
    TofystedethTofystedeth Registered User regular
    Another boolean reduction question.
    When eliminating terms using the the consensus theorem, you can't eliminate a consensus term if one of the terms that makes it has already been removed. Can you remove a term if it is one of the components of a consensus term you've already removed?
    Specifically:
    A'B'C + ABD + A'CDE + BCDE + A'BDE
    ABD and A'CDE have BCDE as a consensus term
    A'B'C and A'BDE have A'CDE
    I can't remove A'CDE and then BCDE, but I think I can remove BCDE and then A'CDE.
    My reasoning being that
    A'B'C + ABD + A'CDE + BCDE + A'BDE
    and
    A'B'C + ABD + A'CDE + A'BDE
    are equivalent, so at that point I could treat it as a new equation, find my consensus terms and remove A'CDE.

    I think I'm correct in this. I'm not crazy correct?

    steam_sig.png
  • Options
    SmasherSmasher Starting to get dizzy Registered User regular
    I can't see any reason that wouldn't be valid.

  • Options
    JasconiusJasconius sword criminal mad onlineRegistered User regular
    Starfuck wrote: »
    So it's an indie game...

    correct

  • Options
    EchoEcho ski-bap ba-dapModerator mod
    Okay. Teach me how2git properly.

    I have my fork of OctoPress on github. I found a very minor bug, wrote a quick fix for it, and thought I'd see how pull requests work so I can get that fix into the main repo.

    When I try to submit a pull request on github, it wants to submit all my commits from my fork.

    Problem seems to be that I didn't make a branch before I commited my fix and it's thus in my master branch, and I can't figure out how to set things up to get a branch with just that commit so I can submit it.

  • Options
    InfidelInfidel Heretic Registered User regular
    Echo wrote: »
    Okay. Teach me how2git properly.

    I have my fork of OctoPress on github. I found a very minor bug, wrote a quick fix for it, and thought I'd see how pull requests work so I can get that fix into the main repo.

    When I try to submit a pull request on github, it wants to submit all my commits from my fork.

    Problem seems to be that I didn't make a branch before I commited my fix and it's thus in my master branch, and I can't figure out how to set things up to get a branch with just that commit so I can submit it.

    Do a clean pull of the repo, redo the patch on that one, and do a pull request from there?

    You can't go back to the baseline unless you revert everything you've done, so best to just do it on the side, so to speak.

    OrokosPA.png
  • Options
    EchoEcho ski-bap ba-dapModerator mod
    ...yeah, I suppose you can do it the easy way too.

  • Options
    bowenbowen How you doin'? Registered User regular
    I really should set up a proper repo at work. I am just so complacent with my backup and dropbox that it seems like more of an inconvenience than anything!

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    InfidelInfidel Heretic Registered User regular
    bowen wrote: »
    I really should set up a proper repo at work. I am just so complacent with my backup and dropbox that it seems like more of an inconvenience than anything!

    Source control is way more than just a backup and you know it.

    Quit being lazy! :D

    OrokosPA.png
  • Options
    zeenyzeeny Registered User regular
    It's impossible to develop over extended periods of time without version control. Be it a personal project or work.

  • Options
    EtheaEthea Registered User regular
    Echo wrote: »
    ...yeah, I suppose you can do it the easy way too.

    If it is a single commit, a quick way is to create a format patch, presuming you have the original
    repo as a remote called upstream:

    git format-patch HEAD~1
    git checkout upstream/master
    git checkout -b fix_branch
    git am 000*


    Another option is to cherry-pick the commits onto a new branch based of upstream master
    git checkout upstream/master
    git checkout -b fix_branch
    git cherry-pick SHA1

  • Options
    bowenbowen How you doin'? Registered User regular
    Infidel wrote: »
    bowen wrote: »
    I really should set up a proper repo at work. I am just so complacent with my backup and dropbox that it seems like more of an inconvenience than anything!

    Source control is way more than just a backup and you know it.

    Quit being lazy! :D

    I don't make mistakes, is what I'm alluding to.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    BarrakkethBarrakketh Registered User regular
    bowen wrote: »
    Infidel wrote: »
    bowen wrote: »
    I really should set up a proper repo at work. I am just so complacent with my backup and dropbox that it seems like more of an inconvenience than anything!

    Source control is way more than just a backup and you know it.

    Quit being lazy! :D

    I don't make mistakes, is what I'm alluding to.

    But you aren't using a repo.
    That is, at a minimum, mistake #1.

    Rollers are red, chargers are blue....omae wa mou shindeiru
  • Options
    bowenbowen How you doin'? Registered User regular
    Hmm, I don't make coding mistakes?

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    EchoEcho ski-bap ba-dapModerator mod
    There, now I got a pull request done.

    I'm using Tower and not the CLI. I created a branch from the upstream HEAD and committed my fix from there, which let me do a proper pull request without the crap from my own fork.

  • Options
    [Michael][Michael] Registered User regular
    edited September 2012
    bowen wrote: »

    Neato beano. Though the part of IOS development that stops me every time from actually diving in all the way is the UI coding. I've been doing just straight Android, or Corona SDK for cross-platform, but I swear Corona can't do half the things I want it to. This might make it a little more reasonable to try my hand at converting some Android apps to IOS.

    [Michael] on
  • Options
    bowenbowen How you doin'? Registered User regular
    Yeah that's a too bad. Silly UI.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
This discussion has been closed.