Xbox 360 – false economy

March 23rd, 2010

The main thing that caused me to buy an Xbox 360 rather than a PlayStation 3 was the price, as it probably is with a lot of people. However, now I am starting to regret that decision.

To buy a 360 with HDMI, you need to get the most expensive version, the Elite, which is £200. On top of that, it doesn’t play Blu-ray so if you want that (and you will, eventually) add another £130 for a LG BD370, then you later find out how bad the media streaming is on the 360, something which you will probably also want eventually. Things like a complete lack of subtitles and surround sound audio causing the media to error completely rather than even play without sound or down-convert to stereo (on the same codec, AAC, which does work). This means you end up needing an additional piece streaming hardware. I chose the xtreamer for another €99 (£89).

Thats without even having any wireless options.

Total price comes out at about £420, compared to the 120GB PlayStation 3 Slim at £250. That’s almost double the price for the same, or fewer, features.

wp-syntax to look like Visual Studio

March 23rd, 2010

wp-syntax is a nice plugin for WordPress using GeSHi to produce syntax highlighted blocks of code.

The default colours aren’t very nice though, and there is no way to easily change them. wp-syntax-colorizer (horrible name) makes it easier to set the colours, but defaults to even worse colours.

Most of us want readable colours that we are used to from IDEs, and most of us will be using either Visual Studio or Eclipse. I mainly use the former. To get it to use the visual studio colours I edit wp-syntax-colorizer as follows:

function my_custom_geshi_styles(&$geshi)
{
  $overall = "black";
  $keyword = "blue";
  $literal = "maroon";
  $comment = "green";
 
  $geshi->set_overall_style("color: $overall;", true);
 
  $geshi->set_keyword_group_style(1, "color: $keyword;", true);
  $geshi->set_keyword_group_style(2, "color: $keyword;", true);
  $geshi->set_keyword_group_style(3, "color: $keyword;", true);
  $geshi->set_keyword_group_style(4, "color: $keyword;", true);
 
  $geshi->set_symbols_style("color: $overall;", true);
  $geshi->set_methods_style(1, "color: $overall;", true);
  $geshi->set_regexps_style(1, "color: $overall;", true);
 
  $geshi->set_strings_style("color: $literal;", true);
  $geshi->set_numbers_style("color: $literal;", true);
 
  $geshi->set_comments_style(1, "color: $comment;", true);
  $geshi->set_comments_style('MULTI',"color: $comment;", true);
}

Remove Size bbcode from phpbb

March 4th, 2010

One of the most annoying things about phpBB is the ability for people to randomly use [size="200"]Huge[/size] BB code, with no easy way to remove it and every time you update between versions it comes back.

To disable it:
in /include/bbcode.php remove the whole

case 5:
...
break;

section.

To remove it from the posting page:
in /styles/prosilver/template/posting_buttons.html remove the whole

<select>
...
</select>

section.

After that, delete your “cache” directory so that it uses the new copy.

Remember that you have to repeat this process after every update to phpBB3.

Buy glasses online

March 2nd, 2010

I buy contact lenses online and I love my Air Optix Night & Day (now “Aqua” for 30 days continuous wear, which is what I was doing anyway) contact lenses and you can wear them almost non stop without issue, as if you have perfectly working eyes, but you still need to take them out from time to time to rest your eyes, particularly if you wear them for longer than you are supposed to like I do.

However, I just bought my first pair of glasses online ever from Glasses Direct and I was quite impressed with it. It definitely beats trying on glasses for hours in the shop under pressure from the assistant, the whole time you can’t actually see any of them because you don’t have your glasses on, particularly when the shop doesn’t have much choice and all you can see are ugly expensive designer brands.

At the moment they even give a free pair of these, which I ended up liking more than the glasses I actually chose.

However, I made a couple of mistakes when buying from there. I’m sharing them here so that others won’t make the same mistakes.

  1. Get a recent prescription from your optician. Mine never gave me prescriptions when I was young then I kept the same glasses for something like 10 years, then I switched to contact lenses which just have “-1.50″ written on them. This website asks for more numbers than just that, so make sure you get the right prescription. Unfortunately, I got the wrong prescription in one eye.
  2. Check the dimensions of the glasses before you buy. They vary wildly. The wind pair I actually chose is far too big for my head (supposedly 122mm, closer to 150mm) but the free pair I got (supposedly 119mm, closer to 125mm) fits fine

Luckily for me, they accept returns and seem to have an excellent 14 day from postage, no quibble, replace or refund policy on it. They just don’t refund delivery, but I wouldn’t expect them to.

Moving comments in WordPress

February 7th, 2010

In MySQL, first move the comment:

UPDATE wp_comments SET comment_post_ID = P_TO_ID WHERE comment_ID = C_ID;

P_TO_ID is the ID of the post you are moving it to. C_ID is the ID of the comment you are moving. You can find both of these IDs easily from the dashboard.

Then correct the comment counts for the posts:

UPDATE wp_posts SET comment_count = (SELECT COUNT(*) FROM wp_comments WHERE comment_post_id = id AND comment_approved = 1)
WHERE comment_count != (SELECT COUNT(*) FROM wp_comments WHERE comment_post_id = id AND comment_approved = 1);

The second line in this query is not strictly necessary but it lets you know how many posts were affected.

Terra Nova

January 29th, 2010

So I was at the cinema recently watching a certain disappointing 3D movie and a trailer came up for Battle for Terra, a CGI movie that is already available on Blu-ray in some countries but is only coming to UK cinemas in February 2010. The plot is that humans are the aliens and after destroying earth (crap, another eco-hippie movie) they go to invade an alien planet called Terra. Much like the other disappointing 3D movie with the similar plot, I couldn’t work out if I should be supporting the humans or the aliens.

Anyway, didn’t anyone notice that “Terra” is Latin for “Earth” when they started writing this thing? If it was called Terra Nova (new Earth) or something like that I could understand but apparently these aliens live on a planet that just happens to have exactly the same name or something.

Geek love

January 24th, 2010

On a scale from 1 to 10, you require an arbitrary length integer.

Which came first, the chicken or the egg?

January 23rd, 2010

The egg, fool! Dinosaurs didn’t hatch out of chickens!

Socket 1366 (i7/Xeon) Workstation motherboards

December 30th, 2009

I’m waiting for a decent dual socket Core i7 or same generation Xeon motherboard to come out from a good manufacturer, such as Asus.

It seems to just be Intel, Tyan and Supermicro boards so far. Asus lists a couple of P6T boards (P6T6 WS, P6T7 WS) but nothing dual socket yet.

Come to think of it, I wonder what the limit for the number of sockets/cores/threads you can put in Windows 7 is, since Core i7 is 4 cores/8 threads each so dual socket would be 8 cores, 16 threads.

Anyway, if I’m missing something here someone let me know :)

Update: Puget build some nice stuff but I’m sure you can get roughly the same performance for much less than $16,000.
- $16,000 4 socket 16 core Operteron PC (more photos)
- 8 socket 32 core Opteron PC (via daughter board)

I’m getting envious of other systems and I haven’t even built this one yet.

Update 2: EVGA’s Classified SR-2 seems to finally meet these needs, although at a major price tag of $600 (which probably means €600 and £600 too)
EVGA Classified SR-2

Update 3: Overclockers UK will start selling this on 1 July 2010 for a ridiculous (as predeicted) £550. However, beware when using this site. I have had problems returning clearly faulty goods to them before (specifically a £400+ HD4870X2 that could not render 3D), which pretty much means you should assume this website has no return policy whatsoever.

It will also only run Xeons anyway which probably puts overclocking off the table, and means you’re only buying this if you want 2-4 graphics cards. I just got a Tyan S7002AG2NR instead and will get a dual-GPU graphics card (a dual GPU fermi if that ever comes out).

Update 4: NEVER buy a Tyan product
The above link for Tyan’s motherboard clearly claims that the board supports “Intel Xeon Processor 5500/ 5600 Series” CPUs, has an icon for 32nm (5600 series) CPUs at the top and also “six core” (5600 series only). However, the board itself does not support 5600 series CPUs at all. Tyan’s idea of “support” for this problem is to tell me to buy 5500 series CPUs instead.

I received the following messages from “Kevin” at Tyan support:
“The 5620 processors are not compatible. Please try a supported processor from our CPU compatibility list”

When I pointed out that 5600 compatibility is clearly listed on their product page, I received the following response:
“The CPU compatibility chart does not specifically state the 5620 as a supported processor for this, or any of the other 7XXX-series motherboards. The board was designed to support the 5600-series processors in the future, but will most likely require a CPU micro-coding update. I highly advise you to obtain a supported processor from our validated list.”

Note that the “CPU compatibility chart” in their support section does not list *any* 5600 series CPUs, even though the product page does. It is not just a problem with the 5620s specifically.

Well, screw that. I’m not going to keep using their faulty and misleading product and spend a fortune on new CPUs (note that Intel CPUs cannot be returned once opened, as they are sealed and become unsaleable if the seal is broken). So, I’m switching to the SuperMicro X8DAL-i board, which SuperMicro assure me will support the 5620 CPUs as long as the board is revision 2.0 or higher. (earlier revisions will also support it but lose a couple of features and require a BIOS update that you can’t flash unless you have a spare Xeon 5500 lying around – the Rev. 2.0 boards come with all of the features and the supported BIOS out of the box)

I’m posting this message as a warning to anyone looking to buy a component from Tyan in the future. Their advertising is not just misleading but outright wrong, their products are faulty, and their support is terrible. Do not buy from them. Maybe if they lose enough business they will sort themselves out.

Convert any audio/video files to mp3 for free

November 24th, 2009

It seems that there is some confusion about audio conversion tools and some people even pay for them.

The truth is that most encoders, even ones you pay for, use ffmpeg internally to do all of the actual work and ffmpeg is free and open source.

You can even get it pre-compiled for Windows, though the version isn’t great.

The only problem with using ffmpeg directly is that it has a command line interface and most novices find it hard to use.

Here’s a batch file for use on Windows which will convert anything you drop onto the file into a 320kbps mp3:

ffmpeg -i %1 -ab 320k -y %1.mp3
@if errorlevel 1 @pause

To create this file, open notepad. Copy and paste the above 2 lines in. Save it as “convert.bat” or something similar (the .bat is important) and select “All files” from the drop down list.

Put the bat file in the same directory as ffmpeg.exe and simply drag anything you want converted on top of the bat file.

You can use almost anything. wav, m4a, m4v, mov, mpg, avi, etc. If you use a file with both audio and video, such as a movie, it will just extract the audio and save that as an mp3 file.