AS3 shortcomings

The lack of block-scoped variables in AS3 is really killing me.
for(var i:int = 0; i != 5; i++)
{
do_something(i);
}

for(var i:int = 0; i != 7; i++)
{
do_something_else(i);
}
throws a compiler warning for duplicated variables, but ALSO,
do_something(i);
var i:int = 4;
does not throw a compiler warning, since 'i' is defined in the function scope.  This can lead to unexpected behavior.

In porting from Java, one of the most irritating non-regular expressionable tasks is finding all the duplicate variable definitions and moving them to the beggining of the function, because AS3 doesn't respect block scoping.

AS3 is a huge step up from AS2, and there's a lot I like about it, but this omission is really glaring, and frankly amatuerish.

on porting

Maybe I'm a big elitist, but I really dislike porting bad code. I'm always torn between wanting to rewrite and restructure it, and wanting to just push it through. I feel like it makes my brain dirty every time I read it.

It does hurt me...the code duplication, the completely extraneous code, the badly named varibles... I understand that it's just the nature of a large project like this, that just accrues code, that sometimes it's easier to copy and paste than to encapsulate, but... it still hurts me. 

It's the missing sense of pride, I guess?  Like, in porting this, I'm not really on the line for algorithm design or anything, the game already works... but I still feel bad passing on these terrible tangles to whoever else will have to work on them.  I feel bad putting my name at the top of the file, I want to put a disclaimer next to it.

Basically, I've been spoiled this past year by only working on our in-house code.*


*elitist fist bump, mabreu.

lulz

(here).

chrome architecture ftw

Admittedly, it might be the browser's fault that flash crashes, but I don't really care; I'm just happy that a browser is finally taking stability and responsiveness seriously.

you are what you read?

Funny article about selfish economists.  I've always wondered how much your profession influences your personality, and vice versa.  If you study optimal selfish behavior for a living, it's no wonder that you tend to make choices that way.  What's really messed up, in my opinion, is that you then project that decision making math on everyone else.

this and that

Jonathan Coulton does an Obama fundraiser in NYC.

Google Chrome is my new browser.

Sarah Palin's rollout is EPIC FAIL.


Everyone is talking about a Coffee Shop and Game Store.  Percolate away, tiny dreams.

coffee cartel ftw

Our search for a great local coffee house is now over. It is this place.


Open to 11 on weekdays and 12 on weekends, free wifi, plenty of couches and comfy chairs, not Starbucks*. Done and done.


*I still love you Starbucks.

i love wikipedia

from here
When Xerxes was crossing the Hellespont in the midst of the first Greco-Persian War, he built two bridges that were quickly destroyed. Feeling personally offended, his paranoia led him to believe that the river was consciously acting against him as though it were an enemy. As such Herodotus quotes him as saying "You salt and bitter stream, your master lays his punishment upon you for injuring him, who never injured you. Xerxes will cross you, with or without your permission."[2] He subsequently threw chains into the river, gave it three hundred lashes and "branded it with red-hot irons".[3]
It's the semi-snarky use of quotation marks that really puts it over the top.

magic beans

may be just what I'm looking for.

From the story:
  • Traded in parallel to conventional currency
  • Undervalued by muggles.
  • Actually pretty awesome.
Seems to fit the bill. We'll use 'beans' for short and 'Bs' for even shorter.

alphabet songs

The experiment is, sing along with whatever song is playing right now, but instead of the song lyrics, sing one letter of the alphabet for every note.

I found it really disorienting, and I had to think hard about each note. I think it's because I generally remember the alphabet by singing it, and without that melody and rhythm to fall back on it takes a while to pull up the knowledge.

Also, I've never been that great at alphabetization, my secret shame!

replacing money*

Money has worked pretty well over the years, but it is best suited to zero-sum trading (where, for example, I give you a chair and you give me $50, and then we are both happy.) Money is not so great at modeling other situations though, like chore distribution in a household, or volunteer efforts in a community. In fact there are lots of things we would like to do where money really isn't appropriate, because the nature of the transaction is just different. For instance if I watch a video online, I've gotten entertainment, but I didn't take anything away from the author, not time, not a physical good, so the interaction is not really zero sum.

Charles Stross writes about this topic in the early parts of Accelerando, where Manfred Manx is trying to escape the old zero sum economy altogether by simply doing favors for people and letting them reward him as they see fit. Clay Shirkey talks about large groups of people coming together for non-monetary projects in Here Comes Everybody, but what is missing is a currency... The good will and social capital that is built up within a micro-community is inherently non-transferable to another community, and without the security of being able to quantify and transfer this social good, incentives are low to produce it, and trade remains local and conservative.

In the early days of physical trade, local bartering systems gave way to communal, interchangeable currencies. What we have now is a similar problem, where we have a billion tiny economies of sharing, but no currency to tie them together, no liquidity of volunteerism. In the same way that your net worth in dollars is a measure of how much you own and control, your net worth in the currency of sharing will reflect the strength of your ties to the community, and the community's ties to you. Similarly to money, it will confer real-world benefits. Unlike money, it does not go away when you use it.


*I am not an anarchist or a communist, and in fact I don't think that money will ever quite go away, but I'd like to see a parallel system of currency that is better suited to the future.

future memoirs

It was a strange time... Our access to information about ourselves had gotten ahead of our ability to deal with it... We had outgrown our cultural immune system temporarily, and so we were sneezing all the time. Everyone was afraid of pedophiles and terrorists. We had mostly shaken off the simplistic corporate parasites of the 20th century, but we were still stuck in the lifestyle they had created... It was an exciting time to be thinking about the basic questions of how to live.

what.

This is the first thing I saw when I got out of the cab at the Red Lion in Seattle.
what can I say.

another domain name

ofourown.com is also available. Seems like a strong contender.

database design and game design?

It occurred to me today that one of the reasons I'm so indecisive when it comes to database design, is that my brain is used to a totally different set of problems.

In game design, interface, algorithm, and efficiency are first considerations, and data structure generally conforms to the solutions chosen to those problems. When I sit down and try to design a database, I fail, because designing a database answers none of the questions that my brain is asking.

From my perspective, databases only exist because we don't have enough RAM to store everything in memory. They are an artifact of way computers grew up: processing power is expensive, slow, massive storage is cheap. Databases exist to be robust and permanent houses for large volumes of data, their design philosophy presupposes that data in a computer is fragile and volatile (which it is.)

So when I'm thinking about a new app, maybe I don't need to nail down the database first. After all, a database is just a bit bucket. That's not to say database design is trivial or unimportant, it's just to say that it's secondary to application design, which is really what I'm interested in anyway.

So let's get to it then.

steepled roofs

I'm frustrated with modern house construction.

Modern American houses were effectively designed hundreds of years ago by people in other countries with different tools, different requirements, and different constraints.* Land was cheap, material was expensive, labor was cheap, and everything had to be made by hand.

Just by rethinking some of those basic assumptions, we can start to make much better use of the space we have.

Steepled roofs are good for shedding water and snowfall, but in Southern California these things are just not concerns. Why not have a gently sloped, accessible roof with space for a garden, sunbathing, barbecuing, or stargazing? Land in California is amazingly expensive, even in the housing crunch, but when will we start using the space we have?


*Also people were shorter. What is the deal with 8 foot ceilings and 6 foot beds?

zeitgeist - vertical farms and airships

A couple of my favorite ideas keep popping up. Do I love them because they are hip, or are they hip for the same reason that I love them?
Architects' renderings of vertical farms — hybrids of the Hanging Gardens of Babylon and Biosphere 2 with SimCity appeal — seem to be stirring interest.

(Article, via boing boing)

As the cost of fuel soars and the pressure mounts to reduce carbon dioxide emissions, several schemes for a new generation of airship are being considered by governments and private companies. "It’s a romantic project," said Mr. Massaud, 45, sitting amid furniture designs in his Paris studio, "but then look at Jules Verne."

(link)

On reflection, this is probably just what I get for reading boing boing. What is the deal with those guys.

values

Give your love freely;
take ownership;
don't be afraid to let go.

another code editor feature

As I try to avoid carpal tunnel, I'm using the mouse scroll wheel less, and the page up and page down keys more. But pages are not logical separators in code, so I'd rather that the page up and down keys paged to previous function and next function, instead.

Does any code editor do this?

Maybe it would get annoying if your function were more than a page long and you wanted to scroll within them, but really that should* be rare--your functions should almost always fit on a page.


*that's right, "should." As in, "the universe would be a better place if."