Ron Savage
- Website: savage.net.au/
- About: I try to write all code in Perl, but find I end up writing in bash, CSS, HTML, JS, and SQL, and doing database design, just to get anything done...
Recent Actions
-
Commented on Indented comments
No need to indent. Just put a blank line after the comment and before the code....
-
Commented on My "Mojolicious Introduction" now updated for 4.0
Hi Joel Comment re https://mojolicious-introduction.herokuapp.com/: I feel the tendency here is to over-emphasize the power at the expense of explanations for beginners. A few specifics: Slide 7 line 3: { name => ‘Joel’ }: Is a hashref in this position...
-
Commented on Tut # 7: jQuery, Ajax, xml, Perl, databases and utf8
A reply to C Hansen (This is the 5th time I've posted this. Gotta hate Movable Type for being so time-out happy these days. Seems to be a bug with Preview, so I won't do that). 1) I don't have...
-
Commented on Tut # 7: jQuery, Ajax, xml, Perl, databases and utf8
4 attempts to post a reply to C Hansen have timed out. I give up....
-
Commented on Tut # 7: jQuery, Ajax, xml, Perl, databases and utf8
A reply to J Berger Thanx for the info re Mojolicious. I have actually looked into using it a number of times. Indeed, I've even released a little module, MojoX::ValidateHeadLinks, which hopefully is of use to more people than just...
-
Posted Tut # 7: jQuery, Ajax, xml, Perl, databases and utf8 to Ron Savage
I've tried to cover significant interactions between the topics mentioned in the Title above:
The tutorial includes references to various now more-or-less standard documents, or collections thereof, per…
-
Commented on Improved autobox-ing. I'm loving it :o)
I'm with educated_foo. There may be times when autobox is useful, but this sure doesn't look like one of them :-(....
-
Commented on Reviewing web frameworks
I forked CGI::Application after my large set of patches was not integrated for over a year, so the new kid on the block is CGI::Snapp. It effectively makes CGI::App obsolete, and is almost-but-not-quite backward-compatible. Unlike CGI::App my module has built...
-
Commented on [FAILED] 10x faster than LibXML
Hi Sure, put it on CPAN. When you write the docs, please include a 'See Also' section, mentioning the other modules (and programs) you've looked at. Be sure to mention Marpa::R2, which has its own HTML parser: Marpa::R2...
-
Posted Perl && jQuery && XML && ! taconite to Ron Savage
Hi All
If you're in a hurry, jump to my latest (6th) Perl + jQuery tutorial.
In short: I don't use the clever jQuery add-on taconite because it supports only commands (verbs) and I needed conditional execution (an 'if').
… -
Commented on Site Front Page
Hi I have another suggestion. Pre-fill the 'body' with a short(!) reminder to authors to limit the content there, and to put the bulk in 'extended'....
-
Commented on New, experimental screencasts
I could not see anything. Top line grey-on-black is Perl Maven. Next line black-on-white is OOP with Moo. Rest of page is blank, except for some clickboxes on far right (Fb, Twit, Like etc). Weird....
-
Posted Visualising SQL joins to Ron Savage
Hi All
Here's an image displaying various options re SQL joins.
Wish I'd see this years, nay, decades, ago.
-
Posted 5 jQuery tutorials for budding Perlmeisters to Ron Savage
Click keep reading to, errr, keep reading.
This is because I put the text of the entry in MT's 'Extended', and now I've just added this stuff to 'Body'.
Also, the 5th tut is on Autocomplete.
-
Commented on GraphViz2 and the dread MusicBrainz db
Hi All Damn. Forgot to mention. The script examples/table.info.pl shipped with DBIx::Admin::TableInfo needs to be updated liekwise, but differently from dbi.schema.pl. So, I'll release a new version of the module too....
-
Posted GraphViz2 and the dread MusicBrainz db to Ron Savage
Hi All
OK. After a bit of pain I've set up an empty database for the
MusicBrainz database.In particular, where they say 'sudo cpan Carton' you probably want 'cpanm Carton'.
This exercise was because, asto…
-
Commented on Docs for SQLite's foreign_key_list($table)
Hi $many x $thanx;...
-
Commented on A couple of ideas for improving commenting/reviewing CPAN modules
Hi As you know I'm keeping track of many review articles, but yes, it'd be great if the modules' metacpan entries linked to reviews thereof....
-
Posted Docs for SQLite's foreign_key_list($table) to Ron Savage
AFAICT SQLite's foreign_key_list($table_name) pragma returns a list of 8 elements in this order (i.e. with these interpretations):
1: COUNT
…
2: KEY_SEQ
3: FKTABLE_NAME
4: PKCOLUMN_NAME
5: FKCOLUMN_NAME
6: UPDATE_RULE
7: DELETE_RULE
8: UNKNOWN -
Posted GraphViz2 V 2.07 and the Chinook test database to Ron Savage
Tong Sun, a user of GraphViz2, has drawn my attention to the test database Chinook, downloadable here.
He and I have both had great difficulty getting GraphViz2 to properly display the schema of this database. He's using ="http://s…
-
Commented on CPAN modules that (can) load other modules
Hi As for showing the space, I was thinking that given a spreadsheet, I (or other) could write code to generate a Graphviz image with edges linking module names to concepts or ideas. This would a different way of visualizing...
-
Commented on CPAN modules that (can) load other modules
Hi blogs.perl.org just ignores any attempt to click the Reply button, so I'm replying at the end.... Good for security because restricting the # of places a modules is looked for limits the possible places where a hacker could install...
-
Commented on CPAN modules that (can) load other modules
Hi Neil Marvellous, as always. Some comments: 1) Where you say Mojo::Loader "will only find modules where the .pm file is immediately within the namespace specified", you could add that that is good from a security point of view. 2)...
-
Commented on Pumpkin Perl Breakdown
Hi Matt OK, I read your extremely-well-argued what, why, how - and I agree: Pumpkin Perl it is....
-
Commented on Names And All That
Hi Thanx for both perspectives. One thing to note is that there is so much promotion these days, people simply expect it. It can be content-free (as with 'celebrities'), or meaningful. So, if we - as a Perl community -...
-
Commented on Names and Numbers, Brand and Identity
>I like the idea of having several distributions, which are basically Perl + some set of modules or other. But this is just what Linux is! See the dread DistroWatch 'Page Hit Rankings' down the right-hand-side for a plethora of...
-
Commented on My First Post.
Hi I was in my 30s I guess when I started with Perl, and now have a few modules on CPAN, so there's plenty of time for you. Getting started: I suggest downloading a few modules and looking at the...
-
Commented on On Perl Names And Numbers
Hi Glad to read some new opinions. As for the version #, can those proposing a change for marketing reasons, please explain what happens if there is no resultant buzz. Just saying "Oops" is not enough. My position is that...
-
Commented on Introducing Sah, another data validation framework
Hi You have 'int*' as a shorcut for ['int', req => 1]. I use ' rather than " because the latter is optically dense. I would argue that's a mistake, since you use of '*' clashes with '*' used in...
-
Commented on $3M says Perl5 needs a new major version number
Hi Write an article comparing your plotting package with the others. A bit of work? Undoubtedly. And yours does not have to surpass the others in all ways. The point is to give you something to brag about....
Comment Threads
-
mascip commented on
Improved autobox-ing. I'm loving it :o)
Hey Nick. Ruby has methods who take a block as an argument. An example here with the Tree class (search for "Tree" in the page):
The result is :
a_tree.visit_all { |node| do_something_with(node) }
which will perform an operation on all nodes of the tree. I like it.
I still don't love how it looks. But i prefer writing the list name first, and then the maps and greps in the order in which they are execut… -
Toby Inkster commented on
Indented comments
Given this example:
# Bless ourselves into the desired class and perform any # initialization. bless $self, $class; $self->initialize(); return $self;
I would format the comments like this:
bless $self, $class; $self->initialize; return $self;
If you use relatively short functions and blocks, and name functions and variables sensibly, comments rarely add anything.
Don't add comments to explain what Perl built-ins do; that's what books are for. Don't add comments to explain your API; that's what pod is for. Don't add comments to explain the …
-
Toby Inkster commented on
Indented comments
PS: one good reason to avoid unnecessary comments is that if you have too many comments you tend to forget about them. When you update some code, you might forget to update the comment, and they fall out of sync.
From your example:
# Any remaining arguments are treated as initial values for the # hash that is used to represent this object.... but they're not! They're passed to another function, the result of which is stored in one key of the object's hashref. The comment is misleading, and makes it harder for people to understand what the code is doing.
If…
-
educated_foo commented on
Indented comments
If you use relatively short functions and blocks, and name functions and variables sensibly, comments rarely add anything.
Code tells you how, while comments tell you why, e.g.# sort values first to increase floating point accuracy sort @x; $x += $_ for @x;I guess you could encode the comment in the variable names, but IMHO explaining what you're doing is better. -
educated_foo commented on
Indented comments
(Oh, FFS, I misspoke the incantation to make code display properly here, and can't ninja-edit to fix it. Sorry.)
About blogs.perl.org
blogs.perl.org is a common blogging platform for the Perl community. Written in Perl and offering the modern features you’ve come to expect in blog platforms, the site is run by Dave Cross and Aaron Crane, with a design donated by Six Apart, Ltd.