Showing posts with label Code. Show all posts
Showing posts with label Code. Show all posts

Tuesday, 18 April 2017

What happens if your key developer goes under a bus?

OK, a little morbid I know, but it is a question I am asked on far too regular a basis. "What happens if you leave or get in an accident?" Technically it's called key person risk and is the reason you have teams, good documentation and source code control with non-stop backups. 

Technically I have only left a project twice before I wanted to and before a convenient delivery point. 
  • Large public sector integrated web site, knowledge-base and licensing site. I left 1 month before go-live as the contract renewal negotiations broke down. The site eventually went live 18 months after I left.
  • Geospatial data management system - I left when the scrum master decided they knew more than the architect, about a month before an on target delivery. System still not live 1 year later.

The reality is that you don't survive key person risk easily, it's a huge nightmare and usually puts you back about a year. How to avoid it? Have a happy team that communicates and try not to let too much jealousy creep into negotiations.

Story time:
Once upon a time a large digital consultancy was hired by a multi-billion dollar computer chip manufacturer to create an online game. The brief was that the game should have sufficient difficulty that at the end of 8 weeks a winner could be declared and presented with an expensive gaming laptop. The rules of the game were defined by the sales manager as a flying game where the player had to pass various obstacles, the complexity and difficulty of which were beyond human reaction times until the last few weeks of the game.

The project was delayed through negotiations and when it was eventually agreed it just so happened that the star developer who helped the Sales team was on a vacation, his first in 3 years. The sales team decided to hire an external consultancy that they knew and had used before to undertake the work, they did not engage with the in-house engineering team, preferring to keep all the details in one place.

When the star developer returned he was reserved to undertake due diligence on the progress from the external consultancy (part of the ISO27001 quality assurance the agency had.) He asked for the brief, the backlog, the progress against plan and a login to the code repository. It turned out there were a few missing items, notably:
  • There was no brief (it was verbal and conducted in 'brainstorming' sessions)
  • There was no backlog (The sales team simply reviewed the prototypes)
  • There was no plan (The sales team simply set a deadline)
  • There was no code repository (The developers did everything on their laptops)
There was however a working prototype and a copy of the code from 1 week previously. The prototype would work as long as you did not use the controls, it was an early prototype demonstrating the visuals of the game.

The Star Developer called a meeting with the sales team and expressed his concern, raising warning flags that in his opinion they were unlikely to meet the deadline some 6 weeks away, however the sales team had confidence in the external consultancy as the lead salesman only lived down the road from the consultancy, which was run from a converted Victorian house in his street. The Star Developer asked to be included in the next review at the end of the week and asked that the consultancy be informed that a code review was required.

The end of the week came and the external consultancy had to cancel the meeting due to unforeseen circumstances, the following week came and went with no submissions. The sales team where not worried, the prototype was nearly there weeks ago, and there were 4 weeks to the deadline, it wouldn't take long to test surely?

The in-house testers had not written a test plan as there was no brief, after a 1 week of discovery they estimated 2 weeks to write the scenarios and 4 man weeks to test them.

The Head of development called a crisis meeting, attending were:
  • 2 of the sales team
  • A representative from the external consultancy
  • The Star developer
  • The Lead tester
  • The Head of development
At the crisis meeting the external consultancy relayed a sad story. I turned out that their lead developer had been involved in a road traffic accident, he had been hit by a bus whilst cycling to work.

Not to worry, the Star developer was now available, if the consultancy simply supplied the code completed to date, they would complete the project. The external consultancy explained again that their lead developer had been involved in an accident, he was still in hospital.

The Star developer explained that he would be able to continue the work, all he needed was the code completed to date, the external consultancy explained that their lead developer was travelling to work with his laptop, which was destroyed in the accident. The laptop contained the only complete copy of the code.

The development was brought back in house and an attempt was made to continue from the submitted prototype, it turned out that the game parameters had not been documented or understood; if the user simply shook the mouse long enough then they would win the game. The entirety of the codebase had to be thrown away.

The conclusion of the engagement was that the entire project had to start again, the sales team negotiated that the project was put back 3 months and the competition was completed, the engagement still made a small profit but the client rolled future engagements over due to their standard policy of re-competing suppliers every 2 years.


The lessons learnt are numerous and may well be longer that the story, but it does go to prove that if you say "What happens if the developer goes under a bus?" You may get more than you wished for.

Thursday, 31 January 2013

JQuery Sliders, Galleries and SEO

I've always had a dislike for Flash based galleries and sliders. They are awful for SEO, dire for mobile devices and a pure PITA for normal browsing as you wait for the dreaded rotating icon as they load to show you an image that would have been there in half the time!

Thankfully the death knell for Flash started well over 3 years ago and now with the advent of tablet devices, notably the iPad, we hardly see any at all. In its place we find a plethora of JQuery based galleries and sliders.

JQuery widgets were once the domain of the particularly geeky (says he writing a tech blog!) with the whole case sensitive commands and obscure, code only access that has still meant that the odd Flash Gallery got used occasionally. But easy to use libraries are now emerging; the kind of thing where you can simply put your images on a page, surround them with a <div> and call a single line of code. Hey Presto! a working gallery. To the point where even the defaults are good enough!

I have been playing with a nice JQuery gallery called Galleria. It's reasonably pretty, free (in vanilla form) and has a nice series of options (not free but good value!) that are quite worth while. It's flexible enough that I've tweaked it to be a slider as well without having to re-invent the wheel and uses a reasonable css model that you can override quite easily. Not only that they have gone for all the latest HTML5 and CSS3 trickery so its fast and kept legacy browser compatibility. Oh and it's touch compliant for mobile and tablet use!

If you dig inside the code it's really quite a clever piece of coding, with nice calls you can make after its loaded to play with the functionality and with enough documentation to get you started. I'm glad I didn't have to write it!

Now for the big question, does it have any SEO value? It's a really good question, because it is naturally assumed that JQuery is parsed by the search engine spiders. The problem is that may be true for specific JavaScript tricks and redirects, but it doesn't work for content and it doesn't count towards the ranking of your page or images. What spiders really like is ordinary HTML with ordinary Tags; like <img> or <a> There is a nice article about it Image SEO that describes what gets indexed quite well.

Modern JQuery Galleries have nice solutions to this though. As with Galleria, all you need do is use ordinary image tags on your page <img src="MyHouse.jpg"> and the JQuery will pick them up and reformat the page to make it look like a gallery. This means you can assemble your images as you would for any ordinary page and populate it as you need to for SEO.

As a quick Summary this is what most of the spiders understand. (there is a lot more, but this is the simple version!)

  • <img
    The spider now knows its an image!
  • src="http://www.mysite.com/images/MyHouse.jpg"
    This is where the image is, using a full path makes life easier for the spider (and quicker)
    The usual caveats with friendly urls apply, the easier it is the more (little) marks you get!
  • alt="This is a picture of my house in Devon, it's beautiful in the sunny weather"
    Really important bit! This gives the picture context and allows good indexing and relevance. Don't just use a list of keywords, you get more marks for something that makes sense, remember the spider needs to be quick, so Keep It SimpleS. Look to get a simple sentence structure with context and include small words that won't get indexed (it's the easiest way to check if it's a real sentence)
  • title="My House"
    Apparently this isn't used to rank you result, but does help in the same way that a page title does in ordinary search results to give your image context where they may be hundreds of others.
  • >
    Don't forget to close the tag!
At the time of writing, nothing else counts in the image tag. You may find your JQuery Widget lets you use other tags as well, typically data-description or data-something which are valid HTML but are not indexed, they often control internal linking and order, so are worth doing if you want to take the time.

I will agree with the developers <img> tags with loads of attributes doesn't make for nice code, i.e.: 
<img src='images/WP_000039.jpg' data-title='Dog Washing' title='Dog Washing' data-description='This is actually our own Dalmatian, she doesn&#39;t like the bath so she is excellent practice!' alt='Dog Washing - This is actually our own Dalmatian, she doesn&#39;t like the bath so she is excellent practice!' data-thumb='images/T_WP_000039.jpg'>
JSON is a far nicer way to represent the data. 
{
link: '/seo',
title: 'Dog Washing'
description: '<H2>Dog Washing</H2>
<p>This is actually our own Dalmatian, she doesn&#39;t like the bath so she is excellent practice!<p>',
image: 'images/WP_000039.jpg',
thumb: 'images/T_WP_000039.jpg',
},
But the search engines can't read it, so avoid it, unless you specifically don't want it read by the spider. Which is often the case if it's a slider that just repeats what is further down the page.

If you do it right you will be pleasantly surprised at how fast your images appear in Google, Bing et-al. 

I've been pestering my wife to sort out her Dog Grooming Business, eventually I gave up and did a totally vanilla site and within a week the images in her little gallery started appearing in obscure Dog Grooming Searches, that's brownie points worth earning!