cyborgzombieninjapirate


Making messy code on purpose is just fine.

Posted on 07.06.2010 10:03 pm

I've been doing some AS3 programming for the past two months, doing a little project that I will talk more about in the coming weeks.

It's pretty fun and AS3 programming is pretty easy to get into, quite similar to C# and it has a few gotchas but nothing that you can't overcome.

Things like having no destructors, and the issue that if you have large enough classes, that it is possible they will never be cleaned up by the garbage collector.

But what I have noticed while programming in an environment that I know little of, is that the code I originally create is pretty bad.

Usually I spend most of the time figuring out the right design right out of the gate, often not coding until I know how I will approach the structure of the code.

But with AS3 and this project, I've faced so many problems that I've never had to face before and I don't know the best design. I usually am able to solve the problem at hand, but the code is messy afterwards.

Then later I would be solving some other problem and I'd look at the old messy code and figure out how to clean it up a bit. Refactoring and rewriting some parts.

I've been working like this for the good part of the project and I actually think that it is a pretty good way to get things done in an environment you are foreign with.

Just get the code to work, no matter how and then when you work your way into the project, take time to refactor the horrible mess of a code you created before.

This is probably common sense to some but it wasn't to me until recently and I think it's ok to be messy now and again, just if you clean your room afterwards.

0 6    Like it or hate it?  -  Comment (1)


ellioman

0 1  / Posted on 07.06.2010 10:49 pm

That's how I usually do my projects. I find it the most natural way of coding: just make the damn thing work and when that's done, make it better....

(Used for gravatar only, never displayed)

What is 2 + 1


Memory allocated for your request: 307.09 Kb
Process time: 0.001878 seconds