Yet another blog

Explorer
See also: Other Geeks@INDC
Something wrong with the airline system ? or is it just plain pain in the a**....(part I)
I wrote this because it actually happen to me..Geeked
As a guy in IT line of work....I could never understand this problem. This is the history
For a job in Chennai (India), company had bought me a round ticket from MA* airlines.
On the day I should flight this airline told the passenger that it was delayed (being an Indonesian this should be regular....no problem).
After 1 hour of delayed I finally flight to Kuala Lumpur first (it was the route).
Upon arrival at KLIA I suppose to took a fligth again to Chennai, but that's not the case.
The connecting flight that suppose to took me has flewn because of the delay in jakarta I missed the flight.....Angry,
but that's ok the airlines try to put me in the hotel along with 2 other passenger that has stucked with me.
When we arrived at the hotel the front desk told us they would gave us single room for three of us (what the he**). 
Of course three of us got rage, we hardly know each other but they want to put us in one room?, this guy should be out of his mind.
We told him to call to MA* and he eventually gave us separate room.
On the next day in the morning we rushed to the KLIA to get checked in....
MA* told us we have to switch airlines because there are no MA* flight till evening...,
we then got switched to a local indian airways which is eventually had flight to KLIA. 
This MA* personel then collect our ticket and change it to a boarding pass...., 
the bad thing was I forgot that my ticket is also a return ticket and the MA* personel also forgot to return my ticket....
so by the time I realized it I already at chennai airport.
I rushed into a MA* personel in chennai airport and tell them the problem....
they said I only had to go to centrall office in downtown chennai and I will get it back.
I went to the MA* Chennai office and they told me they cannot reissue the ticket until there's some confirmation from KLIA or Jakarta office.
So I told them to make the call, and still yet they were not make the call
(my thought was a single international call is too expensive for this airlines).
I call my colleque to help me on this problem through jakarta, but still the problem goes on and on until 5th day ....
(heck we live in a communication age...but for this time the communication still becomes burden to this airlines..).
On the 5th day....my office colleque told me that they already had MA* Jakarta Office to send a telex to MA* Chennai office, 
I wait for couple of hours to make sure that MA* Chennai office got the telex and made the call.....
I call the MA* Chennai office and they told me still haven't got the telex 
(by GOD a telex travel more than 2 hours !!!, its imposible), this is one thing for sure the MA* personel in Jakarta had not send it.
So I ordered my colleque to went to MA* Jakarta Office on 6th day and assist the MA* officer to send the telex (heck they even don't know how to send it probably...grrrr).
On 6th day I got fully conform that the telex has been sent with the assistant of my colleque,
so I made the call to MA* office and they said they already got the telex and I can get my ticket.

After all said and done....it has worn out everything from me, my colleque for this simple problem...,
I already made a resolution to my company....nerver use MA* anymore.....because we've come to the conclusion that
MA* is a screwed company of the first order even an international call is way to expensive for them.


Share this post: | | | |
Posted: Nov 14 2006, 07:20 AM by omwok | with 3 comment(s) |
Filed under:
Object Pool

a simple thread safe lock free object pool with custom object creation http://blogs.netindonesia.net/omwok/articles/9046.aspx

u can use it on your own risk...:D

Share this post: | | | |
Posted: Mar 21 2006, 07:26 AM by omwok | with 1 comment(s)
Filed under:
ThreadSafe, Synchronization and Performance (part III)

Ternyata banyak pendekatan thd suatu masalah ya? (http://blogs.netindonesia.net/zeddy/archive/2006/03/19/9042.aspx). Itulah indahnya dunia ini....

Bagaimana kalo satu pendekatan lagi? pendekatan berikut ini memakai synchronization atomic di .NET yaitu System.Threading.Interlocked, class ini tidak baru tapi mengalami penambahan method2 generic di .net 2.0, yg kita harap dpt ngebust performance.

classSingletonClass4

{

private static SingletonClass4 _instance;

private SingletonClass4() { }

public static SingletonClass4 Instance

{

get

{

if (null == _instance)

{

System.Threading.Interlocked.CompareExchange<SingletonClass4>(ref _instance, new SingletonClass4(), null);

}

return _instance;

}

}

}

Hasil yang didapat di laptop saya Pentium 4 Mobile (Code Sonoma) RAM 512 dgn release build (kemaren emang debug...blame me...:p)sbb:

Pendekatan I = 0.162031766607208
Pendekatan II = 0.140241287649687
Pendekatan III = 0.115098427314086
Pendekatan IV = 0.0396698463072821

bust up 3 times ya?, walaupun code-nya agak2 ribet, code utk performance biasanya punya tendensi utk menjadi code yg agak sukar di mengerti..;)

Spt yg kita lihat banyak cara meminimalisir penggunaan lock, yg penting dari sini adalah mengetahui dgn jelas domain problem yg dihadapi kemudian act something dgn itu....cheers

Share this post: | | | |
Posted: Mar 20 2006, 11:11 PM by omwok | with 1 comment(s)
Filed under:
ThreadSafe, Synchronization and Performance (part II)

Saya mencoba untuk melakukan performance counting dari suatu code tanpa lock(.net internals) dan dengan lock untuk mendapatkan synchronisasi.

Performance counting ini dilakukan dengan menggunakan Zeddy's TimerAkurat http://blogs.netindonesia.net/zeddy/articles/csvscppnet.aspx (Thanks Z) mendapatkan instance dari singleton sebanyak 10000 kali. Saya tahu bahwa ini tidak menggambarkan real-production experience tapi kita setidaknya mendapatkan gambaran kasar yg terjadi

using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;
namespace TestSingleton
{
class SingletonClass1
{
private static SingletonClass1 _instance;
private SingletonClass1()
{
}
public static SingletonClass1 Instance()
{
if (null == _instance)
{
lock (typeof(SingletonClass1))
{
if (null == _instance)
_instance = new SingletonClass1();
}
}
return _instance;
}
}
class SingletonClass2
{
private static SingletonClass2 _instance;
//this do-nothing private constructor here just to protect the class not instantiated using new
private SingletonClass2()
{
}
static SingletonClass2()
{
_instance = new SingletonClass2();
}
public static SingletonClass2 Instance
{

get

{

return _instance;

}

}
}
class Program
{
static void Main(string[] args)
{
int i = 10000;
// Pemanasan dari pendekatan I agar framework dapat melakukan optimasi
while (--i > 0)
{
SingletonClass1 instance = SingletonClass1.Instance();
}
i = 10000;
//pemanasan dari pendekatan II
while (--i > 0)
{
SingletonClass2 instance = SingletonClass2.Instance;
}
i = 10000;
//pendekatan I
Zedilabs.TimerAkurat timer = new Zedilabs.TimerAkurat();
timer.Mulai();
while (--i > 0)
{
SingletonClass1 instance = SingletonClass1.Instance();
}
timer.Berhenti();
Console.Out.WriteLine("Pendekatan I (with lock) = {0}",timer.HasilDlmMilliDetik);

i = 10000;
//pendekatan II
timer = new Zedilabs.TimerAkurat();
timer.Mulai();
while (--i > 0)
{
SingletonClass2 instance = SingletonClass2.Instance;
}
timer.Berhenti();
Console.Out.WriteLine("Pendekatan II (with internals)= {0}", timer.HasilDlmMilliDetik);
}

}

}

Hasil yang saya dapatkan di laptop saya sbb : (hasil ini akan berbeda tergantung spec system)

Pendekatan I (with lock) = 0.528000067047628
Pendekatan II (with internals)= 0.164825417755609

seperti kita lihat yg memakai synchronization internal lebih cepat 3-4 kali-nya synchronization dgn menggunakan lock. Bisa dibayangkan bhw code kita bisa lebih cepat 3-4 kali dengan hanya menghilangkan penggunaan lock ini.

Lock is bad? ya dan tidak, untuk beberapa kasus tertentu ketika kita tidak bisa lagi menggunakan synchronization object yang lain, lock sangat membantu karena sangat mudah menggunakannya. Tapi menurut pengalaman saya selalu saja ada cara utk mereplace penggunaan lock.

Makasih Om Agus utk contoh code yang nimbulkan ide nulis ini.

Share this post: | | | |
Posted: Mar 18 2006, 05:31 AM by omwok | with 2 comment(s)
Filed under:
ThreadSafe, Synchronization and Performance

Saya jadi teringat akan judul diatas ketika membaca blog-nya om agus http://blogs.netindonesia.net/agus/archive/2006/03/15/8978.aspx

Saya ada beberapa tip mengenai hal2 ini yaitu :

1. Sebisa mungkin hindari pemakaian lock, pakailah yg lebih atomic, spt System.Threading.Interlocked
2. Ketahui .net internal synchronization dgn belajar bagaimana .net framework menjalankan suatu code, sebisa mungkin pake .net internal tadi.

Ambil contoh code Singleton-nya Om Agus, kumodifikasi spt ini
public class MySingletonClass
{
    private static MySingletonClass _instance;

    //change private to static constructor
    static MySingletonClass()
    {
        _instance = new MySingletonClass();
    }

    // change method to property because property always inline when use by another class
    public static MySingletonClass Instance
    {
           get{
                return _instance; 
           }
    }
}

spt yg kita lihat singleton ini jadinya lock free. Apakah thread safe? ya karena static constructor hanya akan dieksekusi oleh framework sekali (.net internal synchronization). Sayang saya belum buat komparasi antara kedua pendekatan ini mungkin ada yang bisa membantu?

Share this post: | | | |
Posted: Mar 18 2006, 12:56 AM by omwok | with no comments
Filed under:
Cracking Visual Studio

Visual studio 2005 ok banget kan? apalagi dgn .NET 2.0 support seperti generics, anonymous method...dst.

Well ternyata not so.....hehehe....saya nemuin satu bug ato limitation yang agak aneh, tapi sebenarnya masuk akal....

Bug ini terjadi ketika saya lagi design suatu project yg make Web Service, trus terlintas di kepala....ini kan jamannya .NET 2.0, kira2 bisa gak ya...WebMethod di generic kan?...;). Seharusnya jawabannya gak bisa...., karena Web Service ada WSDL-nya yang mendeskripsikan WebService tadi, sehingga segala sesuatu yang di passing ke dan dari WebService tadi sudah harus didefenisikan dahulu dan tentu saja sesuatu tadi harus dapat di serialisasikan. Kalo kita passing T berarti WebMethod tadi gak terdefenisi secara jelas...

Maka kemudian percobaan dimulai....saya buat web method spt ini

[WebMethod]

public T TestGeneric<T>(){

return default(T);

}

Trus kucompile Web Service saya tadi hasilnya ternyata Visual Studio success melakukan compilasi...what da h*, apakah benar berhasil? saya coba buka asmx-nya lewat IE dan error yang diperkirakan keluar....ha ...ha...ha.

Saya ternyata terlalu berharap banyak bahwa at some level Visual Studio harusnya bisa mendeteksi hal2 bodoh seperti ini.....:D. saya mengharapkan Visual Studio at least bisa deteksi bahwa feature ini gak bisa diterapkan pada kasus2 spt ini...dan memberikan error message ketika kompilasi dan bukannya runtime...:D

Well tapi dengan segala feature-nya saya dapat memaklumi kalau ada beberapa yang miss...;). So guys jangan pernah berkecil hati ...bahkan msft pun bisa berbuat silap...keep optimist.

 

Share this post: | | | |
Posted: Mar 17 2006, 07:01 AM by omwok | with 13 comment(s)
Filed under:
Look no more....look always...

Dari waktu ke waktu saya selalu mencari tahu perkembangan grid computing di dot net world. Dan effort2 yg gabungin SOA concept dgn segala buzz-nya dgn grid itu sendiri.

Hasil-nya WSRF.NET initiative utk wrapping Globus dgn Web Service Resource Framework. Kewlnya mereka pake WSE 3.0 utk security mungkin juga MTOM (blum lihat lebih dalam....baru ngoprek)

Bingung juga awalnya ......, mo dibawa kemana ini ya? kalo lihat ttg WCF dan perkembangannya..., apakah SOA di dotnet is WCF? ato ini dia? lebih bingung lagi begitu lihat sponsor researchnya ternyata MSFT....huaah...., berarti gak mungkin dong yg spt ginian lepas dari sightnya WCF team.

Kesan saya ama WSRF, konsep yang sangat bagus, sedangkan mengenai WSRF.NET saya pasti make .....:D

Share this post: | | | |
Posted: Feb 23 2006, 01:58 AM by omwok | with 1 comment(s)
Filed under:
Mampus gue..:((

Salah satu kerjaan besar di t4 kerjaku skrg ini adalah ngerubah sebuah solusi dari vb6 ke .net. Dengan harapan bisa lebih scalable, reliable, robust, dst nya lah....Kendala so pasti ada, arsitektur udah beda sama sekali technology apalagi....so banyaklah tantangannya....

Ternyata Msft barusan ini ngeluarin guide gimana ngerjain project convert spt ini (http://msdn.microsoft.com/practices/default.aspx?pull=/library/en-us/dnpag2/html/vb6tovbnetupgrade.asp). Guidance ini dibuat berdasarkan real life experience, jadi bisa dijadikan referensi gitu loh..;). Guide ini punya tool yang menarik yaitu assesment tool, dengan assesment tool ini kita bisa mengestimasi kira2 berapa lama dan berapa banyak biaya yang dikeluarkan untuk kerjaan2 ngonvert2 spt ini....(hmmm kira2 berapa ya figures yang dikeluarkan tool ini utk kerjaan di company ini?)

Setelah melakukan quick run thd modul2 untuk fungsi I (55 modul), iterasi berikut dari proses disini didapatlah figure2 spt ini...

Total effort 17.6 months

Total cost 182139 US$

Kalo cost seh masih bisa berkelit...itu pasti pake rate org luar ..:D, tapi kalo effort?...alamak...:( mampus gue...:((.

Look at the bright side....jadi ada bahan utk board meeting...:))

Share this post: | | | |
Posted: Feb 17 2006, 02:10 AM by omwok | with 2 comment(s)
Filed under:
Ide lama
Pengen eh buat sesuatu yang academic banget spt nerapin neural network, genetic algorithm ama genetic programming. Ide ada, jabaran ide juga udah ada, bahkan sebagian building block utk nerapin yang diatas juga udah dibuat..., yang blum cuma nyari waktu yang cukup utk realisasiin yang sisanya.... lagi2 waktu tersita ama kerjaan, susah banget ya?.... Pengen banget ngerjain ide2 ini.....
Share this post: | | | |
Software Factory

When heading back to home with Om Risman after community session at msft. We talked about direction of software development, what problem that continuely occurs, and how my current company vision to solve it. At home still curious about the topic, I go through the vision, requirement, specification, googling, and some pre-design analysis of an internal project at my current company, i realized then the project share the same vision to the Software Factory Methodology envisioned by MSFT (Software Factories: Assembling Applications with Patterns, Models, Frameworks, and Tools ). In short the methodology combine existing software development methodogies, and product/system specific architecture.

Great news also they already release CTP version of Domain Specific Language Tools. The tools not mean to be one stop solution, but we have to customized/extend it to suit the application architecture and design.

It was a great relief reading the article that my current company initiative going to the right direction. With the capability to integrate with Visual Studio and VSTS, we are sure to maximized investment on development tools.

I think the methodology will have major impact on the future, for Enterprises they can manage, control the customization or adding feature to their existing system, for ISV they can manage their product better and faster. Although it still in early stage but the future looks promising. Effort surely being put to make it happen. Now get back to work !...;)

Share this post: | | | |
Posted: Feb 04 2006, 03:38 AM by omwok | with no comments
Filed under:
Object Oriented Database ... Getting my feet wet ...yet again
This past 1 week, I've been playing around (yet again) with db4o ...in .NET (yeee...haaa). After almost 2 years ago play with the same brand of OODB in java, I found the same exact excitement in .NET especially the Native Query (genius ... that can be compared to LINQ to so me extend...but hey this is all done in .NET 2.0 and C# 2.0). I already made up my mind to use the db4o in our in-house application. Maybe I got the time to add and update the article here about the use of db4o and how to use it.
Share this post: | | | |
Posted: Dec 10 2005, 05:24 AM by omwok | with 3 comment(s)
Filed under:
XACML
Kenapa .NET terasa lambat sekali dalam nerapin standard2x bagus spt ini...
Emang ada Open Source .NET project utk ini tapi.....:p
Aku sendiri lebih cenderung melihat implementasi XACML di Java lebih bagus dan bener
Aku udah porting Java XACML Implementation ke .NET tapi blom ku test ama conformance test-nya oasis....
Let see by tomorow I got full result of testing....
Share this post: XACML" target="_blank" title="Send via email"> | XACML to DotNetKicks"> | XACML to del.icio.us"> | XACML to digg.com"> | XACML to Live Bookmarks">
Posted: Jul 06 2005, 12:09 AM by omwok | with no comments
Filed under:
New job...new world
Dapat kerjaan baru sebulan lalu yg memaksa aku utk lebih mature dari sisi pribadi..., thank you om ris..;) Howdy, tuk temen2x cartenzku...hope everything run in your way.... Ya Allah, Ya Allah Keith packard has a blog, and I love it...:D
Share this post: | | | |
Posted: Jul 05 2005, 11:48 PM by omwok | with no comments
Filed under: