Wednesday 25 January 2012

2012 Big Bloggers Dander for Dosh - Invitation!

He ho gentle readers!


Christmas is over and the new year brings a whole new horizon of wonderful exciting things to stick 2012 after (or before). So since the "Extraordinary Elsmores" have set the dates for UKLUG 2012 to be 3-4 September, it seemed like a good idea to arrange the 2nd Big Blogger Dander for Dosh around the same time - currently we are looking at the 25th August or the 1st September.

Now the 2011 Dander for Dosh raised over £3000.00 for the Famine In East Africa - which was great and we want to raise even more this year! So we are making this years effort an open invitation to everyone and anyone mad enough to do it.

You don't have to be a geek, a blogger or even have any interest in clipboards to join in. Come along and join Eileen Fitzgerald and myself on a 26 mile dander in the Irish Countryside followed by a slap up meal and drinkies. You will need to be is reasonably fit (I am doing it so you do not have to be "that" fit) have a good pair of socks, walking boots (not shoes!), a good waterproof jacket and a sense of humour (as Eileen will tell you my jokes deteriorate from 5 miles onward) oh and if you have one a Kilt.

This year's charity has yet to be decided but regardless of what that is you do not have to raise money whatever we settle on. You can raise cash for your own favourite charity at home or abroad. All we ask is that you raise money, lots and lots of money and have a really good time doing it!

The other reason we are putting this out there amongst you now is because it does take time to build up to a 26 mile dander. It is not as tough as running a marathon but it is 10+ hours of walking, there may be blisters and sweat rashes in awkward places! We are telling you this in January because you will have 7 months to prepare which is loads of time!

Eileen is out recceing suitable routes in the West of Ireland right now and we will announce the route as soon as we know -be assured it will be beautiful and not just because I will be there in my Dandering Kilt.

We realise that things are a bit vapoury at the minute but we plan to have things firmed up in the next few weeks and we would like to have a rough guess as to the number of people that are interested in joining us. You don't have to make a firm commitment right now but if you are interested in giving the Big Blogger Dander For Dosh 2012 a go it would be great if you could drop me a comment on this blog post or an Email to mcdonaghs [at] utvinternet[dot]com and we can keep you up to date with developments.

Challenge yourself in 2012 come and join us on the Big Blogger Dander For Dosh 2012 !

Look forward to hearing from you :-)

Steve and Eileen

Tuesday 17 January 2012

Social Software and the information event horizon

I have been following the goings on at Lotusphere with the usual envious interest of the non-attendee and once again I find myself deeply irritated by the prefix "Social" that is plugged onto things that really do not need "Social" added to them. However that is just me being grumpy and a general detestation for marketing hyperbole.

That aside I have been thinking of late of what I call the IEH (Information Event Horizon). Social networks only work when those in the networks feel obligated to participate within that network. This obligation generates the "gravity" drawing in the members of that network to spend time and resource making that network work.  The more data that is fed in the greater the gravity it generates and this leads to more people joining the network and so on.

There comes a point where this exponential growth in "obligation gravity" is so great that the people in the network pass the IEH and the time taken for the participants to consume the data exceeds the time available for the worker(s) to adequately process it.  Recently the IEH has shifted backwards somewhat by the enabling mobile connections to the networks so that the user can now participate in the data longer and enable the network to stay on the good side of the IEH. Which to a certain extent is what I am seeing in the announcements at LS12. We are enabling better ways to get at the data we are asked to participate in. I have the gravest reservation that all that is happening is a postponement of the inevitable descent into the chaos of the data black hole.


This is not to say Social Software (Euuuu hate that term) is a bad thing, it isn't. IBM Connections, Domino, Quickr, Sharepoint and ... dare I say it .. the Google tool set etc etc all have great worth to the enterprise and they are all maturing into tool sets that should enable disparate people in business to communicate in an effective and efficient manner.

So what's to be done to prevent the IEH being passed in our own organisations? I don't think there is a software fix for this, it all boils down to the aforementioned social obligation the users feel when presented with information that is passed to them. Therefore I think we have to look very closely at why we form business social networks and the way we use them to best advantage.

There are significant challenges in that last sentence, do we :

(a) know what an efficient professional social network is?
(b) know how best to form that network?

(c) know what metrics to use to measure the worth of that network?
(d) know what tools we need to enable maximum benefit

I don't think that we are meeting these challenges particularly well. We have great software to enable us to interact socially but do we have the expertise and knowledge to manage them?

I do not know so I will leave that question hanging for now ...

Wednesday 21 December 2011

Designing for the Colour Blind

Today I was whinging about getting yet another email, nothing odd in getting emails you may think, however for me as a colour blind person, sending me an email that is written in a colour I cannot see properly just ends up as being grey and if the colour is a bright colour it is a light gray on a white background. This is deeply deeply annoying so I tweeted my discomfort and sent a polite but firm email to the sender asking them to send emails to me in a format that I would easily read.

My tweet brought several responses from UI designers keen to understand where I was coming from and asking me for some hints as to how to make their designs better for the colour challenged.

Colour blindness is alas sometimes forgotten and to be fair it is more of a pain in the arse than a real handicap and designing your site for people with more profound problems is MUCH more important, however it is deeply deeply irritating when you land on some sites or get emails that the designer or sender at the other end thinks are "dead cool" and "trendy" but for the colour blind are at best confusing or at worst just un-usable.

I discovered I was almost totally colour blind in my late teens early 20's and I can see a little blue and a little green and no red at all. Why had I not noticed you may ask well we learn colour through association with known "things". The sky is blue, the grass green and milk white, we then learn to associate that colour with other things. For colour blind people they can recognise the colour from the context it is in. Confusion only arises when confronted with something unkonow and the CB person has to guess by the tonal value what colour it might be.

The eye has two light sensitive cells,  Rods and Cones. Rods are mainly clustered around the edge of the visual field and cones in the middle. Rods see tones and Cones see the colour. Colour sightedness is basically a problem that is usually genetic and usually found on the Y chromosome making it much more common in men.The problem manifests itself with the Cones they are either malformed, don't work or just arent there at all. I was born with only 11% of the Cones I should have so whilst I can can see some colour I am mostly monchromatic. The up side is that I have more Rods which are smaller than cones which means I have extremely good visual accuity :-) always an up side eh?

About 1 in 10 Europeans mainly men have some level of two colour colour blindness, about
1 in 1000 are like me totally or very nearly totally colour blind.

It is worthy remembering that someone who is "Blue" colour blind does not see nothing when the something is Blue. We can still see something but just not in way you see it. It will be a gray that matches the tonal value of the actual colour.

I paint and I love painting and I am asked "How can you being colour blind paint in colour?" Well paint manufacturers helpfully put paint in tubes with a label on it that says "Blue" or "Red" and comes with a Colour Index  for example French Ultramarine Blue has PB 29 (77007), so contains Pigment Blue 29  and is color 77007. Simple when you know how ;-). Also my paintings are inclined to be a collection of colours with white added to lighten, so you will see a lot of one colour tonally adjusted to make sense to me.

Similarly I am often asked .. "How do you know which is the Red Stop light?" well that's easy it usually has STOP written on it as well as being red and more obviously it is always the light at the top of a traffic signal ;-) and they are tonally very different. On the other hand put me infront of the old style electrical cables (Brown Red and Green) I just cannot cope. Thankfully the new wiring cables are a dark one, a light one and a stripy one and I have stopped blowing up toasters.

Now I am not saying that you should go deliberately out of your way to make your
UI colour-blind friendly, please make your site as glorious as you can for the 90+%
of visitors that can see all the colours. However keep me and my kindred in the back of
your mind and offer us some help if we need it.

Some things to remember and or do ...

  1. Don't use ONLY color to indicate something specific on your page.
    There is nothing quite so fecking annoying as getting an error message that
    says "Please correct the entries highlighted in red" when you can't see red.
    and because it is a "dark" hue it looks just like black. Use color and a * or >
    as well to indicate the problem.
  2. Similarly having a RED alert box with White writing does not to a Red colour blind person
    convey the same "Danger" context as it would to a colour visioned person. Add a nice Icon
    to help with the context.

  3. Desaturate your images to see if they still have impact to grey scale.
    Beware this is NOT how most color blind people see the images and will need to be
    tweaked slightly giving less contrast (make it lighter) as the viewer may not see the tones
    in the same way you do... but it will give you a quick and easy way to tell if the image is still useful particularly if you have text or navigation objects on top of the image.

  4. Try to avoid placing red and green together. (RG colour blindness is the most common)
    Especially on items like navigation buttons, the text can actually blend into the
    background, making it very hard to read.. here (CTRL+A is your friend if you are colour blind)

  5. Try and avoid using two colours that are of similar tonal value - and this is not as easy as it sounds for example this to color sighted people is fine and easy to discern. The outer colour is
    RGB(112,161,207) the inner colour is RGB(97,179,122)
  6. Gray Scale this image and you get the idea of how this looks like to me
  7. It is always better to have a dark colour on a light background, you can reverse this but it isn't quite so good. Also be aware that it is more difficult for everyone to distinguish dark (low value) and/or saturated colors (e.g., a 16-color palette blue or red against black), and extremely light pastels, particularly in low or bright light conditions. This is doubly true for the colorblind.

  8. If you can, find a color blind friend or relative to look at your site. If you're not color blind it's often very difficult to tell what they might have trouble with. The challenge is as can be seen above that if they can't see something,  they might not even know they aren't seeing it.

  9. http://colorfilter.wickline.org/ is a useful place to go to test web pages
    it isn't brilliant.. but it does show you what the various types of CB people
    may see when they visit your site. Try your favourite business sites and you will be surprised how different they look to the colour blind.

Friday 16 December 2011

"Pain in the Arse" problem found in 853 client pre-roll out testing

During Lotus Client testing of 853 we have come across a problem that it is perhaps wise to be aware of.
If you have the following set of circumstances
1. You have laid out a forms elements in a table
2. You display the form in a Frameset, page or Dialog box
3. You have not explicitly set a Background Colour in all the cells of the table
4. Your First cell in the table has an explicit Background Colour set
This happens
The background colour of the first cell in the table is inherited by all the cells that have the backgound colour as the default [NONE] Which is a bit ackward if your font colour happens to be the same as the background colour!

I don't think UP1 fixes this but I haven't tried so it might but I am informed that UP1 is more to do with xPagey stuff.

I have tested this on XP, Vista and Windows7 853 clients and they are all the same.

To fix it set the BG colour to an actual colour rather than the [none] default and it appears as expected

Given my previous contact with bug reporting being less that warm and fuzzy . we are currently looking at the possibility tweaking all our tables in forms so default [none] background colours are replaced with an actual colour prior to 8.5.3 rollout, for now we will have to stay on 8.5.2

Wednesday 14 December 2011

jQuery 1.7 Event Delegation.. Gitanes and whisling at girls are they walk by

In the wonderful world of JS event listeners cost memory.
Lots and lots of memory!
In today's shiney shiney click,drag swipe an pinch world has a whole heap of event listeners floating around smoking cheap ciggarettes, whistling at the girls and generally making your web site perform badly. But all is not lost jQuery provides some really easy methods for handling event listeners efficiently through the wonders of event delegation.

In a bit of an extreme example but hey we are Domino Developers we are extreme! Imagine a situation where a 10×10 cell table needs to have an event listener on each cell; let’s say that clicking on a cell adds or removes a class that defines the cell’s background color. A typical way that this might be written:


$('table').find('td').click(function() {
    $(this).toggleClass('yuckygreen');
});

Enter jQuery 1.7's  on() method. It acts as a utility that wraps all of jQuery’s event listeners into one convenient method, and the way you write it determines how it behaves.  so we replace .click()  .on() using this code.

$('table').find('td').on('click',function() {
    $(this).toggleClass('active');
});

Is that cool or what? Mind you we are still binding 100 hundred event listeners to our page, one to each individual table cell and they are still puffing away on their Gitanes and scratching their arses in a most undignified and memory wasting way . Since the majority of events bubble up the DOM tree, we can bind a single event listener to one element (in this case, the <table>) and wait for events to bubble up from its children. Like this

$('table').on('click','td',function() {
    $(this).toggleClass('active');
});

All we’ve done is moved the td selector to an argument inside the .on() method. Providing a selector to .on() switches it into delegation mode, and the event is only fired for descendants of the bound element (table) that match the selector (td). With that one simple change, we’ve gone from having to bind one hundred event listeners to just one. You might think that the browser having to do one hundred times less work would be a good thing and you’d be completely right as I found this evening!

[If you are using a version of jQuery less than 1.7 all is not lost.. look up the .delegate() method and you will be able to do nearly the same thing!]

Sunday 4 December 2011

Ye Godz TheTroubledGeek.com gets an email!

It was many moons ago that awesome team of Fabulous Francie and Professor Ignatius Gonad IV were called upon by a member of the liaty to answer one of their problems. Sadly the domain is no longer active ... it is a long story which I may be allowed to tell some day when they lift the court orders. However the questioner got around this knowing that I was a close friend of Ignatius Gonad and knew I that would be able to contact him  and sent me the email and I am very glad to be able to reproduce the email and the Professors reply here in the august pages of DominoYesMaybe

Dear Professor and Fabulous:

First, let me convey my deep condolences for the cancellation of your
"Troubled Geek" show. Initially, the loss of this bastion of comfort in a
cold, cold world saddened me nearly to the point of doing myself harm! But
then I took a nap and felt much, much better. I do hope to see you back on
the air again soon.

Now, to my question. While investigating some of the detailed behavior of
"garbage collection" in the "Java" programming language, I decided to put
some background music on in my "office". I chose to loop the Ping Floyd
song "Wish You Were Here", as it seemed appropriate for certain situations
when the "Java" "Garbage Collector" (why do they call it that, anyway?
Seems a bit supercilious, no?) removes bits of memory that I really did not
want it to.

Here's the problem: My son, who is not a fan of Pink Floyd, wandered by and
criticized my choice of "entertainment". He claims that the Beatles song
"Everybody's Got Something To Hide (Except for Me and My Monkey)" is far
more appropriate, as (in his explication) the "Monkey" in the song
represents my missing heap storage, and that, beyond simply stating the
problem, the song also provides useful "advice" (i.e., "Take it easy").

I, however, claim that "Take it easy" actually refers to the methodology
implemented by the "Garbage Collector", by which the so-called "garbage" is
removed.

Who is right, he or I?

Thank you for your adjudication!

regards,
A Fan

and the reply ...
Comrade Fan

Since Fabulous Francie as at this time deep in her research program on
the effect of suntan oil on the defrag time of AIX servers I will jump in
first.

Alas and alack, TheTroubledGeek.com is as you have found no more
due to an unfortunate incident with some Pirate Rum, an unripe banana
and a goat about which I can say no more other than the nun now has
a restraining order.

I believe you problem lies not in the choice of music but in your unnatural
urges with respect to Java! In their seminal work "Javaphiliacs, the Hidden
deviants" by Weisenberg, Smith and Widdle 2002 the abnormalities that
lie deep in the psyche of those that dabble in the deep murky stack of Java
can be traced back to incidents in early childhood that involve wellingtons
(I believe you americans call then gumboots), wheelbarrows and an inability
to eat icecream with a spoon.

You son's perspicacious grasp of the situation is laudable however it seems
he too may be suffering from C++osopatheticsonolasitis, which is in short
a perpondersance to see more meaning the the words of messieurs Lennon
and McCartney than in fact is actually there.

So in effect what I am saying is you are both wrong and should immeadiately
repair to Itoons and purchase "We're Only in It For the Money" by Frank Zappa
and the Mothers the only album to play when considering anything to do with
Java and it makes about as much sense!

Much Love and Hedgehogs!
Professor Gonad


Professor Gonad wishes me to make known to the world at large that the authorities are quite happy for him to answer any and all of your queries using the good offices of DominoYesMaybe as an intermediary. The Prof is also a great believer in collaboration and invites not only your problems but your input in the comments section of any posts he may receive and reply to

Thursday 13 October 2011

Tidying up closed jQuery UI Tabs

A wee tip:

If you use jQuery UI tabs you may have noticed the that .remove() method does not really get rid of the tab, it clears the.html() and hided the [div] container. Now that is fine and dandy if you have a app that people dip into infrequently, however if you app stays open all day and users are opening and closing tabs frequently and not refreshing the page the tabs are on .. then your DOM can get very heavy with unused [div]s.

An easy way to get rid of them is to use this wee bit of code everynow and then for example on a setTimeout(), the code parses the DOM for any div defined as a tab tests if it is empty and removes it.

$('div[id^=ui-tabs-]:hidden').each(
                                                        function(index)
                                                        {
                                                            if($(this).html() == "")
                                                            {
                                                                $(this).remove();
                                                            }
                                                        }
                                                        )
Steve

Thursday 15 September 2011

Interesting wee additional method for Lotusscript (yes you read that right)

Well I never!
Yes you did read the title of this post correctly I have discovered a NEW thing in Lotusscript.
I know I too had to sit down and have a long cup of tea and a biccie to recover from the shock not only that there is something new but (a) it is useful and (b) it works really well.



I speak of  NotesView.ReSortView("columnname",AscendingFlag)


Now what this does, although not explicit in the help is , if you have a view and the columns have the "Click on column headers to sort = Both" turned on you can in Lotusscipt ask the view to be Resorted based on the programatic name of the column you want the view to be sorted on.

You do not have to set the column to be sorted by default (this reducing what could be a VERY silly view size) you just have to have the "Click column headers to sort = BOTH" turned on.

What this meant to me was I could have a web agent that returns data to an AJAX request that was sorted in a user defined way at the click of a button!! FANTASIC no more messing around with empty documentcollections, sorting lists and adding the documents from the orginal back into the empty collection. All I needed to do was

Call MyView.ReSortView("OrderQuantity",True) 
to sort the view into the order I wanted and deliver it to the wating browser.

The Second parameter is TRUE = Ascending or FALSE = Descending. A word of caution on this param, it appears not to be accessible when you pass it as a variable. You need to pass it as an actual value rather than a Boolean Variable.Also if you have something other than "Click on column headers to sort = Both" this second variable is ignored and the view is sorted on what ever you have set as the value for "Click on column headers to sort"

Really very useful for fiddling with views.. THANK YOU the Dev team in IBM :)





Wednesday 7 September 2011

.o0( Why shosuld I use Browser Prefixes in CSS ?)

Browsers don't ya just love em? We wait with baited breath for each new iteration of our favourite window onto the internet and with each new version we devs get new toys to play with. Now the Browser writers (well all of them except the ****wits that write IE) like the new stuff that is coming down the tuvbes from the W3C however there are things that are no yet at Cadidate Recommentation status, so they add a browser specific prefix in front of the property so that the particular rendering engine can process it. For example the -mox-border-radius is the Mozilla (Firefox, Camino and Flock) version of the border-radius  property.

The prefixes are:
  1. -khtml- for Konqueror rendering engine KHTML
  2. -ms- for IE's rendering engine Trident
  3. -moz- for Firefox,Camino and Flock's engine Mozilla
  4. -o- for Opera, Opera Mobile, Opera Mini, Nintendo Wii engine Presto
  5.  -webkit- Safari, Mobile Safari, Chrome,Android engine webkit.
So why do these boyos exist? Well it allows the rendering engineers to "play" with new properties and values before they are finalised which is a good way for them to be tested in the wild and then corrected and tweaked as required. If they were just to jump straight in they would then be locked into that behaviour for ever. Devs like me would start making curvey corners and using partially opaque PNGs and quite rightly expect that when the browsers updated that particular behaviour would continue to work in a standard way.from that point onward. If the browser changed the standard property for whatever reason, buggy or a W3C spec change then lots of websites could potentially stop working as expected ... so they use the prefixes to get around this.  Have a look at Prefix or Posthack by Eric Meyer for an example of this actually happening.

CSS has long been a country full of "hacks" and kludges that rely on bugs in rendering engines most completely unrelated to the property you want to "hack" which are used to get the browser to do what you want it to do.


So you can use both the standard unrefixed property in your CSS and use the prefixed version as well, this means that as the property becomes a standard an impliemented in the same way over all the browsers your precious web pages will not break. It should be noted that IE9's prefixes are a bit "odd" at the minute for lots of properties they decided to jump straight into the standard and hope that the W3C doesn't change the spec!
div {
                  -moz-transform: rotate(45deg);
                  -o-transform: rotate(45deg);
                  -webkit-transform: rotate(45deg);
                  transform: rotate(45deg)
}
In the code aboveI am rotating a [DIV] element thru 45 degrees and I am covering the main browsers (inc IE9) However .. all this repitition will lead to large css files. It really would be so much nicer to have one single entry and have done with it. Well there is a way around this using a CSS pre-processor. SASS is one and LESS and eCSSTender to name 3. However by hiding prefixes with pre-processors devs may forget that they are using "experimental" properties that are likely to change when they are infact nothing of the kind. Also the Pre-Processor comes with a browser overhead and process overhead on the user's PC which becomes more noticeable on complex pages,

As time progresses you can remove the browser prefixs from your CSS, which is MUCH easier than "unhacking" css using the older hacks that relied on browser bugs.

A minor annoyance of using prefixes is that they do not validate and in DDE this can be a pain and can hide real errors in your CSS. to get around this I generally have two CSS files.. one with the pristine Standard CSS and one with the prefixes. There is an extra HTTP request hit here, but it does make debugging easier during testing.

So there you have it Prefixes .. next time I will have a think about coping with browsers that don't support CSS3




Tuesday 6 September 2011

.o0( ok Why CSS3? )

Since the dawn of the first browser CSS (Cascading Style Sheets) have been evolving with progressive enhancements that allow developers more and more "design" options when designing a web site and the most recent iteration of this standard is CSS3 and having been playing with it on a couple of "new build" projects over the last couple of months and it has to be said I am impressed. Very Impressed!

The new techniques inherent in CSS3 give the developer more advantages over the older alternate more hacky methods. They extend the developer toolkit and in doing so bring the web-pages we create closer to the idea of a "web app" that looks and performs exactly like a desktop app.

Used correctly CSS3 can totally replace images, for example drop-shadows can now be done with CSS so you no longer have to design, place and download PNG or GIF images to get this effect. If you client wants to see what it looks like a little darker, a little further or wants it as a neon purple glow no longer do you have to hit GIMP or Photoshop a simple change to the CSS style is all that is required.

Some CSS allows you to do away with Javascript functions or Embedded Flash Objects which can be ackward to code for every browser particuklarly now we have to provide for a myriad of mobile browsers as well as desktop ones.

CSS3 also can reduce your markup by requiring fewer and less complex DIVs and associated Classes. for example you can now load multiple background images into a single Element so you do not have to have nested internal DIVs each one styled differently. Also and IMHO most markedly you can now target elements in the DOM directly based on their position in the document tree.

[All the above comes with the presupposition that all versions of IE are shit shit shit shit shit]

Having said that I have discovered that there are "the right tools for the job" and sometimes although the CSS3 technique is dead cool and sexy doing it using Javascript can sometimes do it more efficently and with less development time. So basically watch out and if CSS3 can do something quicker and more efficently use it otherwise .. well use your common sense. ;-)

I will endeavour over the next couple of posts to throw out some both my "oooooo!" and the less frequent "oh bollox!" moments that I have had with CSS3 over the past few months and perhaps spur you on to have a look at what I think is a definite gain to the art of web design.



Sunday 21 August 2011

The Dander for Dosh 2011

Just a quick "Thank You!" to all the friends, colleagues and strangers who donated to the First Domino Dander for Dosh charity walk. Eileen Fitzgeral, Andy Clark (a colleague from AVX where I work) and I completed the 26.22 miles of the Moyle Way yesterday in 10hrs and 6 minutes and thanks to the generosity of you lot we raised £1,375.00 for the Disaster Emmergency Committee appeal for the drought and famine in East Africa.

It is humbling to think that we 3 can raise some cash and make a difference to lives so far away. £0.25 will bring a child back from the brink of death, and £1375.00 will make a real difference to lots of people. We did the walk because we enjoy walking and hoped to make a bit of a difference to some other people ... you helped us to do that and we are very very very grateful to you all..

Thank you thank you thank you!

A full post on the goings-on with picture can be found here on the family blog

And once again THANK YOU!!! You guys ROCK!

Tuesday 16 August 2011

SInging jQuery's praises in a Domino Environment

Riding as I do just behind the xPage wave, I still spend most of my time using the older web tech on the domino server to web enable my apps, some apps are just to big and too difficult to make all xPagey and lovely quickly, so we take a gradual approach to migration.

This does not mean however that the poor users have to put up with old fashioned make do an mend. We have been using a lot of jQuery of late to leverage some bells and whistles and whilst not the pre supplied Dojo that lives on the server which gets used a bit, For the shiney front end stuff we do use jQuery because it is so easy to code in.

You can get every thing you need from the UI page here. jQuery comes in two parts, the core product and the UI and there are pages to download both, However when you download the UI you will get the current stable jQuery core that matches the UI code, so I generally go down this route when acquiring the required bits and bobs.

When dealing with the UI components do have a look at the themes avaiable and choose the one that best suits you before you download. There is a "Theme Roller" app that allows you to tweak just about everything before you download and this is very useful when trying to get something that is "corporate identity friendly".

When you download the core and ui elements you get a zip file with everything you need including samples.Which can be a bit daunting. However the files you need are in two places all the Javascript is found in a directory called JS .. the files are currently
jQuery-1.5.1.min.js  - 84kb which contains the jQuery core code
and
jQuery-ui-1.8.15.custom.min.js - 206kb which contains the jQuery widget code.
You also need to resuce the CSS file and the associated graphics files which are in the CSS directory
when you tweaked the theme or selected one of the themes from the gallery of predfined ones you will have a subdirectory called the name of the theme. For example if you select "smoothness" there will be a dir called smoothness in which you will find
jQuery-ui-1.8.15.custom.css - 33kb
and a sub directory called images which has all the image files you need for the widgets

You have a couple of  options here,you can totally ignore the download and use the CDN hosted files or you can just copy the JS and CSS to the Domino\Data\Domino\html directory on your server,or you can embedd the requred files in your domino application. The choice is up to you. From a personal point of view I am inclined to embed the files in my apps as I live in a very disparate server environment where I cannot guarantee that every user will have access to the internet for the CDN files , or guarantee that every server in the domain has the correct JS in the correct place at the same time.

Housing the jQuery in an NSF is not that difficult but it does need a wee bit of tweaking.

The JS files are minified and as such cannot just be cut and pasted into a JS library, so I just import them into the RESOURCCES / FILES section.

The CSS I import directly into a RESOURCES Style sheet, edit and run a Replace All on URL(images/ replacing it with plain URL(

The Images are all PNG so will not import into the images section of the nsf so I load them into the RESOURCES / FILES section as well.

... and that is it. you are ready to roll.

As an example of how easy it is to provide a jQueried widget I wil use the old favoutie a name finder field

For this you will need access to the jQuery code defined above by one of the methods

Create your form
Add links to the JS files and CSS files in the HTML HEAD Section
(i have renamed the files for ease of typing)

Add the field you want to have an autocomplete onto the form
Give it an HTML ID property of say "myname"
Create some HTML in the JS Header section like this


jQuery has a special function  $(document).ready() which fires when the document is completely ready and all JS, images etc has been downloaded, and is ready for use. This is what is happening in (A) above which says when the document is ready run the function fInitApp()

fInitApp() is defined below and the jQuery selector $('#myname') tells jquery to search the document and locate the HTML element with the ID of myname [jQuery uses the same short hand as CSS in that a . defines a css classname and # defines an ID name.

Having found the element with an ID of myname, in this case a Text or Name field on the form jQuery then uses the autocomplete widget instansiator. Autocomplete is defined in the UI JS file and all that is required is that you set it up once when the document is loaded.

The Autocomplete function is supplied with an array of options surrounded in curly brackets.In the example above what I am saying is .. trigger the autocomplete when I have type 3 characters, get the data from a notes agent called getnames and the return data will be in json format.

jQuery passes what you type back to the agent url as a field called TERM in the CGI field called Query_String

So you write an agent with the same name as the Source: definition that takes this CGI field and queries the ($users) views in your names.nsf and returns a JSON String something like this ( I am limiting the return to 10 names you can set this as you see fit)


And that is all there is to it...

I have popped the above code into an NSF and you can have a look at by downloading it from here
and if you havent looked a jQuery yet, i advise you to have a look see. There is a wee learning curve but once you have the basics you can get remarkable effects very quickly and you do not need xPages to do it, so if you are stuck back on early V8 or V7 then you can still serve your users something pretty good very quickly.














Tuesday 26 July 2011

Please give to Domino Danderers Dander for Dosh 2011

Folk of the yellowverse and others that come to read my wittterings i make no apologies for coming to you cap in hand looking for $'s £'s and €'s for this year's Domino Danderers Dander for Dosh.

Eileen and I are going to walk the Moyle Way, 26 miles of mainly off road dandering in the Glens of Antrim on the 19th August this year. We may well will be joined by some of the "AVX Bog Faeries" and perhaps a couple of bods from ni-wild.org this will be a long hard dander for this old grumpy codger and I fully expect to be punctured at the end of it.

So why am I and the rest of the team here cap in hand looking for cash of my friends, colleagues and totaly strangers? Well for the past couple of days the news out of East Africa is getting pretty grim. Only last night I was in tears watching the 10 o'clock news as a child to weak from starvation and dehydration to scream was brought back from the brink by the doctors working the Dadaab refugee camp in Kenya. Built to care for 90,000 it has swollen to 400,000 with 1000 new arrivals everyday each arrival brings chilling tales of horror and anguish like this...

...A mother of six was forced to decide today whether to leave behind her daughter, who is simply too sick to travel, in order to save the rest of her family. Suffering from malnutrition, her daughter wasn't strong enough to continue with their 30-day, 50-mile journey from Somalia into neighboring Kenya. The mother, who was so traumatized that she couldn’t continue describing her ordeal to the doctors or to even give her name, had to leave her child by the side of the road to die where she was left.
 I sit here at my desk, comfortable, warm , well fed and watered and I feel guilty as well I might that I am so well served by my lifestyle. Death does not sit as an un-invited guest at my table each evening I am never faced with making the choice as to which of my family will live and which will die ... I and you gentle reader are lucky, really really lucky!

Eileen, I and our dandering friends will be walking a mere 26 miles, in comfy boots, well supplied with liquids and sandwiches. We will end up in a pub and raise a few glasses to our achievement but that achievement will be as nothing to those now on the road to the refugee camps right now. There are children dying NOW and we can help NOW.

If you know Eileen or myself and would buy us a pint at the bar at a LUG please please please buy us a pint now, buy us 2 or 3 or even 4, whatever you can manage. Visit our Just Giving page and click the DONATE button and give what you can ...

To quote Bob Geldolf  at live aid  "Give us your F***ing Money NOW!" :-)

Thank you for reading this far and thank for giving!

Friday 22 July 2011

A javascript for reconizing a URL in text and linkifying it

On a similar theme to the one below. here is a JS function that will linkify any http:\\ in a text strream for you

String.prototype.linkify = function() 
 {
   var url1 = /(^|&lt;|\s)(www\..+?\..+?)(\s|&gt;|$)/g
   var url2 = /(^|&lt;|\s)(((https?|ftp):\/\/|mailto:).+?)(\s|&gt;|$)/g
   var myresult = myresult.replace(/&/g, '&amp;')
                         .replace(/</g, '&lt;')
                         .replace(/>/g, '&gt;')
                         .replace(url1, '$1<a target="_blank" href="http://$2">$2</a>$3')
                         .replace(url2, '$1<a target="_blank" href="$2">$2</a>$5');
  
   return myresult;
}

A Javascript regexp for getting tags out of a textarea

If you are ever faced with , as I was recently, with a loading a text area with some text that has HTML tags in it and you want to get rid of them for say an abstract and you can't be arsed going back to the server here is a wee Javascript function that will do the job for you.


function fStripTags(a)
{
    b =  a.replace(/<\/?[^>]+>/gi, '')
    return b;
}

Thursday 14 July 2011

A wee problem with FIrefox and Quickr

Came across a problem with Firefox 4 and 5 today. It is a rather esoteric problem but it is a pain in the arse if you get it. I upgraded to FF4 last week and as soon as I did Quickr stopped working. When I went to the quickr home page I got 6 errors logged in Firebug starting with an "unterminated string error". this only seemed to be affecting me, the tech support chappies were all OK with both Firefox 4 and 5.

I started disabling plugins and addons and it was when I disabled the Lotuslive chat extension that the problem went away. Rather than just blame the Lotus Live extension I uninstalled FF and all the add-ons and extensions and installed a clean version 5.0.1 with no add-ons and re-added Firebug, Flashbug and the LotusLive chat extension (in that order) and Quickr continuted to work normally, so I would guess that it was a more complex issue that just the Lotuslive chat extension that caused the problem.

So if you come across Firefox not working for quickr and you get 6 errors starting with an "Unterminated Sting" error I suggest you uninstall FF and then do a clean install and everything should be fine

Wednesday 6 July 2011

WARNING the Domino 852* ID Vault does no play well with 850* client code stream and there is no fix!

This is by way of a warning to anyone who uses ID Vault and has clients on the 850* code stream and is considering moving their domino servers up to the 852 code stream - DON'T DO IT!

Last week we moved one of our production servers up to Domino 852FP2 (300+ mail clients) and the Admin server for the domain started to get very very very slow, bandwidth vanished and everything all over the 20+ servers suddenly got very groggy.

We quickly tracked the problem to ADMIN4.NSF it was 2.4Gb in size and had over 6 million documents in it. 5,996,891 of them where HTTP Password Change requests originating on the server we just upgraded to 8.5.2FP2. A morning of testing showed that any Notes Client attaching to the affected server that was on the 850* code stream was generating an HTTP Password request everytime it started an NRPC session with the server. In some connection senarios 1000's of these requests were appearing a second. These then replicated from the affected server over to the ADMIN server in Ireland where is was actioned, updated the NAB and then replicated the NAB and ADMIN back to the affected server in the Czech Repulic and then out to all the other servers in the domain ... what fun!!!
A road warrior user reported a client directory replications of 26,000+ updates over the space of 12 hours.

We got around this initially by changing the ACL on ADMIN4.NSF and Denying Access to the affected server. This stopped the HTTP Requests appearing in ADMIN4 and allowed the network to return to normal. In the meantime I turned off the SYNC Internet password in the sec policy for that server pushed out the policy and then relaxed the ACL and the HTTP requests disappeared a quick agent run later ADMIN4,nsf had all the rogue records deleted and it had been compacted.
Now the change to "non-syncing the HTTP password", while being outside the strictest interpretation of our security policy was no "real" problem short term as the password change intervals gave us a couple of weeks of grace before this becomes a real problem.

I opened a PMR with IBM and informed them of the situation and the facts of the case. Their response was quick and unexpected- Ok upgrade all your clients to the 851 or 852 code stream ... that is the fix ... can we close the PMR?
WFT? 
Sorry what?
Could you repeat that?
A potential server and domain threatening bug which IBM acknowledge is a problem in code that at both 850* and upwards are within support and there is and will be no fix, just the advice to upgrade all your 850* clients to fix the problem ???

I rechecked the Upgrade Instructions and not a hint, link or suggestion that this could or would be a problem. Needless to say had there been a "If you are running... etc" warning I would NOT have upgraded the fecking server until all the clients were on the 851 code stream or better. There are Tech Notes that mention it at other releases but not the combination we had. Since there were no actual errors as such and the problem was silent when tested on a standalone server in a standalone domain where the rogue HTTP server requests were all created and actioned and resolved quickly and with no replication or heavy user load, this problem went un-noticed.



Now a quick check on the interweb showed that this has been a problem on an off for several 8* releases and it has been addressed previously ... I am asking myself how does the same bug get back into the code stream with such seeming regularity ? The answer to that I will leave you to make your own mind up about .. but I am thinking change control.

So "Upgrade all your clients or roll back the server" were the only options we were given to answer our PMR followed by a request for it to be closed. Well in the situation why the hell ask me if the PMR can be closed?  For me there is still a problem, it is a bug and it has NOT been addressed other than to provide something unexpected, unplanned and unbudgeted upgrades to 200 odd clients before the end of the month. Even so I am assured that the PMR will not result in a fix and that old chum is that!

I made sure that my reluctance to close the PMR was noted and that I thought my expectation of "support" for an active code stream was very markedly different from IBM's I also stressed that it would have been helpful if this problem had been written in a nice large font in the upgrade notes.

IF YOU ARE USING ID-VAULT AND HAVE 850 CLIENTS DO NOT UPGRADE.

would have helped more than the suggested fix.

A colleague had encouraged me to open this PMR and even though my already somewhat jaundiced view of support being offered not only by IBM but other big companies made me reluctant to do so, however the idea that "Well things will never get fixed if you dont report them" convinced me that I should be a good upstanding net-citizen and report the problem.

I did .. and it gives me no satisfaction to report my experience was a factor of annoyance many times worse that even this grumpy 30 year IT industry cynic could have imagined. Will I waste my time reporting an issue the next time we have one, or will I just not bother and find my own way to work around the problem?


Bah Humbug!

Anyway rant aside.. please do be careful if you are planning an ugrade, while this will not crash your servers it does have the effect of ADMINP jobs taking 70+% of the CPUage and your bandwidth will probably drop to 1989 speeds and remember IBM don't mention this in the upgrade notes so it will take you by surprise.

** UPDATE ** I forgot to mention the Replication Conflicts in the NAB if you have HUB and SPOKE servers.. since the NAB is being updated several times a second you get lots and lots of replication conflicts when the remote servers can't keep up


Friday 1 July 2011

How to answer a "Would you like to take part in our customer satisfaction survey?" question

After a frustrating and entirely unsuccessful trawl through a support site of a well known and very large IT company I was presented with a pop up asking me did i want to take part in a survey? ... In Hind sight this was probably a mistake to give me the opportunity to respond, but they did ask and given a nice wee [textarea] for Other comments I add this ...
My visit to your support site was one, and I can say this without fear of contradiction, that filled me with a mixture of raw despair, sphincter tightening anguish and the urgent need to increase my anti depressive medication! I can only imagine that the reason your support site is such a heap of Rhino diahorrea left festering in the raw heat of the Serengeti sun is to allow the employes of ****** to relaxin the warm glow of schadenfreude radiating from the pain this site brings to us, the users.

I have left feedback about the careless nature with which you scatter hundreds of characters willynilly in your URLS. I have waxed long and lyrical about the less than purple nature of your prose in ***** documentation. I have gloried in the princely obfuscation with which you commission even the most simple of Installation Instructions. I have marvelled at the depth with which you can iterate the humble footnote ... but satisfaction? Alsa no! Satisfaction and myself are not loving bedfellows when it comes to the ***** Support site. I would go so far as to say that no longer do we share a bed but we have had expensive counselling followed by an acrimonious divorce and are now happily existing at either end of the universe!

I would love to be able to say "Thank you" but it hardly seems appropriate does it?

Thursday 23 June 2011

Turning off the CLOSE button in a jquery dialog

Here is a wee tip if your jquery and jquery UI elements in your apps. There may be an occasion when you want to use a jquery dialog and turn off the user's ability to close the dialog using ESC or the X in the top left of the dialog.

The easiest way to do this is thus

$("#xlogon").dialog(
{ modal: true,
closeOnEscape: false,
focus: function(event, ui) {
        $(".ui-dialog-titlebar-close").hide()
}});

the closeOnEscape is a supplied method and does what it says it does and the FOCUS event function hides the X in the top right of the dialog.

Friday 27 May 2011

So what have you done in the last 12 months that you are proud of?

I am back from UKLUG and I am now in that period of slight anti-climax that comes before work starts again and normal life kicks me with that 18 hole Dr.Marten steel toe capped boot of reality right in my professional nuts.

Many were the chats at UKLUG and mighty was the craic. Geekness with a heady after note of nerd lay heavy in the air. Mind you that could have been Bill Buchan who was perhaps a tad heavy on the baked beans at breakfast.

Having watched the great and the good do their stuff, having seen the very brave sponsors do their thing and show off their products I am once again enthused and dare I say empowered. The other side of this coin is if I am now enthused and empowered what was I before? Taking a long hard look at my output I am forced to ask myself, what HAVE I done recently that I am actually proud of?

I have circumnavigated the corporate globe trying to pass my enthusiasm for a way of working that while Domino centric basically when all said and done is not so much a method but the simple act of sharing just, when all said and done, sharing and I should NOT have to teach adult people how to share!

I have created several applications that users both love and sometimes despise. I have enacted corporate policies over which I have little control or input but take all of the ire and blame that they generate. I take this flack with some level of professional courtesy most of the time ... but sometimes the toys get lined up alphabetically and some poor sod standing next to my pram gets the whole toy box turfed out onto them in glorious technicolor WITH subtitles AND fully biological accurate diagrams for those poor of understanding.

So whither my new enthusiasm and where to use my empowerment? In a year's time will I be able to create a [UL] list of all those things I am proud of and display them in a glowing neon font here on my blog or will I once again be listening to Mahler and feeling just a tad discomfited that another year has slipped by?

Let's be fair now, I am not all depressed and gloomy about this state of affairs :) I am reflective and a little disappointed in myself and this will probably prove more useful than anything else I picked up at UKLUG.

So given that I have found use in my cogitations on this subject I pose this question to you all - What have you done that you are proud of in the last year?