GTA IV Completed!

As I am in between projects and I am sick (glandular fever), I have been playing Grand Theft Auto 4. I completed it an hour ago and have since run around shooting everything I can and mucking about a bit.

It is a great game, the graphics are awesome and the gameplay is great. I find it is not that innovative. Nearly everything has been done before, just not so well. The two things about it the most (apart from multiplayer) is the small details it puts in. Cars get scratched, your phone interferes with the radio and such. Secondly is the story-line. You get to make small changes and you watch Niko make some well informed decisions but always the wrong ones.

For instance, there is small choices you can make ( would prefer there were more) and as opposed to games like Fable and Star Wars, i feel connected to Niko so I want the best things to happen to him, so you generally choose the good path.

X-Play had suggested that it would take 100 hours to complete. I think this includes running around and doing the jumps, flying under the bridges and such small “hidden achievements”. I have completed the game 70% (the storyline is completed) and it has taken me 35 hours.

There are a few things I dislike.

  • If you muck up a mission, you start from the very beginning of that mission. You have to do the chase and such again, and there are some LONG missions.
  • Learning how to disarm someone at the beginning of the game is only useful for that perticular scene, onwards from that you never need to use it again.
  • Often you will cover behind an object in the wrong manner, exposing yourself.
Stats
  • Playing time 35 hours
  • Longest game: 7hrs 30mins
  • Cash: $580,756
  • Missions attempted: 150 (all tries on all missions)
  • Missions passed: 94
0 Comments

Rails Tip: to_s

I haven’t posted much recently as I’ve been very busy at work (more on that later) so I thought I would post another Rails tip.


## Model
class Person < ActiveRecord::Base
def to_s
self.title
end
end

# View
link_to person

# Output
<a href=\"http://foo.bar/person/1\">Zach Inglis</a>

View Pastie

Furthermore you could extend it like this:

## Model
class Person < ActiveRecord::Base
def to_s
self.title
end

def to_param
self.slug
end
end

# View
link_to person

# Output
<a href=\"http://foo.bar/person/zach-inglis\">Zach Inglis</a>

View pastie

1 Comment

Ruby +1 for Google Apps == Ungrateful?

This post popped up on my feeds and after clicking it I thought I would share my opinion here. What I have to say is more an extension of myself than a comment could do for me.

The authors main argument is that people who want to program in Ruby over Python with the Google Apps Engine are ungrateful.

First things first, +1 is fricking annoying, agreed. The people should press the star button and not comment unless they have anything decent to say

But as for the matter of wanting Ruby in Google Apps is not unfair. I have coded Python but my Ruby-fu is far far stronger. I could create wonderful things with the tools I have.

Learning another language to use a tool is a crippled philosophy. If you downloaded software to write plugins and it was a vastly different language, it could be a deal breaker for you, right? Why should it be any less? Google are getting traffic and a bunch of other goodies out of locking you into their domain.

3 Comments

State of the View

After a brief discussion with Obie regarding Rails views, he suggested that I have a look at HAML. I did, and it is now my primary source for using as a templating system in Rails.

YAML and HTML but oddly enough, it really works. I was adamant to not use it, no matter how many people told me to take a look at it. Rightly so, it is a travesty to HTML views, but its a helpful, time-saving travesty.

My dream is to create a Flex-view-like language that uses XML like so:

<mx:DataGrid id="entries" width="{reader.width-15}" dataProvider="{httpRSS.result.rss.channel.item}" cellPress="{body.htmlText=httpRSS.result.rss.channel.item[entries.selectedIndex].description}">
<mx:columns>
<mx:Array>
<mx:DataGridColumn columnName="title" headerText="Title" />
<mx:DataGridColumn columnName="pubDate" headerText="Date" />
</mx:Array>
</mx:columns>
</mx:DataGrid>

It is hard for a lot of people on the web to agree with, as they’ve spent the last 4 years being shoved that “views and content are seperate”, but there is a lot of logic in the above code which I enjoy.

I am curious to know what other people think of the state of HTML, HAML, and other view systems, and what they’d like to see.

1 Comment

SXSW 2008 Wrapup

SXSW has ended and my mind and body have not come back on the same flight.

It is always an awesome event but always tiring too. I usually try to write expansive reviews of the event but this year I am adopting a more bulleted system.

Mark Zuckerberg & Sarah Lacy Interview

Hot on everyone’s lips is the interview being dubbed as the worst interview of all time and such. When watching it, I thought the crowd was being over zealous. They had very high standards and did not feel that Ms Lacy met them. She felt that the interview was “An Interview with Mark Zuckerberg and Sarah Lacy” as opposed to being a tool to elicit questions. She was flirtatious beyond the point of good fun. Notably, many times Mark Zuckerberg hinted that she wasn’t interviewing him in a well manner but it didn’t quite decode in her mind. She failed the interview yet if you watch the after-video she seems to blame everyone else but herself. She started with a bigger introduction for herself than him (granted we know who he is, but she had already thrust herself in the lime-light) and then starts with telling the audience how she feels.

I was in the overflow-room and for it to happen in parallel suggests that it is more than just the crowd.

Also, Its funny she’s never heard of Will Wright, after she said “no one has ever had anyone as big as Mark before”

Egos

The one thing that I dread about SXSW is the egos. There are so many people in the web field with a huge ego. A lot of people got the panels they wanted to because they are known around the web and thought as of reputable sources (whether or not they are is different). Some chose to talk about things they knew about, others did not. It infuriates me no end.

Designers should talk about design, coders should talk about code, freelancers should talk about freelancers as should people who make web apps talk about web apps. And you watch as people with no clue about a subject branch over into another and then watch as people watch them for it.

Another example of egos is at the SXNW party (which ALWAYS rules, good work Blue Flavor) where a friend and I were waiting in a queue for 30 minutes (a mini queue upstairs) when a group of people, who I found out was the Flock crew barged past us and got priority service. This was a common theme so I understood, but the fact there was only 6 people in the line and when we mentioned we’d been waiting, they responded with “It’s fine, we work at Flock!”. Two members of the team got held as there was too many of them. And thus the wait carried on for another 30-60 minutes. I had left about 10 minutes after, angry and unamused.

Gaming

Gaming was a more prominent theme this year and I thought it overcrowded an already overcrowded conference. Game Developers Conference (GDC) was less than a month ago so I saw no reason that this conference should have been diluted even more. You can’t cater for everyone, instead do the best at a few things.

Wrapup

It was great to be there. I met some awesome new people and some good old friends too.

The fact that my hotel room flooded on the last day and got all my stuff wet, didn’t even put a dent in the trip.

The after-conference meetup (also known as the Airport) was awesome fun too.

Check out the photos for yourself!

0 Comments

Obligatory SXSW post.

I realise I don’t think I’ve mentioned, or mentioned recently, that I will be attending SXSW.

I will be arriving tomorrow, followed by my lovely fiancé, Esther on Saturday.

I cannot wait. If you see me, do come up and say Hi, and do not forget to hand me a business card!

See you there.

2 Comments

Rails: Sake recipe: Rename Controller

Have you ever started writing an application to notice there is a typo in the controller name, or you want to name it something else without rewriting your code?

You could change your routes as so;

map.resources :tasks, :controller => "tasks"

But that’s messy. I’ve written a short sake task to rename all your files to the correct new name. It is your job however to rename the class/module titles. If you use testing, as you should, run the tests and you can catch most errors.

Install it,

sudo gem install sake
sake -i rename.sake

Then use it

sake rename:controller FROM=todo TO=tasks


The model task is causing a lot more troubles. So for that I will wait till I create a script/rename

0 Comments

Ruby Tip Of The Day

Thanks goes to Rein on this one.

I hate trolling through .methods finding custom methods, but Rein recently told me of a way that I didn’t have to. For example lets suggest you were looking at the request.methods,

request.methods - Class.methods

So simple I can’t believe I didn’t think of it before.

Also note that you can make it even more usable as so:

(request.methods - Class.methods).to_yaml
1 Comment

Introducing: My Rails Plugins

I was waiting until I switch my blog until Rails only and then going to install Warehouse and list all my plugins there, however having to been forced at gunpoint (or at least metaphorical gunpoint) to try Git, I am starting to really appreciate the nuances that it brings over SVN. I won’t go into that now.

I’ve had many plugins lying around the place ready for consumption by Rails developers but now I shall start storing them online for everyone to use.

Clickable Error Messages

Currently a bit of a hack-job, was built before I even jumped on the REST boat and knew about @object.to_xml but essentially makes the fields in error_messages_for clickable.

Dashboard Location

With this plugin it takes 2 minutes (no, seriously) to add Basecamp-like urls to your project. Thanks goes to both David Heinemeier Hansson and Derek Haynes for their plugins.

Form Helper Fieldset

Simply wrap your inputs and labels in a fieldset block, passing a string aswell if you want a legend and it wraps it in fieldsets in the html for you.

Of course there are more to come as I can track down some of my plugins in the wild.

Get the plugins from GitHub here!

Any other downloadable work will go on my profile.

1 Comment

AirFoil, For Windows Speakers

The guys over at Rogue Amoeba have just released a new version of AirFoil.

Yesterday I emailed them as I was trying to set up AirFoil to goto my Windows PC (so when watching things or listening to music it would come out in the crystal quality that is my speakers rather than the tinny sound of the Macbook Pro.

Yesterday, I emailed them asking them if I could do so. Unfortunately there was no solution. Today is a different day and they emailed telling me they support it. It also looks like they support AppleTV now! Go them.

0 Comments