Firefox failed to recover
What’s happen if the new Firefox 3.5 failed to recover a site? It’s embarassed…

What’s happen if the new Firefox 3.5 failed to recover a site? It’s embarassed…

These months, I’m seeing a rise of quality and serious Indonesian local contents, mainly in information technology. Many of them are also audio and video based. This is a compiled list of some that I look closely to:

Google Web Toolkit (GWT) is a one-of-a-kind open-sourced project with main purpose: to allow people creating a full AJAX powered web application without writing a line of JavaScript. In other words, developers just need to write their code in Java and get the full capabilities of the powerful Java IDEs out there, including auto complete, pretty format, template, refactoring, and full debugging session. The goal is obvious, if one is Swing programmer and using Eclipse or other modern java IDEs, surely he’ll love GWT.
At the beginning, many people were just skeptical of this project. How can GWT replace traditional web development. And giving the easiness of creating static page using HTML and the rise of JavaScripts libraries, many argued that the problem of JavaScript coding is already solved by using that libraries. Looking at today’s JavaScript code, the support of debugging, and the support of modern browser to the ‘almost’ standard JavaScript, I must also admit that JavaScript programming is not as scary as it were several years ago. So that time, I were pretty skeptical as well… I didn’t even try to play with GWT.
Another skeptical view to the GWT: http://jamesmckay.net/2007/12/volta-gwt-and-leaky-abstractions/ and http://ajaxian.com/archives/google-web-toolkit-the-correct-level-of-abstraction
Slowly, it’s started to change after Google decided to open-source GWT. Of course, there were still skepticism around the web regarding this step. Some may say, why Google not even use the toolkit for its own projects? This was a point where I decided to step in and try to use GWT for my projects. Being a cutting-edge technology-centric man, I even tried to mix the web application with Spring, my favorite JEE framework. And boom, it worked… hardly… I couldn’t using the Hosted Mode properly, and thus couldn’t debug the client code from the IDE. The building process was slow, the code was terrible, and the interface was buggy. Not to mention that its integration with Eclipse WTP (Web Tools Platform) is BAD. Lesson learned… I stayed away from GWT (but keep a close look).
A year after that, GWT 1.5 was released. This introduced the support of Java 5 to GWT. However, I were still not interested to get my hand dirty.
It’s by the time of GWT 1.6 introduced, I dared to look more carefully to the changes it made and based on my observation, it’s going to the correct direction. An official plugin for Eclipse was prepared. The server side servlet was now defined as standard servlet (old GWT defined servlet in another XML file, a reason why integration with Spring caused a lot of problems with hosted mode). Compile speed improvement was magnificent. The directory structure was better integrated with Eclipse WTP. You can even use it with Google AppEngine.
And now (this is important), we can’t anymore say that GWT is not used internally by Google. A newest project by Google called Google Wave (by the way, this project is super cool, see this for further info), used GWT. And I think this is the most important step Google takes for a successful GWT. Many of the problems that I find very painful are discovered and further planned to be fixed in the GWT 2. In fact, the code is already on SVN and those who are brave enough can self-compile the toolkit.
So what are the most important improvements planned for GWT 2?
- Performance boost
- Out-of-process Hosted Mode (OOPHM)
- UI Binder, declaratively write the UI. Think of writing the code like Tapestry or Wicket, if you are familiar with them.
You can dig more improvements of GWT from this talks: http://code.google.com/events/io/sessions/GwtPreviewGoogleWebToolkit2.html and this talk: http://code.google.com/events/io/sessions/GoogleWavePoweredByGWT.html
Kopiert von:
http://www.macuser.de/forum/f33/t-mobile-tarife-317203/
–
Gerade erhielt ich auf meinem iPhone (gerade ne Woche alt mit neuer Nummer, die aus guten Gründen nur ausgewählte Personen kennen) einen Anruf.
Anruferin:
“Hallo. Hier ist die Firma Omni-Quest (oder so). Wir machen im Auftrag von T-Mobile eine Umfrage zur Kundenzufriedenheit mit den T-Punkten. Sie haben doch letzte Woche im T-Punkt in XY eingekauft?”
Ich:
“Ja”
Anruferin:
“Wir würden Ihnen gerne ein paar Fragen zur Kundenzufriedenheit stellen. Wären Sie damit einverstanden?”
Ich:
“Ja.”
Anruferin:
“Prima. Könnten Sie mir Ihre Festnetznummer geben, damit ich Sie dort anrufen kann? Die Handy-Tarife sind doch ziemlich teuer.”
Ich:
“Wie?”
Anruferin:
“Ja – Sie verstehen doch sicherlich, dass wir die Kosten unserer Umfrage in Ihrem Sinne gering halten wollen und hätten dazu gerne Ihre Festnetznummer.”
Ich:
“Die T-Mobile gibt eine Umfrage in Auftrag und scheut dabei zu hohe Kosten im eigenen Mobilfunknetz?”
Anruferin:
“Wir sind ja nicht die T-Mobile.”
Ich:
“Also meine Festnetznummer bekommen Sie jetzt lieber nicht. Entweder stellen Sie mir so Ihre Fragen, oder wir lassen es.”
Anruferin: (legt wortlos auf)
Siapa yang belum dengar proyek gigantik Wolfram|Alpha yang tujuannya tidak tanggung-tanggung: mengambil alih posisi Google sebagai mesin pencari yang paling banyak digunakan di dunia?
Buat yang menanti-nanti kehadirannya, hari ini rencananya mesin pencari itu akan diluncurkan. Tepatnya pukul 7 malam waktu CDT (Jumat) atau pukul 2 pagi waktu Eropa Barat (Sabtu) atau pukul 7 pagi Waktu Indonesia Barat. Menariknya lagi, acaranya akan di-streaming langsung dan kita akan bisa melihat problem-problem yang mungkin terjadi.
Mengapa Wolfram|Alpha begitu menarik? Mesin pencari ini, tidak seperti mesin pencari yang kita kenal sebelumnya, mencoba untuk mengkoleksi jawaban dari persoalan yang ada di dunia. Google dan mesin pencari lain hanya menampilkan link-link ke mana jawaban dari persoalan yang kita cari mungkin ada. Sang pengguna tentunya harus berusaha melakukan riset lebih lanjut untuk mendapatkan hasil yang diinginkan. Wolfram|Alpha bekerja lebih keras, karena ia akan berusaha mendapatkan intisari jawaban yang kita cari dan menampilkannya dalam bentuk yang indah lebih penting lagi: seragam. Bagi yang tertarik, mungkin bisa menonton cuplikan berikut ini: http://www.wolframalpha.com/screencast/introducingwolframalpha.html

Kemungkinan besar, para peneliti dan analis adalah yang paling diuntungkan dengan adanya mesin pencari baru ini. Tapi bukan berarti pengguna biasa tidak akan tertarik dengannya. Kalau Wolfram|Alpha bisa mengenal kalimat manusia dengan baik, mungkin mesin ini akan menjadi pengganti Yahoo! Answer, hanya jawabannya akan diolah otomatis, bukan oleh pengguna lain seperti Yahoo! Answer.
Tentu, akan ada pertanyaan tentang hak cipta di masa mendatang. Kita lihat saja nanti perkembangannya.
Nama Wolfram, sepertinya saya pernah dengar deh…
Wolfram ini terkenal dengan software Mathematica-nya. Bagi saya, software ini pun sudah cukup indah, karena tidak seperti software matematik lainnya, Mathematica menampilkan juga langkah per langkah dari pertanyaan ke jawaban. Persis seperti yang harus kita tulis saat ujian Matematika dulu.
Yeah… GWT 1.6 is here!
http://googlewebtoolkit.blogspot.com/2009/04/introducing-gwt-16-and-friends.html

Here at ThinkGeek we’re pretty lazy when it comes to technology. We expect our gadgets to do all the busywork while we focus on the high level important tasks like reading blogs. That’s why we hate to have to crack open our laptops just to see if there is any wi-fi internet access about… and keychain wi-fi detectors, we would have to actually remove them from our pockets to look at them. But now thanks to the ingenious ThinkGeek robot monkeys you can display the current wi-fi signal strength to yourself and everyone around you with this stylish Wi-Fi Detector Shirt. The glowing bars on the front of the shirt dynamically change as the surrounding wi-fi signal strength fluctuates. Finally you can get the attention you deserve as others bow to you as their reverential wi-fi god, while geeky chicks swoon at your presence. You can thank us later.
From: http://www.thinkgeek.com/tshirts-apparel/interactive/991e/?selsku=1
Joshua Bloch in his book, “Effective Java” summarized the levels of thread safety:
- immutable—Instances of this class appear constant. No external synchronization is necessary. Examples include String, Long, and BigInteger (Item 15).
- unconditionally thread-safe—Instances of this class are mutable, but the class has sufficient internal synchronization that its instances can be used concurrently without the need for any external synchronization. Examples include Random and ConcurrentHashMap.
- conditionally thread-safe—Like unconditionally thread-safe, except that some methods require external synchronization for safe concurrent use. Examples include the collections returned by the Collections.synchronized wrappers, whose iterators require external synchronization.
- not thread-safe—Instances of this class are mutable. To use them concurrently, clients must surround each method invocation (or invocation sequence) with external synchronization of the clients’ choosing. Examples include the general-purpose collection implementations, such as ArrayList and HashMap.
- thread-hostile—This class is not safe for concurrent use even if all method invocations are surrounded by external synchronization. Thread hostility usually results from modifying static data without synchronization. No one writes a thread-hostile class on purpose; such classes result from the failure to consider concurrency. Luckily, there are very few thread-hostile classes or methods in the Java libraries. The System.runFinalizersOnExit method is thread-hostile and has been deprecated.
Let we find a simplest example of classes for each of the mentioned level.
Immutable
public class ImmutableClass { private String a; public ImmutableClass(String a) { this.a = a; } public String getA() { return a; } }
Unconditionally Thread Safe
public class UnconditionallyThreadSafeClass { private String a; private Object syncObject = new Object(); public UnconditionallyThreadSafeClass(String a) { this.a = a; } public void setA(String a) { synchronized (syncObject) { this.a = a; } } public String getA() { synchronized (syncObject) { return a; } } }
Conditionally Thread Safe
import java.util.ArrayList; public class ConditionallyThreadSafeClass { private ArrayList<String> a; private Object syncObject = new Object(); public ConditionallyThreadSafeClass(ArrayList<String> a) { this.a = a; } public void add(String s) { synchronized (syncObject) { a.add(s); } } public ArrayList<String> getA() { return a; } }
Not Thread Safe
public class NotThreadSafeClass { private String a; public NotThreadSafeClass(String a) { this.a = a; } public String getA() { return a; } public void setA(String a) { this.a = a; } }
Thread Hostile
public class ThreadHostileClass { private static String a; public ThreadHostileClass(String a) { ThreadHostileClass.a = a; } public String getA() { return a; } public void doSomethingToA(final String a) { new Thread() { public void run() { ThreadHostileClass.a = a; } }.run(); } }
String is a unique object in Java. The Java Specification explains several unique properties of String in Java. We might already know some of them. First, String is unique because it can be created without new keyword.
String s = "new String";
I have to mention that you can still create String object using new keyword, like this:
String s = new String("new String");
Does both statement “exactly equals”? Well, most of you also know that this is not true. The first example will try to reuse the same object whenever possible (and is correct because String is immutable) while the second will force the creation of new String object. Consider this example:
System.out.println("b" == "b");
System.out.println(new String("b") == new String("b"));
The result of first example is “true” while the second one will give “false”.
I almost certain that experienced programmer will never create String using new in normal use. But sometime, we are forced to use that. One case that I can think of is when you parse an XML file using SAX parser.
public class Reader extends DefaultHandler { private List<String> listString = new ArrayList<String>(); public void characters(char[] ch, int start, int length) throws SAXException { String content = new String(ch, start, length); listString.add(content); } }
This example works correctly but is not efficient. Once you have a document like this:
<test> <string>String</string> <string>String</string> <string>String</string> <string>String</string> <string>String</string> <string>String</string> <string>String</string> <string>String</string> <string>String</string> <string>String</string> </test>
Try to profile your application, force garbage collection and you will still have ten String objects left in the memory.
Fortunately, Java has provided a method to avoid such case. You can use String.intern() to force the application to use the same String object whenever possible. For above example, you can change the code to something like this:
public class Reader extends DefaultHandler { private List<String> listString = new ArrayList<String>(); public void characters(char[] ch, int start, int length) throws SAXException { String content = new String(ch, start, length).intern(); listString.add(content); } }
Now, re-profile the application, force garbage collection, and you will only have one String left in the memory. You can save a lot of memory if you can make sure that there is only one instance of String with certain value in your JVM.
This method also has nice side effect. If you do a lot of String equality comparison in the application, a same String object run faster. To explain this, we can read the source code of String:
... public boolean equals(Object anObject) { if (this == anObject) { return true; } if (anObject instanceof String) { String anotherString = (String)anObject; int n = count; if (n == anotherString.count) { char v1[] = value; char v2[] = anotherString.value; int i = offset; int j = anotherString.offset; while (n-- != 0) { if (v1[i++] != v2[j++]) return false; } return true; } } return false; } ...
If the object is same, then the method will be immediately after this line if (this == anObject). This is very fast and will save a lot of process time if your application do this operations a lot of time.
Powered by WordPress. Theme: TheBuckmaker. PHP Scripts, OpenID