Posts filed under 'IT Hints & Tips'
Biasanya kalo kita buka halaman web ... terkadang ada tulisan "If your browser doesn't automatically redirect you to my blog within a few seconds, click here please.". Nah kalimat itu adalah kalimat umum untuk me-redirect halaman web ke URL tertentu. Tentunya untuk personal web seperti punya gw ... link itu dipergunakan biasanya untuk me-redirect current page ke URL sub-domain punya gw ... wich is blog.auliabig.com.
Cara untuk membuat redirection-page kayak gitu sebenernya mudah ... salah satunya dengan menggunakan HTML. Lihat contohnya di bawah :
HTML:
-
<meta content="2; URL=http://blog.auliabig.com/" http-equiv="refresh" />
-
<meta content="automatic redirection" name="keywords" />
dengan menambahkan sepotong meta HTML seperti itu di dalam tag HEAD anda dapat membuat halaman redirection dengan sangat mudah. Perhatikan properties content="2" ... itu artinya menandakan detik tunggu untuk melakukan redirection.
Tapi ada yang lucu juga sih .... ternyata pemakaian redirection page ini kadangkala "tidak tepat sasaran". Kenapa tidak tepat?? karena baru tadi pagi dengan tidak sengaja (kayaknya sengaja untuk mempromosikan blog gw
) meredirect blognya ke halaman blog gw 
Semoga bisa diambil hikmahnya .... untung salah redirect ke situs orang keren
... coba redirectnya ke situs porno hahahaha ^-^
PS : Benerin tuh linknya Pak 
September 21st, 2006
Hari ini gw mo sharing tentang Interface, mudah2an berguna ^-^. Interface kurang lebih adalah suatu reference type yang berisikan hanya abstract members seperti Method, Event, Properties dan Indexer yang tidak mempunyai implementasi (kurang lebih seperti itu ^-^)
Coba kita lihat bentuk dan pemakaian interface berikut ini :
C#:
-
public interface ILelaki
-
{
-
void Makan();
-
void Kerja();
-
void Tidur();
-
void Ngomong();
-
}
Nah tadi kan disebutkan kalo interface itu tidak mempunyai implementasi, sekarang kita lihat bagaimana interface diatas diimplementasikan pada suatu class :
C#:
-
public class LelakiPadaUmumnya : ILelaki
-
{
-
///
-
/// override method yang ada di interface
-
///
-
public void Makan()
-
{
-
// Do something
-
}
-
///
-
/// override method yang ada di interface
-
///
-
public void Kerja()
-
{
-
// Do something
-
}
-
///
-
/// override method yang ada di interface
-
///
-
public void Tidur()
-
{
-
// Do something
-
}
-
///
-
/// override method yang ada di interface
-
///
-
public void Ngomong()
-
{
-
// Say : MAU KU-ANTAR PULANG
-
}
-
/// METHOD BARU
-
///
-
public void NyariIstri()
-
{
-
// Do something
-
}
-
}
Mulai ada bayangan? ... coba anda perhatikan, method2 yang sudah dideklarasikan pada interface ILelaki dioverride kembali pada class LelakiPadaUmumnya, tapi .... tentunya dengan implementasi didalamnya.
Sebagai catatan : "Class yang mengimplementasikan suatu interface harus mengimplementasikan semua anggota dari interface tersebut"
Sekarang coba kita lihat class dibawah ini :
C#:
-
public class LelakiBuayaDarat : ILelaki
-
{
-
///
-
/// override method yang ada di interface
-
///
-
public void Makan()
-
{
-
// Do something
-
}
-
///
-
/// override method yang ada di interface
-
///
-
public void Kerja()
-
{
-
// Do something
-
}
-
///
-
/// override method yang ada di interface
-
///
-
public void Tidur()
-
{
-
// Do something
-
}
-
///
-
/// override method yang ada di interface
-
///
-
public void Ngomong()
-
{
-
// Say : CHECK-IN YUK
-
}
-
///
-
/// METHOD BARU (lelaki buaya darat, busyet!!! aku tertipu lagi ... ^-^)
-
///
-
public void NyariCewek()
-
{
-
// Do something
-
}
-
}
Mulai ada gambaran ..??? ^-^
Mungkin sekarang anda bertanya-tanya bagaimana cara pengaplikasiannya? Coba kita lihat contoh dibawah ini :
C#:
-
public class DuniaLelaki
-
{
-
private ILelaki lelaki;
-
-
public void UcapkanSesuatuSetelahKencanPertama(ILelaki interfaceLelaki)
-
{
-
lelaki = interfaceLelaki;
-
lelaki.Ngomong();
-
}
-
-
public DuniaLelaki()
-
{
-
LelakiPadaUmumnya lelakiPadaUmumnya =
new LelakiPadaUmumnya
();
-
UcapkanSesuatuSetelahKencanPertama(lelakiPadaUmumnya);
-
-
LelakiBuayaDarat lelakiBuayaDarat =
new LelakiBuayaDarat
();
-
UcapkanSesuatuSetelahKencanPertama(lelakiBuayaDarat);
-
}
-
}
Bagaimana? paham ^-^?
Mudah2 coding gw lebih memberi penjelasan daripada kata2 
July 27th, 2006
Just recently ago ... me and my colleaques had a little training with Agus Kurniawan (AK), one of Microsoft MVP, about Object Oriented Programming (OOP) in DotNET. It's mostly about fundamental concept how to program and work in Object Oriented kinda way.
One of AKs topic was "Coding Standard in C#". He said : "... every team has to have a standard, in this case coding standard ..." -- something like that ^-^.
I thought I had a good programming standard ... I thought we had a good programming standard!!!. Then again ... we're not
. I admit it ... since I know how to write a code, actually, I know there's a standard, but ... even if I do, my coding standard kinda fuzzy hahaha
. I stick with one standard ... and all of a sudden BANG!!! one step backward to neanderthal programming
.
Not very consistent of me he10x. But comes to think of it ... we really do need a good standard, why??? ... to make one same perspective that's why!!.
Let's imagine this ... you have a crush on some nice girl who really adores a romantic kinda guy (which is me
, you couldn't possibly say that you love her with "Response.Write("I LOVE YOU")" would you?
.
Okay ... back to coding standard. In C# coding standard there are lots of terminologies and definitions, two of them are Camel Case and Pascal Case.
Camel Case
A word with the first letter lowercase, and the first letter of each subsequent word-part capitalized.
Example : customerName
Pascal Case
A word with the first letter capitalized, and the first letter of each subsequent word-part capitalized.
Example : CustomerName
These two terminolgy are generaly used in C# programming, Microsoft too implements these two. Take a look at this example :

Thanks to AK, He really brightening things up. Hey AK have you received our new company Coding Standard Policy yet?!? 
If you wanna know more about C# coding standard ... click here
July 14th, 2006