Sunday, October 6, 2013

Fate Standalone Project Update

It's been about a year since I first announced project Fate. Surprisingly, I'm still getting inquiries about the current status of the project from numerous people (which by the way thank you so much for your interest and support), so I will try to provide some clarification.

Long story short, the project is currently suspended for the following reasons:


  1. Both the project leaders, myself and Squally are fairly busy with our jobs.
  2. We don't have enough members. (Especially designers)
  3. We'd like to get the current Fate / Another III completely out of the way before proceeding with Fate project
The last bit is especially important for us. We're currently working on Fate / Another to utilize it as an example case for Fate project. In other words, by implementing features in Fate / Another, we can determine in advance how public reacts to the game. Without this anecdote, we'd have to perform a lot of experimentation as the project progresses, potentially consuming a lot of time and degrading members' morale.

We are not entirely sure when exactly we will continue with the project. One thing I do want to emphasize is that making a standalone platform at the scale of Fate / Another is no trivial task. When I initially mentioned 3 years, I realized I was being exceedingly optimistic about the estimation. Realistically speaking, we are looking at 5 years minimum. Even this estimation is under the assumption that we have a designer by the time we begin.

At any rate, we are still accepting members for our team (Again, especially designers) so if you are interested, please read this post first and send us your applications! Thank you very much.

Thursday, June 20, 2013

Restlet how to post XML data from client

Recently, I was issued a project to set up a restful web server on Android platform. Googling landed me Restlet Framework and I must say it's a pretty good framework that gives a nice abstraction layer to do any REST related work.

Two things I really didn't like about Restlet is that initial setup was a bit painful, but what really ticked me off is the lack of documentations, which forced me to delve into the source code whenever I was stuck with something. Seriously guys, if you are going to make a framework and you actually want other developers using it, save us the trouble and provide a good documentation. Not everyone has the patience to look through source codes.

Anyways, I had a really weird issue with posting XML data from client to server using DomRepresentation. Both ends are using Restlet, using the exact same class to handle XML data but the server wasn't receiving the DOM no matter what I tried:

public void sendPostRequest(final String uri, final DomRepresentation entity) throws ResourceException, IOException {
 try {
  ClientResource client = new ClientResource(uri);
  client.post(entity); 
 }
 catch (Exception ex) {
  ex.printStackTrace();
 }
}


@Post
public void handleQuery(Representation rep) {
 try {
  if (rep == null) {
   this.setStatus(Status.CLIENT_ERROR_BAD_REQUEST);
   return;
  }
  DomRepresentation domRep = new DomRepresentation(rep); 
  Document doc = domRep.getDocument(); //THROWS ERROR. 
                ....


Needless to say, this left me bewildered and I almost considered tossing the abstraction from the framework out the window and handling this at the HTTP level. Luckily, I eventually found out that DomRepresentation didn't work as advertised and instead, I had to work with StringRepresentation:

public void sendPostRequest(final String uri, final DomRepresentation entity) throws public static void sendPostRequest(final String uri, final Document doc) throws ResourceException, IOException {
 try {
  ClientResource client = new ClientResource(uri);
  StringRepresentation entity = new StringRepresentation(XMLUtils.getStringFromDocument(doc)); //Turn DOM into string and then instantiate StringRepresentation
  entity.setCharacterSet(null); 
  entity.setMediaType(MediaType.TEXT_XML);
  client.post(entity); 
 }
 catch (Exception ex) {
  ex.printStackTrace();
 }

I'm still not sure why DomRepresentation did not work in my case. It's either a bug or some obscure configuration that I must've missed (which clearly isn't mentioned in the documentation). Either way, this was pretty frustrating and I thought it merited a post in case other people had a similar problem.
By the way, if you are using Restlet, get yourself a copy of Restlet in Action. Given the lack of documentation, this will help you out a bunch. Seriously, just do it.

Monday, June 10, 2013

IE 9/10 Enter Key causing Form Submit / Button Click workaround

If you ever run into a problem where if you press enter inside a page and the page suddenly submits or a button click event launches, you need to manually stop the enter event from propagating outside a particular div.

//"Enter" Key is taken as a submit action by default on IE 9/10
//Prevent Enter key event from propagating outside the grid.
$('#SUBUL_01_DIV_GRID').keypress(function(e) {
    if(e.which == 13) { 
        e.preventDefault(); 
    }
});
IE, causing massive amount of frustration to web developers like always..

Tuesday, May 21, 2013

Shingeki no Cola - 진격의 콜라


I'm sure many of you have seen Shingeki no Kyoujin parody videos.

This one is my favorite.

Monday, May 13, 2013

PE 101 Walkthrough

This is absolutely beautiful that I had to post it here:

http://i.imgur.com/tnUca.jpg


Everything you wanted to know about how exe files run on a windows machine. Well, not quite everything, but covers a substantial ground.