Current Android Software 2015

This is more an aide memoire than anything else (in case of a phone rebuild), but it is the list of essential software I have on my phone at the end of 2015


Audio/Media

DI Radio

Audible

Google Play Music (so much better than Spotify for play lists and radio)

Dog Catcher (for podcasts)

MX Player

Music Folder Player Full (the only decent player for displaying audio as it is laid out in the filesystem)

BBC Iplayer Radio


Productivity

Clockwork Tomato (The Best timer for the Pomodoro Technique)

Power Nap

Freshbooks

Wunderlist

Timely


Communication

Slack (a truly amazing team chat)

Skype

Twitter (The stock version is actually the best)

Facebook (Unfortunately)

Go To Meeting

IBM Verse


System

Dropsync

File Explorer

1 Password

Disk Usage

Swiftkey


Games
(I tend to not play games on my phone as I have a Nvidia Shield Tablet)

mahjong

Chess

Sorcery 1 (or any choose your own adventure game)

Gemini rue


Misc

National Rail Enquiries

Speedtest.net

Sworkit pro

Moovit (best for London bus times)

Priority Pass

Plus mobile banking and mobile ISP provider’s app.

Calculating Rates

One of the main differences in going truly freelance* is having to have a consistent formula for calculating quotes and pricing for jobs, as for most things this basically comes down to a time and materials calculation, but the time part has a load of variables in its own right, So far these seem to me to break down into the following

“Basic” = This is the hourly rate you would pay for a permanent member of staff who could do the job to the competency you require.

This is our baseline, it represents the ultimate “bulk buy” and so offers the cheapest rate but is the least disposable.

“Contractor” = “Basic” + A pro rata amount representing all the stuff that a permanent would normally get as part of their job e.g. Holiday, Pension, Sickness, Insurance, job security etc etc

In actual fact a contractor tends to cost the same as a permanent in a holistic way, it is just that you see all the costs up front, more expensive but also more disposable than a permanent member of staff

“Consultant” = “Contractor” + Business over heads (such as travel, time lost, project overruns and changes)

Consultant rate is in fact a reverse form of “bulk buy”, you are only paying for people for a short period of time so they have to maintain them selves when you have finished with them before they pick up their next role, consultant rates also tend to cater to sudden client demands and changes, very often when you see a project start to get picky about every change and alteration, it is because the project has been aggressively priced according to “Contractor” rates (either because of rate negotiation or competition) which means every time there is a change it ACTUALLY costs the consultant money

“Jump” = “Consultant” + Cost of Impact to other clients

More properly called “On Call” or “SLA Maintenance” rates, “Jump” rates mean you stop what you are doing and immediately attend to the needs of a client, you see them all the time in the different costs associated with a support contract, you have to consider the impact to other clients if their work is interrupted and if that is not permitted, someone must be constantly waiting for a client to make them “Jump to it” which cost money, of course many large clients expect “Jump” performance for “Contractor” Rates, so you must decided if such business is worth the Loss leader Behaviour that this represents

Of course you can throw all of this out of the window due to a number of reasons e.g. Really Interesting work, Worthy cause or to improve your skill set.

So this is what proper managers do…………

*That is having no one main client but lots of nearly equal clients.

Salesforce read mode hide-when hack

It seems the need for hacks has not gone away with the move to cloud, but you do have to be more careful, as I have already found out Salesforce can break your custom code at will.

So that being true one of the things that SalesForce does not seem to have that every other framework does is a simple an powerful “hide when”, IMHO this feature should be present in every line button and object on every page and most platforms do,

It is the most requested feature for customisation that I have come across, and this is the hack that I use for read mode documents or forms (which strangely is where the request is most often made) (and yes it is a hack)

We are going to just stuff some JavaScript into a apex page, you can see an example of it below

<apex:page standardController="Case" showHeader="false" sidebar="false">
<script>
myVar = checkforbutton();
function checkforbutton()
{
    if (typeof(parent.document.getElementsByName("searchArticles")[0]) != "undefined" )
    {
               if ( parent.document.title.indexOf("Customer Community") != -1) {        
                   parent.document.getElementsByName("searchArticles")[0].style.display = "none"; 
               }
    }
    else
    {
            window.setTimeout("checkforbutton();",100);
    }
} 
</script>
</apex:page>

Lets break it down
1. We have to use “parent.document” to get JavaScript objects as when we use this page [SalesForce](http://www.salesforce.com/) will embed it inside a Iframe
2. We have to do a wait loop that keeps looking for the object till it finds it (then stops), because [SalesForce](http://www.salesforce.com/) adds button objects in after the page loads so they wont be there when it first opens

    if (typeof(parent.document.getElementsByName("searchArticles")[0]) != "undefined" )
    {
            //do stuff
    }
    else
    {
            window.setTimeout("checkforbutton();",100);
    }

3. When the button is confirmed to be there then we are going to check the page for a condition(s) and if it’s true/false we are going to hide the button/element on the basis of it, in the above example, if we are on the “Customer Community” version of a page, we don’t want to allow the users to search for articles, so we hide the “searchArticles” button, it’s not a security issue, we just don’t want to confuse the user experience by allowing this feature.
So we put this code into a Page

This insert that page into the layout Object layout we want it to effect.

that would normally give a big white space where the inserted form lives, so we make the page a 1% by 1px block

And that’s it, just save the layout, the button/”what ever” will hide when the page loads, a hack but a simple reliable hack
Now as always “hide when” is not security, remember to make sure that you don’t leave functions exposed and think this kind of thing covers you.

Classic Domino and multi country dates with Bootstrap

I was doing some fixes on a classic domino web app that uses bootstrap datepicker when an issue was raised. turns out its a bugger to get the jquery datapicker and domino date format to agree with each other for different countires ie mm/dd/yyyy or dd/mm/yyyy or dd.mm.yyyy

you would think that a little bit of JavaScript would solve the problem but there was multiple instances with a variety of browsers where it ended up that what ever domino was doing to calculate the date format was not matching the result of the JavaScript.

So we cheated, we replaced the “format:” parameter in the date picker below:

$('#MYDATE').datepicker({
    format: "mm/dd/yyyy",
    clearBtn: true,
    orientation: "top auto",
    todayHighlight: true,
    autoclose: true,
    weekStart: 1
 });

with some computed text with the following formula:

dat := @Text(@ToTime("01/28/1900");"D0S0") ;
sep := @Middle(dat ;2;1) ;
@If( @Left(dat; 2) = "28" ; "dd" + sep + "mm" + sep + "yyyy" ; "mm" + sep + "dd" + sep + "yyyy")

I find the best way is to put this in the default setting meaning you only have to do it once

$.datepicker.setDefaults({
     dateFormat: '<Computed Value>'
});

Simple, worked fine with a wide variety of date formats and kept everything in sync with what ever format Domino ended up picking.

Adventures in Japan 2015: Conclusion

I sit here at the end of my first proper holiday in nearly a decade, my long awaited honeymoon and a trip to a place that has literally been the land of the rising sun for my entertainment since I have been a child.

and what did I think of it?

 

Japan did not disappoint in any way, the culture, the people, the city’s, everything lived up to my dreams

I could have wandered forever through the country and indeed never have I more wanted to pack up a ruck sack and travel as I did after seeing the green of my first bamboo forest.

The Japanese have taken so much of the west to their heart, but they have made it brighter and more Kawaii and in doing so have made it theirs, all the time maintaining their own gorgeous traditional culture.

Some of the things that made Japan so amazing could only exist in Japan as frankly we in the west sometimes just cant have nice things as we demand our right to screw them up, and thus we cant do crowding without pushing or have clean trains that don’t stink, I’m aware that I might find it hard to live with some of the rigged social normals the Japanese do, but its still a wonderful country.

We WILL go back