Archive for the ‘Development’ Category

I’ve recently been looking for a good web-based bug tracker for my projects. So far, at work we’ve used a variety of packages, Mantis, FlySpray, and Eventum. But I haven’t been completely sold on anyone of them. I’ve used Bugzilla in the past with clients, but didn’t really like it that much either. But to be fair, it was a long time ago, so I’m going to be taking another look at the latest version.

What packages do you use? I’m curious to know what you consider the be the best package out there for bug tracking and other project management-type stuff.

Recently I’ve been doing some clean up of old files and other assorted junk on one of our servers at work. Between figuring out what needs to stay online, what needs to be archived, and what can be trashed, I noticed that several folders were much larger in filesize than they needed to be. Also, it was taking forever to delete folders because they had hundreds of unnecessary files in them. The files in question? Subversion .svn folders.
Read the rest of this entry »


Xash - Xcode ActionScript Help is new project recently added to osflash.org.

Xash allows you to browse Flash’s help files outside of the help panel. It’s got it’s pros and cons, but I really like it so far. First, it’s a lot faster than the built-in help panel. Second, it allows you to view the help files without having to open Flash, so if you’re working on an AS only project using mtasc, you’ll have quick access to the docs.

On the downside, there’s no searching yet, and you can’t filter the book listing like Flash does, but those features are planned, and since it’s open-source, you could add that if you get impatient. Also, as a downside to Windows users, it’s currently for Macs only.

Either way, this is a great app that Mac Flash developers should check out.

Update: - These instructions don’t work 100% with the files from Flex 2 Beta 2, or the recently released Flex SDK. I’ve posted some new instructions here: http://www.joshbuhler.com/2006/04/17/using-the-flex-sdk-with-xcode/

Yesterday I mentioned a site that had instructions on how to compile ActionScript 3.0 files on your Mac using the command line compiler.

That’s all well and good, but once you get going on a project, it can get a little tiring typing out the commands to compile your swf each time. However, if you’ve been using Xcode for your ActionScript work, you can set it up to compile your AS3.
Read the rest of this entry »

In case you missed these the first time around (I did), last month Brajeshwar posted a list of Resign Patterns; Ailments of Unsuitable Project-Disoriented Software by Michael Duell that we should all be aware of. I’ve seen quite a few of these in the wild, and I’m sure that I’ve employed a few myself. (At least now I can give a nice name to that crappy code.)

“The Commando Pattern is used to get in and out quick, and get the job done. This pattern can break any encapsulation to accomplish its mission. It takes no prisoners.”

“The Detonator is extremely common, but often undetected. A common example is the calculations based on a 2 digit year field. This bomb is out there, and waiting to explode!”

Link: Resign Patterns; Ailments of Unsuitable Project-Disoriented Software

As part of Opera Software’s celebration of 10 years of Opera, you can get a free registration code for the normally not-free broswer ($39). An unregistered version is available for free, but it will remind you that you should register often, and there are also ads. This free registration code will enable the full browser for you.

I very rarely use Opera, like most people I know, but it’s also good to have around for testing your sites across as many browsers as possible. And, if you can get a registered version for free, why not?

Just visit the Opera 10-Year Anniversary Party, and follow the link at the top of the page to get your free registration code.

Make sure that you’re registering the latest version - I tried to register version 6, which installed with Flash MX2004 on the Mac, and it didn’t work -, and if you don’t have it, you can download it here. Info on how to get the free registration code is on the download page, but you can also get the code without waiting for an email response from the link above. Just remember, This offer is valid from 12 a.m. Tuesday, August 30 to 12 a.m. Wednesday, August 31 2005 (PDT).

Links:

Jac Wright has been working on a short series of articles designed to provide a good intro to Object-Oriented Programming. He doesn’t provide code examples, it’s more to help you actually understand the concepts behind OOP before you actually dive in and start coding.

Jac is a PHP developer, and most of the code examples provided elsewhere on his site are in PHP, but don’t let that stop you Flash developers from reading them. Most Flash developers will need to work with PHP at some point in their careers, and so if you don’t know it now, now’s a good time to start.

As part of an effor to better organize my site and all of the various source files I have floating around, I’ve begun to reorganize my site folders, and get everything put into Dreamweaver sites to help me manage it all.

I’ve also been using Subversion to manage all of my source files. The only problem was this: When I imported my site into SVN, it did it’s usual thing of creating a .svn folder for every folder. No biggie, however, while these are normally hidden in the Finder, they show up in Dreamweaver in the Files Panel, and when I tried to Synchronize my site, DW told me that I needed to upload nearly 3000 files.

I tried setting some cloaking options in the Site Manager, but no luck there. So I set about the task of manually cloaking each .svn folder. I did about five of them before I got tired of it, and decided to find an extension in the Macromedia Exchange. There I found an extension by “guppywon” that handles this for you. It installs two options into your Commands menu: “Cloak SCM Directories” and of course “Uncloak SCM Directories”.

These commands will run through your site and Cloak or Uncloak the SCM directories created by both SVN and CVS, and then let you know how many directories were affected. That’s about it, and doesn’t sound like much, but if you’ve had to deal with this issue, you’ll definately appreciate the time saved.

Link: Cloak/Uncloak SCM Directories in Dreamweaver

Just a quick mini-tutorial on using the ternary operator in ActionScript. One of those things that shows up in my search logs, so the next time someone searches for it, they should be able to find it.

The ActionScript Ternary Operator

The ternary operator, "? :", is basically a shorcut for writing quick conditional statements that evaluate to either true or false. Similar to an if/else statement, you use them to make a decision in your code, and act based on that decision.

Here's the syntax:

  1. // using the ternary operator
  2. (condition) ? isTrueAction : isFalseAction;
  3.  

The ( ) around condition are optional, however they do help to clearly illustrate the condition. The code above is the same as writing:

  1. // the same thing, only more typing
  2. if (condition) {
  3.         isTrueAction;
  4. } else {
  5.         isFalseAction;
  6. }
  7.  

Now, you won't be able to use this for something that has multiple statements after the condition like you can in an if statement, but it does have it's uses for quick little things. For example, you couldn't use it for something like this:

  1. // this can't be written out using ternary operators
  2. if (condition) {
  3.         isTrueAction;
  4.         var bob:String = "something";
  5.         goDoSomethingNow();
  6. } else {
  7.         isFalseAction;
  8. }
  9.  

But it's great for something like this:

  1. // this is a great use for ternary operators
  2. (superBowlWon == true) ? gotoDisneyland() : goHome();
  3.  

Or even for checking if a number is even or not.

You can also use this technique to set values for variables:

  1. // setting a variable like this...
  2. var pillToTake:String = (stayInMatrix == true) ? "blue" : "red";
  3. //
  4. // is the same as doing this:
  5. if (stayInMatrix == true) {
  6.         var pillToTake:String = "blue";
  7. } else {
  8.         var pillToTake:String = "red";
  9. }
  10.  

So, as you can see, using this operator can save you time by requiring less typing in a few situations. Now, it's not the solution to everything, but as you start using it more, you'll start to wonder how you worked without it. (Maybe not, but it'll make me feel better if I can imagine that I've somehow improved your life.)

Also, after I finished writing this, I decided I wanted to try and determine which method is faster, to see if there's another argument for learning how to use this stuff. So in a pretty informal, and un-scientific way, I ran the following test:

  1. // testing ternary operator vs. if/else
  2. // just copy and paste onto the main timeline, and run
  3. //
  4. var loops:Number = 10000;
  5. //
  6. // ternary test
  7. var startTime1:Number = getTimer();
  8. for (var i:Number = 0; i < loops; i++) {
  9.         var testNum:Number = Math.floor(Math.random() * 100);
  10.         var isEven:Boolean = ((testNum % 2) == 0) ? true : false;
  11. }
  12. var endTime1:Number = getTimer();
  13. var totalTime1:Number = endTime1 - startTime1;
  14. //
  15. // if/else test
  16. var startTime2:Number = getTimer();
  17. for (var i:Number = 0; i < loops; i++) {
  18.         var testNum:Number = Math.floor(Math.random() * 100);
  19.         if ((testNum % 2) == 0) {
  20.                 var isEven:Boolean = true;
  21.         } else {
  22.                 var isEven:Boolean = false;
  23.         }
  24. }
  25. var endTime2:Number = getTimer();
  26. var totalTime2:Number = endTime2 - startTime2;
  27. //
  28. trace("Total Times: \n");
  29. trace("\tTernary: " + totalTime1);
  30. trace("\tif/else: " + totalTime2);
  31.  

Running this test on my PowerMac with dual G5 2.0, and 1 GB ram, I came up with the following averages after running it 20-30 times: Ternary: 201 ms, if/else: 195 ms. Now, your results may vary, and this most likely isn't the best way to test something like this, but it's enough for me to see that there is a speed difference, but it's not enough of a difference to really make me stick to if/else exclusively.

If you use SC Plugin to work with Subversion, you may have noticed that the icons used by SC Plugin to mark the status of a file aren't always up to date. Apparently, this has something to do with how the Finder handles notifications that something has happened to the items in a particular folder.

This issue has been disscussed a few times on the SC Plugin mailing lists, and the author has posted a link to a free utility called Nudge, that can be used until SC Plugin can handle the updating of the icons correctly.

Installing Nudge adds an item to the contextual menu of Finder that allows you to "nudge", or refresh the contents of a folder, and causes the icons in your SVN working copy to reflect their true status. I've been using it for a few days now, and it seems to work pretty good. If you use SVN on a Mac, you may want to check it out.

Link: http://www.brockerhoff.net/nudge/

Entries (RSS) Comments (RSS)