Two Weeks in Flash Actionscript

This is my second week coding full time in Flash Actionscript. Sooner or later I’d have bumped into things that would drive me crazy… And here’s a small list of what I’ve encountered:

1. XML feeds, masking, embedded fonts, css styles (for the XML feeds) and scrollable areas is a combination for hours of fun headaches. One can easily spend all night trying to figure out why something doesn’t work the way it’s supposed to… Certain things are very poorly documented by Adobe (formerly Macromedia).
2. Flash is most useful when used with Actionscripts… Some designer/coder wannabes try to do Actionscripts but instead have code littered all over the place… It’s just NOT cool!
3. Sometimes what seems easy can be more than a handful when you try to code for it… Simplicity can be deceiving in Flash/Actionscripting….
4. Components are your friends. Use them whenever you can. Customizable ones are totally worth every penny if you had to buy them. Just weigh the time you could have spent on it if you had to code that biatch yourself…

I also learned a couple of client-management tips from Jiann… Even though Brian tried to warn me about some of these things, I’ve had some pretty pleasant clients that I didn’t think running into one of “them” was in my Karma…

1. Clients are always right even when they give you some of the worst designs, features and requirements to work with.
2. Trying to beautify, improve upon or enhance anything this type of client gives you only will give you more grief later… because he’s just going to ask you go fix it back to exactly the way he had it… never mind how stupid, unusable, ugly or impractical the design elements or features are.
3. It’s all about ego, pride and control. Some clients want to feel they are in control and will ask you to do crappy stuff even though they knew your solution was better.
4. Stand up to unreasonable requests and demand overage. Or else feature creeps will never stop if the pay is on project basis. Some clients think they own you if they are paying you… Just say “NO” to abusive clients…
5. Being over-confident in your ability to pick up new programming skills can make you lose valuable sleep and family time… 🙁
6. Never mind that you have just achieved miracle doing something nobody thought was undoable given how short the deadline is. This type of client will always look for the smallest fault and overlook the fact that you just completed some of the most important features of the site.

Ok… now I feel better….

Back to coding…

One Week Developing Flash Actionscript

After having developed in Flash for almost a full week, I can honest say that….

1. Flash rocks.
2. Actionscript is not too shabby.
3. Flash can truly do some wonderful stuff.
4. I am looking forward to seeing what Apollo and Flex can do…
5. If inherited from the wrong hands, Flash/Actionscript is a bitch to maintain and extend… All you Actionscript code “litterers”… you know what I am talking about…. Please freaking code everything in ONE FRAME! Take advantage of Actionscript’s Object Oriented design. Damn it…

Again, I can’t thank Murdza and lynda.com enough for bringing me up to speed so quickly on this…

Awesome Check Delivery Status Widget

Developers who write apps for the Mac OSX Platform never seizes to amaze me with their innovative approaches to how things ought to work…

The Delivery Status Widget is one of those apps that’s just way cool. This is something I’d never expect seeing having written on the Windows camp (the snobbish Apple side of me speaking)… On Windows, I used to hate having to install unnecessary applications because you just have no idea what it’s doing to your system (“fantastic” DLLs, “awesome” registry keys… etc). Sometimes uninstallers even screw up the system… But of course, that was back in 2004, how much has changed… Now Windows is more stable than EVER before… (yeah, right).

Delivery Status Widget

Speaking of widgets, it seems like Vista has some cool stuff going on albeit being just copies of the Mac OSX Dashboard widgets in looks and functionalities. But it’s like this… what do you expect out of Redmond nowadays anyway. Chee-hoi claims that “under the hood” Vista is going to really kick ass. That may be the case if whatever Microsoft promises can be fully materialized before people just start walking away and do themselves a favor by getting a Mac…. that or before Microsoft’s bloatware and vapor ware just implodes. 😉

Yeah, I know… It’s Wednesday… and my snobbish Mac side has already taken over… Bad Mac, HEEL!

via [Gizmodo]

Developing with Flash, Finally

After having resisted learning Flash since the days of Flash 5.0, I finally had to budge and cave in to doing it again. But thanks to Lynda.com, the learning experience so far has been pretty positive, especially with the introduction of Adobe Flash CS3 and ActionScript 3.0. It seems like every other project referred to me these days wants something to do with Flash. So I guess having to learn it was only a matter of time. But really, Lynda.com makes it so much easier and effective.

The upside is, I am already pretty conversant with the back end and server side stuff. I am hoping by adding Flash to my arsenal of client side interactive design and scripting skills will make the overall combination of my skill set that much more demanding (since most people only know one thing or the other, client-side scripting or server-side, rarely BOTH). Unless, of course, you are Michael Murdza, who just knows too much about everything anyway…

Upgrading PEAR on Mac OSX Tiger

It’s annoying sometimes having to upgrade or install opensource applications on Mac OSX. Yes, it’s BSD Unix, but it’s not quite Linux when it comes to raw package management from command prompts and how some applications assume you are installing it on Linux. On my fresh install of Tiger, I was having some issues upgrade PEAR. Because it’s not really documented anywhere, here’s how I did it:

1. Follow the upgrade instruction on PEAR’s official website.

2. Once PEAR is upgraded, issuing

1
$: pear -V

from the command prompt should still give you an old version of PEAR as such:

1
PEAR Version: 1.3.6

3. To fix that, find out where the current version of PEAR is by issuing:

1
$: which pear

It should return:

1
$: /usr/bin/pear

4. Then find out where the upgraded PEAR went by issuing:

1
$: pear config-show

Look for:

1
PEAR executables directory   bin_dir

In my case, it resides in where PHP5 is at:

1
PEAR executables directory   bin_dir   /usr/local/php5/bin

5. Next I make a symbolic link to it from where

1
/usr/bin/pear

is:

1
2
$: mv /usr/bin/pear /usr/bin/pear.old
$: sudo ln -s /usr/local/php5/bin/pear pear

6. Do another

1
$: pear -V

and it should now show the proper version:

1
PEAR Version: 1.5.3

Overlapping Audio Tracks in Safari

Apple’s Safari is definitely a work in progress with the kind of weird bugs I keep running into. One of the bugs I hadn’t documented about is overlapping audio tracks in Safari under a very special circumstance.

The issue is this: When using AJAX to load one quicktime clip over another, if the first movie hadn’t finished playing as the second movie is loaded in via AJAX, the user will hear the audio tracks of both movie clips playing at the same time. I have no idea why that is, and I am not even going try to guess. And apparently this has not been documented (or the little that I’ve found in Google) by any developer that I know of…

Fortunately there’s a quick fix to this problem (or my clients will drive me crazy). The upside is that this problem can be mitigated with a quick Javascript since the Quicktime object supports Javascript controls. And here’s how it’s done. We all know websites, especially college ones, are reliable and all, you know, their content never changes and they never disappear… But I decided to keep a snapshot of it anyway for future reference. Apple also has a couple of decent documentations on the subject.

Basically I used Javascript to stop playback of the first video before the second one is even loaded in by embedding the event as

1
onClick

. In some cases, it may help to dynamically embed it in the

1
< body>

tag as

1
onLoad

.

An interesting side note: Javascript documentation says that

1
onLoad

events can be triggered with

1
< body>, < iframe>, < frameset>, < img>

and

1
< object>

tags in HTML, but in reality, use of

1
< iframe>

and

1
< object>

are weird among browsers.

IE6, IE7, Firefox, Opera — support

1
onLoad

in the

1
< iframe>

tag, but they do not support it in the

1
< object>

tag.
Safari — the only loner browser that supports

1
onLoad

in the

1
< object>

tag, but NOT the

1
< iframe>

tag…

Sometimes it can really suck being a web developer.

Apple Aperture Rocks!

I went to a free Pro Workshop session at our local Apple Store at Valley Fair mall last night for Apple’s Aperture software. It’s one of those “pro” apps that allows photographers to manage, edit and output photos through an efficient workflow with high quality reasults. All I have to say about Aperture is… WOW! (Sorry, Microsoft… didn’t mean to steal your slogan.)

There are a few quirks in the software that I didn’t really like about though…
1. Edited results will not show up in iPhoto (where photo albums can be shared and do other things that Aperture can’t do).
2. No selective sharpening for now.
3. No RAW support for the DSRL I want (yet).

But I liked the fact that it’s a non-destructive editing process where the master image is never touched/altered in anyway. It took Adobe long enough to figure that one out in CS3 and the revival of Lightroom. Adobe is beginning to become the Microsoft of the creative industry it seems — moving slow with bloated products that don’t improve much over versions… But I digress…

How Much More Can Hotmail Suck?

I gave up on using Hotmail a few months ago. But from time to time I’ve had to log back in to retrieve pieces of information I needed. Today I went back for the first time in months and discovered that my inbox was full of junk mail… all 1500+ of them! And the “Junk Mail” box? Less than 200…

Unlike Gmail or Yahoo, where junk mail filtering success rate is practically 98+%, Hotmail is the exact opposite. Talk about being a miserable failure.

Microsoft seems to be producing a bunch of flops lately… Everything from Hotmail, XBox game console, Zune music player to Windows Vista is pretty sucky. Unfortunately, millions of people still use its products willingly or not. Many businesses are locked in to Microsoft’s products partly because the only kinds of applications they need only exist on Windows (though that’s been less likely the case since the resurgence of the Macs).

I hope Microsoft loses enough market share to Apple and other competitors in all markets to make them feel vulnerable and start innovating again. I mean, com’on, five years and five BILLION dollars on a copycat of Mac OSX is NOT innovation. But of course, the culture for innovation just isn’t in Microsoft’s blood. So it’s kind of oxymoron to put the word “innovation” and “Microsoft” in the same sentence…. there, I just did it again…

Done with Java Programming Class

Today was the last day of the intensive Java programming class. I actually completed the final project ahead of my estimated scheduled time. I even had enough time to complete a make-up assignment I didn’t turn in. This class was especially tough because it was one of those “part one” and “part two” courses rolled into one. I kind of started falling behind during the second half of the class.

Knowing more about Java now made me realized something — PHP is a relatively easy language to pick up and for someone to be comfortable with. But precisely because of these “advantages”, PHP also makes someone without strong programming fundamentals a lazy programmer. Now that I know more about Objected Oriented programming with a “proper” language, I shall apply similar concepts to my future PHP projects. But I hope I get to work on Java programming more so some of that good stuff will actually stick!

Laptop Backup

In preparation to completely wipe my laptop hard drive clean and reinstall Mac OSX (it’s been a couple of years), I got a giant Western Digital My Book drive to back all my data to. Since it’s got two 500GB hard drives in it, I knew making it a mirrored RAID 1 drive would be the ideal solution for a peace of mind (that means making the two drives as if it’s only one, only files backed up to it will be mirrored, or synchronized, on both drives in case if one of the drives fails, all that data is still safe and sound on the 2nd drive).

Unfortunately Western Digital’s hardware doesn’t allow Apple’s Disk Utility to manage it. I ended up having to install Western Digital’s custom RAID utility. Sucks.

The initial backup took about 3 hours to backup about 35GB of data — not very fast. But then again, it’s software RAID. It’s not supposed to be fast anyway.

So now that I have all my stuff backed up. Next week I will be able to finally reinstall OSX and see if the damn machine runs any faster.

Next is to back up all those digital photos stored on Grace’s Mac, which was the real reason I bought this drive in the first place.

Minor Server Hiccups

After we moved all the data from our old Texas ServerBeach machine to the new one in L.A., the new server kept on rebooting itself sporadically. Loz and I monitored and went through the logs for almost two days but couldn’t find anything wrong with it (especially after Loz installed a couple of nice monitoring software). Let me tell ya, having a server that reboots itself whenever it wanted to was stressful.

Good thing the tech support guys at ServerBeach did their thing and swapped out the box for us within an hour of submitting a support ticket. And then 40 minutes after that, we were back in business. I gotta say, I agree with Lawrence, ServerBeach has been pretty good with the kind of service we’ve received so far!

On a similar note, I had a client whose dedicated server was (and I assume still is) hosted with EV1 Servers (now part of The Planet, a company Loz and I were thinking about using but went with ServerBeach instead). And their service was just awful. I received more support from peer users in their discussion board than from EV1’s tech support (all I got was a templated response which offended me quite a bit for the kind of money my client was paying them).

Life is good again.