Adventures in Japan 2015

At the end of 2015 a major financial commitment I had been servicing for 5 years finally finished and with the aid of my awesome wife’s bargain hunting abilities (who knew you can get nice rooms for £20 per person a night) we decided we would combine our missed honeymoon and our first holiday in 6 years and go to Japan, this is a record of that trip.

You will have to forgive my selective observations, the world interests me in different ways.

We started out at 6am on Tuesday, with a very twitchy Mark, twitchy from the idea that I have multiple clients and taking a holiday had disrupted them all. It had taken til 3 am to reach a stage I was at least comfortable with the idea of not completing every job that I had outstanding, however my clients had been very supportive with only the odd self-centred manager attempting a form of guilt trip (a special thank you to both LAN2LAN and Bluewave who both covered for me really well)

The Lufthansa planes were clean and nicely on time (if only they could get your meal choices right and that 50% of their staff are rude), and Frankfurt airpoint had a good free wifi enabling be to answer a few more emails and start to let go. before I get on the fun stuff I’m just going to make a point that this twitchiness was something that had to be got over, this holiday was not only the first holiday in 6 years, but the first proper one for even longer. As had been pointed out by many of my long suffering friends I had become a little work centric (read obsessed) and not only was this holiday a dream trip and belated Honeymoon but it was therapy 🙂

Right! On with the interesting stuff.

As a tourist arriving in Japan internet was a must. Thankfully not only can you get prepaid sims out of vending machines but with a couple of days notice you can get a mifi with unlimited data (I had a few slowdowns but on average I was using about 3Gig per day) I would heartily recommend the company I ended up with, they are called http://www.globaladvancedcomm.com and you pick your mifi up at the airport then drop it back in the same place with a pre paid envelope, simple and fast.

We did all our traveling via public transport, both the tube and train systems are clean and cheap, we did not bother with the travel cards as if you are doing less than 1000 yen worth of travel in a day it is cheaper to just buy tickets as and when you need them, all the city’s we travelled in had English tube and rail maps and everything is well sign posted (there are a lot of sign posts but the one you want will be there somewhere)

As far as navigation on foot went, I found Tokyo to be a dream, what I would call a dirty grid, in that there are big blocks of building surrounded by major roads, but each block was a chaos of tiny streets and mad shaped buildings, so finding roughly where you want was easy but narrowing it down to the actual building was more an exercise in orienteering than following an address (Google maps has a whale of a time and gets things wrong about 40% of the time)

On money: the 100 yen coin is your friend you need them for far more than you would think so if you see a change machine (and there are lots round ) make sure you use it.

Living ancestors: if everyone is walking slow with no obvious sign, try looking down, you will often see a tiny old person and I do mean tiny (maybe up to my waist) DO NOT PUSH PAST most of these people are older than God and have seen many things (including a nuclear bomb fired at their country) and deserve a bit of patience.

Bullet train : called the Shinkansen, this train costs about the same to ride as a British train ticket bought at the station but for the same money, you get a clean fast on time train with nice facilities and tons of leg room.

That’s it for the general stuff, will post specific stuff in the next few blogs

All the bathrooms we had were these nice small wet rooms with excellent showers in them, beats any posh hotel

A perfect little Airbnb room in Osaka

Every creature comfort and all with simple easy to understand labels




The third flat we got via AirBnb was by far the poshest but as it was new we got it at a discount, it was 10 floors up in a tower block and had all the mod cons such as an auto fill bath and one of the cool tables with heaters built in

Lots of toilets have the bolt on seats that have built in bidets which I WILL get when I go home, why the rest of the world does not use these I just don’t know



The power sockets surprised the hell out of me, they use Type A only so no earth, none at all (WTF), if you need an appliance with an earth you have to do this extra screw-in earth cable (shudder), but for the rest of us don’t bother bringing a power adaptor with an earth pin ( type B ) as it wont fit.



Tactile paving in Japan is far more widespread and uniform than for example in England and very obviously for the blind, with raised lines for travel and raised dots for intersections or danger areas, you see it in all tube stations and a huge number of pavements next to major roads



Given my freelance and paranoid status the chances of not bringing my work with me was nill, but thanks to my love’s understanding nature (and the fact she sleeps 4 hours more than me per day) I was able to deal with most issues before they became a problem, a great aid to this was the fact that Japan is 8 hours ahead of the UK, so I had those four hours to get stuff done before clients came in for the day, and finding things fixed BEFORE they come in gives every client that warm loved feeling.

Even from a distance mount Fuji looked amazing (at least I think this was mount Fuji, it was in the right place)

The Shinkansen felt like the heyday of air flight or how you hope your seat will be as you get on a plane (but then you pass business class and continue on to cattle class)

Your spacecraft will be boarding on platform 2

“Atomic batteries to power, turbines to speed”

  1. transform src="/assets/img/blog/XXXX" width="740" action="resize" []

Screwing With The IBM Connections Activity Stream

Customising the IBM Connections experience is a growing field, and the activity stream seems to be one of the most popular area for those customisations to take place…

It all started with this [blog entry: I love it! embed.ly in IBM Connections](http://www.lbenitez.com/2011/06/i-love-it-embedly-in-ibm-connections.html ) by Luis Benitez and a clients need to not use a third party library with associated API calls to generate their updates, and ended with a bit of swearing and chunk of JavaScript.

So what we want to do is loop thought all the status updates on any given connection page, and if we find a suitable bit of text i.e. a url we are going to pop that URL in an Iframe, but basically we could do anything we wanted

First lets steal most of the install instructions from Luis’s posting (these work for both V4 and V5 of connections)

  • If it is not already there, copy footer.jsp to the customization directory. e.g., copy <WAS_PROFILE_ROOT>/installedApps/Activities.ear/oawebui.war/nav/templates/footer.jsp to <IC_INSTALL_ROOT>/data/shared/customization/common/nav/templates †
  • Repeat for header.jsp e.g, copy <WAS_PROFILE_ROOT>/installedApps/Activities.ear/oawebui.war/nav/templates/header.jsp to <IC_INSTALL_ROOT>/data/shared/customization/common/nav/templates
  • Switch to the <IC_INSTALL_ROOT>/data/shared/customization/common/nav/templates directory ‡
  • Edit header.jsp
  • At the beginning of the file, look for the last <div class=”lotusRightCorner”> Just before that, add the following code:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>

– Save and close the file
– Edit footer.jsp
– Scroll to the bottom of the file and now its time to add our own code

<script type="text/javascript">    
var customEmbed = {
    invoke: function(){
        //First Lets look for all the activity post contents and loop though them
        $(".lotusPostContent").each(function() {
        // we are looking for a youtube url in this example with regular expressions
        var pattern1 = /(http://)?(www.youtube.com|youtu.?be)/; 
        var testhtml = $(this).html();
            //As we are continusly looping thought the page content we dont want to embed the extra content twice
            //So im checking to see if there is already an iframe in the post content, also im looking to see if the html
            //at the start of the .lotusPostContent contains a vcard class, as that means that is not a real post but 
            //rather a "this posts was made by User X" kind of thing and can be ignore else you get mad nested updates
            if (pattern1.test(testhtml) && testhtml.indexOf("iframe") == -1 && testhtml.indexOf("<span class="vcard">") != 1) {
                $(this).append(customEmbed.addhtml($(this).html()));
            }       
        });        
    },
    addhtml: function(html){
        var pattern2 = /(http://)?(www.youtube.com|youtu.?be)/; 
        var srcrul = html.match(pattern1);
        //here we have used match to get the url we want so that we can stuff it into the iframe
        return '<div><iframe width="500" height="600" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen scrolling="no"src="' + srcrul[0] + '" ></iframe></div>'7;
    }
}
setInterval(function(){
    customEmbed.invoke();
},4000);
// I find that a 4 second loop is about right for this kind of thing
</script>

#####Notes:
– I’m using a setInterval vs a setTimeout, because some page navigation in connections only requests an update to the central pane not the footer and also we want items to update on the basis of user actions.
– I using $(this).append rather than directly updating the html as Connections uses a load of dojo attach for its social functions such as “like” buttons and messing with the HTML directly brakes these.
– The best place to test your Regular expresions is at [https://regex101.com](https://regex101.com/#javascript)
There you go, the template to do anything you want with status updates

† <WAS_PROFILE_ROOT> is where the profile for your app server is located, normally in windows somthing like X:IBMWebSphereAppServerprofilesAppSrv01
‡ <IC_INSTALL_ROOT> is where you installed connection on windows normally somthing like X:IBMConnections

A Happy Notes House

I saw something the other day that is unfortunately rare these days, a company HAPPY with IBM/Lotus Notes..

Now roll back the clock 10 years and this was the case all-over, the once proud product that used to be my bread and butter and now only accounts about for about 20%-30% of my work (the rest being taken up by Java and Javascript on Websphere/Jboss/Node with a happy side line customising IBM Connections) was loved by a huge number of its users and they bought it in droves… so what did this this office have that kept them in this happy state?

It turned out to not be what they had but what they DID NOT have, they had no limitations on who could create databases on the servers* also they all had the full Notes client with the designer, so departments created apps just like they did in the old days, they took the standard templates and altered them to fit their needs just like the do with Excel spread sheets, MS Access databases and indeed to some extend Sharepoint,

Notes had not become controlled by the management and techno elite, it was used by everybody, there was no fighting for “engagement” as is the case for modern social platforms, it was achieved organically without the need for HR and marketing to stick their hoof in.

So if you want my opinion about the real reason that notes is not as popular as it used to be, blame IT and management for wanting to control everything, for taking the users that want to be pioneers and making them drones.

*Though there were a few sane guidelines