From andyfrommk at googlemail.com Thu Aug 20 12:58:01 2009 From: andyfrommk at googlemail.com (Andy Selby) Date: Thu, 20 Aug 2009 20:58:01 +0100 Subject: Meeting: Tue 25th August Message-ID: <27183a390908201258p5fcd4f3w153c4dda6a0c8f88@mail.gmail.com> The monthly MKLUG/MiltonKeynes.pm meet-up is nearly upon us! As ever, it will be held at the Wetherspoons pub, near the railway station (not the one in the snow dome), next door to Chiquitos: http://miltonkeynes.openguides.org/?J.D_Wetherspoon%2C_Central_Milton_Keynes Using Perl on a job or just as a hobby? Want to tell people how you solved a complex problem using Perl or do you need help on a Perl-related problem* All skill levels are welcome and catered for. We start at 7pm and are usually the last ones to leave the pub *http://catb.org/~esr/faqs/smart-questions.html From tom at eborcom.com Fri Aug 21 02:24:33 2009 From: tom at eborcom.com (Tom Hukins) Date: Fri, 21 Aug 2009 10:24:33 +0100 Subject: Thoughts on Formatting Code Message-ID: <20090821092433.GD27095@eborcom.com> Everyone has an opinion on how best to lay out code: spaces or tabs? 2, 4 or 8 character indentation? cuddled or uncuddled elses? I find discussing these things dull. I have my preferences and I have good reasons for them. Other people have different preferences and have good reasons for them. This morning, in a fit of mild Friday distraction, I've been thinking about forming conscensus on coding style, or dealing with coding style preferences as a group, either at work or on an open source project. I've heard of people using coding standards, but these seem a bit restrictive. I worked at one company where we devised a set of coding guidelines that suited us, but I find in most workplaces that unwritten guidelines emerge informally. I've heard stories about people using perltidy as a commit hook in version control systems to ensure conformance to house style. Individual developers can apply their own perltidy preferences to code after checking it out, so they edit it in the way they prefer, while code in the repository adheres to a policy. I wonder how well this works in practice. Maybe Perl::Critic would help, or policy tests for the code. I like policy tests that check all code uses strict, but I question their value for anything contentious. Whenever you understand any set of rules well, you know when and why to break it. So I dislike universal policies. Except, maybe for a policy to reject universal policies. Whenever I edit existing code, I try to retain the original author's style, or maybe improve it slightly if I find it horrid. Often I find poor style (yeah, it's subjective, but I mean really bad code) indicates poor thought processes and unreadable code regardless of any reformatting. Generally, I like the idea of making sure people who can edit your code have a rough idea of what they're doing and usually play well with others. I suspect this reduces the need to suggest or enforce policy. But everyone makes mistakes: I like having tools that point out when I might have done something wrong. So I wonder what the rest of you think, and more importantly how you've dealt with such things. What worked and what failed? Tom From tom at eborcom.com Sat Aug 22 05:25:49 2009 From: tom at eborcom.com (Tom Hukins) Date: Sat, 22 Aug 2009 13:25:49 +0100 Subject: Thoughts on Formatting Code In-Reply-To: <20090821092433.GD27095@eborcom.com> References: <20090821092433.GD27095@eborcom.com> Message-ID: <20090822122549.GF27095@eborcom.com> On Fri, Aug 21, 2009 at 10:24:33AM +0100, Tom Hukins wrote: > I've been thinking about forming conscensus on coding style, or > dealing with coding style preferences as a group, either at work or > on an open source project. I discussed this with Robbie yesterday. He had some interesting ideas, but doesn't want to write them down. So I thought I'd spend two minutes summarising the bits that I remember: Developers have their own handwriting style. Perl gives us "more than one way to do it". After a while, you can tell who wrote a certain piece of code by recognising their handwriting. Just as we discover new ways of expressing things in natural language, we experiment with how we write Perl. Experimentation makes programming more interesting and allows us to improve by refining our technique. Robbie, I hope I haven't mangled your thoughts too badly. Tom From robbiebow at gmail.com Sat Aug 22 09:00:13 2009 From: robbiebow at gmail.com (Robbie Bow) Date: Sat, 22 Aug 2009 17:00:13 +0100 Subject: Thoughts on Formatting Code In-Reply-To: <20090822122549.GF27095@eborcom.com> References: <20090821092433.GD27095@eborcom.com> <20090822122549.GF27095@eborcom.com> Message-ID: <973296c20908220900k1ce32847m6c2e91dae49604dc@mail.gmail.com> 2009/8/22 Tom Hukins > Just as we discover new ways of expressing things in natural language, > we experiment with how we write Perl. Experimentation makes > programming more interesting and allows us to improve by refining our > technique. > > Robbie, I hope I haven't mangled your thoughts too badly. > > That's pretty close to what I was trying to express. I think a lot of us enjoy changing our style from time to time. We also enjoy seeing other styles - even the incomprehensible, crayon style that makes us seethe. Where would we be without such? I also think applying different styles can help us to see different solutions to the same problems as emphasis changes depending on how you lay out your code. At $work we have loosely agreed on 4 spaces for indentation and definitely not tabs. Other than that, working in a team of technically competent developers means all styles are readable because we all want our code to be readable, and adopt good practices from one another as we individually choose. Where there are significant differences and I'm changing existing code, I try to observe the styling the "owner" of the piece. It seems polite. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tom at eborcom.com Tue Aug 25 01:11:49 2009 From: tom at eborcom.com (Tom Hukins) Date: Tue, 25 Aug 2009 09:11:49 +0100 Subject: Meeting: Tue 25th August In-Reply-To: <27183a390908201258p5fcd4f3w153c4dda6a0c8f88@mail.gmail.com> References: <27183a390908201258p5fcd4f3w153c4dda6a0c8f88@mail.gmail.com> Message-ID: <20090825081149.GE1566@eborcom.com> On Thu, Aug 20, 2009 at 08:58:01PM +0100, Andy Selby wrote: > The monthly MKLUG/MiltonKeynes.pm meet-up is nearly upon us! It's this evening. Come and join us any time after 7 to celebrate the release of Perl 5.10.1: http://use.perl.org/articles/09/08/25/0556226.shtml If you have not attended a meeting before and you think you might have trouble recognising us, please contact me off-list. Tom