UK based. Perl, XML/HTTP, SAP, Debian hacker.
I got "The Damian"'s PBP last year. Since the start of this month I've been working over some older modules. I've been doing my best to bring them up to "best practices".
Using a combination of the book, Perl::Critic, Module::Build, Devel::Coverage, I've found several no-ops in the code and some subtle bugs that had gone undetected.
I've added loads of tests and currently the first modules I've been really working on is now upto 98.7%, 87.5%, 73.7%, 100%, 100%, 100% and 93% on the test coverage stats. I've got no severity 5 PBP issues, only two severity 4s that I can't fix without changing the API, and I've reduced the number of severity 1, 2 and 3 issues by over half.
I know that following guidelines isn't a panacea for good code, but it's been an interesting process that does force you to think about your code. Is it really okay to deviate from PBP or the guidelines really better? I've also found some bugs, so it's been well worth it.
Think for yourself (Score:2)
Why wouldn't it be OK? Damian isn't omniscient. He's just one guy.
I love the book, and yet I've submitted a talk proposal for OSCON about amending his guidelines.
--
xoa
Re:Think for yourself (Score:1)
Re:Think for yourself (Score:2)
--
xoa
Re:Think for yourself (Score:2)
Ok. I look forward to hearing it in either Birmingham or Brussels :)
Re:Think for yourself (Score:2)
It's all a dialogue, that's what it's all about. Everyone is entitled to an opinion but when it comes to the cruch we have to agree on somethings or we won't be able to communicate at all. I never said I was sticking slavishly to the PBP guidelines, and I would also like to hear other opinions on the matter.
-- "It's not magic, it's work..."
Re:Think for yourself (Score:1)
Re:Think for yourself (Score:2)
I won't get to go to OSCON either. No offence taken, your point is the key to what I was saying, "using PBP/Perl::Critic" makes you think.
-- "It's not magic, it's work..."
Re:Think for yourself (Score:2)
You have a point, the book is just one set of guidelines. However I do think when you deviate you should ask yourself, am I doing this for a sensible reason, or is the PBP guideline actually a better way of doing things.
I suppose the point is PBP makes you think, I'm not slavishly following the guidelines but so far it's forced me think and as part of the process I've found two no-ops and a subtle bug in one module.
-- "It's not magic, it's work..."
To PBP or not to PBP... (Score:2)
As I said in Chapter 1 of the book:
Re:To PBP or not to PBP... (Score:2)
It's been a really useful process. I'm self taught and work mostly in a team of one (me), so an external viewpoint is really useful. As I said in my original post, looking at every deviation has forced me to think, and while in most cases I've gone with the PBP
-- "It's not magic, it's work..."
Re:To PBP or not to PBP... (Score:1)
Re:To PBP or not to PBP... (Score:2)
There is nothing wrong with being self taught, but you do need to obtain an external view point now and then to make sure your going the right way.
I've been on a Red Hat and an IBM AIX training courses. On both couses I realised I knew a lot already (the Red Hat more so), which is useful confirmation, and I also picked up a better understanding and for AIX in particular I did pick up some new stuff.
Reading the PBP book and using Perl::Critic is a good way of getting an external perspective, but it's onl
-- "It's not magic, it's work..."