Monday, 29 April 2013

Connecting a kindle to a linux machine

I have a 50mb pdf that I want to read on my kindle.  I cannot use the email to whispersync bridge that amazon provide as the 50mb attachment is too large.

I tried to connect the kindle to my linux laptop and apart from the kindle charging there was no recognition in KDE that I had plugged a device in.  A quick google later discovered that the kindle uses the MTP protocol rather than Mass Storage Device Class protocol like most other USB devices.  Installing MTP support is easy:

sudo apt-get install mtpfs

Plugging in the kindle now gets KDE all excited and allows me to view the content.

Except after unmounting the kindle I couldn't see the PDF on the menu screen.  I re-attached my kindle to the computer and could see the file still there, so why didn't the kindle like it.  The file I copied was called:


After renaming it to:

Print Code.pdf

It started to show on the kindle screen.  All I can think of is that the kindle doesn't like files that either start with a numeric or have a '_' character in their names.  After some more renaming I can conclude:
The kindle doesn't like underscore characters in file names.  I ended up just changing the "_" to a " " and everything works fine now.

For those interested the book I am copying to the kindle is called:

10 PRINT CHR$(205.5+RND(1)); : GOTO 10

From  This book tells the story of computer code in society and culture through the lens of a single line of C64 basic code.

Friday, 26 April 2013

Writing my first program (Again)

The first program I ever wrote was on a commodore 64 computer.  Since my wonderful wife has managed to buy me one I decided to write my first program again.  Here is the source code:

I had no spare tapes to save my work so I had to take a picture!  The program started out in the usual style as a "Hello World" program.  I then hacked around and changed a few bits and eventually ended up with the above.
So what does it do? - well THIS:

Yes I know its simple, egotistic and self promoting, but I don't care.  The amount of enjoyment I got from doing that is huge.  20 years ago when I wrote a program for the first time I could save it on a cassette tape.  Where on earth am I going to find one of them in 2013???

I have found some good resources online that helped a lot when building this program.
A list of memory address that can POKEd
An e-book about an awesome line of code!
A wiki page detailing the VERBS in the version of basic installed on the commodore
An online version of the C64 Manual

Retro Geek

I am the luckiest man alive.  Not only does my wife acknowledge that I am a geek and have an unhealthy obsession with computers but she feeds this geek behaviour with some outstanding presents. However she has outdone herself this time as she has bought me a commodore 64.

It was meant to be a Christmas present for me.  However the guy that sent it didn't wrap it and as I answered the door when it arrived the cat prematurely escaped from the bag.  The commodore 64 was the first computer that I owned.  We did used to have a dragon as well, however that was more my dad's computer.  The commodore was just mine.  I learnt a lot about computers from that machine, from how a light gun worked through to how data was stored and some very basic programming.  That machine will always be special to me.  To have one now at the age of 30 is incredible.

I took it to the local maplins store, where a huddle of geeks clustered around me and the commodore, admiring it's good condition and asking to have their photo taken next to it.  The store manager even walked out of the store as I entered asking if the box truly contained that which was advertised on it.  We needed to go to maplins to purchase a RF cable to connect the Commodore to my LCD TV.  Naturally this being maplins they knew exactly what I needed and passed it to me.  We took it home and started the unboxing.

Like I said the box was not wrapped when it was sent so it was COVERED in parcel tape.  This is annoying.  The original box is part of the vintage retro feel.  5 minutes of painstaking picking and pulling and the unboxing could commence.

Once unboxed and all connected up the fun could start.  I found that my TV needed to be tuned to 590Mhz to pick up the output from the computer.

Amy graciously allowed me to then spend the whole evening playing vintage games.  Working out that a light gun will not work on a LCD screen (It uses cathode ray gun timings, which of course, are not available on a LCD screen), getting beaten by her on Mike Reids pop quiz etc etc and writing my first program (again)

Thank you to Amy for allowing me to geek out for the evening and re-live my childhood again.  It is a wonderful gift that I will never forget.

Tuesday, 23 April 2013

Just another milestone on a journey

31st December 2015 is a sad day. On the first day of 2016 CICS version 3 will go out of service. For more information see here:

CICS version 3 will always be a special release for me as it was the first CICS release I ever worked on. I was a member of the functional test team for the web services functionality. I spent many a day (and a few nights) building and executing test cases to try and find fault with the product. Looking back at the release it is important to note the amazing technology that CICS version 3 brought to the party.

We allowed existing customer applications to be exposed as web services. Not startling in itself but when you consider that the customer didn't even need to recompile any of their source code in order to exploit this capability. This allowed customers valued assets to be exploited by any process running on any platform in any language.

Since its inception CICS programs have been forced to share data through a 32kb area of memory known as the commarea. This area of data could be passed between programs running in different address spaces. Several customers had requested that we increase this limit to something larger as for them 32kb was becoming a constraint. Version 3 delivered channel and container technology that allowed programs to share blocks of data in named containers within a named channel. Not only did this alleviate the data limit constraint it also allowed that data to be functionally divided into separate pieces. No longer would the error code be at a certain offset into the commarea it could now be in it's own container.

We also extended our TCP/IP support to allow CICS systems to communicate over TCP/IP as a replacement for ISC connections over SNA. CICS programs could now be called over a TCP/IP network using an IPIC connection thus reducing the requirement for SNA networks. Each release since we have been adding capability to this feature, allowing function shipping over IPIC etc.

As the release of 3.1 marked the start of my CICS career it was also the start of a journey for CICS. Each release we have created capability that allows our customers to drive further value from their CICS installations. Developing new applications or deriving new value from existing programs CICS has shown that it is a modern, flexible and High quality transaction processor ready to meet the demands of a modern enterprise.

That journey continues today with the announcement of some feature packs for CICS that extend current releases of the product into new and exciting areas. For more information see:

These announcements excite me (although I have known about them for a while). Once released these capabilities will allow customers to easily integrate mobile application development with CICS resources. It will also allow them to integrate batch workload with existing transactional workloads. If you are a CICS customer why not have a look at the announcements and start thinking about where the new technology could take your business.

Tuesday, 16 April 2013

CICS in Slovenia

Last month I was invited to attend a CICS conference in Slovenia as the guest speaker.  I will be honest and say that I didn't know where slovenia was so here is a helpful google map of the area:

The wonderful local team in Slovenia had organised a range of CICS customers to attend and listen to the awesome stuff we added into CICS 5.1.  Over the day I introduced the new release to them, extolled the virtues of cloud based application deployment, Gave them the news that we had removed JVM Pool support but replaced it with our JVMServer.  We finished with the history of CICS Connectivity and DUMP analysis.

The local IBM team were magnificent hosts and kept us well supplied with food and drinks throughout the day.   They also hosted a 3 course lunch which was enjoyed by everyone there.  So a big thank you to Peter Pavkovic and his team for all his hard work in organising the event.

During the conference I heard a lot of stories from CICS customers about which technologies they liked in CICS and which ones they were looking forward to.  All the customers were on CICS 4.2 which is fantastic!  There is an awful lot of value in keeping with the current version of CICS.  If you stay current then you will find it easier to migrate release to release, exploit the new technology as it comes along and so increase you business value.  Finally it will help you to understand the strategic direction of the product.  The reason why these customers hadn't migrated to V5.1 (released Dec 2012) was that it required a z/OS upgrade to v1.13.

The customers that I spoke to were very forward looking and like the rest of the CICS team see CICS not just as the backend processor but as an integral part of the enterprise.  Transactions flow through CICS, and permeate the whole enterprise.  They understood that modern access to CICS applications and data was how they were going to be able to support their business in the future.  These customers were avid web services users, were planning to move java code off of other application servers and embed it into CICS.  Finally were interested in moving their applications to be deployed and consumed in a much more agile way.

One question that I did get asked but could not answer was if there was a developer trial of CICS 5.1.  I am glad to say that there is.

CICS Developer Trial V5.1. Operational Efficiency and Service Agility with Cloud Enablement

The CICS developer trial allows you to (for free) download and install an evaluation copy of CICS 5.1.  It's fully functional and you can 'play' with all of the new functionality and see how this version of CICS will transform the way you think about your applications.  For more information you will need this link:

Thanks again to the lovely customers and IBMrs I met in Slovenia.  I had a lovely time and wish you all the best in your CICS work

The bat phone

"Holy smokes batman, CICS has a problem what should we do"
"Easy robin ... ... Call the bat phone"

This is the CICS out of hours support phone.   CICS is a high quality product and doesn't have a lot of problems. Getting a problem happen out of hours is fairly rare.  However since CICS powers most financial institutions businesses when this phone rings the problem could be very urgent.  IBM provides 24x7 support to our customers. This week I will be the person answering this phone.  There are 2 ways this could go:
  1. I end up with no sleep and am very grouchy (no change there then)
  2. No one rings! 

Actually the most interesting thing that I have learnt is that older phones have an INCREDIBLE battery life.  I have had this for 4 days now and it has not needed a charge!  

Tuesday, 2 April 2013

Decoding encryption on slashdot

For this years April Fools Day joke decided to 'encrypt' all posts.  Here is an example of the encrypted text:
Na nabalzbhf ernqre jevgrf"Nf Qryy'f (QRYY:ANFQND TF) obneq erivrjf guerr pbzcrgvat cebcbfnyf sbe gnxvat gur pbzcnal cevingr, vapyhqvat n $24.4 ovyyvba qrny yrq ol sbhaqre naq PRB Zvpunry Qryy naq Fvyire Ynxr Cnegaref, gur pbzcnal unf naabhaprq vg vf ragrevat gur 
I decided that as obviously this was a joke it wasn't going to be encrypted with anything difficult, thus if I couldn't crack it in my lunch hour then I should hang up my boots.

Finding a way in

The first step in solving any problem is to find something to latch onto.  For jigsaw problems this is often to find the corner or side pieces to build the frame.  For this puzzle I thought could I find an plaintext word that might have been used in the ciphertext.  'Most' slashdot posts start with:
beltsbear writes"Following a reasonable view of drug patents, the Indian courts have decided that making small changes to an existing 
 The interesting bit is that the story starts with writes.  If this is true of the encrypted version then it would mean that f('writes') = jevgrf  where f is the encryption algorithm

Pulling it apart

Both the words contain 6 characters.  I wondered if this was a simple encryption algorithm like a ceaser shift.  

                      |-----------------------| (13 CHARACTERS)
Each letter was simply shifted 13 spaces across.  This is known as a ROT(13) algorithm.  It requires no key.  Plenty of online tools exist to decode such text.  thus:

Na nabalzbhf ernqre jevgrf"Nf Qryy'f (QRYY:ANFQND TF) obneq erivrjf guerr pbzcrgvat cebcbfnyf sbe gnxvat gur pbzcnal cevingr, vapyhqvat n $24.4 ovyyvba qrny yrq ol sbhaqre naq PRB Zvpunry Qryy naq Fvyire Ynxr Cnegaref, gur pbzcnal unf naabhaprq vg vf ragrevat gur 
 An anonymous reader writes
"As Dell's (DELL:NASDAQ GS) board reviews three competing proposals for taking the company private, including a $24.4 billion deal led by founder and CEO Michael Dell and Silver Lake Partners, the company has announced it is entering the 

Going back to work

This wasn't difficult but I did enjoy pulling the puzzle apart and figuring it out.  At least I don't have to give up the day job