#

Coffee with Toni

Juni 2005, zwei Java-Programmierer sitzen, müde angesichts der frühen Morgenstunde und der Parties der letzten Nächte, an ihrem Arbeitsplatz.

Toni:

while(true){
  if(coffeeCount >= 5 && caffeineToleranceLevel == ME.LOW_TOLERANCE){
    handsTremble();
    tryToStayAwake();
    codeMore();
    drinkMoreCoffee();
  }
}

Secco:

public void drinkCoffee() throws CoffeeOverdoseException{
  coffeeCount++;
  coffeecup.setLevel(0);
 
  if (coffeCount > MAX_COFFEE_COUNT)
    throw new CoffeeOverdoseException("*PUKE*");
  else{
    while (coffeecup.getLevel()<=0) 
        coffeeserver.getMoreCoffee(coffeecup);
      drinkCoffee();
  }
}

Toni:

public void intravenousCoffeeConsumption(CoffeInputStream coffeeStream){
  while(coffeeStream.consume() != -1){
    hearBeatRate += 2.5f;
    try{
      setHeartBeatRate(hearBeatRate);
    }catch(HeartAttackException exitus){
      logger.fatal("Tschö",e);
      return;
    }
  }
}
Tags:,

One Response to “Coffee with Toni” »»

  1. Comment by andrej | 15:32 25.09.06|X

    ich würde mal sagen, da habt ihr den ME-Thread aber ganz schoen in die knie gezwungen :) mein kleiner patch:


    class MeAtWork implements Runnable {

    public void run() {
    while(true){
    if(coffeeCount >= 5 && caffeineToleranceLevel == ME.LOW_TOLERANCE){
    handsTremble();
    tryToStayAwake();
    codeMore();
    drinkMoreCoffee();
    }

    try {
    Thread.sleep( ME.PAUSE );
    } catch(Exception x) {
    logger.fatal( "gestorben!", x );
    System.exit(-1);
    }

    }
    }
    }
    }

    viel spass :))

Leave a Reply »»

Note: All comments are manually approved to avoid spam. So if your comment doesn't appear immediately, that's ok. Have patience, it can take some days until I have the time to approve my comments.