Author: fforw

The fight with Eclipse

Somehow I seem doomed to be in a constant love/hate relationship with my IDE of choice. Nowadays that’s Eclipse. On one hand, I don’t want to do any Java development without the refactoring tools and source helpers that Eclipse provides, on the other hand I find myself in a constant battle with Eclipse bugs — and they’re not of the sporadic kind, the kind every software product has, but of the soul-crushing, repetitive and long-lasting kind. Whenever there’s a new Eclipse version, I secretly hope this one will remove some of them, but usually they just get more. Sometimes bugs disappear, usually when some component is completely rewritten, but it’s very rare.

Sometimes I am lucky though and discover a way around them by either being persistent enough or by finding just the right magic combination of search terms that point me to a solution. To end this blog post somewhat uplifting, here are two fixes I found recently.

The Workbench-locks-up-at-startup Bug

This one happens fairly often for me. On startup, eclipse will do nothing or just write something like “Initialize Java tooling.. 1%” and then just stop working. Since I use Ubuntu with Compiz, that will then turn desaturate the eclipse window to signal the app is no longer responding to any window messages. There seems to be no CPU activity and this all continues until I forcefully kill the eclipse process.

Solution (found on Stackoverflow)

Delete either  .metadata\.plugins\org.eclipse.core.resources.projects\.markers.snap or .metadata\.plugins\org.eclipse.core.resources.projects\.snap (or both?)

Bug: “Link with Editor” does not work with Javascript files anymore

The Eclipse team keeps changing the javascript editor, usually for the worse. Where it once was a simple syntax-highlighting editor that was of no big help, but did not stand in your way, either, it now tries to help you writing Javascript without seeming to actually understand Javascript at times. For example, it complains when you write “var undefined;” which is perfectly valid JavaScript and useful, too. (“undefined” is not a keyword like “true” or “false” but just a special value. Every variable that gets declared but has no value internally has that special undefined value. Redefining undefined locally makes access to it faster because it is already found in the local scope and also enables Javascript compressing tools to shorten the variable name.

Eclipse also acts weird when you try to type stuff like

$(function() {

});

or

(function() {

})();

Eclipse reorders round and curly braces etc.

So my strategy with the new JavaScript editor was basically to switch off what I could and ignore or suffer through the rest. Until the “Link With Editor” Bug came up. I really like “Link with Editor”, because it lets me collapse my whole project tree and then open up those branches I’m actually working on currently — but suddenly, it no longer worked with .js Files (WTF!?)

Turns out Eclipse is again trying to be clever and now forces you to set up all your script folders to have your scripts then listed under “JavaScript Elements”, something I couldn’t manage to with my current project.And if you fail to do so, Eclipse punishes you by taking away “Link with Editor” from you.

Solution (found that one myself)

Either use the “package explorer” of the Java perspective, not the “project explorer” or in the project explorer, click on the small triangle that opens the “View Menu” and select “Customize View…”; and then on the second tab, disable “JavaScript Elements”. Now Eclipse will honor “Link with Editor” with .js files again.

edit: correct .snap path

Google Closure Tools

Some days ago, Google released the Google Closure Tools, that look very promising. I’ve yet been unable to feel particular enthusiasm for the Google Closure Library which seems like just another JavaScript (-only)? libary, something that may only be of any importance because it’s coming from Google, but who does not seem to provide anything really spectacular or new.

The Closure Compiler, however looks really good. It’s not only a simple script compressor, but also offering dead code removal and lint-like feature. I’ve been doing some testing with our main JavaScript bundle(all JavaScript code used in our test application concatenated together):

Description Bytes abs Bytes %
js bundle 284935 100,0%
yuicompressor compressed 126656 44.5%
closure compiler compressed 97362 34.2%
js bundle gzip 75163 26.4%
yui + gzip 42189 14.8%
closure + gzip 35432 12.4%

As you can see, Closure compiler is a bit better than yuicompressor. The only downside to it is that it doesn’t support IE conditional comments. This means that above numbers a little too good for Google Closure as we are using some IE conditional comments for compatibility purposes.

The depedency management looks promising, too. So far I am using a self-brew solution for my current project at work, but I would really like to see a standard for packaging, compression and deployment for Javascript.

Installing Ubuntu Karmic Koala

I have been looking forward to Thursday’s release of Ubuntu 9.10, code name Karmic Koala, for some time now. CouchDB integrated into the desktop — sweet!

The actual install overall went really smooth. Installer got streamlined a bit more and now carries over the initial language selection to defaults for time zone and keyboard settings. Most complicated about it was my chaotic partition layout on my dev machine. Installation went all fine, all devices recognized. At first I had problems with my Wacom Bamboo graphics tablet because copying over the old config created double entries for all devices, making X choke and kill my USB mouse. Just commenting out the entries in my X config solved that problem. I just had to redo the basic configuration from Gimp by invoking the Gimp Preferences Dialog under Edit -> Preferences, select input devices in the tree, then “Configure Extended Input Devices”. There I just set the mode of all auto-discovered wacom devices to “Screen”. (not “Window” or “Disabled”).

Things turned out to be a bit more work than initially planned when I discovered that the MythTV frontend from karmic wouldn’t connect to my mediahub computer, a Eee Box B202 with dual DVB-T tuner ( TerraTec Cinergy DT USB XS Diversity , newer hardware-rev). After the initial troubles I had first getting the DVB-T to work perfectly, I was really not eager to change anything about that system.. In fact it was still running an updated EasyPeasy 1.0.

But my fears were totally unfounded. The DVB-T stick was now auto-discovered and there just needed one module option to be added in a newly created /etc/modprobe.d/options :

options dvb_usb_dib0700 dvb_usb_dib0700_ir_proto=0

This sets the remote control protocol to NEC, which is something my remote control needs. Everything else basically worked out of the box. I just had to configure MythTV and tell it the two DVB front end devices and EIT create video sources and connect those two. After copying over the randomly generated mySQL password to the laptop, I was back at my old setup.

What changed is that both computers now boot a lot faster and look a lot prettier, even using only graphics that come with Karmic Koala

Congratulations to the ubuntu team for producing such a fine new ubuntu version, better than ever.

Links:

update: added more details for the wacom configuration process.

Hood Beta 2

After fixing a pretty serious bug in the combination of svenson and jcouchdb and releasing svenson 1.3.4 and jcouchdb 0.9.1-4 and jcouchdb 0.10.0-2, I got around to release a new, improved version of Hood, too. It’s called “Beta 2” and still lacks some features but the documentation is a lot better and the application design is basically what I think will be the final layout of things.

Head over to google code and grab yourself a copy.

Links:

Hood: example application for jcouchdb 0.10.0-1

On the occasion of presenting CouchDB and jcouchdb at my place of work, I got around to finally create a small example application that is now downloadable as sneak preview. There need to be bugs fixed, features implemented and lots of documentation to be added, but it kind of works.

It’s called “Hood” for neighbourhood and allows you to mark places or people around a place of activity of yours, called hood. it is meant to foster collaboration / tips on local places etc.

It’s Spring Web Application demonstrating some techniques of working with jcouchdb. It’s an eclipse WTP/Spring IDE project with all dependencies you need besides couchdb and tomcat or another servlet container.

Stay tuned for hood to grow into a fullblown app.

Links:

Twitter/IRC integration with boticelli

I have been planning to release my IRC bot project as open source for quite a while now and the recently added twitter integration gave me the final push to actually do it. So now I am proud to announce the inital release of boticelli, a java / spring IRC bot/web application based on the martyr IRC library. Its mean to be easily configurable and extendable and ships with lots of plugins already included.

Available Plugins:

  • Logging – log channel conversation and provide a web interface to browse and search them
  • Seen – Remembers when a user last spoke in the channel
  • FAQ – Manages a keyword list of FAQ keywords that are matched to a description. Useful to provide answers for reoccuring topics in the channel.
  • AccountCreator?/Revoke/Grant – commands to automatically create accounts for the webapplication and to revoke / grant web app access rights (for ops)
  • ServerPing? – plugin that detects broken connections and makes the bot reconnect.
  • Say – plugin to let the bot say something or make it do something (a CTCP Action)
  • Twitter – two way integration into twitter over a bot specific twitter account.

So if you’re into old-school IRC fun, head over to google code and grab yourself a copy.

Links:

Disappointed..

The decision of my people in the federal election 2009 deeply disappoints me. How can anyone vote a party whose liberal economic policies drove us into the crisis? Both Guido Westerwelle and Angela Merkel have of course populistically criticized the most grotesque proliferations of this policies (which result from the fact that the believers from the church of the invisible hand across the Atlantic and the channel are even less social and unscrupulous), but have advocated this disastrous economic policies with word and deed and drove us where we still are, even if many want to ignore this. Fuck the poor, the future of our planet — we need MOAR.

Things from my hard drive: Afra Idofabe

Afra Idofabe
More than two years ago, for some reason I don’t really recall, there were free .be domains to be had. I think it was some kind of marketing for —  a new hosting service? — can’t remember. So we toyed around with funny domain names idea. Registering obiwankeno.be was almost naturally.. and then there was afraidofa.be, potential bee-allergic-central, or like I mentioned in an alternative interpretation a guy named Afra Idofabe. Starting from that name I imagined a bee with an afro hairdo, looking kind of threatening, but fun.. and in contrast to all those other ideas like this, this one actually ended pretty well.

The initial sketch did not bring over the my idea very well, so it was received with very little enthusiam. The version you see was made in Inkscape, which I can’t recommend often enough as excellent free (as in freedom) vector graphics tool. I just imported a scan of my initial sketch and handtraced it with splines and stuff..

I still like the result..

© 2024 fforw.de

Theme by Anders NorénUp ↑