Friday, July 20, 2007

Tiscali the inept broadband provider

So after waiting for a month for Tiscali to connect broadband, we had a month of decent usage before the connection went down. 4 weeks and countless calls to support later they still hadn't managed to connect us so we cancelled the contract, quoting a contract clause. This clause basically says if we haven't received service for 28 days we should consider the contract finished.

We won't be paying this inept company for the month of non-service and we won't be paying them anything for cancelling the contract either.

Sunday, June 10, 2007

Stream Computing with AJAX (Part 3)

I mentioned in Part 2 of Stream Processing with Javascript that I would talk about its morality.

However, there is something more pressing. I've been trying to work out exactly how to stop users reverse-engineering the Javascript Stream Processing system and injecting spurious results. However, it seems that it is a common issue with Calculate@Home projects. From the Folding@Home FAQ:

Unlike many computer projects, the paramount concern is not functionality, but the scientific integrity, and posting the source code in a way that would allow people to reverse engineer the code to produce bogus scientific results would make the whole project pointless.

The main problem with AJAX stream computing is that users haven't deliberately gone and downloaded the software to help the cause, they are having the calculations forced upon them. Because of this, it is likely that there would be more hostility towards any such project and hackers would be more likely to try to cause malicious results.

As the code is executed on the client, and by the very nature of Javascript being interpreted, it is very easy to reverse-engineer any such code. And because it's so easy to reverse-engineer, it's very difficult to do any sort of encryption/confirmation.

Of course not everyone out there is going to try to hack the system, so one solution might be to calculate each batch of data on several different machines and then, given a discrepancy, recalculate that batch.

Still to discuss, optimisation - in particular bandwidth optimisation through local data storage - and morality.

Edit: Since writing this I've realised that you just need to take the majority vote from a number of results

Thursday, May 31, 2007

To Initial or not...

I've worked in places where it's the norm to leave your initials as you comment:

// IH: my comment about some function

And now I'm working in a place where it's not:

// But who wrote this in the code?

What I've discovered is that by getting your coders to add initials to their code, they will feel like they own that section of code. This could be considered an advantage - in that they'll take pride in their code sections. But also a disadvantage as, if they see a bug and someone else has their initials near it, they may be reluctant to fix that bug.

I think the initials method works better in teams where the code roles are very much well defined and the code is unlikely to be reused over and over (like for example, game code that tends to be very specific and rarely reused).

The non-initial method means that it's not my code, it's our code. This method is more suited to programmers in teams where the code is heavily reused such as in many engineering disciplines and in library code.

Tuesday, May 29, 2007

Stream Computing with AJAX (Part 2)

In my introduction to AJAX Stream Processing I introduced the idea of using web browsers as stream processing machines. The idea being that stream computing kernels and data packets were downloaded to browsers using AJAX technology and calculated on the client.

So how does it actually work?

Let's take the problem of testing the primality of a number, n. A naive implementation is to check if n is divisible by any of the primes up to n / 2.

So a datastream is created containing n along with all of the primes up to n / 2 and this is sent via AJAX calls to the client. Next a kernel program is downloaded to the client and executed via Javascript's window.eval() function.

A kernel to test the primality of n would look something like this:

isPrime = true;
for (var i = 0; i < primeArray.length; i++)
{
if (n % primeArray[i] == 0)
{
isPrime = false;
break;
}
}

{n, isPrime} is then returned to the server - another AJAX transaction - and saved into a database. Finally, the Javascript application asks for a new number to test and the cycle continues.

Calculating prime numbers through AJAX stream processing shows this theory in practice.

There are some issues with security (along with the normal AJAX problems):

  • What if the user decides that they are going to change the data returned using some kind of Javascript debugger?
  • How do you guarantee server-side that you are getting a valid processed result?
  • How do you get around the XMLHttpRequest security, stopping it from contacting one site from another (as would be needed with a host site showing the "calculation banner")?
Right now, I don't have a concrete answer for the first two questions, although I think some kind of random key that is passed to the client and then back again could solve the issue.

The third problem is commonly solved through the use of a proxy.

Next time, I'll discuss the morality issues of (sneakily) using a client's computer to do complex calculations for your means.

Wednesday, May 23, 2007

Stream Computing with AJAX (Part 1)

How many of you out there sit and read internet pages?

And how much work is your processor doing when you sit there reading the BBC News pages?

Virtually none.

Wouldn't it be great if all the computers around the world that were just sat there when people were reading websites could be used to help the Folding@Home or Seti@Home projects?

Enter Javascript's eval and XMLHttpRequest commands.

These two commands provide us with the technology to retrieve packets of data, process them, and return the result to the server - all without the website's user having to do anything (or indeed, any knowledge that this is even happening).

This stream processing system could be triggered by an ad banner included as a Javascript URL from the server (strictly, the banner doesn't even need to be visible).

"But who would want to slow their website down by including such a banner?"
I hear you cry.
"Those with an eye on their bank balance!"
I swiftly reply.

Many financial institutions are crying out for more processing power and would quite happily pay good money to have their packets of data processed. Webmasters could easily be coerced into including the stream processing AJAX program if they knew they were receiving some money for each packet computed by their readers.

And off course I'm waiting to skim a humble percentage off the top... :)

In the next post I'll discuss some of the finer points of how stream processing actually works, and some of the issues about doing this in Javascript, such as security and recovery.

Back again

Ok, so I've been a bit quiet over the past few months. But I started a new job and that has been taking up a large chunk of my time.

I've also (finally) got myself a broadband connect in my flat. It's with Tiscali and after initially waiting for over a month and being repeatedly fobbed off by their over apologetic call centre staff, it's now running smoothly.

Monday, December 11, 2006

Job Hunting

As I mentioned previously, I've been hunting for a job for a little while now.

Both of the companies that I sent a CV out to directly did not even have the decency to reply back to me, so I decided to use a recruitment specialist.

If you are looking for a programming career in Cambridgeshire I would recommend ecm selection as they did a wonderful job advising me on my CV and helping me to get the job that I really wanted.

CV Writing

Writing a good CV is one of the hardest things that you'll do.

You have to make yourself sound amazing, but not arrogant.
Technologically skilled, but people friendly.
A team player, but self motivated.
And you have to do all of this - including education and work history, contact details and personal interests - on a maximum of two pages!

After months of job hunting, I've found out several valuable lessons:
If you are applying to a small company, make sure you have all of the skills that they list. This is because smaller companies tend to employ people for specific roles that need a specific skill set. As the company is small, there normally aren't other roles available.

Larger companies, on the other hand, may look more at someone's education and schooling rather than the programming languages that they are fluent in. This is because larger companies tend to have a higher diversity (they are involved in more varied projects).

Wednesday, November 15, 2006

Clusters

It seems that the clever guys at Flickr have come up with a new concept to help solve the problem of ambiguous tag naming.

That concept is called clustering.

I'm guessing that what they are doing is requesting base tag (for example "ultralight") and then searching for any images with this tag. They are then looking for other tags that are common amongst those images and separating the clusters based on any other common tags.

For example check out the ultralight cluster.

This is a very clever solution to the problem of ambiguous tags as it looks at each tag in the context of the other tags given to an image, and no further information needs to be provided by the user.

Monday, November 13, 2006

95% Theory

Most of the people that you meet in your life will be through someone you know. Whether they are a friends partner that you meet at a party, or a new colleague interviewed by your boss.

95% theory basically says this: 95% of the time you will immediately like the person you are being introduced to.

Your friend/colleague obviously likes/gets on with/tolerates the person that they are introducing to you, otherwise they wouldn't have brought them to the party, or offered them the job. If you friend or workmate gets on with them, there is a good chance that you will too, a 95% chance.

Disclaimer: the figure, 95%, has been pretty much plucked out of the air but it's roughly based on people I have met. Sorry if you are in the 5%.

Wednesday, November 08, 2006

Why Phone Interviews are not always a Good Idea

Phone interviews are great if you want a developer that's just going to sit in their little bubble, coding away. They are impartial, fair and you aren't influenced by anything woolly like appearance or first impressions.

But the problem is: the rest of the world will be.

If the developer has to go out to meet clients, these clients are going to judge the developer based on these woolly things. It has been said that you form extremely strong opinions of someone in the first 10 seconds of meeting them. So why shouldn't you form the same opinions as your customers?

By meeting an interviewee face to face you will be putting yourself in the same position as a client. If you are immediately impressed, there is a good chance your client will be too. And if you are immediately put off, chances are your customers will be.

"But I just want them to code!" I hear you cry. However, will you in a year's time? In two?

In this age of versatility and Total Business (the business equivalent of total football, where colleagues are expected to take on each other's roles) having a more rounded individual that can liaise with customers might just be the better option.

Tuesday, November 07, 2006

Do what you Love!

"I don't live to work, I work to live, and live at the weekend." Say the Stereophonics in their track Last of the Big Time Drinkers. And I agree with them. But only whilst doing jobs that I’ve not enjoyed.

Since I was youngster I’ve wanted to make computer games, it's been my dream since I was about 10 years old. 11 years, 3½ A levels and a 2:1 later and I finally got to live out that dream by working for a company called Blitz Games. I started as a junior programmer and 4 years later I was Technical Manager on their flagship next-generation project, Possession. Life was all good.

At that time, I was offered a job working on some business software. I was promised all sorts of perks including a stake in the company after a year, profit related bonuses and a 30% pay increase! I put my new management training to use and drew up a list of weighted pros and cons, and the job offer scored fractionally higher than my current job. So I went for it.

I've been in this job for several months now, working from home. And I don't enjoy working alone, I need to be around other people.

Ok, so what am I going to do about it? I could sit here and moan to the World Wide Weblog but I’m not going to do that. I’m going to get a new job. Something were people are around me to bounce ideas off. Something I enjoy.

When you do a job you love – a job like making computer games – you are more motivated and committed to achieving great things. You'll work hard and you'll accomplish far more than you could ever imagine in a job you dislike. Getting up in the morning is not a chore as it means you'll soon be able to crack on with that challenging problem.

So you don't have to work to live, working can be living if you really love what you do.

Monday, November 06, 2006

Using Google Trends to help with SEO

Google Trends is a fairly new bit of software from those clever technology people at Google labs. What it does is take a snapshot of how people are searching the web, and then allows you to view the results as a graph over time.

It also allows you to enter multiple terms and see how they compare, for example try Easter and Christmas.

"But how can it be used to help with Search Engine Optimisation?" I hear you cry.

Well, by knowing the more common search terms and understanding how trends are changing with time, you can make sure that you have the correct key words on your pages.

As a case study, this blog is called "Software, Technology and Leadership" but let's see how those words compare to some similes:
Software Vs Code
Technology Vs Tech
Management Vs Leadership

So it would seem that I’ve managed to pick three terms that are searched for far less than other terms!

There is a flip-side however; SEO is inherently competitive. What I mean by that is, there are hundreds of thousands of websites all trying to achieve a Google rank (or GRank as it will now be known). So the number of websites that you are trying to beat also comes into the equation, and obviously the fewer the better.

Finding the number of websites that contain a certain term is trivially simple; just google the term and see how many results come back (it's there, near the top: "Results 1 – 10 of about 1,700,000,000 for management")

So here's how the previously mentioned terms compare:








WordNumber of Pages
Management1,700,000,000
Leadership269,000,000
Software2,920,000,000
Code2,200,000,000
Technology1,850,000,000
Tech883,000,000

So, although less people are searching for the word Leadership (compared to the word Management) there are 1/6th the number of pages containing Leadership. Therefore, the chances are better of getting a higher GRank.

In conclusion, Google Trends provides SEOs with another tool for their box as knowing the phrases for which to optimise is half the battle.

Monday, October 30, 2006

Search Engine Optimisation

After Googling my own name several days ago – and being disappointed with the results – I started to look into search engine optimisation, or SEO.

Before I go into how SEO works, let me say that I’m referring to optimisation for Google as that is responsible for something like 80% of all the searching that goes on net-wide but the techniques would also be valuable for the other search engines.

It seems that there are two “ways” to do Search Engine Optimisation, the nice, pleasant, kitten-friendly way: white hat SEO. And the dirty, spammy, fly-postering way: black hat SEO.

White hat SEO involves trying to get your site linked to by pages with a high Page Rank. This might be through paying them to link to your site, some kind of link exchange, or just asking them very politely.

Black hat wearers would use underhand techniques such as writing software or scripts to spam blogs, bulletin boards and forums with links to their site. And although each link would have a low Page Rank, the fact that there are hundreds of them would provide their page with a high ranking.

Both hat wearers make sure that key words appear in page titles and headings, and are also dotted throughout page text. Having a domain name containing the keyword is also a big bonus.

Thursday, October 26, 2006

Don't take your Serious job too Seriously

At lunch, I was watching The Rocket Ronnie O'Sullivan play a bit of snooker and after he'd won he had this to say about the game:

"Just because you do a serious job, doesn't mean that it has to be done seriously."

It's so true, enjoying your job is a right not a privilege.

Mountain Climbing

The other week I walked up Snowdon with my girlfriend and two other close friends. We took the Watkin path which is about 4 miles long and has almost 1000m of ascent, including a difficult scramble for the last couple of hundred meters.

Despite it being hard work and freezing cold at the top we all have fond memories of the day. One of my mates even said, "I'm so proud of myself for getting up that scramble!"

We enjoyed it and have fantastic memories of it because we'd conquered a difficult challenge. It is the highest mountain in England and Wales after all!

And it's the same at work.

When someone completes a hard task or solves a tricky problem they are extremely proud of their achievement.

So, as a leader, delegate hard problems to challenge your colleagues and do the mundane stuff yourself. You colleague might struggle with the task at first, but as long as it's not unsolvable, they will feel a great sense of pride and triumph from completing the problem.

But remember; people like to climb mountains to get to the top. So make sure that the tasks set aren't too difficult. If you notice them having problems, give them some support and coaching to get through it.

Although climbing mountains is hard, it's enjoyable because you achieve something.

And our working lives should be exactly the same.

Tuesday, October 24, 2006

Afternoons Spent Updating Adobe

I currently have a narrowband connection, so downloading updates for the software that I use is a big deal. A very big deal.

Yesterday, I finally got around to downloading Adobe Reader 7.0 as I tried to view a pdf file that needed it. After a 20 Meg download (which took most of the day) I shut my computer down for the evening and thought nothing more of it.

Today I fired everything back up again and there was the Adobe Reader link on my desktop which I swiftly deleted. Something must have auto booted as it told me that Adobe Reader would now download The Updater, another 20-odd Meg file.

The Updater decided to put the link to Reader back on my desktop.

Question: Why would I need a link on my desktop?
Answer: To open Adobe Reader quickly.

Question: But why would I ever need to open Adobe Reader quickly? It's not like using Word where I open it to start writing. It’s a viewer that only views a certain, rarely used type of file. So whenever I want to view a pdf file, I go find it and then double click on that file!
Answer: Erm...

Anyway, The Updater downloaded 3 updates and then made me restart my machine 4 times! Why not just wait until the end to do the restart – the updater knew it had more to install?!

Sorry Adobe, but this just isn't up to your usual high standards.

Wednesday, October 18, 2006

We can do anything!

When I was at Blitz Games, I used to tell the designers and artists that the programmers could do anything that they wanted us to. It was a slight exaggeration but I always had the attitude of "It's possible until we've proven otherwise"

On a similar note I stumbled across this excellent, albeit a little verbose, article stating that any question can be answered.

The defining paragraph says:

"... we see that no real question is in principle - i.e. logically - unanswerable. For the logical impossibility of solving a problem is equivalent to the impossibility of describing a method of finding its solution and this, as we have stated, is equivalent to the impossibility of indicating the meaning of the problem. Thus a question which is unanswerable in principle can have no meaning; it can be no question at all: it is nothing but a nonsensical series of words with a question mark after them. As it is logically impossible to give an answer where there is no question, this cannot be a cause of wonder, dissatisfaction, or despair."

So, it seems we really can do anything!

Wednesday, October 04, 2006

Self Googling

After reading this article about self googling, I decided to give it a go.

What I found was: there is a competitive eater who goes by the same name, nicknamed The Intruder. There's also an electronics whizz who's written many books.

I did find some links to me:

Looks like I need to do some blatant self promotion!

Tagging Suggest

Ok, I got woken up at 4:30 am on Saturday morning and all I could think about was tagging. How sad am I?

I was thinking about the problem of multiple tags for similar words and I've come up with another idea:

Could systems that use tags utilise AJAX technology to suggest a bunch of tags as you type in a way similar to Google's Suggest?

The advantage of this would be that the system may suggest Black and White, instead of a user typing Black & White.

I admit that this wouldn't work with B&W unless the system also had semantic links as I explained earlier.