[quote name=“Kevlar” post=“48193” timestamp=“1388323454”]
Welcome! I’m drunk, and writing code. I’ll give 10 FTC to the first person who can tell me the following:
1. What does this code do?
2. How does it do it?
3. How would I do this if I was sotally tober?
[code]
package totally.awesome;
import java.awt.List;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Random;
import org.joda.time.DateTime;
import org.joda.time.Interval;
public class ImASexGod {
private static final Random RANDOM = new Random();
public static void main(String[] args) {
List doubleList = new java.awt.List();
System.out.print(“Enter numbers until you’re awesome.”);
// open up standard input
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String input = null;
do{//her
try {//it once
input = br.readLine();
} catch (IOException ioe) {
System.out.println(“Dude, that’s not awesome!”);
System.exit(1);
}
try {//it you’ll like it
double d = Double.parseDouble(input);
doubleList.add(input);
} catch (NumberFormatException e) {
if (!input.equals(“”)) System.out.println(“Only numbers are allowed. I’m a number nazi.”);
}
} while (!input.equals(“”));
printCurrentListAndStuff(doubleList);
while (isBetterBest(doubleList) < doubleList.getItemCount()){
List newlist = createSomething(doubleList);
//oh man this is awesome
//this must be where the awesome happens
if (isBetterBest(doubleList)