Meet The Champion: December 2021

Tuesday, Jan 4, 2022| Tags: Perl

Get to know about Peter Campbell Smith.

Welcome to the monthly series Meet The Champion.

Last month we spoke to W. Luis Mochan, the winner of November 2021.

Today we are talking to Peter Campbell Smith, the winner of December 2021 of The Weekly Challenge. I hope you are going to enjoy the interview.



Mohammad: How/When did you start using Perl?

Peter: I was the technical lead on a project to re-engineer the software that keep the San Francisco BART metro system running on time. That was a C project, but I wrote code to keep track of documentation, change requests and the like using awk. So when Perl came along - it’s a sort of super-awk - I was interested. The first thing I used it for was a company internal website in 1995 or so - when there were only a dozen or so websites on the UK internet. Back then, most pages were static HTML, but I needed something to track projects, orders, people and so on, so Perl was the obvious tool.

My colleagues thought I was mad - websites would never catch on, they said!

Since then I’ve used Perl in the LAMP stack to do rapid development for a number of clients, both commercial and in charities. My best effort was a credit control tool covering half a million customer records for a phone company: 10k lines of code designed, delivered and into production by me and one other person in six weeks from a cold start. OK, we pinched some modules from other places, but then that’s what Perl is good for.



Mohammad: How did you come to know about The Weekly Challenge?

Peter: I’m not sure. I think I must have Googled something and hit on one of the Perl Weekly articles. I’m retired now, so I have time for idle Googling - and every Monday it’s now the first thing I look for!



Mohammad: What do you like the most about The Weekly Challenge?

Peter: I always like a challenge! I also like to write code which is readable and efficient, and have drilled that into many a team working for me. Documentation never gets updated, so someone has to be able to come in 10 years later and understand the code well enough to change it.



Mohammad: How much time you dedicate every week to The Weekly Challenge?

Peter: It depends on the problems. I probably spend 2-3 hours most weeks. I sometimes try out several approaches to see which works best, or looks cleanest. Although in my scientific career I used a lot of maths - cylindrical Bessel functions anyone? - I am only a novice in number theory, so my approach to some of those challenges is probably a bit naive.

But I also like to go beyond the question asked - for example in challege 141 task 1: ‘Write a script to find lowest 10 positive integers having exactly 8 divisors’ I looked at varying the 10 and the 8 and discovered an unexpected fact when the 8 is changed to a prime number see.



Mohammad: Do you checkout others solutions and who is your favorite?

Peter: I do to some extent. I love Colin Crain’s reviews and have learned quite a lot from his comments. I don’t have a favourite as such: Abigail of course always has concise and accurate answer, though not perhaps always the most easy to understand, but others too have shown me techniques new to me.



Mohammad: What do you suggest someone just started The Weekly Challenge?

Peter: Have a go! I was a bit worried that my style is probably a bit old-fashioned. Until recently I was maintaining several Perl-based websites on servers with Perl 5.11 installed, so many of the later improvements have rather passed me by (how many \n’s would ‘say’ have saved me?)



Mohammad: Anything else you would to like to share with us?

Peter: Thanks for having me, and I’m greatly honoured for having been named champion! I wrote my first line of code in 1966 and reckon to have written maybe 1 million lines to date in dozens of languages … and I’m still learning.



That brings the end of the conversation with Peter Campbell Smith. Please do let us know your view. We will come back next month with another champion.


SO WHAT DO YOU THINK ?

If you have any suggestions or ideas then please do share with us.

Contact with me