Wednesday, March 4, 2009

How To Write an X11 Application

Linux Hater has not posted any tutorials for a while, so I will do it. Here is my first tutorial; it shows you how to write an X11 application (even a server, especially a server).

  • Be sure to switch the meaning of client and server for no good reason. This makes your app seem avant-garde!

  • Make sure your application follows the ICCCM to a T but is still unable to copy-paste properly.

  • Furthermore, include at least two methods to copy and paste just to cause confusion.

  • Include massive amounts of conflicting code to handle fonts that, at the end of the day, only handles DejaVu Sans properly.

  • Don't bother supporting multiple monitors. Nobody uses those anyway!

  • Make sure your app does not need hardware acceleration to function properly. Save that for the wobbly windows!

  • Alright, maybe your app can use hardware acceleration. But don't you dare try talking to the driver directly and not paying your performance toll to the X server.

  • Okay, maybe you can talk to the driver directly. Or at least you will be able to . . . . eventually.

  • Rewrite your app constantly, but make sure not to fix the major underlying problems.

  • Make sure that users can use your app over the network, even though they never will.

  • Tell at least three people that X-Windows has nothing to do with Microsoft. Because they care.

  • Do not provide a user interface. Instead, provide an API (or, even better, several layers of APIs) that allow users to create their own interface. This gives lusers the ability to make half-assed clones of better designed interfaces for your app.

  • Reassure yourself that, even if your app sucks, at least it sucks on twenty different platforms!

Next time, I will show you how to write an X11 Window manager.

UPDATE: If you like the tutorial, then please digg it. Let's show all the lusers how X11 application writing is really done!

No comments:

Post a Comment