<pedrocorreia.net ⁄>
 

<How Your Scripting Language Works Against You ⁄ >




clicks: 477 477 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" ⁄>

Basic Security in MySQL Server

This article discusses the basic security feature that should be implemented whe (...)

clicks: 423 423 2008-06-19 2008-06-19 goto url (new window) gnubreeze.blogs... goto myNews programacao


ASP.NET AJAX Best Practices

While we develop AJAX applications, we often carelessly ignore giving up bad pra (...)

clicks: 476 476 2008-05-10 2008-05-10 goto url (new window) codeproject.com... goto myNews programacao


Smart Columns w/ CSS and jQuery

As I observe other liquid based websites, I see two commonly used techniques on (...)

clicks: 349 349 2009-05-27 2009-05-27 goto url (new window) sohtanaka.com/w... goto myNews programacao


Hidden Features of C#

We, c# developers, all know the basics of c#. I mean declerations, conditionals, (...)

clicks: 429 429 2008-09-23 2008-09-23 goto url (new window) stackoverflow.c... goto myNews programacao


.NET Page Life Cycle

IIS: IIS (Internet Information Server) is a complete Web server that makes it po (...)

clicks: 404 404 2008-04-26 2008-04-26 goto url (new window) codeproject.com... goto myNews programacao


Dynamic Fun with SimplePie and jQuery

A traditional blogroll is a simple list of other sites, often in the sidebar, th (...)

clicks: 519 519 2008-08-09 2008-08-09 goto url (new window) nettuts.com/jav... goto myNews programacao


Do you always need index on WHERE column ?

I believe we wrote about this before, but this topic popups again and again. To (...)

clicks: 425 425 2008-04-29 2008-04-29 goto url (new window) mysqlperformanc... goto myNews programacao


From DHTML to DOM scripting

The DOM is a programmable representation of a document. While we see a page as a (...)

clicks: 482 482 2007-07-21 2007-07-21 goto url (new window) icant.co.uk/art... goto myNews programacao