Archive for April, 2006

Standing his ground

My buddy over at Atariboy is standing his ground against a ridiculous attempt by the UK hosting giant called “Redstation”. Apparently Redstation really didnt like this post that Andrew wrote. Consisting what seems very believable information displayed in the format of his opinion in regards to how poorly Redstation treated him.

So basically now, Redstation’s lawyers sent him a letter threatening to sue if he doesn’t remove his blog post about it. This is just ridiculous, forcing a blogger to remove his opiinion from his blog. Anyway, check it out and see what you make of it: http://atariboy.wordpress.com/2006/04/15/redstation-trys-to-censor-the-internet/

Comments (1)

Why Strict Data Typing is Good

I must admit, my first introduction to strict data typing was in JSP and at the time I HATED it. But it wasn't until I got into strict-typing in actionscript that I realized "hey hey.....wait a minute" - trust me when I say it has more then one purpose then cluttering the code.

In fact, when utilized to it's full extent, you can minimize your code by preventing common code problems like unnessecarily making 2 or more variables of something that could just be the same, along with other common coding "typo's".

Take for example this simple "hello world!" code:

Actionscript:
  1. myVar = "Hello World!";
  2. trace(myVar);

Simple? Yes, it is. And if this is all the code you had to write and this were a perfect world, then I see no harm in keeping it that way. However lets say that was only 2 of about 100-300 lines of code, well sure its still readable, but if you used strict typing on everything, well its kind of like having road signs on the highway, it gives you direction, it labels a variable, array or whatever your contraption may be without you having to dive through your code to find what the hell the variable hahaYouDontKnowWhatIAm is for.

Here is the above code using strict data typing:

Actionscript:
  1. var myVar:String = "Hello World!";
  2. trace(myVar);

Alone it doesn't look like much, I know, but try using it in your next endeavor in actionscript and you will see what I mean.

Another great use of strict data typing is with functions, especially when you are passing parameters that should be strict, although it is usually a rare event. Here is an example of using strict data typing with a function:

Actionscript:
  1. function myFunction (myParam1:String, myParam2:Boolean) :Void
  2. {
  3.     if(myParam2)
  4.     {
  5.         trace(myParam1);
  6.     }
  7. }

Notice the ":Void" after defining the function. This specifies that there is no return from this function. However if you wished to return something you could simply put the type of data you wish to return, such as Boolean, String, Number, Array and so on.

Strict typing is also the ideal coding to debug, for example lets take something like this:

Actionscript:
  1. var myNumber:Number = "Blah Blah";
  2. trace(myNumber);

This will throw an error, however if you didnt make it strict then it would let u pass with setting a variable that should be a number, to a string value. This is helpful and preventive and applies to any use of strict data typing.

Along with strict data typing comes other good practices of code, such as initializing variables on the proper level, BEFORE using them. You don't have to set it to anything, infact you could just put the following, just to set its proper scope:

Actionscript:
  1. var myVar:String;

After getting into the habbit of strict data typing, I find myself getting picky with code that isnt using it, mainly because I see the code is not at it's full potential.

Strict data typing is most useful in classes, or I should say it is required with classes...well in most scenario's, but that is another post, on another day :).

I encourage all actionscript coder's to make this their new habbit of coding, you will be happy you did.

Comments (3)

I’m in the market

I am in the market for a new computer, but with a twist.

You see, I am builiding my own and I already have:

  • ATX Demon Case
  • 400GB (200GB x 2) Maxtor 7200 RPM hard drives
  • DVDRW (forgot the speeds:P)
  • Nada

Obviously, what I need is a motherboard/cpu combo. I am looking for something powerfull, and reliable. I do game from time to time but more importantly I just need it to run at the best of it's ability the majority of the tiime.

I tend to like AMD instead of INTEL, but I am open to suggestions.

Price range? Under $1000.

Make your suggestions in the comments. Thanks all!

Comments (6)

Next entries »