edwin

Asiasoft and Ragnarok Online 2, Downloaded 4GBs and Got Nothing.

Today i got a surprising announcement from Asiasoft, somehow Ragnarok Online 2 OpenBeta only available for FOUR South East Asia countries, despite there are eleven countries on SEA



A little bit weird because on their previous facebook status, they said that it will be a “Free to play for All”,



There was no notification whatsoever regarding country limitation for Open Beta before, and i already downloaded 4gbs installer for RO2 client. So basically i spent whole night downloading on my crappy internet connection and i got nothing Hahahaaa.

And i guess it’s just their way of saying "Asgardians! Thank you for helping us out in the stress testing! We have found a problem to solve, and we can't solve it. So we are now going to IP Block most of you instead.".



A Simple Hello World using Java

This is an example of a simple hello world using Java.

interface Printer {
    void print(Message message);    
}

class Message {
    private String message;
    
    public Message(String message) {
        this.message = message;    
    }
    
    public void print(Printer printer) {
        printer.print(this);    
    }
    
    public String toString() {
        return message;   
    }    
}

abstract class AbstractPrinterFactory {
    public static AbstractPrinterFactory getFactory(){
        return new SystemOutPrinterFactory();   
    }
    public abstract Printer getPrinter();    
}

class SystemOutPrinterFactory extends AbstractPrinterFactory {
    public Printer getPrinter() {
        return new SystemOutPrinter();   
    }    
}

class SystemOutPrinter implements Printer {
    public void print(Message message) {
        System.out.println(message);   
    }    
}

public class HelloWorld {
    public static void main(String[] args) {
        Message message = new Message("Hello, World!");
        AbstractPrinterFactory factory = AbstractPrinterFactory.getFactory();
        Printer printer = factory.getPrinter(); 
        message.print(printer);       
    }           
}

Just for fun (H)

eBook Apa yang Cocok bagi Pemula yang Baru Belajar Java?

Kebetulan lagi rame di kaskus programmer forum, tentang ebook yang cocok untuk pemula. Supaya ga jawab berulang-ulang, mending gw tulis disini aja deh.

Untuk melatih pondasi, coba baca bukunya donald knuth
Donald Knuth

lalu lanjut ke buku-nya deitel deitel, java how to program
Deitel Deitel

klo dah faseh naik ke bukunya gang of four, bruce eckel dan kathy sierra
Gang of Four

Bruce Eckel

kathy sierra

klo ada waktu iseng, buknya Joshua Bloch seru juga
Joshua Bloch

kemudian lanjut ke bukunya craig walls dan gavin king
Craig Walls

Gavin King

kalo dah faseh abis itu langsung ke bukunya Debu Panda dan Reza Rahman
EJB3

Semoga membantu untuk para calon-calon programmer diluar sana, Maju Terus Ilmu Pengetahuan Indonesia…!!

How To Check Window’s Opened Comm Port using Java

On my latest project, i need to connect my java application to a GSM Modem, in order to sending and receiving SMS text. But before my application connected to opened comm port, i need to check which port number is opened. So this is a small java class to check my opened comm port. Btw, im using rtxt libraries to help me communicate with the opened port.

import gnu.io.CommPortIdentifier;
import java.util.Enumeration;

public class Main {
    
    private void doSomething() {
        Enumeration portList = CommPortIdentifier.getPortIdentifiers();
        System.out.println(portList.hasMoreElements());
        while (portList.hasMoreElements()) {
            CommPortIdentifier portId = (CommPortIdentifier) portList.nextElement();
            System.out.println(portId.getName());
        }
    }
    
    public static void main(String[] args) {
        Main main = new Main();
        main.doSomething();
    }
}

Dont forget to add rxtx libraries your java’s path. You can find the Window’s installation path, here.

Hope it helps other, have fun 🙂