My take on Chrome OS

November 20th, 2009 by Richard No comments »

So Google have unveiled Chrome OS… which in actual fact is just a web browser where all you can do is interact with web apps. This isn’t a review, in fact if you want that go to Engadget

It’s even less than a thin client of old (read: Citrix). When did we suddenly decide that thin clients were a good idea again?

I’ll just put one single thought and it was said by Marc Andreessen in 1995

“[Netscape will soon reduce Windows to] a poorly debugged set of device drivers.”

Yeah that went well didn’t it.

FreeAgent: online accounting application

November 4th, 2009 by Richard No comments »

I like many people dread the 31st of January in the UK as it’s time to make sure I’ve not only submitted my tax return to HMRC but I’ve also paid any tax I owe.

It’s a horrible task but it’s just been made a whole lot easier using a great online application called FreeAgent.

For me it allows me to keep any invoices in check, remittance notes and all my expenses (including uploading a scanned PDF copy of the actual receipt).

Then come Self-Assessment time I can see my expenses all in one place and how much I can be expected to pay for my taxes.  It’s so easy it’s a dream, I can’t recommend it highly enough!

What’s more if you click through for a 30 day free trial from this link now, you’ll get a 10% discount!

FreeAgent sign-up

Now I’ll say upfront I don’t have much experience with this sort of application and I’ve never used Sage, etc . When you sign up for FreeAgent you get your own URL (http://yourcompany.freeagentcentral.com) and login, but this has one of the easiest to use interfaces I’ve seen for something that is a very complex and powerful web application.

In a matter of an hour I had all my yearly expenses in the system and added my income and even my PAYE P60 for my Self-Assessment.

I’ve only touched a handful of the features on offer, it also allows bank account integration which I’m sure is incredibly powerful, I’ve just not used it yet!

The Features (shamelessly copied from the FreeAgent website)
FreeAgent Features

  • Manage Projects & Time
    Manage your projects and contacts, track the time you spend and create flexible timesheet reports.
  • Simple, Powerful Invoicing
    Create great looking invoices with no fuss. Email them to the client and easily track through to payment.
  • Keep track of Expenses
    Keep tabs on your business and out-of-pocket expenses and quickly rebill to clients.
  • Superior Online Banking
    Online banking that’s better than the banks. Compare accounts and track balances.
  • Realtime Accounts
    No complicated procedures, FreeAgent simply works out your accounts as you run your business.
  • Unrivalled Tax Features
    Our unique Tax timeline lets you see important UK income, VAT and corporate tax dates and how much is due.

How to add a pin to embedded map

October 27th, 2009 by Richard 2 comments »

Part one of this section on MapKits showed how to embed a map and place a floating toolbar for switching the map views, however it didn’t cover how to drop the pin where you wanted it.
MKMapKit

Create the Object

First lets create a new NSObject for the place mark. Let’s call it ‘PlaceMark’

PlaceMark.h

#import <Foundation/Foundation.h>
#import <MapKit/MapKit.h>

@interface PlaceMark : NSObject {
	CLLocationCoordinate2D coordinate;
	NSString *subtitletext;
	NSString *titletext;
}
@property (nonatomic, readonly) CLLocationCoordinate2D coordinate;
@property (readwrite, retain) NSString *titletext;
@property (readwrite, retain) NSString *subtitletext;
-(id)initWithCoordinate:(CLLocationCoordinate2D) coordinate;
- (NSString *)subtitle;
- (NSString *)title;
-(void)setTitle:(NSString*)strTitle;
-(void)setSubTitle:(NSString*)strSubTitle;

@end

PlaceMark.m

#import "PlaceMark.h"

@implementation PlaceMark
@synthesize coordinate, titletext, subtitletext;

- (NSString *)subtitle{
	return subtitletext;
}
- (NSString *)title{
	return titletext;
}

-(void)setTitle:(NSString*)strTitle {
	self.titletext = strTitle;
}

-(void)setSubTitle:(NSString*)strSubTitle {
	self.subtitletext = strSubTitle;
}

-(id)initWithCoordinate:(CLLocationCoordinate2D) c{
	coordinate=c;
	return self;
}
@end

Adding a pin to your map

Firstly remember to add

#import "PlaceMark.h"

To your map controller, from the previous example inside the displayMap function under the region.center call

PlaceMark *addAnnotation = [[[PlaceMark alloc] initWithCoordinate:location] retain];
[addAnnotation setTitle:@"The Pin Title"];
[addAnnotation setSubTitle:@"The pin subtitle goes here"];

[mapView addAnnotation:addAnnotation];

Then create the following delegate method

- (MKAnnotationView *) mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnnotation>) annotation{
    MKPinAnnotationView *annView=[[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"MyPin"];
    annView.animatesDrop=TRUE;
    annView.canShowCallout = YES;
	[annView setSelected:YES];
	annView.pinColor = MKPinAnnotationColorPurple;
    annView.calloutOffset = CGPointMake(-5, 5);
    return annView;
}

Voila you now have a pin dropped on the map and automatically selected. If you don’t want the title automatically displayed then change

[annView setSelected:YES];

The final part demonstrates how to create a mini map

How to embed a map on the iPhone

October 17th, 2009 by Richard 2 comments »

In the first of a few posts I intend to make I’ll demonstrate some examples using the iPhone SDK.

This example will demonstrate how to embed a map, using the MKMapKit framework inside a UIView using the iPhone SDK. Note you must be using iPhone OS 3.0 or higher for this to work. The ultimate aim is to get a UIView that looks similar to this.

For this example I will assume you are already familiar with navigation and UIViews in the SDK (and so I won’t cover how to get the navigation bar at the top of this screenshot)

MKMapKit

Add the framework

First up you must go to the Frameworks folder of your XCode project and add the existing framework of MKMapKit.

Then inside the header file for your view add

#import <MapKit/MapKit.h>

Adding MapKit references to the header

Now we must add the mapKit instance to the header as well as the MapKit delegate

@interface MapKitViewController : UIViewController <MKMapViewDelegate> {
	MKMapView *mapView;
}
-(void)displayMap;

Initialize the Map

- (void)viewDidLoad {
	mapView = [[MKMapView alloc] initWithFrame:self.view.bounds];
	mapView.delegate=self;

	[self.view addSubview:mapView];
	[NSThread detachNewThreadSelector:@selector(displayMap) toTarget:self withObject:nil];
}

-(void)displayMap {
	MKCoordinateRegion region;
	MKCoordinateSpan span;
	span.latitudeDelta=0.2;
	span.longitudeDelta=0.2;

	CLLocationCoordinate2D location;
	location.latitude = -35;
	location.longitude = 146.2381;
	region.span=span;
	region.center=location;

	[mapView setRegion:region animated:TRUE];
	[mapView regionThatFits:region];
}

- (void)dealloc {
	[mapView release];
        [super dealloc];
}

This will give us a map fitting the screen with the region and zoom level set to best fit the coordinates given. Note that I have physically defined the coordinates here in this example, you can use something like the Google GeoCode API to convert addresses, etc to coordinates. I won’t cover that here.

Changing the map type

In the example above is a tool bar allowing you to switch map types

Let’s define the toolbar in the header file inside the @implementation

UISegmentedControl *buttonBarSegmentedControl;

Now inside the main code inside ViewDidLoad we add

buttonBarSegmentedControl = [[UISegmentedControl alloc] initWithItems:
	[NSArray arrayWithObjects:@"Standard", @"Satellite", @"Hybrid", nil]];
	[buttonBarSegmentedControl setFrame:CGRectMake(30, 10, 280-30, 30)];
        buttonBarSegmentedControl.selectedSegmentIndex = 0.0;	// start by showing the normal picker
	[buttonBarSegmentedControl addTarget:self action:@selector(toggleToolBarChange:) forControlEvents:UIControlEventValueChanged];
	buttonBarSegmentedControl.segmentedControlStyle = UISegmentedControlStyleBar;
	buttonBarSegmentedControl.backgroundColor = [UIColor clearColor];
	[buttonBarSegmentedControl setAlpha:0.8];

	[self.view addSubview:buttonBarSegmentedControl];

Then we must add the function for what happens when we tap on the tool bar

- (void)toggleToolBarChange:(id)sender
{
	UISegmentedControl *segControl = sender;

	switch (segControl.selectedSegmentIndex)
	{
		case 0:	// Map
		{
			[mapView setMapType:MKMapTypeStandard];
			break;
		}
		case 1: // Satellite
		{
			[mapView setMapType:MKMapTypeSatellite];
			break;
		}
		case 2: // Hybrid
		{
			[mapView setMapType:MKMapTypeHybrid];
			break;
		}
	}
}

In the next example, I’ll cover how to add the annotations (the small pins) to the map

The nasty side of Twitter

October 4th, 2009 by Richard No comments »

For most Twitter is a fantastic communication tool.  The way in which any one can follow anyone else and follow their stream of Tweets is exactly what makes Twitter the success that it is.  Unfortunately this level of openness is not without it’s pit falls.

I’ve been following @KirstieMAllsopp for a while now, in case you don’t know who Kirstie is she is British TV presenter and property guru.  After reading a few of her messages, it became clear that Kirstie and other famous celebrity tweeters are the victims of an Internet bullying campaign.

The bullies themselves don’t see that their words are bullying but by the very definition of what cyber bullying is, they are.  Now I won’t link to any of their accounts here because it’ll just give them some sick perversion and draw attention to them directly.

However Kirstie was unable to block them at the time from the mobile website of Twitter and had to wait until she could, consequently a number of people replied to Kirstie offering kind words of support only to have the bullies turn on them and flood their @mentions feed with abuse.

I too have had these messages sent to me and I’ll post a few examples now (self censored so as not to offend)

@KirstieMAllsopp f***** block me will ya ya fat do goody scrubber. Yer programme is s*** and ur fat nd ugly lol

@twbrit u think u r so f****** clever e mailing that fat bird off telly well keep ur f***** thoughts to yerself bout my mates or Ill ave u

@richardhyland if u bad mouth @****** or @********* gin u 4 eyed gimp Ill f****** kick ur chav arse this will be ur only warning c***

And that was just three of around 30 tweets from one of these users in around 30 minutes!

Others included

@KirstieMAllsopp fat s*** (via @******) this one is trying to ban you all @****** She is a seriously obese dull bitch

@KirstieMAllsopp kirstie, where on your body is the perfect location for me to s***? your chest? your hair? your eyes?

I think any sane person will agree it’s pretty foul stuff and whilst most adults swear at some point, there is simply no excuse or point in their sad little tweets apart from upsetting normal people using a great service like Twitter.

Twitter do provide a method of feedback to harassment, yet a week after this came to my attention, every single one of the accounts is still active.  Is Twitter unable or unwilling to do something about it?

Celebrities have often had to put up with a lot because of their fame, paparazzi, untrue stories, but no one deserves to be abused or bullied in this way whether it be online or in person.

Update: Since I posted this, one of the accounts has now gone, I don’t think it was suspended but the user either deleted it or changed his screen name

Update II: Two down now… hopefully more to come

Apple Store Love Song

September 29th, 2009 by Richard No comments »

Simply genius

Computer Game censorship

September 3rd, 2009 by Richard 2 comments »

I read an article today from The Register entitled GTA maker coughs up $20m for ‘hot coffee’ sex.

Now if anyone doesn’t know the background to this story, here it is.  When Take2 released the game Grand Theft Auto: San Andreas there was a hidden mini game in it that involved the character having sex with his girlfriend.

Now this scene, whilst included in the code, was NOT accessible through the gameplay unless you applied a hack to the game itself.

In the US, typically, ‘everyone went mad’ slapping an Adults only rating on the game instead of a Mature rating, a game I’ll note that had already been given an 18 rating by the BBFC here in the UK.

Take2 also spent 10′s of millions pulling all copies off the shelves and then releasing a patched version… only for class-action lawsuits to come rolling in.

Let’s put this in perspective shall we? A checklist of what’s in GTA games

  • Guns – OK
  • Stealing cars – OK
  • Murder – OK
  • Police killing – OK
  • Organised crime – OK
  • Blowing things up – OK
  • Prostitutes – OK
  • Mini-game for having sex with your girlfriend (whilst both characters were FULLY CLOTHED) – OMG we must pull the game off the shelves and everyone sues us!

Here is my take (and also one I read in the comments of the original article) on the situation.

A child keeps pestering their parent to buy them GTA, so they go and buy it regardless of the rating because ‘it’s a computer game’ and ‘all computer games are for kids’ aren’t they?

News of this game hack hits the news which now brings to their parent’s attention that this game is full of sex and violence.

This embarrasses the parent that their bad parenting skills have meant that their little angel is playing a game full of content not designed for them… hence the entire purpose of the RATING SYSTEM!  Obviously the parent can’t be to blame, it must be the fault of the developers, so let’s sue them!

The iTunes App Store review process

August 25th, 2009 by Richard No comments »

Being a small fry iPhone app developer, that being I do so in my own spare time because I like developing apps for the iPhone, I’ve simply got to comment about the App Store review process as it stands.

I won’t make any individual comments about my personal rejections I’ve had except to say. I have had a number of rejections.

One update got rejected numerous times because apparently if you use a UIWebView where the user might be able to get to Google and therefore access pictures of <shock>naked people</shock> then you have to rate your App as 17+.  Let us ignore the fact that they could just close your app and go to mobile Safari shall we, it would be by far easier?

Another one I reason I’ve been rejected for features not doing something Apple think they should, yet that very same feature was actually in the version before it…. still on sale in the App Store.  Inconsistent reviewing doesn’t even begin to cover it!

So this leads me on to a blog post I read today from Joe Hewitt.  For anyone who doesn’t know who Joe is, he is the guy who wrote the amazing Facebook app for the iPhone.

I have only one major complaint with the App Store, and I can state it quite simply: the review process needs to be eliminated completely.

Does that sound scary to you, imagining a world in which any developer can just publish an app to your little touch screen computer without Apple’s saintly reviewers scrubbing it of all evil first? Well, it shouldn’t, because there is this thing called the World Wide Web which already works that way, and it has served millions and millions of people quite well for a long time now.

Go and read his excellent post now at what I totally agree with…. especially as I have one app that I originally submitted a month ago, awaiting approval!

Did you know?

July 31st, 2009 by Richard No comments »