Ada satu hal yang akhir-akhir ini benar-benar mengusik pikiran saya. Awalnya adalah dari pertanyaan-pertanyaan di pikiran saya mengenai profesi keinsinyuran di Indonesia yang saat ini tidak jelas bagaimana aturannya. Sekonyong-konyong ketika saya memasuki bangku kuliah, gelar Insinyur (Ir.) sudah tidak ada lagi.

Pertanyaan kemudian mengkhusus, ketika saya mengamati kartu nama dari perusahaan bahwa posisi saya adalah sebagai Software Engineer. Terus terang ada rasa bangga di sana, karena ada pengakuan dari sebuah perusahaan yang menurut saya cukup punya nama di Indonesia, bahwa saya adalah seorang Insinyur (Engineer). Dan memang ada alasan bahwa perusahaan memberikan title itu, karena ada serangkaian kegiatan pelatihan yang harus dijalani sesuai dengan standar yang berlaku secara internasional.

Continue reading »


  • Share/Bookmark

Setelah postingan terdahulu, pada postingan ini saya kembali ingin menampilkan hasil chat saya dengan kawan saya itu. Tapi chat ini bukan untuk men-judge dia seperti posting terdahulu (hehehe… kok sok nge-judge orang sih?!), tapi untuk memberikan fakta atas gossip yang belakangan ini merebak di kalangan alumni Jurusan Teknik Elektro UNUD.

Gossip? Yup, belakangan ini merebak gossip bahwasanya akan diadakan perubahan (format) ijazah – ejaannya gini bener ga sih? – untuk lulusan JTE UNUD yang mengambil konsentrasi Sistem Komputer dan Informatika (SKI). Nah, kebetulan kata teman-teman alumni gossip ini bersumber dari kawan saya ini yang kebetulan adalah putri seorang petinggi UNUD (Cheah petinggi!). Btw, kok kesannya kawan saya ini jadi sumber gossip ya? Hehehe… sebenarnya bukan gossip sih (jadi otomatis kawan saya bukan sumber gossip dong), dan masalah gossip atau bukan bukanlah hal yang mau saya bahas di sini tetapi opini dari inti permasalahan yang terjadi (Halah! Bahasanya!!!).

Continue reading »


  • Share/Bookmark

Yak, setelah hampir seminggu berada di tahun 2008, mulailah kita dengan hari-hari yang baru di tahun yang baru. Sebelum ngebahas judul di atas, ada baiknya saya brainstorming dulu pengalaman-pengalaman yang belum sempat diulas di sini.

  • Melewati malam tahun baru dan beberapa hari setelahnya dengan cuaca buruk (hujan melulu di Denpasar). Sempat sakit alergi gatel2 ga jelas. I hate that…
  • Ulang tahunnya Yeyen 2 Januari kemarin. Happy Birthday to u honey.
  • Persiapan Staff Party tgl 19 Januari (barengan ma rencana launching BBC, tapi launching nya dibatalin kan? Syukurlah…), acaranya sudah didahului dengan Olympic dengan 3 pertandingan sudah diadakan pada hari Sabtu (5 Januari 2008) kemaren yaitu pertandingan futsal di The Balls Kuta, trus pertandingan Badminton, dan Basket di Stadion Prajaraksaka Denpasar. Pinginnya sih bikin tulisan mengenai kegiatan ini (cuman kepingin aja, wkwkwk… akhirnya ga ditulis kan…). Yah pada intinya kegiatan berlangsung sangat seru, antusias para kuli IT juga bagus. Olympic bakal dilanjutin tgl 12 Januari 2008 mendatang.
  • Masih seputaran Staff Party, kebagian nyiapin perlengkapan. Jadi minggu ini bakalan sibuk ngurus sound system, LCD projector, lighting, equipments for outdoor activities, etc.
  • Dapet assignment buat ngerjain Clinic System. Kalo di benak kita (apalagi saya waktu kuliah…hehehe…) biasanya berpikir paling banter cuman sistem informasi biasa, paling2 cuman add, update, delete, plus manipulasi query2 sql doang! D**n, I wish it could be that easy. Yup, walau pun hanya sistem klinik biasa, tapi standar design system-nya tetap standar perusahaan! Jadilah saya berkutat dengan sistem n-tiered. Yup, semangat!

Note:

N-tiered architecture ternyata menarik juga! Ternyata untuk bikin aplikasi yang powerful tapi tetap fleksibel itu ga gampang!


  • Share/Bookmark

Yup, i have sent an email to Pak Kompi, Pak Charles (and his team members). All documentation as requested in meeting held previously, has been completed during this day. So, for now I just wait another project (From TechOne Australia, as discussed with Pak Kompi earlier I think. Hopefully :) ).

So, for tomorrow there will be enough time to surf the net! Huehehehehe…

BTW, I have read a nice article this morning at echo. It is about bug founded in alstrasoft E-Friends. According to echo’s descriptions:

E-Friends is an online social networking script that allows you to start your own profitable community just like Friendster and MySpace social networking site plus the ability to offer paid membership subscriptions.

In general, it is a bug which allow user to exploit the site with user query (SQL injection). Salute to echo team!


  • Share/Bookmark

Ini review lagi tentang Java! Check this out.

Question: Does Java pass by reference or pass by value?

Answer:
Before answering the question, let define which are pass-by-reference and pass-by-value means.

Pass-by-value
The actual parameter (or argument expression) is fully evaluated and the resulting value is copied into a location being used to hold the formal parameter’s value during method/function execution. That location is typically a chunk of memory on the runtime stack for the application (which is how Java handles it), but other languages could choose parameter storage differently.

Pass-by-reference
The formal parameter merely acts as an alias for the actual parameter. Anytime the method/function uses the formal parameter (for reading or writing), it is actually using the actual parameter.

Source: http://javadude.com/articles/passbyvalue.htm

But, fact about Java explains that:

Truth #1: Everything in Java is passed by value. Objects, however, are never passed at all.
That needs some explanation – after all, if we can’t pass objects, how can we do any work? The answer is that we pass references to objects. That sounds like it’s getting dangerously close to the myth, until you look at truth #2:

Truth #2: The values of variables are always primitives or references, never objects.
This is probably the single most important point in learning Java properly. It’s amazing how far you can actually get without knowing it, in fact – but vast numbers of things suddenly make sense when you grasp it.

Source: http://www.yoda.arachsys.com/java/passing.html

According to these two facts, we can conclude that:

Java does manipulate objects by reference, and all object variables are references. However, Java doesn’t pass method arguments by reference; it passes them by value.
Source: http://www.javaworld.com/javaworld/javaqa/2000-05/03-qa-0526-pass.html

To give clearer answer, let examine this example. In this example I create three classes below:

1. Class ReferenceTest is the blueprint of an object which we use as example of swapped object.

public class ReferenceTest {
int myRef;
public ReferenceTest(int myInput){

this.myRef = myInput;

}

public int getMyRef(){
return myRef;

}

public void setMyRef(int myInput){
this.myRef = myInput;

}
}

2. Class SwapTest which contain method to do swapping test.
public class SwapTest {
public static void swaping(ReferenceTest rt1, ReferenceTest rt2){

System.out.println();
System.out.println(“=======================================”);

System.out.println(“This is what happened in swap process:”);

System.out.println(“Before swapping: “);

System.out.println(“Value of firstRt: ” + rt1.getMyRef());

System.out.println(“Value of secondRt: ” + rt2.getMyRef());

ReferenceTest tempRt;
tempRt = rt1;

rt1 = rt2;
rt2 = tempRt;

System.out.println();
System.out.println(“After swapping: “);

System.out.println(“Value of firstRt: ” + rt1.getMyRef());

System.out.println(“Value of secondRt: ” + rt2.getMyRef());

System.out.println(“=======================================”);

}

}

3. Class MainTest is the main class.
public class MainTest {
public static void main(String[] args) {

ReferenceTest firstRt;

ReferenceTest secondRt;

firstRt = new ReferenceTest(5);

secondRt = new ReferenceTest(10);

System.out.println(“Before swapping: “);

System.out.println(“Value of firstRt: ” + firstRt.getMyRef());
System.out.println(“Value of secondRt: ” + secondRt.getMyRef()); SwapTest.swaping(firstRt, secondRt);
System.out.println();

System.out.println(“After swapping: “);
System.out.println(“Value of firstRt: ” + firstRt.getMyRef());
System.out.println(“Value of secondRt: ” + secondRt.getMyRef());
}

}

Result of the application is as shown below:

Before swapping:
Value of firstRt: 5

Value of secondRt: 10

=======================================
This is what happened in swap process:
Before swapping:
Value of rt1: 5
Value of rt2: 10

After swapping:
Value of rt1: 10
Value of rt2: 5

=======================================

After swapping:
Value of firstRt: 5
Value of secondRt: 10

By the first, application will create two instances of ReferenceTest class which are firstRt and secondRt objects. Java will create two Objects which type is ReferenceTest and two variables whose value is a pointer to those two objects.

Figure1. Java will create two objects and two variables.

So, when we attempt to execute these statements in main method:
System.out.println(“Before swapping: “);
System.out.println(“Value of firstRt: ” + firstRt.getMyRef());
System.out.println(“Value of secondRt: ” + secondRt.getMyRef());

Java will give values of ReferenceTest objects on which those two variables pointed. The result of these statements is:
Before swapping:
Value of firstRt: 5
Value of secondRt: 10

When we pass these two variables (firstRt and secondRt) into swaping method, Java will create two variables to collect those two variables which were passed.

Figure2. Java will create two variables in swaping method.

So, when we attempt to execute these statements:
System.out.println(“Before swapping: “);
System.out.println(“Value of firstRt: ” + rt1.getMyRef());
System.out.println(“Value of secondRt: ” + rt2.getMyRef());

These statements will give same result as statements in Main method, since these two variables contain value of pointer which is pointed into same objects which also pointed by firstRt and secondRt in Main method. The result of these statements is:
Before swapping:
Value of rt1: 5
Value of rt2: 10

When we swap rt1 and rt2, means we swap pointer value contained by them. Even though they were swapped, actually firstRt and secondRt are not swapped (since Java passes the reference by value).

So, when we attempt to execute these statements in swaping method after swapping process:
System.out.println(“After swapping: “);
System.out.println(“Value of firstRt: ” + rt1.getMyRef());
System.out.println(“Value of secondRt: ” + rt2.getMyRef());

This will give output as shown below:
After swapping:
Value of rt1: 10
Value of rt2: 5

Figure3. After swap process, rt1 and rt2 is swapped while firstRt and secondRt isn’t.

Otherwise, when we execute these statements in Main method:
System.out.println(“After swapping: “);
System.out.println(“Value of firstRt: ” + firstRt.getMyRef());
System.out.println(“Value of secondRt: ” + secondRt.getMyRef())
;
This will give output as shown below:
After swapping:
Value of firstRt: 5
Value of secondRt: 10


  • Share/Bookmark

Weiz, setelah sekian lama akhirnya ngepost lagi! Ini tugas buat di kantor. Sebenarnya banyak sekali opini yang mengulas di forum2 di internet. Ok, here it is!

QUESTION:

Why Java is not a 100% Object Oriented Programming Language?

ANSWER:

Before we answer the question, we should have a specific point of view of the meaning of Object Oriented Programming Language. There are actually so many opinions which tell there is no any specific term can be used to define it. This is a sample of them:

Source: http://forum.java.sun.com/thread.jspa?threadID=5186578&start=15&tstart=0

On “purity” as a measure of object-orientedness:

However, this definition is problematic in that it implies that “purity” is a valid concept. Yet, there is no accepted definition of the term “pure OO language”. Despite years of discussion and argument on the net, and in other circles, I have never seen anyone present a definition of a “pure OOPL” that met with general agreement by others.
– Robert Martin, founder, CEO, and president of Object Mentor Inc., software industry leader.

On the value of using “purity” as a measure of a programming language:

I will not go into the discussion about “purity” beyond mentioning that I think that a general purpose programming language ought to and can support more than one programming style (“paradigm).
– Bjarne Stroustrup, designer and implementer of the C++ programming language, etc.

On the alleged “purity continuum”:

OO language experts divide OOPLs into two categories, hybrid languages and pure OO languages. Hybrid languages are based on some non-OO model that has been enhanced with OO concepts. C++ (a superset of C), Ada 95, and CLOS (an object-enhanced version of LISP) are hybrid languages. Pure OO languages are based entirely on OO principles; Smalltalk, Eiffel, Java, and Simula are pure OO languages.

So, in this assignment I will assume that OOP Language:
Source: http://forum.java.sun.com/thread.jspa?threadID=5186578&start=15&tstart=0
Purist view about a 100% OOP language would be “Everything is an object”.

According to this assumption, there are several reasons why Java is not a 100% Object Oriented Programming Language:

In Java, the primitives have been excused from being objects for simplicity and to improve performance.
This is makes sense, since a primitives data types is not an object and couldn’t be defined as an object, neither a class. It is clear enough, because primitive data don’t have any ability/characteristic such as inheritance or polymorphism. So, according to this explanation we can say that Java can be defined as not fully OOP supported language, since it’s allowed a non object-oriented thing to exist.

Operator overloading is not possible in java.
Except “+” operator which can be use in two different operations (addition operations and concatenations of string), there is no possibilities in Java to do an operator-overloading. Since, this is a kind of polymorphism ability (specific for operators) we also could say that Java isn’t 100% OOP Language.

Multiple-inheritance through classes is not possible.
As same as the explanations of operator overloading, multiple inheritance is also an (ad-hoc) abilities. We could also say that Java isn’t 100% OOP Language according to this point of view.

Availability of static methods and variables.
Since this ability is exist in Java, which allow developers to invoke a method without instantiating any object is like breaking rules of encapsulation. We could also say that Java isn’t 100% OOP Language according to this point of view.

References:


  • Share/Bookmark
© 2010 IMS' Blog Suffusion WordPress theme by Sayontan Sinha