• I signed up for Computer Programming 1, instead I get CP1-where-I'll-learn-Fundamntls
    69 replies, posted
Well, I was so excited of 9th grade because of C++ programming class i was like :D, but sadly all they did their was explain fundamentals :*(. And all the people their just slacked off the last 20mins of class and went to LMPD.COM to play games,great site for games BTW it is never blocked. So it was not long before I came to my senses and got a book that taught me something! Anyway now I am happy and on my way to mastering C++ :D. So screw school and get a book!
:golfclap: this is 1 week old [editline]03:07PM[/editline] and you bumped it
Great, now I have to see this shitty thread again
i am in Programming 1 also, he gives us what he thinks will take like an hour - an hour 15 and everyone finishes in 15 and then we play comp games. we just started basic and it does pretty much everything for you besides name color and text. just wondering but do you go to HHS?
Well I'm taking SDD (Software Design and Development) at my school next year (Australian by the way). There's two IT teachers at our school and while one of them is useless the other actually knows a fair bit and teaches us a lot. As well as this, I convinced him to sign our school up to DreamSpark and get Expression Studio and Visual Studio for our class next year. As far as I know we learn python to start out with and then we can use whatever language we want for projects and stuff. So hopefully I'll be able to use C#. It should be good.
this just in stop bumping
[QUOTE=PvtCupcakes;18316435]I'd have to spend all day explaining stuff to him. He takes points off for other stupid things. I had a loop like this: [code] for(int i = 0; i < 5; i++) { String line = in.nextLine(); if(line == null) break; } [/code] And I lost points because my loop wasn't like this: [code] String line = ""; for(int i = 0; i < 5 && line != null; i++) { line = in.nextLine(); } [/code] [/QUOTE] I'd fail you for the break statement.
[B]THIS JUST IN. STOP BUMPING.[/B] [B]THIS JUST IN. STOP BUMPING.[/B] [B]THIS JUST IN. STOP BUMPING.[/B] [B]THIS JUST IN. STOP BUMPING.[/B] [B]THIS JUST IN. STOP BUMPING.[/B] [B]THIS JUST IN. STOP BUMPING.[/B] [B]THIS JUST IN. STOP BUMPING.[/B] [B]THIS JUST IN. STOP BUMPING.[/B] [B]THIS JUST IN. STOP BUMPING.[/B] [B]THIS JUST IN. STOP BUMPING.[/B] [B]THIS JUST IN. STOP BUMPING.[/B] [B]THIS JUST IN. STOP BUMPING.[/B] [B]THIS JUST IN. STOP BUMPING.[/B] [B]THIS JUST IN. STOP BUMPING.[/B] [B]THIS JUST IN. STOP BUMPING.[/B] [B]THIS JUST IN. STOP BUMPING.[/B] [B]THIS JUST IN. STOP BUMPING.[/B] [B]THIS JUST IN. STOP BUMPING.[/B] [B]THIS JUST IN. STOP BUMPING.[/B] [B]THIS JUST IN. STOP BUMPING.[/B] [B]THIS JUST IN. STOP BUMPING.[/B] [B]THIS JUST IN. STOP BUMPING.[/B] stop it now
[QUOTE=cas97;18516883][B]THIS JUST IN. STOP BUMPING.[/B] [B]THIS JUST IN. STOP BUMPING.[/B] [B]THIS JUST IN. STOP BUMPING.[/B] [B]THIS JUST IN. STOP BUMPING.[/B] [B]THIS JUST IN. STOP BUMPING.[/B] [B]THIS JUST IN. STOP BUMPING.[/B] [B]THIS JUST IN. STOP BUMPING.[/B] [B]THIS JUST IN. STOP BUMPING.[/B] [B]THIS JUST IN. STOP BUMPING.[/B] [B]THIS JUST IN. STOP BUMPING.[/B] [B]THIS JUST IN. STOP BUMPING.[/B] [B]THIS JUST IN. STOP BUMPING.[/B] [B]THIS JUST IN. STOP BUMPING.[/B] [B]THIS JUST IN. STOP BUMPING.[/B] [B]THIS JUST IN. STOP BUMPING.[/B] [B]THIS JUST IN. STOP BUMPING.[/B] [B]THIS JUST IN. STOP BUMPING.[/B] [B]THIS JUST IN. STOP BUMPING.[/B] [B]THIS JUST IN. STOP BUMPING.[/B] [B]THIS JUST IN. STOP BUMPING.[/B] [B]THIS JUST IN. STOP BUMPING.[/B] [B]THIS JUST IN. STOP BUMPING.[/B] stop it now[/QUOTE] [img]http://www.facepunch.com/image.php?u=238288&dateline=1251296951[/img]
In my high school we did visual basic for cs1, java for cs2 and cs3 was independent study and I taugt myself c++. I'm in college now for a bs in cs but Schools only teach you basics, it's up to you to learn efficient ways of programming and whatnot, technology changes fast, if you wana have a career in it like me you have to be able to teach yourself.
[img]http://www.facepunch.com/image.php?u=238288&dateline=1251296951[/img] [editline]03:34PM[/editline] No really, stop posting in this thread
[QUOTE=cas97;18519160][img]http://www.facepunch.com/image.php?u=238288&dateline=1251296951[/img] [editline]03:34PM[/editline] No really, stop posting in this thread[/QUOTE] [img]http://i202.photobucket.com/albums/aa69/Airbub/irony-meter.gif[/img]
[QUOTE=PvtCupcakes;18316435]I'd have to spend all day explaining stuff to him. He takes points off for other stupid things. I had a loop like this: [code] for(int i = 0; i < 5; i++) { String line = in.nextLine(); if(line == null) break; } [/code] And I lost points because my loop wasn't like this: [code] String line = ""; for(int i = 0; i < 5 && line != null; i++) { line = in.nextLine(); } [/code] :raise:[/QUOTE] Maybe you should take his advice. His version is better because as the String object is declared outside of the loop, it stops Garbage Collection from kicking in every iteration. Also, loop logic IS IN THE FOR STATEMENT, as opposed to tacked on the the for-loop body. Just sayin' is all
[QUOTE=turby;18522592]Maybe you should take his advice. His version is better because as the String object is declared outside of the loop, it stops Garbage Collection from kicking in every iteration. Also, loop logic IS IN THE FOR STATEMENT, as opposed to tacked on the the for-loop body. Just sayin' is all[/QUOTE] I never worry about the garbage collector. :v: Maybe the new G1 gc in JDK 7 won't kick in on loops like you mentioned.
[QUOTE=Clavus;18296142]My Computer Science teacher on high school was pretty cool. He let us mess around with java and Game Maker (although I knew more about it than him). Even the mandatory stuff, like databases, was very informative.[/QUOTE] What school did you go to? As my high school teacher, and his lessons, sound pretty much the same as yours, it sounded pretty familiar, and then i checked your profile, and your dutch to :O.
[QUOTE=PvtCupcakes;18523198]I never worry about the garbage collector. :v: Maybe the new G1 gc in JDK 7 won't kick in on loops like you mentioned.[/QUOTE] You should. Hardware may be cheap, but performance still matters.
the 8th grade adv tech class here doesn't do anything more than sketchup, imovie, (IT is a macfag) iphoto gimp and probably garageband I already completed the sketchup project and we started it 1 day ago.
We had not a single IT class. Just office stuff, graphics design if you took 2 art classes, and a bullshit attempt at 90's web design mixed with illustrator and terribly dumbed down photoshop. College makes me much more satisfied, lol.
[url]This should be moved to OIFY. (Wait, What?)[/url]
[QUOTE=turby;18522592] His version is better because as the String object is declared outside of the loop, it stops Garbage Collection from kicking in every iteration.[/quote] No it doesn't. Whether the string is declared outside or inside doesn't matter because there's an assignment either way, resulting in lost data (garbage) and thus the GC "kicking in every loop iteration." [quote]Also, loop logic IS IN THE FOR STATEMENT, as opposed to tacked on the the for-loop body.[/QUOTE] Loop logic goes in the for block. Loop [i]condition[/i] goes in the for statement. Both versions of the loop are essentially fine, but the version with the explicit break statement makes more logical sense.
[QUOTE=turby;18522592]Maybe you should take his advice. His version is better because as the String object is declared outside of the loop, it stops Garbage Collection from kicking in every iteration.[/QUOTE] line is just a reference, so it has to garbage collect every line either way. [B]Edit:[/B] Didn't see nullsquared's post. :mad:
[QUOTE=PvtCupcakes;18523198]I never worry about the garbage collector. :v: Maybe the new G1 gc in JDK 7 won't kick in on loops like you mentioned.[/QUOTE] You're just butthurt that you had to resort to break statements because you can't catch errors.
[img]http://www.facepunch.com/image.php?u=164627&dateline=1257466207[/img] [B]WOAH PEOPLE ARE STILL POSTINg[/b]
[QUOTE=admiral_Cola;18552377]You're just butthurt that you had to resort to break statements because you can't catch errors.[/QUOTE] I'm afraid you have no idea what you're talking about. Please cease doing that :)
[QUOTE=cas97;18552409][img]http://www.facepunch.com/image.php?u=164627&dateline=1257466207[/img] [B]WOAH PEOPLE ARE STILL POSTINg[/b][/QUOTE] [img]http://www.facepunch.com/image.php?u=129856&dateline=1258919707[/img] OH NO WE'RE GONNA BE POOR. [editline]06:21PM[/editline] [QUOTE=nullsquared;18552571]I'm afraid you have no idea what you're talking about. Please cease doing that :)[/QUOTE] In University, a break statement automatically fails you.
[QUOTE=admiral_Cola;18552595] In University, a break statement automatically fails you.[/QUOTE] Looks like you need to look into a non-shit university.
[QUOTE=admiral_Cola;18552595] In University, a break statement automatically fails you.[/QUOTE] I was going to prove you wrong by putting a file on pastebin with all the times in the Linux kernel that the keyword break; was used, but I'm over 10,000 results and I don't feel like uploading it. I have no idea how many results there are, I just stopped at 10,000. [code]pvtcupcakes@linux linux-2.6$ git grep break;[/code] And one advantage to using break; is that you can figure out something went wrong long before the next loop iteration. [code] for(int i = 0; i < 10; i++) { String line = in.nextLine(); if(line == null) //Thar be dragons break; System.out.printf("Line: %s\n", line); } [/code] If you checked for line being null in the for statement, it'd crash at the print statement if it was null. I could have done if(line != null) but then you get crazy indentations.
[QUOTE=nullsquared;18549792]No it doesn't. Whether the string is declared outside or inside doesn't matter because there's an assignment either way, resulting in lost data (garbage) and thus the GC "kicking in every loop iteration." Loop logic goes in the for block. Loop [i]condition[/i] goes in the for statement. Both versions of the loop are essentially fine, but the version with the explicit break statement makes more logical sense.[/QUOTE] Touché. The GC argument was my only real argument anyway, but I guess it's defeated by String being an immutable reference type.
hi turbulence
[QUOTE=nullsquared;18552778]Looks like you need to look into a non-shit university.[/QUOTE] It is more used as a deterrent because break can be used to escape loops and such which means that for certain assignments people can get away with deviating from the objectives. [editline]10:31PM[/editline] [QUOTE=PvtCupcakes;18552890]I was going to prove you wrong by putting a file on pastebin with all the times in the Linux kernel that the keyword break; was used, but I'm over 10,000 results and I don't feel like uploading it. I have no idea how many results there are, I just stopped at 10,000. [code]pvtcupcakes@linux linux-2.6$ git grep break;[/code] And one advantage to using break; is that you can figure out something went wrong long before the next loop iteration. [code] for(int i = 0; i < 10; i++) { String line = in.nextLine(); if(line == null) //Thar be dragons break; System.out.printf("Line: %s\n", line); } [/code] If you checked for line being null in the for statement, it'd crash at the print statement if it was null. I could have done if(line != null) but then you get crazy indentations.[/QUOTE] Again break was accepted, but in your case; break is nothing if you are being so :smug: about it you can use try/catch statements and impress the fuck out of your teacher. [editline]10:36PM[/editline] Besides if you did it the way your teacher described then line wouldn't be null anyway.
Sorry, you need to Log In to post a reply to this thread.