Archive for the ‘Tech’ Category

All them haters

Tuesday, October 11th, 2011 | Tech, Thoughts

Many people used last week as a chance to lay into Apple, describing the iPhone 4S as a disappointing release.

I honestly can’t image why. It really is the iPhone 5 in everything but name, and perhaps a bit of exterior work, but from every other point of view, it’s a whole new phone.

They’ve put the dual-core A5 chip in it, which is the same chip that is inside my iPad 2, it has the dual antenna system, the battery life has been extended, and it’s new 8-megapixel camera not only has a new censor allowing it to capture 73% more light but it also shoots 1080p high definition video as well.

What I am most in love with however, is Siri. Their new voice control system not only allows you to do things just by speaking to your phone, but actually have a conversation with it!

Of course, speech recognition has been around for a long time and nobody really uses it, but this is what Apple do best – they take a niche technology and package it in a way which brings it to the mass market. For example, the first tablet came out decades ago, but it was only when Apple released the iPad did tablets really see the first mass adoption. Hopefully, Siri is the opportunity speech recognition has been waiting for.

Steve Jobs, 1955-2011

Friday, October 7th, 2011 | News, Tech, Thoughts

Yesterday the technology industry was saddened by the passing of Apple founder and chairman, Steve Jobs.

Steve was a visionary who literally changed the world for the better by bringing new and innovative technology to the public in a way which was always intuitive and more importantly, magical. Every time I pick up my iPad, I still feel like I’m living in Star Trek.

Tributes have poured in from politicians, to business leaders, to the many, any Apple fans across the world. In a touching note Bill Gates described working with him as “an insanely great honor.”

He’ll be missed by all of us in the field of technology.

George Shore isn’t important

Monday, September 19th, 2011 | Tech, Thoughts

Recently, my good friend George, decided to part ways with his then girlfriend. Sad times. Unfortunately, when it became time to make it official, by severing the relationship on Facebook, the status change attracted very few comments.

Now this clearly isn’t because George is simply unpopular. Nothing could be further from the truth – George is a witty, charming and sexually attractive man. I would go on, but what happened in Munich, stays in Munich.

The reason that such a status updated attracted few comments was that Facebook has decided that George’s updates aren’t that important. It never appeared in my newsfeed, it simply slipped by without me ever reading it.

Back in June, I blogged about Eli Pariser’s talk on online filter bubbles and how Web 2.0’s attempt to personalise its content can lead to blinding us to what is going on in the rest of the world.

This is a good example of this – Facebook has decided that George’s Facebook updates aren’t that relevant to me, even though I would consider him one of my closest friends (as well as living with him!). So beware the online filter bubbles, Eli was right all along.

Your first Java applet

Friday, September 16th, 2011 | Programming, Tech

In previous columns we have fiddled about with some basic javascript so I thought this month we we do something a little different. We’re going to write a simple java applet. Yes you guessed it, its going to be one of those annoying “Hello World!” applets that every single damn language makes you do to get started. The sad fact is though is that they are great a teaching people the basics.

Article Overview

* Before we start
* The applet overview
* Creating the Java Source Code
* Compiling the source code
* Running the program

Before we start

Since we are going to be compiling the java code for the applet it means your going to need The JavaTM 2 Platform, Standard Edition. Its about 37 MB so it may take a while if your on a 56k modem. Use a download manager such as Flash Get. Also – make sure you download the SDK and not the JRE. You can download it from the following website.

http://java.sun.com/j2se/1.4/download.html

Now no one can say I don’t work hard for you. I wish someone had sold me I needed that while I was wondering why it wasn’t working. Your also going to need to set the PATH perminantly unless you know what your doing. Do to the documentation below and follow the steps to settings your path. You need to add some text to the path command rather than replace it by the way. Again I wish someone had told me that. The documentation on how to do this can be found at the following website.

http://java.sun.com/j2se/1.4/install-windows.html

The applet overview

An applet requires a java enabled browser to work rather than being a stand alone java application. Most major browsers supporrt java now although it may be an optional extra on your copy of Netscape or Opera. Internet Explorer automatically supports it. There are three steps in creating your first java applet:

* Creating the Java source code.
* Compiling the source code.
* Running the program.

Creating the Java source code

Open your text editor (Notepad will be fine but I prefer EmEditor) and type in the following:

import java.applet.*;
import java.awt.*;

/**
* The HelloWorld class implements an applet that
* simply displays "Hello World!".
*/
public class HelloWorld extends Applet {
public void paint(Graphics g) {
// Display "Hello World!"
g.drawString("Hello world!", 50, 25);
}
}

Save this code to a file called HelloWorld.java.

You also need an HTML file to accompany your applet. Type the following code into a new text document:

<HTML>
<HEAD>
<TITLE>A Simple Program</TITLE>
</HEAD>
<BODY>
Here is the output of my program:
<APPLET CODE="HelloWorld.class" WIDTH=150 HEIGHT=25>
</APPLET>
</BODY>
</HTML>

Save this code to a file called Hello.htm.

Compiling the source code

Open up command promt (Start > Run > “Command”). Once your at the command promt, go to the directory where you have saved the source code. For expample if you saved them in C:\code you would type cd C:\code. At the prompt, type the following command and press Return:

javac HelloWorld.java

The compiler should generate a Java bytecode file, HelloWorld.class. This file will appear in the same directory.

Running the program

Although you can view your applets using a Web browser, you may find it easier to test your applets using the simple appletviewer application that comes with the JavaTM Platform. To view the HelloWorld applet using appletviewer, enter at the prompt:

appletviewer Hello.htm

Now you should see an application come up with “appletviewer” or something similar at the top. It should then say applet loaded at the bottom and hello world in the middle. Congratualtions! Your applet works.

Don’t work if you got a error from command promt. I got that too saying it was using the default settings etc, but it didn’t seem to cause a problem. For more information on java applets go to http://java.sun.com.

Google’s great car crash

Thursday, August 25th, 2011 | Tech

Recently, Google merged their regular accounts with their Google Apps accounts. Unfortunately, they didn’t do it very well.

The problem is that people often had both accounts using the same email address. For example, chrisworfolkfoundation.org is managed by Google Apps and so we have an info@ email address. But because you only get mail, calendar and docs with Google Apps, in order to use services like YouTube and Google Checkout, Google made us set up a separate account with the same email address.

Now they have merged them all together, obviously they have found that they have a lot of conflicts.

Indeed, we noticed then when I recently tried to sign into the Foundation’s Checkout sellers account and found that it wouldn’t accept the right password. It would accept the other password, but that account was empty. When I contacted Google Support – a rarity they let you do I will tell you!, they said they had created a temporary account for me and I would have to sign in to that one and use the migration tool.

I signed in, there was no migration tool.

I then started to worry about my other accounts with Google and signed into one of their other services, at which point I finally made it onto the migration.

This would seem OK, I could migrate a lot of my data over to the new account. However it wasn’t as simple as this. First of all, a lot of the data is sensitive and doesn’t want to be accessed by everyone who has access to the email account. But you don’t seem to be able to migrate to any account other than the conflicting one. The only other option is to create a whole new account @gmail.com.

Secondly, none of it works. We use about 12 different Google services – 9 of which aren’t supported by the migration wizard, two of which are supported but weren’t available for us because there were complications. In fact, the wizard only actually allowed us to migrate one of our services – Picasa Web Albums over to the new system.

This left me with having to create a brand new @gmail.com account for the Foundation which many of our services are now using including YouTube, reCAPTCHA, Google Checkout, AdWords and many others. All of which now looses significant user confidence because what organisation uses an @gmail.com account?

After all this, many of the manual migration that Google suggests you do as a last resort doesn’t exist either. reCAPTCHA for example offers no way to transfer the domains/keys you hold to a different account and of course, because it’s now a just a small wing of the Google Corporation, you can’t contact support about it because Google don’t do customer support.

I actually mourn for the days of Microsoft, they weren’t perfect but at least they do backward compatibility and customer support.

Poker Stats Library

Tuesday, August 16th, 2011 | Tech

A few weeks ago, I wrote some tools which would help me out in getting to grips with poker, which in general I fail at.

It annoyed me because it should be fairly simple for someone like myself to get my head around the poker maths (well, it is, pot odds are easy), so even despite the lack of social understanding the life of a computer scientist brings, I should at least be able to achieve a level of averageness in the game. I clearly have failed to do this, and so I decided a bit of work on my basic strategy was needed.

As a result, I built an interactive tool which would teach me what starting hands I should play, similar to the concept of Basic Strategy in blackjack. It presents you with two cards and you have to say what position you can play them from, if any. It will then tell you if you are correct or not, if not it will ask you to try again and if so, it will move on to the next hand.

I also wrote a tool which allows you to select the cards you have, and using the same formulas it will tell you what position that hand is worth playing from. I’ve thrown in a few other simple odds calculations in there as well.

Of course, these won’t make you a great poker play by themselves, but it should provide a good basis to learn from.

Given the tools would otherwise just disappear into the depths of my hard drive somewhere, I’ve decided to publish the code on Github. Should you have any interest, you can download the source from the Github repository. It’s all written in PHP and should run out of the box.

Btw, the images below are screenshots, but the way they have been scaled down looks rubbish. They make more sense when you open them…

Farewell, Firefox

Sunday, August 7th, 2011 | Tech, Thoughts

As we know from the whole religion business a lot of us have been involved in over the past few years, it is very difficult for someone to change their mind. It really takes a lot, especially when you’re emotionally invested in something.

I’ve been a champion of the Firefox cause for many years now and I think the Mozilla Foundation have done some great work.

But I can’t champion its name anymore.

Let’s face it, it’s just rubbish these days. Their rapid release cycles have brought around faster versions, but this has just made them increasingly unstable and still trailing the competition.

Firefox uses up more memory than anything else on my computer. Anything else! I run Zend Studio. That is based on the massively bloated Eclipse Studio, and then Zend came along and added a lot more bloat, and it still uses less memory than Firefox!

So, unfortunately, I’m cutting my ties.

I’ve already replaced my Firefox/Opera combination at work with a Chrome/Opera combination, and plan to do the same on my laptop as well. The only thing I have held out with on Firefox for this long was Firebug, and Chrome’s Developer Tools and Opera’s Dragonfly do just as good a job, once you get into them.

Farewell, Firefox, you broke my heart :(.

Why the future of animal welfare may depend on frankenfoods

Sunday, July 3rd, 2011 | Tech, Thoughts

I’ve recently re-read Ray Kurzweil “The Singularity is Near”, which is nothing else, really enlivens your passion in AI. One of the many interesting points made in the book was the idea that we will eventually be able to grow new body parts in a lab.

This has one great advantage for animal welfare – the idea that we could grow lumps of meat in a lab.

This would essentially end the need for vegetarianism.

For vegetarians like myself, who really, really love meat, this really would be a utopian future. Vegetarianism is based on the idea that it is wrong to kill conscious animals for food (some so called vegetarians say it is because of the taste, but these people aren’t real vegetarians), and this would entirely get round that.

We could eat our lab grown meat, without having the ethical implications that you where causing the death of an animal by doing so.

Of course, people would object that they didn’t want to eat meat grown in a test tube. But then, the fact that people can stomach meat now is mainly thanks to the lack of thought put into the factory farming and slaughter methods already in use.

Other advantages of doing this include:

* It will, at least after the initial development, be much more cost effective that having to rear an entire animal for an extended period of time and use less resources to satisfy our meat needs. Meat is incredibly inefficient, the amount of vegetarian food it takes to feed one animal to produce some meat is huge.

* Given the reduced cost and increased efficiently, there would be more food available for the third world, both vegetarian and meat.

* While we’re doing this, it’s a lot easier to generically engineer (or even using traditional refinement methods) to make the meat higher quality.

Computer diary magic

Saturday, July 2nd, 2011 | Tech

As some of you know, despite being very much up on the whole computers thing that is going on these days, my diary remains very much on paper. I prefer it, I can easily add things and scribble things out, it comes in a very nice weekly view and is easy to flick through and I can carry it round easily.

However, with the latest addition to my family of gadgets, I am now carrying around a diary sized device with me anyway.

Having a paper diary also means that I have to transcribe all the events onto paper and there is no way to easily merge my personal diary and work diary. Also, repeating events are just so much easier when it comes to electronic diaries.

So, given the new opportunity, I’ve decided to give an electronic diary a go. Using Google Calendar, integrated into the Calendar app on my iPad, I now have my personal calendar and work calendar all nicely merged into one place and no longer need to carry around my paper diary.

I’m not entirely sold, I think it’s a little more difficult to add events than it is just scribbling them down, and I have some concerns regarding interoperability between Google and my iPad. I’m also not entirely sold on the weekly view I get from my calendar – I like the simplicity of just a list of events in my diary, rather than having a mix of all day events at the top and then actual events in the timeline, not all of which fits on screen.

But I’m going to give it a go and see if it improves my life. Can’t live in the stone age forever – not that they had paper in the stone age ;).

The K is Coming

Thursday, June 30th, 2011 | Distractions, News, Tech

Earlier this month, the Top500, the project which measures and ranks the world’s fastest supercomputers, unveiled the latest instalment of their twice-yearly list. It had a new number one – Japan’s K computer.

Of course, an even faster computer is in itself very exciting, this is especially exciting because the project, pronounced kei, aims to be the first computer to reach ten petaflops per second when it becomes fully operational in November 2012.

Ten petaflops is a key number because, despite there being much discussion of its accuracy, ten peraflops is the number put forward by Kurzweil for the upper boundary of estimates on the processing power of the human brain.

That means that, once the K is fully operation, for the first time we will have a computer more powerful than the human brain.

That’s pretty exciting!

Of course, it could be entirely inaccurate. Some think the brain is capable of 38 petaflops per second, or even higher – other estimates have suggested 100, or even 1000 petaflops.

But considering the exponential growth of computer power, even if that is true, that doesn’t actually delay the arrival of such a computer that much time.

Consider Cray’s new XK6. It is aiming to hit 50 petaflops (http://www.informationweek.com/news/hardware/supercomputers/229700091) and they say it will be ready later this year! Of course, it hasn’t been delivered yet, but presuming it does, this represents a significant step forward in the chase to beat the brain.

Even if you assume that the brain does, in fact, operate at 1,000 petaflops per second, 100 times faster than Kurzweil suggested, the release of the XK6 this year means that within seven years, 2018, we will still achieve a computer faster than the human brain. Soon enough that I very much hope my grandparents will still be around to see it.