Page 1 of 1

Java Class Stories!

Posted: 07 Nov 2012, 14:13
by Tjololo12
changed the title to be more interesting...Submit your own funny java class (doesn't have to be properly formatted, just legible) or code story! The winner will get..umm...laughs I guess.

Code: Select all

import EscapeCraft.mods.modhaxx;
import java.math.*;

public class Tjololo12{
  private int motivation = 0;
  private boolean trolling = false;
  private int annoyanceLevel = 0;
  
  //default constructor
  public Tjololo12(){
    motivation = 100;
  }
  
  public boolean doWork(Work work, boolean start){
    if(start == true){
      while (motivation > 0){
        work.makeProgress();
        motivation -= work.difficultyLevel;
        annoyanceLevel += work.difficultyLevel;
        if(annoyanceLevel > 1)
          this.troll();
      }
    else
      this.troll();
     return true;
    }

  public void troll(){
    Player victim = Escapecraft.players.choosePlayer();
    trolling = true;
    Random value = new Random;
    while (trolling)
      this.derp(victim);
  }

  private void derp(Player victim){
    --snip--
  }
}

Re: The Tjololo12 java class

Posted: 07 Nov 2012, 14:16
by J4Numbers
Why did we start this again?

Code: Select all

public VallornBomb(radius Int) {
WorldEdit(radius, Lava)
}

Re: The Tjololo12 java class

Posted: 07 Nov 2012, 14:22
by Tjololo12
I was told to make code stories, I figured this would be a good way to get started.

Code: Select all

public getBlackadderTNTAmount (World world) {
return WorldEdit.countBlocks(world);
}

Re: Java Class Stories!

Posted: 07 Nov 2012, 14:48
by Invunarble
Crazy Gibberish!
Image

Re: Java Class Stories!

Posted: 07 Nov 2012, 16:19
by minnerthecat
Ok, so mine's not code but rather, a compiler error:

Code: Select all

File:  C:\Users\Minner\Java Programs\DoMath.java
Error: method studyCalculus in class Minnerthecat cannot be applied to given types;
  required: Motivation
  found: CrushingBoredom
  reason: math cannot be done while experiencing endless sadness

Re: Java Class Stories!

Posted: 07 Nov 2012, 17:06
by MayorLennie
I now have MATH! yessss

EDIT: @m477 I thought he would be good at it, and it would be...FUN :)

Re: Java Class Stories!

Posted: 07 Nov 2012, 18:33
by Tjololo12

Code: Select all

public class storyBehindCodeThread{
  InputStreamReader converter = new InputStreamReader(System.in);
  BufferedReader in = new BufferedReader(converter);
  Tj Trololo12 = new Tj();

  public storyBehindCodeThread() throws FlipTheBirdException() {
    IRC.ping(MayorLennie, Tjololo12);
    boolean comprehension Trololo12.listen(in.readLine());
    if(comprehension){
      Boolean coop = Trololo12.cooperate();
      if(!coop)
        throw new FlipTheBirdException();
      else
        Trololo12.respond(coop);
    }
    else {
      Trololo12.wharrgarbl();
    }
  }
}

public class Tj extends Tjololo12{
  public Tj(){
    super();
  }
  
  public wharrgarbl(){
    Nonsense code = new Escapecraft.mods.nonsense();
    for (int i = 0; i <= 5; i++){
      code.generateNonsense();
      System.out.println(code);
      super.troll(); //because why not
      i--;
    }
  }
}

//I don't really know how custom exceptions works, but here's my best guess
public class FlipTheBirdException extends Exception {
  System.out.println("This exception only exists to make you wonder why it exists.");
  System.exit(999);
}

Re: Java Class Stories!

Posted: 07 Nov 2012, 19:30
by Eddietester1066
Fun thread! This snippet is guaranteed to not compile:

import java.coffee.*;
import comp.exorcist.*;
import pets.cat.*;

public class Eddietester {
private float caffeine=0;
private cat kittez[];

//constructor
public Eddietester(){
for each kitteh in kittez {
if (kitteh.awake && kitteh.dish==empty) kitteh.feed();
}
if (caffeine < 10) caffeine += 10;
}

public FixComputer(computer victim){
while (!victim.fixed) {
victim.exorcise();
BeatHeadOnWall(true);
}
}
}

Re: Java Class Stories!

Posted: 08 Nov 2012, 02:29
by MayorLennie
What great stories :)

Re: Java Class Stories!

Posted: 08 Nov 2012, 18:11
by Sti_Jo_Lew
My brain hurts...

Re: Java Class Stories!

Posted: 08 Nov 2012, 20:09
by Eddietester1066
Sti_Jo_Lew wrote:My brain hurts...
Fix_Sti_Jo_Lew() extends Sti_Jo_Lew(){
BeatHeadOnWall(false);
}

Re: Java Class Stories!

Posted: 08 Nov 2012, 20:10
by Sti_Jo_Lew
Eddietester1066 wrote:
Sti_Jo_Lew wrote:My brain hurts...
Fix_Sti_Jo_Lew() extends Sti_Jo_Lew(){
BeatHeadOnWall(true);
}
Fixed to make my brain hurt.

Re: Java Class Stories!

Posted: 08 Nov 2012, 20:21
by Eddietester1066
Sti_Jo_Lew wrote:
Eddietester1066 wrote:
Sti_Jo_Lew wrote:My brain hurts...
Fix_Sti_Jo_Lew() extends Sti_Jo_Lew(){
BeatHeadOnWall(true);
}
Fixed to make my brain hurt.
Well, as long as you're into that sort of play, go for it. :o

Re: Java Class Stories!

Posted: 08 Nov 2012, 21:43
by Tjololo12

Code: Select all

#python, because it's funnier that way
import kinkometer

while Sti_Jo_Lew.head.hurts:
  if kinkometer.measure(Sti_Jo_Lew) >= kinkometer.measure(Eddietester1066):
    pickle.dump(Sti_Jo_Lew, Eddietester1066_bed.lvnst)
  else:
    kinkometer.addKink(Sti_Jo_Lew)

Re: Java Class Stories!

Posted: 08 Nov 2012, 21:49
by Sti_Jo_Lew
Tjololo12 wrote:

Code: Select all

#python, because it's funnier that way
import kinkometer

while Sti_Jo_Lew.head.hurts:
  if kinkometer.measure(Sti_Jo_Lew) >= kinkometer.measure(Eddietester1066):
    pickle.dump(Sti_Jo_Lew, Eddietester1066_bed.lvnst)
  else:
    kinkometer.addKink(Sti_Jo_Lew)
So if I am understanding this correctly... if I am kinkier than Eddie pickles get dumped on both our beds. If not, I get more kinky.

What. The. Fuck.

Re: Java Class Stories!

Posted: 08 Nov 2012, 22:13
by Eddietester1066
Sti_Jo_Lew wrote:
Tjololo12 wrote:

Code: Select all

#python, because it's funnier that way
import kinkometer

while Sti_Jo_Lew.head.hurts:
  if kinkometer.measure(Sti_Jo_Lew) >= kinkometer.measure(Eddietester1066):
    pickle.dump(Sti_Jo_Lew, Eddietester1066_bed.lvnst)
  else:
    kinkometer.addKink(Sti_Jo_Lew)
So if I am understanding this correctly... if I am kinkier than Eddie pickles get dumped on both our beds. If not, I get more kinky.

What. The. Fuck.
Sort of. This only occurs if your head hurts, and my pickles are dumped on your bed.

Re: Java Class Stories!

Posted: 08 Nov 2012, 22:21
by Sti_Jo_Lew
Ok then.... my head doesn't hurt anymore. There, no pickles.

Re: Java Class Stories!

Posted: 08 Nov 2012, 22:37
by welwyn
pickle.dump(Sti_Jo_Lew, Eddietester1066_bed.lvnst)

To me that looks like they only get dumped on you not your bed. But they get dumped on eddies lovenest bed.

Re: Java Class Stories!

Posted: 08 Nov 2012, 23:09
by Tjololo12
Sorry, I should have commented.

Code: Select all

while Sti_Jo_Lew.head.hurts:
#test to see how kinky Sti_Jo_Lew is in comparison to Eddietester1066
  if kinkometer.measure(Sti_Jo_Lew) >= kinkometer.measure(Eddietester1066):
    #if Sti_Jo_Lew is at least as kinky as Eddietester1066, dump Sti_Jo_Lew object into file
    #Eddietester1066_bed.lvnst of filetype lovenest
    pickle.dump(Sti_Jo_Lew, Eddietester1066_bed.lvnst)
  else:
    #Increment Sti_Jo_Lew's kinkiness to correspond with Eddietester1066's desired level of kink
    kinkometer.addKink(Sti_Jo_Lew)

Re: Java Class Stories!

Posted: 08 Nov 2012, 23:19
by Sti_Jo_Lew
I give up. I don't want my brain to implode.

Re: Java Class Stories!

Posted: 09 Nov 2012, 08:56
by minnerthecat

Code: Select all

while (pickleCount > 0) {
  if (!pickle.usedForKinkyStuff()) {
    minnerthecat.eat(pickle);
    pickleCount--;
  }else {
    minnerthecat.wash(pickle);
    pickle.setSafeToEat(true);
  }

Re: Java Class Stories!

Posted: 09 Nov 2012, 13:52
by Invunarble
Someone call a paramedic, I think my head is going to implode from how ludicrous this thread is.

Re: Java Class Stories!

Posted: 09 Nov 2012, 15:58
by Eddietester1066
Invunarble wrote:Someone call a paramedic, I think my head is going to implode from how ludicrous this thread is.
Class Paramedic extends Player {
}

Invunarble = new Paramedic();
//There, now you're a Paramedic :D

Re: Java Class Stories!

Posted: 09 Nov 2012, 16:23
by Aenir_bEPU

Code: Select all

public class Aenir 
{
	private boolean lazy;
	private int senseOfAccomplishment;
	
	public Aenir()
	{
		lazy = true;
		senseOfAccomplishment = 0;
	}
	
	public void doWork(boolean lazy)
	{
		if (lazy)
		{
			procrastinate(lazy);
		}
		else
		{
			senseOfAccomplishment++;
		}
	}

	private void procrastinate(boolean lazy) 
	{
		if (lazy)
		{
			procrastinate(lazy);
		}
		else
		{
			doWork(lazy);
		}
	}
}

Re: Java Class Stories!

Posted: 09 Nov 2012, 16:36
by Tjololo12
Exception in thread Aenir_bEPU: OutOfMemoryException: at procrastinate (Aenir.java:28)
at procrastinate (Aenir.java:28)
at procrastinate (Aenir.java:28)
at procrastinate (Aenir.java:28)
at procrastinate (Aenir.java:28)
at procrastinate (Aenir.java:28)
at procrastinate (Aenir.java:28)
at procrastinate (Aenir.java:28)
at procrastinate (Aenir.java:28)
...plus 9001 more