Archive

Archive for the ‘Technology’ Category

Encode your JSON data before sending it

January 18th, 2012 No comments

A problem I was facing recently, that the JSON was being receive properly on Firefox 3.6 my work development machine. Finished the project and deployed it. I haven’t tested it on other machines, how clever am I?! I opened my laptop to see how it would appear on other browsers, and shockingly, it wasn’t working at all!

After spending hours trying to locate the line where the error occurs and find out what’s the problem it turned out that I have to decode the JSON output before sending it. I wasn’t using any PHP built-in functionality for JSON, that’s because at work, we are still using PHP4 which has none. I was basically writing the JSON output explicitly. The text output can contain some special characters that need to be encoded and escaped before sending it. After digging around a bit I found out a solution from this post. Everything is pretty much explained there.

In a nutshell, you’ll have to use json_encode() to encode the data from an array and then output it. A JSON library is provided along with that post. There is also a decoding function, but I haven’t use it since I’m receiving my data on a javascript.

Solution to getURL not working

February 22nd, 2011 No comments

A security enhancement was added to Flash Player sometime ago that disables getURL to function properly in Actionscript 2.0 of Adobe Flash. This could be an issue for some as in my situation when I created a banner for MET to celebrate the independence & liberation day of Kuwait.

The issue occurs if you are targeting a different domain than the current domain where the SWF/HTML file is hosted. I’ve also heard reports that it can occur if the SWF and HTML file are located at different location even if at the same domain host. I haven’t tested the latter so I can’t confirm or deny it.

Anyhow, to resolve this issue, all you have to do is change the allowScriptAccess attribute on the <object> tag to have the value “always”. You also have to add <param name="allowScriptAccess" value="always" /> or edit it to match it if it’s already there.

So at the end, your code has to look like this:

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="955" height="88" id="SWFID" align="middle">
<param name="allowScriptAccess" value="always" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="FILE.SWF" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /> <embed src="FILE.SWF" quality="high" bgcolor="#ffffff" width="955" height="88" name="SWFID" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" />
</object>

This issue is explained in more detail at the official knowledge base of Adobe here and here.

Releasing a New WordPress Plugin – WP Academic People List

October 12th, 2010 1 comment

My first WordPress plugin goes public. I’ve developed it for a research group in Kuwait University. Check out the WP Academic People List page for more information about this plugin. This plugin was built in a way that you can customize it for school alumni website.

BarCamp Kuwait 2010

October 5th, 2010 No comments

The first ever BarCamp in Kuwait.

BarCamp is an ad-hoc gathering born from the desire for people to share and learn in an open environment. It is an intense event with discussions, demos, and interaction from attendees, usually centered around design & technology topics.

For registration and more information check out the official BarCamp Kuwait 2010 website.

Windows Phone 7 – A deal breaker or just another desperate attempt?

September 18th, 2010 No comments

windowsphone-everything-top-1 
It’s been a nightmare for Microsoft in the last few years with their mobile operating system, Windows Mobile. The real battle began back in 2007 when iPhone was released to public and despite the popularity of Windows Mobile, Steve Jobs (CEO, Apple) has outwitted Steve Ballmer (CEO, Microsoft) and Windows Mobile has started to lose ground quickly. iPhone was taking the lead and outselled Windows Mobile almost immediately.

 

Just a year later (2008 A.D.) another bomb shell was dropped on the smartphone arena with the release of Google’s Android operating system and the intensity of the battle begun to rise. Google was working hard on improving Android as updates were being released more frequent on Android than iPhone. By the first quarter of 2010, the tide of war has shifted towards Android and for the first time it managed to outsell iPhone. By June of the same year, iPhone 4 went public but it failed to gain popularity like its predecessor.

 

But wait! Microsoft was holding ground under radio-silence and planning to counter-attack with the latest technologies their engineers have managed to develop. The preemptive strike has begun when Microsoft unveiled Windows Phone 7 in Mobile World Congress in Barcelona and technologist around the globe got excited about this upcoming revolutionary mobile operating system. Some went as far as saying that that’s a deal breaker!

 

The mobile OS battle is not a fight between evil and good, like republic and separatist, Jedi and the Sith Lord, Batman and Joker. People will not go and choose sides; it’s more like a survival of the fittest were people will pick up the best smartphone out there, and the one that sell the most is the winner. So I’m quite convinced that all three companies have worked hard and squeezed their juicy expertise at best, although I’m having my doubts about Apple as they tend to release new iPhones and other products but not with the latest technologies – yes, the press exaggerates all the time with “latest technology”!

 

Without further ado, let’s compare the three mobile operating systems:

 

iPhone OS 4.0

Android 2.2

Windows Phone 7

Multitouch

Yes

Yes

Yes

Multitasking

Yes + Push

Yes

Yes but not third-party applications + Push

Copy Paste

Yes

Yes

No (Initially)

Keyboard

Virtual

Virtual + Physical

Virtual + Physical

Music Store

Yes, iTunes

Third party

Yes, Zune

Music Streaming

Third-party apps

Yes

Yes

Navigation

Third-party

Google Maps

Bing

Games

Tons on the App Store

Not as good as iPhone

Xbox Live

Gamers Social Network

Yes

No

Yes

Office Suite

Yes

Yes

Yes

Flash

No

Yes

No (Initially)

Silverlight

No

Yes

Yes

Customization Home Screen

Yes, third-party

Yes

Yes

Applications

170,000 +

50,000 +

Not launched yet

User friendliness

2nd best

3rd best

Best

Sync Game Online

No

No

Yes

 

windows phone 7 xboxOkay, so that’s a raw  comparison between the three players. We could dive deeper and see how Windows Phone 7 can be integrated to your Xbox set or your PC, and how with some upcoming games you can play it in your Xbox 360 and then go out and continue the game in your Windows Phone 7 device from the same point where you left the game on the Xbox 360.  And the list of features goes on…

 

But hey! Windows Phone 7 is still not out there yet, and if you’ve seen the developer framework capabilities you’d be amazed with what you can do with it. Microsoft is releasing an OS with amazing capabilities and an awesome developer tools for the developers’ community to make great applications and shine as a rock star.

 

There are still some issues remaining, as iPhone and Android has already gained solid ground, Microsoft will have to convince consumers to ditch their current technologies and immigrate to Windows Phone 7.

 

“Microsoft has a challenge in getting phone vendors to support Windows Phone 7,” said Jack Gold, the principal of J. Gold Associates, to the IT Business Edge. “Motorola is not going to do it. HP just bought Palm and the webOS, and it is very unlikely they will do it. HTC probably will make a few, but they are going down the Android path very quickly. Samsung may do Windows Phone 7, but how much effort will they put into it?”

 

Microsoft has managed to create a revolutionary simple “hub” centric interface and will definitely change the way people use smartphones as various technologies integration was achieved to some degree. Whether it will succeed or not we do not know. Only few days left until the release of the first Windows Phone 7 based device, and the decision is all up to the consumers to go for iPhone’s boring interface, Android’s openness, or the easiness of WP7. But of course, Microsoft wouldn’t want Captain Jack Sparrow (1) to repeat his own words to Windows Phone 7 “Up is down. That’s just maddingly unhelpful. Why are these things never clear?!”

 

 

 

 

 

This article will be published on next the issue of Al-Islamia Magazine.

– The writing style is intentional, to make it funny and inviting for youth readers.

Mifi 2352 for Zain – Kuwait

June 4th, 2010 1 comment

The following settings are needed to use the Mifi 2352 (unlocked) for your Zain 3.5G data plan:

APN: hspps
Username: hspps
Password: hspps
Authentication Type: PAP

That’s for the Zain mobile carrier of Kuwait.

Categories: Technology Tags: , , , , ,

Microsoft Visual Studio 2010 Launch in Kuwait

May 12th, 2010 No comments

Microsoft are doing Visual Studio 2010 launch in Kuwait and then premiering the movie Robin Hood. That’s two days before the movie launch in Kuwait cinemas.

Location: Cinescape 360, 360 Mall
Date: May 18th, 2010

Agenda:
01:45 PM – 02:00 PM | Registration
02:30 PM – 05:15 PM | Presentations
05:15 PM – 05:30 PM | Break 
05:30 PM – 07:20 PM | "Robin Hood Movie"

Register and book your seat here.

MSFT_VS2010_launch

Q8CPC – Kuwait’s National Collegiate Programming Contest

April 18th, 2010 2 comments

[UPDATE: the competition has been postpond to September.]

For the first time, the ACM’s International Collegiate Programming Contest is coming to Kuwait by the American University of Kuwait. The contest will be held by May 1st, 2010. The opening ceremony and the practice session will be held two days earlier. More information will be revealed soon.

This contest is a good opportunity for students to prepare for the regional contest ACM ACPC formally known as (ACM ICPC ANARC).

Check the PDF for the “Call for Participation” letter: Q8CPC Call for Participation.

Categories: Programming Tags: , , , ,

Zune for International Users

April 7th, 2010 1 comment

So you are now one of those people who found out about Zune and got really turned down by Microsoft for preventing us to access the device and the Marketplace just because we do not live in the US? Don’t worry because I have the ultimate workaround.

zunesoftware

Since the released of Zune Software 4.0 and the integration of Zune Marketplace to the Xbox 360, Microsoft has stepped a big leap forward into the Music and Entertainment industry. The Zune Software 4.0 is user-friendly and much more responsive than its competitive the iTunes in the Windows platform and the Zune HD device is awesome and feels much more robust than the current iPods. And thanks to the Zune Pass, the Zune Marketplace now provides unlimited number of music at the tip of your hand to listen to or download, of course, with DRM lock. The Zune Pass cost only $15 USD monthly but the problem is that if you are not based in the US, you won’t be able to enjoy the Zune Marketplace, heck, you won’t even be able to buy Zune. To be fair to the Microsoft folks, I think those roadblocks were necessary for license music in the Marketplace whether the Zune team really wanted to block international users or no.

In this article I’m going to talk about how to own a Zune HD and get yourself hooked up with the Zune Marketplace with the full features of Zune Software 4.0 just like living in the states.

Get the Zune HD

Officially the Zune HD is supported and sold only in the states but you could find sellers in ebay that would happily sell it and ship it to your country but for an extra profit.

Zune HD

Another alternative is to buy Zune HD through Amazon or any other retailer and ship it to a “shipment forwarder company” in the states that ships anything they receive under your name to your home address. Basically, those types of companies will provide you with a US mailbox and an address, and if anything is mailed/shipped to that address it will be forwarded and shipped to your home. I personally use Aramex’s Shop&Ship but if you cannot use Aramex for any reason, you could always use DHL since they provide a very similar service. This kind of shipping service is available in my country and I’m not sure if it is available everywhere.

Grasp the Full Potential of the Zune Marketplace

Zune HD can play all music and videos in that’s already in your hard disk and playable by Zune Software 4.0. Now, here what really made me ditch iPod and iTunes, it is the Zune Marketplace. The main reason I made the move from iTunes to Zune Software is that I can get unlimited music with Zune Pass as I mentioned previously.

Now it is time to do some changes in your computer. Follow the next instructions before opening the Zune Software for the first time. You can download Zune Software from here.

Accessing the Zune Marketplace

zuenmarket In a typical non-US computer you won’t see the Marketplace & the Social tab in Zune Software, however, you could easily solve this by setting your location to US. To do that, go to Control Panel –> Clock, Language, and Region –> Change location, then select your location to “United States” [Windows 7].

Now you should be able to see the Marketplace tab after restarting the Zune Software.

Get a Windows Live Account

Now you need to register for a Windows Live ID which is the generic account for all Microsoft services, or you could just grab a new Windows Live or Hotmail email which is also considered as a Windows Live ID. You could use your existing Live email.

Just ensure that in your profile your home address is set to US. You could use any US-based address you want. Heck, you can use any of Microsoft offices address 😀

If you followed previous instructions you should be able to browse the Zune Marketplace and play with it. But wait! We are not done yet. Follow next instructions if you want to be able to buy Music and download them.

Note: To login successfully in your Zune Software, your PC location has to match the location in your Windows Live profile which should be US by now.

Purchasing Music from the Zune Marketplace

xbox point cardTo purchase Music from the Zune Marketplace you’re going to need Microsoft Points which is the currency being used for the Zune Marketplace and it is also the same currency being used for the XBox 360 Marketplace. You can purchase Microsoft Points online by the Zune Software but the problem is that Zune Marketplace only accepts US-credit cards. Fortunately, I was able to overcome this roadblock with the Xbox point card.

You can purchase an Xbox point card by either asking a friend from US to buy one for you and send you the card code, or you could head to ebay and buy one. Some sellers in ebay will just email you the card codes regardless of your location which is perfect for a fast solution. I personally buy from GSG online retailer because I’ve bought several Microsoft Points from him already so I trust him, and he usually send the code in less than 24 hours.

Now that you have the card codes, launch Zune Software in your PC then go to Settings –> Account –> Redeem code. Enter the code and you’ll be redeemed with Microsoft Points which can be used to buy anything in the Zune Marketplace.

You could also use those points to purchase videos on the Zune Marketplace but you’ll need to workaround it more to download videos. I’ll talk about it later.

Zune Pass

Want to enjoy the ultimate experience of Zune? Then Zune Pass is your salvation.

zuenpass

Again, the Zune Marketplace will not accept a non-US credit cards so you won’t be able to purchase Zune Pass on your own. It took me a lot of Googling (Bing suck!) to figure out alternatives which is the Zune Pass Anywhere retailer. It provides you with a Zune Pass but for a higher price and they will need to access your account so you’ll have to submit your password. Basically, they will access your account and buy a Zune Pass.

Alternatively, if you have a friend in the states you can ask your friend to buy you a Zune Pass card from Best Buy for $15 and email you the card code.

Videos

So far you should be able to download music yourself with no problem. The experience is not complete without the ability to purchase videos from the Zune Marketplace or downloading it. Easy, get a VPN (aka Virtual Private Network) for as low as $40/year from some firms.

I use Witopia but there are many other companies that provide VPN and you probably could even find lower prices. But you have to ensure that the VPN is based in the states. By the time I write this article it seems that the video download works even when the VPN service provide you with an anonymous-IP.

As soon as the video starts downloading, you won’t need VPN anymore. If your VPN connection is slow, you could pause the download then disconnect your VPN connection and resume the download with your regular connection.

After doing the first download, it doesn’t seem to need VPN anymore to download any additional videos. I don’t know the actual reason behind it but I can guess that because I have already purchased a Zune HD and linked it to my account.

Finally…

What Microsoft has done with Zune HD and Zune Software 4.0 is really incredible. If you were one of those lucky people who own a Zune HD and Zune Software, you officially own the modern device and software. They are both much user-friendly, easy to use and feels much more modern than the iPod-like interface. If you are a tech-savvy you are probably bored from the iTunes and iPod interface which feels really out-dated. You would also notice the big gap in performance with Zune Software 4.0 compared to iTunes 9.1.

You can connect to my profile:

Happy Zunning!

Novatel Mifi 2352 with Viva

April 3rd, 2010 18 comments

Purchasing the Novatel Mifi 2352 is a procurement that I’m never going to regret. Not only I can access the Internet with my phone through a wifi router that can fit in my pocket, but I can also use my PDA and Zune HD to access the web at the same connection (subscription) while on-the-go. Sharing my connection with my Internet-savvy friends is also a big plus. In this post I’m not writing a review about the device but a quick test. Why should I write another review when there are a lot of reviews online?

 

01042010303

The following test is based on my connection which is an HSDPA connection from Viva Telecom in Kuwait. According to the carrier, my subscription speed can reach up to 7.2 Mbps. I bought the device from Cameo store which is located in Hawalli, Kuwait, for 72KD. And it comes with various wiring options and a small how-to-get-started print.

 

Speed Test

Here comes the speed testing in Salwa area, but keep in mind that lots of variables can game here. I just want to give you a sense on what this device is capable of. I’m not doing a scientific or geekish connection test, I’m just doing the regular method of quick speed testing for a regular web citizen to understand.

 

Capture4

 

I’m going to do the speed testing with both the Mifi 2352 and my old USB dongle Huawei E180 for comparison. I’ll use the same sim card on both connections. Note that both devices supports up to HSPA speed, that’s up to 7.2 Mbps for both devices and it’s stated on the datasheets of both devices.

 

Capture2 The image above represent the status of the connection on the Mifi 2352 device. As you can see, it is connected by HSPA technology (HSDPA & HSUPA). I did the test to a server located in Washington DC by Speakeasy. The first test of the Mifi 2352 resulted about 1.74Mbps download and 0.27Mbps upload. I switched back to the Huawei USB dongle and the tested result was 2.19 Mbps for download and 0.24Mbps for upload.

 

I did both tests again and the result was:

  • Novatel Mifi 2352: Download 1.09Mbps – Upload 0.28Mbps
  • Huawei E180: Download 2.92Mbps – Upload 0.21 Mbps

Definitely there are differences in the performance of both devices. It seem that the USB dongle is faster on downloading. Again, this is a quick-test to have a sense of what to expect from the Mifi 2352. It’s not a scientific test and it is not reliable testing method and I’m doing this in uncontrollable testing environment.

 

I’ll do more testing later and then I’ll report back.

Categories: Computer and IT Tags: , , , , , ,
Get Adobe Flash player