I had written about Testing With PostgreSQL and today discovered some failing tests. It turns out this is because I had migrated a database down two levels, altered a table, and migrated it back up (I can do this because no one is relying on a production copy). Unfortunately, when I migrated it back up, the new tables didn’t have their correct triggers assigned because the _test_changed_table check was in place. As a result, my test module assumed the testing system was in place.
Lee Johnson found a bug in Sub::WrapPackages. It's to do with how perl 5.10 optimises stuff exported by 'use constant'. He provided a patch and test, so a bugfixed version is on its way to the CPAN.
There are two ideas that have been buzzing around in my brain lately.
The first idea is a Perl CMS that is all Perl and that scales from CGI (because that is what a lot of cheaper hosting sites offer) to whatever you want to scale it up to. I don't mean scale in the traditional sense here, though I would want it to scale that way as well.
The second one is a server monitor along the lines of a Nagios but all in Perl with plugins written in Perl.
Neither of those is necessarily a "good" idea. They are just ideas. Throwing them up here to maybe tickle myself later with them.
07:46 XXXX damn... is it normal for DProf/Profiler to not work correctly with moose stuff?
07:46 aaaa people still use dprof?
07:47 XXXX people who might not be aware of alternatives, sure
07:48 XXXX what would you suggest instead then?
07:49 aaaa Devel::NTYProf is THE profiller these days :)
07:52 XXXX unfortunately googling perl profiling doesn't take you anywhere near it :(
If like me you think it's fantastic, please link to http://search.cpan.org/dist/Devel-NYTProf/ from your website with some appropriate link words, so we can let Google know about it, and therefor the rest of the world.
I gave a day-long master class as the first version of what we are turning into a full training course. I covered regexes, Unicode, pack, advanced subroutines, and tricks with filehandles. Each of those sections covered most of the material from those chapters in the book, and during the course I picked up even more tricks that we'll add to the Effective Perler blog as well as later classes. I'm thinking about releasing some of the slides next week when I have some time to take care of some of the notes that I made.
Josh gave a short talk on Unicode. Several of my students remarked how it was nice to see some of the same material twice since there's a lot to pay attention to in Unicode. His slides are in Google Docs, but he's adjusting some of the images so he doesn't get sued for the comments he made about the Minnesota Vikings. It's not really his fault if they aren't as good as the Bears. Everyone nag him to make his slides available with the rest of the Frozen Perl talks.
If you want one of our talks at your conference, let us know.
We've just moved our website to Amazon EC2, and within about 2 hours of going live, or proxy server went down. Just disappeared. We couldn't even terminate the instance.
OK, temporary glitch. It happens.
2 weeks go by, then last night, our alarms go crazy. All 3 database servers have gone down. They're there, just not responding to ssh or even ping.
We try to reboot the instances. From the console log, I can see that they reboot. Still not accessible. I launch another instance of our DB AMI. It boots, but is also unresponsive.
Eventually we boot a vanilla AMI, reinstall the DB and attach the EBS volumes.
Next surprise - 2 of our EBS volumes have disappeared - or at least the data on them has. Fortunately, they were redundant copies. But what happens if next time they're not?
All in all we had 2 hours of downtime. More than the previous 3 years with dedicated servers put together.
How on earth do other companies maintain their uptime (and data!) on a service that seems to fail way too frequently?
Added a coupla features over the weekend. First, you can collapse and expand parts of the tree if you have Javascript and CSS turned on. Second, now that CPANTS's tool for finding what distributions depend on a given distribution no longer works, I've implemented it myself. It's a bit ergonomically crude, but is more accurate than CPANTS was.
In the two Star Trek series,
the characters of Data and Spock pose a question:
What would it be like to be able to make decisions on a largely,
or even purely, logical basis?
Not widely known is that this is a question with an answer based on
evidence.
About a week ago, the call for proposals for the Open Source Conference closed. It's a bit fuzzy because many people only realize what month (or year) it is only after the submission link disappears, so we let a few extra proposals slip in. Don't ask now: it's too late. For reals this time.
As part of the Perl Track committee, I just reviewed all of the proposals where the submitter marked it as a "Perl" talk. Several other people from the Perl track also reviewed them. There are going to be some very nice presentations this year, and at least one demonstration of highly advanced Perl technology that you'll want to see twice in a row, and maybe a third time at the end of the conference.
So, my first blog post, and instead of Perl, I'm writing about Javascript.
I'm using a common idiom:
AJAX call returns HTML with embedded script tags
create a temporary <div>
div.innerHTML = request.responseText
move the children of the div to the appropriate spot
Firefox conveniently executes the script texts. Opera and Safari require extra steps to execute the script contents (eg,
globalEval
in jquery), and IE does whatever the hell it pleases.
IE usually works with globalEval, except when it doesn't. I found that if the AJAX response was just a single script tag, then IE would filter it out. But script tags were being created in certain circumstances.
Long story short, if you need to return a single <script> tag, wrap it in a <form> tag. For whatever reason, IE will then accept it as innerHTML and create the script node, which you can then execute with globalEval or similar
Ever since I upgraded to Snow Leopard, my Perl has been unstable. I've fixed most of it, but I sometimes have strange behavior. Today I discovered why (and why didn't I notice this sooner?)
Second, a small bugfix for distributions with weirdo version.pm-stylee v1.2.3 versions. Thes dists are buggy, of course, as version *numbers* should be, well, they should be *numbers*. But as they're on the CPAN, I have to support them.
Now, can someone explain why this 'ere form what I'm filling in has seperate fields for "tags" and "keywords"? I thought that "tag" was just a stupid web 2.0 neologism for "keyword", so why are they seperate?
hello...
i have recently started learning perl.....and having issues when i try to read input from another file. the details of a script that i tried to run are as follows:
i made a text file by the name "text.txt" and the contents were
Sidra|38|BE
Hira|48|BE
Shagufta|50|BE
Then i wrote the following script
open(DAT, "text.txt");
$data_file=" text.txt ";
open(DAT, $data_file);
@raw_data=;
close(DAT);
foreach $student (@raw_data)
{
chomp($student);
($name,$roll_no,$class)=split(/\|/,$student);
print "The student $name bearing roll number $roll_no is in class $class";
print " \n";
}
the script produces no output and displays a message saying
"readline () closed filehandle at line "
I tried the same with another file by the name "text.dat" holding the same data but it did not work either. Please help me out resolving this issue.
Thankyou...
I thought I would share my experience of submitting a module to CPAN for the first time. In summary: it's stupidly easy and if I can do it, so can you.
I'm not the best Perl coder and therefore I rely heavily on CPAN modules to do the real work. Every now and again I stumble upon bugs, many of which are simple to fix after a little debugging. However, some modules aren't heavily maintained and some haven't been touched in years. Bugs that are filed on RT can go unanswered, gathering digital dust while your development machine is riddled with heavily modified modules.
The solution? In my case it was as easy as discussing a few changes with the module author, who added me as a co-maintainer. That allows me to upload new versions, fix tickets in the bug queue and probably many other things I've not discovered.
i have a Motorola Droid and a first generation iPhone which I use on WiFi only. But I really can't get myself to use either of them for task management.
Nothing beats the feel of my Palm Tungsten C keyboard. And nothing really beats the simplicity of the Palm ToDo List. Well, not really nothing, but you know what I mean.
I was surprised and happy to notice active development still taking place on p5-Palm. Today, I decided to resurrect an old project I had started to create a Palm Sync daemon on my home server.
First, I confirmed that pilot-link was up and running on my server. Next, I refreshed my memory on the commands used to run a WiFi sync.The first step is to make sure the user of the Tungsten C and the user of pilot-link are one and the same. This overwrites the user on the device, so proceed with caution.
If you are the author of this module, use it, or otherwise have an interest in its health, please let me know. I don't use it at all, but I know how to make broken distros work again. There are still lots of problems, but I only did the minimum to get the tests to pass.
The drive Wednesday up to St. Paul went well, no major meltdowns or fussing.
Had dinner at the Blue Door Pub. I had the Jiffy burger and a bunch of good beer. A bit too much peanut butter for my taste. The Purvis at XXX seems to have a better balance of peanut butter to burger.
Thursday was mostly focused on getting to Punch for lunch. We then had Taste of Thai for dinner.
Friday was awesome. I took brian d foy's Effective Perl Programming class. Nothing like beta testing (more like alpha since brian did mention this was the first time teaching it) a class. Since I've taking his Mastering Perl class a couple years ago at OSCON I would say half the content was familiar from that and general Perl stuff I've done/read about. The rest was golden (mostly Unicode stuff). I'm looking forward to the second edition of the book that the class is based on.
I often find that test reports I get from smokers are not terribly useful for failures. Sometimes it's obvious. Other times it's not. One thing which helps a bit is this bit in your t/load.t test:
so I was asked this question regarding our users and our products
and such. wanting a quantitative numerical result,
- I quickly (less than 5 minutes) wrote up a map-reduce (+ reduce) job,
- submitted it to our array of servers,
- and in less than 10 seconds, I had the answer.
There is empirical evidence that Perl is an inherently maintainable language. The Software Productivity Research group have published 2 comprehensive surveys of programmer productivity across different languages and problem domains. One was published in 1996, the other in 2006. The results in both are consistent - for overall perl productivity scores & when perl is compared against other popular languages.
Function points were used as the data collection method and the survey covered the whole dev lifecycle. The actual figures are not too important - suffice it to say that both surveys found that perl is far more productive than C & generally significantly more productive than Java.
SQL scores even higher, btw, albeit in its specialist field of relational data manipulation.
Productivity != Maintainability though?
True - but to be productive throughout the lifecycle the maintainability must be at-worst acceptable w.r.t to design,implement,test.
Naturally questions can asked of the method & the results. SPR themselves spell out the limitations, so take with appropriate seasoning. That said the consistency of the results might induce speculation on: