Thursday, 2 January 2014

Taking back the web

Back in the good old days when your modem only supported 28.8kbps and accessing the local BBS didn't allow you to 'like' posts, there weren't the rich services that we no benefit from such as free mail, cloud storage, hosting etc.  If you wanted any of the above you had to build a server yourself.  These servers were big grey boxes with large monitors.

Now in 2014 I have decided to build a server myself and use it to host 'something'.  This is itself isn't a real technical challenge.  Most modern linux distributions allow the user to install a preconfigured LAMP stack with a single command.  Neither is building a web site, thats just a bunch of HTML, CSS and other scripting languages.  I however want to do this for NO MONEY!  I will only use hardware and services that I have either had donated or have free options.  The point of this is that to prove that anyone with a bit of knowledge can 'take back the web'  by building the infrastructure and hooking it up to the rest of the internet. This post consists of 2 parts:

  1. The web server
  2. Domains / DNS and port forwarding.
At the end I will have a basic HTTP server running on some hardware and available on the internet.  Future posts will discuss the services I will build on this stack.

The web server

I like my smartphones, for the past 2 years I have had a Samsung Galaxy Nexus.  I love this device.  It was my email, calendar, music, communication device and it went everywhere with me.  Over Christmas I upgraded to a Nexus 5 and for the first time felt a pang of pain as I removed the SIM from my old device and turned it off for the last time.  I have never felt like that before with some electronics.  Deciding to turn it into a web server somehow eased the pain and is a nice example of upcycling a device.  In some ways it is a great choice:
  • Silent running
  • low power consumption
  • Small physical footprint
It's not going to be able to serve the next facebook or wikipedia. but to host some personal stuff it works absolutely fine.  If I ever require something with a bit more capacity then I can always find some other devices and use them as database servers or content servers to lighten the load.

I am using a web server called kWS which is free in the play store.  it is just a basic HTTP server with pro features in the paid version.  Right now it fits my requirements as in it serves basic HTML and is free.  Later on I might need to change to a different server.

Because I have not rooted my android device I am not allowed to bind to any port running <= 1024 so therefore I am using port 8080.

Domains / DNS and port forwarding

I don't have my own domain and buying one would be outside of the rules so I have used the free service of:
www.noip.com which provide a free dynamic DNS service.  They host the domain and I am allowed to update the associated IP address using a small client running either on my ADSL modem router or on my web server.  

My router (provided by sky) only supports dynamic dns updating if you are using the dyndns product.  However this is no longer free.  I am using a small client that sits on my android web server and uses the no-ip.com api to update the DNS record.  I am not expecting the external DNS to change much, but if it does I am covered.

Finally I just needed to reserve an IP address for the MAC address of my phone ensuring that my new web server always gets allocated the same IP address.  One small hole in the firewall allowing inbound traffic on port 8080 to go to the IP address on my phone and I was all ready.



The site http://hobbit1983.no-ip.biz:8080/ is now live and running from my smartphone!

Tuesday, 24 September 2013

Answering email while on vacation

I'm probably just wierd

I love my job.  I feel very lucky to do a job which I really enjoy, however this does mean that switching off is very hard.   So even while I am on holiday I still want to know what the rest of the team are up to and how things are progressing.  Over the last few years I have tailored my behaviour to try and get as much rest as possible while still staying 'in touch'.  I have been through both 'complete detachment' and 'office holiday' phases and think I have found a nice middle ground.

Complete Detachment

This is what a lot of my friends and colleagues seem to be able to achieve and in some ways I really envy their ability to disengage completely from the office and just enjoy their time away.  No work email, no phone calls, just friends, family and fun.  I did try this and the worst part was getting back to the office to an email inbox that was incomprehensibly full.  I like to keep a clear inbox most of the time and the sheer amount of (spam/outdated/irrelevant) emails surrounding the few interesting email would worry me even while I was away on holiday.  Trying to be completely detached made me nervous and I would try to steal time away to secretly check my email, a bit like a child secretly eating a smuggled chocolate bar 

Office Holiday 

This is the complete opposite.  Mobile phone pinging each time a new email comes through.  Calling colleagues to get updates.  Although I felt that I was still in touch with the team this did nothing for my family life.  My wife felt that she wasn't on holiday with me at all and was (quite rightly upset with me).  The upside was that there was no deluge of email to wade through on my way back to the office.   I needed to break this behaviour but not go back to the nervous ticks of complete detachment.

Once a day email triage

This is where I currently am.  Once a day (usually in the evening but sometimes early in the morning) I will spend 1-2 hours working, however I have STRICT rules:
  1. No work related instant messaging 
  2. Only urgent coding or technical 'fixes'.  URGENT is only stuff that cannot be delegated and is holding up people if it isn't completed.
  3. Answer only the simple emails, if something needs deeper discussion or thought and it can wait then leave it in the inbox to deal with when you return
This allows me to stay in touch with the office, avoid the bulging email inbox when I return and still have fun while away on holiday.  I think my wife prefers this middle ground and I hope that those who think that I need to learn to 'get a life' can at least understand my point of view.

Saturday, 21 September 2013

Rational procrastination

I have my aunty and uncle coming over this week. This involves converting our two craft/office/dens into two bedrooms.   Its nice to have them over but clearing the rooms is a bit of a hassle.

I am procrastinating nerd style.  I have split the day into 3 hour iterations and used the free version of rational team concert to plan epics and stories to plan the work that needs to be done.

I have story pointed the work so I can see my velocity.  Its like an over engineered task list but I love it!  My wife won't ... She just wants the work done :(

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:

10_PRINT_121114.pdf

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 10print.org.  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.