Its been an year since i Switched from Wordpress to jekyll. I registered this domain name while I was using wordpress by using the wordpress upgrades and paid $10 for it. After switching to jekyll I pointed the aliirz.com to name servers at Linode. Two days ago I got an email from Wordpress Customer services that my domain registration is about to expire and I need renew it. As soon as I saw the email I signed into my wordpress dashboard to make the payment. To my surprise I got the following error message when I tried to make the payment:
This credit card was issued from an unsupported country.
Now this make me a little angry and disappointed. So I emailed back the customer service:
Hello
I am trying to upgrade my domain manually and I am getting the following
error:This credit card was issued from an unsupported country.
This is quite disappointing as I used the same card to purchase and map
my domain on WordPress an year ago. Can you please help?Regards
I was expecting a reply that would say something like “I am sorry we no longer accept credit cards from your country as per our new policy. Happy Wordpressing”. If it had been this kind a reply I would’ve gone all nuclear on wordpress but to my surprise instead this is that they replied back with today:
Hi Ali,
Sorry for the delay in getting back to you!
This is known issue, our credit card processor recently changed the counties that they accept cards from. We are currently investigation alternatives, but in the mean time I have added a full year to the domain registration and domain mapping for you.
If there is anything else I can help with just let me know.
Ray
WordPress.com | Automattic
Folks! Thats the kind of customer service that makes you smile. I love you wordpress! :)
Happy Birthday Ali old boy. Yes, today is my 25th Birthday. I have been looking back at the time and my achievements. I have been thinking, Am I really happy with all this? The answer is a bit confusing but I can see that today I have come to the point where I am forced to think over all my priorities and what I want to do. I want to do something big, I want to do something that makes me happy. Its time I start re-thinking life and start doing what I want rather than letting events or people drive me.
I cannot share anymore thoughts on this at the moment but All I know for now is that I just want to be happy :)
Many of you do not know that my first smartphone was a Windows Mobile 6.5 based i-Mate JasJam . I loved that phone it was all one geek could ask for at that time, it had GPS, Google Maps, a powerful browser, a Qwerty keyboard and a stylus(trust me stylus’ were cool back then) I got this phone as a gift from my brother. Boy, Was I happy with it. After an year of usage the whole shashka(awesomeness) of the phone started to die, possibly because Microsoft stopped focusing on their Mobile OS side. So I sold the phone to a friend and bought an N900.
Now the N900 is different. It is actually the coolest phone I’ve ever come across. Why? Because its a pure hacker’s device.
Based on a Linux Distribution called Maemo, it totally packs a punch. It has a terminal, you can sudo like any other Linux Distro and best of all its a completely community driven effort. I am not selling this device, I have decided to keep it for as long as it functions. Nokia does not manufacture or support this device anymore, but the powerful user-driven community does and I am proud to be a part of it.
But I am looking forward to get something else to use as a secondary phone and you might’ve guessed it. Yes, the new windows phone based devices are among my list. I am a bit confused in what to get, but this post is about the Windows Phone and why it attracts me today. So lets bring in the reasons:
The new metro UI is awe-inspiring and to be honest I am bored by looking at the same UI of iOS and Android phones. So the UI is a welcome change.
One of the best features are the live tiles, they are like widgets but only better. They work in real-time and show you live information such as messages, GPS location, Email etc. The new UI makes everything very accessible from the Home screen.
iOS 5 came with an integrated Twitter Layer for apps to utilize. Windows Phone 7.5 does the same, only it does it better. It has a complete social network layer and the people app. This brings your contacts and your social networks at one place. Your contacts’ social network profiles are automatically synced with other information you have about them on your phone.
Now this is way to good. All current phones running WP7 are not battery munchers like other smartphones. WP7 has a battery-saver function that saves up juice for when needed.
With office mobile WP7 gives you the complete MS Office experience on your phone, now no other smartphone out there gives you this facility.
No more people have to struggle between multiple inboxes. You can link them into one so that they become easily manageable.
So these are some of the reasons I am considering a Windows Phone. I would really appreciate if you could help me decide. Do leave me a comment. Rock n Roll!
The question new devs ask me the most is “How do we use the iPhone accelerometer?”, so I have decided to write a post about how to get data from the iOS device’s accelerometer.
The accelerometer is a sensitive piece of hardware that can detect the changing position of the device, from translation motion to rotation; it has the capability to detect the changes using a 3D coordinate system. Using the accelerometer devs can enhance the UX of their apps considerably, similarly game developers can make their games more engaging with it. In this blog post I am gonna show you how to get the accelerometer coordinate values and display them inside a label. So lets get started.
First lets create a simple UI in the interface builder:

That’s that a simple and clean UI. Now lets get to some action, lets write some code. First we create some IBOutlet properties in out interface file for our labels:
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@property(nonatomic, strong) IBOutlet UILabel *xLabel;
@property(nonatomic, strong) IBOutlet UILabel *yLabel;
@property(nonatomic, strong) IBOutlet UILabel *zLabel;
@end
We are not done with the interface file yet, we need to implement the UIAccelerometer delegate and create a property to access its values. So after adding these our interface would look like this:
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController <UIAccelerometerDelegate>
@property(nonatomic, strong) IBOutlet UILabel *xLabel;
@property(nonatomic, strong) IBOutlet UILabel *yLabel;
@property(nonatomic, strong) IBOutlet UILabel *zLabel;
@property(nonatomic, strong) UIAccelerometer *accelerometer;
@end
So all that takes care of the interface. Now we need to setup the accelerometer object so it can actually be of use. We now move to the implementation file of our project and modify the viewDidLoad method as follows:
- (void)viewDidLoad
{
[super viewDidLoad];
self.accelerometer = [UIAccelerometer sharedAccelerometer];
self.accelerometer.updateInterval = .2;
self.accelerometer.delegate = self;
}
Important thing to note here is how we have initialized the accelerometer object, one should never initialize a new instance of this object as its a shared resource. This is the correct way to initialize it. The other two statements are how we setup the update interval of the accelerometer and tell it whose going to be its delegate(in this case its our viewcontroller).
We are almost done with this example, the final piece of the puzzle is UIAccelerometer’s delegate method didAccelerate. We implement that this way:
-(void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration{
self.xLabel.text = [NSString stringWithFormat:@"%f", acceleration.x];
self.yLabel.text = [NSString stringWithFormat:@"%f", acceleration.y];
self.zLabel.text = [NSString stringWithFormat:@"%f", acceleration.z];
}
Trust me thats basically all you need to read data from the accelerometer. Our project is complete. Source files are available on github and here is a video showing the project in action:
ios accelerometer from ali raza on Vimeo.
Thats it for now. I hope it proves helpful.

Triple-I international is offering an Android development course starting from 31st March to 22nd April in Islamabad. I recommend all to take advantage of this great opportunity.
Register here and for more information please contact:
Arifa Gulzar
Triple I International
Recently I noticed that CSS and Javascript files in my website were creating a massive overhead. I did a little research about hosting content on CDN to improve page load times and ultimately made my own free little CDN using Google AppEngine under an hour. So all my CSS, Image and Javascript files are now loaded from the cloud hence the website loads faster than ever. Diagramatically it all looks something like this(click for larger size):
CDN’s are not something new but I was surprised to see that there are not many tutorials to make one if the need arises, so I am sharing my experience and steps to create a free CDN with Google’s AppEngine.
First thing’s first, you need to download and install Google App Engine’s SDK from here I am using a Linux based system so I downloaded the python SDK for Linux. It did not require any installation I just extracted the contents into a Folder inside my Home Folder. Make sure you have python installed on your system, the SDK requires python in order to function(You can use Java or Go SDKs if you wish). Then I added the google app engine folder in my path so that I could easily access the commands:
export PATH=$PATH:/home/ali/appEngine/google_appengine/
With that done now it was time to upload my files to the cloud server. I created a new application from my Google AppEngine Dashboard:

Then i created a new folder on my system having the same name as my application and copied my css, javascript and image folders inside it. Now the main piece of the puzzle is the app.yaml file without it the AppEngine will never identify your application as it contains all the necessary stuff. So I created an app.yaml file inside the root of the folder. My app.yaml(do mind the indentation) looks like this:
application: aliirzdotcom
version: 1
runtime: python
api_version: 1
handlers:
- url: /images
static_dir: images
- url: /css
static_dir: css
- url: /js
static_dir: js
- url: /fonts
static_dir: fonts
Basically its telling appengine the following things:
Once the app.yaml file is in place then its time to launch. Since I added the appengine SDK to my path I can access the commands and files of the SDK without having to type long and awkward paths in the Terminal. So with all my static content in place and the app.yaml as well, I type the following command to upload the app to AppEngine in the cloud:
appcfg.py update apps/aliirzdotcom/ _
If ran the first time it will ask your email and password to access the AppEngine. It will deploy all your files and give you a success message. The output might look something like this:
Checking if deployment succeeded.
Deployment successful.
Checking if updated app version is serving.
Will check again in 1 seconds.
Checking if updated app version is serving.
Completed update of app: aliirzdotcom, version: 1
In case you wish to debug before you deploy you can use the following command:
dev_appserver.py apps/aliirzdotcom/
Boom! your resources are now in the cloud and can be accessed via the url of the appenengine app in my case it is aliirzdotcom.appspot.com. So all thats left to do is to load your resources from the url. I replaced all the script sources, css and image references to be loaded from the url and whoala! Instant Content Delivery Network in the cloud, making the website faster than ever.

I was working on an App for a client, careful planning, proper branding, good color schemes it all was there. What was
missing was a little bit of jazz(As our Head of Operations pointed out). So instantly I jumped on the bandwagon to add a splash animation at the app’s start. Have worked with Core Animation had been a long time for me, but I remembered the basics so I decided to make a Hello Core Animation post which might be helpful for someone somewhere.
What I am going to do here is explain the different blocks of Core Animation and how can one add a bit of jazz to a the app’s screen when its launched for the first time.
First step, begin writing the animation block in the AppDelegate’s applicationDidFinishLaunching method or if your animation is a view controller specific add it to the viewDidLoad method:
[UIView beginAnimations:nil context:nil]; //Begin animations
Whatever follows after this statement is considerd to be a core animation action. Be it a size transition of a label, color change of a button or a shiny graphic/image you want to fly in from the right of the screen etc. you add it after this statement. In this example however we would be doing something very simple, we would just make the view that is being loaded flip from right. So the next thing we do is add a tranisition duration:
[UIView setAnimationDuration: 0.50];
Then we add the transition style:
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.navigationController.view cache:YES];
This will make the view that is being pushed on the navigation controller to flip from right like a page instead of the the standard transition. Finally to make it work:
[UIView commitAnimations]; //Commit animations do the dance.
This will as the name suggests commit the animations. So whatever you have between these two lines of code will get executed as an animation.

Phew!!! Finally I am happy with the redesign. Yes, aliirz.com has been going through a major redesign phase from the past few weeks and now finally its complete(I think so). So (clears throat) lets talk about what’s new.
The website now uses the Foundation Framework which has become my most favourite prototyping CSS framework since Startup Weekend Lahore. The most used and favourite feature of mine is the grid(not the one from Tron) as it allows creating a flexible, fully customizable layout in seconds. So bascially you can prototype anything be it a website for the web or mobile devices, foundation has all you need to go in uber prototyping mode. Also foundation has built-in support for creating responsive designs(Something I still need to hook up here).
Some other things I have changed are a new header and footer section utilizing the power of Jekyll includes so I have more control over the HTML. You can see the main page has two columns now so that content is more properly arranged. I have a new Folio section which only lists a handful of my projects at the moment. The post headings have now got a CSS3 transition property to their background. The site background is now white to improve readability and now users can subscribe to RSS Feeds as well.
Do leave your comments and feedback on how things look and what can be improved. I am re-learning the web and I am loving it. Cheers :)