Saturday 23 November 2013

Royal Mail madness

Disclaimer: Although this blog has come about because something didn't go according to plan there are some good points that I thought should be mentioned too!

Scenario
I had some important documents that had to reach their destination asap, the value of the contents wasn't all that much it was just paper after all, but what was important was that the documents should reach the destination in time to secure a mortgage so to me pretty important.

Realising the importance of such a delivery I decided to spend a staggering £6.22 to get the letter where it needed to be, sadly due to other things that were happening on the Saturday I missed the last outbound delivery but was assured that the letter would be sent out first thing on Monday so was guaranteed to arrive by 1pm Tuesday this was good enough so I went for it, like I said spending £6.22 to post a single letter is quite a lot but it does guarantee arrival by 1pm Tuesday.

Pit fall number 1!
All through Tuesday I kept checking the Royal Mail tracking system, this was a very simple webpage, the sort that I tend to knock up in less than an hour, I am not joking a single text box and response to a query doesn't take a genius.  Anyway the tracking system just told me the letter had been posted on 5/10 which is something I already knew because I was there at the time :)

As you can imagine the letter didn't arrive when it was guaranteed to, otherwise I'd not be writing this blog.  Luckily I was able to make alternative arrangements, but that didn't stop the fact that I'd been totally let down by what I considered to be quite an expensive service.

At lunchtime on the Wednesday the day after the letter was supposed to arrive I went to a post office, just to note this was a different post office from the one that I posted the letter at since I don't work where I live and I asked the simple question about what do I do next?  The ill informed clerk informed me that there was nothing that she could do and that I'd have to go back to the post office where I posted the letter to get a refund!  What!!  So let me get this right if I post a letter whilst on holiday in Scotland and it didn't arrive I'd still have to travel back to the exact branch I posted it at to get a refund for a service I'd paid for but not received, seriously was this clerk not listening to the words coming out of her mouth!

Ignoring the lady to whom I shall refer to as dimwit I decided to call the Royal Mail help number which is prominent on their contact us page.  The man on the other end of the phone was exactly what I wanted, calm competent and reassuring, even though he wasn't telling me what I wanted to hear in my book that's a good phone support guy!  The reason he wasn't telling me what I wanted to hear was that he was saying although the letter will be late, as it hasn't arrived yet they can't give a refund.  As processes go this is already stupid, I would assume the best way to keep customers happy is to be proactive when things go wrong.

It gets better/funnier
When I eventually found the information about refunds for guaranteed delivery the text is;
A refund of your Royal Mail Special Delivery Guaranteed™ fee/postage if your item arrives later than the due time of delivery. Claims must be submitted within 14 days of posting.

For Royal Mail Special Delivery Guaranteed by 1pm™, additional compensation of £5 if the item is delivered more than 24 hours (Mon-Fri) after the guaranteed time. Or an additional £10 if delivered 7 or more working days (Mon-Fri) after the guaranteed time. Evidence of posting is required. If the sender is claiming they must apply within 3 months of posting. If the recipient is claiming they must apply within 1 month of receipt.

Consequential Loss for up to £10,000 is available to purchase at the time of posting at an additional cost. Evidence of Consequential Loss purchase is required. Claims must be submitted within 14 days of posting.


So let's start to examine this policy in a bit more detail, in my case the letter hasn't yet arrived so I can't yet claim for a late arrival, however if the item arrives more than 14 days after I post it then the first line excludes me from claiming a refund.  This means that if the mail is extreemly late Royal Mail get out of providing a refund, so by being more terrible than you think they'll be they get out of refunding!  Sounds crazy but you could read it like that!  
Luckily I think this interpretation of the policy is incorrect and a claim can still be made after this time period although I am not sure if the fact that I called as soon as the letter was late i.e. 24 hours late or 3 days after posting counts as starting a claim.

It arrived woohoo
At this point I assumed that the letter had been lost so was amazed when I received a letter in the post that contained the original copies of the documents I'd sent to arrange the mortgage on 23/10, which means I'd probably have been better off posting the letter by standard first class post!

The very next day I made yet another call to the Royal Mail and once again I spoke to a very nice lady who sympathised and was shocked that the delivery had arrived so late, it had arrived on 22/10 some 14 days late, 17 days after posting.  The lady on the phone said that I could start a claim by going to the post office and filling out a p58 claim form but that would mean sending proof of postage e.t.c. and that it'd be easier to submit an online P58 claim.  So I did the online claim and was given a nice little email that said:

"Your claim has been submitted and will be allocated to one of our claims handlers within the next 24 hours.

 Your reference number is P58_cXXXXXXXXX

We're sorry you've had to report the loss, damage or delay of a letter or parcel. Our claims department will review the information you've provided and start making the necessary enquiries.

 if you're claiming for the contents of a letter or parcel that's been lost or damaged whilst in our care we would kindly ask you to print this page, attach your supporting evidence and send it to the relevant freepost (no stamp required) address below:
"


So my claim will be submitted to a handler within 24 hours, and the information provided will be reviewed.  I only need to send further proof if claiming for the contents of a lost or damaged parcel, excellent so I should expect to hear something very quickly since it's pretty obvious that my letter is delayed and the standard £6.22 plus £10 compensation is due.

I waited and waited
Much to my surprise actually it's no longer a surprise,  I hear nothing from Royal Mail so once again I call the support centre, once again I speak to a very kindly and courteous support person.  However she tells me that the reference number I have from the online claim form can't be queried on her system.  Then when the claim information is located by using my postcode the lady tells me that I need to send proof of postage in and that if I'd just made the claim over the phone I wouldn't have needed to send any details in.  For a start this information is now (a) in direct contradiction to the information given earlier and (b) complete nonsense.  The reason that it's complete nonsense is that the proof of postage is the postage ID, that ID ties in the postage to the delivery and even the digital signature at the other end, the only information that the postage receipt could possibly provide is the number that's used on the track&trace system.  I asked this person how I could make an official complaint, not against her, but to let the people in charge of writing the policy that they can't have run any story-boarding or use case analysis for this particular case and it needs to be reviewed.  She very helpfully gave me an email address royalmail@royalmail.com

So I wrote an official complaint

I spent even more of my own time, and I don't have much spare time, writing a complaint.  I made sure the language was calm and devoid of emotion as getting angry never solves anything in these circumstances.  The email contained references to everything that would help the policy makers in charge to make the policy better.
I sent the email and...
Alomst instantly received a bounceback informing me that the email address didn't exist, I tried royalmail@royalmail.co.uk in case the lady had made a simple mistake, although I did ask twice as I was writing everything down as I always do when talking to any support department, I really should invest in some recording equipment to save time!

So How do I email Royal Mail!
I went to look on the website:


  1. The online contact us form asks for a reference number when you've contacted the support by phone, although I'd contacted Royal Mail 3 times previously I'd not once been given a reference number.  In fact the only reference number I had been given (save for the initial postage ID) was the online claim number that apparently couldn't be used to query for my case!
  1. The contact us contains no email address, none and hunting the site was a miserable experience.  I write online applications and I am pretty sure that if the flow for my sites were as misleading and frustrating as the Royal Mail site I am likely to get the sack, it's not that it really bad, just that it's bad enough to be frustrating to the user which is enough to lose sales!
I did find a few email addresses that pointed to [places that I'll put on when I check my other laptop]

Then it struck me, I wonder if they have a twitter account and if anyone reads it, surely if I said something to cast them in a bad light someone might listen.  So I tweeted [actual tweet in here] to my utmost surprise I received a barrage of tweets and emails from [list people, show tweets and emails] which might be the same person and the delayed postage claim was resolved, apparently since the cheques in the post.

So a staggering 43 days after posting the letter I am close to getting the issue resolved, is this good enough?  In short no and I will be happy to pay more from a different provider if they can give me more of a guarantee, a proactive refund policy and better trained staff.  A note on proactive refunds the computer tracking system tracks everything so it will already know a delivery is late, the postage originally had my home address so there's no reason an automatic refund couldn't have been applied which would have saved me plenty of time and the loss of faith in the mail system!

I am still waiting

I am still waiting for the cheque to arrive before I give my absolute final conclusion but my experience so far with Royal Mail has been that the telephone support are nice yet not well trained and the people in charge of making the policies simply aren't demonstrating due diligence when it comes to designing and implementing processes.  One thing I can see from this is that the government surely hasn't undervalued the company when floating it because it too badly run to compete as soon as private enterprise sink their teeth into letter delivery...yet to happen!

The cheque has arrived almost 2 months after posting, well done Royal Mail!

Saturday 2 November 2013

OMG, they don't understand money!

The argument

I had an argument today that someone couldn't change to use direct debit instead they'd rather bitch about the payment handling cost of their bill.

Ok, let's forget for the time being that they could if they wanted set up a quarterly direct debit rather than a monthly one and see what their argument is for not having a monthly DD.

It goes like this;
At the end of each month say I only have just enough to cover the direct debits then I am not able to put much aside for one off payments like the car going wrong. If I pay quarterly then at the end of each month I can put something aside so that I have some money in an emergency! My argument is that if you're still paying the same amount for the services you have then regardless of whether you pay in 3-month chunks or single month chunks you are still spending the same amount so would be able to put the same amount aside.

I genuinly had to check my logic in a spreadsheet since the people that were telling me this pony I normally respect their opinion but this time it's just bubkiss and prooven bubkis at that!.

The reason this came about was a phone bill, the processing fee for non-direct debits was £6, a lot but they do offer a way of not paying it, I think they also add a further money off incentive when using monthly direct debit too, so let's do some maths on it.

Ok so hypothetically lets assume our person takes home £40 a month and each month the bill would be £10. These numbers are totally made up and are just to show the point, you can replace them with whatever numbers take your fancy and still end up at the same conclusion. For using a monthly direct debit the company offer £1 off that months bill, however opting for a payment method other than direct debit you're charge £6 for each payment as a processing charge, totally scandalous given the actual cost to the company but that is also an irrelevant detail to this argument.

description amount
bill £10
DD discount -£1
total £9
So this is the payment structure each month, therefore over the quarter it's going to cost £27 and over a year that cost will be £108. With a monthly income of £40 this means they'll be able to save £31 a month, that's £93 per quarter and £372 per year. So lets look at the quarterly billing.
description amount
bill £30
added payment processing £6
total £36
So this time over the quarter it costs £36 and over the year it costs £144. With a monthly income of £40 this means that they'll see their savings creep up to a whopping £120 each quarter before seeing it slashed to £84, and I think this is where the false sense of it being a better deal creep in because your bank balance will look much healthier for a fleeting minute but that money is really already spoken for. So each quarter they'd save just £84 and each years that only £336.

You don't have to be a genuis to pull this one apart, I think there is a false belief that you somehow have more money when you see it in your account and decide to ignore the fact that the money is really already spoken for.

The argument went that you have money available to pay for incidental expenses like car repairs e.t.c. so let's examine that hypothesis. That incidental money has to come from somewhere so you have to have some savings, the idea is that paying quarterly means you can put more aside each month, and yes the cash sum will be greater, but remember this money is always already spoken for, so unless you're entering into the realms that you decide not to pay a quarterly bill at some point when it's due because the money is already spent this argument really doesn't hold water, see the figures above. For example a car repair comes in right before a quarterly bill needs to be paid, if you've been paying by DD and making the savings listed then you have £93 saved up, let's assume the repair is £93 so you now have no savings left, boohoo. Let's make the same deductions from the quarterly payment, so you currently have £120 in the bank so paying the £93 for the car leaves us with £27 phew so we still have money in the bank when the phone bill lands on the mat, and that bill comes to ... £36 erm, we don't have enough to pay that bill!!!!!!!! This is the goddamn point I am trying to make you're worse off by deluding yourself about quarterly payments

Second part of argument

The £6 handling fee of non-direct debit payments, yes I don't think any company can really justify a figure this high, but they do charge it and my argument was the fewer customers that use this method the more expensive it becomes per customer. This seemed logical but was once again argued!

Hypothetically let's say it costs the company X amount to process non-direct debit payments for Y numbers of customers. The company are in the business of making money so take what it costs them to process these payments and shares it across all those customers that are using this service. So the cost per customer is X / Y. Therefore as the value for Y tends towards 1 the cost per customer tends towards X, meaning that fewer customers means each one will need to pay more, this I saw as a simple equation but apparently it doesn't matter how many people the cost is spread across it's still wrong!!! Give me strength.

Final Straw

This was the clincher that finally told me that the grasp of money simply wasn't there and is so laughable that I won't even go into detail about it. I said when you pay into your pension from your savings rather than as part of PAYE doesn't that mean you're taxed twice, once as you receive your wages then again when you draw the pension you'll get taxed as income? Only to be told it doesn't matter I'll get taxed it's all the same!No, NO it really isn't the same making a payment to a pension pre-tax means you're only fucking well taxed once so NO it's not the fucking same you financial wizard you I despair I really do, how can anyone in this day and age think this way, it's driven me to tears!

Tuesday 3 September 2013

Dragon's Den Idea

The Idea

Almost ready meals;  The plan is to bundle together ingredients for single meals with all the preparation taken out of it but not actually cooked so not a complete ready meal that you just put in the oven but almost.  For example a baked potato with cheese or tuna could simply be a potato and the other ingredients in a single packet.

Some of the profit could be donated to the students union and the workforce could be mostly made of students earning some cash whilst studying.

By doing things this way it'd give students a feeling of independence plus it could be a good way of getting healthy meals to them.  As a bonus students tend to think themselves are above the likes of ready meals so this should appeal to them.

As an added incentive the way in which the meals are sold could mean that parents could buy vouchers or have an online account for non-transferable vouchers for food, this would be better than sending money since they could guarantee that the kids didn't spend the money on drink or drugs!!


If the line takes off then the line could easily be extended to "easy home pub grub" ... well you get the idea.

Friday 30 August 2013

Quick thought on business

What are they for?

The simple fact of the matter is that a business is in the business of making money.  Ok so they're in the process of providing a product or service or whatever to their customer base, but when you come down to it they're existence is in order to make money that can be paid to the owners be they sole or shareholders.

Key to success

When a company has a product or service or whatever and they wish to increase their profitability there are essentially 3 things that they can do
  1. Increase the price it's sold for.
  2. decrease the cost of producing it.
  3. increase the number of 'it's that are sold
This is essentially a simplistic view on the equation that business owners are constantly trying to keep in check.

Where do I fit it?

In order to increase the number of items sold, salesmen (people sorry, don't mean to be sexist here) are hired.  There is an obvious connection between a salesman and the revenue coming in.  For this reason salesmen are remunerated handsomely.  To increase the price something is sold for is a bit of a tricky one since it is governed mostly by the customer base push it too high and people will buy a cheaper alternative, unless your company is apple of course.  Push it too low and you could end up with each item sold costing the company more money to produce than it's sold for.
Now here's the bit where I and most other people fit, the reduce the amount it costs to produce the item.  Here's another equilibrium or balancing act you want the best person for the job within a certain price bracket.  Pay too much and the added expense is obvious, pay too little and quite often the quality drops and with it the number of sales and this is a difficult downward spiral to pull out of.

What I don't understand 

the majority of staff other than salesmen are seen more of an expense than a source of revenue, yet without everyone doing their part there is no product or service to sell so no matter how good your salesmen are you still won't turn a profit.  So it's a rather short sighted view to treat the fabulous salesmen like royalty at the expense of anyone else, unfair bonuses for example are crazy.  I produce software and there's no way to know that a customer bought the application because of the fancy salesman or because of the clever feature that I wrote so at the end of the day the wrong person gets the gratitude, kudos and pay rise.  If nothing has changed between versions of the software and yet the salesmen sell it then yes that's their result, but if a lot of people put hard work into making it new and improved there really is little credit the salesmen can or rather should take and yet all too often the lowly workers are missed :( It makes me sad when I hear about the short sightedness of some CEO's luckily I don't work for a company like that.

Sunday 28 July 2013

40 miles

The South Downs PLOD

OK, so I've just completed the South Downs PLOD, before I started most people who I Asked for donations were unimpressed as "it's only a walk" and to be honest I approached it thinking much the same thing. Now I've done it I think I'd be likely to punch anyone who said it's just a walk.

I think one thing I overlooked was that unlike running I'd be relying on a different set of muscles, I'd be carrying kit that would add to my weight and because of the length of time it takes to get anywhere there wouldn't be much time for sitting around or indeed any places to sit either because if you sit on the floor it's very difficult to get up.

Some people would say "it's not like you're running" and the silly thing is that I'd prefer it if I did run. There was a stage probably around 20-25 miles in where my feet and tendons at a point just behind my knees were screaming in agony and for a laugh I ran up a steep slope, to my amazement this actually made my legs feel better than they had done. Later on in fact between the last and last but one checkpoint I used this trick up some very steep slopes between the seven sisters and remarkably I was able to get to the tops and catch my breath within a matter of seconds so for me running would be much easier than walking, or at least part and part.

One thing I would say is that staying awake for 35 hours or so, some team members were approaching 42 hours without sleep and walking for 16+ hours really does bring out communal team spirit. Not only did I have a smashing team giving each other support along the way but also a wonderful support team who greeted us at every checkpoint witha well stocked tuck shop in the back of his car and words of support, as well as some support that weren't part of the team but gave us all that little boost we needed when we needed it most with cheers and smiles.

Walking through the night was wonderful, even when we missed a turning and walked a mile or so further than we needed to.

It was a shame to see a number of teams take shortcuts, the most annoying was seeing a team a good 10 minutes behind us suddenly appear in front as they'd taken a shortcut into Alfriston :( still we maintained our integrity by not cheating when we could have done.

I must admit that I actually started to enjoy the very last bit and think I'd have liked to run the last 2 or 3 checkpoints. However after running a few hiills I suddenly realised I was becoming the jerk that abandons his team for personal glory, this is not who I want to be so hung back to join the others. I am glad I did too as one of the team was in desperate need of water and I had some spare that I was more than happy to give up, see that's what winning is not crossing the line first but crossing it together!! A lesson well learned.

Would I do this again...probably not, or at least not for a long time. I think there is a very different style and fitness required for walking rather than running so until I stop training for running events I don't think I'll do any further walking ones.

One further thing to say was that the organisers were smashing, I regret that I had to leave before being able to use my £6 luncheon voucher at the pub but never mind the team managed to collect over £1500 in donations so well done to us all.

Tuesday 14 May 2013

Gradle Review

Gradle

Gradle is a build tool, I personally use it to build some old java projects but it can do other things.

I've given it a chance now so feel I can blog about it.

I like, no I love the idea of Gradle, however the implementation isn't good enough :(

It's not that it lacks features, quite the opposite there are so many that the basic set have been neglected in favour of the more fun stuff.

Essentially there needs to be another layer to add simplicity, you need to know too much about the internal workings of the system for it to be all that useful to build systems that already exist.

It probably works well on basic systems, and if starting a new system you can adhere to all the rules it'd probably rock, but for making existing builds better it becomes an uphill struggle where the benefits are sadly overshadowed by the difficulties in getting there.

If there was more IDE support then it would probably be far easier and I would be writing a totally different blog but until it is my opinion stands.

Specifics on whats wrong

I have a legacy system that I am trying to move away from using Ant, as is always the case the build has become incredibly over-complex which means an incredibly verbose xml build file and many workarounds for the immutable nature of ant.

like the idea of being able to use actual proper code in the build when some conditional stuff is required, ant wholey fails on this count by forcing you to make custom tasks e.t.c. for very obscure conditions rather than allowing quick in line code.

I create a set of jar files from a particular project, I am using the 'java' plugin which gives me some handy stuff, but goes too far!!  It gives me a default jar of all of my code which I don't want and using what seems obvious to switch it off 'jar.enabled =false' seems to have no affect.  The suggested alternative was
configurations.runtime.with{
  artifacts.remove artifacts.find { it.archiveTask.is jar }
}
YUK! this is forcing me to know about the internal workings of the thing I want to use, which is wrong.  I don't want to spend ages learning about a damn build tool I just want my source to go in one end of a black box and have my compiled jars pop out the other end.  I mean I use my car and tv to perform the tasks I want adequately yet I don't need to know what's going on inside in order to do so.  To me this is where the design of the api starts to fall down.

I used another plugin 'ear' which helpfully created a packaged ear file, I needed an exploded one but there seems to be no simple way to stop the ear being zipped up, yes I could add a doLast() to unzip the ear but come on seriously why would I waste time zipping to begin with!

UP-TO-DATE
The idea of an up to date check sounded like the best thing ever, you have a task tell it what the inputs will be, what the outputs will be and when there has been a change the task is run, yet if the system hasn't changed the task isn't run thus saving tons of unneeded build work.


Yes it does sound like a good idea but it simply doesn't work.  I currently have a jar that is part of an ivy repository that is downloaded and unzipped.  Therefore the task to do this has the zip as an input and the output dir as an output.  This task never runs as it is ALWAYS up-to-date, I've created the output dir and put stuff in it, I've altered the source zip, I've even added an upToDateWhen closure and this is never triggered Gradle simply responds that the task is up-to-date.

More overengineering

Another thing that simply wound me up about Gradle but I was prepared to deal with on the assumption that the rest of the sales rhetoric was at least vaguely truthful was the dependency mechanism.  There are already tried and tested dependency mechanisms, my project used to use Ivy so why can't Gradle just use Ivy?  As far as I have discovered there is No benefit of gradle dependecy management over ivy!

Conclusion

I really like the idea of Gradle and when I went through the typical hello, world tutorials it all seemed nice.  It's only when you want to deviate from the path of what the originator of Gradle deemed to be the route to take that you realise just how hard it is to use.

There is a lot of documentation, there is a host of helpful people (and unhelpful) that are willing to offer assistance.  This is all brilliant and I commend those that are involved with it.  This article does sound like a bit of a downer on Gradle which I don't want it to be because I believe it'll be fantastic one day, however it isn't yet and it would appear that more features are being added rather than sorting out the current failings which could end up turning Gradle into unmanageable bloatware like so many tools (maven) that have come before it.

For me the ideal build tool would be nothing like what has gone before, no fancy convention over configuration none of that just a set of libraries for dealing with typical build-like tasks (file copying, dependency resolution, compilation...) and let whomever needs the build use it however they want rather than attempt to steer them in what I believe to be the right direction because with legacy there is no standard way these things have been done and the time to convert them cannot be justified, it's just a build tool!

Friday 10 May 2013

Random Thoughts on deadlines


I've worked in several places where deadlines are tight, who hasn't. Management can help, but they can also hinder so I thought I'd sketch out my ideas of what helps the most and what destroys any chance you may have had in producing a deliverable.

A quick word on methodologies, Agile is great it is fantastic to never lose sight of the actual goal and having weekly sprints whereby a result is actually seen by the major project stakeholder is ideal...however there is a tendency for management types to see a product with the bits they liked that week and can't make the intuitive leap that although those features work the product as a whole is incomplete and so it gets sold.

Also there does have to be buy-in from the ground level all the way up when going agile, if the guys up top are still requesting requirement documentation and things they've missed the point and many of the benefits of agile will be lost.

So back to the issue of deadlines, number 1 is where the deadlines come from, if it's a sale date then how was it decided. More than likely it has been decided by a salesman whom has no clear knowledge of what the solution entails let alone how much work is involved or the resources that will be available, with so many unknowns it's no wonder that the deadlines are incredibly unrealistic.

A clever manager when faced with a, lets say it, stupid deadline, will gather his troops garner opinion from the experienced developers that will after all be sweating buckets to meet the deadline, then and only then will they be able to judge the loading of the team members and produce a realistic, yet usually very tight deadline. If an adjusted deadline from someone with more knowledge is ignored you can pretty safely say it won't be met. Not only will the deadline not be met but because of it's unrealistic nature the psychology of the developers will reach a point of "it's not possible so why bother" this causes projects to actually go slower than if the deadline had been set more reasonably to begin with.

The Carrot or the stick.

Software developers are a lucky breed in that their skills are 100% transferable this means when pissed off they simply jump ship. Too much pressure they jump, not enough money they jump, no respect they jump and bored they jump. Keep the good guys happy and a good supportive team is created. If developers want to do well then they will, if they feel forced or coerced into doing something they feel less inclined to do they won't do well and once again are likely to jump ship.

The same goes for managers to be honest, barking orders makes developers dig their heels in, yet if a developer doesn't want to let the manager down they work harder, this level of respect isn't automatic nor is it bought with bonuses it is developed over time and yes it takes work. Shouting or berating the very people that are doing the actual work is never going to work, trying to pile on more pressure is also never going to work. "what you mean the developers won't work harder for this crust of bread!" it is sad that even to this day there is a falsehood touted that people work harder when they feel their jobs are under threat, that just makes them dislike the job and guess what they leave!

Now the carrot, I've seen bonuses work in the past, usually bonuses on a sliding scale make the damn near impossible to reach deadline have a high bonus then give a far smaller one for meeting the previously thought of unattainable one. Lets face it salesmen get bonuses for landing big sales that sometimes are a result of them enjoying a visit to the pub with the right people. I am not saying sales isn't hard and that the tough ones should be rewarded but they all agree some accounts are easier than others, to the point of not being work at all.

Now the reason that neither of these should be used anyway is that once the stick is used developers bugger off and once the carrot is used too often developers come to expect it and when they don't get it they bugger off! Plus there is of course the product and the customer to think about. At the end of the day the only way an unrealistic deadline is going to be met is if corners are cut. The first thing to go will be the documentation, then the level of testing then the standard of features, then the number of features until eventually a pile of crap the customers didn't want is given to them they complain and either the whole lot needs to be re-worked thus taking us to a point beyond an original realistic estimate or the customer throws toys from pram refuses to pay and maybe sues. This is scary but true.

Estimates

It all starts to go wrong from the moment an uninformed guesstimate of a deadline is given and the recipient believes it.

So how are the estimates made and how can they be so wrong?

It's all to do with the number of unknowns, or variables when estimating, the simpler the item being created the fewer variables and hence the more accurate the estimate can be. Most large sales have countless variables, not only that but they also have unexplored avenues. What I mean by this is that if nothing similar has been created by the team there will be a certain amount of trial and error with their solutions this is perfectly valid and by taking the software through this sort of evolution means that the best solution should be arrived at. The trouble is you don't know that one avenue of development is necessarily better than another for your particular problem given that you've never seen anything similar and the number of avenues can almost exponentially increase the number of unknowns of development.

To explain lets take a chess game as an example, the solution we seek is to checkmate the opponent we start with 20 possible moves at the beginning, that's 2 for every pawn and 2 for each knight. Depending on which move or avenue we investigate next determines the number of possibilities we have next and at this point we're not sure that the one we take is going to help us reach our goal we take an educated guess but we may well need to backtrack to this point before a solution is achieved.

Thursday 18 April 2013

Laptop wishlist

I want to replace my laptop as it's getting a bit long in the tooth so I've been looking at the specs for these things. I find it hard to believe that most laptops are sold with a naff resolution 1366x768, seriously!! This is the same resolution as my budget lappy bought in 2008 so why haven't things moved on? Asus seem to be the only company making 1080p standard, and you can stop pretending that 900p is full hd, you know who you are (Sony).

I seriously considered apple since they have a nice screen and keyboard...however, I kid you not a similar spec machine all apart from the screen res costs around £1500 let me say that again £1500 and that's pounds sterling not dollars, more for apple, for that money I want a diamond coated screen made from crystalised unicorn tears sheeesh how do you justify that markup? Still I guess some people have more money than sense since this basically says they value a screen at £1500 I wonder how many pounds per pixel that is?

Backlit keyboards!?!? Why FFS are they not standard? OK this is something that Sony do get right, in fact I am not going to be too harsh on Sony since although they lie about full hd the laptops do look nice and are only slightly more expensive than laptops that don't have backlit keyboards. Whilst on the subject, why does the UK seem to get the crappier models of laptops? There is a host of ASUS N56 that do have backlit keyboards yet none are available in the UK, unless that is your writing a review for the company in which case the better models are supplied.

Sooooo many lappies have spinning rust drives? What's the point, especially what's the point with all these 5400rpm drives, if it's power that's the concern then kit it out with an SSD they're really not that expensive anymore.

Another thing, for gods sake why oh why is windows 8 shipping with non-touchscreen laptops, it's a bugger to use unless your touching the screen which is after all what it's designed around.

This ones a kille too, why does every 15.6" laptop have a numeric keypad? It makes the touch pad off-centre (that's off center if your American) and simply gets in the way, my old Acer has one and I assumed it was a gimmick of a cheap brand but it isn't. So for the sake of a few number buttons that I use very infrequently I have to put up with getting rsi and a bent spine!

Do laptop manufacturers ever actually ask the public what features they like, because there are plenty of people that feel the same as I do.

So basically what I want is a 15.6" laptop that has an optical drive, 1080p screen, plenty of processing power i7 (although i5 would probably fit the bill), plenty of ram since I do like VMs ~12-16Gb, a backlit keyboard that doesn't have a naff numeric keypad with a 250Gb+ SSD, at least 1 usb3 port all in a case that doesn't flex when you pick it up by a corner and not costing more than about £800.

Friday 8 March 2013

Is sexism dead? Not quite but it's not all bad

today is international womens day, some women will get time off work, gifts e.t.c. Why?  When is international mans day?

Fighting for equality means fighting for men and women to be treated the same, yes women have had it hard in the past but this doesn't mean that the scales should be tipped in their favour it should be balanced.



Looked at the international womens day thing

It starts badly
Today's Google Doodle is a montage of chubby female cartoon faces of all ethnicities”
a)      They’re not chubby
b)      Why would that be the first thing you’d notice

“”Only 17% of the UK tech workforce is female”
Which is not 100% related to sexism there are strong physiological reasons why men suit logical/technical roles and women suit care roles.  In fact I saw a piece on “embarrassing bodies” of all things whereby women could tell facial expressions more than men but men could perform logical tasks better.

I am just mildly upset that lack of equality is being promoted in its name and lack of thought is being applied to the articles.  I want equality, women should be paid the same for the same job, however there is also a class issue too.  What I mean is people from rich families are unfairly remunerated it happens yet there is no international poor persons day, I get paid less than other people who perform the same job, we should be equal but we're not.

Sunday 10 February 2013

Burrows-Wheeler transform (BWT)

 Burrows Wheeler Transform

I would ordinarily explain what the BWT is but to be honest I wouldn't be able to put it into better words than the article on wikipaedia so I am not going to try. So what then is this blog post about? Well simply I am reacquainting myself with Groovy after a long time of not doing any and decided to see what a simple (and I mean really simple) implementation would look like.

One of the major differences as far as I can see is that I've not included an EOF indicator/marker in the resultant string, instead I've indicated the row that the original data will exist on once the data is reconstituted from the encoded data.

First of all take the test string and rotate it storing each rotation:
def list = [args[0]]
(1..<args[0].size()).each { list.add( args[0][it..-1] + args[0][0..it-1] ) }


Saving this in a file called BurrowsWheeler.groovy typing this on the command line
groovy BurrowsWheeler.groovy "this is a test"
produces...absolutley nothing, however if we add list.each { println it } it all becomes far clearer with;

this is a test
his is a testt
is is a testth
s is a testthi
is a testthis
is a testthis
s a testthis i
a testthis is
a testthis is
testthis is a
testthis is a
estthis is a t
stthis is a te
tthis is a tes

The next thing the algorithm needs is to have these rows sorted, well that's simple try list.sort() and since we only have a bunch of text the default Comparator is fine, so that's stage two complete, add a  list.each { println it } to be sure.  A note on this simply printing the list will show everything that's in it, however it looks better when displayed using this closure method.


a testthis is
is a testthis
testthis is a
a testthis is
estthis is a t
his is a testt
is a testthis
is is a testth
s a testthis i
s is a testthi
stthis is a te
testthis is a
this is a test
tthis is a tes



So now on to the final stage of the compression, get the last column and the row number that the original data exists on.

def lastline = ""
def num
(0..<list[0].size()).each { lastline += list[it][-1]; (list[it]==args[0]) ? num = it : num }


I am sure there is  a simpler way to do this , just as I was sure that I could skip the sort stage by having a SortedList that would ensure the contents were sorted as items were added, but I lost patience looking for it :) 

Add a quick println "last column: ${lastline}, match num: ${num}" and we get;
last column: ssa tt hiie ts, match num: 12

As you can plainly see no compression has yet taken place, in fact by adding the row number we've increased the amount of data we're storing.  The point in the BWT is that we've now stacked far more of the duplicated characters together and can therefore use some run length encoding to compress it.


Uncompress / Reconstitute data

What good is making this data if we can't get back the original data, well it's as simple as taking the process in reverse.  So starting with the string  ssa tt hiie ts and row number 12.

def lastline =  ssa tt hiie ts
def anotherlist = []
(0..<lastline.size()).each {
   (0..
< lastline.size()).each { anotherlist[it] = lastline[it] + (anotherlist[it]?:'') }
   anotherlist.sort()
}


Printing this out gives;
0      a testthis is
1      is a testthis
2      testthis is a
3     a testthis is
4     estthis is a t
5     his is a testt
6     is a testthis
7     is is a testth
8     s a testthis i
9     s is a testthi
10    stthis is a te
11    testthis is a
12    this is a test
13    tthis is a tes


And sure enough our original data is right there on row 12.  This is by no means meant to be an industrial bwt it's simply just an example of educational groovy, hope you enjoy it.

Friday 25 January 2013

Databases deserve a bit of respect

I've recently had the pleasure of being on a database administration course in Euston held at Learning tree, which by the way is still my favoured course provider since the quality of the presenters seems pretty high.

Anyway, the reason that I felt I had to make this post is that as a developer I always think about the code, what objects represent what aspects of the domain I am solving a problem for. I think about system performance, ease of maintenance, how readable the code is e.t.c. however since I almost always use an object relational framework of some kind not only am I mostly shielded from the way in which queries are constructed but I am almost totally separated from the actual fundamentals of the database itself.

One thing that a lot of care used to be given to was the design of a database, but now with very fast machines hard drives and all that stuff we can pretty much get away with slapping a load of tables together and let the database server handle it, and for the most part it does this very well and only in fringe cases does it require special attention but I think we/I should get back to basics from time to time and realise that the database behaves ok but could be spectacular thus relieving the rest of the system from quite so many performance enhancements that are there because unbeknown to me the database is underperforming.

The DBA on the course let slip a very simple sentence that interested me "when doing bulk imports in MSSQL Server you can greatly improve performance by switching to bulk_logging." This whole area spawn thoughts about the difference between log files and datafiles and how indexes are created and used and what the difference between an extent and a page is and how fragmentation can occur and be fixed. All these things are simple common sense to someone versed in databases but other than for academic purposes I've never had to look deeper than the surface, so think no is about time I did before I forget it all.

I have a dream, that one day all developers and database administrators will be treated equally.
 
Stack Overflow profile for Richard Johnson at Stack Overflow, Q&A for professional and enthusiast programmers