If you � Unicode, you’ll ����� EBCDIC

One of the projects I’ve been working on over the past few months is the Dynamic Scripting feature pack for CICS. It runs on z/OS, which is an interesting environment for a few reasons – not least because it’s an EBCDIC platform.

Know your charset

A character set defines which byte value is used to represent a given character. So the choice of character set is a concern that should crop up whenever raw bytes are interpreted as character sequences, or character sequences are converted to raw bytes. For example, care should be taken to use the correct character set when writing text to a file, or reading character data from the body of an HTTP response.

Often, it’s tempting to ignore the concern. The vast majority of Continue reading “If you � Unicode, you’ll ����� EBCDIC”

sMash, Twitter and OAuth

Here’s a little example sMash app showing how to authenticate with Twitter using OAuth. If you’re not familiar with OAuth, here’s a good introduction (part II is especially useful).

This example uses the signpost OAuth library. The code is based on this simple signpost example.
Continue reading “sMash, Twitter and OAuth”

Java Classpath Length

Really long classpa…!

The maximum classpath length that Java can handle depends on many factors, including platform and JDK implementation. As far as I can tell, the limit is usually undocumented, but can be as low as a few thousand characters. Additionally, elements beyond Java’s control, such as the shell, can also affect how many characters can safely be used in a classpath.

In practice, this means that the classpath you request can be truncated before the JRE processes it… and you might not find out until you get a very confusing ClassNotFoundException.

Java wont always respect huge classpaths

Launching with a ludicrously long classpath? Java might miss some of it!

If circumstances dictate an uncomfortably long classpath at launch time, there are a few ways to condense it without resorting to single-character symbolic links.
Continue reading “Java Classpath Length”

Accessing DB2 from sMash

I couldn’t find a simple example that explicitly shows how to connect to DB2 from sMash, so I put one together. You can grab the resulting example sMash application using the zero command line like this:

 zero modulegroup addurl http://soal.org/sMash/repo/
 zero create db2App from soal:db2App

(On a side note, notice how I’m hosting a zero repository containing my app right here on soal.org! Continue reading “Accessing DB2 from sMash”

Dutch PHP Conference 2009 Retrospective

DPC ended last weekend, so I’m a little late with my write-up. However, the event was sufficiently memorable to still be fresh in my mind. 🙂

Like the vast majority of attendees, I was massively impressed by the superb selection of talks and the attention to detail inherent in every aspect of the organisation of DPC ’09. Big thanks to the Ibuildings folks for this. One example of the love they poured into the event is the conference introduction video, which was played on a large screen before the opening keynote. It included customized avatars for every speaker, including me… even though I was a very late addition to the speaker list!

Continue reading “Dutch PHP Conference 2009 Retrospective”

WebSphere sMash @ Dutch PHP Conference on 12th June 2009

Jonathan Lawrence and I will be presenting an introduction to WebSphere sMash at the Dutch PHP Conference on Friday. Here’s a quick overview of what we’ll be talking about:

Don’t hesitate to come chat with us between the talks, particularly if you’re curious about running PHP on the Java Virtual Machine or integrating PHP and Java code.

If you like the sound of this, read more about PHP on Java with WebSphere sMash or check out some WebSphere sMash demos on YouTube.

SPL Talk at PHP London

Last night I presented the Standard PHP Library at the PHP London User Group. The aim was to give an overview of the extension and to entice people into coming to TestFest, of which the London and Manchester incarnations will be focussing on SPL.

Thanks to all who attended! Here are the slides for those who couldn’t make it: