If you try to start Eclipse opening wizard for Git and have the following problem (Indigo version, around 18/2/2012):

The selected wizard could not be started.
Plug-in "org.eclipse.egit.ui" was unable to instantiate class
"org.eclipse.egit.ui.internal.repository.NewRepositoryWizard"

Then just add as a software source the following:

http://download.eclipse.org/egit/updates-nightly

and update. It will fix the problem. I found that lying somewhere in a forum, but I lost lots of time trying to pin it down.

VN:F [1.9.14_1148]
Rating: 8.0/10 (1 vote cast)
VN:F [1.9.14_1148]
Rating: 0 (from 0 votes)

One quick bug/tip that might save you lots of time. :) If you use Google’s appengine along with the webapp2 and using the Users module, you might encounter the following problem.

Recently, the ndb graduated and its python module changed from ndb to google.appengine.ext.ndb. Webapp2 is bundled along with the SDK of appengine, but it seems they forgot to update some modules in it, and they still use the previous package.

I encountered it when I tried to debug my application locally, using the webapp2 user & authentication module, the application crashes from the bad import. When you deploy the application to the appengine server, you must provide a version of the webapp2, which overrides this problem (this worked as a workaround for me at least), thus the problem will not occur. But locally, you must go the installation directory of the appengine and delete it manually.

I spotted this bug roughly a month ago (23/12/2011), and there may be some fixes on the mainstream webapp2 release.

Update (18/2/2012): The problem still persists in version 1.6.2 of the appengine SDK for python.

VN:F [1.9.14_1148]
Rating: 8.0/10 (1 vote cast)
VN:F [1.9.14_1148]
Rating: 0 (from 0 votes)

VN:F [1.9.14_1148]
Rating: 4.0/10 (1 vote cast)
VN:F [1.9.14_1148]
Rating: 0 (from 0 votes)

Great! We did it! Nothing working, but nevertheless the letter on the heading should be green. right?

VN:F [1.9.14_1148]
Rating: 7.0/10 (2 votes cast)
VN:F [1.9.14_1148]
Rating: 0 (from 0 votes)

I was browsing at linked in the other day and saw the following Ad …

Hahahahah, come on, get serious … picture yourself at google … ahhahaha.

VN:F [1.9.14_1148]
Rating: 3.0/10 (1 vote cast)
VN:F [1.9.14_1148]
Rating: 0 (from 0 votes)

Recently I was messing with Appengine’s pull queue and noticed the following. They did not offer a C/C++ API. All the other usual suspects are there, like python, Java, go, even PHP and Obj-C.

What happened to C/C++? It is not worth offering and maintaining any more an API for these two languages? Or google wants to promote go!, and pat the iOS developers with the Obj-C?

No, you cannot have a native app. That’s it! Maybe, because C/C++ do not offer by definition an HTTP protocol implementation.

VN:F [1.9.14_1148]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.14_1148]
Rating: 0 (from 0 votes)

Recently I was doing some heavy-duty Javascript stuff for a web project. It was quite a while since the Firefox plug-in and in many ways, it was rather enjoyable experience (and in some other ways boring :-) ).

If you want to do some cool stuff in the web nowadays, the adoption of a Javascript library like jQuery is typical. I had some experience in the past, but the development process showed me that I was not so experienced as I thought. jQuery has good documentation that can be used as a reference, but it is not very usefull, when you want to understand some basic concepts and you are in a hurry of doing some stuff to work.

So, this blog entry has one goal, to transfer my experience of doing stuff with jQuery as a set of rules/advices that will save time to inexperienced users like me.

Rule #1: “When you are using jQuery, forget low-level Javascript functions”

It is a good practice to use always jQuery’s functions to do the stuff you want. Never rely on the low-leve Javascript function. The reason is simple. jQuery offers an encapsulating object for all the elements of the DOM tree. If you select some nodes with the jQuery selectors and then try to access their children with the common DOM function offered by the standard Javascript API, you are done for. You lose that encapsulation and you are back in black.

Rule #2: “Use # for the ‘id’ selector, ‘.’ for the class selector and always use backslashes in front of dots in ids”

No special reason, just remember these three examples:

  • $(‘#theCoolId’) – id selector
  • $(‘.myBigFatClass’) – class selector
  • $(‘#theCoolId\\.With\\.Dots’) – more complex id selector

Rule #3: “When you have to insert code into an element, use html()”

Simple as that, select the node and paste the code:

$('#theCoolNode').html('
<h1>Hey Stranger!</h1>
');

Rule #4: “By default the ajax() call is asynchronous”

… so if you want to load something, be sure to disable async, or else you will try to access something that is not ready. How can you do that? Simple!

$.ajax({
	type: "GET",
	dataType: "xml",
	url: "data/strings.xml",
	success: function(xml) { /* success */ },
	error: function() { /* error */ },
	async: false /* I will wait to load the XML */
});

Rule #5: “insertBefore() and insertAfter() take the selector as the parameter”

I do not know about you, but I always thought that it is logical for the insertAfter() and insertBefore() to select a node, then append the node. But this is not the way they are implemented. A small example:

$('<h1>Hey Joe!</h1>').insertAfter('#theCoolNode')

Rule #6: “It is always your fault”

Usually it is, accept it and try to understand how things are working :) , instead of trying to convince everyone that you are Mr. Right!

VN:F [1.9.14_1148]
Rating: 8.0/10 (1 vote cast)
VN:F [1.9.14_1148]
Rating: 0 (from 0 votes)

VN:F [1.9.14_1148]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.14_1148]
Rating: +4 (from 4 votes)

VN:F [1.9.14_1148]
Rating: 6.0/10 (1 vote cast)
VN:F [1.9.14_1148]
Rating: 0 (from 0 votes)

VN:F [1.9.14_1148]
Rating: 8.0/10 (1 vote cast)
VN:F [1.9.14_1148]
Rating: 0 (from 0 votes)