Latest Publications

Why I left the XSF

I’ve had a couple of people ask me why I did not reapply for membership in the XSF, so I thought I might post a bit about it here. I joined the XSF about 2 years ago not really knowing what was involved in membership. No one seemed to be able to tell me anything that being a member did aside from voting on the council, or other members. In the time I spent on XSF, that is literally all I did. It seemed like all of the “important discussions” had better places to be discussed at, like the council list, the standards list, and even a few more. I think it boiled down to, what’s left to talk about or even do? I don’t have any interest in being a member of something just so I can say I’m a member of it, so I chose not to rejoin this year.

If there was something to being a member in the XSF that I was missing out on, please, speak up and help me understand. =) And I certainly don’t have any ill feelings towards the membership, so please don’t take this as a “bash”. ;)

Draft Privacy and Security Policy

XMPP Report #1: Security, PEP, and Microblogging

Blog articles about ejabberd development

In the last weeks several people published articles about ejabberd development in their blogs. If you are interested in ejabberd development, and even Erlang/OTP development, check them:

Jack Moffit (Metajack):

read more

Jack Moffitt: Battle Of The Build Systems

One of the underreported things about Google’s new Chrome browser is that SCons is used to build many of its modules. I chose SCons as the build system for libstrophe several years back, and was mostly quite happy. It is certainly a lot easier to get going than autotools and make. It seems that since I last looked, several new build systems have popped up.

autotools

Everyone who’s built software for Linux is probably familiar with the configure script. The configure, make, and make install steps are simple and work well much of the time. However, the story is radically different for the poor developers who have to use the tools that generate the Makefile and configure script.

Using autotools is a giant pain, but it gets the job done.

SCons

SCons came out of work done for the Software Carpentry Competition way back in 2000. It is a replacement for make along with functionality similar to automake and autoconf. It is written in Python, and it uses Python scripts for its input files, making it quite flexible and easy to understand.

It works well, but it doesn’t seem to be extremely active. Version 1.0 was finally released last month, but it took a long time to get there. The upside of this is stability, and the downside is lack of features. I recall being excited about the possibility of generating Microsoft DevStudio project files with it, but I cannot find any information on this anymore.

Check out the SCons team’s comparison page for their take on SCons versus the other choices.

CMake

CMake is another alternative written in C++. It has a more traditional syntax than SCons, but its feature list is long and impressive. CMake generates native build system objects like Makefiles or Visual Studio .sln files.

The KDE project tried to switch from autotools to SCons and never quite made it. They ended up choosing CMake, and there is a good article at LWN about this transition.

waf

waf is the newest one I have noticed, but it looks quite promising. Like SCons, it uses Python for its configuration files. Unlike autotools, it is apparently quite fast. It is also built to be distributed with your project to avoid people needing to install it as a dependency. SCons now has this as well. This means it will work out of the box on any system with Python pre-installed, which is everything but Windows, and perhaps py2exe would solve the Windows issue.

waf is quite interesting, and I will definitely be exploring it further. Using Python for the configuration files was very nice when I used SCons for libstrophe, so I’m glad to see that others are doing this as well.

The waf wiki has a comparison page which evaluations waf in context with autotools, CMake, SCons, and others. It makes for very interesting reading.

Choices Are Good

It’s nice to finally have some good alternatives to the classic tools. I’ve already tried SCons with libstrophe, and I’m looking forward to giving waf and CMake a try the next time I’m experimenting.

If you’ve played with these or know of other good choices, please leave a comment.

Jack Moffitt: Power Up Your Commit E-mails

Every project I work on has a e-mail list for source code repository commit messages. These are incredibly useful for keeping track of progress and for informal code review. These emails are usually simple and utilitarian, but they don’t have to be. We’ve powered up our commit e-mails at Chesspark, and you can too.

Subversion comes with scripts that generate commit e-mails. These scripts produce basic output that looks something like the picture below.

svn-email-1.png

Wouldn’t it be great if you could have colorized HTML output? While setting up commit e-mails for the XSF repository, Peter stumbled across a tool that did this – SVN::Notify. This got me quite excited, as I depend a lot on these e-mails, so a few hours later our commit messages began to look like this second picture.

svn-email-2.png

This is a huge improvement – much more readable and much nicer to look at.

Unfortunately there is a small problem. SVN::Notify produces output that contains <style> blocks for CSS formatting, and these are completely stripped out by some Web e-mail applications, including Gmail. It took a little bit of hackery to modify SVN::Notify to use inline style attributes instead.

My only complaint so far is that it doesn’t have as nice of output as Trac’s internal colorizer, but it is close. For anyone who wants the inline style patch, I have included it below. The patch was done by Collin Grady.

Download svnnotify-inline-styles.diff.

Linux computing on your arm

Using 3G

I played with a friend’s Atom based EEEPC yesterday. The EEEPC is an amazing achievement considering it’s comparable to the Thinkpad X61, yet it’s a fifth of the price in the UK.

I like the idea of carrying an EEEPC as I’m a bit nervous about losing my $$$ Thinkpad when I am out and about. If it just runs a kiosk like browser, with a HSPDA 3G modem, it would be very handy. I wouldn’t sob as much if it got stolen.

In other news: I upgraded my beloved slug to lenny which I use as a NAS at home, only to get bitten by a serious NFS permission issue in Debian. Urgh.

Jack Moffitt: What You Can Learn From Emacs

I almost cried last week. For the first time since high school, I lost hours of writing work in an instantaneous failure of software. Later in the week, I found myself looking for some unrelated Emacs information and ran across a description of a feature that would have prevented my ordeal. New and experienced programmers alike could many things from Emacs; there is a treasure trove of stored wisdom lurking inside.

Die, Auto-save, Die!

I didn’t lose my data because I forgot to save; that habit is ingrained from years of previous experience with buggy software. I lost the data because auto-save is not your friend. Auto-save is evil.

It happened too fast.

My first mistake was that I was writing in the browser, and it is a mistake I will not repeat again soon. The browsers and JavaScript programmers have responded to other users with similar frustrations by implementing form field persistence across crashes and “helpful” features like auto-save.

I was in the grove, writing at a good clip. My hands managed to find the undocumented key binding for delete the entire text box, and I was left staring at an empty screen. My reflexes kicked in with “Undo, undo, undo!”, but whatever mysterious function I had invoked apparently also wiped out the undo history.

I quickly realized that the page was a ticking time bomb. At any moment, auto-save was going to make my blank screen permanent. I quickly closed the browser tab, only to be stopped by another “helpful” feature. “Do you really want to close this tab? You have unsaved changes.” Yes! Finally, the application was gone.

My plan was to go back and resume work at the last auto-save point, or barring that from the last time I had obsessively hit save manually. Mere seconds later, my hopes were destroyed as the empty box filled the screen once again. Auto-save, the evil bastard, had managed to fire off a parting shot.

Emacs Auto-save Is Considerate

Days later, I ran across this page describing some pros and cons of Emacs.

Another nice feature is auto-saving. This might seem a pretty run of the mill feature, but, as is typical of emacs there are understated subtleties waiting to be discovered. Recently I was editing a web page and I killed (roughly speaking, emacs’ equivalent of cut) a large fraction of the document. Emacs displayed a brief message saying something to the effect that I’d just deleted a large piece of text and because of that it had disabled auto-save. It did this to make sure that should I want that piece of text back I had the option. This was in addition to the standard undo facility. The reasoning being that should emacs or the operating system crash, it would do least harm that way. Now that is considerate software!

It makes a lot of sense. If you delete a substantial portion of the text, auto-save immediately stops. It can resume once you’ve explicitly saved again.

It is exactly features like these that make Emacs indispensable for many.

Learn This And More

If you want to be a great programmer, you must learn from other great programmers and other great programs.

When people request a feature like auto-save, instead of implementing a naive and evil auto-save that runs only on a timer, research a little bit to find out what the well respected implementations do. After reading a few pages of Google results for auto-save issues, I can see that few do this.

Almost every problem has been encountered before. For most problems you will find a range of solutions that have different tradeoffs. Do your users a favor and investigate the solutions of others instead of re-inventing the same mistakes that led to those solutions.

An Example

Previous incarnations of the Chesspark software generated complaints about users ducking out of lost games by disconnecting. How to solve this?

One solution is to forfeit the disconnecting player. Another is to adjourn the game to be resumed at a later time. These are the solutions generally familiar to our users from other sites, but they did not satisfy us.

After some research, we found the solution with the best tradeoffs. It did not come from Emacs or even from any other computer program. It came from real life.

In a real life tournament, players get up and walk away and never come back. How do tournament directors handle this situation? They set some reasonable time period for the opponent to return, and if she doesn’t, they forfeit the player. This has the property that if the player needed to use the bathroom or go make an emergency phone call, they haven’t lost the game. If they leave longer than the tournament directory deems reasonable, they forfeit.

We use this solution at Chesspark as well. If you are disconnected, you have a certain amount of time to reconnect without losing the game, although you will be penalized by losing time if it is your turn, exactly like real life. With this solution, you only lose the game in an exceptional circumstance such as your Internet access going down for a while or some emergency which demands your prolonged attention. Users understand and are accepting of the loss in these situations, and their opponents are happy for the swift resolution as well.

Had we just gone with our first naive ideas, some users would be pretty unhappy, but by thinking about how others solved the problem, we were able to satisfy almost all of them.

Whether it be from Emacs, some other program, or real life, take the work of others and use it to make your work better. Your users will appreciate it.

Artur Hefczyc: MySQL database schema upgrade for Tigase 4.0

For number of reasons the database schema had to be changed for Tigase server version 4.0. The most important are:

  • Compliance with the XMPP RFC which says that each part of JID may have up to 1023 characters. We store in the database user JIDs without resource name thus the maximum possible size of the user id is 2047. There aren’t really JIDs that long yet but we experienced quite long JIDs in a few installations already so we decided to prepare Tigase to accept any JID allowed by RFC.
  • Performance and flexibility – the Tigase server now accesses database using stored procedures. This allows for any database storage format and it doesn’t really matter for the Tigase server what is the database schema how data is organized inside. What it needs is just bunch of stored procedures to access the data. This allows for much more flexibility in storing user data as well as much easier integration with third-party systems and also organize data in more efficient way.

Therefore when you run the Tigase server now it may (depending on what exact SVN revision you use) refuse to start if it detects that the database schema is not updated. If it happens just follow steps below to update the database schema and start the server again.

Updating of the database schema is very easy and almost fully automated process. Just follow the steps below and you should be able to run new version of the Tigase server in a few minutes or even seconds depending on your database size. It takes around 7 minutes to update database with 200k user accounts on an average machine.

read more

Tobias Markmann: Loading and Documentation

Hi,

After clearing some issues about jid-single and jid-multi field type in XEP-0004 I’ve just started to implement these last field types which were missing last week.
I’ve also send in a patch for which makes fltk::ToggleItem and fltk::RadioItem work in fltk::Browser and fltk::MultiBrowser.
All other field types are now implemented. Source code documentation which is real-time synchronised with project’s repository is available at doc.ayena.de.

And at the end some screenshot so you have something to look at:
Example Form from XEP-0004: This screenshot shows the from from example no. 2 of XEP-0004 in the designer. Some things are missing but this is about to change.Example Form from XEP-0004: This screenshot shows the from from example no. 2 of XEP-0004 in the designer. Some things are missing but this is about to change.