PDA

View Full Version : Spam ITT: Famous quotes translated to your favorite programming language.



Shadowpawn
Jan 9, 2009, 08:46 AM
"Do, there is no try."

import java.util.*;

class Yoda {

static main void Strings(args[]){
Scanner scan = Scanner(System.in);
String x = " ";
while (true){

System.out.println("Do or try?");
x.scan.next();
if (x.equalsIgnoreCase(do)) {

do = false;
}

else
system.out.println("Try not found.");
}
}

}

}



}

Larian
Jan 11, 2009, 05:43 PM
I took java...the teacher sucked and didnt help much so I ended up dropping...I understood that though... =D

Gentlemen
Jan 11, 2009, 06:32 PM
Eww, Scanner? What the fuck are you doing? Get with KeyboardReader and TerminalIO. Fuck that GUI shit.

*EDIT* Meaning I'm associating Scanner with Netbeans.

Larian
Jan 11, 2009, 06:39 PM
Your a potty mouth! =(

Shadowpawn
Jan 11, 2009, 06:56 PM
I think a lot of instructors don't know exactly HOW to teach programming. I had two different instructors for Java about a year ago. The first guy I had was SO laid back and the problems he gave were easy as hell. So easy I thought I didn't learn anything! I was right because the guy that usually teaches the class was back for a second semester and he was hardcore man.

He would give a lecture for an hour and assign a problem from the book to you. The problem wouldn't directly correlate with the lecture he gave and the advice he gives is usually vague. So you basically had to figure out the solution to the problem on your own. The difference between him and the first semester teacher was like night and day. Man, if hadn't been practicing programming before taking the second portion of the class I know I wouldn't have passed.

I personally think the best way to learn programming is to disassemble programs and learn its functions. See what makes the program work and what breaks it. After a while you'll be tweaking the program to suit your needs until you are able to just sit down and code from scratch.

Shadowpawn
Jan 11, 2009, 06:58 PM
Eww, Scanner? What the fuck are you doing? Get with KeyboardReader and TerminalIO. Fuck that GUI shit.

*EDIT* Meaning I'm associating Scanner with Netbeans.

I haven't messed around with other I/O functions in Java yet but after I finish this semester I'll have more time to explore the Java language. (In case you are wondering why I am not doing it now I'll be too busy trying to not go insane while learning Physics. :/ )

Larian
Jan 11, 2009, 09:12 PM
It was that class that also made me decide to stay off the developer path, and into the e-commerce field. I've been having more fun with the more creative/business side of the interweb anyways. =D

Gentlemen
Jan 11, 2009, 11:35 PM
Scanner is just annoying because it uses weird syntax and does less. The only reason it's used now is because NetBeans and other IE's don't seem to like it... According to my programming teacher. Haven't tried using TerminalIO lately but it's pretty slick. The big different is like so:

(this supports all primitive data types and String objects under the title "readLine")
<variable to input to> = in.read<variable type>("<output text to terminal>");

It's nice if you're doing terminal stuff but GUI programs hate the fuck out of it.

Randomness
Jan 12, 2009, 03:39 PM
You choose "do or do not, there is no try", but didn't use the try command.

Fail.

Shadowpawn
Jan 12, 2009, 03:57 PM
You choose "do or do not, there is no try", but didn't use the try command.

Fail.

You can't use try without catch. :/ Besides, that's just for checking your own errors when compiling code. >_>

Weeaboolits
Jan 12, 2009, 04:30 PM
OPTION EXPLICIT