Archives for the Month of January, 2008

FeedBurner Podcast - Episode 2

After listening to the first episode I really wondered how there could possibly be 19 more. After listening to the second one I am baffled about how much improvement can happen from one episode the another. If you guys just wanted to have a steep excitement curve, you succeeded. This was amusing and interesting. I [...]

FeedBurner Podcast - Episode 1

I just listened to the first episode of the FeedBurner Podcast. In the last few months I listened to a bunch of netcasts, but that one was really a completely new experience. I didn’t know that netcasting was about explicitly telling your guests what to say. Argh!

Effective Perl Programming: Item 11: Consider different ways of reading from a stream

Ever wondered if there was a better way of reading a file into a single scalar than

$the_file = join ”, <FH>;

There is!

{
  local $/;
  $the_file = <FH>;
}

Not only does this save you the join, the actual reading from the file is done much faster that way.

for (<FH>) { … }

generally does the same as

while (<FH>) [...]

Effective Perl Programming: Item 10: Avoid excessive punctuation

The traditional & syntax has its uses—it’s the only way to call a subroutine whose name is a keyword, for example, &for
Using keywords as subroutine identifiers? What could this possibly be useful for, except confusing co-workers? Due to the fact that the book is about "Writing better programs", they should have indicated this as being [...]

Effective Perl Programming: Item 8: Know common shorthands and syntax quirks

I already knew that the => operator automatically quotes its lefthand operand. This has one effect that is actually pretty obvious, but I hadn’t really thought about it anyway. By quoting the lefthand operand, it is really just a string. Even if it is the name of a function, this function is not called.

@a = [...]

Install a module from CPAN other than the latest release using CPAN.pm

Installing a module using CPAN.pm is as simple as saying
cpan ModuleName
on bash or equivalent or by saying
install ModuleName
on the CPAN shell. This installs the latest release of the module specified, which is what you want most of the time. If you don’t, there’s still a way to use CPAN.pm. On the CPAN pages of CPAN.pm [...]

When Pythons Attack - Common Mistakes of Python Programmers

When Pythons Attack - Common Mistakes of Python Programmers The first few mistakes aren’t really Python-related. I would not consider anyone making such mistakes being up to the task of learning a programming langauge. Learning how to use a (Windows) machine at all might be an appropriate first step. The only really interesting hint on [...]

Effective Perl Programming: Item 7: Use $_ for elegance

$_ is always in the package main.
package foo;
$_ = “OK”;
package main;
print;
This prints OK.
Creating a scalar variable named _ and placing it in some package by force, using full qualification, creates a regular variable with that name but without special properties.
The built-in function split defaults to splitting $_ on whitespace. Not a single space, but arbitrary [...]

The blog, the blog, the blog is on fire

And I don’t need no water.
I just registered for a FeedBurner account and burned my entries and comments feeds. Integration into wordpress is done with FeedSmith. The hint to burn my feeds using this plugin originated from the author of solution-box, who hopefully comes up soon with some earthshaking technical, web-related screencasts.

Effective Perl Programming: Item 6: Understand conversions between strings and numbers

I recently started reading Effective Perl Programming: Writing Better Programs with Perl. After reading the first five items, I was glad to be able to honestly say that I already knew these. After reading number six, I am still glad, though I didn’t know the details of this one.
my $value = sqrt(2);
local $# = ‘6.283′;
print [...]