Monthly Archive: May 2014

Marathon Coding

I love doing what I may call marathon coding: Code one functionality you are going to implement from start to end. If the functionality means that you have to create a very big class from start to end, then do it. DO NOT debug or try to run the program before the functionality you desired is exactly implemented. The threshold is that your program will be able to produce the...

Ambiguous Result

Another quo-de for today. You can see how ambiguous this function call protected void onPostExecute(RefreshTaskResult<ActionResult<SquadInfoShort>> result) { // Check result if(result.getResult().getResult()) { } } What result?

Using Generics in an Ugly Way

Previously I was talking about generics. You can see how I do with generics to the confusing level: new AsyncTask<Void, Void, RefreshTaskResult<ActionResult<List<SquadInfoShort>>>>() { protected RefreshTaskResult<ActionResult<List<SquadInfoShort>>> doInBackground(Void… params) { try { ActionResult<List<SquadInfoShort>> result = client.getSquadList(); return new RefreshTaskResult<ActionResult<List<SquadInfoShort>>>(result); } catch (Exception e) { // Catch any exception return new RefreshTaskResult<ActionResult<List<SquadInfoShort>>>(e); } } }.execute(); See how many < > to feast your eyes.

Generics in WCF REST JSON Communication

Overview So I got a taskĀ in designing a scalable and modular Service Oriented application using JSON and WCF. I am designing a web service using WCF. The communication between the web service and the client will be using JSON. While the server is using .NET Framework, the client is using Android Java. I aim to design the service as modular as possible. For every web service request from the client,...

Entity Framework: Design Approach

I’ve been using Entity Framework since its introduction. Entity Framework (EF) is a powerful Object-Relational Mapping (ORM) framework for .NET Framework. I’ve been debating with my teammates whether EF is better than other ORM such as OpenAccess, which I believe is true, because EF provides the necessary feature to connect our program to the database, especially if you are using Microsoft products, SQL Server. In my thinking, why bother using...