Xcode and Multiple Scheme

It looks complicated at first but I'd definitely recommend setting this up if you have any variables in your app that require different environment variables.

It looks complicated at first but I'd definitely recommend setting this up if you have any variables in your app that require different environment variables.

Understanding Configurations and Schemes

Before we proceed, though, it is important to understand Xcode’s Configuration and Schemeconcepts as this technique relies quite heavily on them.

Configuration defines the set of compiler settings that will to be used. By default, Xcode creates two configurations for you (Debug and Release) when you create a new iOS project. Most of the settings are the same but there are a bunch of settings that vary between a Debug build and aRelease build.


Why page rank isn't everything

I noticed today that this blog has a page rank of 2.Which is fine. (Although I'd like a higher one so feel free to link to this blog post!) One of my other websites that I have blogged about before facemash.com.au has a page rank of 1 and as I have previously mentioned facemash gets a suprising amount of hits

Another site of mine phonewallpapers.mobi has page rank of 3. Which gets around the same amount of hits as this blog.

I find this very interesting as alot of people are very focused on increasing their page rank by paying for or creating back links. But google really isn't that silly. You must create something relevant and interesting if you want to rank well, whether thats interesting content, such as this blog ;) or voting on myspace profiles which people seem to love. Alot of people believe if you have a high page rank you'll have visitors rushing in.  Whilst this may be true in some cases. Its not everything, as you can see from the above observations it defiantly isn't a measure in the amount of visitors you will receive. Its more a measure of authority which can lead to an increase amount of visitors. Which has led me to believe that content is king as long as its relevant and engaging.(Matt Cutts who features on the Google Webmaster Help is a great resource for more information on this) I guess for some it might seem obvious that if you create something engaging people will visit your site. But I believe its a point that needs to be pushed as its something that is frequently forgotten, especially in the world of SEO optimisation. There is no point in optimising your site if theres nothing on the site thats worth seeing in the first place.

So you ask what am I selling? Apart from myself through this blog. Nothing at the moment as I haven't finished creating it but you can take a sneak peak at www.bingybongy.com


Facemash fool proofing your code, don't count on it

Be sure to have a look at my new project Bingy Bongy our first interactive children's book app is going feature a Bat and sign up. Ok I finally got round to updating the facemash.com.au website I created over a year ago. I thought I'd just checkup on the code as I noticed the site was running very slow. If you don't know the history of my facemash its a site that I created in a day just as a  "proof of concept" and for a bit of a laugh after watching the Social Network Movie.

Far to often I go back to my code and say wow what was I thinking this was a major what was I thinking (I'm blaming the fact that I smashed it up in a day). The Facemash voting log has grown, grown alot! At last count to around 1 184 713, yeah thats right over 1.1millon votes have been casted! I'm surprised its so many although I shouldn't be because the site gets around 400 visits per day and on some days will peak at over 1000.

So I went on a quest to find out why the site was so slow I knew it was something todo with the Facemash Log table since it had over 1.1 million records, turns out I was doing not 1 but 2  SQL Count queries and this was being done for each display picture being display.  At the time I probably though "ah it'll be fine" it won't get that much traffic. Well this is proof, that the KISS principle isn't always the best.

Here is the offending code

public static int GetWinCount(Face face)
            int count = 0;
            using (SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["Default"].ConnectionString))
                SqlCommand command = new SqlCommand();
                command.Connection = connection;

                command.CommandText = "SELECT COUNT(ID) FROM FaceLog WHERE (FaceID1 = @FaceID AND FaceID1Winner = 1) OR (FaceID2 = @FaceID AND FaceID2Winner =1) ";

                command.Parameters.Add(new SqlParameter("@FaceID", face.ID));


                count = (int)command.ExecuteScalar();

            return count;

What started all this code optimisation is over the past weeks, I've been trying out a few different hosting providers as I'm currently paying $99US a month for a VPS server in the US which I feel is too much (I've got several different blogs and websites on not just this one). I've finally settled on Amazon AWS, and I'm quiet pleased Volume snap shots are a nice feature. So it just shows if your like me and you'll got a couple of sites ticking away take 10 minutes to have a look at the old code and make sure you weren't trying to KITS (Keeping It Too Simple)


Betts Mag App Launch in the Apple App Store

UPDATE: I'll be submitting an updated 1.1 version this afternoon which really polishes the app so be sure to lookout for that. The iPhone companion app uses String™ Augmented Reality which was really easy to work with, and I'm hoping that I'll be able to develop a few more apps using it. In the Betts Spring 2011 catalog which is currently instores you'll see the Betts Mag App iPhone app is featured. Here you can scan the icons inside the printed mag and unlock extra app features.


Also there are about 8 rich media shoe products where you can see 3 Ways to Wear and touch to spin 360 view spin of the products.




The iPad app allows you to browse the Spring Summer Catalog.


Which data type should you use C#

MSDN BlogI find it kind of interesting that they're telling programmers not to use Byte, sbyte, short, ushort, uint, and ulong seems a bit silly if those data types aren't worth the hassle and you can't figure which one to use maybe you shouldn't be programming?

Read More

The Apple Web App Store: My experience

Just over a month ago I submitted my iPhone wallpapers website to the Apple web app store.You can see it here Phone Wallpapers This has been a difficult process, for the first few days the link was broken and was giving a 404 error so I resubmitted it and after several emails to the support/feedback address it was finally fixed it

Read More

C # Google Sitemap.xml class

I originally wrote C# class because I couldn't find a simple class for dynamically creatingthe sitemap.xml file that google and other search engines like use to crawl your site. It was written some time ago for a previous website called eFood Order. and since then I have used it several times. I think its more relevant if I post it here though.

Read More