It comes as no surprise too , microsoft’s paradigm for adding new features is reinventing the wheel , and they overengineer it just to the point where it is inevitable to break , and impossible to determine why it did so.
Without further adieu let me present MicroSoft Visual C++ 2005 and it’s brand new ‘wheel’ , i mean deployment model , dll’s now have to come with manifests and policies , and rely on the Side-by-Side service and this is is just a rough sketch , you can seehttp://msdn2.microsoft.com/en-us/library/ms235342.aspx for in depth details , there is a method to this madness you know , as always.
To put it bluntly however what you have are :
2 files in %windir%\WinSxS\Manifests\ , a .cat file (security catalog , for the policy) and a .manifest file (xml file for describing the libraries)
then you have a directory in %windir%\WinSxS\ where you need to put your actual libraries (directory name and filenames being a mix of the name , version , hash , and architecture so you wind up with something like x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50608.0_x-ww_6262d37f
, nice )
Ok , so now to the explanation , all that is microsoft striving to accomplish with all this is so we can have different version of the same library for our programs that were built with and require a specific version of it , when all you had to do to achieve this since windows 3.1 till 2000 was drop the library in the same location with the program , as a windows program will always try to load a library from its parent folder first , then start looking in every path for it , so you had different versions of the same library , each with the program that required that version.
There can be much more to be said but i rest my case for now , what are the platforms that are ‘vulnerable’ , i mean capable of this new deployment model you might ask , why it’s NT 5.2 and it’s older brother NT 5.1 (vulgarly known as Windows 2003 and XP respectively)
Posted: February 20th, 2006
Categories:
rants,
software
Tags:
microsoft,
programming,
rant
Comments:
No Comments.
It is common belief that Perl is the language of choice for the purpose of data processing and manipulation , and i couldn’t agree more , having been turning to it every time i needed some serious data processing , only to get the best results at each undertaking.
However back then in 99 when looking for a method of automating the calculation of my monthly online time from my dialup provider’s access logs , a task for which ASM just wouldn’t cut it , i had no other choice but to assume this thing about perl and data manipulation as the truth and have a go at the language without knowing for certain.
Today after quite a while and many data manipulation scripts , and quite coincidentally for the purpose of calculating the total downtime of my isp from my server’s access logs , i can not feel but pleased with the power you have with perl and it’s data manipulation drive , so i felt like evoking this wonderful side of perl myself too.
Now as to not make this article a dry reading , and because probably nobody likes staring at a program execution with no progress display for hours on end , or not even minutes , i am going to explain 2 simple progress display trick for your perl scripts.
Roughly the trick consists in using \r (carriage return) to write over the same line over and over, while also disabling output buffering where it is the case
The first example below is the simpler one , but memory buffers are sacrificed for this and do not use this example for files bigger than some dozens of megabytes or loading times will be drastic and memory usage intensive , that aside this should not present any other speed decreases given you write your script in a speed conscious manner.
use POSIX;
#disable output buffering
$| = 1;
open (INFILE,”< $infile”) or die “$infile file not found”;
@data=<INFILE>;
foreach $a (@data){
$proc = floor((($#data – $.) / $#data) * 100);
print “$. more lines to process ($proc% processed)\r”;
$.–;
}
In this second script we are not buffering the whole file into memory , so loading speeds will be great even tho’ we have to use a function to count the total line number of the file with clines() before starting to process it
use POSIX;
#disable output buffering
$| = 1;
#reading line length
print “Reading $infile….”;
$lines = clines($infile);
print “done ($lines lines)\n”;
#processing data
open (INFILE,”< $infile”) or die “$infile file not found”;
$out = 0;
while(<INFILE>) {
$proc = floor(($out / $lines) * 100);
print $lines-$out.” more lines to process ($proc% processed)\r”;
$out++;
}
sub clines {
my ($filename) = @_;
$lines = 0;
open(FILE, $filename) or die “Can’t open `$filename’: $!”;
while (sysread FILE, $buffer, 4096) {
$lines += ($buffer =~ tr/\n//);
}
close FILE;
return $lines
}
Posted: January 14th, 2006
Categories:
software
Tags:
code,
perl,
programming,
tips
Comments:
No Comments.
Xtreme Programming or XP for short are “agile” programming methodologies are the spearhead of what are known as lightweight programming methodologies , and are getting more popular every day.
They relate closely to opensource methodologies and are essentially a license to hack for the oppressed corporate developers so i can easily
understand their joy and sympathize with these methods myself.
In my opinion , the agile xp method is nothing else but a definition ,standardization and enhancement of the developing methods that are
used outside of the corporate bureaucracy monolithic methodologies , and that is buy itself a very good thing if those standards start to be used inside coporations , and is definitely something they have to thank the open source movement for.
Posted: March 17th, 2005
Categories:
rants,
software
Tags:
agile,
hacking,
programming,
XP
Comments:
No Comments.