Programming Jokes :))

27 08 2009

A man flying in a hot air balloon suddenly realizes he’s lost. He reduces height and spots a man down below. He lowers the balloon further and shouts to get directions, “Excuse me, can you tell me where I am?”

The man below says: “Yes, you’re in a hot air balloon, hovering 30 feet above this field.”

“You must work in Information Technology,” says the balloonist.

“I do” replies the man. “How did you know?”

“Well,” says the balloonist, “everything you have told me is technically correct, but It’s of no use to anyone.”

The man below replies, “You must work in management.”

“I do” replies the balloonist, “But how’d you know?”

“Well”, says the man, “you don’t know where you are, or where you’re going, you expect me to be able to help. You’re in the same position you were before we met, but now it’s my fault.”

You know more?… let me know 😀


Flex: Unable To Open locale en_US or fr_FR

19 07 2009


If you want to create a localized application you may find yourself in a strange situation when you did all the steps like in the book, but you continue to receive the “Unable to open locale xx_XX” error messages.

To simulate a fix on this issue we will take the example of adding French to your app.

Basic steps:
– The first step is to create a fr_FR folder under the /locale/ one exactly like in the Flex documentation and then add the translated file.
– The second step is to add the compiler options: -locale en_US,fr_FR

Extra steps you need to make in order to get rid of the ugly “unable to open locale” error message:

1. goto the following path :


for windows it’s: C:\Program Files\Adobe\Flex Builder 3\sdks\3.2.0\bin\

2. Execute the following command:

> copylocale.exe en_US fr_FR

That’s all, hope we helped you!

Flex Array Performance: For vs. ForEach

19 07 2009


We made a little test to see the flex performance on parsing an large array.

Here is the experiment:

var size:Number = 10000000;
var arr:Array = [];
for (var i:int=0; i
var time:Number, o:Object;

// for()
time = getTimer();
for (i=0; i=0; i--) { arr[i]; }
trace("for reversed test: "+(getTimer()-time)+"ms");

time = getTimer();
for each(o in arr) { o; }
trace("for each test: "+(getTimer()-time)+"ms");

And here are the results:

for test: 124ms
for reversed test: 110ms
for each test: 261ms

We wish you to use this results wisely !

iPhone: Show online image

19 07 2009


By default the UIImageView control from the iPhone sdk does not allow us to load images from a specific url. In this case we do a little tryck and use a UIWebView.

- (void)loadImage:(NSString*)url frame:(CGRect)frame {
NSString* textHTML = @"

body {
background-color: transparent;
color: white;


NSString* html = [NSString stringWithFormat:textHTML, url, frame.size.width, frame.size.height];

if(webView == nil) {
webView = [[UIWebView alloc] initWithFrame:frame];
[self.view addSubview:webView];

[webView loadHTMLString:html baseURL:nil];

Top Blogs on Flex

8 07 2009


NEWS and Cool Stuff:

* Mihai Corlan’s personal blog – Mihai is a flash platform evangelist at Adobe Inc. and one of the most interesting peoples we meet

* Doug McCune – Doug is a pretty big name in the Flex community (he gives presentations all over the country at Flex events), most of the items you are going to find on his site are examples of cool applications built using Flex.

* CFLEX: Community Flex

* Dzone – Dzone is a great community based site for sharing developer links. The site is setup in a similar fashion as popular sites such as Digg or Reddit.

* – is the main community site for Flex developers, which includes a showcase and resources for everything from PHP to .Net.

Resources & Examples:

* Adobe Flex Developer Center – The Adobe Developer Center is great resource for complete tutorials and articles on how to get started with Flex or any of the other Adobe products. The other Adobe resource is the Cookbook which is built off of community code snippets that solve small programming tasks.

* Flex Examples
Peter deHaan currently works for Adobe on the Flex SDK QA team. He writes so many small tutorials that it’s hard to even keep up with this man on any level.

* Alex Harui -Alex writes short posts that are usually nice Flex examples solving common and uncommon problems people run across in Flex. He works with the Adobe Flex core team in San Francisco.

* ScaleNine – Skins and Themes for Flex and AIR

* Flex SDK

* Flex Showcase

* Flex Developer Center

* – Flex, AIR, Flash, ActionScript Tutorials, Tips, Tricks.

* The Flex Show

* Marco Casario

Live Young

5 07 2009

Create applications with Adobe Catalyst

24 06 2009

We wanted to share with you a great video tutorial about how to use Adobe Flash Catalyst and create Flex Applications starting just with an image.
The tutorial explains in details how you can create a Flex button and a scrollbar using Catalyst.