<pedrocorreia.net ⁄>
 

<How Your Scripting Language Works Against You ⁄ >




clicks: 533 533 2007-02-22 2007-02-22 goto programacao myNews programacao  Bookmark This Bookmark This


Scripting languages are all about getting code up and running as fast as possible. In that spirit, many scripting languages permit, or even require, implicit variable declarations.

If you want a variable named "PhaseInverterCount", you do this:

PhaseInverterCount = 1

and bam! you have a variable named PhaseInverterCount. What could possibly go wrong?...

Fat Fingers

The trouble starts when you do something like this:

PhaseInverterFound = nil
foreach starship in Starships do
if starship.IsPhaseInverted() then
PhaseInvertedFound = starship
break
end
end

Everything looks good. You run your script, don't get any warnings or errors, but you find that the code never seems to locate that one starship in your fleet that has a phase inverter. Why?

The first time you typed PhaseInverterFound, but inside the conditional you accidently typed PhaseInvertedFound. How long will it take you to find this typo?



este é só um excerto do artigo, para aceder ao artigo completo, clique no link em baixo:
this is just a small excerpt from the article, to access the full article please click in the link below:

http://hexagog.com/blog/how-your-scripting-language-works-against-you/




Subscribe News RSS  Subscribe News Updates by E-mail





myNews <myNews show="rand" cat="programacao" ⁄>

A Collection of Examples of 64-bit Errors in Real Programs

Our company OOO "Program Verification Systems" develops a special static analyzer Viva64 that detect (...)

clicks: 22 22 2010-09-03 2010-09-03 goto url (new window) gamedev.net/ref... goto myNews programacao


Don't Rely on Environment.ProcessorCount

One of the most hidden knowledge in multithreaded programming is the question "How many threads I sh (...)

clicks: 53 53 2010-09-02 2010-09-02 goto url (new window) blog.liranchen.... goto myNews programacao


Ajax Best Practices: Reduce and Aggregate similar XHR calls

My mobile contract is expiring soon, so I went online and checked the different mobile companies for (...)

clicks: 43 43 2010-08-31 2010-08-31 goto url (new window) blog.dynatrace.... goto myNews programacao


A Guide to Writing Games with QML

My last post on QML had a lot of people asking for an example, as opposed to a general discourse. In (...)

clicks: 53 53 2010-08-31 2010-08-31 goto url (new window) labs.trolltech.... goto myNews programacao


Why jQuery needs JavaScriptMVC

More than a year and a half ago, I begged the jQuery community to start taking seriously the challen (...)

clicks: 55 55 2010-08-30 2010-08-30 goto url (new window) jupiterjs.com/n... goto myNews programacao


Beginning PHP: 6 Must-See Sites, Programs and Articles For New Developers

These days there's a wealth of information online for anyone wishing to learn a new programming lang (...)

clicks: 72 72 2010-08-29 2010-08-29 goto url (new window) divisionbyzero.... goto myNews programacao


The Ultimate Roundup of 55+ CSS3 Tutorials

CSS3 is something that will take web development into the next level, while modernizing the web and (...)

clicks: 50 50 2010-08-29 2010-08-29 goto url (new window) 1stwebdesigner.... goto myNews programacao


Creating in less than 30 min Flash 10.1 mobile content for Android 2.2

This afternoon I had 2 hours free to test out my new brand Google Nexus One, first step was to updat (...)

clicks: 59 59 2010-08-28 2010-08-28 goto url (new window) flashflex.com/c... goto myNews programacao