Strict Data Typing

Learning Actionscript 3 over the past year or so, I must admit I've been of the mindset: Why the @$%* should I bother with strict data typing? It's so restrictive. And it's messy! And all cluttery. So much extra typing...seems like a waste! However, working with some AS code written by a proper flash developer, I can't help but notice that EVERYTHING is typed. Functions are marked as :void when they don't return. And so on. So I forced myself to do some reading on why I should bother. A very nice post I found here has me considering perhaps following the existing convention in this code.

http://www.stevenhargrove.com/strict-data-typing/

I suppose I'll stick to it for now, give it a try. Do you have thoughts on the matter? Please feel free to cuss me out in the comments!

Regular Expressions: A Primer

Well, this morning I finally came across a problem where I couldn't avoid regular expressions anymore. Sure, I've used them in form validation, but I've pretty much always just copied existing code for validating email addresses etc, without much attention to the gibberish of characters that magically format or validate my string.

I busted out google and did a bit of searching; this is the page I found to be the most informative in the briefest amount of wordage:

http://www.webcheatsheet.com/php/regular_expressions.php

This page has a nice example chart at the bottom which for me really helped with my understanding of how it all works. I recommend anyone who hasn't bitten the bullet in this department to do a quick read over of this page, as regular expressions are pretty much a staple of any sort of semi-advanced programming.

And yes, you can now mock me for not bothering to learn this prior to now. Yay for self taught programmers!