Terrible Photographer versus Total Solar Eclipse

There are about 70 total solar eclipses per century, but each one is visible only from a narrow stretch of the Earth, and only for a few minutes. Therefore, being in the right place at the right time under suitable viewing conditions to experience full totality qualifies as a once-in-a-lifetime event. I travelled from Sydney up to Palm Cove (a beach resort just north of Cairns) to see the total solar eclipse of 14th November 2012. Here’s what happened.

Arrive in Palm Cove on 13th Nov. The eclipse will take place tomorrow morning. Sunrise will be at 5:34am and the partial eclipse will start at 5:45am, shifting to totality at 6:39am until 6:41am. Then, there will be a second period of partial eclipse as the moon’s shadow drifts away, ending at 7:41am. For now, the weather oscillates threateningly between sunshine and deep, dark cloud cover.

20121113_191905

Palm Cove, the day before the eclipse.

Continue reading “Terrible Photographer versus Total Solar Eclipse”

Sunday Afternoon Project: Ruin my Desk

About a year before moving to Sydney, I was on the verge of buying a house in the UK. I was serious about it: I had learnt about mortgages, calculated my budget, and even smiled at an estate agent. I viewed 40 properties before I finally came to my senses, and realised that becoming a homeowner is probably the only boring way to put yourself in a lifetime of debt.

Here’s one thing I will never forget about the experience: out of those 40 houses, 39 had cripplingly, devastatingly, pathetically small windows. Why most people in the UK seem happy to ignore and perpetuate this obscene design flaw is a mystery to me.

English people.

English people (except me).
(Fear of Light, ©2007-2011 ~Cutteroz)

Anyway, I’m happy to say that my new room here in Sydney has two sets of huge 2x3m French windows – one East facing, one West facing – each one leading to a balcony. Aside from being awesome, this leaves me with just one solid wall, and therefore an excuse to fulfill a childhood dream1: Continue reading “Sunday Afternoon Project: Ruin my Desk”

Eclipse breakpoints hidden by gutter clutter: a workaround

In Eclipse, breakpoint icons tend to get obscured by other notification icons, like override or quick-fix notifications.

The workaround, as described in this bug comment, is to configure the breakpoint annotation type with additional display properties.

To do so, open General > Editors > Text Editors > Annotations and configure your breakpoint annotations as you see fit:

If you select “Text as: Dashed Box”, you can get something like this (note the dashed box around the method name, indicating a method entry breakpoint):

Not the prettiest solution, but at least that’s one less mild annoyance to deal with.

Preserving File Permissions with Ant Tasks

I confess I rant about Ant a fair bit, but in truth Ant tasks provide a lot of useful functionality. Even if you don’t use Ant directly, you can still take advantage of the tasks by using, say, Groovy’s AntBuilder.

Ant and File Permissions

Ant’s file system tasks, however, have one big disadvantage: they tend to lose or ignore Unix file permissions. This well-documented limitation Continue reading “Preserving File Permissions with Ant Tasks”

Change

After 7 fantastic years with IBM, I thought it might be time for a little change. So, I have left Chandler’s Ford for Sydney and joined Atlassian.

A little change.

Sydney Bound

I thought spending 22 hours sitting on the Heathrow/Singapore/Sydney flight might be overwhelmingly boring, but it turned out OK. I didn’t get to ride an A380 – they were temporarily pulled just before my ticket was booked – but the replacement A747-400 was surprisingly comfy. Using SeatGuru helped Continue reading “Change”

Writing Portable Shell Scripts on z/OS UNIX

z/OS UNIX

z/OS UNIX is a facet of z/OS that makes the operating system more approachable to those of us who weren’t brought up around 3270 terminals. Amongst other things, it provides support for remoting into the z/OS mainframe under a choice of UNIX shells (a simple Bourne-style shell or tcsh), access to a hierarchical file system, and a handful of Unix tools like ls, vi and grep (which work fine, as long as you don’t expect them to behave quite the same way as on other Unix systems). Like the rest of the operating system, z/OS UNIX is an EBCDIC environment.

EBCDIC Variants

My previous post brought up the topic of variant characters in EBCDIC. In summary, the characters shown below can be represented by different byte values depending on the locale under which a user is running:

^ ~ ! [ ] { } # | ` $ @

This raises following question: how can you distribute a z/OS UNIX shell script that will “just work” for any z/OS user, given that entities like the comment character (#), hashbang (#!), pipes (|) and the variable marker ($) might need to be represented by different bytes in different locales? Continue reading “Writing Portable Shell Scripts on z/OS UNIX”

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”