iPhone 3GS – 2 weeks on

Product Reviews, Technical Info No Comments »

Last month I posted about my first impressions of the iPhone. Having owned  it for nearly 2 weeks I thought I would post my thoughts on what it is like to live with day to day.

Don’t drop the phone!

My first impression of the phone is it feels very very slippery. The smooth screen and the smooth plastic back make it feel like it is going to jump out of your hands. This is not just my opinion, everyone I have passed it to has handled it like it is made of crystal.

With this in mind my first purchase was a leather slip case from Ikonicedge. Without going into details, fantastic product!

Usability

I must say the new 3.0 features are really rather good. Push notification is coming to a lot of my day-to-day apps and it really is welcome. I can have IM+ active and will receive an alert when a new message arrives. I have seen a noticeable decrease in incoming SMS since that has been active, in favour of shooting over an IM instead.

The wifi works REALLY well! When I walk into the house it auto-connects to the wifi network, which is great for receiving calls on skype etc, and great if your house isn’t in a 3G area.

Features and Apps

Just like the adverts suggest, for most things you would need to do day to day there really is “an app for that”. Not all of them are free, but most of them are quite cheap and generally very good quality.

I like the way the app store auto checks for updates, and when I wake up in the morning I click update and several of my apps update to the latest version… slick!

One thing to beware of it I have found myself loading the phone with small cheap apps for 59p, then finding that 59p + 59p + 59p + 59p etc does add up! (yes, to £2.36!)

Addictive!

Oh… my… word… If you want your productivity levels to remain what they were before you bought the iPhone do NOT install games, specifically Flight Control. This is positively the most addictive game I have ever played and I just can’t put it down! You have been warned! BTW, if you buy it (just 59p at the moment) my high score is 74 on the default map.

Phone + email

As a phone it works great. The contacts list is slick, the interface is great and the call quality is fantastic. I can’t fault it one bit. If it had a blacklist feature (you can get this only by jailbreaking it) then it would be perfect.

Email works really well too. I don’t use push email so I have yet to experience that, but the standard 15 minute check works for me. If an email reply cant wait 15 mins then the sender really should have called me! The interface to mail is very nice. There are a few features I would like to have seen like the ability to “select all” or select a group of messages without having to click them individually, but for a mobile app it does the job and does it well.

SMS

The sms functionality is nice too. I used an N95 before which was nothing short of embarrassing… really!!! To have an SMS app that didn’t display the time the message was received, well, enough said about that!

The iPhone deals with SMS’s as conversation threads. When a message is received and you open it you also see the previous messages sent too and from the individual. I tend to send my SMS via JellySMS and clickatell (Internet SMS provider) as international SMS messages are much cheaper that way, consequently I only see half the conversation. For general use though, it works well.

Conclusion

I love the iPhone! Not in a physical way, that would be wrong(!), but as a phone/gadget it really is great. The camera in the 3GS is great (no flash, but you can’t have everything) and there are very few frustrations with it. Battery life would be one I suppose, but the N95 had the worst battery in the world, so even that seems good to me. With normal use it could last a couple of days.

I am still in the honeymoon period with this phone, where I am taking great care of it and making sure it does not get scratched/bashed etc. I imagine this will last a bit longer than it usually does with my phones, especially considering how much I paid for it.

I will no doubt post more updates as I go, but for now I am very happy with my purchase. As a phone is it value for money… hell no… not as a geek gadget does it make me smile when I use it, absofreakenlutely!

Google Adsense and the privacy policy

General Interest, Technical Info 5 Comments »

Part of Google’s terms and conditions is that each with with Adsense on it MUST have a privacy policy. This is all well and good, but most of them are pretty generic, and unless you are a lawyer you may want to use a standard one that is floating about on the Internet.

The problem is, Google has told us time and time again that you should do everything in your power to avoid duplicate content. We also know that if you have part of your site that must have duplicate content the easiest way to avoid it is to add a do not follow line to the robots.txt file.

This is great, and it works, but then how will Google know if you have a privacy policy or not, if you don’t allow it’s robots in there? Is there a guy employed on minimum wage to trawl through manually and make a note of it?

For now I have left it as it is, but I do wonder if Google will see it as duplicate content, along with half the Internet? Or is it clever enough to pick up on the keywords and turn a blind eye?

World Cup 2010 countdown

Technical Info 2 Comments »

I have just made a little World Cup 2010 countdown widget for one of my sites, and though I would share it in case anyone would like to use it. The thermometer goals chart I made a while back gets lots of use, so hopefully this will be useful for someone.

World Cup 2010 countdown

If you want to use this image on your site, simply add it to your page as follows:

<img src=”http://www.thinksynergy.co.uk/scripts/worldcupcountdown.jpg” alt=”World Cup Countdown”/>

Note: If you cut/paste the above, please make sure the “” are pasted correctly, and dont end up curly quotes!

Converting a PHP string number into a numeric value

Technical Info 3 Comments »

Despite seeming like a very basic procedure, this evening I found I had wasted half an hour, split between Googling for the answer and trying to work it out for myself.

I have a number that needs to be stored in a string format in PHP. However, I need to use this value at some point to run a calculation, for which I need the true value as opposed to the string. If I had just wanted a whole number the answer is very simple, use the PHP (int) method to convert it.

It is not that easy when you are working with decimals. Unless I am missing something (in which case feel free to embarass me in the comments below!) there is no easy way to do this. Here is what I came up with:

$string = "3.142";        // The source number, as a string
$a = explode(".",$string);            // Split the string, using the decimal point as separator
$int = $a[0];                        // The section before the decimal point
$dec = $a[1];                        // The section after the decimal point
$lengthofnum=strlen($dec);            // Get the num of characters after the decimal point
$divider="1";                        // This sets the divider at 1
$i=0;
while($i < ($lengthofnum)) {
$divider.="0";                    // Adds a zero to the divider for every char after the decimal point
$i++;
}
$divider=(int)$divider;                // Converts the divider (currently a string) to an integer
$total=$int+($dec/$divider);        // compiles the total back as a numeric value

If anyone knows of a quicker / cleaner / better / more funky way of doing this simple task please do let me know… if not then I hope this little snippet at least lets you avoid losing the half our of your life that I lost this evening!

UPDATE: Thanks to Xobman, who Twittered me this little gem:

Try $foo = “3.123″; $bar = (float) $foo;

LOL… low and behold, it works! That’ll teach me to post my (oh so clever!) code on the Interweb for all to see :D

Thanks Xobman!

Forum vs Wordpress

General Interest, Technical Info 6 Comments »

Please bear with me on this one, I know they are very different beasts but I have been experimenting with a new concept (to me) over the weekend and would like to invite comments.

I have a site I have been running for a while which I would like to turn from a blog where comments are invited to a community. As much as I like forums in certain circumstances they can be a little bland when compared to a blog. This made me wonder what the potential is to combine the two.

A site I use on a daily basis is hotukdeals.com. This site uses a highly customised vBulletin installation to present the information in a blog-esque format. It works well, people can vote items hot and cold, but they have to register to comment.

Looking into it in a bit more detail it seems there are positives and negatives to using a forum vs using Wordpress.

As much as people love Wordpress (I do!), it seems to me to be a platform designed to publish information and then get comments on it. If you want a community then everyone needs the ability to publish. This is possible with Wordpress but it’s a bit messy and still involved the back end. With a forum people can hit new post and post within the site itself.

The disadvantage of the forum is users generally have to register in order to comment. You can turn this off but forums don’t cope with this quite as well as Wordpress does. This may deter the passing comment and rely on people buying in to the site.

My theory is to run a forum on the site but use the RSS feed to link the information to the front page, run by Wordpress, replacing the usual blog posts. This way I have Wordpress running the page areas of the site but the front page content is dragged in via an RSS widget. I don’t yet know how well this will work or whether a forum portal would be a better solution, but I guess I will find out once I have it up and running.

So…

Am I being crazy?

Are there benefits I am missing to using one over the other?

Does using both make sense?

This all came to me on a whim, so I apologise for the lack of in-depth research, I just thought at this point it may be a good idea to poll the readership.

How wide should your site be?

General Interest, Technical Info 6 Comments »

This is an age old debate, trying to strike a balance of usability between the users with older setups and smaller screen resolutions and those with modern wide-screen (or just plain hi-res) displays.

I have followed this debate for many years and the argument seems to always cater for “what the site looks like full-screen”. I don’t know how you work, but personally I have lots of things happening on my desktop and many windows open. I cannot remember the last time I opened a browser window full-screen.

That said, if I was running in 1024 x 768 resolution then maybe I would work differently, I don’t know because I have not used that resolution in 10 years.

The thing I love about hi-res displays is they allow me to have a browser windop open, still see parts of my desktop, have email visible (albeit not the whole window), but running full-screen just feels claustrophobic to me.

That said, I am less bothered about the upper end of the scale, they don’t HAVE to run full-screen, and providing the site isn’t too narrow then I’m sure they will manage.

This leads us to the question of “how narrow do we have to go?”. I am seeing more and more sites with quite large widths. A few years back 750px used to be the norm, then 850px. Nowadays a lot of sites are over 1000px wide. Is this too wide?

There is no answer to this, hence it has been an ongoing debate for years. How wide is too wide?

The other question to bear in mind is whether the content on the right makes a difference to how wide you are willing to go. If everything to the right of the 850px mark is adverts for example, does that mean that the fact that the users on lower resolutions (the minority) can see the navigation and the main body content make it an acceptable width?

My gut feeling was crossing the 1000px mark was a little bit much, but with a little bit of investigation I have found that some of the most widely used blog templates actually cross this boundary.

Has the width-creep occurred while I have been asleep?

In my mind these themes look fine. I even opened them on my secondary monitor (1280×1024) and it looks fine. I can’t say I would want it to be any wider, but still it looks fine to me.

What do you think? How wide is too wide?

Displaying a random image using PHP

Technical Info 5 Comments »

Lyndi posted about displaying an image at random the other day. Her solution was to use javascript as it enabled the page to do this even if the server had caching on. It was a good solution, but it got me thinking about going in a slightly different direction…

The solution relied on the image names being hard coded into the script. I thought it would be quite cool to come up with a solution that simply looked in a directory for all the JPG’s or GIF’s, and plucked one at random.

This is what I came up with:

<?php
$dir = “images”; // The directory where your images are
$filetypes = (”jpg”||”gif”); // Whatever images are valid. You could add “png” etc

srand((double)microtime()*123456789); // Generates a random number seed
$count = 0; // Initialises the counter

$dirOpen = opendir($dir); // Opens the image directory

while(($im = readdir($dirOpen)))
{
if($im != “..” && $im != “.” && substr($im,-3)==$filetypes) // Disregards “..” and “.” (direcrory structure)
{
$image[$count] = $im; // Reads an image
$count++; // Increments the counter
}
}

closedir($dirOpen); // Closes the directory

$randname = rand(0,(count($image)-1)); // Generates the random number
echo ‘<img src=”‘.$dir.’/’.$image[$randname].’” alt=”Random Image” />’; // Publishes the image

?>

I have commented the code, so it should be fairly self-explanatory how it works.

It is a bit rough and ready, but it does the job. To implement this on a website, simply use:

<? include(’randimg.php’)?>

The beauty of this solution is you can add as many images as you like to the images (or whatever you call it) folder. Add and remove them at will and the script just picks from the images that are there at the time.

Let me know what you think.

Backup strategy revisited

General Interest, Technical Info 9 Comments »

I am taking my Macbook Pro in for repair today, so I spent most of last night backing up all the data (critical and non-critical) in case the system needs restoring or it has to be away for a while. It made me re-evaluate my backup strategy a bit.

I do the majority of my work on my Macbook pro (120Gb) on my home wireless network. I also have a Linux machine as a backup solution. This backs up to an external 250Gb hard drive overnight, using rsync (so as to only backup the changed files).

This solution is not great, and it is a bit cumbersome. I plan to replace this with a solution that will involve RAID-1 (two hard drives mirrored. If one fails nothing is lost).

There are a few ways to do this:

  • I could add RAID 1 to the Linux machine. This is a little difficult as it is a tiny machine that sits underneith the TV and there is really not the room for a second hard drive.
  • I could replace the external hard drive with a USB enclosure that uses RAID 1. This is not too expensive, but adds a second device which also needs space and power.
  • I could invest in a NAS box, such as a Synology, QSNAP or Thecus.

BUT, it’s not that simple…

As I do most of my work on the Macbook the first and formost important thing for me is to backup that data, live data that I am working on at the time.

As I work on a wireless network I dont want to transfer 120Gb every time I backup. This leaves be two options:

  • I could use a backup program that detects changes
  • I could use OSX’s built in Time Machine

Time Machine takes hourly backups of the current dat, along with weekly and monthly backups as space allows. The problem is it only works (properly) using Apple Airport hardware. There are hacks around for getting it working on a normal NAS, but there are pitfalls as well.

I have experimented with rsync options and even those seem to interfere with the operation of the macbook while I am working. Time Machine (from what I see) is fairly seamless.

So…

That leaves one option, the Apple Airport Extreme.

Although it does not (as standard) use RAID the data is actually in two places anyway, the Macbook and the backup drive. This is a perfect solution for the Macbook backup, but what about archives?

Archives work a little differently. Data is passed from the Macbook to the Airport-attached hard drive. Once it is there it gets deleted from the Macbook.

This means that is the hard drive fails the data is lost… back to RAID!

After consideration I feel my best solution is to use the Apple Airport Extrme with a hardware RAID external hard drive. This means that the macbook live data is actually on 3 hard drives, and the archive data is on 2.

What do you guys use for your backup solution and archive data?

Forum modifications – worth it?

Technical Info 3 Comments »

A week ago I got an email letting me know the forum software I use had released an update. As one of my sites runs on this software I planned to do the update this Sunday (today). I awoke at 8:30am and decided to crack on with it, but as I turned on my laptop I received another email… there was ANOTHER update!

“Great”, I thought!… oh… how wrong was I?!!!…

The problem was, the forum I run is quite a large one, with lots of members and a few modifications. As it is a worldwide forum there is a mod on there letting members display a little flag showing their nationality. This is a great little mod, and people like it a lot, but upon upgrade it broke! After the upgrade happened the flags were no more.

The problem

The problem is the way the forum software works is not very “mod friendly”. It’s not like Wordpress where your mods are protected somewhat, modifying a forum required major surgery to the core files… not nice when it comes to upgrade time!

Anyway, all in all there were two mods that broke, the flags and the “quick reply” feature. The quick reply was an easy fix, as it only involved alterations to a single file, so fairly low maintenance, but the flags mod was a lot of work to find out what went wrong.

By the time I had finished with this fiasco it was well into the afternoon. This made me think, are these mods really worth it? Fair enough, if the version of the forum was fixed, great, but it’s not… there will always be fix released and bug patches going on, each giving the possibility of your mod breaking.

…and so…

I have learned a lot of the the past year or so, but I am learning that sometimes it is necessary to simplify things in order to give the reliability necessary to keep a site running, in order to maintain your own sanity, and not give your entire Sunday up in the quest to get “the little flags working”.

By the time I think about all the time I have spent making sure these modifications survive all the upgrades, these aren’t half expensive little flags!

Changing your post title can be a bad idea!

Technical Info 3 Comments »

I posted recently about the importance of setting the correct blog post title. This made me think of something I came across a while ago. Once again it is something quite simple yet very important, that is getting your blog post title right, first time!

Here’s why…

If you blog like I do you may blog fast and furious manner, in a quest to hit that Publish button. You may or may not give a tremendous amount of thought to checking things like spelling (you should, but then it’s easier said than done) until after it’s published.

In the case of spelling it’s not the end of the world. Enter the admin panel again… manage… posts… select… edit… save… DONE!

Where things come unstuck occasionally is changing the title, or more importantly changing the permalink that goes with it.

Why is this?

Basically, under the hood of your Wordpress installation lies the UPDATE section (under settings/writing). This contains something like http://rpc.pingomatic.com/ and means when you post a blog article it updates various feeds from Google to Yahoo to Technorati.

This is all well and good, but what happens if it updates them with your latest and greatest post, only for you go back in there and change the title and permalink? That’s right, it won’t be able to find it!

I would have thought it was intelligent enough to go back in there and update these services, maybe it’s supposed to, who knows? All I know is I have looked at my stats on occasion and found attempted visits trying to find the old page, only to be greeted by a 404 error.

There are plugins out there that will handle this sort of thing and maintain a list of old pages and their corresponding new ones. Personally I find it easier just to spend a little time hovering over the Publish button, checking the permalink is correct before I submit the post.

The benefit of taking time doing this is you can craft your permalink to take out the irrelevant words, leaving a short, accurate, keyword rich description of your post.