Norkevicius

July 20, 2007

global or $_GLOBAL[] Versus local variables

Filed under: Side Notes, php — aurimas.norkevicius @ 10:29 pm

Did some tests and found out that scripts of type

$a=5;
function foo(){
global $a;
return $a +5;
}
foo();

have relatively bad performance ….

try to use something like

$a=5;
function foo($a){
return $a +5;
}
foo($a);

instead …

July 11, 2007

XML Nodes Versus XML Attributes

Filed under: Side Notes, XML — aurimas.norkevicius @ 11:09 am

Decided to speak about this as found that many developers are misusing XML nodes and XML attributes.

In my opinion node should be used only in case if it can have attributes. In this case XML

[Authors]
[Author]
[Name]Paulo[/Name]
[SurName]Coelho[/SurName]
[/Author]
[/Authors]

Should be redesigned into XML

[Authors]
[Author Name="Paulo" SurName="Coelho"/]
[/Authors]

I faced some XML structures like

[root][veryveryverylongnodename]1[/veryveryverylongnodenam][/root]

I think this is ridiculous …

July 2, 2007

No Files Were Found To Look In

Filed under: Side Notes — aurimas.norkevicius @ 3:52 pm

While trying to search for data in all solution files under Visual Studio 2005 I used to get

no files were found to look in

to solve that simply try Ctrl+ScrollLock . If this will not help try to reboot your computer …

Powered by WordPress