Bernd's Memory Leaks

Careless Whisper, part 2: Habemus muc!

posted: 2009-09-04 12:23
filed under: Vysper | MUC | XMPP | IRC

Jabber chat rooms have some advantages over IRC, like a more fine-grained participant control and other details. One advantage is that participants are identified from their jabber id, so there are virtually no 'ghost' participants and it's easy to have a private conference.

In the Jabber world, chat rooms are called 'multi-user chat' or 'MUC' for short. Vysper's MUC implementation has reached a critical milestone: users can create a room and chat with each other. Not everything is yet fully working.

Trying yourself is pretty easy if you have your Java5, Maven2 and svn ready:

  1. svn co http://svn.apache.org/repos/asf/mina/sandbox/vysper/trunk vysper
  2. cd vysper
  3. mvn install -Dmaven.test.skip
  4. cd server; cd extensions; cd xep0045-muc
  5. mvn assembly:assembly -DdescriptorId=jar-with-dependencies -Dmaven.test.skip
  6. cd ..; cd ..
  7. java -classpath src/main/config/:src/main/resources:../extensions/xep0045-muc/target/xep0045-m1.0.0-SNAPSHOT-jar-with-dependencies.jar -Dvysper.add.module=org.apache.vysper.xmpp.modules.extension.xep0045_muc.MUCModule org.apache.vysper.xmpp.server.ServerMain

Windows users, please change '/' into '\' for 7.

Log into the server as "user1@vysper.org" or "user2@...", both have the identical password 'password1' and make sure you set the server/host configuration to 'localhost'.

The chat can be found under 'Service Discovery' or 'Services', depending on your client.

As a client, I recommend Psi, but others work, too. However, I didn't get Apple's iChat to log into Vysper yet.

Know IDEA, part 2: CSS editing

posted: 2009-08-21 10:17
filed under: Intellij | IDEA | IDE | CSS

Ask the web programmer of your choice about a good IDE for developing CSS, HTML and JS. Most of them will recommend a simple text editor or a tool which is Windows only and not developed for at least 5 years...

Thankfully, I'm not a web programmer, but from time to time, I have my own little share in editing web frontend code. But I don't know CSS by heart. IDEA supports me with auto-complete in CSS files. It marks styles which are used nowhere in HTML.

It even displays a little colored box besides codes like "#628c78". Isn't that a beautiful color? Maybe not. Klick on the box and choose another one. Nice.

Now go to an HTML file, enter... <a class=" ...and invoke auto-complete. Now IDEA shows you a list with all defined CSS styles. Hitting Command-B on a class name brings you directly from HTML to the CSS declaration. That's the 'Integrated' in 'IDE'.

Careless Whisper, part 1: Wham!, what a summer.

posted: 2009-08-21 10:12
filed under: Vysper | MINA | XMPP | PubSub | GSoC09

What a summer for Apache Vysper, your friendly XMPP Server project. At first, we moved within Apache from Labs to MINA. Then we got our Google-Summer-of-Code hacker Michael Jackl, who worked successfully on the publish-subscribe extension. Currently Niklas Gustavsson from FtpServer fame is heavily working on Multi-user chat. Overall interest in the project increases.

Yet, we still have a long way to go from MINA's sandbox to a production ready server. Yet today, Vysper is easily embeddable and extendable while pubsub allows for many interesting applications outside the "Jabber world" of plain instant messaging.

Know IDEA, part 1: Column insert

posted: 2009-08-18 11:42
filed under: Intellij | IDEA | IDE | Java

Most of the day, I'm using one particular software: a Java IDE. I've tried Eclipse. It's nice and everything. But I've only found that one particular IDE really does (nearly) everything right for me. It gives me a big productivity boost. You know, those small features and gems that make your day. I'm using Jetbrain's Intellij IDEA.

IDEA has a column selection mode. (Menu -> Edit -> Column Mode) This fact in itself is nothing very special. Microsoft Visual Studio had column mode in the late 80ies, if I remember correctly. It was a hidden feature at first and proved very helpful over the years. Now, I'm no longer using the Visual suite and they seem to be far behind the IDE train.

Column mode is especially helpful when you want to replace the same text on multiple consecutive lines. You select one or more column on a couple of lines, just like you would select cells in a spreadsheet.

This selection can be copied and pasted around. Yeah!

What's not so obvious is that you can even paste a single line fragment that's already on your clipboard. And that's how it works: Select and copy some text with regular selection mode. Then switch to column mode, select a box and hit paste. What you now get is that the copied text is pasted to every single line of your box selection. A multi-paste.

This even works when the selected box is multiple lines, but zero columns. This way, you can prepend text on multiple lines at once, with one strike, without artifical replace constructs.

UPDATE: Emmanuel Lécharny has responded with how to do column mode with Eclipse. Thanks!

Disclaimer: I'm in no way affiliated with JetBrains. Really. I'm just enthusiastic and a little bit biased. That said, I'm a happy user of a free license for Intellij IDEA, due to my work on Open Source projects and I'm grateful for that.

© 2002-2009 bernd fondermann brainlounge, contact/legal notice