One of my friends writes hilarious office themed hip-hop. Check out my favorite song, Cake In The Kitchen…




I got a Dell Latitude D830 notebook a few weeks ago and it’s great. One thing I noticed, and it’s not a surprise; it doesn’t like the extra power adapter that I bought 6 years ago (3 Dell laptops ago).

The last generation of Dell power supplies are 65 watts, while the current generation power supplies output 90 watts. When you use a 65w supply on a 90w machine, you get a disappointing Windows alert:

65W AC Power Adapter has been determined. Your system will operate slower and the battery may take more time to charge. Please connect a Dell 90W AC adapter or higher for best system operation.

I wondered just how much affect this would have on system performance, so I got some free benchmark software (CPU Free BenchMark 2). This software clocks the time it takes your CPU to perform a series of registry, floating-point and integer tests. The lower the time, the faster the CPU. I ran these tests a number of times with various power configurations and here are the average results of those tests.

Dell Latitude D830 CPU Mark Chart

As you can see, using your Latitude D830 battery or 90w power supply are virtually the same. Using a previous generation 65w power supply provides only enough power for roughly 20% of maximum performance. It’s fine in a jam, but if you’re a two power supply user then it’s worth your money to get a second 90w power supply. I found one new for $10 (+ $13 shipping) at an eBay retailer.

As a Flex 3 developer, there are a number of links I think you should have. Some of these are tools that help me perform tasks faster and better, others are for quick reference and news.

Tools
Component Explorer
Style Explorer (CSS generator)
Color Picker

Plugins
TODO / FIXME
XML Buddy (XML color coding, validation…etc)
Subclipse (Subversion source control support for eclipse)
Perforce (Source control)
FlashTracer (FireFox Plugin)

Reference
Language Reference (Live Docs)
Runtime Error Codes
Compiler Error Codes

News and Community
RIA News Aggregate
Flex.org
Flex Developer Center
Flex Coders (Yahoo Group)

Blogs
Alistair McLeod
Christophe Coenraets
Ely Greenfield
RIApedia (Mike Potter)
Everything Flex (Rich Tretola)

The limit is 450.

Why did you test this and who cares?
I care. I was working on an application that has (potentially) hundreds of concurrent data requests and I needed to know if that was going to be a problem.

Methodology
I built a Flex 3 application that had 1 HTTPService object and I called the send() method 1000 times using a for loop. I had a script that tracked the number of iterations, which reached 1000 instantly. I had a script that counted the number of responses received by the result handler. It got to 450.

My first test made requests from localhost (apache) and the responses totaled 450 within about a second. My second test made requests from another apache server about 50 miles away in a large data center; they totaled 450 within about 3 seconds. For my third test I sent 1000 requests and after about 250 were received I sent another 1000 requests. From 2000 requests, about 700 were received.

I concluded from this that there can be a total of 450 concurrent http requests pending at any given time. I tried more tests with multiple HTTPService objects and called them each 500 times. Still, the total number of received was 450. So it seems the limit is part of AIR itself and not the HTTPService object.

That made sense because when a Flex application is deployed in a browser, you’re limited by the browser’s maximum number of http connections. Typically, that number is between 2 and 50 – many modern browsers will let you adjust this number.

To adjust this number in FireFox: type “about:config” in the address bar and hit enter. Then, type “connections” in the filter box. You’ll see a number of connection settings that you can adjust. The faster your connection, the more simultaneous requests you can allow and still maintain a comfortable browsing experience.

450 connections is a lot and in most cases, far more than you need. I’m glad the AIR limit is very high; because this is one of the few ways to get information in and out of AIR. With some hard work, this is a viable way to communicate with other localhost software that may provide connections to USB or other devices – one of the current limitations of AIR.

- Chad Upton

I’m staying at this hotel near Chicago O’hare airport and I go on google maps to scroll around to see what is in the area. I see this giant bullseye on the roof of a building. I stop for a moment, not knowing what it is for… then I realize it is a target logo. Brilliant. Now I know there is a Target store nearby (whether I wanted to or not).

This serves two purposes:

  1. Online map users can see the store quickly and easily in satellite view
  2. Airplane passengers see the branding and store location as they’re landing

This is brilliant — a great way to capitalize on satellite imaging for branding.

Target Roof from Google Maps


See for yourself on google maps:
Example 1 - Chicago IL
Example 2 - Everett MA (thanks Colonel Kernel)

So, if you have ideas for apple products you’re welcome to submit those ideas. But, if you want them to look at your ideas without putting them in the garbage then you have to agree that all of your ideas become Apple’s ideas.

I want the products that I use to be great, so I’m always ready to provide feedback and suggestions for free, so I agreed that my ideas would belong to apple.

Idea #1 was implemented in the iPod firmware EXACTLY as I proposed it, and if you had a 5G iPod you know that it didn’t do this originally and was added later through a software update. I don’t want money and I don’t need any credit, but it would be nice… especially in the form of a 3G iPhone when available (you can have my non-3G iPhone back).

I should note that looking back, some of these ideas are terrible… but apparently 3 of them were good enough. Here’s the document that I sent Apple:

_____________________________

Dear Apple

I have read the unsolicited ideas verbiage and I agree all my ideas become property of Apple.

I appreciate apple products for their intuitive design and usability, but here are some short comings.

1. Backlighting should be adjustable, just like on my laptop. When I am in a dark room and I don’t want to blow out my eyes, or when I want to compromise brightness to save battery power I can dim the screen. My iPod should do the same, that will give me more power to watch movies during travel. I propose if the center button is clicked again after the shuttle/scrub state then the wheel will be in backlight dimming state.

2. The back of the ipod should have a belt clip/stand that can be deployed in a way that it will sit upright on an airplane seatback table to watch movies without having to hold it. This could be an accessory but it would be nice if it was built in or at least included.

3. iTunes should allow me to flag content and re-organize which folder it will appear in on my iPod.

4. While listening to music, there should be a built in trippy video or real time rendered visualization I can watch or use to show off how great the screen is on the iPod.

5. The next generation iPod should have a 16:9 screen ratio. When I hold it vertically, the screen is much taller than wide for easy grip and click wheel usage, but when I want to watch a movie I can turn it sideways and it will flip the screen. My Nikon digital camera has a mercury switch it in to sense which way I’m holding it, the next iPod should do the same to take advantage of a wide screen and still offer the comfort of the current generation while browsing music.

6. It would also be amazing if the next generation could be the same size as my 5G except with the entire front a wide screen / touch panel. Click wheel goes touch wheel… sweet. That could open the doors for a lot of other applications, like a full QWERTY onscreen keyboard for typing emails and text messages on the go. Even if it just acted as a Bluetooth keyboard for my cell phone.

7. A built-in camera to capture video and snapshots would be awesome. This could be an accessory.

8. Support for flash lite, (adobe/macromedia’s) flash’s mobile display engine would guarantee a bunch of really cool applications could be built for the iPod. The most obvious would be skinning the UI. Even proprietary apple UIs that could be bought at the iTunes store. People pay for cell phone ring tones to customize their phone, they’ll do the same to customize/personalize their ipod interface.

8. The next generation nano should be the same size as a PCMCIA card and fit into that slot for charging/docking/protection/transportation/removable storage.
Thinking Different…

- Chad Upton

Perforce software makes a plug-in for Eclipse that makes life a lot easier when using the two together. This setup guide is directed specifically at using Perforce with Flex Builder 3.

As we know, Flex Builder 3 (FB3) is based on Eclipse 3.3.1. Since Flex Builder 2 is based on Eclipse 3.1.2, it probably won’t work – the release notes for the plug-in suggest is works on 3.2 and 3.3 only. I have not tested it, but if you were to upgrade Eclipse and use the Flex Builder plug-in then you should be OK.

Setup

  1. Open Flex Builder 3.
  2. Choose the following menu command: HELP > Software Updates > Find and Install.
  3. Select “Search for new features to install” and click Next >.
  4. Click “New Remote Site”.
  5. In the dialogue box, enter the Name “Perforce Plugin”.
  6. In the dialogue box, enter the URL: http://www.perforce.com/downloads/http/p4-wsad/install/
  7. Click OK.
  8. Click Finish.
  9. You will be prompted to “Select the features to install”.
  10. Be sure to check, “Show the latest version of a feature only” (at the bottom of the window)
  11. Fully expand the “Perforce Plugin” tree.
  12. Choose the last item in the tree that begins, “P4WSAD”.
  13. Click Next.
  14. Accept the terms in the license agreement to continue.
  15. Click Next.
  16. Click Finish.
  17. The feature will be downloaded and you may receive a Feature Verification warning
  18. Click “Install” if you receive the Feature Verification warning.
  19. The installation should occur and you need to restart Flex Builder.
  20. When Flex Builder restarts, we’ll tell the plugin where it can find Perforce on our system.
  21. Choose: Window > Preferences.
  22. In the left column, browse to: Team > Perforce.
  23. Under “Location of p4 executable” select “Location” and click “Browse”, then locate and select p4.exe. The default location is C:\Program Files\Perforce\p4.exe.
  24. Click Open.
  25. Click Apply.
  26. Click OK.
  27. Now, locate and open the project that you wish to use with Perforce.
  28. Right click on the project folder and choose: Team > Share Project.
  29. Select Perforce and click Next.
  30. The “Recent” field will probably be blank and that’s fine.
  31. Port will be the IP address and port of your Perforce server. (ex. 192.168.254.55) If you already have P4V or P4Win setup then you can find this in the title bar of the application.
  32. User is going to be your Perforce username, likely given you to by an administrator.
  33. Client Workspace should also be found in the title bar of P4V or P4Win if you’ve got those setup.
  34. Charset can probably be left to the default (none) but may require changing in certain circumstances.
  35. Click Finish.
  36. You will likely be prompted for your Perforce password – the one that goes with the Perforce username you entered.

Assuming everything went smoothly, you should now be able to edit files and Flex Builder will automatically add that file to the default changelist and make the file writable so you don’t get that annoying message.

Some other useful things that this plug-in does. Go to Window > Other Views…
In this dialogue box you can open the Perforce folder and select “P4 Pending Changelists”. This view will show you the files you have opened for editing and allow you to right click on the changelist or individual file for submitting.

Also, you’re probably used to seeing error and warning messages in the Problems view. Now you’ll see info messages when some things are out of sync with the repository. For example, if you add a new file your project but it’s not in the repository then you’ll see an info message warning you. Right click on the file and choose “Open for Add” then Submit the changelist and it will be added.

I hope this makes your life easier and please send me a quick line if you found any errors in my instructions, that will help other people!

Further details on setup are available at the Perforce website: http://www.perforce.com/perforce/doc.073/user/p4wsadnotes.txt

Sometimes our programs have visual objects that need to be rotated. The default registration point in Flex is the top left corner, but that’s not always ideal. In Flash, we have the freedom to change that registration point — not in Flex.

We have to work around this limitation in Flex and I have seen a few different approaches. There are some blog posts out there that suggest using the Rotate effect, this seems messy to me. If you want to rotate around any point using a MatrixTransformer: Joel Connett has a great post on it here. I quite like that method, but I think I’ve found a more simple solution for center rotation.

Here’s a sample you can play with:


Click Here for Source Code

Try clicking the “show canvas” button, you’ll see a white box that surrounds the bottom right quadrant of the spiral circle. It is only that quarter of the circle which is actually in the canvas. I have placed the center of the circle at the top left corner of the canvas. The canvas will (by default) crop content that exceeds it’s boundaries; however, there is a property on the canvas called “clipContent”. Set that to false and voila.

I know this is really simple solution, but it wasn’t obvious to me until recently. Leave a comment to let me know if this helped to you.

This method works with Flex 2 and Flex 3.

Everybody loves Google because they do a great job at everything, but there are two things I noticed on YouTube.com that my fellow flash developers should avoid in their Flash applications.

While watching a video I noticed debug statements appearing in my FlashTracer window. Although it is pretty common to see similar debug statements on websites that have flash content, it should not be common and it is very easy to remove these statements for production content.

99% of these statements were typical, but there were a couple that, although funny, could be embarrassing. Look at the two lines of text I highlighted in the left column of this screenshot:

YouTube.com screen capture

Although it is hilarious to see these statements in code from a reputable company, there are a couple reasons why they should not be there.

I avoid writing this kind of stuff in my code because most developers know another developer who has been burned by writing these type of statements and they never learn. Google can get away with this because nobody is really going to be offended and they’re their own client. But, when I’m working for a client I follow these two rules:

  1. Never put anything in your code that you don’t want your client or boss to see.
  2. When you do comment your code, be professional enough to omit them when you compile for production!

When you compile/publish in Flash, remember to select “Omit Trace Actions” in the publish settings to prevent your trace statements from appearing in the compiled swf. Sometimes, I might leave in a few traces so I know the version of the app that the client uploaded or other info that might be helpful for debugging problems.

Here are some other funny examples of code I have seen in other applications that should be omitted for production…

  • The connection just got tea bagged - reset and reload
  • Fuck bandwidth detection script its taking too long or not working so fuck it hard
  • This feature does not work and crashes the player fix laterz
  • HACK HACK HACK HACK HACK this scuks

The best part about the google debug statements, is that you can see them for yourself by installing the FlashTracer add-on for Firefox and the Debug Flash Player, then browse over to YouTube.com and watch a video. And, although I named this post after Google, you could also look at another example of what not to do in this article. It’s about a bunch of unprofessional comments from some Microsoft Win2K source code.

UPDATE: Google promptly removed these statements after about 130 hits to this page from google.com (not referrers, but actual native traffic from the company domain).


Nothing beats a great steak, nothing. Well, maybe a Burger King breakfast sandwich with eggs and bacon on a buttered croissant served with little hash browns that make ketchup pumps act like diet coke on a mentos binge.

There was no Burger King nearby, and it was dinner time anyway… so I went with the (waitress recommend) 18oz steak. Now, I have eaten in the same restaurant with the same waitress for the past two evenings, so she was recommending this steak because she had raport, not because it was $32 (or at least not ONLY because it was $32). There are of course more expensive steaks out there, but $32 should definitely buy a good steak.

I started with a goat cheese and roasted red pepper salad, which was fabulous. My steak came, and I paired it with Sterling Vinter’s 2004 Shiraz. Now, a rib-eye is not the most lean steak but it is extremely tasty. I had it prepared medium-well because I like it a little pink on the inside and dark on the outside.

I first tried the wine and it was great. It smelled of cranberries and was dry as this Blog post. The steak… it wasn’t great, it was unbelievable! I have had steaks in the $50-60 range before and they were excellent, but this steak was the best yet. I had two bites and my appetite was ruined. Honestly, but it wasn’t the steak… it was the conversation, and I was eating alone.

Now, I don’t usually listen to other’s conversations, but when you’re alone, male and [insert Lilith fair performer] is playing on the radio, you can’t help listening to the loud and obnoxious voice coming from the table beside you. All I wanted to do with my mouth was put it around this steak, but the loud mouth beside me wanted to tell her girlfriend all about the time she cut her finger off. I don’t know if this woman was a doctor, but the graphic detailed regurgitated in her story could have earned a pass on the board exam.

I don’t know why people have to talk about personal dismemberment during a meal, but it is one of those topics that should be completely off limits… especially when you and your neighbors are eating red meat. You’d think after 5 dirty looks in 5 minutes she would stop talking about her missing finger, and if I wasn’t such a wimp, I would have given her one of mine.

Next Page »