Tuesday, 29 December 2015

Delicious cookies on my sites

Since opening up the anagram solver ( http://word-finder.gb4.eu ) and the URL Shortener ( http://gb4.eu ) I was reminded that my sites need to comply with the EU Laws on cookies.

The sites do not use cookies. But I had to pop up a dismissable box to explain that. Which required the use of a cookie.

This is my cookie policy for those sites:


Cookie policy

Some of the Google Adsense Ads you see and links to various social media sites use cookies to 'enhance your experience'.

This site does not require or use cookies apart from one, delicious, exception:
  • The pop-up box on the front page uses a cookie when you dismiss its message - telling you it uses cookies - in order to remember you dismissed it.

More info

By continuing to use this site you're agreeing to our use of cookies.


What do you think of my cookie policy?

Wednesday, 9 December 2015

A Poem: Winter's Children

Winter’s children

Don’t look left or right
  Drive fast keep your face ahead
    Ignore the nearly dead
      Under formaldehyde light.
Bent and staining days perfect white.
Please, give of your daily bread,
  Encourage with a kind word said.
Even staining life’s delight
  You’ll help yourself as well as those
    Who dwell in cold free from cover,
      Sad and cringing, afraid to sleep,
        Public in their humbling throes.
Winter’s not the kindest partner
  Jealous in her frozen keep.

Monday, 7 December 2015

URL Shortener

I've put my URL Shortener on line for you edification and delight.

It's here at gb4.eu

Thursday, 3 December 2015

Anagram solver

As a big fan of on line words games and apps like Scrabble, Word Chums and so on, I often find myself in need of a little help.

There are, of course, a gazillion anagram solvers on line but none really seemed to match my needs.

So I made one.

It took me about two hours to code and sixteen to come up with the title, "@garybak's word finder".

Sixteen hours well spent, I'm sure you'll agree.

It's made to load quickly on my iPhone 5 so I can cheat enhance my scoring ability quite rapidly.

It's here if you'd like to give it a go.

Monday, 31 August 2015

Asset and People tracking using BLE Mesh

Suggestion I sent to Ubudu .. hope they are some other Mesh Beacon provider takes notice

A suggestion for asset / people tracking:
1) Each mesh beacon can be given 1 or more UUIDs to look out for.
2) When an iBeacon with matching UUI is 'seen' your mesh beacon calls a URI via your USB gateway with parameters: Mesh Beacon's ID/major/minor, detected beaccon UUID/major/minor, time and  any txPower values.
3) The receiving server of the URI (like: skignz.com) could log these values then be interrogate any time.
Any programmer could interrogate logs like these for asset/people tracking.

If this was available right now we have an airport and large hospital who'd be interested in a POC set up, with more enquiries coming in all the time.

Hope this all makes sense.



Saturday, 6 June 2015

Snootiness & Program Optimisation

For Programmers

I was a member of stackOverflow for a while. It's a great resource appearing in many Google search results for my programming queries.

I stopped posting questions due to the pedants and insufferable bores who preferred to mock a question rather than keep quiet because they didn't know the answer.

In my book: there are no stupid questions and mocking a person's lack of knowledge devalues their own knowledge.

Recently I heard this (and I paraphrase and name-change)

Adam: what is ASCII 65?
Eve: You mean you don't know? (Turning to a colleague and rolling her eyes) He doesn't know what ASCII 65 is?! Ha! What a numpty.

Eve's mocking of Adam for not knowing ASCII 65 is an upper case 'A' devalued her knowledge of it. It lowered the value of her knowledge to the level of 'everyone on the planet should know that not just me with my IT qualifications'.
Silly Eve.

Anyway, while traversing stackOverflow I came across this as a solution:

byte Patch(byte delta, byte lo)
    int resultPixel = (2 * (delta - 127)) + lo;

    if (resultPixel > 255)
       resultPixel = 255;

    if (resultPixel < 0)
       resultPixel = 0;

    return (byte)resultPixel;

Missing out an 'else' will make force the system to perform the second test even though the first test is true. As this Patch() was to be called many thousands of times, this simple over-site will result in a considerable loss in performance.
It should have read:

byte Patch(byte delta, byte lo)
    int resultPixel = (2 * (delta - 127)) + lo;

    if (resultPixel > 255)
       resultPixel = 255;
   else if (resultPixel < 0)
       resultPixel = 0;

    return (byte)resultPixel;

Showing that there is a time and place for pedanticismistophiles.

Wednesday, 11 March 2015

Android Studio Deprecated API's

For Android App Developers

Like many, I've had to migrate from Eclipse to Android studio.

I had a problem using Android Studio: I was being told I was using deprecated API calls, but it didn't tell me how or where.

I had no joy searching t'internet and questions I posted were either being ignored - showing no one knew the answer - or edited to pose the same question in a different way but still with no answer - also showing no one knew the answer.

Eventually I found the solution and have been moved to post it here due to my frustration with the so-called developer sites.

I'm using Android Studio on the Mac which I believe is almost Identical to the Windows version.

Under menu:
    Analyze->Inspect code ...

A dialog box pops up.
    Select Whole project and Ok

You'll see an Inspection Window populated with, in may case anyway, lots of 'issues'. Under the General heading, you'll find Deprecated API usage. Open those up, click on them then click on the 'is deprecated (at line ??)' to go directly to the deprecated usage.

Here's a screen shot:

Android studio deprecated API usage screen shot
Android studio deprecated API usage screen shot

I hope this is useful.

Tuesday, 27 January 2015

skignz geo-located augmented reality viewer explained

skignz logo

Brief glossary

The name, skignz, it's pronounced sky-nz and is supposed to represent 'sky signs'.

Geo-located: the skignz, objects and signs, are set in position on the planet using longitude and latitude co-ordinates.

Augmented reality: in this case, it's the combining of real images, as seen through the camera on a smart phone, along with computer generated images overlaid on top of the live image.

A short description

The skignz system is divided into two parts:
  •  a web based part which you use from a large screen format such as an iPad, good sized tablet, laptop or desktop computer. It's here where you upload images and set objects on the map. More on that later.
  • a smartphone part which is the viewer. This is in the form of an app available on iOS and Android, The app uses your GPS, camera and the tilt sensors to figure out where you are and what you should be looking at and calculates which computer generated images are in range and should be displayed over the live camera image.
Combining geo-located and Augmented reality means that you'll only see the computer generated images when your camera is pointing to them and is in range.

Some examples

Here are some iPhone screen shots which I hope will give you an idea of what's seen via the camera:
The base of  a massive 3D 60 metre turbine + some skignz on Teesside campus

skignz screen shot
Looking up at a 60 metre virtual wind turbine

skignz screen shot
Random skignz I placed outside my house

skignz really can bee anything! I made and uploaded this huge bee and placed it in my room.

What can it be used for

The list is endless and only limited by your imagination but here are a few suggestions:

  • The general public
    • place a skign over your car so you can find it again.
    • geocaching enthusiasts can place a skign over caches
    • place a skign only your friends can see marking that private party
    • place a congratulatory skign over a friend's house eg 'Happy Birthday'
    • mark a route for others to follow
    • leave a secret message for a pal
    • place a skign over yourself which will follow you, which only your friends can see
    • place fun skignz around you just for amusement
    • mark places of historical importance in your town
    • etc ...
  • Event organisers
    • mark the exits
    • show where the toilets are
    • place skignz over refreshment areas
    • use interactive skignz to say what events are coming up next
    • encourage corporate sponsors to use the skignz as a new source of revenue
    • etc ..
  • Corporate sponsors
    • get brand exposure at events and around places of interest
    • brand exposure is unobtrusive and relavent
    • link skignz to your product pages
    • etc ..
  • Companies & organisations
    • lay virtual markers along buried pipelines or cables
    • tag those wind turbines
    • see what a wind turbine farm would look like in the environment
    • see the impact of a full size building. Walk inside and look out of the ground floor windows!
    • mark places of scientific or archaeological importance with zero environmental impact
    • put virtual signs, skignz, around your headquarters
    • show the buildings on a university campus
    • mark the bus stops, stations or tubes.
    • etc ..

Briefly describe how to do stuff

Using the viewer:
  • install the skignz app
  • launch it and look around - unless you're at a venue that uses skignz, chances are there's nothing around you to see. Middlesbrough high street has lots of them as does Teesside uni campus.
  • If you want to place skignz around - you have an event or just want to play - you'll need a skignz account.
  • An account can be set up from the iPhone but it's MUCH easier to upload new images and / or place them on the map using a large format screen like a laptop via the web site at http://www.skignz.com.
The web site:
  • signing up for an account is self-explanatory
  • let's place one of the library skignz where ever you are:
    • Log in
    • select 'place skign using map'
    • in the search box type your address and locate yourself on the map. I find turning the satellite option on helps
    • click the blue plus (+) symbol to add a skign
    • it should appear - you can click on it to select:
      • skignz & objects: to select a template design or object
      • text: some skignz have text fields which you can fill in
      • size: go for medium - the equivalent of a 4 metre square sign
      • level: where in the eye-line it should be - low, high etc
      • On touch: is what to do when someone presses on the skign via the viewer.
        • you can have it pop up a message, dial a number, go to a web URL etc
      • Expire in: how many days you want it to stay there.
      • save and you're done - open your skignz app and see where it is.
        • move it around on the map if it's too close / far away.
  • Uploading your own designs is done via the 'Manage skignz templates' option.
    • create a png
    • upload it
    • add any text fields
    • done.
    • you can decide who is allowed to place it on the map, anyone, just you, friends or members of a group you're a member of.
    • this skign will appear on the list when you go back to place a skign on the map.
  • Have a click round the other options and if you need more help let me know in the comments and I'll do some more.
Have fun :)

skignz developer update

skignz logo

skignz: geo-located augmented reality viewer update

A new skignz update has prompted this update. The next version on iPhone (1.53) will include a URL scheme for app integration.
Here's an extract from the skignz developer section.

iOS app developers

From Vers. 1.53 the skignz app registers a URL scheme.
Check the iOS app version via 'Help'->'About' or see 'You can test the URL scheme on your iPhone/iPad' below.
The skignz URL scheme is: skignz://

You can test the URL scheme on your iPhone/iPad

  • Select Safari
  • Type: skignz:// into the address bar
  • All being well (skignz 1.53 or higher is installed) the skignz app will be run
  • If there's a problem:
    1. skignz is not installed,
    2. the skignz app hasn't been updated to 1.53 or above, or
    3. there was a typo
This simple interface allows any app to launch the skignz app.

Objective-C example

  Use at your own risk. No guarantees and supplied 'as is'.
- (void)buttonPressed:(UIButton *)button
  NSString *skignzURL = @"skignz://";
  NSString *itunesURL = @"itmss://itunes.apple.com/us/app/skignz/id698652561";

  if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:skignzURL]])
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:skignzURL]];
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:itunesURL]];

For more advanced integration

For example: skignz to display a 'Done' button which, when pressed, causes skignz to relaunch your app
Please contact the email address below with your contact & app details.
If you have any comments, questions or special considerations please contact gary.baker@skignz.com

By 'more advanced integration' they mean that, if your app is considered suitable (no adult content) they'll give you a user code, which you embed in the URL scheme. Pass that and your own app URL scheme and the skignz app will provide a 'Done' button, which, when pressed, will launch your app again.
It works well.

More integration options are in the pipeline and they're busy 'running catch-up' with the Android version to get it in line with the iPhone version.

No decision has been made about the Windows version but skignz have signed up as a Microsoft developer.

I have lots (4) emails asking what skignz is exactly. I'll publish this update then compose another blog entry shortly to explain.

Oh, and, Happy New Year! :)