Alan Klement

Software Development

Velocity Has Left The Building

 Velocity and I were never a good match, so we’ve parted ways….

I just came across an article about Agile Velocity: how to use it and why it’s important. In some ways the author and I are similar…we both have experience as software developers, worked in management positions and we even have the same name, ‘Alan’ (I’m liking this guy already!). Well, turns out the guy is an ‘Agile Coach’ and is preaching about how useful velocity is (maybe we’re not similar after all).

Read the rest of this entry »

Only When Simple Fails

An email popped up on the developer mailing list

“I’m updating the library [server] Ivy pulls from with new versions. It’s gonna take a lot of time and it’s a pain in the butt to deal with. Anyone have suggestions on what libraries to add or any comments about the repository?”

I certainly did have a suggestion: shut down the server and stop using Ivy.
Read the rest of this entry »

Flashtent Sessions

Everything Flash has begun uploading pieces of my talk to their website. Right now only the first two segments are available, when more are availabl I’ll post an update about it.

See the videos on Everything Flash here.

Comment on G+

My FATC Talk Is Now Online

My talk from FATC has been posted by The AT&T Tech Channel. I talk about using FDT & Flash to dev for multiple platforms. Here I’m using an inheritance approach to abstract differences. It’s good to know even though I still prefer a composite approach. I like using a library of platform agnostic business logic and then have each platform target pull from that.

 

 



Comment on G+

Why Do You Actually Track Employee Hours?

a quick anecdote…

I had an employer who required everyone at the company fill in time sheets. These were supposed to be filled in as work was done on projects and then submitted for ‘approval’ at the end of the week. Approval is used abstractly because I’m not really sure what happened as there was never any feedback on it…except for one time when the accountant came up to me…

Read the rest of this entry »

Do We Really Need A QA Phase Anymore?

A funny thing happened…

Over the last year, as I learned more about how Google, Facebook and Flickr deploy software, I noticed little to no mention of QA. In fact often the developers themselves were pushing their commits live. Facebook does have a roll out gatekeeper, but from what I understand he’s reviewing the commit and focusing on how damaging it could be in the case the developer made a mistake.

What’s going on here…..

Read the rest of this entry »

AS2 Detecting When Mouse Leaves the Stage

A handy script when working with Actionscript 2 code. Because there is no Actionscript 3 Event.MOUSE_LEAVE equivalent in AS2. the best thing to do is to write a custom script for mouse detection on stage. I don’t know who authored this, but I’d like to record it so it doesn’t get lost on the internet.
Read the rest of this entry »

Strategies For Global Data ( hey it happens… )

[ disclaimer: I see this technique as 'damage control' and not a best (or even good) practice. Yes, globals are to be avoided ]

Twitter is a wallflower’s dream… anyone can eavesdrop and quietly judge from afar….
Last night Jesse Freeman , Ralph Hauwert and Robert Penner had a little discussion via Twitter about statics & globals. It starts here. Robert encapsulates the danger of globals with this:

Statics are evil when they puncture encapsulation and hide dependencies that impale anyone who tries to use them somewhere new.

Read the rest of this entry »

Liskov’s Behavioral Sub-Typing In Action… or How To Misuse Inheritance

 

Time To Eat My Own Dog Food

A few days ago, I posted an implementation of a Semaphore with AS3. Ever since then, something about the code just didn’t sit right with me. I’ve wanted to research and write about the Liskov substitution principle (LSP) for a while now, and I decided that I would demonstrate it with my Semaphore classes and examples. When I first designed the classes, I thought I was doing a good job, now….not so much. In fact, I think I made errors in my application architecture and overall approach.
Read the rest of this entry »

Synchronization Techniques for Flash & AS3: Part I – The Semaphore

[Edit] The source code for this has been updated and can be seen and downloaded on this follow up post.
Flash does not support multihreading, and that’s probably good thing since managing threads can be very, very difficult; however, Flash can have a kind of concurrency when it comes to user interface, multi-user applications (e.g. games) and synchronizing animations. With user interfaces, a developer may wish to disable parts or all of the UI while asynchronous events, such as loading assets and managing various animations are executing. Within a multi-user environment, imagine a game where players share a limited amount of resources – checking things in and out as they become available ( see ‘Dining Philosophers Problem‘).  Another scenario might be the need to manage many, many animations.

When it comes to concurrency there are various techniques that come to mind – The Semaphore , Java’s ReentrantLock and CountDownLatch, the Actor model, and Scala’s Mailbox. This first post will focus on the semaphore.

Read the rest of this entry »

Offical FDT Training

I have just completed a training series for Powerflasher for FDT.  FDT is a great product and I am very happy to have been asked to write and produce this training for them.

The videos go over what I have learned after many, many hours of working with Eclipse and FDT.

Improving Flash’s Interactive Timeline Animations

Something that has become (somewhat) of a lost art these days is the animated button. Designers used to go crazy with engrossing roll overs and roll outs – sometimes to the detriment of usability. Now-a-days, I don’t see many interesting buttons.

Perhaps it’s due to how button animations can be  decently executed with Javascript and CSS;  people are getting used to those and many designers are simplifying Flash buttons to mimic Javascript and CSS buttons. Another theory might be do to how more of Flash work has shifted towards developers handling  animations.  They prefer to just code the animation and in doing so can do some great things, but some things still can only done by a hand made animation.

Then….there is another theory of mine; a more subtle detail that everyone thinks, but doesn’t say out loud…

Hand animated buttons are jumpy!

Read the rest of this entry »

My Latest Implementaion of Skipping AS3 Events

In a previous post, I talked about how I use method closures to avoid AS3 events. Since then I have been using the technique extensively and I still don’t use custom events – at all. The previous example was OK, but this one is better. This is also a class I use in most my projects.

Read the rest of this entry »

Data Structures with AS3 – The Linked List

When programming, there are many things I avoid or  just squash out altogether:

  • If I see someone has written an event, I try to get rid of it – this goes 2x for custom events.
  • If I’m working on someone’s production code and I see comments, I refactor and delete them.
  • I rarely use conditionals.

Read the rest of this entry »

AS3 Undo / Redo With Display Objects

There are a few examples of undo & redo floating around, but I wanted to give it a shot myself. I didn’t look at anyone else’s solution and I’m glad I didn’t, because I came up with a very different and clean solution.

Read the rest of this entry »

Optimizing Flash Animations Via Lookup Tables

This is cool.

Computer Science guys know plenty of coding Kung Fu; for us Flashers,  we have to either need some CS friends hangin’ around, or discover it ourselves. This time I got lucky and had both.

Read the rest of this entry »

Skipping Flash’s Events for Cleaner Code

For some time now, I’ve been using a technique that allows me to skip Actionscript’s events and it’s really been helpful in writing clean code. Recently, prominent community developers such as Andre Michelle, Joa Ebert, Robert Penner, and Nicolas Cannasse have made solid critiques of Actionscript and generally AS3′s event model makes it onto their list of grievances. Andre and Joa have even created UIEvent to help deal with event listeners.

Like many other Flash developers, when I learned about creating custom events or dispatching Flash’s built-in events I started doing it a lot. But….. it can really be a pain. I find that frequently dispatching and cleaning up events really dirties my code.  It also makes it harder to read.  Also, event dispatchers can be so far removed from methods who are dependent on them, that a coder will often have to search around to find the callback. Because of this I avoid Flash events as much as possible, and here’s how I do it.

[Edit] Callbacks are also substantially faster than events: Grant Skinner’s recent optimization talk

Read the rest of this entry »

 FDT and ANT | A User’s Guide – Part II

In part one, I showed how to get started with FDT and Ant (live error checking, code hinting, dealing with the JRE error…). Part two is the start of incorporating Ant into your work-flow. I would classify these videos as beginner-ish, and starting to get into intermediate Ant.

Wir Sind Bereit!

Wir Sind Bereit!

Read the rest of this entry »

FDT and ANT | A User’s Guide – Part I

Some time ago I began integrating FDT and ANT.  Not long after, my friends complained about not seeing me, my desk became littered with espresso cans, and I started having lots, and lots of Chinese take out.

Lookin good

Mixing Ant and FDT is simply addictive – there’s just so much one can do.  There are also several pitfalls that, if not prepared, can really confuse you.

Thus, I began to write down the process to aid others and to remind myself in case I forgot. Not long into this process I learned that there is a lot to cover.  Instead of cramming it all into one post, I have decided to split it up among several posts.

Part one contains two videos about getting started with Ant. I’m getting back into recording videos so forgive me if I’m a little stiff.  I’m getting more comfortable with recording again and I’ve even started doing a little bit of editing.  Already between the first and second video, I can tell I’m getting better.

In total the series is going to cover work-flow tricks, working with live error checking, code hinting, templates (creating and using), how to extend Ant by adding Java libraries,  FTP, SSH, ASdoc, SVN, debugging tricks, creating SWFObject swf -embeded HTML files, multi swf compilation and more.

Read the rest of this entry »

FDT – Customize Your Workflow

We all come across things that end up saving us lots of time when used over and over again. If you use FDT, there are countless options available to enhance a development work-flow. Here are some of mine:

[NOTE: This is a combination of an old blog post I did (before my database blew up) and some new stuff thrown in]

Read the rest of this entry »