THE PASZ.COM BLOG

Saturday, July 30, 2005

Info about CSS in IE7

So there's been a lot of noise about the IE7 beta in the past day or so. A lot of people on Slashdot were bitching there were no improvements to CSS support. Since then there has been a follow-up post on the IE7 blog that sheds some light on where they are actually heading with CSS. I guess that goes to show that we shouldn't pre-judge products based on a beta. (This applies to the Flash beta as well!!)

Money quote:

We fully recognize that IE is behind the game today in CSS support. We’ve dug through the Acid 2 Test and analyzed IE’s problems with the test in some great detail, and we’ve made sure the bugs and features are on our list - however, there are some fairly large and difficult features to implement, and they will not all sort to the top of the stack in IE7. I believe we are doing a much better service to web developers out there in IE7 by fixing our known bang-your-head-on-the-desk bugs and usability problems first, and prioritizing the most commonly-requested features based on all the feedback we've had.


The full post is definitely worth reading, and includes a list of specific fixes. I'm no supporter of Microsoft, but I also think they've gotten a bad rap at times. I doubt IE7 will have me switching away from Firefox, but I'll be happy if they add improvements to make web development for the masses a little easier. Fixing CSS issues is a good first step.

Friday, July 29, 2005

Tutorial: Setting Up MTASC for Flash 8 Development

I've written an extensive tutorial to help people get started with FAME.

This tutorial is inspired by the article "Towards Open Source Flash Development", and covers a lot of the same ground. Since I'm a visual person, I thought it would be helpful to include a number of screenshots. Also, I provide additional info about configuring Eclipse for Flash 8.

More...

Wednesday, July 27, 2005

Macromedia Podcast #3

Now I have something to listen to on the way to work tomorrow.

The first two were excellent -- filled with useful info.

Check it out!

Flash vs. Ajax Comparison Chart (draft)

I have posted a first draft of what I hope will become a comprehensive comparison of Flash and Ajax. Any feedback at this point would be appreciated, for I am by no means an expert on every one of these features.

So far Flash seems to be winning hands down, except for one key point: Browser Integration.

more...

Tuesday, July 26, 2005

Coding Style: Abbrvtns

One way to make your code really confusing is to use abbreviations. I will go so far as to say that you should almost never use them.

First, they make your code more difficult to read.
ddClr - does it stand for dropDownColor or dataDisplayClear or dungeonsAndDragonsCleric? Who knows?

Second, if you're consistent about always using complete words, it will be easier for you (and others) to use your APIs. You shouldn't have to crack open the documentation every time I want to instantiate a new Object. You should be able to guess the variable name without looking anything up. So if I want to instantiate a new TextFieldStyle Object, instead of guessing TFStyle or TxtStyle I just type the full words, and chances are I'll be right.

In the old days, when compilers weren't so good at code optimization, every character counted. So it made sense to keep variable names short. Now it doesn't matter. Just about any compiler will automatically compress your variable names under the covers. Look at the APIs for any modern language (Java, ActionScript, .Net). You'll hardly find any abbreviations. Now look at a typical C++ library for comparison. What a mess! Here are some of my favorites. Can you guess what they do? (Highlight below to see the answers.)
tmpnam - generate a unique temporary filename
swab - swap bytes
labs
- return the absolute value of a long integer

Maybe you're lazy, and you don't want to have to type so much. That is a good reason to keep names short. But remember, if your code is confusing, you'll waste more time in the long run. Just like writing in any other language, when you write code it is important to be clear and consistent. My 6th grade English teacher wouldn't have put up with an essay full of abbreviations, and neither should you!

Monday, July 25, 2005

New Flash 8 Beta Player Posted

Apparently it fixes some bugs that were uncovered with the first Beta. However, I'm still having trouble viewing Flash in Firefox when I have Adblock turned on. :(

Get it here!

Programming Gotcha: Locally Scoped Variables

The following note applies to JavaScript and ActionScript (but not Java).

JavaScript does something funny with local variables that are within a local block (if...else, while, etc.) Instead of cleaning up the variable at the end of your block, the variable persists until the end of the current function (or until it is redefined. For example, consider the following code.

if (true){
  var i = 100;
  alert(i); // displays 100
}
alert(i); //Expected: i is undefined. Actual: displays 100.

This is not a big deal in most situations, unless you're dealing with code where variable names are frequently re-used. For example, consider the variable name collision here:

var i = 10;
if (true){
  var i = 100;
  alert(i); // displays 100
}
alert(i); //Expected: displays 10. Actual: displays 100.

This problem can be avoided if you're careful not to re-use variable names. But it is something to be on the look out for if you're trying to fix some spaghetti code.