Software

Archived Posts from this Category

LATEST_PROGRAMMING_TOOL_OR PRACTICE is dead

Posted by Yannis Lionis on 10 May 2014 | Tagged as: Software

Let me set this out from the beginning: I think it is a formidable strength for any industry or craft to constantly challenge perceived wisdom, and not be afraid to tear down any taboos.

Now let me tell you a story.

Several years ago, there was a book written by some influential people in the world of software design about OO programming design patterns. It included many of them, with explanation of why they’re the appropriate solution for certain problems and examples to go with it. One of them was the Singleton pattern.

Years later, it started to get highlighted as an anti-pattern instead, again by several influential people (Steve Yegge’s post on it is funny and insightful as always). Even more examples of inappropriate uses were quoted, with many people going as far as declaring it has no valid uses whatsoever. Singleton pattern is dead.

Is it really so? Is it possible that the clever, experienced and influential software craftsmen that came up with it in the first place were so wrong that the pattern has absolutely no valid uses? That we were all so deluded by their beautiful rhetoric and used it in a multitude of situations, none of which were valid? That they were simply 100% wrong, but with the benefit of hindsight they’re 100% right now?

I’m finding it hard to believe that. I’m finding it much easier to believe that a lot of misuse of that design pattern emerged, leading to its disrepute. I’m very happy to accept that many - or even all - of the times that I used it personally were such misuses. I’m happy to accept that 99% of the time it was used, it was in the wrong way and led to bad design. But I’m finding it hard to believe that a design pattern that was once widely accepted as valid (by much cleverer people than me) is in fact completely invalid.

Here’s the other story, more recent this one.

TDD has been widely accepted as a Good Thing. One of its advertised benefits is that it encourages good design of your code. Yet here are now some influential software craftsmen declaring its death - with one of the reasons quoted that it actually encourages bad code design. TDD is dead.

And my reaction remains the same. Surely it can’t be a completely destructive practice? Surely it may be the case that TDD should be done some of the time rather than all the time, is some situations rather than all, rather than declared a Bad Thing? Could we all really have been that deluded all along?

Your (and my) feelings on the Singleton pattern and TDD aside, this feels a lot like following fashion. Let me reiterate, I think it’s a brilliant thing to question current wisdom and evolve good practices in our - and any - profession. But this pattern (pardon the pun) feels more like a new book, blog, manifesto, or what have you, gains prominence, the majority of the industry follows it as gospel, and when it’s been followed in anger and is proven not quite so perfect, the majority of the industry abandons it for the Next Big Thing (and the minority that never followed it in the first place help themselves to a massive serving of I-told-you-so). Even Steve Yegge’s post, after very aptly and entertainingly bashing the Singleton pattern to the ground, hints at just that: that there are a few valid uses for it, but there are so many misuses that it’s better to declare it evil.

My point is that I would much prefer to see an open-minded examination and trial of the Next Big Thing (as is fortunately happening to some extent). And when it is shown in time to have some weaknesses as well as merits, to evolve, iterate, or selectively use it where it is proven to be useful. Much better to do that than to move it from the pile of Good Things to the pile of Bad Things, as if the majority of the software professionals are not intelligent enough to understand the nuances of where to use it and where not to.

And if that’s actually true about the majority of software professionals, then that’s the problem that needs fixing.

Who’s got the users?

Posted by Yannis Lionis on 02 Dec 2009 | Tagged as: Internet, Software

Loads of websites and web startups are all about the users, and how many of them they can get. Especially the ones that do some sort of matchmaking between a consumer and provider (landlords and tenants, sellers and buyers, employers and employees) always try to get to a point where they can boast a large number of participants of either side, so that they can lure more of them in. And how do you get there? Well, a great website that’s got something new and unique is a good start. Marketing helps too.

But there’s a new twist to this. Twitter’s success means there’s now a new way to go about it. Tweetalondoncab have come up with a smart way of harnessing Twitter to help match taxis with the people who need them. As they explain on their blog, you send a DM (direct message) to their Twitter account, which gets seen by all the participating taxi drivers. If there’s one available for the specified time and route, they give you a call, introduce themselves, arrange where exactly to pick you up, and give you their licence-plate number so that you know it’s them when they arrive.

That costs nothing to the users, and virtually nothing to the taxi drivers (apart from a bit of Twitter admin and working out the system). But, had they tried to come up with their own service for this from scratch, even after all the development effort, they would have had a hard time getting people on it. How do you find out about them? How do you contact them when you need them? Twitter on the other hand, gives them an existing messaging channel already used and recognised by all its members, and allows them to tap into the massive pool of Twitter users. And via the very nature of Twitter, word of mouth is quick and effective.

In short, the tables are reversed. Instead of coming up with a new website that tries to draw users to it and thus increase its people-centric value, one can tap into an existing community of users. It must be done with caution though, any sign of abuse, or lack of respect for Twitter’s main function in people’s daily communication, will send the brand’s karma plummeting.

Note: I used tweetalondoncab here merely as an example, but I must say that I have used them and they do provide a very good service. Worth a try!

IE6 anti-whinge

Posted by Yannis Lionis on 14 Aug 2009 | Tagged as: Internet, Software

Microsoft have announced that they will be supporting IE6 until 2014 as opposed to 2010 which was the original plan. This has caused a bit of a stir, especially amongst web developers who are sick and tired of spending a disproportional amount of their time debugging and making customisations for IE6. An example of these opinions, is the folks over at http://www.ie6nomore.com/.

So why is it still around? Phil Hawksworth makes a good point that it’s all about the enterprise. Large enterprises need to have their users locked in one browser, and they have a whole suite of applications that are developed, tested and supported for that browser only. I work in one: on-line training, performance management, supplies ordering, travel bookings, expenses system, time sheets, promotions, the list goes on and on: they’re all browser based, they’re all mandatory and they’re all supported for IE6 only. And guess what: a lot of them do actually break on other browsers (although IE7 is close enough, and Firefox isn’t far behind). Throw in dodgy ways of getting old and new systems to talk to each other and dodgy software built by vendors interested in delivering in the least amount of time possible, and you get a hell of a software soup. Moving to a different supported browser would have a massive cost, not including the cost of any of these not working well for any amount of time.

So am I surprised that companies in that situation aren’t supporting other browsers? No, even though that means they can’t upgrade up from Windows XP either (and for a while, the only thing to upgrade to was Vista anyway). I think they should be planning for it of course - there are systems slowly being upgraded and changed all the time, and if in this day and age the person responsible is not making damn sure that their product works in the latest versions of all popular browsers (as well as the still necessary IE6), then they’re doing a crap job and their company a disservice.

But I have to admit that people whinging at Microsoft for extending their support seems unnecessary and childish. Changes like this can only come from the people. And by that, I don’t only mean the users changing browsers, but also websites and online tools ceasing their support of IE6.

So, are you building a website or online tool and you’re sick of spending so much time customising for IE? Don’t. Put a note saying “we support IE7, IE8, FF 3.x, Safari, Opera, … We DON’T support IE6″. Or detect the browser being IE6 and give them a more basic version of the website, or even an HTTP 400 code and a message “Here’s what your missing - get a decent browser”. Do something. Make a stand. Microsoft are not producing dangerous drugs or guns, they’re not accountable in that way for IE6 still being around. It’s just a browser and as long as it’s being used and it makes sense for them to support it they will; and they should. If you want a change, make it happen.

Python exercise #1

Posted by Yannis Lionis on 16 Apr 2008 | Tagged as: Software

As part of a Python focus group started at work, we had the following exercise - as the first of many - set to us. The problem is the wll known fizz buzz one:

Write a program that processes a list of numbers from 1 to 100. For each number, if the number is a multiple of 3, print “FIZZ”; if the number is a multiple of 5, print “BANG”; otherwise, print the number. You are *NOT* allowed to use any *IF/ELSE* statements in your code. You can use the list-accessing ternary operator hack, but whilst I’ll accept your homework if you do, you’ll miss out on the prize (alcoholic), which goes to the most concise code (not including whitespace).

Kerry and Nigel have already posted their solutions, which I’m afraid are much more concise than mine - I was mostly happy to find a way to do it without any conditional logic (including an or) and too lazy to look further. So here’s mine:

def fizzbang():
 # Numbers from 1 to 100
 numbers = range(1,101)
# 3,6,9,...,99
 multiples_of_3 = range(3,101,3)
 # 5,10,15,...,95,100
 multiples_of_5 = range(5,101,5)
 # 15,30,45,60,75,90
 multiples_of_3_and_5 = range(15,101,15)
# Replace all muliples of 3 with FIZZ
 for i in multiples_of_3:
  numbers[i-1] = "FIZZ"

# Replace all muliples of 5 with BANG
 for j in multiples_of_5:
  numbers[j-1] = "BANG"

# Replace all muliples of both 3 and 5 with FIZZ BANG
 for k in multiples_of_3_and_5:
  numbers[k-1] = "FIZZ BANG"

for x in numbers:
  print x

Go on, poke some holes in it.

Hosting adventures

Posted by Yannis Lionis on 07 Mar 2008 | Tagged as: Internet, Software

The 1and1.co.uk hosting package I’m using just failed massively, and it’s the second time week. Out of 4 servers (2 dedicated, 2 virtuals) 3 were inaccessible this morning, and the response the technical support gave (after fiddling around trying to ssh in themselves I presume) was “here’s the number to the server team, call them in 2 to 3 hours for an update”.

2-3 hours! In server time, that’s about a year. It is seriously bad form for a hosting company.

On to buy a box from another hosting company, I opened two browsers and typed in the address for slicehost and vpsland (I’ve happily used the former so far and the latter was suggested by a colleague). It took 30 seconds to choose a slicehost package and by then the vpsland website hadn’t come back. It subsequently took 2 minutes to complete the very short order form in slicehost, and vpsland website had come up by then, but too late. And in 4 minutes, I was ready to log in to my server. Brilliant, well done slicehost.

Hosting is a highly commoditised industry, and reliability and good service makes all the difference…

Google all-knowing eye

Posted by Yannis Lionis on 21 Dec 2007 | Tagged as: Internet, Software

A colleague ran into a very interesting Google protection mechanism. She searched for “soapExtensionTypes” and got a 403 page saying “We’re sorry, but your query looks similar to automated requests from a computer virus or spyware application. To protect our users, we can’t process your request right now.” and a captcha to allow you to continue (try it). It gets even weirder:

  • It takes 3 correct captcha responses to get it to proceed to the search (making really sure you’re a person!)
  • Even if you change your mind, ignore the captcha and search for something else (something safe), it still won’t let you, until you give a correct captcha response. They really do block your access
  • It’s session-specific. If I respond to the captcha correctly enough times to unblock the search results and then do the search from a new browser window, I get it again.

This is interesting. As the 403 page says, Google does this to “protect their users”. This implies that they’re worried about gaming results, otherwise how could a search on anything harm anyone besides me? If that’s the reason though, the search strings on which they decide to enforce this seem peculiar. I won’t rant about “soapExtensionTypes”, it’s reasonable that any way they use to determine which searches to block may get a few wrong. But if this is primarily to prevent gaming the search engine, why do searches like “football tickets” not trigger it? I imagine that’s the type of thing that people would mostly be interested to game.

Oh well. It appears that I am now on Google’s provisional black list, as any search I do is blocked by a captcha (although if it’s a safe search string it only asks for one correct captcha response). I hope it goes back to “just working” soon.

What Location?

Posted by Yannis Lionis on 06 Dec 2007 | Tagged as: Internet, Software

Google recently released My Location for Google Maps. The idea is that you download this to your mobile or PDA, press 0 while in Google Maps app and your (approximate) location is displayed on the map. This doesn’t need GPS, as it uses the mobile network masts to calculate your position, presumably with some triangulation.

It seems to me like a good idea - a you-are-here on the map feature for non-GPS users, and with a ridiculously easy interface.  So I downloaded it to try it out, mostly to see how accurate it is. What I get is:

“Your current location is temporarily unavailable”

They say that this is beta and will not always work or be very accurate, but they’re working on it, yada yada yada. Fair enough. But I’m getting the same error wherever I am, for the past week. It hasn’t found my location once, it just doesn’t work for me. That temporarily word in the error message is starting to sound mockingly tiresome.

What gives? They don’t say anything about coverage - I’m in the UK rather than in the US, so if it’s US-only coverage it would explain it, but I can’t find anything about that on their Help Centre.

Verdict so far: Nice idea, but seriously unimpressed with results.

Customer Support for Dummies

Posted by Yannis Lionis on 05 Dec 2007 | Tagged as: Internet, Software

I’m so sick of customer support answers that assume I have the perceptiveness and IQ of a hibernating mushroom on valium. 

I’ve done a fair bit of customer support in various jobs so far, and I am well familiar with the two annoying types of complaints:

  • The I-don’t-know-anything type: This is the complaint that your software doesn’t work, coming from a person who isn’t actually familiar enough with computers to turn them on and open a file in Notepad, let alone use anything more complicated.
  • The I-can’t-be-bothered-to-describe-my-problem type: This is the complaint that just says “this doesn’t work for me” or something equally laconic and unhelpful. No description of the error, no information on the environment, no steps to reproduce it.

So having had to tackle this myself a few times, I can understand why the first response to any complaint I make is to assume I am stupid and don’t know anything - because this is a big percentage of complaints companies get and it’s best to start with the simple things first (”can you check that your monitor is actually connected to your computer sir?”). So I endure the silly questions, I wait for the “customer support advisor” to go through the first pages of his script and hope they’ll get to something helpful (usually, to refer me to someone else).

I do however draw the line at support staff who clearly haven’t even bothered to read my email. I recently emailed my (online only) credit card company to tell them that the payment method I’ve been using for months is now not working for me, possibly because they included a new security feature (as described in my blog entry about Too much security). I wrote a lengthy descriptive email, pasted the error message and gave enough background information to suggest possible causes. What I got back, was a paragraph copied from the Help section. “Please make sure you are at the payments section and click on the Make Payment link…”. The person did not even read my email. It was really annoying.

Perhaps customer support staff can’t be bothered to pay attention. Perhaps this particular person wasn’t intelligent enough to tell the difference. But this is most definitely not good customer support.

Unless if, as my girlfriend says, when the say “support” they mean emotional support (”oh, your computer isn’t working, there there, all better now…”)

ZooTok is live!

Posted by Yannis Lionis on 10 Aug 2007 | Tagged as: Software

It’s not been easy and it’s not been boring, but http://www.zootok.com is live!

Built by Otu and me, ZooTok is a service that allows you to make phone calls anywhere in the world, landline or mobile and pay only 50p per call. Apart from that, you can also initiate calls from your mobile by sending the number you wish to call to the ZooTok number. And there 2 free calls for anyone who registers, so you can try it for free!There are other cool little features, for example you can save aliases for numbers you call regularly, so that you can text the alias rather than the number. We’ll add more as we go along.

Now the real challenge begins, getting people to try it out, which essentially means letting people know it exists. There have already been a couple of appearances in blogs (here and here), but there’s a long way to go.

This is a most exciting and educational experience. I’ll post back with updates (well, as soon as I’m back from my two weeks of holidays in Greece!)

Oh the spam!

Posted by Yannis Lionis on 20 Jun 2007 | Tagged as: Software

We’re all aware of spam, both email and snail-mail spam. It’s been around for ages, and we’ve come to be used to it. We’ve found ways to deal with it. Spam filters for email (although they are not quite as good as to eradicate the problem). Snail-mail, irritating as it is, has it’s positive point (about a quarter of all mail in the UK is spam, which means that if it wasn’t there we would all be paying more for postage). We’ve also come to know sms and telephone spam as well now, which is even more intrusive and harder to deal with. But ever since I started this blog I found out about blog-comment spam.

It’s scary how many spam comments I’ve gotten on this blog. They’re usually something that starts with “Nice site” and then goes on to list loads of links for cheap flights, cheap computers, cheap everything (as well as some more dodgy stuff). I never would have thought that a blog that’s been around for only about a couple of months would get bombarded daily with so much spam.

The moderation filter has of course been invaluable. The particular feature of WordPress to hold for moderation any comment with a link in it has done most of the work. Still, I get an email for every comment posted asking me to moderate it. So even though none of these spam comments ever see the light of day, I have to go through them and delete them and I essentially get spammed on my email address.

I have to ask myself what use all this is. I understand that a company that sells something and chooses mailing leaflets as a marketing strategy can benefit from such spam. Even if 0.1% of leaflet recipients actually buy something (that’s only one in a thousand) then they can expect to generate sales by sending stupid amounts of leaflets. The same stands for telephone sales. But does the same apply for the internet? As time goes by people become more aware of all the dodgy stuff out there. Are there actually people clicking on things like “You’ve just won a new laptop, click on asdfghjkl.com to get it”? I would hope not but I’m not so sure. I would hope that people unsuspecting of the evils of the internet are the ones that don’t use it much anyway, as opposed to a telephone or an address which are things everyone has. But I’m probably wrong, because all this spam exists for a reason and it must produce some results, otherwise it would go away.

Any tools we come up with to combat spam is bound to fail, as spammers will keep finding ways to bypass them. Perhaps our only chance is to hope for the time to come for (almost) everyone to be educated enough so that spam is of no use.

Next Page »