/customers/iconara.net/iconara.net/httpd.www/blog/wp-content/plugins/wp-super-cache/wp-cache-phase1.php Iconara » 2006 » September

Archive for September, 2006

More on iteration

While iterators (which I covered in my last post) are fantastic, there is more to iteration than that. I’ll cover three common uses for loops and how they can be rewritten in a way that makes your code more reusable and maintainable. Two of the tricks are from the esoteric land of functional programming, and one from Ruby, a cousin of the ActionScript language.

Read the rest of this entry →

On iteration (arrays are Evil)

ActionScript provides a couple of ways to do iteration, for-loops for arrays, for-in-loops for associative arrays and while-loops for the general case. What it doesn’t do is provide us with datastructures that are safe to let client code iterate over, and what’s more, for-loops are so very low-level.

In this article I’m going to make the case why arrays in ActionScript are Evil, give you suggestions on how to use them properly and tell you why iterators are so good.

Read the rest of this entry →

Oh, the irony

The “four kinds of freedom”, as defined by the Free Software Foundation, tells us that users of free software have “the freedom to run the program, for any purpose (freedom 0)”. What an irony it is then, that most open source/free software applications I have installed on my Mac include a licence agreement step, like in these pictures:

install1.png

install2.png

The user cannot install the software without agreeing to the GPL, which I must say is a clear violation of “freedom to run the program, for any purpose”. And this is regardless of that the GPL, to the best of my knowledge, does not impose any restrictions on the user of a GPL’ed application*, so there isn’t really anything to accept.

Edit: The GPL FAQ actually mentions this.

* As far as I understand it (I really need to say that so that Stallman doesn’t put a fatwa on me), the GPL is concerned with distribution of software, not, for example, usage.