See You In The Re-Runs: Adobe Dev. Week Sessions Now Online

| No Comments
Once Burned, Twice Shy. If you missed Adobe Developer Week (I did), not all is lost.

If you wanted to get a second chance at attending one of the many free sessions given by Flash Platform experts during Adobe Developer week, you're in luck. Adobe has posted all 19 sessions online, for free. Since they all run at roughly one hour each, you'd better get cracking, my friend.

The available sessions are:

    • Welcome and introduction to the Adobe Flash Platform
    • Building multi-screen applications with the Adobe Flash Platform and Adobe Creative Suite 5
    • New features in Adobe Flex 4 framework
    • New features in Adobe Flash Builder 4
    • Adobe Flash Catalyst CS5 for developers
    • Building mobile applications: Create a game
    • What's new in Adobe Flash Builder for Java developers
    • New features in Adobe Flash Player 10.1
    • Creating sexy applications with the Adobe Flash Platform: Designer-developer workflow
    • A basic CRUD application with Zend AMF and Adobe Flex 4
    • Adobe Flash Builder 4 and Adobe ColdFusion 9
    • Advanced features in Adobe Flex
    • ActionScript 3 for Java developers
    • Adobe Flash Platform and Salesforce.com
    • What's new in Adobe Flash Builder for PHP developers
    • Using advanced features with Adobe Flex and PHP
    • Adobe ColdFusion 9 and Adobe Flash Catalyst CS5
    • Adobe Flex and BlazeDS integration with SpringSource
    • Building desktop applications with Adobe AIR 2

What the heck are you waiting for? Click here and go straight to the videos. Sheesh!

Tilde Console Gets Free Plug on The Flex Show

| No Comments
Thumbnail image for Tilde.png
When you get mentioned on the premiere Flex-related podcast, you know you've finally arrived.

Episode 115 of The Flex Show podcast is primarily an interview with Nate Beck and Ben Garney, key members of the pure Actionscript (but wholly Flex friendlyPushButton games engine project. When asked how PushButton can be used in non-gaming Flex applications, among other things, Nate mentioned how I forked off the Console part of the engine for use in any Flex application. It was a very kind thing to do, even though he almost forgot my name ;)

Much thanks to Nate for giving Tilde a mention and to Ben for coding up a clever, elegant and blazingly fast text rendering solution for the console as only an experienced über low-level C++/Actionscript games developer could.

So now that the word about Tilde is finally getting out, I'd love to hear from someone out there who's tried it, is using it, loves it or hates it. I use the console extensively in my own development and it has proven itself invaluable... hopefully someone else out there will agree.

Related links:
    • You can listen to the podcast here.
    • If you haven't checked it out yet, the source code for the Tilde Developer Console can be found here.
    • To see what it all looks like, check out the Tilde demo app here. (Hint: after you've clicked the button to start up logging, hit the tilde key (i.e. "~") to display the console.)

Try It Out: Tilde Developer Console Demo

| No Comments
Seeing is believing so try out the Tilde Console with this simple demo application.

The Tilde Developer Console was launched very late (my time) on Friday. After a weekend spent catching up on my sleep, it's Monday and I'm happy to release the Console testing tool I promised in my original launch post.

Built using the latest version of the library (I checked in a few tweaks to the Console this weekend and tagged v1.1), the tool provides the following functionality:
  • Buttons for submitting log entries at the different severity levels
  • The ability to generate random log message text (in case you don't much like typing)
  • A button for manually starting up the Logger. If you submit log entries before clicking on this button, you will be able to see how deferred log entries are handled.
  • I wired in a custom callback command ("dog") almost identical to the example I provided in the original Tilde launch post.
  • For good measure, I've thrown in the Tilde logo in order to demonstrate the semi-transparent nature of the console.

Click on the image below to launch the demo in a new window. Once you've tried it out, please let me know what you think and check out the source code at the Google code project.

Flex Open Source Project Launch: The Tilde Developer Console

| No Comments
Tilde.png
Flex developers rejoice! Once only reserved for advanced games engines, the tilde-activated developer console has finally arrived to empower Flex coders everywhere.

I am proud to announce the long-delayed release of the Tilde Developer Console open source project into the wild. This Flex library makes powerful development tools from the PushButton Games Engine available to all Flex developers.

[June 21, 2010 - Update: Check out the Tilde Console demo application here.]

I do enterprise Flex RIA development for a living and extracted this powerful tool set for my own use a few months ago after attending Nate Beck's presentation on the aforementioned games engine at 360|Flex 2010 in San Jose, California. The console quickly became one of my most important tools, in particular when saving my bacon multiple times during user acceptance testing for a large, complex project. Because I wrote so little of it myself, I intended to release the source code to the public from the outset but have been altogether too busy to even think about it.

This week, things have started quieting down again (I know, I know... it won't last) so I fetched and merged in the latest code from the PushButton Engine (which contains some very cool new optimizations to the console display) and polished it all up for public consumption. Given how much I've personally benefited from using the console, I'm excited to finally be able to share this with my fellow Flex developers. If I wasn't confident that many of you will appreciate these tools every bit as much as I have, I wouldn't have bothered to create a logo. (Using Inkscape, I might add... a fine, free, open source SVG tool.)

The key tools in this package are:

Developer Console

  • A versatile "tilde-activated" console similar to that found in many 3D games engines (e.g. Unreal, Source, etc.)
  • Tab-based command auto-completion, command history and built-in help
  • Powerful ability to register custom call-back commands at run-time. These are treated identically to the built-in commands.
  • Utility functions for serializing object information to the console
  • Integrated "Hi-ReS! Stats" graph from Mr.doob

Client-Side Trace Logging

  • Statements are logged to both the console and the Flash Player debugging trace.
  • Multiple logging-levels are supported and entries are color-coded by severity in the console. (e.g. DEBUGINFOWARNERROR)
  • Logging verbosity can be set using a simple console command.
  • Deferred logging: even if log statements are sent before a Logger instance is created, they will be stored until one does exist, allowing log entries to be submitted from the moment the application starts.
  • Explicitly turning off logging causes all logging calls to be disregarded so they don't impede application performance. (All pending deferred log calls are also discarded.)

Have Android? Got Froyo? Grab Flash 10.1 Pronto!

| No Comments
Beta Mobile Flash Player 10.1 for Android is finally available in the Android Market. What are you waiting for?

In news that's certain to please my Nexus One-owning younger brother, you can finally download the first public beta of Flash Player 10.1 from the Android Market. The caveats are that you must be running Android OS 2.2 (a.k.a. "Froyo") and have an ARM-8 or better CPU, which currently limits you to one of the Nexus One, Motorola Droid, HTC Incredible and Sprint EVO (this, according to PCMag).

Wait, There's More

If you haven't heard of "Froyo", well it's the next generation of the Android OS. Thanks to the improved Dalvik virtual machine (VM) core and its brand-new support for "just in time" (JIT) compilation, Froyo has been clocked by the good folks at Android Police at 450% faster than its predecessor, Android 2.1 (a.k.a. "Éclair").

(Interestingly enough, "Éclair" isn't just a delicious pastry, it's also the French word for lightning... which now seems like a misnomer. But I digress.)

There are a whole lot of other improvements baked into Froyo, including support for WiFi tethering and the ability to save apps to a miniSD card. Not bad for an OS named after a sweet, delicious frozen dessert.

Grab It Now, If You Can

According to techie-buzz.com, Froyo is available "over-the-air" to Nexus One owners right now and will be coming to Motorola Droid owners in the very near future. Over at the Android developers' blog, Xavier Durochet has just posted the details of what's included in Froyo, some links to new developer tools and the official Android 2.2 "trailer" video. Very cool stuff.

Now you may or may not know this, but 4Point (my employer) is a Google Enterprise partner. In our case, that means that we're authorized to resell and service Google search appliances. I just have to figure out some angle whereby it also entitles me to get my hands on some of this slightly more mobile Google kit.

I'm open to suggestions ;)
LiveCycle ES2 uses encryption to store the datasource information. Here is a quick how-to create your own encrypted datasource:

STEP 1)
In a cmd window, navigate to "C:\Adobe\Adobe LiveCycle ES2\jboss"
Perform this command on the sesrver:
java -cp lib/jboss-common.jar;lib/jboss-jmx.jar;server/lc_turnkey/lib/jbosssx.jar;server/lc_turnkey/lib/jboss-jca.jar org.jboss.resource.security.SecureIdentityLoginModule YOUR_PASSWORD_HERE
Don't forget to swap out "YOUR_PASSWORD_HERE" and then copy the resultant, encrypted password for use in Step 3. 

STEP 2)
Edit and copy the mydatasource-ds.xml datasource file to: "C:\Adobe\Adobe LiveCycle ES2\jboss\server\lc_turnkey\deploy".
You should only have to change "YOUR_DATABASE_SERVER_NAME_HERE" if your particular datasource is for an Oracle XE database.


STEP 3)
Add this node to the very bottom (just above </policy> of "C:\Adobe\Adobe LiveCycle ES2\jboss\server\lc_turnkey\conf\login-config.xml"

</application-policy>
        <application-policy name="EncryptDBPassword_MY_ENCRYPTED_DS">
            <authentication>
                <login-module code="org.jboss.resource.security.SecureIdentityLoginModule" flag="required">
                    <module-option name="username">USER_NAME_HERE</module-option>
                    <module-option name="password">THE_ENCRYPTED_PASSWORD_FROM_STEP_1</module-option>
                    <module-option name="managedConnectionFactoryName">jboss.jca:name=ICCD_DS,service=LocalTxCM</module-option>
                </login-module>
            </authentication>
    </application-policy>

Change USER_NAME_HERE to the datasource username and THE_ENCRYPTED_PASSWORD_FROM_STEP_1 to the result of step 1.


You'll have to restart JBoss for the login-config.xml to take.

Live A Little: Try A Flash Dynamic Desktop Background

| No Comments
Flash, Javascript, an iFrame and a little imagination make for cheap and easy desktop fun.

You know those good ideas you have but put off trying, saying "I'll get to that later"? Well, Windows has long allowed an HTML file to be used as a desktop background and I've been hoping to experiment with this for a few years now. I finally got around to trying it out yesterday and can say that thanks to that thing of beauty we call the "iFrame", I was able to embed any site I cared to, including Flash apps, as my Windows background. It worked so well that I pushed the idea a little further and made a Javascript-driven HTML page that anyone can download and easily use to experiment with this little-known trick.

How It Works

The trick to it all is pretty low-tech and leverages Javascript, a cookie (to save user preferences) and an iFrame. When the HTML page is done loading, I call a Javascript function that injects an iFrame into an empty DIV that fills the screen.

The resulting (run-time) HTML looks a little like this:

[code]
<div id="myFrame">
  <iframe name="dynDesktopFrame" src="http://www.fwaphoto.com"
    width="100%" height="100%" frameborder="0"></iframe>
  </div>
[/code]

The iFrame and CSS style code embedded in the document do the rest: your screen is filled with the page found at whatever URL is set into the iFrame's "src" attribute. This URL isn't hard-coded, but it set using a configurable cookie, so you can dynamically change your Windows wallpaper at will.

Attend A Seminar In Your PJs: Free Adobe Dev. Week "Webinars"

| No Comments
Adobe shows some love to the folks who actually make their technologies relevant: developers.

Admit it: without good "3rd party" developers to make it dance and sing, no platform or technology would ever succeed. That's why Adobe is holding its annual "Developer Week" from May 10-14, 2010, to encourage existing developers to delve deeper into their offerings and to entice novices into the fold. The key part of this event are 20 free web training seminars Adobe is running to cover a gamut of Adobe-related development technologies, from Flash and Flex to Coldfusion.

Yes, they are "Web Seminars" and all you need is a browser, the Flash plug-in and an internet connection to participate. Of course Adobe calls them "Webinars". How very "2.0" of them. <cough>

Bonus: anyone who registers and attends a session is eligible to win a copy of Flash Builder 4 Professional or Creative Suite 5 Web Premium, with one copy of FB4 Pro being awarded per session and 3 copies of CS5 Web Premium being drawn among all attendees.

You can register online right here. Enjoy!

Got Training?

If you missed 360|Flex but would like to get some Flex/Flash developer training for free, you definitely should check this out. All sorts of topics will be covered, from introductory level to  überflashalicious. Besides, admit it: you've never been trained by industry-leading experts while eating munchies in your pajamas before, have you? Now's your chance, so get on it already.

Seminars I think people (by "people" I of course mean "myself") will find particularly interesting are:


Don't Wait, Educate

If you are a student or are currently unemployed/employed outside of the software development field, this is by far your best chance to start building some salable skills for free. Go fetch  a free, legal license to Flash Builder from Adobe and get yourself trained up. I'll see you in the trenches. Kudos to Adobe for making their development tools and experienced trainers available to the next generation of Flash/Flex developers.

Paging Dr. Livecycle

Finally, looking at the seminars on tap, my only real disappointment is that I don't see any Livecycle-related training on tap. As my colleague and friend Kevin would say: "What up?" If Adobe doesn't promote their own flagship enterprise technology to developers, then who the heck will? They should get one of their gurus ( Christophe or Greg, for instance) and spread the word.

As always, I invite your comments. Ciao!

Video - What if 80's Games were Real?

| 2 Comments
French film-maker Patrick Jean resurrects 80's games and takes over the world. More news at 6:00.

In honour of all you nostalgic souls out there, here is a video to lighten your melancholy mood. I caught wind of this short movie over at Ain't It Cool News. It's a very clever "What if" disaster film called "PIXELS" that serves up a tasty tribute to retro gaming's greatest icons and development studios. Running a terse 2:34, it's a delicious treat for people like me who recall the 80's -- and 80's gaming, in particular -- fondly. (Wow, two food metaphors in a row... I must be hungry.)

Enjoy, and try to see if you can name all of the gaming allusions. There are just so many, and some of them are hidden, so you might need to keep your finger on the pause button. Triple bonus nostalgia points if you can tell me what inspired the style of the special One More Production logo at the beginning of the clip. I recognized it instantly. (Hint: the answer is hidden in the film itself.)

For fun, I welcome you to post your favourite 80's video game in the comments section. Don't hold back, I just know you have one!




Cross-Compile This: Apple Crosses Street to Kick Adobe

| 6 Comments
Not content to just block the Flash Player, Apple leaves the safe confines of its previous excuses to ban cross-compiled Actionscript from iPhones.

As reported all over the Flash platform blogosphere, Apple has just changed their iPhone Developer Program License Agreement which applies to all iDevices (i.e. iPhone/iPod/iPad). This change, which targets any code not originally written in an Apple-approved language has effectively killed the idea of cross-compiled Actionscript making it onto the App Store... smothering Flash CS5's flagship feature in the crib mere days before its release.

That's not what we generally call "playing well with others".

The Smoking Gun

Here is the offending text:

3.3.1 Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs. Applications must be originally written in Objective-C, C, C++ or JavaScript as executed by the iPhone OS WebKit engine, and only code written in C, C++ and Objective-C may compile and directly link against the Documented APIs (e.g., Applications that link to Documented APIs through an intermediary translation or compatibility layer or tool are prohibited).

(Possibly in case some might try to argue that by being an ECMAScript variant, Actionscript is a form of Javascript, Apple explicitly states that for any Javascript to be acceptable, it has to run in the "iPhone OS WebKit engine". Just goes to prove that when it comes to lawyers, Apple can afford the best, as the Beatles have learned.)

It's My Party (And I'll License You If I Want To)

Here, to add to the many other voices out there, are my thoughts on this whole unfortunate dust-up:

  1. Apple's official defense of blocking Flash on iDevices has been that they are looking out for their consumers by attempting to guarantee a minimal level of consistent performance on what are not very powerful devices. I call this the "It's for the children" defense: as long as the ends are all sunshine and roses, it doesn't matter what underhanded things you are actually doing.
  2. Adobe knew all along that in developing their cross-compiler and threatening Apple's development monopoly, the folks at Apple could easily pants them like this. They were obviously out on a limb, so I assume that the smart folks at Adobe was banking on the idea that Apple wouldn't step outside the safe confines of their previous excuses for blocking Flash. Like the ruthlessly territorial animal that it is, however, Apple chose to bite, not bark. Thus comes to an end the short and tumultuous life of cross-compiled Flash on iPhone. Johnny, we hardly knew ye.
  3. With this malicious licensing change, Apple has gone well beyond the safe confines of their original (arguably) defensible position. They no longer have the cover of saying that the license is meant to protect users. Au contraire. It is very clearly meant to protect Apple's interests. That's fine. I'll gladly defend the profit motive. I just don't think this is a guaranteed long-term win for Apple.
  4. With a ream of powerful Android phones and Tegra II tablets on the way anytime now, Apple is about to face a lot of competition in the smart phone and "iPad" or "touch screen, internet-enabled, not quite a laptop" space. At the vanguard of this assault is Adobe with Flash 10.1 (on Palm, Android and Blackberry) and AIR on Android (surely to be followed by AIR on other mobile OSes).
  5. Granted, Adobe loses this first battle. They invested a lot of money in developing this (open-source-based) iPhone cross-compiler and selling the idea to developers. However, these new non-Apple smartphones and impending tablets are all much more powerful and most likely less expensive than the iPhone and iPad. If both Adobe and we Flash platform developers play our cards right, the technical and functional superiority of this new wave will overcome the iDevices' strengths (i.e. the app store, latte-drinking fanboy base, casual users whose nephew told them that Apple products are always better) and win the war.
  6. The smart thing to do is not for Adobe to kick back at Apple (as some less temperate souls have suggested), but to continue eroding its monopoly. First, stay the course. Second, make a cross-platform, cross-vendor App Store killer. Enough with the multiplicity of App Store clones (e.g. Android Market, Adobe AIR Marketplace, individual carriers' app stores). Come up with a licensing and profit-sharing scheme and band together for the good of you all. Just make sure you give developers a fair shake because they are the key to your success.

The Big Picture On Small Devices

In the end, as developers, ours isn't a battle to get Flash on iPhone, it's to get our code on the most devices possible, making our non-objective-C skills more valuable. If Flash and AIR-enabled devices eventually get the lion's share of the market over iDevices, then we will have won, no matter what Steve "I'm geniuser than you" Jobs and his many lawyers decide.

I always say that no movie really starts until you know who the bad guy is. In this case, Jobs and his buddies have put their money where their mouths are: the iPhone/iPod/iPad space is closed and they own the keys. Frankly, it's nice to get some clarity here rather than second-hand quotes of The Steve Jobs calling Adobe "lazy" or some such other silly thing. 

Now we really know exactly where Jobs and Apple stand: alone. The exact same place you'll find every other kid on the playground who waves his finger at his peers and says "It's my ball and you can't play with it."

That's ok, Stevie. We have our own.

Read My New Article on UX and Emotion at UXMag.com

| No Comments
UXMagCover.pngA random event involving a Coke machine at 360|Flex inspired me to write an article on emotion and User Experience (UX). Rather than post it on my blog, I instead submitted it to the fine people at UX Magazine hoping they might be interested. I'm proud to say that it was accepted and that after a few minor edits, has just now been posted.

The principle I discuss is that while we often talk about emotion in UX, it can be difficult to objectively identify what actually triggers a user's emotions. I therefore try to provide some guidance on how to leverage user expectations to elicit positive emotions and avoid setting off negative ones.

Please hop over to UX Magazine and let me know what you think. If you haven't read this fine online publication before, it is written and edited by the leading minds of the UX revolution, so I'm confident you'll find it a great source of wisdom, guidance and inspiration in all things "UX".

You can check out the article here: UX, Emotion and Free Coke Machines.

Source for "Flash Doom Triple Pack" Released

| No Comments
A while back, I posted an entry on the universe of cross-compiled code and the power of Adobe Alchemy. At that time, I put in a good word for the most publicized example of Alchemy at work: Flash Doom. Well, not content to just please the nostalgic gamer masses, Mike Walsh, the creator of this surprising port, is bringing smiles to curious Flash developers everywhere. He has just released the source code for the latest version of the conversion, the Doom Triple Pack. The Triple Pack includes the shareware episodes of Doom, Hexen, and a personal favourite of mine, Heretic.

In case you wanted a refresher on what Alchemy does, here is the one sentence "nutshell": Alchemy allows C and C++ code to which hooks have been added to be cross-compiled to AVM2 byte-code and built into a SWF file which can be loaded into a Flash application. The intent of this experiment was to provide a means of making existing (legacy or open source) libraries available to serious, business-driven Flash applications. As is often the case, despite the "useful" nature of this technology, game developers have driven the cutting edge and come up with something quite unexpected.

Get the Source

As mentioned above, Mike posted the source to the Triple Pack on GitHub a few days ago, to little fanfare. If you'd like to see exactly how he pulled it all off, now's your chance. I've only had time to poke around a little but his custom pre-loader is in there, as are reams of C code (ah, the nostalgia!). Shortly after the original release of Flash Doom, Mike explained the ins and outs of his endeavour in this interview with Peter Elst.

Also, here is a link to a step-by-step guide to compiling your own Alchemy-powered Doom. It is not by Mike but might help in making heads or tails of his source.

Spring is Here: Google Nexus One Comes to Canada

| No Comments
Nexus One.png
With all the hype surrounding the impending arrival of Flash 10.1 on the major mobile OSes and AIR on Android, those of use who live in the northern climes of the Dominion of Canada have for months coveted our southern neighbours' access to Google's Nexus One, the undisputed heavyweight champion of Android smartphones.

Well, covet no longer ye denizens of the North, your prayers have been answered!

Rejoice Canuck Mobile Flash Developers

Google has just launched the unlocked (i.e. contract-free) Nexus One to Canada. It supports three 3G bands (850, 1900 and 2100 MHz) and four GSM frequencies (850/900/1800/1900 MHz). This means than unlike the previously available US-only model, it is fully compatible with the Rogers 3G network and is being officially sold into Canada (for $520USD).

The Specs of this phone are currently pretty much unparalleled in today's market:
  • Its 3.7" touchscreen runs at a resolution of 800 X 480 (dwarfing the iPhone 3GS' lovely 480 X 320 screen). 
  • It runs on a 1GHz  Qualcomm "Snapdragon" CPU and 512MB of RAM.
Other notable goodies:
  • GPS
  • 5MP camera (w/ up to 20fps video)
  • Bluetooth 2.1 + EDR w/ stereo A2DP support
  • Android 2.1 OS (aka "Eclair") running a full suite of Google-centric apps integrated with Google Search, Google Maps, etc. etc.
The key (for me):
  • Coming soon: Full Flash 10.1 and Mobile AIR support (Boo-yah!)
One negative:
  • No multi-touch (darn!)

Thou Shalt not Covet

The best way to get to know the Nexus is to visit the Nexus One YouTube Channel set up by Google. Sure, it's a marketing site but it really shows off how they designed and manufactured this juggernaut of smartphone prowess.

If and when I manage to close out this current project and if I get approval from my boss, I hope to soon launch into serious Flash/Flex/AIR development targeted at phones such as this and the incoming crop of Android Tegra II tablets. I'll surely be blogging soon about this new adventure.

In the mean-time, check out these demos of Flash running in the browser on a Nexus One:

Populate a drop-down with a web service in a PDF.

| 2 Comments
I get this question a lot so let's record my answer.

How do you populate a drop-down with the returned results of a web service? Let's say the web service returns a repeating XML node (FirstName, LastName).

Do not try to use Dynmaic Data Bindings just yet. They only work the first time you call them as per Adobe's own: http://forms.stefcameron.com/2006/07/29/dynamic-properties/ (Read to the bottom).

You'll have to do it manually with JavaScript. It's real easy though...
Like many other people, I suspect, no matter how big my hard drive is, I somehow find a way to fill it up. Even if you have enough space, with the ridiculously large hard drives on the market these days, it can quickly become difficult for a human brain to recall everything that's on there.

In recent months, I've been slowly squeezed out of disk space by Torrent downloads and various installs (all of them necessary, of course.) On a number of occasions, I've tried going manually through my disk, deleting/uninstalling things as I go, but it really hasn't freed up much space. I needed help to find out what was leeching so much of my precious Gigs.

Enter SpaceSniffer
Space Sniffer Top Level Scan
This weekend, I finally finished Half Life 2 (awesome!) after a long hiatus (my latest saved game was from April 2009.) I have had that game and the separate Episode Pack for well over a year but with the move to 4Point and all the exciting things going on I haven't had much time to sit at my PC for anything else than work.

Well, long story short, I finished off Half Life 2 this afternoon but had no room left to install the Episode Pack. Enter SpaceSniffer, a little Java-based freeware app that analyzes the used space on your Hard Drive and presents it in a visual way, in real-time no less. Now I finally know where all my Gigs have gone.

Intuitive and -- dare I say -- Kinda Fun
Space Sniffer of my Games Directory
SpaceSniffer crawls through your directories, one at a time, doing an analysis of the directory tree and presenting its findings as it goes. It's a little difficult to describe how it looks, but the UI is slowly sub-divided into boxes representing the folders on the drive, from the top-level and on down. As the process crawls deeper into the tree and the visual boxes get smaller, SpaceSniffer begins to hide the overwhelming details, allowing you to concentrate on what's relevant. If you ever want to see those hidden details, you can just click on a box and it will be divided into sub-boxes representing it's contents. très cool.

So, if you are running out of disk space, or would just like to do a little disk clean-up, this is the program you've been looking for. SpaceSniffer runs on Windows 2000, XP, Vista and WIndows 7.

Thumbs up from here to Uderzo Umberto for creating such a polished, useful and focused piece of software. Grazie mille!

Your Subversion Repository - Treat it with Respect

| No Comments
I learned a lesson this week: it's called good manners when it comes to the subversion repository. Apparently it does not like it when you just randomly delete files on your local system, add in new ones, and then try to check them in. It throws up its hands in horror and red flags go up everywhere. Go figure. 

It all started when I started working on a revamp of our website. I copied my local website on my laptop, and then working from there, created an entire new website structure and design on my local machine. Fired it off back and forth with a design company working on our new home page and menu bar, and never gave a thought to my existing website that was merrily being checked in and out of subversion (using Coda). 

When it came to uploading the new site and flipping the switch...I simply deleted the old site using Finder and added the new. 

This was really the wrong thing to do. Really wrong. For a couple of reasons:

First of all, in doing this, I also deleted the .svn files (hidden). The removed files also had not been correctly deleted in the repository...so it thought they were still there, but had red flagged them as missing. 

Secondly, about five months previously some other changes had been done to our site by another website company and the changes had been made on the server. I did not get a list of changes made to the site and I was unaware that certain folders and files had not been downloaded and committed to subversion, because I did not know they had been changed or added. 

This means that when I copied my local folder to work on recreating a new website, I then missed these files. The local copy I handed off to the new website company for further changes and we all merrily went on our way not realizing that certain folders and files had not been downloaded and checked in. 

In short, the entire thing was a mess and took about three hours to clean up in the subversion, plus another five hours tracking down the previous changes that had been lost in the process. 

Lesson learned. Real good.

In the future, I will treat my subversion repository with a lot more respect. I hereby decree that from now on, I will:

  • not allow anyone to make server side changes without letting me know what they've changed and what I need to download and commit
  • download the entire site, if server side changes do occur and i'm unsure whether or not I've got them all, and carefully commit all changes into the subversion
  • I will no longer delete folders and files in my local copy using Finder
  • If I delete files and folders I'll do it in Coda, and appropriately delete them in the subversion
  • I will carefully monitor my subversion repository and address any red flags when they arise
  
In short, I promise to understand how subversion works and treat it with respect. I swear. 

 

iPad: Plenty of Shine... but No Flash

| No Comments
[Updated a few hours later to add a couple details I left out in the first draft.]

I just followed the live step-by-step blogging of the iPad release over at Engadget. The device looks pretty much like what I expected and its functionality is pretty much what I expected. It's basically... a giant iPod Touch. (I had expected a camera, though.)

I must admit, however, that its "low" starting price was a pleasant surprise: between $499 and $829. I had predicted something around $800 and hadn't figured on so many different models (6 in all).

iPadHandHeld.jpg

According to the hands-on comments from EnGadget and Gizmodo, the iPad has plenty of power (1GHz "A4" CPU) for browsing the web, etc., but no multi-tasking (grrr) and... if you look closely at screen shots of Steve Jobs' demo, you'll notice... The Blue Lego Cube of Disappointment. 

noFlashOnIPad.jpg
All iPhone/iPod Touch owners will recognize it instantly. What it means is that despite its size, power and (much-hyped) promise, the iPad's Mobile Safari has no Flash plug-in

In his presentation, Steve Jobs called the device "magical". Well why don't you just whip us up some magic there Steve and get Flash to work on your freaking device? I'll bet you a Silicon Valley latté that Adobe will do it for free

Anyways, enough from me. With your hopes mercilessly dashed once more, all you Flash Platform developers can now return to your regularly scheduled hand-wringing.

The Magic of Panic's Coda

| 2 Comments
Currently I'm revamping our corporate website. Updating content, rearranging pages, actually doing a complete overhaul. I'm taking a momentary break to worship at the altar of Coda. 

Coda, to be honest, was one of the biggest reasons I wanted a Mac. I had heard about it, read reviews, and envied those who had Macs.

But I didn't quite understand just how good it actually is. I'd set my standards low from working with multiple inferior products. The last time I revamped the website was pre-Mac. It was painful. I had limited access to pages, rearranging stuff was a nightmare, and modifying the HTML was a nightmare. 

This time around, Coda makes everything easy. For example: I've got blocks of HTML I want to re-use, but not necessarily in a global search and replace (which is fast and easy with Coda too, btw). I need to make tiny modifications to it, but don't want to sit and retype it all each time. Nor do I want to go back to pages where it's been used and copy and paste it each time. 

I was thinking, wow, a clipboard function would be really handy. Seems logical, I look around, see "Clips" on the bottom of the Coda UI and go: "hunh". Yup. It's a full clipboard with the ability to save clips of HTML in different folders, make them accessible global or just by site (I manage several sites...this is worth a lot to me), and even better than the average clipboard...I can EDIT the HTML at whim if I find that I'm making a particular change on a regular basis. 

Best of all, it's an overlay clipboard that I can move around. I just drag it to my second desktop, let it sit there...and it's a simple double click to add the HTML to a page. I don't have to keep re-opening to access what I need.

It may not seem like much. But when working on a lot of pages with limited time...I have to say Coda has shaved hours, if not days off of my work. 

Add to this subversion accessibility, the ability to share pages between users, terminal access through the main UI, and a host of other really important functions...and Coda offers everything I need to manage a website. 

Thank you Panic. 

Obscurity is not Security: Insurgents Hack U.S. Drones

| No Comments
[Update:The security vulnerability has been fixed]

A word of caution to my fellow developers: if you think your software is secure because it's obscure enough that nobody would bother to hack it, then you might be in for an unhappy surprise.

Case In Point
a118_predator_firing_hellfire_2050081722-16359.jpg
Predator drone firing a Hellfire missile
(source: US Air Force)

According to the Wall Street Journal and a follow-up report from l'Agence France Presse, Department of Defense officials have admitted that video feeds from Predator surveillance drones were routinely intercepted by "Iranian-backed insurgents" in Iraq and Al-Qaeda members in Afghanistan.

Perhaps it would all make for a better story if I could tell you that it required a vast conspiracy of ex-KGB agents using supercomputers hidden in bunkers under the Urals to crack the video's NSA-level COSMIC Top Secret encryption, but unfortunately, real life is slightly less dramatic (and much more deadly). The UAVs streamed the video in an unencrypted form, making it possible for a rag-tag assemblage of insurgents often with no access to the Internet to intercept the feeds using a "commercial off the shelf" (COTS) satellite video capture tool, SkyGrabber (MSRP: $25 US) and laptops. The minimal effort it took probably didn't even distract them from their day job manufacturing IEDs and blowing up innocents.

From the WSJ article:

The potential drone vulnerability lies in an unencrypted downlink between the unmanned craft and ground control. The U.S. government has known about the flaw since the U.S. campaign in Bosnia in the 1990s, current and former officials said. But the Pentagon assumed local adversaries wouldn't know how to exploit it, the officials said. (emphasis added)

The military remained unaware of the practice up until a laptop belonging to an "Iranian-backed Shiite militant" was captured on which Military Intelligence discovered intercepted video footage. (I'm frankly surprised it didn't show up on YouTube.)

The Lesson: Obscurity is not Security

It is supposedly unlikely that the video was of much use to the extremists and while the whole story seems a little ridiculous, it surely is no laughing matter. Here's hoping some heads will roll because "incompetence" isn't strong enough a word.

As software developers, we're usually required to think about security as a key requirement of any system. However, when you're tasked with developing software for a $3+ million unmanned aerial vehicle (UAV), you'd better pay attention to these "details" because somebody very dangerous surely is. When that happens, it's a whole lot more than just data you're protecting.


Further reading

Cross-Compiling Java/C#/Ruby to iPhone

| No Comments
(This is a posting I started a while back (on my brother's b-day in May) but didn't publish at the time... don't remember why.)

Cross-Compiling C/C++ to Actionscript using Alchemy

As you may well know, Adobe Labs has developed an exciting tool called Alchemy that leverages the LLVM open source project to cross-compile C/C++ code to a common run-time byte code. This byte-code is then cross-compiled to Actionscript code which is then compiled to Actionscript byte code (ABC). The earliest and most striking example of what can be accomplished with Alchemy was the port of Doom to Flash that Dave released on Newgrounds within a week of Alchemy's launch. He has now released the Doom Triple Pack which includes the bad boys Doom, Heretic and Hexen.

The good people of Automata Studios helped Adobe develop one of the first projects for demonstrating how Alchemy works. Here is their write-up on the subject.

Cross-Compiling to Objective-C (and more!) Using XML-VM

overview.jpg
Another development that has come down the pipe is some research done by Arno Puder and his colleagues at San Fancisco State University. Their work involves using open-source tools to transform code from one language (e.g. Java, C#) to an intermediate XML format which can then be transformed to another language (in this example, Objective-C). The project is called XMLVM.

Prof. Puder presented how all of this works at the Google offices and the video of this presentation is available on YouTube. It is a very cool idea and demonstrates once again (as all software does, really) the potential aggregate power of using many small, simple constructs. Byte code statements are converted to an XML format which can then be transformed to Objective-C. While the final code might not be as optimal as the original, it will do the same thing. My guess is that the toughest part would probably be handling language elements that don't exist in both the source and target languages (i.e. garbage collection, loose typing/auto-boxing, annotations). Perhaps you'd have to do away with overly "native" parts of a language language when writing the "from" code. The good professor covers part of this challenge in his presentation. 

While the target language discussed is Objective-C, as you can see from the diagram above, the XMLVM project allows you to cross-compile to and from a number of different languages.

Useful SQL Queries

| No Comments

You might find the following queries quite handy for your day to day SQL operations:

1. Get the total number of records in a table:

SELECT COUNT(*) FROM TABLE_NAME;

SQL User queries in Oracle

| No Comments

Here are a few  useful user SQL code snippets in Oracle:

1. To create a user

CREATE USER username
IDENTIFIED BY password
DEFAULT TABLESPACE USERS
TEMPORARY TABLESPACE TEMP;

2. Grant user privileges:

GRANT CONNECT, RESOURCE, CREATE SESSION, CREATE VIEW TO username;


3. Grant all privileges:

GRANT all privileges TO username;

4. Delete a user or to delete a user and the associated user schema

drop user username cascade;

This SQL Snippet get a list of all the tables under a user:

select * from user_objects where object_type = 'TABLE';

This SQL Snippet will get you a list of all the sequences in a DB Schema for the user tables

select * from user_sequences


This SQL Snippet will get you a list of all the view in a DB Schema for the user tables

select * from user_views;

Happy Coding :)

Finding out the Oracle Version using SQL

| No Comments
If you ever have to find out the version of Oracle using SQL, use the following SQL command and it will spit out all the details.

SQL
 SELECT * FROM V$VERSION;

OUTPUT

BANNER                                                          
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production                          
CORE    10.2.0.1.0    Production                                        
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production         
NLSRTL Version 10.2.0.1.0 - Production
----------------------------------------------------------------

Happy Coding :)

Changing the default port number in Apache Tomcat

| No Comments

I had to run two webservers on my machine at the same time. Since both of them used port 8080 , the easiest way to run the two servers at the same time was to modify the port number on one of them.

Here is how we can change the port number in Apache Tomcat:

1. Navigate to : Apache Software Foundation\Tomcat X.X\conf



tomcat 5.5 Port Number.png 2. Modify the Server.xml file:

<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
<Connector port="8080" ... />

Modify this to another non-conflicting port ( I changed it to 8888)

Happy Coding

XML Manipulation in Flex and ActionScript

| No Comments
There are lots of crazy ways of manipulating XML in ActionScript.Here are a few simple tips and tricks on manipulating XML in Actionscript.

  1. Declaring an XML Variable: An XML variable can be created in ActionScript as follows :
                 var tempSearchXML:XML =     <searchCriteria>
                                                                <branchName>023</branchName>
                                                                <contfirstname></contfirstname>
                                                                 <contlastname></contlastname>
                                                                 <contmailsort></contmailsort>
                                                                 <contphone></contphone>
                                                             </searchCriteria>
                                         
2.  Preview an XML Variable : An XML variable can be previewed in an Alert Box by converting the XML to a string object
       
            Alert.show(tempSearchXML.toString());
           
3.  Getting the value of a Node in the XML:

           Alert.show(tempSearchXML.branchName.toString());

4.  Setting the Value of Node in the XML : The following code sets the value of a node 'contfirstname '.
 
            tempSearchXML.contfirstname ="Armaghan";

5.  Setting / Changing / Updating the Node Attribute in the XML: The following code snippet changes the name of a Node from 'contlastname' to 'lastname'.

            tempSearchXML.contlastname.setName("lastname") ;
           
5.  Delete a Node in the XML: The following code snippet deletes a Node called 'contphone' in the XML.

            delete tempSearchXML.contphone;

6.  Adding a Node in the XML: The following code snippet adds a Node called 'text' in the XML and sets its value at the same time.

            tempSearchXML.text ="Taylor" ;

Happy Coding :)

Dump the Ant build information to a log file

| No Comments

If you ever need to dump the build information from the command prompt console into a log file, just add a -logfile <filename>.log parameter after your build file call in the command prompt console and you're good to go.

Happy Coding :)

Default Value in QueryParam Annotations

| No Comments
In order to remove any null pointer exceptions while using RestEasy Annotations, you can always pass a default value and handle it appropriately in the Data Access Objects ( If you are using one. This ensures that there are no null pointer excpetions from the returning classes.

Here is a code snippet to do just this:

public StreamingOutput getUsersSummaryList(@QueryParam("active") @DefaultValue("0") String active  ){}

PermGen space error (Hibernate, JPA)

| No Comments

If you ever come across a PerGen space error in Hibernate or JPA...it refers to the java.lang.outfspacememoryerror (Your webapp is out of memory). PermGen is  used to store the class definations ( and I do mean all the Loaded Classes ). This error refers to the heap space being full due to the large number of classes.

Generally you can recover from these errors by restarting your WebServer. If you want to really fix it, do one of the following 2:

1. Hibernate: Change the hibernate.properties file from  "hibernate.bytecode.provider javassist" to hibernate.bytecode.provider cglib".

2. JPA:  Change the persistance.xml file from
<property name="hibernate.bytecode.provider" value="javaassist"/> to <property name="hibernate.bytecode.provider" value="cglib"/>

Happy Coding :)

The answer to everything? Almost.

| No Comments
For those of you following my exploits with the instrument of torture that is my home laptop, you will be happy to know it's been solved. Here's the long and the short of it. After re-installing Vista on the beast and routinely waiting up to 20 minutes for it to load and experiencing up to 23 crashes in an evening I found the solution. 

Let me backtrack.

It all started one bright, shiny, happy day when a nice FedEx man who didn't mind my lurking in the hallway (that much) delivered my shiny new Mac. They say the iPhone is the gateway drug: and it's certainly true in my case. I will never go back to a PC. You can't make me. 

So the Mac-ifying of my life continued on in a rocketing snowball fashion. It soon rolled right over my Dell Mini 9 (That started when I sorta locked it by letting Linux background install too many apps...100% of mini's mini 4GB hard drive used up. oops. my bad. Purchased a 32GB replacement and solved the mini's biggest limitation. If you're looking for a replacement hard drive for your mini consider www.conics.net in Japan. Offer good selection, good price, amazing delivery.). 

Once all was said and done, my new world order made me look at my instrument of torture in a new light. Whereas it had seemed slow before...well, now compared to the speedy Mac it operated at a painful crawl. Action was immediate.


No, I didn't take a sledgehammer to it. Number one reason being that a fire a few years back a fire at my cottage resulted in the firemen taking the sledgehammer (a small price to pay for salvaging the ruins of my home I think). Number two reason being that the perfect solution to my wiki woes (side story here: I snapped up a five-user Confluence license when they went on sale awhile back...but sadly the server I was using for my brother's website can't handle the install...needs more juice) is setting up my own home server. I had hoped to steal the kid's computer. But he resisted. Something about college, homework, etc., I have to say it all seemed really trivial to me, but he wouldn't let me take it. How rude.

So my greedy eyes next lit upon the instrument of torture. A-ha! It had once held Linux quite happily. Could it, would it be the perfect solution? 

Well...it took me all of five second to make that decision (once I recalled that the sledgehammer was gone). Vista: no more. And good riddance. As one of my past installs on the instrument of torture was Ubuntu, I decided to go with the Ubuntu Server on it (Jaunty for those who care). Biggest blip in the half hour it all took to configure was setting it up with a static IP. And that took about two minutes. 

Tonight I'll be installing Confluence and setting up my wiki once more. Yippee! 

Yes, I know this is not Flex. And it is not that Flex is dead to me. It's just that playing in the world of shells and wikis is a lot of fun and very very distracting. Some day, once my wiki woes are long forgotten I'll return. 

I'll keep you updated on the Confluence install and I'm also toying with adding Melody for my brother's website (currently on Movable Type). 

[Note that Ubuntu now has a netbook remix...interesting.]