tag:blogger.com,1999:blog-61038565342799310942024-02-07T03:07:56.077+00:00Perl training - Geekuni blogSign-up for the latest news and some useful tips along the way. Andrew Solomonhttp://www.blogger.com/profile/00215724509745366070noreply@blogger.comBlogger32125tag:blogger.com,1999:blog-6103856534279931094.post-4474700583384284282021-05-03T01:00:00.006+01:002021-05-06T23:53:06.046+01:00The problem learning Perl using Google<p>Google search isn't always the best way to find what you're looking for, and learning Perl is a case in point. In this article I'll explain the problem of Google search when learning Perl, and the better alternatives to use.</p><p><br /></p><p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlVkEvPBIjCW9Pw3rZFSzWLumOAgsTOAxfG__-hDTzkpiqp48wz-ow7MS56WUFnHnBxbDDluzPtn2FGmSxtE6WA-l6KvkDdbqPImVEWg9d8r4EVuadhjp8FPsaJPWt-xV8bQgOr7cFeR8/s2048/shutterstock_337763216.jpg" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="1536" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlVkEvPBIjCW9Pw3rZFSzWLumOAgsTOAxfG__-hDTzkpiqp48wz-ow7MS56WUFnHnBxbDDluzPtn2FGmSxtE6WA-l6KvkDdbqPImVEWg9d8r4EVuadhjp8FPsaJPWt-xV8bQgOr7cFeR8/s320/shutterstock_337763216.jpg" width="320" /></a></p><span><a name='more'></a></span><h3 style="clear: both; text-align: left;">The problem</h3><p style="clear: both; text-align: left;">In the first quarter of 2021 I <a href="https://news.perlfoundation.org/post/newperluserssurvey">ran a survey</a> on behalf of <a href="https://www.perlfoundation.org/">The Perl Foundation</a> to understand how Perl - as a community and ecosystem - can be more welcoming to beginners. From the results we found that one of the main challenges beginners face is that it's very hard to find the best approach to Perl coding problems through a Google search.</p><h3 style="clear: both; text-align: left;">... in detail</h3><p>Imagine you've decided to build an object oriented module in Perl. It'll be your first, so you google "object oriented perl". Running this query on the first day of May, 2021, your first hit is <a href="https://www.perltutorial.org/perl-oop/" rel="nofollow">https://www.perltutorial.org/perl-oop/</a> and every other link on the first page of search results has similar content. These pages tell you about "<a href="https://perldoc.perl.org/functions/bless">bless</a>", the function at the core of Perl which creates an object.</p><p>The problem is that these search results present the way object oriented Perl would be written 20 years ago. These days there are packages - most prominently <a href="https://metacpan.org/pod/Moose">Moose</a> and <a href="https://metacpan.org/pod/Moo">Moo</a> - which are the main tools experienced Perl developers currently use for object oriented development. The resulting code is much easier to write, read and maintain.</p><h3 style="text-align: left;">The cause</h3><p>Why has Google given us such an outdated view of the Perl ecosystem? It's because Perl took the online world by storm with the dot-com bubble in 1995-2001. At that time, a Perl script was just about the only way to put together a dynamic website, and that's when a lot of articles were written explaining how to do things in Perl. They were linked to from many other pages - and through the principles of how Google ranks search results - all these links give them a great deal of traction when using Google search to find information about Perl.</p><p>Since then, modern and maintainable ways of doing things in Perl have been established, but because Perl is now a small fish in a large pond of competing languages, the number of links pointing at its modern documentation can't compete with those from the beginning of this millennium.</p><h3 style="text-align: left;">Advice for beginners</h3><p>As a beginner, ask questions in the various online discussion groups, mailing lists or chat. Share code samples and ask whether you're heading in the right direction. It sounds time consuming and harder than a Google search, but the excitement and joy of getting a simple, clean solution is well worth the effort!</p><p><br /></p><p><br /></p><p><br /></p><p><br /></p>Andrew Solomonhttp://www.blogger.com/profile/00215724509745366070noreply@blogger.com1United Kingdom55.378051 -3.43597327.067817163821154 -38.592223 83.688284836178838 31.720277tag:blogger.com,1999:blog-6103856534279931094.post-16680182401824553412019-07-18T22:46:00.001+01:002019-11-14T06:40:57.025+00:00How to make Perl training part of the onboarding process<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /><span style="font-size: large;">...and meet the demand for new developers</span></span><br />
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br />Demand for Perl developers far outstrips supply in the current job market, so hiring one can be expensive as well as a headache. Perl is not even the most common language used, so some employers might want to wean themselves off it altogether. But this would mean re-writing their code in a more popular language such as Java or Python – a huge and cumbersome task. The best option, then, is to hire developers in other languages and train them in Perl while onboarding. This has proven successful for large multinational corporations such as Booking.com, who hire new developers at scale and offer them <a href="https://www.geekuni.com/case-studies/booking">on-the-job Perl training</a>. So, how do you go about things if this is the route you want to take? Geekuni has specialised in training new hires in Perl for a number of years and we’ve gained some valuable insights.</span><br />
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<h2>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Onboarding challenges</span></h2>
</div>
<div>
<h3>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Finding the willing candidates</span></h3>
</div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvQOkbWJqK0flkxCpxwb73s5GygPN7TifscvP7x4fIBsR0yUw9f_-grnhDhW3Ca2qIoeIZXbqCeMdkNi-QqQAESe4r7HLcTxw1QjTR0pPKNf3i5SNI1EFBuafumkyjFTcTkCmQbc0StMk/s1600/onboarding-hiding.jpeg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="500" data-original-width="497" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvQOkbWJqK0flkxCpxwb73s5GygPN7TifscvP7x4fIBsR0yUw9f_-grnhDhW3Ca2qIoeIZXbqCeMdkNi-QqQAESe4r7HLcTxw1QjTR0pPKNf3i5SNI1EFBuafumkyjFTcTkCmQbc0StMk/s320/onboarding-hiding.jpeg" width="318" /></a></div>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Why would a developer experienced in other languages want to join your company and start learning Perl from day one? If they’ve managed to get by without it so far, it’s unlikely to be their top priority as they make their next career move. The first hurdle you face, then, is finding good developers who are open to learning Perl.</span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<h3>
<span style="font-family: "arial" , "helvetica" , sans-serif;">The eager newbie</span></h3>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Most talented developers joining a company want to get their teeth stuck into the job by showing what they already know. Learning a completely new language from the start not only delays this but also involves asking questions which expose gaps in their knowledge. Onboarders are already busy getting acquainted with the company, its processes and its people. They need space to grow into the role, so the added burden of Perl training can quickly turn into an obstacle that stands in their way.</span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<h3>
<span style="font-family: "arial" , "helvetica" , sans-serif;">The overstretched employer</span></h3>
<span style="font-family: "arial" , "helvetica" , sans-serif;">There’s plenty of potential for frustration on the employer’s side, too. The longer it takes for new recruits to become productive, the higher the cost of their onboarding experience. New hires also place demands on teams, slowing down their productivity as they take time from regular duties to show new developers the ropes. And that’s all before you even consider offering them Perl training. Providing Perl training from day one places an additional strain on teams, and this can seriously slow down business. Although outsourcing the training is an option, face-to-face providers are expensive and can make it difficult for team leads to maintain an overview of the trainees’ progress.</span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<h2>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Onboarding solutions for plain sailing</span></h2>
</div>
<div>
<h3>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Reaching out to the right people</span></h3>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Let’s face it – Perl is not the most popular language. As a result, the best developers might be more open to joining your company to learn Perl if you focus on selling your company, not the language. That said, you can also challenge the perception of Perl as a stagnant language by talking about how it solves problems in the company. Learning Perl should not be presented as a hurdle to joining the company, but a benefit – getting paid to learn something new is a very appealing proposition.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjk9u0CWJx3jmxb2QD3Sz0XjNBa3irs8xVqzpjGplgb4TQRlbBffhIIxe2UoBE9PfRkFlysqky2i2aycYuT79PpObcDyaC9wcbCttF0dt_UGfoV9nXAkZl5Z5gBaGBgaFm4vpC_tWbjvsw/s1600/onboarding-happy.jpeg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="334" data-original-width="500" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjk9u0CWJx3jmxb2QD3Sz0XjNBa3irs8xVqzpjGplgb4TQRlbBffhIIxe2UoBE9PfRkFlysqky2i2aycYuT79PpObcDyaC9wcbCttF0dt_UGfoV9nXAkZl5Z5gBaGBgaFm4vpC_tWbjvsw/s320/onboarding-happy.jpeg" width="320" /></a></div>
<span style="font-family: "arial" , "helvetica" , sans-serif;">It’s also worth looking closer to home as you probably have a pool of potential Perl talent right under your nose. Second-line support staff generally make good developers and may be eager for the career opportunity. A big advantage, of course, is that onboarding is a lot more straightforward. This type of internal recruitment – where a member of staff leaves one role to take up a completely new role in the same company – is different to cross-training. (<a href="https://blog.geekuni.com/2019/05/cross-training-to-grow-your-perl-teams.html#more">Cross-training</a> doesn’t involve a change of job - it's the acquisition of skills and the corresponding expansion of their job description.)</span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<h3>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Giving newbies a sense of ownership</span></h3>
<span style="font-family: "arial" , "helvetica" , sans-serif;">It’s important not to overwhelm new recruits during the onboarding process for it to be effective. One way to achieve this is by giving them greater ownership of their learning. <a href="https://geekuni.com/corporate-perl-training">Geekuni’s interactive online Perl training</a> does just that. Trainees have more control over the pace of their learning, which allows them to manage their own time while onboarding. It also gives new hires instant feedback, so they don’t have to bother senior developers with all their questions. The training focuses on task-based learning, which lets trainees apply new coding skills to real-life situations. This means they can start making their own contributions to the company’s codebase a lot quicker.<br /><br />Giving new recruits the opportunity to participate in Perl conferences such as <a href="https://perlcon.eu/">PerlCon</a> and <a href="https://perlconference.us/tpc-2019-pit/">TPC</a> is also a huge help. Full immersion in the world of Perl allows them to make useful contacts and brings them up to date with the latest trends. Such opportunities are not just enriching for trainees, it gives them fresh new perspectives to take back to the company.</span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<h3>
<span style="font-family: "arial" , "helvetica" , sans-serif;">An onboarding process that doesn’t sink the ship</span></h3>
</div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ0Lcu7MHn8PmffjDMSNYWEEEkF_mxg5GAIOsuZNhYrEQabVLWiNZTZf3NCdSA936ZSVWaaCjLgI98_rFS-eaEulUX_VY3o3X8_ggNERCHqOvaZgCGeUskfHz3euqRFr8sfJ1DkQx3Cl0/s1600/onboarding-ship.jpeg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="500" data-original-width="422" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZ0Lcu7MHn8PmffjDMSNYWEEEkF_mxg5GAIOsuZNhYrEQabVLWiNZTZf3NCdSA936ZSVWaaCjLgI98_rFS-eaEulUX_VY3o3X8_ggNERCHqOvaZgCGeUskfHz3euqRFr8sfJ1DkQx3Cl0/s320/onboarding-ship.jpeg" width="270" /></a></div>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Geekuni’s Perl training has also been designed with employers in mind. It takes the weight off busy teams and team leads, freeing up precious resources. At the same time, an effective system of reporting means that team leads and HR can track the progress of trainees with very little effort. This not only makes the onboarding process plain sailing, but also means you can continue with regular business activities full steam ahead. Keeping the relevant stakeholders in the loop helps identify ongoing training needs for new recruits as they complete the onboarding process. What’s more, a standardised approach provides clear-cut criteria for measuring progress and facilitates more consistent training delivery across different teams or departments.</span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<h2>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Conclusion</span></h2>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br />To expand your Perl talent pool, you need to acknowledge the reality of the job market and work around the obstacles this presents. A tried and tested approach is to hire developers in other languages and train them in Perl during the onboarding period. But this, too, requires some adaptation in order to ensure a well-designed and professionally implemented onboarding process. This can only be achieved if relevant stakeholders work together right from the start to set out a <a href="https://geekuni.com/corporate-perl-training">clear path to success</a>.</span></div>
</div>
Andrew Solomonhttp://www.blogger.com/profile/00215724509745366070noreply@blogger.com0tag:blogger.com,1999:blog-6103856534279931094.post-61113610846238500172019-05-11T18:06:00.000+01:002019-05-12T00:24:46.257+01:00Cross-training to grow your Perl team<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="margin-left: 1em; margin-right: 1em; text-align: left;">
<span style="font-family: "arial" , "helvetica" , sans-serif;">Expanding a company’s Perl operations can be a headache for HR and tech teams alike. Hiring more staff is not always an option and even when it is, finding a Perl developer to walk straight into a new role is hard. A more viable approach for many companies is to offer cross-training into Perl for staff already employed. The problem is that while your developer is cross-training, there’s work which they aren’t doing. Geekuni has been working closely with companies for several years and we’ve gained valuable insights into what works and what doesn’t. The good news is that you can in fact facilitate the smooth running of existing operations while seamlessly growing your Perl talent through cross-training. Here’s what you need to know.</span></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBmH0h9nOw51yzmwwi60Vhoy-YnvkKj9fFq_Wt808rWggCpUG8zGFGxUrDmonjkBTIE6gPGv-P1K1OnOarPpDvKCrSJLIoAx1VQXxK-kAIgJnHu9XrgvJ6Vs7CykaNPXTh8nuwgDD-GE0/s1600/shutterstock_1072142327.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="275" data-original-width="500" height="220" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBmH0h9nOw51yzmwwi60Vhoy-YnvkKj9fFq_Wt808rWggCpUG8zGFGxUrDmonjkBTIE6gPGv-P1K1OnOarPpDvKCrSJLIoAx1VQXxK-kAIgJnHu9XrgvJ6Vs7CykaNPXTh8nuwgDD-GE0/s400/shutterstock_1072142327.jpg" width="400" /></a></div>
<br />
<div>
<div>
<br /></div>
</div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"></span><br />
<a name='more'></a></div>
<div>
<h3>
<span style="font-family: "arial" , "helvetica" , sans-serif;">What is cross-training and who is it for?</span></h3>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Cross-training is about the acquisition of skills which enable a worker to perform tasks beyond the scope of their initial job description. Cross-training gives a broader overview of the company, widening experience of other business areas and therefore helps improve company processes. Job satisfaction can significantly increase and the new skills give staff greater career mobility.</span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;">In the context of Perl, cross-training can be applied in a number of different ways. Examples include cases where front-end developers, system administrators or data-analysts learn Perl in order to take on some of the tasks performed by full-time Perl developers. Trainees continue in their current roles while at the same time contributing to the Perl codebase. This frees up resources for full-time Perl developers, allowing them to focus their attention on more complex and demanding Perl operations.</span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;">But cross-training also enables individuals to transition towards full-time Perl positions if and when the opportunity or business need arises. Perl developers recruited in this way come with first hand experience and knowledge of the company – qualities which external new recruits just don’t have.</span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<h3>
<span style="font-family: "arial" , "helvetica" , sans-serif;">What could possibly go wrong?</span></h3>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;">The biggest challenge is to make sure that the regular duties of trainees are not neglected during the actual training. There’s a serious risk of operations in any given business area slowing down or reaching gridlock if too many team members are out of action for any length of time. What’s more, the effectiveness of the training is easily compromised if business emergencies cause interruptions during the learning process.</span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Team leads are among those who won’t be happy to see their work put on hold, especially if the reason for this is (on the face of it) to further the objectives of another business area. The aggravation of managers could be compounded if they are not equipped to maintain an overview of the progress or effectiveness of their team’s training.</span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Where multiple team members are being cross-trained, some will inevitably excel more than others. In such cases, those who feel less confident at the end of training may defer to colleagues with a much better grasp of Perl. These more able coders can quickly become burdened with the Perl tasks of the whole team, resulting in bottlenecks in the workflow, unfair workload distribution and yet more frustration all round.</span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<h3>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Avoiding the pitfalls</span></h3>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;">With a bit of forward planning, it is possible to avoid the pitfalls of cross-training. The exact approach you take depends entirely on the scale and nature of the team’s operations and the number of people to be cross-trained.</span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;">When an entire team needs to be trained it’s important not to do this all in one go. Geekuni has found that training up to 20% of a team at any one time works well, as it allows productivity to continue. Obviously, the remaining 80% of the team will be stretched temporarily, but as long as it adopts a similar attitude and approach to when colleagues are on annual leave, the mechanisms and infrastructure should be there for things to run smoothly.</span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Time needs to be formally allocated, and the training can be done either full-time - where the trainee is removed from day-to-day responsibilities - or part-time in a limited time-frame so that they don’t lose momentum with large gaps between training sessions. </span><span style="font-family: "arial" , "helvetica" , sans-serif;">Whichever approach is taken, the success of cross training depends on keeping team leads in the loop. A system needs to be in place to allow team leads to track progress and ensure the trainee’s time is allocated correctly.</span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Geekuni’s online approach helps overcome many of the challenges of corporate Perl cross-training. Team members with different levels of knowledge can work independently at their own pace. The task-based nature of Geekuni’s online method not only makes it a practical, hands-on experience for the trainee, but also means training can be completed in bite-sized chunks which are easier to juggle with the existing workload. Automated code review, unit tests and instant feedback mean trainees don’t need to depend on others in order to progress, yet at the same time Geekuni is on call for any questions, further reducing the burden on teams.</span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Through standardized reporting updated hourly team leads and other stakeholders can measure the progress of trainees objectively, helping to identify which team members are up to scratch and which require further support.</span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<h3>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Conclusion</span></h3>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Love it or loathe it, Perl is here to stay. Any company whose operations depend on it needs to be able to scale up its Perl activities if it wants to stand any chance of growing the business. In the current market, Perl developers are among the most difficult to find and any new recruits will take time to assimilate. Cross-training can provide both a quick and lasting solution as long as the required learning environment and framework is established from the start. With the right approach, cross-training can rapidly expand your company’s Perl capacity and output by spreading tasks across different teams. What’s more, it can future-proof your Perl operations with a pool of talent ready to spring into action as full-time Perl developers should the business need arise.</span></div>
</div>
<div>
<br /></div>
<div>
<br /></div>
Andrew Solomonhttp://www.blogger.com/profile/00215724509745366070noreply@blogger.com0London, UK51.5073509 -0.1277582999999822351.1912379 -0.77320529999998222 51.8234639 0.51768870000001777tag:blogger.com,1999:blog-6103856534279931094.post-50071702555693887532018-10-14T15:34:00.000+01:002018-10-14T15:42:52.044+01:00Growing your Perl Team - BoF<span style="font-family: "arial" , "helvetica" , sans-serif;">Expanding the dev team is a challenge every successful Perl shop has to face. At the most recent Perl conference I ran a “Birds of Feather” (BoF) where representatives of over a dozen companies and community groups came together to exchange their experience of what works, what doesn’t and general principles which emerged from these discussions. This is a summary of what came from this meeting.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsDUL2wFCNTO5KgbnWeqEdjFXehQH0W9awx0vYMlLG3UrXEc1mPzSs_nC-nhpahR_s5AgbeBsioaCFpVIAjodYqVgGbmYQA97VL2fodkozfxBpoC-rAvM9lVRC38rx9aFhwPzAPwLnPp8/s1600/shutterstock_112398881.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="569" data-original-width="1000" height="227" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsDUL2wFCNTO5KgbnWeqEdjFXehQH0W9awx0vYMlLG3UrXEc1mPzSs_nC-nhpahR_s5AgbeBsioaCFpVIAjodYqVgGbmYQA97VL2fodkozfxBpoC-rAvM9lVRC38rx9aFhwPzAPwLnPp8/s400/shutterstock_112398881.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<a name='more'></a><span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">The Perl Conference - Glasgow 2018 (formerly known as YAPC::EU 2018) was a truly wonderful get together with a lot of ideas being exchanged. Apart from the multitude of interesting technical presentations, there were a number of more reflective discussions on <a href="https://twitter.com/geekuni/status/1030162771495677953">the history of Perl</a>, <a href="http://act.perlconference.org/tpc-2018-glasgow/talk/7472">Perl as a technology</a>, <a href="http://act.perlconference.org/tpc-2018-glasgow/talk/7446">Perl as a community</a>, <a href="http://act.perlconference.org/tpc-2018-glasgow/talk/7396">turning humans into Perl developers</a>, and <a href="http://act.perlconference.org/tpc-2018-glasgow/talk/7335">turning Perl developers back into humans</a>. My own involvement was around <a href="https://www.slideshare.net/illywhacker/let-them-learn-perl-on-the-job">how to grow a Perl team</a>.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">As a trainer and developer, although I’ve learned a lot about growing a Perl team - there’s only so much experience one person can get. That’s why I organised a BoF with over a dozen people from companies of all sizes sharing our experiences. The BoF attendees’ roles included developer, recruiter, trainer, team lead and manager so it was more like an ecosystem than a flock of birds!</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Having used the Agile methodology in my role as software developer almost exclusively over the last decade, putting the BoF together as a retrospective seemed the most normal thing to do. The structure was to sit around and jot down on Post-it notes what has worked well, what has gone badly and ideas on how to move forward. We put them all on the wall, categorised and consolidated them into high level observations which I summarise below.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<br />
<h2>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: x-large;">Observations</span></h2>
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">A well designed onboarding process is crucial</span><br />
<ul>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">Make sure enough time is reserved for learning about the company, the processes and the technologies - especially if they’re learning Perl.</span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">Carefully tailor the tasks for newbies to maintain morale.</span></li>
</ul>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Watch your attrition rate/churn</span><br />
<ul>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">Even if your team is growing, if your long-term developers are leaving there will be trouble!</span></li>
</ul>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Make sure your team has a good spread of Junior/Intermediate/Senior developer</span><br />
<ul>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">Everyone needs support in pushing their boundaries.</span></li>
</ul>
<span style="font-family: "arial" , "helvetica" , sans-serif;">A sense of belonging is essential</span><br />
<ul>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">to the team, the company and the Perl community.</span></li>
</ul>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Provide a path for career growth</span><br />
<ul>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">E.g. 1st line > 2nd line > 3rd line support > developer</span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">This generates developers with a much better understanding of the business than developers recruited with the target skills.</span></li>
</ul>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Perl’s unpopularity is an obstacle</span><br />
<ul>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">Companies and the community should collaborate on fixing that.</span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">Need to focus on the company rather than the technology when getting people onboard.</span></li>
</ul>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Don’t off-shore/outsource software which is in your company’s DNA</span><br />
<ul>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">Keep the developers and stakeholders close to reduce frustration on both sides</span></li>
</ul>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<br />
<h2>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: x-large;">Acknowledgements</span></h2>
<span style="font-family: "arial" , "helvetica" , sans-serif;">I’d like to thank the people below who participated in the meeting, and openly shared their experiences. That said, the statements above are mine alone and do not necessarily reflect their views.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<br />
<ul>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">Aaron Rowe, Software Development Manager, Adestra</span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">Dave Cross, Consultant and Trainer, Magnum Solutions</span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">Johan Lindstrom, Software Developer, Broadbean</span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">Julien Fiegehenn, Software Developer and Onboarding Mentor, Oleeo</span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">Lee Johnson, Senior Software Developer, HumanState</span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">Makoto Nozaki, Board Secretary, The Perl Foundation</span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">Matthew Lyons, Head of IT, Pirum</span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">Peter Kainrad, Atikon EDV & Marketing GmbH</span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">Rick Deller, Head of Technology, Eligo Recruitment</span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">Roland Schmitz, Senior Consultant, telexiom AG</span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">Sandra Schuhmacher, IT Specialist, IBM</span></li>
</ul>
<br />
<h2>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: x-large;">What’s next?</span></h2>
<span style="font-family: "arial" , "helvetica" , sans-serif;">This gave me a lot to chew over and I think each of these topics is inviting some deep-dive research. If you’d like to collaborate on one of these topics, please <a href="https://twitter.com/geekuni">let me know</a>!</span><br />
<div>
<br /></div>
Andrew Solomonhttp://www.blogger.com/profile/00215724509745366070noreply@blogger.com0tag:blogger.com,1999:blog-6103856534279931094.post-32816266409225498092018-01-30T22:57:00.000+00:002018-02-13T07:49:47.155+00:00The challenge of recruiting Perl developers<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="margin-left: 1em; margin-right: 1em;">
<br /></div>
<div style="margin-left: 1em; margin-right: 1em; text-align: left;">
Many employers have a real challenge increasing the size of their Perl team. First we’ll work out the reasons recruitment is so difficult for a Perl team, and then we’ll bounce around some ideas on how to overcome these obstacles.</div>
<div style="margin-left: 1em; margin-right: 1em; text-align: left;">
<span style="text-align: center;"></span><br />
<a name='more'></a></div>
<div style="margin-left: 1em; margin-right: 1em; text-align: left;">
<span style="text-align: center;"><br /></span></div>
<div style="margin-left: 1em; margin-right: 1em; text-align: left;">
<span style="text-align: center;">According to </span><a href="https://www.stackoverflowbusiness.com/blog/the-highest-paying-web-development-languages-in-2017" rel="nofollow" style="text-align: center;" target="_blank">StackOverflow</a><span style="text-align: center;"> Perl is one of the most highly paid programming languages</span></div>
<div style="margin-left: 1em; margin-right: 1em;">
<br />
<img height="257" src="https://lh4.googleusercontent.com/s_60Pe0qBj7ANsBHazpHgtAb3lIz5wEebohdQUpVoKSRF1GS0_lOHJn8T6eEWSX5WKbCm3Le1O4g4DLBku45qBUeh2MMD01zPX9KLfAKb5Zggxpi_lmaj-kwJc__IcWOP9XXH0l2" width="400" /><br />
<br />
<div style="text-align: left;">
<br /></div>
</div>
<div style="margin-left: 1em; margin-right: 1em;">
<div style="text-align: left;">
and although that’s nice for Perl developers, it’s a symptom of the struggle many companies have to expand their Perl teams.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
A lot has been said about Perl’s image as a legacy language and according to the most recent <a href="https://insights.stackoverflow.com/survey/2017#most-loved-dreaded-and-wanted" rel="nofollow" target="_blank">StackOverflow survey</a>, it’s one of the most “dreaded”. Having dug a bit deeper into what developers are saying I’ve found that it’s about the reams of Perl written in the dot-com boom where lots of non-developers were using it to put together amazing businesses - on a mountain of tech debt.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
However, possibly the greatest obstacle to expanding Perl teams is that the language is almost never taught in academia. This is because it’s designed as a “<a href="https://en.wikipedia.org/wiki/There%27s_more_than_one_way_to_do_it" rel="nofollow" target="_blank">natural language</a>” - very expressive but difficult to teach unless you’re immersed in the language. As a result, the Perl developers are the small number of people who have learned Perl on the job.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Therefore the question is - how to make your workplace friendly to people coming in and learning Perl on the job? Of course, the provision of <a href="https://geekuni.com/corporate-perl-training" target="_blank">Perl training</a> as <a href="https://geekuni.com/case-studies/broadbean" target="_blank">part of the onboarding process</a> is a good start but where to from there?</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
The first approach is to identify the parts of the code base which involve simple repetitive coding patterns. The ongoing updates to these components are simple enough to use as a learning environment for developers to practice their Perl. Once they’ve done a few of these, they can move on to more engaging and interesting parts of the code.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
The second prong is to cut back on tech debt and bring other languages into the mix. A nice example is <a href="https://www.perl.com/article/when-perl-isn-t-fast-enough/" rel="nofollow" target="_blank">David Farrell's article</a> where a single page of a mostly Perl website has been rebuilt in Go. Take a change to business requirements as an opportunity to break down crufty old code (the stuff which makes developers start flicking through job ads) and turn it into micro-services built from scratch. Take a rigorous approach to deciding on the right language for the job - following the principle that Perl is a "<a href="https://www.techworld.com/careers/perl-developers-dispel-doubts-about-codes-longevity-3599357/" rel="nofollow" target="_blank">duct tape</a>" language. At this point a part of your code base will tap into another language and developers of this language can join your team not as junior Perl developers but as experts of that language, ready to add Perl to their repertoire.</div>
</div>
<br />
<div>
<br /></div>
Andrew Solomonhttp://www.blogger.com/profile/00215724509745366070noreply@blogger.com0tag:blogger.com,1999:blog-6103856534279931094.post-19841925748813615712017-12-17T16:43:00.001+00:002017-12-21T23:56:31.189+00:00Moo: One approach to terminating the process when attributes of a dynamically assigned role are missing<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11pt; white-space: pre-wrap;">The value of a role’s required attribute is only checked on object creation. This article provides one way of enforcing it when applying the role to an object on the fly.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<center>
<a data-pin-do="embedPin" data-pin-width="medium" href="https://www.pinterest.com/pin/413838653232602699/">Picture of a Dalek</a>
</center>
<script async="" defer="" src="//assets.pinterest.com/js/pinit.js"></script>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<h2>
<span style="font-family: "arial"; font-size: small; white-space: pre-wrap;"><a name='more'></a>Introduction</span></h2>
</div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">What is certain about Perl programming is that there's always more to learn, and this article on applying roles in OO Perl is one such example. It's the challenge of ensuring attributes are set in roles applied on the fly.</span><br />
<span style="font-family: arial; font-size: 11pt; white-space: pre-wrap;"><br /></span>
<span style="font-family: arial; font-size: 11pt; white-space: pre-wrap;">It’s quite often the case that if people forget to assign a value to an attribute we really want things to die rather than have undef being returned as the value of the attribute.</span><br />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span>
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Here's an example:</span>
</div>
<script src="https://gist.github.com/andrewsolomon/0587b7d25dfa62d704ae815e57651261.js"></script>
and when you run it:<br />
<br />
<script src="https://gist.github.com/andrewsolomon/bbd6d050a7991706c840dc20a1b2f7ce.js"></script>
In order to terminate the process so that the script behaves as follows:<br />
<br />
<script src="https://gist.github.com/andrewsolomon/20d962fe063b36ee7ef989552a5a1b9e.js"></script>
all you need to do is make the "name" attribute "required":<br />
<br />
<script src="https://gist.github.com/andrewsolomon/920155d9230728c248be9590c9fa313b.js"></script>
This all works fine and dandy until you decide not to apply the role on creation of the object. In this example, it might be that a car can have a brand, or it might be home-made with no brand. At this point you have to remove the role declaration from the class and apply the role to the object:<br />
<br />
<script src="https://gist.github.com/andrewsolomon/b0aacbd7f7916ec0ce5dd1028479edb8.js"></script>
As you can see from the following output - the "required" modifier isn't applied because that only happens on creation of the object.<br />
<br />
<script src="https://gist.github.com/andrewsolomon/49e7cfb2131500f47da6c36ac4263dc8.js"></script>
<br />
<h2>
<span style="font-size: small;">"Terminate!" by default</span></h2>
Rather than requiring the attribute on object creation (before the role has been applied) the solution here is to make the attribute lazy, then die by default on accessing the attribute to indicate that a value hasn't been assigned.
<br />
<br />
<script src="https://gist.github.com/andrewsolomon/30b5d77bd421bd598f7f2faee1f716b3.js"></script>
<br />
<h2>
<span style="font-size: small;">Summary</span></h2>
A Moo role's "required" attribute isn't actually required if the role is being assigned to an object at runtime. One solution is to die by default when accessing the attribute with no assigned value.<br />
<br />
<h2>
<span style="font-size: small;">Acknowledgements</span></h2>
This rabbit hole traversal was instigated by one of Dave Cross's rigorous code reviews.
Andrew Solomonhttp://www.blogger.com/profile/00215724509745366070noreply@blogger.com0tag:blogger.com,1999:blog-6103856534279931094.post-10956092970297861852017-10-28T23:37:00.000+01:002017-10-28T22:19:46.878+01:00Perl course in LondonOn <b>Saturday November 25, 2017</b> I'll be running a 2 hour Introduction to Perl for developers of other languages<br />
<br />
<a href="http://act.yapc.eu/lpw2017/talk/7224">http://act.yapc.eu/lpw2017/talk/7224</a><br />
<br />
Please make sure you register so that I can set you up with a <b>free</b> 2 week enrolment at <a href="https://geekuni.com/" target="_blank">Geekuni</a>.<br />
<br />
<b>Where?</b><br />
<div>
<br /></div>
<div>
Cavendish Campus, University of Westminster<br />
115 New Cavendish Street London W1W 6UW <br />
<br />
<a href="https://www.westminster.ac.uk/about-us/visit-us/directions/cavendish">https://www.westminster.ac.uk/about-us/visit-us/directions/cavendish</a></div>
Andrew Solomonhttp://www.blogger.com/profile/00215724509745366070noreply@blogger.com0tag:blogger.com,1999:blog-6103856534279931094.post-20605753792735077292017-10-28T22:06:00.002+01:002017-10-30T12:02:31.702+00:00Perl string concatenation and repetition<div class="tr_bq">
One of the first Perl operators to learn is the "dot" <b>concatenation operator</b> (.) for strings. For example:</div>
<br />
<pre>my $string = 'foo' . 'bar';
# $string is 'foobar'.
</pre>
<br />
On the other hand, if you have an array of strings @arr, then you can concatenate them by joining them with an empty string in-between:<br />
<pre>my $string = join('', @arr);
</pre>
But what if you just want 10 "foo"s in a line? You might try the Python approach with 'foo' * 10 but Perl with its type conversion on the fly will try to convert 'foo' into a number and say something like:<br />
<pre> Argument "foo" isn't numeric in multiplication (*) at...</pre>
<br />
Instead you should use the <b>repetition operator</b> (x) which takes a string on the left and a number on the right:<br />
<br />
<pre>my $string = 'foo' x 10;
</pre>
and $string is then<br />
<pre>foofoofoofoofoofoofoofoofoofoo
</pre>
Note that even if you have integers on both sides, the 'x' repetition operator will cast the left operand into a string so that:<br />
<br />
<pre>my $str = 20 x 10;
# $str is "2020202020202020202020"</pre>
<div>
<br /></div>
Now this isn't all the repetition operator is good for - it can also be used for repetition of lists. For example:<br />
<pre>('x','y','z') x 10</pre>
<br />
evaluates as:<br />
<br />
<pre>('x','y','z','x','y','z','x','y', ...)</pre>
<br />
But <a href="https://perldoc.perl.org/perlop.html#Multiplicative-Operators" rel="nofollow" target="_blank">be warned</a>: if the left operand is not enclosed in parentheses it is treated as a scalar.<br />
<pre>my @arr = ('x', 'y', 'z');
my @bar = @arr x 10;</pre>
<br />
is equivalent to<br />
<pre>my @bar = scalar(@arr) x 10;
# @bar is an array of a single integer (3333333333)</pre>
while, turning the array into a list of its elements by enclosing it in parentheses:<br />
<br />
<pre>my @foo = ( (@arr) x 10 );
# then @foo is ('x','y','z','x','y','z','x','y', ...)</pre>
<br />
In summary, if you remember that 'x' is different to '*' and lists are treated differently to scalars, it's less likely your code will give you an unpleasant surprise!<br />
<br />
<br />Andrew Solomonhttp://www.blogger.com/profile/00215724509745366070noreply@blogger.com0tag:blogger.com,1999:blog-6103856534279931094.post-59454047470339028522016-04-16T20:12:00.005+01:002017-10-19T07:22:08.781+01:00Interview - Perl’s Pumpking Ricardo Signes<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 16px; line-height: 1.38; vertical-align: baseline; white-space: pre-wrap;">Perl’s </span><a href="http://perldoc.perl.org/perlhist.html#PUMPKIN%3f" style="line-height: 1.38; text-decoration: none;"><span style="font-family: "arial"; font-size: 16px; font-style: italic; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">pumpking</span></a><span style="font-family: "arial"; font-size: 16px; line-height: 1.38; vertical-align: baseline; white-space: pre-wrap;"> is the person who manages the core Perl 5 language. Having worn that mantle for almost five years, Ricardo Signes (rjbs) has set the next major release to </span><a href="http://www.nntp.perl.org/group/perl.perl5.porters/2016/04/msg235825.html" style="line-height: 1.38; text-decoration: none;"><span style="font-family: "arial"; font-size: 16px; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">mark the end </span></a><span style="font-family: "arial"; font-size: 16px; line-height: 1.38; vertical-align: baseline; white-space: pre-wrap;">of his reign. </span><span style="background-color: white; font-family: "arial"; font-size: 16px; line-height: 1.38; vertical-align: baseline; white-space: pre-wrap;">Over this period Perl has moved forward in leaps and bounds in terms of features, stability and </span><a href="http://www.tiobe.com/tiobe_index" style="line-height: 1.38; text-decoration: none;"><span style="background-color: white; font-family: "arial"; font-size: 16px; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">popularity</span></a><span style="background-color: white; font-family: "arial"; font-size: 16px; line-height: 1.38; vertical-align: baseline; white-space: pre-wrap;">. </span><span style="font-family: "arial"; font-size: 16px; line-height: 1.38; vertical-align: baseline; white-space: pre-wrap;">I’ve taken Signes’ reflective mood as an opportunity to understand the person and processes behind Perl’s golden age.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div class="separator" style="clear: both; text-align: center;">
<span style="background-color: transparent; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; margin-left: 1em; margin-right: 1em; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><img height="272" src="https://lh6.googleusercontent.com/4EJJvwRQzXU9xJm2hBoQ4Iz-LTpWiTyjTa0BRAuXqvKp210-mmMUg0ow3jTcHUn1OFgUFO-AfejSeGbuttbEhbG8Yg5L1LL0Jwt0k60PFLKHLNF92tgdFE8SNh_KXWSrwY5HSu23" style="border: none; transform: rotate(0rad);" width="400" /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
</div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: center;">
<span style="background-color: transparent; font-family: "arial"; font-size: 10.6667px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"><a href="http://mianwaheed.blogspot.co.uk/2012/10/halloween-jack-olanterns-carved-out-of.html" style="text-decoration: none;">http://mianwaheed.blogspot.co.uk/2012/10/halloween-jack-olanterns-carved-out-of.html</a></span></div>
<b style="font-weight: normal;"></b><br />
<a name='more'></a><br />
<span style="background-color: white; font-family: "arial"; font-size: 16px; line-height: 1.38; white-space: pre-wrap;">Before we jump into the interview, you’re probably wondering what the pumpking actually does. This is a role which has evolved with the language but there are two main tasks. The first is to enforce a regular release cycle (introduced by the former pumpking Jesse Vincent) and the second is to determine what goes in and what stays out.</span><br />
<b style="font-weight: normal;"><br /></b>
<br />
<div class="separator" style="clear: both; text-align: center;">
<span style="background-color: white; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; margin-left: 1em; margin-right: 1em; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><img height="281" src="https://lh6.googleusercontent.com/ZJLWFXn0u9baiFB0GNjOgFVJ6c26x20ywiTECanYLKzt8Cun-vY9HGlsb-rqAlLzxYRwSQSW30FJVpAgNFWkJaidYJlSdbecx1CAeKV9Y91eLCtmx748XUpYg7zJxXpdPICBbluR" style="border: none; transform: rotate(0rad);" width="400" /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
</div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: center;">
<a href="http://www.dagolden.com/index.php/2499/visualizing-perl-5-release-history-2015-edition/" style="text-decoration: none;"><span style="background-color: white; font-family: "arial"; font-size: 10.6667px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"><span style="color: black;">http://www.dagolden.com/index.php/2499/visualizing-perl-5-release-history-2015-edition/</span></span></a></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; font-family: "arial"; font-size: 16px; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><i>me: How did you come to be the pumpking?</i></span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">rjbs: Jesse Vincent and I were lodging together at YAPC::Asia in 2011. One morning, we went out and got breakfast, and he said, "Do you think that someday in the future, if I retire, you'd be willing to take over?"</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">I was definitely interested in the work. It was partly technical, partly management, partly community relations, partly language design... lots of things that I was interested in, and I thought I'd do a decent job. Also, that "someday in the future" seemed pretty far off, so I'd have time to prepare, or to weasel my way out of it if needed.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Then Jesse handed me the pumpkin about two weeks later. Oops!</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; font-family: "arial"; font-size: 16px; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><i>me: The period of your reign has been a golden age for Perl. It had been through a difficult period where the the community was drowning in dot-com code debt, and Perl was lagging behind other languages in stable features to address it. Over the last few years, both Perl and CPAN packages have advanced in leaps and bounds. What structure is in place to keep Perl on the same upward trajectory?</i></span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">rjbs: A big help for this is </span><a href="http://perldoc.perl.org/perlpolicy.html" style="text-decoration: none;"><span style="background-color: white; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">perlpolicy</span></a><span style="background-color: white; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">. It demands that we keep backward compatibility as much as possible. This is a huge deal for Perl 5, for a lot of reasons.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">For one, it means that we don't knowingly break things unless we believe there's a good reason — and we've been trying to tighten up "good reason" a bit over time. This means that it's almost always safe to upgrade your perl without unpleasant surprises. The "incompatible changes" section of the changelog file should be short and fairly exhaustive.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">For another thing, it means that we try very hard to get features right the first time. We don't want to deliver a half-baked feature that we later regret... only to feel unable to fix it due to backward compatibility restrictions.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">This is what led to creating the current "experimental feature" rules for adding features that might change, but then get stabilized. In theory, the idea of experimental features was around, but it wasn't well-defined or enforced. Weak references, for example, were considered experimental if you followed the documentation, but not if you asked any actual Perl programmers.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">So, largely, we try to make sure that Perl doesn't alienate existing users by breaking their existing code; and that it doesn't frustrate future users by making them wish its features had been better thought out.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; font-family: "arial"; font-size: 16px; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><i>me: So in summary, the responsibility of the pumpking is to enforce Perl policy. In practical terms, what do you actually do?</i></span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">rjbs: It's a job that will fill as much time as you let it, so I try to keep it under control. Sometimes I have to forcibly change my habits, in both directions. That is: sometimes I know I should be spending more time on the work, and other times I know I should step away from the keyboard for a day or two. </span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">The most interesting - and difficult - aspect of the work is making decisions. And this can't be delegated. For example, I know that it's important to me to read every email to perl5-porters. It helps me know who is doing what, it helps me see unexpected work getting committed, and it helps me better understand the code. Nobody else can read all this for me, I have to read it myself. Then, the product of that work isn't actually a product for anybody else. It's just a better understanding of what's going on that I can use in the rest of my work. This can be frustrating, but it's also part of what makes any given success so rewarding. I have the satisfaction of knowing that it's been made possible by careful attention to the project.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; font-family: "arial"; font-size: 16px; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><i>me: Now we’ve had a glimpse of you as the pumpking - how did you come to be a Perl developer in the first place?</i></span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">rjbs: I started using Linux (and AIX, a little) when I was in high school, so I ended up with some little problems to solve, like stitching together parts of uuencoded files, or reformatting data files. Everybody seemed to say that Perl was the tool for this, so I learned a little Perl.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Now, at the time, this meant Perl 4. Perl 5 was actually out, but the Perl that I mostly read about was 4. Also, my Linux of choice was Slackware, which stuck with Perl 4 </span><span style="background-color: white; font-family: "arial"; font-size: 16px; font-style: italic; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">forever</span><span style="background-color: white; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">. As I recall, you could install Perl 5, but it came with a big warning about how it was new and experimental, and for people who needed really advanced features like "object-oriented programming." I had seen C++, and I knew I didn't need that, so I ignored Perl 5 entirely.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">I didn't get back to it for ages. After college I was looking for work in systems administration, but ended up doing software development for a manufacturer. I wrote the first batch of programs in PHP, but I didn't enjoy the language very much beyond the thrill of rapid results. A few years earlier I'd come into possession of </span><a href="http://shop.oreilly.com/product/9780596004927.do" style="text-decoration: none;"><span style="background-color: white; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">the camel book</span></a><span style="background-color: white; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, but I hadn't yet read it. I decided to read it and try rewriting everything in Perl 5. It was a big success, and since then I've been pretty happy using Perl 5 for the majority of my work.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; font-family: "arial"; font-size: 16px; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><i>me: Who employs you as the Pumpking? Google tells me you lead the technical team at Pobox - is pumpking part of that role?</i></span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">rjbs: Working on Perl 5 is not really part of my day job. I'm sure there have been times that I skimped on an hour or two of work in order to get some Perl 5 work done. Pobox is very supportive of my work, but this isn't a "20% project" or anything like that.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">It's true that I'm the leader of the technical team at Pobox. It's probably more forthright, though, to say that I </span><span style="background-color: white; font-family: "arial"; font-size: 16px; font-style: italic; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">am</span><span style="background-color: white; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> the technical team at Pobox. For a few years now, I've been the sole full-time programmer. (We're hiring now, though!) Pobox produces a lot of Perl, and quite a lot of it is available on GitHub or the CPAN. They send me to conferences where I work on Perl 5, and they never say, "I think you've spent enough work time away from the office now, Signes." It's definitely a good arrangement for me.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">I've been working at Pobox for about 11 years now - about half of its time in operation. In November, Pobox was bought by FastMail, an Australian company with a pretty similar mindset to us. We're working closely now to benefit from each other's work, and so far that's been quite rewarding. It also lead me to spend a few weeks in Melbourne in February. In other words: leaving my Pennsylvanian winter for their Victorian summer. This was a good trade, and made better by the fact that it was great working with everyone at the Melbourne office.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; font-family: "arial"; font-size: 16px; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><i>me: What will you do when you retire?</i></span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">rjbs: I will start deleting a lot more unread mail!</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Even when I've passed the pumpkin on to someone new, I'll still have an interest in Perl. I've got a lot of code that runs in it, after all, and I'll probably keep writing more. So, I'll stick around and try to help. I hope I'll make more time to work on my existing CPAN code, which has languished a bit for the last few years. I'm also keen to write some more Rust, which I think is sure to still be around in the future.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: white; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">I will probably also buy myself a really nice bottle of rye to celebrate.</span></div>
<br />
<span style="font-family: "arial"; font-size: 16px; line-height: 1.38; white-space: pre-wrap;"><i>If you want to work for rjbs at Pobox - or be the next pumpking - drop him a line. If you just want to make him happy, buy him rye. Rittenhouse 23.</i></span>Andrew Solomonhttp://www.blogger.com/profile/00215724509745366070noreply@blogger.com2tag:blogger.com,1999:blog-6103856534279931094.post-67869325607021094522016-03-06T23:12:00.001+00:002017-10-19T00:22:27.338+01:00The Perl flip-flop operator<div class="separator" style="clear: both; text-align: left;">
Have you ever wondered where fashion and software development overlap? If so, look no further than the flip-flop. It's a feature available in Sed, Awk, Ruby and Perl which - akin to its namesake - is short, revealing and can <a href="https://books.google.co.uk/books?id=jcUbTcr5XWwC&lpg=PA110&ots=fJFntiavaC&dq=sed%20flipflop&pg=PA110#v=onepage&q=obscure%20feature%20of%20Ruby&f=false" target="_blank">raise a few eyebrows</a>.</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2m4V49FyExsF_8tcJqA2zFpjT5OxaFomukTawVHoD0xNP1Dbi95koi0hVAGY5bMeAV6Elh6SvuQlYArEKHAZQaiMHnlcKoRVM9HahpvyyDQIRktXtOwGClkdQW2CzsAP8LSaQdvSds_4/s1600/robot_gear_flip_flops.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2m4V49FyExsF_8tcJqA2zFpjT5OxaFomukTawVHoD0xNP1Dbi95koi0hVAGY5bMeAV6Elh6SvuQlYArEKHAZQaiMHnlcKoRVM9HahpvyyDQIRktXtOwGClkdQW2CzsAP8LSaQdvSds_4/s320/robot_gear_flip_flops.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Robot Gear flip-flops by <a href="http://www.cafepress.co.uk/+robot_gear_flip_flops,1003160637" target="_blank">Cafepress</a></td></tr>
</tbody></table>
<div>
<a name='more'></a><br />
You're probably familiar with the range operator '..' where this statement</div>
<div>
<br /></div>
<div>
<div style="text-align: center;">
<span style="font-family: "courier new" , "courier" , monospace;">my @foo = (3..10);</span></div>
</div>
<div>
<br /></div>
<div>
creates an array <span style="font-family: "courier new" , "courier" , monospace;">@foo</span> containing <span style="font-family: "courier new" , "courier" , monospace;">(3, 4, 5, 6, 7, 8, 9, 10)</span>. But if instead you accidentally write:</div>
<div>
<br /></div>
<div>
<div style="text-align: center;">
<span style="font-family: "courier new" , "courier" , monospace;">my $foo = (3..10);</span></div>
</div>
<div>
<br /></div>
<div>
you'll stumble on this error message:</div>
<div>
<br /></div>
<div>
<div style="text-align: center;">
<span style="font-family: "courier new" , "courier" , monospace;">Use of uninitialized value $. in range (or flip) at...</span></div>
</div>
<div>
<br /></div>
<div>
Do you wonder why the compiler worries that you're going to flip? Think again. It means you've used the flip-flop operator.</div>
<div>
<br /></div>
<div>
What's the flip-flop operator you ask? As a symbol, the flip-flop is the same as the range operator, but when used in scalar context it's a 'boolean' along the lines of 'Am I caught between these truths?'.</div>
<div>
<br /></div>
<div>
It's much easier to show by example. Consider this "flip-free" code where you want to print everything enclosed in 'f' and 'zle'.<br />
<br /></div>
<div>
<pre class="prettyprint lang-perl">my @array = qw/frizzle this fit sizzle bit/;
my $switch = 0;
foreach my $word (@array) {
if ($switch) {
say $word;
# switch off if we see the end delimiter
$switch = $word !~ m/zle/;
}
else {
$switch = $word =~ m/f/;
if ($switch) {
say $word ;
$switch = $word !~ m/zle/;
}
}
}
</pre>
</div>
<div>
<br /></div>
<div>
it has the output<br />
<br /></div>
<div>
<pre class="prettyprint"> frizzle
fit
sizzle
</pre>
</div>
<div>
<br />
Here's the equivalent code using the flip-flop operator:<br />
<br /></div>
<pre class="prettyprint">foreach (@array) {
say if (/f/../zle/);
}
</pre>
<div>
<br />
or to be more explicit:<br />
<br /></div>
<pre class="prettyprint lang-perl">foreach my $word (@array) {
say $word if ($word =~ m/f/ .. $word =~ m/zle/);
}
</pre>
<div>
<div>
<br />
Reading the "flip-free" code above, you'll see that there were three places where the switch was changed - "frizzle" (on and off), "fit" (on) and "sizzle" (off).</div>
<div>
<br /></div>
<div>
Now what if you decide that you don't want the switch flicked twice in the same match. Instead, you want the output</div>
</div>
<pre class="prettyprint">frizzle
this
fit
sizzle
</pre>
<div>
<div>
Easy - just change the two-dot flip flop to the three-dot flip-flop:</div>
<pre class="prettyprint">my @array = qw/frizzle this fit sizzle bit/;
foreach (@array) {
say if (/f/ ... /zle/);
}
</pre>
<div>
<br /></div>
<div>
Or fliplessly:</div>
</div>
<pre class="prettyprint">my @array = qw/frizzle this fit sizzle bit/;
my $switch = 0;
foreach my $word (@array) {
if ($switch) {
say $word;
$switch = $word !~ m/zle/;
}
else {
$switch = $word =~ m/f/;
say $word if $switch;
}
}
</pre>
<div>
<div>
Finally - don't imagine we can't extract a little bit more meaning out of a few silly dots. This time they are flip-flopping on line numbers:</div>
<div>
<pre class="prettyprint">while (<DATA><data>) {
print if (3..5)
}
__DATA__
One
two - buckle shoe
three
four - knock on door
five
six - pick up sticks
</data></pre>
<div>
which outputs</div>
<pre class="prettyprint">three
four - knock on door
five
</pre>
<div>
More explicitly:
<br />
<pre class="prettyprint">while (my $line = <DATA>) {
print $line if $. >= 3 && $. <= 5;
}
</pre>
<div>
where $. is the line number.</div>
<div>
<br /></div>
<div>
I'm not the first person to go dotty over dots. Now you understand how they work you'll see how experts like <a href="http://perlhacks.com/2014/01/dots-perl/" target="_blank">Dave Cross</a>, <a href="http://www.effectiveperlprogramming.com/2010/11/make-exclusive-flip-flop-operators/" target="_blank">brian d foy</a> and the <a href="http://www.perlmonks.org/?node_id=525392" target="_blank">Grandfather</a> monk of the monastery put them to good use.</div>
<div>
<br /></div>
</div>
</div>
</div>
<div>
<div>
p.s. It's <a href="https://perl6advent.wordpress.com/2011/12/05/the-flip-flop-operator/" target="_blank">a little less subtle in Perl 6</a> - but easier to read!</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
</div>
Andrew Solomonhttp://www.blogger.com/profile/00215724509745366070noreply@blogger.com4tag:blogger.com,1999:blog-6103856534279931094.post-38738201351102832572016-01-31T23:22:00.001+00:002017-10-19T00:17:21.884+01:00How To Grow a Development Team<span style="font-size: large;"><span style="font-family: "arial" , "helvetica" , sans-serif;">For the manager of a technology shop, "Hotel California" has the ideal spin on staffing. As the Eagles so bluntly put it "<i>You can check-out any time you like/But you can never leave!</i>". In modern business speak - Hotel California has zero "churn", </span><span style="font-family: "arial" , "helvetica" , sans-serif;">where </span><i style="font-family: arial, helvetica, sans-serif;">churn</i><span style="font-family: "arial" , "helvetica" , sans-serif;"> is the portion of recruits each year who are hired to replace employees who've left.</span></span><br />
<span style="font-size: large;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
</span><br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"><img src="http://www.musictech.net/wp-content/uploads/2013/04/115296408.jpg" height="400" style="margin-left: auto; margin-right: auto;" width="400" /></span></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">No Churn</span></td></tr>
</tbody></table>
<span style="font-size: large;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
</span><br />
<a name='more'></a><a href="https://www.blogger.com/blogger.g?blogID=6103856534279931094" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"></a><span style="font-size: large;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span><span style="font-family: "arial" , "helvetica" , sans-serif;">Churn is an expense - partly in the recruitment process - but mostly in it's impact on team productivity. From the on-boarding processes, to learning about the team's technologies and how the business works, these all consume the team's time - and hence reduce its productivity.</span></span><br />
<span style="font-size: large;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span><span style="font-family: "arial" , "helvetica" , sans-serif;">Let's say you're putting together a new development team, then the following chart indicates the number of people hired to get the team from 4 to 25 developers in 5 years. "Low Churn" indicates the number you need to hire each year on the assumption people stick around for 6 years on average, while "High Churn" is when they only stay for 18 months.</span></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXsi9pRWDpvFT_FmjY3OWQr9uo0WPTeVp5fL1Bv4aSc0qNpf6Q155h-Scx20KQXDtpdPW24YfewC3LmKTJLW4EDg1uBtf4ZyTsrqgSfEkVGutal1b1IwUKHxH_1FsioUYPEA36-rg101o/s1600/churn.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-size: large;"><img border="0" height="270" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXsi9pRWDpvFT_FmjY3OWQr9uo0WPTeVp5fL1Bv4aSc0qNpf6Q155h-Scx20KQXDtpdPW24YfewC3LmKTJLW4EDg1uBtf4ZyTsrqgSfEkVGutal1b1IwUKHxH_1FsioUYPEA36-rg101o/s400/churn.png" width="400" /></span></a></div>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">With these alarming numbers in mind, here are five principles for growing a team which can help keep a lid on the level of churn.</span><br />
<span style="font-size: large;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
</span><br />
<h3>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">
1. Balanced Recruitment</span></h3>
<span style="font-size: large;"><span style="font-family: "arial" , "helvetica" , sans-serif;">To start the team you either have - or recruit - experienced well rounded developers who have good communication skills, a clear understanding of the business and who are comfortable coding against fluid "specs" coming from guesswork and prediction with the goal of getting it out the door quickly. </span><span style="font-family: "arial" , "helvetica" , sans-serif;">Once the business is more mature, the direction is well defined and processes have taken form it's still great to have some experienced developers at the helm but you don't want them spending too much time on the routine tasks. They're too expensive and they'll get bored (and itchy feet).</span></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-size: large;"><br /></span></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-size: large;">Once the business is established, recruit early career developers who are learning the technologies as they go. Although they won't be as quick churning out code for the first few weeks, don't let that get in the way - the bigger impediment to new-comers is understanding the business. These early career developers are there to free-up the experienced developers so they have time to solve the hard problems and put together the big picture and direction.</span></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-size: large;"><br /></span></span>
<br />
<h3>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">
2. Continuous Learning</span></h3>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">Programming (as a skill) isn't taught at university. The concepts behind programming are taught well, but being 'fluent' in a programming language, comfortable with design patterns and fitting into processes are skills which a developer can only acquire through continuous hands-on experience. In part this learning can be achieved through <a href="https://geekuni.com/case-studies/broadbean" target="_blank">outsourced training such as ours</a> but in addition there needs to be opportunity for learning company specific technologies, as well as self directed learning and experimentation.</span><br />
<span style="font-size: large;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">One great way to achieve this is to have a regular hack-day - a day set aside where developers can work on their own ideas to get a new technological perspective on business products and processes. Hack days are principally a learning opportunity giving employees a sense of self development, but sometimes resulting in whole new directions for the company!</span></span><br />
<span style="font-size: large;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
</span><br />
<h3>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">
3. Communication</span></h3>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">If you want to give developers a sense of belonging to the company, don't just send them off with a project spec and a deadline. That's outsourcing. Ensure that the developers can communicate with the stakeholders and get a deep understanding of the business goal. Encourage them to question the specifications.</span><br />
<span style="font-size: large;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Developers also need processes such as code reviews, pair programming and presentations so that they have a shared understanding of a project's goals and paths to get there.</span></span><br />
<span style="font-size: large;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">The result of these structures is a healthy and more productive work dynamic.</span></span><br />
<span style="font-size: large;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
</span><br />
<h3>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">
4. Ownership</span></h3>
<h3>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large; font-weight: normal;"><span style="font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">Don't get me wrong - shares are good! - but in terms of p</span><span style="font-weight: normal; vertical-align: baseline; white-space: pre-wrap;">roductivity, </span><span style="vertical-align: baseline; white-space: pre-wrap;"><span style="font-weight: normal;">project ownership and responsibility is better. A d</span></span><span style="font-weight: normal; line-height: 1.2; white-space: pre-wrap;">eveloper feels a stronger</span><span style="font-weight: normal;"><span style="line-height: 1.2; white-space: pre-wrap;"> </span><span style="line-height: 1.2; white-space: pre-wrap;">sense of belonging</span></span><span style="font-weight: normal; line-height: 1.2; white-space: pre-wrap;"> when they are involved in the entire life cycle:</span></span></h3>
<ul style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial" , "helvetica" , sans-serif; font-size: large; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">requirements gathering;</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial" , "helvetica" , sans-serif; font-size: large; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">design;</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial" , "helvetica" , sans-serif; font-size: large; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">acceptance testing;</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial" , "helvetica" , sans-serif; font-size: large; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">release; and</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-style: normal; font-variant: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><span style="background-color: transparent; color: black; font-family: "arial" , "helvetica" , sans-serif; font-size: large; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">bug and feature maintenance.</span></li>
</ul>
<div>
<span style="font-family: "arial";"><span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large; white-space: pre-wrap;"><br /></span></span></div>
<div>
<span style="font-family: "arial";"><span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large; white-space: pre-wrap;">Don't go piecemeal - developers should have end to end involvement in their projects.</span></span><br />
<span style="font-family: "arial";"><span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large; white-space: pre-wrap;"><br /></span></span></div>
<h3>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">
5. Passion</span></h3>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Developers </span><span style="line-height: 1.2; white-space: pre-wrap;">are artists. They'</span><span style="line-height: 1.2; white-space: pre-wrap;">re passionate. They want their creations "</span><span style="line-height: 1.2; white-space: pre-wrap;">out there", whether as open source projects or spin-off products, a public website, a blog or a presentation. Like all humans, they want to be part of their community.</span></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-size: large; line-height: 1.2; white-space: pre-wrap;"><br /></span></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-size: large; line-height: 1.2; white-space: pre-wrap;">With these five principles your developers will find the job is really quite hard to leave, and you'll find them humming along to... </span></span></div>
<blockquote class="tr_bq">
<span style="font-size: large;"><i><span style="font-family: "arial" , "helvetica" , sans-serif; white-space: pre-wrap;">Welcome to the Hotel California</span></i> </span></blockquote>
<blockquote class="tr_bq">
<span style="font-size: large;"><i><span style="font-family: "arial" , "helvetica" , sans-serif; white-space: pre-wrap;"></span><span style="font-family: "arial" , "helvetica" , sans-serif; white-space: pre-wrap;">Such a lovely place (Such a lovely place)</span></i> </span></blockquote>
<blockquote class="tr_bq">
<span style="font-size: large;"><i><span style="font-family: "arial" , "helvetica" , sans-serif; white-space: pre-wrap;"></span><span style="font-family: "arial" , "helvetica" , sans-serif; white-space: pre-wrap;">Such a lovely face</span></i> </span></blockquote>
<blockquote class="tr_bq">
<span style="font-size: large;"><i><span style="font-family: "arial" , "helvetica" , sans-serif; white-space: pre-wrap;"></span><span style="font-family: "arial" , "helvetica" , sans-serif; white-space: pre-wrap;">Plenty of room at the Hotel California</span></i> </span></blockquote>
<blockquote class="tr_bq">
<span style="font-size: large;"><i><span style="font-family: "arial" , "helvetica" , sans-serif; white-space: pre-wrap;"></span><span style="font-family: "arial" , "helvetica" , sans-serif; white-space: pre-wrap;">Any time of year (Any time of year)</span></i> </span></blockquote>
<blockquote class="tr_bq">
<i><span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large; white-space: pre-wrap;">You can find it here</span></i></blockquote>
<div>
<br /></div>
Andrew Solomonhttp://www.blogger.com/profile/00215724509745366070noreply@blogger.com1tag:blogger.com,1999:blog-6103856534279931094.post-16842154765083930362016-01-20T00:14:00.000+00:002017-10-19T07:24:08.271+01:00Quick and Dirty: Vim highlighting and tag matching for HTML and Perl's Template Toolkit<span style="font-family: "arial" , "helvetica" , sans-serif;">If you're a Vim connoisseur you're probably using <a href="https://github.com/vim-perl/vim-perl" target="_blank">vim-perl</a> for getting all the Perl goodies you can cram into Vim. On the other hand if, like me, you're building and trashing virtual machines left, right and centre to develop different widgets you don't have the patience to achieve a perfect Vim environment on each box. This is the quick and dirty solution which gets you 80% of the solution in a matter of seconds.</span><br />
<div>
<a name='more'></a><div>
<span style="font-family: "arial" , "helvetica" , sans-serif;">For the most part Vim just works. For example, on Ubuntu if you</span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">apt-get install vim</span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;">then it comes with syntax highlighting for Perl scripts (ending in .pl), Perl modules (ending in .pm) and HTML files (ending in .html). It also comes with <a href="http://vim.wikia.com/wiki/Moving_to_matching_braces" target="_blank">brace matching</a> for the Perl code, but no <html> tag matching </html>. This is a real pain if you're trying to make sense of a large HTML file in Vim.</span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<h3>
<span style="font-family: "arial" , "helvetica" , sans-serif;">HTML tag matching</span></h3>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;">1. Find plugin/matchit.vim and copy it into your personal vim plugin directory ~/.vim/plugin (creating it if it's not already there)</span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">mkdir -p ~/.vim/plugin</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">cp `locate plugin/matchit.vim` ~/.vim/plugin</span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;">2. Add this line to your Vim config file ~/.vimrc</span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">echo filetype plugin on >> .vimrc</span></div>
</div>
<div>
<br /></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Then voilà! With Vim you can now jump between matching tags like <html> and </html> using the % key.</span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<h3>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Template Toolkit syntax highlighting and tag matching</span></h3>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Of course if you're working on a Perl Template Toolkit we're back to square one because you have HTML'ish files called something like:</span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">foo.html.tt</span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;">At this point you just need to add the following line to your ~/.vimrc file</span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace;">echo au BufRead,BufNewFile *.tt setfiletype html >> ~/.vimrc</span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;">and once again you have HTML highlighting and tag matching just like an HTML file (although the TT delimiters </span><span style="font-family: "courier new" , "courier" , monospace;">[% %]</span><span style="font-family: "arial" , "helvetica" , sans-serif;"> are still ignored by Vim).</span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Enjoy!</span></div>
<div>
<br /></div>
</div>
Andrew Solomonhttp://www.blogger.com/profile/00215724509745366070noreply@blogger.com2tag:blogger.com,1999:blog-6103856534279931094.post-60085719952728071322015-11-10T22:42:00.001+00:002017-10-19T00:15:08.279+01:00Interview: Alexis Sukrieh - Inventor of the Perl Dancer web framework<div style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<div style="line-height: 1.2;">
<span style="font-family: "arial" , "helvetica" , sans-serif; line-height: 19.2000007629395px; white-space: pre-wrap;">In this article I track down the elusive creator of Perl’s Dancer web framework, Alexis Sukrieh. He reveals how Dancer came out of his work as a Ruby CTO and gives an insight into the driving force behind Dancer’s community.</span></div>
<div style="line-height: 1.2;">
<span style="font-family: "arial" , "helvetica" , sans-serif; line-height: 19.2000007629395px; white-space: pre-wrap;"><br /></span></div>
<div class="separator" style="clear: both; line-height: 1.2; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVKAMaoVePSFKjgpE87SoDvwkFbJQP4SdLgDoxP1MfyLa8hrMRHujEjAvxiZCVDEfQRjMX2yujXgAFSyVcJzxuy48LdIBeWxsO_KSWiOc0HSdv_yVgW32gY37bJYw48rY5ns-WmEv4ULc/s1600/alexis-dancer.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVKAMaoVePSFKjgpE87SoDvwkFbJQP4SdLgDoxP1MfyLa8hrMRHujEjAvxiZCVDEfQRjMX2yujXgAFSyVcJzxuy48LdIBeWxsO_KSWiOc0HSdv_yVgW32gY37bJYw48rY5ns-WmEv4ULc/s320/alexis-dancer.jpg" width="320" /></a></div>
<div style="line-height: 1.2;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="line-height: 19.2000007629395px; white-space: pre-wrap;"><br /></span></span><span style="font-family: "arial" , "helvetica" , sans-serif; line-height: 19.2000007629395px; white-space: pre-wrap;"></span>
</div>
<a name='more'></a><div style="line-height: 1.2;">
<span style="font-family: "arial" , "helvetica" , sans-serif; line-height: 19.2000007629395px; white-space: pre-wrap;">Almost 5 years ago I discovered Perl's Dancer framework – a domain specific language for web development – and it convinced me that Perl newbies could be taught web development in Perl.</span></div>
<div style="line-height: 1.2;">
<span style="font-family: "arial" , "helvetica" , sans-serif; line-height: 19.2000007629395px; white-space: pre-wrap;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="line-height: 19.2000007629395px; white-space: pre-wrap;">All this time I’ve been in touch with Dancer's core team, but the originator – Alexis Sukrieh – was an enigma who I never found at conferences, mailing lists or even git commits. So when he cropped up as a speaker at October's Dancer conference in Vienna I pounced on the opportunity to find out more about Alexis and the motivation behind my favourite web framework.</span></span></div>
<div style="line-height: 1.2;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="line-height: 19.2000007629395px; white-space: pre-wrap;"><br /></span></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="line-height: 19.2000007629395px; white-space: pre-wrap;">A theme which kept coming up in our discussion was community. In his words</span></span></div>
<div style="line-height: 1.2;">
</div>
<blockquote class="tr_bq" style="line-height: 1.2;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="line-height: 19.2000007629395px; white-space: pre-wrap;">“Dancer is a great source of satisfaction for me, not only because it’s a successful piece of software but mostly because of the amazing community we have built around it.”</span></span></blockquote>
<div style="line-height: 1.2;">
</div>
<div style="line-height: 1.2;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="line-height: 19.2000007629395px; white-space: pre-wrap;">Dancer has a community where creativity and rule breaking can take place through the respectful exchange of ideas across cultures and programming languages. What sort of person was able to put this engine together?</span></span></div>
<div style="line-height: 1.2;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="line-height: 19.2000007629395px; white-space: pre-wrap;"><br /></span></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="line-height: 19.2000007629395px; white-space: pre-wrap;">As a college graduate, Alexis started his career as a junior Perl developer in 2000 at Weborama in Paris. By 2014 he was their CTO. Impressive as this is, it was the path which took him there which is more intriguing.</span></span></div>
<div style="line-height: 1.2;">
<br /></div>
<div style="line-height: 1.2;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="line-height: 19.2000007629395px; white-space: pre-wrap;">His first career upheaval was in 2002 when the dot-com bubble collapsed and his job at Weborama evolved into a piecemeal programming consultancy for large clients. Realising he wasn’t a good fit for that kind of work, he left on good terms to take on Perl jobs at other companies specialising over time as a Perl web developer. He was contacted again by Weborama in 2007 who proposed an interesting project - an intranet (in-house) social networking engine for companies. The project specification was that it should be developed in Ruby on Rails. Weborama’s CTO at the time believed that</span></span></div>
<div style="line-height: 1.2;">
</div>
<blockquote class="tr_bq" style="line-height: 1.2;">
<span style="font-family: "arial" , "helvetica" , sans-serif; line-height: 19.2000007629395px; white-space: pre-wrap;">“… because RoR’s learning curve is much quicker than Catalyst’s, we would be very productive with it and would be able to move from prototype to production very quickly. That was true - up to a point. However, when going into production it was a real pain to maintain a good and solid base of dependencies. We had to freeze all the gems we used in our vendor directory to gain some stability.”</span></blockquote>
<div style="line-height: 1.2;">
</div>
<div style="line-height: 1.2;">
<span style="font-family: "arial" , "helvetica" , sans-serif; line-height: 19.2000007629395px; white-space: pre-wrap;">Even so, Yoolink successfully launched and split off from Weborama as a business with Alexis as its CTO.</span></div>
<div style="line-height: 1.2;">
<span style="font-family: "arial" , "helvetica" , sans-serif; line-height: 19.2000007629395px; white-space: pre-wrap;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif; line-height: 19.2000007629395px; white-space: pre-wrap;">In 2009 with Yoolink a successful company without major technical hurdles, he took on a new project in his spare time - Dancer. Becoming R&D manager then CTO at Weborama meant he didn’t have enough spare time to manage Dancer, but by 2011 he had nurtured a team of six developers to look after it - including Sawyer X. That core team is now lead by Sawyer and has 12 developers from 10 countries spanning 4 continents.</span></div>
<div style="line-height: 1.2;">
<span style="font-family: "arial" , "helvetica" , sans-serif; line-height: 19.2000007629395px; white-space: pre-wrap;"><br /></span></div>
<h3 style="line-height: 1.2;">
<span style="font-family: "arial" , "helvetica" , sans-serif; line-height: 19.2000007629395px; white-space: pre-wrap;">Creativity</span></h3>
<div style="line-height: 1.2;">
<span style="font-family: "arial" , "helvetica" , sans-serif; line-height: 19.2000007629395px; white-space: pre-wrap;"><br /></span></div>
<div style="line-height: 1.2;">
<span style="font-family: "arial" , "helvetica" , sans-serif; line-height: 19.2000007629395px; white-space: pre-wrap;">To have a community, there needs to be common ground - in this case it’s a shared world view of what makes a good web framework. How did Alexis acquire the skill to create something so popular? I asked him what spawned his interest in writing code.</span></div>
<div style="line-height: 1.2;">
</div>
<blockquote class="tr_bq" style="line-height: 1.2;">
<span style="font-family: "arial" , "helvetica" , sans-serif; line-height: 19.2000007629395px; white-space: pre-wrap;">“When I got my first computer, an ‘Atari ST’ when I was 13 or 14, I spent many hours trying to copy BASIC programs I found in magazines. I didn’t understand what I was doing at that time but for me, writing software was the creation of something magical.”</span></blockquote>
<div style="line-height: 1.2;">
</div>
<div style="line-height: 1.2;">
<span style="font-family: "arial" , "helvetica" , sans-serif; line-height: 19.2000007629395px; white-space: pre-wrap;">After studying programming at school and college, with a clearer view of how it</span></div>
<div style="line-height: 1.2;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="line-height: 19.2000007629395px; white-space: pre-wrap;">works:</span></span></div>
<div style="line-height: 1.2;">
</div>
<blockquote class="tr_bq" style="line-height: 1.2;">
<span style="font-family: "arial" , "helvetica" , sans-serif; line-height: 19.2000007629395px; white-space: pre-wrap;">“It’s a way to build something without matter, out of the blue. It’s the closest thing to the concept of God. Don’t take me the wrong way - I’m not speaking about religion here. I’m speaking about the concept of an entity able to create things with nothing but words.”</span></blockquote>
<div style="line-height: 1.2;">
<span style="font-family: "arial" , "helvetica" , sans-serif; line-height: 19.2000007629395px; white-space: pre-wrap;">Alexis then expands this into his view on life:</span></div>
<div style="line-height: 1.2;">
</div>
<blockquote class="tr_bq" style="line-height: 1.2;">
<span style="font-family: "arial" , "helvetica" , sans-serif; line-height: 19.2000007629395px; white-space: pre-wrap;">“When life sets you a challenge, it is through this struggle that you grow as a person. Without problems to solve, one would die a desperate bore. Our brains have to remain engaged and creative for us to be happy in our life.”</span></blockquote>
<div style="line-height: 1.2;">
</div>
<div style="line-height: 1.2;">
<span style="font-family: "arial" , "helvetica" , sans-serif; line-height: 19.2000007629395px; white-space: pre-wrap;">But back to my question which set all this off, how did this worldview morph into the design of Dancer? His explanation was accompanied by this quote</span></div>
<div style="line-height: 1.2;">
<span style="font-family: "arial" , "helvetica" , sans-serif; line-height: 19.2000007629395px; white-space: pre-wrap;"><br /></span>
</div>
<div class="separator" style="clear: both; line-height: 1.2; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZt2w_bWztruGBoE6Tkg6yWEGveiKQ17F8vqtQW_NzTH5Pf-4XQjqVCbIhuyj3m0hlDPa1HQBXxEU3QAz9y7DnwduH88RKpapn45DsjF_xeQChuCWKLxS6gmv_eFW3cRGix7dS4QVFAy8/s1600/without-deviations-from-the-norm-progress-is-not-possible.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZt2w_bWztruGBoE6Tkg6yWEGveiKQ17F8vqtQW_NzTH5Pf-4XQjqVCbIhuyj3m0hlDPa1HQBXxEU3QAz9y7DnwduH88RKpapn45DsjF_xeQChuCWKLxS6gmv_eFW3cRGix7dS4QVFAy8/s320/without-deviations-from-the-norm-progress-is-not-possible.jpg" width="318" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="line-height: 19.2000007629395px;"><span style="font-size: xx-small;">http://www.quotesvalley.com/without-deviations-from-the-norm-progress-is-not-possible/</span></span></div>
<blockquote class="tr_bq" style="line-height: 1.2;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="line-height: 19.2000007629395px; white-space: pre-wrap;">“When I first saw Sinatra, I was amazed by the clarity it gave about web programming concepts. The concept was so simple, so clear, so ... obvious it didn’t need a long explanation. And that’s exactly the kind of software I like. It was like throwing a stone in a window and saying: ‘Hey, we’re gonna do it this way, and it will rock.’"</span></span></blockquote>
<div style="line-height: 1.2;">
<span style="font-family: "arial" , "helvetica" , sans-serif; line-height: 19.2000007629395px; white-space: pre-wrap;">You may wonder about the rock and window metaphor in the case of Perl:</span></div>
<div style="line-height: 1.2;">
</div>
<blockquote class="tr_bq" style="line-height: 1.2;">
<span style="font-family: "arial" , "helvetica" , sans-serif; line-height: 19.2000007629395px; white-space: pre-wrap;">“I did my best to drop the $self in Dancer's API. That shocked many Perl developers, and I even got insulted for that (I'm always amazed by how strong the feelings can be about code!). But I dropped the $self, because I wanted a syntax as clear as possible for the end user, and I'm sure my time working with Ruby can take some of the credit for that.”</span></blockquote>
<div style="line-height: 1.2;">
</div>
<div style="line-height: 1.2;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="line-height: 19.2000007629395px; white-space: pre-wrap;">Overthrowing a cultural norm can be fun, but respect for the users of Dancer was paramount. The Dancer team has supported a slow and careful migration from Dancer to Dancer2 with both versions being supported and maintained.</span></span></div>
<div style="line-height: 1.2;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="line-height: 19.2000007629395px; white-space: pre-wrap;"><br /></span></span></div>
<h3 style="line-height: 1.2;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="line-height: 19.2000007629395px; white-space: pre-wrap;">Finale?</span></span></h3>
<div style="line-height: 1.2;">
<span style="font-family: "arial" , "helvetica" , sans-serif; line-height: 19.2000007629395px; white-space: pre-wrap;"><br /></span></div>
<div style="line-height: 1.2;">
<span style="font-family: "arial" , "helvetica" , sans-serif; line-height: 19.2000007629395px; white-space: pre-wrap;">In the end I just had to ask. After all these years, why had Alexis turned up at a Dancer conference?</span></div>
<div style="line-height: 1.2;">
</div>
<blockquote class="tr_bq" style="line-height: 1.2;">
<span style="font-family: "arial" , "helvetica" , sans-serif; line-height: 19.2000007629395px; white-space: pre-wrap;">“Yeah. Cycles. It’s all about cycles. In Arabic - my father is from Syria - we say 'Mektoub' to mean 'what needs to happen happens'.”</span></blockquote>
<div style="line-height: 1.2;">
<span style="font-family: "arial" , "helvetica" , sans-serif; line-height: 19.2000007629395px; white-space: pre-wrap;">It turns out that it was just another seed - this time sewn by Sawyer X after Alexis invited him as keynote speaker to Weborama’s biannual tech-day conference. Over lunch while updating him on the progress of Dancer Sawyer blurted out “Man, there’s the Perl Dancer conference next month, you have to come!”</span></div>
<div style="line-height: 1.2;">
</div>
<blockquote class="tr_bq">
<span style="font-family: "arial" , "helvetica" , sans-serif; line-height: 19.2000007629395px; white-space: pre-wrap;">“I really appreciated Sawyer's gesture that day. It meant to me ‘you’re not here in the code anymore, but you still count, we’d like to have you, you’re still part of the community.’"</span></blockquote>
<br />
<div style="line-height: 1.2;">
<span style="font-family: "arial" , "helvetica" , sans-serif; line-height: 19.2000007629395px; white-space: pre-wrap;">His talk “Perl Dancer, a Brief History of Code” was well received and subsequently on a panel forum of the core Dancer developers, the question came up of whether there would be a Perl Dancer book. Many on the panel (including Alexis) had commenced writing a book, and at this point realised that if they joined forces it might actually happen. As such, there is now a Kickstarter campaign to cover some the editorial and printing costs <a href="https://www.kickstarter.com/projects/1856511822/perldancer-book">https://www.kickstarter.com/projects/1856511822/perldancer-book</a></span></div>
<div style="line-height: 1.2;">
<span style="font-family: "arial" , "helvetica" , sans-serif; line-height: 19.2000007629395px; white-space: pre-wrap;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif; line-height: 19.2000007629395px; white-space: pre-wrap;">If this book gets off the ground it will indeed be another virtuous cycle in Perl Dancer’s dance.</span></div>
</div>
Andrew Solomonhttp://www.blogger.com/profile/00215724509745366070noreply@blogger.com0tag:blogger.com,1999:blog-6103856534279931094.post-74622596715454783672015-10-17T10:47:00.001+01:002017-10-19T07:35:07.530+01:00Interview: George Karpodinis - Perl search engine engineer at AdzunaOver the coming months Geekuni will be interviewing talented Perl developers who are working on interesting projects at exciting companies. We kick off the series here with George Karpodinis, lead developer at <a href="https://www.adzuna.co.uk/" target="_blank">Adzuna</a>, to learn how Perl fits into the high-tech start-up world.<br />
<br />
<a name='more'></a><br />
<h3>
A little background</h3>
Adzuna (founded 2011) is a crowd-funded job search engine operating in 11 countries with its headquarters in London, UK. It's also a Perl shop.<br />
<br />
On its home page Adzuna boasts: 'Every job. Everywhere.' There is no mistaking the main feature of the website: the search engine which brings together millions of jobs from thousands of websites.<br />
<br />
There are lots of other interesting things going on too. Just one example is the 'Value my CV' feature which is in public beta. Over 50,000 CVs were analysed and, from these, algorithms have been developed to model patterns in the data. When people upload their CV, text-mining is used to extract the relevant information from the document, the algorithms are run and the user receives an estimate of their market value. It's surprisingly accurate.<br />
<br />
The interview...<br />
<br />
<br />
<h3>
</h3>
<h4>
What's Perl used for at Adzuna?</h4>
In pretty much everything! The web framework, persistence, search, queuing, networking, etc.<br />
<br />
<span style="font-family: "trebuchet ms" , sans-serif;"><span style="white-space: pre-wrap;"></span></span><span style="font-family: "trebuchet ms" , sans-serif; white-space: pre-wrap;"></span>
<br />
<h4>
Why was Perl chosen - what were the alternatives?</h4>
Adzuna's main functionality revolves around collection, filtering and retrieval of textual data. The data arrives from a huge array of sources, in many languages and character-sets and in many different forms.<br />
<br />
We needed to build an engine that would perform extremely well when handling such data. Perl has been the de-facto tool for text manipulation for a long time. It is a mature language that supported all of the features we had in mind in the beginning of the project.<br />
<br />
Furthermore, despite its age, it has a very active community and it actively adds support for new features and tools, via its module system. It is still an excellent tool for prototyping ideas, system administration and networking, all core to the needs of our business.<br />
<br />
Eventually, we decided that it would be best and easiest to carefully build something tailored to the vision we had in mind, rather than trying to mould a generic tool to fit our needs.<br />
<br />
Also, we had good ties with the Perl developer community, so finding expertise and coming up with a good prototype and then alpha, was quite painless for us.<br />
<br />
<br />
<h4>
Can you tell us about the roles at Adzuna and the Perl roles in particular - how do they all fit together?</h4>
We have a small but experienced team of Perl aficionados working on an informally agile basis, running all aspects of our site from devops to search, big data analysis and new features. By keeping the team tight, we can do a lot relatively quickly but still make it scale (11 countries, millions of users, tens of millions of searches, data points analysed and emails sent per month).<br />
<br />
We're not yet big enough to formally break our dev team up into sub-teams, so everyone gets the chance to work on most aspects of the code, but people do also develop areas of expertise led by their interests and experience, as well as interacting with our front-end guys, data scientists and head of product. We are currently looking to add one or two Perl developers who can help grow our capability and contribute their own experience while fitting in to our general ethos.<br />
<br />
<br />
<h4>
Does Adzuna plan on continuing to use Perl in the future?</h4>
Yes. We do not face any problems, even at our current scale, that we can attribute to Perl.<br />
<br />
Having said that, Perl is no longer the only language that we use at
Adzuna. We have components written in R, Ruby and C too. And since the
backbone of our operations is distributed and modular, we have no
difficulty writing components in other languages or using existing ones,
if they are better-suited for a particular task.<br />
<br />
<br />
<h4>
What changes have you seen in Perl over the past few years?</h4>
From our operational point of view, Perl has been pretty stable, in the sense that we have not yet had the need to use newer frameworks, like Dancer. But that does not mean that it has been stale. Frameworks and libraries like Moose, DBIx and Test are continuously improving and still maturing. <br />
<br />
But the biggest benefit for us has been the speed at which support is added for newer services and tools, like EC2, APNS etc. It is certainly a testament to the footprint of Perl and the faith of the developers in Perl as a tool, that support for new tools arrives as early as in any newer language.<br />
<br />
<br />
Adzuna currently have a <a href="http://www.adzuna.co.uk/jobs/company/adzuna" target="_blank">job vacancy for a senior Perl developer, based in London, UK</a>.<br />
<br />
<br />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6103856534279931094.post-19693352441568233262015-09-30T21:44:00.000+01:002017-10-19T00:20:00.086+01:00Language popularity surveyIn a survey that was performed earlier this year we asked users to complete two statements: "I spend most time writing..." and "I would like to write more...".<br />
<br />
<h3>
About The Survey</h3>
<div>
Note that we didn't limit people's choices to just languages, we included some popular frameworks (e.g. Bootstrap), libraries (jQuery) and runtime environments (Node.js). We also included different versions of the same language where the user base may be significantly different for each version (e.g. Perl 6, Python 3).</div>
<div>
<br /></div>
<div>
Just under 600 people completed the survey - a good sample size. It is worth noting that the sample is not a broad representation of all developers; at Geekuni we focus on all things Perl and the sample reflects this with Perl 5 being by far the most popular language for 'I spend most time writing... '. Also, a high proportion of respondents spent time writing three or more languages which shows a high level programming experience. The age range of those in the sample was wide, with participants ranging from under 18 to 64 years old - the most common age ranges were 25-34, 35-44 and 44-54.<br />
<br />
If you would like to view the raw data from the survey you can see it <a href="https://geekuni.com/data/softg/2015.csv" target="_blank">here</a>.</div>
<div>
<br /></div>
<div>
See results and a brief analysis below:<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi60AlUTCOsyoFNTeKtdOFvJutW4zgmVJdw2-SXn5tjSG3rkGfmVsmwqBwc1lHUkqwRJ4WRhWJ4p3nxUbsSFJMaXBkAex1fVVVOTbQ-Gdi-KFnG7fdV9oiQvE7cUOEGXtY-RLDJmaUpRg/s1600/survey-results.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi60AlUTCOsyoFNTeKtdOFvJutW4zgmVJdw2-SXn5tjSG3rkGfmVsmwqBwc1lHUkqwRJ4WRhWJ4p3nxUbsSFJMaXBkAex1fVVVOTbQ-Gdi-KFnG7fdV9oiQvE7cUOEGXtY-RLDJmaUpRg/s1600/survey-results.png" /></a></div>
<h3>
Brief Analysis</h3>
<div>
The most popular languages in use among the participants are Perl 5, JavaScript and Python. jQuery, PHP, Java, C and C++ are also widely used.</div>
<div>
<br /></div>
<div>
The same languages also proved popular as an answer to 'I would like to write more... ', with the notable exception of PHP - it seems that although PHP is widely used it isn't a language that many people want to write more with.</div>
<div>
<br /></div>
<div>
There were also a few languages that have a small user base among repsondents at present but are high on the list of languages that developers desire to work with: Perl 6, Go, Haskell, Node.js, Ruby and Python 3.</div>
<div>
<br /></div>
<h3>
Language Growth Rate</h3>
<div>
We predicted the annual increase in usage of each language among survey participants by using the following equation:<br />
<br />
<span dir="auto" style="background-color: white; font-family: "inconsolata" , monospace , "arial" , "sans" , sans-serif; font-size: 14px; line-height: 13px; white-space: pre-wrap;">R = (</span><span dir="auto" style="background-color: white; color: #f7981d; font-family: "inconsolata" , monospace , "arial" , "sans" , sans-serif; font-size: 14px; line-height: 13px; white-space: pre-wrap;">D</span><span dir="auto" style="background-color: white; font-family: "inconsolata" , monospace , "arial" , "sans" , sans-serif; font-size: 14px; line-height: 13px; white-space: pre-wrap;">*</span><span dir="auto" style="background-color: white; font-family: "inconsolata" , monospace , "arial" , "sans" , sans-serif; font-size: 14px; line-height: 13px; white-space: pre-wrap;"><span style="color: #674ea7;">q</span></span><span dir="auto" style="background-color: white; font-family: "inconsolata" , monospace , "arial" , "sans" , sans-serif; font-size: 14px; line-height: 13px; white-space: pre-wrap;"> </span><span dir="auto" style="background-color: white; font-family: "inconsolata" , monospace , "arial" , "sans" , sans-serif; font-size: 14px; line-height: 13px; white-space: pre-wrap;">+</span><span dir="auto" style="background-color: white; font-family: "inconsolata" , monospace , "arial" , "sans" , sans-serif; font-size: 14px; line-height: 13px; white-space: pre-wrap;"> </span><span dir="auto" style="background-color: white; font-family: "inconsolata" , monospace , "arial" , "sans" , sans-serif; font-size: 14px; line-height: 13px; white-space: pre-wrap;"><span style="color: #3d85c6;">S</span><span style="color: #11a9cc;">*</span><span style="color: #741b47;">p</span></span><span dir="auto" style="background-color: white; font-family: "inconsolata" , monospace , "arial" , "sans" , sans-serif; font-size: 14px; line-height: 13px; white-space: pre-wrap;"> </span><span dir="auto" style="background-color: white; font-family: "inconsolata" , monospace , "arial" , "sans" , sans-serif; font-size: 14px; line-height: 13px; white-space: pre-wrap;">- <span style="color: #741b47;">p</span></span><span dir="auto" style="background-color: white; font-family: "inconsolata" , monospace , "arial" , "sans" , sans-serif; font-size: 14px; line-height: 13px; white-space: pre-wrap;">)</span><span dir="auto" style="background-color: white; font-family: "inconsolata" , monospace , "arial" , "sans" , sans-serif; font-size: 14px; line-height: 13px; white-space: pre-wrap;">/</span><span dir="auto" style="background-color: white; font-family: "inconsolata" , monospace , "arial" , "sans" , sans-serif; font-size: 14px; line-height: 13px; white-space: pre-wrap;"><span style="color: #741b47;">p</span></span><br />
<span dir="auto" style="background-color: white; font-family: "inconsolata" , monospace , "arial" , "sans" , sans-serif; font-size: 14px; line-height: 13px; white-space: pre-wrap;"><span style="color: #741b47;"><br /></span></span>
<span dir="auto" style="background-color: white; font-family: "inconsolata" , monospace , "arial" , "sans" , sans-serif; font-size: 14px; line-height: 13px; white-space: pre-wrap;"><br /></span>
<span dir="auto" style="background-color: white; font-family: "inconsolata" , monospace , "arial" , "sans" , sans-serif; font-size: 14px; line-height: 13px; white-space: pre-wrap;">where:</span><br />
<span dir="auto" style="background-color: white; font-family: "inconsolata" , monospace , "arial" , "sans" , sans-serif; font-size: 14px; line-height: 13px; white-space: pre-wrap;"><span style="color: #741b47;"><br /></span></span>
<span dir="auto" style="background-color: white; font-family: "inconsolata" , monospace , "arial" , "sans" , sans-serif; font-size: 14px; line-height: 13px; white-space: pre-wrap;">R = annual growth rate</span><br />
<span dir="auto" style="background-color: white; font-family: "inconsolata" , monospace , "arial" , "sans" , sans-serif; font-size: 14px; line-height: 13px; white-space: pre-wrap;"><br /></span>
<span dir="auto" style="background-color: white; font-family: "inconsolata" , monospace , "arial" , "sans" , sans-serif; font-size: 14px; line-height: 13px; white-space: pre-wrap;"><span style="color: #741b47;">p</span> = number of present users</span><br />
<span dir="auto" style="background-color: white; font-family: "inconsolata" , monospace , "arial" , "sans" , sans-serif; font-size: 14px; line-height: 13px; white-space: pre-wrap;"><br /></span>
<span dir="auto" style="background-color: white; font-family: "inconsolata" , monospace , "arial" , "sans" , sans-serif; font-size: 14px; line-height: 13px; white-space: pre-wrap;"><span style="color: #674ea7;">q</span> = number of people who say they want to use it</span><br />
<span dir="auto" style="background-color: white; font-family: "inconsolata" , monospace , "arial" , "sans" , sans-serif; font-size: 14px; line-height: 13px; white-space: pre-wrap;"><br /></span>
<span dir="auto" style="background-color: white; font-family: "inconsolata" , monospace , "arial" , "sans" , sans-serif; font-size: 14px; line-height: 13px; white-space: pre-wrap;"><span style="color: orange;">D</span> = the determination people have to embark on learning a langauage within 1 year (this was set to 0.1)</span><br />
<span dir="auto" style="background-color: white; font-family: "inconsolata" , monospace , "arial" , "sans" , sans-serif; font-size: 14px; line-height: 13px; white-space: pre-wrap;"><br /></span>
<span dir="auto" style="background-color: white; font-family: "inconsolata" , monospace , "arial" , "sans" , sans-serif; font-size: 14px; line-height: 13px; white-space: pre-wrap;"><span style="color: #3d85c6;">S</span> = the stickiness of a language already being used (this was set to 0.95)</span><br />
<span dir="auto" style="background-color: white; font-family: "inconsolata" , monospace , "arial" , "sans" , sans-serif; font-size: 14px; line-height: 13px; white-space: pre-wrap;"><br /></span>
<br />
Here are the results:<br />
<br /></div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCZ-vfzuicnaeB-LsXK7gk7a3Be_5guEKX2e-dz57mg6t_uvKOsbfmGBkark_n8eWh_PZdcx_9Uw08b61rLsMjJEC4eC5qHp2qQ8ErYfLfLrRGTFy8lUsneN_r-EbcOCSqmcZQc0V7Ew/s1600/growth_rate.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCZ-vfzuicnaeB-LsXK7gk7a3Be_5guEKX2e-dz57mg6t_uvKOsbfmGBkark_n8eWh_PZdcx_9Uw08b61rLsMjJEC4eC5qHp2qQ8ErYfLfLrRGTFy8lUsneN_r-EbcOCSqmcZQc0V7Ew/s1600/growth_rate.png" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div>
The languages with highest predicted growth rates among the survey are: F#, D, Perl 6 and Haskell.<br />
<br />
There are also languages with negative growth rates that we expect to have reduced usage over time: Visual Basic .NET, PHP, Fortran and ABAP.<br />
<br />
<h3>
Predicted Language Use</h3>
Many of the languages with high predicted growth rates have small a user base at present - so will this translate to lots of users in the future? We made use of the compound interest formula to predict the number of users in 5 years.<br />
<br />
Here are the results:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsh4rZ5YR_EHueuohZOkseBFy5LuEcQChuiDUPBm7oUYKU2yc41FhATRRHBrHO3eZqI7esIxRH53J8ovFiW7CKMVjKqhER4DJ6d2fjhnh6UWru-KnTCeYHAEsE2yjToJMQHNxtmtQbmQ/s1600/predicted_use.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsh4rZ5YR_EHueuohZOkseBFy5LuEcQChuiDUPBm7oUYKU2yc41FhATRRHBrHO3eZqI7esIxRH53J8ovFiW7CKMVjKqhER4DJ6d2fjhnh6UWru-KnTCeYHAEsE2yjToJMQHNxtmtQbmQ/s1600/predicted_use.png" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
</div>
<div>
Thanks to everyone who completed the survey - we'll be running this survey annually and we'd really appreciate your opinion so that we can make the survey sample a representation of all developers. If you'd like to take part next year please <a href="https://geekuni.com/" rel="nofollow" target="_blank">sign up for the Geekuni newsletter</a>.</div>
<div>
<br /></div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6103856534279931094.post-2107078977050292732015-08-26T11:14:00.000+01:002017-10-19T07:28:58.378+01:00Using Socratic Inquiry for Learning to Code<div class="western" style="margin-bottom: 0.35cm;">
<span style="line-height: 18.3999996185303px;">In a previous post we discussed how experiential learning can be used to teach programming. In this post we’ll cover another effective method for teaching and learning coding: Socratic Inquiry.</span></div>
<h3 style="margin-bottom: 0.35cm;">
<span style="line-height: 18.3999996185303px;">What is Socratic Inquiry?</span></h3>
<div class="western" style="margin-bottom: 0.35cm;">
<span style="line-height: 18.3999996185303px;">Socratic Inquiry, also referred to as Socratic Method, Socratic Questioning and Socratic Debate, is a method of asking leading questions which are chosen to test logic and to stimulate critical thinking. Ultimately, the aim is to increase understanding and illuminate ideas through asking carefully designed questions. </span></div>
<div class="western" style="margin-bottom: 0.35cm;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpKFo5II5DDy5DLbXvHqTloWB3lzVG93V_HTc6vpYTyqZpaKxYGZZKHMVQSbHXE9UDAk0yMOD7eNVC4H-_bnI35_rv3ILQA-A19ziP3RPg2AZAszWTLEkoj2WWeGuMZoCx5GtI6bESeg/s1600/Depositphotos_73056127_s-2015.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpKFo5II5DDy5DLbXvHqTloWB3lzVG93V_HTc6vpYTyqZpaKxYGZZKHMVQSbHXE9UDAk0yMOD7eNVC4H-_bnI35_rv3ILQA-A19ziP3RPg2AZAszWTLEkoj2WWeGuMZoCx5GtI6bESeg/s320/Depositphotos_73056127_s-2015.jpg" width="320" /></a></div>
<span style="line-height: 18.3999996185303px;"><span id="goog_1508564067"></span><span id="goog_1508564068"></span><br /></span></div>
<h3 style="margin-bottom: 0.35cm;">
<span style="line-height: 18.3999996185303px;">Where did it come from?</span></h3>
<div class="western" style="margin-bottom: 0.35cm;">
<span style="line-height: 18.3999996185303px;">As you would expect from the name, the idea was developed by Socrates in 5th century (BC) Greece. At the time Sophist philosophy was popular and Sophists used dialogue to persuade their audience that their opinions were correct. Socrates turned their method of rhetoric on its head by using questions to expose flaws in their assumptions and arguments – he famously limited himself to only asking questions. In doing so, he forced people to critically examine their own ideas and in effect become their own teachers.</span></div>
<h3 style="margin-bottom: 0.35cm;">
<span style="line-height: 18.3999996185303px;">Modern Uses of Socratic Questioning</span></h3>
<div class="western" style="margin-bottom: 0.35cm;">
<span style="line-height: 18.3999996185303px;">Socratic Method is used widely in modern day education – when leading questions are used to highlight flaws in arguments, test logic, challenge accepted facts or refute hypotheses it is an example of Socratic Method in action.</span></div>
<div class="western" style="margin-bottom: 0.35cm;">
<span style="line-height: 18.3999996185303px;">Of particular note is Law Education where Socratic Inquiry is used extensively. Teachers can ask a student to form an opinion about a case and question them about it, forcing the student to defend their viewpoint or change their opinion as a result of their own answers to these questions. By going through this process students gain an understanding of the logic behind legal principles.</span></div>
<div class="western" style="margin-bottom: 0.35cm;">
<span style="line-height: 18.3999996185303px;">This leads us to an important difference between classic and modern use of Socratic Method. Most modern uses of Socratic Inquiry are designed to guide a student to understanding through a series of little steps. The knowledge obtained by the student is foreseen by the teacher and their questions are chosen to guide the student to achieve some specific knowledge or understanding.</span></div>
<div class="western" style="margin-bottom: 0.35cm;">
<span style="line-height: 18.3999996185303px;">In comparison, most classic uses of the Socratic Method were open ended, without specific goals or outcomes in mind. Socratic Inquiry was used to try to come to new understanding, as opposed to leading the person being questioned to a pre-defined outcome.</span></div>
<h3 style="margin-bottom: 0.35cm;">
<span style="line-height: 18.3999996185303px;">Socratic Inquiry for Learning To Code</span></h3>
<div class="western" style="margin-bottom: 0.35cm;">
<span style="line-height: 18.3999996185303px;">Socratic Method is well suited to learning to program because code is based on pure logic and Socratic Inquiry is an excellent way to test logic.</span></div>
<div class="western" style="margin-bottom: 0.35cm;">
<span style="line-height: 18.3999996185303px;">At Geekuni, the Socratic Questions come in the form of tasks which lead students to examine why they use code in a certain way and to critically examine their use of code. Doing so creates a thorough understanding which is far beyond that gained from watching a video tutorial or listening to a lecture.</span></div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6103856534279931094.post-43958997758983954552015-08-16T10:42:00.000+01:002017-10-19T00:04:40.196+01:00Find your place in the Perl communityI’m putting together a <a href="http://act.yapc.eu/ye2015/panelpage.html" target="_blank">panel at YAPC::EU</a> to brainstorm ideas for ways to expand the Perl community. But this question kept going around in my head:<br />
<br />
<div style="text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHd5dIayOkHVb3ZpI_UU5mbt1fBJ5nNvoOocTJNUqX4yRUxIfFVIHm87OMvCGUMKsnrRZh1Z-uVrXdZv1xos9at6HhoAJ1T6NC4cUT8kgG3skabS2I1gUQcfWG2CRY8SH_yw3gkrQBEhI/s1600/community.jpg"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHd5dIayOkHVb3ZpI_UU5mbt1fBJ5nNvoOocTJNUqX4yRUxIfFVIHm87OMvCGUMKsnrRZh1Z-uVrXdZv1xos9at6HhoAJ1T6NC4cUT8kgG3skabS2I1gUQcfWG2CRY8SH_yw3gkrQBEhI/s320/community.jpg" /></a></div>
<br />
<i>What is</i> the Perl community?<br />
<a name='more'></a><br />
With my notepad at hand I came up with this list of roles I could think of in the Perl community<br />
<ul>
<li>C developers who implement Perl</li>
<li>Groups and individuals who contribute to CPAN</li>
<li>CPAN testers</li>
<li>IDE developers<sup>†</sup></li>
<li>Companies and individuals who donate</li>
<li>Companies who start new products and services promoting Perl</li>
<li>Recruiters who focus on Perl jobs</li>
<li>Organizers of Perl events</li>
<li>Media (including bloggers) focussed on Perl<sup>†</sup></li>
<li>Trainers who teach Perl</li>
</ul>
<div>
… and of course, Perl developers.<br />
<br />
That describes many of the people in the community and yet, it still doesn't say what the community actually <i>is</i>. By happy coincidence on the tube to work the other day I was reading a book on Psychotherapy and Existentialism and it was defining community as the<i> opposite of conformity and anonymity of the masses.</i><br />
<blockquote class="tr_bq" style="text-align: justify;">
<span style="font-family: inherit; font-size: large;"><i>"A community needs personalities in order to be a real community and a personality again needs a community as a sphere of activity."</i></span></blockquote>
<blockquote class="tr_bq" style="text-align: justify;">
Viktor E. Frankl, ‘Collective Neuroses of the Present Day’, Lecture held at Princeton University, 17 September 1957.</blockquote>
Thinking about personality, adjectives like ‘collaborative’, ‘competitive’, ‘creative’, ‘passionate’, and ‘sharing’ came to mind as a description of people approaching common interests from different angles. Now from what I can tell - that all goes on like a house party, but I can’t remember - did anyone invite the neighbours?</div>
<div>
<br />
Reach out and invite others into our community. As you can see from the list above - they don’t need to be writing code. Just invite them to participate in events, collaborate and bring their own expertise to projects. By the same token we should participate more in the wider circles to which we belong and that will draw people back into the Perl community.<br />
<br />
† These are the roles the author didn't think of himself.</div>
Andrew Solomonhttp://www.blogger.com/profile/00215724509745366070noreply@blogger.com5tag:blogger.com,1999:blog-6103856534279931094.post-40452086124823865622015-08-07T10:00:00.002+01:002017-10-18T23:51:20.534+01:00Accelerate Perl training online - introductory video - Geekuni<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/z9yeV2qVgrY/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/z9yeV2qVgrY?feature=player_embedded" width="320"></iframe></div>
<br />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6103856534279931094.post-49351473380018175622015-07-08T09:33:00.000+01:002018-02-11T12:25:20.627+00:00Does Certification Matter For Programmers?Certification is a contentious subject – not just for Perl users but for developers in general. Here we ask the question: ‘does certification matter for programmers?’<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitYlM1kQUhUGfbpVZLhSipkUvhUqPo6ulO0TklQu6nQJeu5NLRIYZ2dr23skbp0gG8bkUDk0gcOk749G1qdLP1dKKU6hJFdQVljY-Cdrs0IoCTzu-f742pHGtDlCgHcgxG1PQTecSryg/s1600/Depositphotos_13166630_s-2015.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="212" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitYlM1kQUhUGfbpVZLhSipkUvhUqPo6ulO0TklQu6nQJeu5NLRIYZ2dr23skbp0gG8bkUDk0gcOk749G1qdLP1dKKU6hJFdQVljY-Cdrs0IoCTzu-f742pHGtDlCgHcgxG1PQTecSryg/s320/Depositphotos_13166630_s-2015.jpg" width="320" /></a></div>
<br />
<h3>
Spectrum of Opinion</h3>
<div>
<div>
We’ve heard a full spectrum of views on the subject of certification: there are some who are firmly opposed to certification who argue that certificates are of no value or that <i>“certificates mean that you can pass a certification test, not solve real world problems”</i>. Often experienced coders without certification themselves, they believe that the only way to show competence is either through displaying relevant experience in the form of a high-quality portfolio or by a hands-on demonstration of their ability to code to anyone who wants to see.</div>
<div>
<br /></div>
<div>
There are others who consider that certification is a valid method that can be used to demonstrate a level of competence. The consensus here is that certification is particularly useful for early-stage developers new to a career in programming but that it can also be advantageous for experienced developers who are starting out with a new language – a portfolio of projects in other languages can demonstrate a person’s general ability to code while a certificate in their newly learned language shows specific competence in that particular language.</div>
<div>
<br /></div>
<div>
It’s interesting to hear the opinions of managers who hire programmers too – these range from <i>“I have hired programmers with certifications and they were completely useless in the real world”</i> to <i>“having certification can show a defined level of competence and has the potential to make my job easier – as long as the certification process is thorough and not just a box ticking exercise”</i>.</div>
</div>
<div>
<br /></div>
<div>
<br /></div>
<h3>
A Point of Agreement</h3>
<div>
One point that receives general agreement across the board is that certification shouldn’t become compulsory. In many walks of life certification is compulsory: if you are unfortunate enough to require heart surgery you expect the surgeon performing the operation to be a qualified doctor and everyone driving a car on public roads should have a licence... but programming is different. Programming is relatively new, has evolved incredibly quickly and there are many different ways that people gather the skills to become a competent developer. A one-size-fits-all method of certification across such a complex and quickly evolving workplace would be destined to fail.</div>
<div>
<br /></div>
<div>
<br /></div>
<h3>
Demand for Certification</h3>
<div>
<div>
Despite the controversy surrounding certification there is considerable demand for it – both from students who would want acknowledgement of the skills that they have achieved during a course and from industry managers who use certification for information when choosing programmers to hire.</div>
<div>
<br /></div>
<div>
However, there have also been criticisms of the process of many of the certification enterprises, in particular that students can learn to pass a certification without really learning to code. Managers want to know that a programmer can produce useful code and be able to solve real-world problems and students who achieve a good level of competence want to make sure that the process of certification is rigorous enough that their certificate actually means something!</div>
</div>
<div>
<br /></div>
<div>
<br /></div>
<h3>
Geekuni Certification</h3>
<div>
<div>
It was with all this in mind that we designed our new certification program – the aim being to create a certification process that fulfils the needs of industry managers and students alike. To do this we created a process of certification based on real-world programming skills. We have found that there are no shortcuts to this process: expert observation of a developer’s coding and communication behaviour in a real situation is needed for accurate assessment... and our certification process has this at its heart.</div>
<div>
<br /></div>
<div>
Find out more about <a href="https://geekuni.com/certification" target="_blank">certification with Geekuni</a> including the <a href="https://geekuni.com/certification/terminology#dcs" target="_blank">Demonstrable Competence Sets</a> for both our <a href="https://geekuni.com/course/perl-essentials" target="_blank">Perl Essentials</a> and <a href="https://geekuni.com/course/perl-web" target="_blank">Web Development</a> Courses.</div>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6103856534279931094.post-91537704462544881422015-06-14T23:13:00.001+01:002017-10-19T00:18:25.933+01:00Sessions and Cookies in Perl with Dancer<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/GxCplsdCwxY/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/GxCplsdCwxY?feature=player_embedded" width="320"></iframe></div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<br />
<h4>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Cookie Monster:<span style="font-weight: normal;"> Me need cookie! Me make cookie! But how?</span></span></h4>
<h4>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Sir Ian McKellen: <span style="font-weight: normal;">Well ... h</span></span><span style="font-family: "arial" , "helvetica" , sans-serif; font-weight: normal;">ow many ways can a cookie crumble?</span></h4>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">In this article we demonstrate three archetypal ways of implementing sessions with cookies using session factories in <a href="https://metacpan.org/release/Dancer2" target="_blank">Dancer2</a>.</span><br />
<a name='more'></a><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">A core principle behind the HTTP protocol is that it's <a href="https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#HTTP_session_state" target="_blank">stateless</a>. Every time you click on a link, your browser sends a request to a web server asking for a web page determined by the URL and any other data your browser sent. The server doesn't know or care who you are or what you've done - it simply responds to the information you've provided.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">The simplicity of this protocol is one reason the World Wide Web took off so quickly - but on its own, services such as Internet banking would not be possible.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">The solution to this is the cookie. A <a href="https://en.wikipedia.org/wiki/HTTP_cookie" target="_blank">cookie</a> is a snippet of data which is issued by the web server in response to a request. On subsequent requests, the browser passes it back. Each time the server gets a request with this cookie, it stores data against that cookie indicating that, for example, the cookie has been passed in by a user who knows the password of a particular account. As such they have permission to take actions only available to that person. The sequence of requests and responses where the server 'knows' who it's talking to is called a <a href="https://en.wikipedia.org/wiki/Session_(computer_science)" target="_blank">session</a>.</span><br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">There are many ways for the server to manage sessions in Dancer2, and we'll explain three techniques which cover all the common approaches.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<br />
<h4>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Demonstration app - the Count von Count family tree</span></h4>
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">Here's some code for easily experimenting with the different approaches to sessions. The behaviour we will describe is tested when running under Dancer2 v0.160003.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<br />
<pre class="prettyprint">#!/usr/bin/env perl
use Dancer2;
use Lingua::EN::Numbers qw/num2en_ordinal/;
set session => 'Simple';
get '/' => sub {
if (session('user')) {
session count => session('count') + 1;
return
'<a href="/">Click here</a> for the name of the eldest son of Count '.
session('user').' von Count the '.
'<b>'.num2en_ordinal(session('count')).'</b>';
}
return 'Cookie Monster!';
};
get '/login/:user' => sub {
session user => params->{user};
session count => 0;
redirect '/';
};
dance;
</pre>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Run this by simply storing it in a script like 'cookie.pl', make it executable and run it. </span><span style="font-family: "arial" , "helvetica" , sans-serif;">If you just visit the index (/) URL it will just respond with '</span><span style="font-family: "courier new" , "courier" , monospace;">Cookie Monster</span><span style="font-family: "arial" , "helvetica" , sans-serif;">'. If you start by visiting the URL </span><span style="font-family: "courier new" , "courier" , monospace;">http://<hostname>/login/Andrew</span><span style="font-family: "arial" , "helvetica" , sans-serif;"> you'll get</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><a href="http://ec2-54-205-37-235.compute-1.amazonaws.com:3000/">Click here</a> for the name of the eldest son of Count Andrew von Count the <b>first</b></span><br />
<b><br /></b>
<span style="font-family: "arial" , "helvetica" , sans-serif;">and as you click on the link you'll get responses</span><br />
<b><br /></b>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><a href="http://ec2-54-205-37-235.compute-1.amazonaws.com:3000/">Click here</a> for the name of the eldest son of Count Andrew von Count the <b>second</b></span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><a href="http://ec2-54-205-37-235.compute-1.amazonaws.com:3000/">Click here</a> for the name of the eldest son of Count Andrew von Count the <b>third</b></span><br />
<b><span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">...</span></b><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<br />
<h4>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Approach 1: The ephemeral cookie key</span></h4>
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">In the code above, the line</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">set session => 'Simple';</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">was actually unnecessary since Simple sessions are switched on by default. The intention is to highlight to the reader the fact that we're using the </span><span style="font-family: "arial" , "helvetica" , sans-serif;">Dancer2::Session::Simple session factory.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">The principle is that when you visit the site, the app responds with a cookie (some random unique string) in the header. On subsequent requests, your browser sends that cookie along in the header and Dancer looks it up to find all the data you've stored against it in the session.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Now this seems to be working fine, but your site is getting popular so to improve performance you run it under Starman and Plack so you can serve the pages more quickly using <a href="http://blog.geekuni.com/2015/06/perl-dancer-course-update.html" target="_blank">middleware</a> to gzip the images.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">$ plackup -s Starman --port 3000 --workers 1 ./cookie.pl </span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">This is still working nicely but your site is getting so many Sesame street fans you realise you'll need another <i>worker</i> process managing all these HTTP requests, so you run:</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">$ plackup -s Starman --port 3000 --workers 2 ./cookie.pl</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">and things stop working. Give it a try! You visit the login page but then within the first couple of clicks you're back to the Cookie Monster response.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">To give yourself a hint at what's going wrong, print the process id ($$) on each page. You'll find that as soon as Starman delegates an HTTP request to a different worker, it has no idea about the cookie and creates a new one with no session data stored against it.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">The reason for this is that you've got two sessions, and each session factory stores the cookies in its own hash which is a variable. Variables are not shared across processes.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<br />
<h4>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Approach 2: The fat cookie</span></h4>
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">To solve the problem above, you can replace</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">set session => 'Simple'</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">with</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<br />
<pre class="prettyprint">set engines => {
session => {
Cookie => { secret_key => 'my_secret_key' }
}
};
set session => 'Cookie' ;
</pre>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br />The Dancer2::Session::Cookie factory works by encrypting the hash of all the session data as a string and regarding that encryption as the cookie. In this way the server doesn't need to store anything at all, but if you have a lot of data in your session, it could slow things down considerably.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<br />
<h4>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Approach 3: The persistent cookie key</span></h4>
<br />
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Simply install <a href="http://memcached.org/" target="_blank">memcached</a> and change the settings to:</span><br />
<br />
<pre class="prettyprint">set engines => {
session => {
Memcached => { memcached_servers => 'localhost:11211' }
}
};
set session => 'Memcached';
</pre>
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">Memcached provides memory which can be shared between the worker processes on your host, and even between processes on different hosts. As such you can load balance between workers and they pass the cookie to the memcached server to retrieve the session data.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<br />
<h3>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Conclusion</span></h3>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Apart from Simple, Cookie and Memcached there are at least eight other session factories implemented on top of Dancer2 but they all model the third approach above, using all types of server side storage from text files to databases. The conclusion to draw from this is that in production servers, the persistent cookie key is the standard approach.</span></div>
Andrew Solomonhttp://www.blogger.com/profile/00215724509745366070noreply@blogger.com1tag:blogger.com,1999:blog-6103856534279931094.post-24720698380322628282015-06-09T22:46:00.001+01:002015-06-09T22:46:25.414+01:00A small step for Dancer, a giant leap for web development<h2 style="-webkit-user-select: text; background-color: white; word-wrap: break-word;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="white-space: pre-wrap;">Web Development Course Update</span></span></h2>
<pre class="aLF-aPX-K0-aPE aLF-aPX-aLK-ayr-auR" style="-webkit-user-select: text; background-color: white; white-space: pre-wrap; word-wrap: break-word;"><pre class="aLF-aPX-K0-aPE aLF-aPX-aLK-ayr-auR" style="-webkit-user-select: text; white-space: pre-wrap; word-wrap: break-word;"><span style="font-family: Arial, Helvetica, sans-serif;">Dancer2 has undergone major changes in the last 18 months since Geekuni's Web Development Version 1 was released.</span></pre>
<pre class="aLF-aPX-K0-aPE aLF-aPX-aLK-ayr-auR" style="-webkit-user-select: text; white-space: pre-wrap; word-wrap: break-word;"><span style="font-family: Arial, Helvetica, sans-serif;">
</span></pre>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJFsOTFZ_cOKfum29i__OVF9uG_ijGvcgOThAZLmAcN8t7nK6dF-HOfo8NtGHrUWbEXTBqHIHO2HC1xPA6PWG0wr70aSgM_r8SnznLTBBd73DL7CCuwKNgINwf_23tjUCvKSPB4sf7Rkk/s1600/dcr-header-logo.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="224" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJFsOTFZ_cOKfum29i__OVF9uG_ijGvcgOThAZLmAcN8t7nK6dF-HOfo8NtGHrUWbEXTBqHIHO2HC1xPA6PWG0wr70aSgM_r8SnznLTBBd73DL7CCuwKNgINwf_23tjUCvKSPB4sf7Rkk/s320/dcr-header-logo.png" width="320" /></a></div>
<pre class="aLF-aPX-K0-aPE aLF-aPX-aLK-ayr-auR" style="-webkit-user-select: text; white-space: pre-wrap; word-wrap: break-word;"><span style="font-family: Arial, Helvetica, sans-serif;"><a name='more'></a></span></pre>
</pre>
<pre class="aLF-aPX-K0-aPE aLF-aPX-aLK-ayr-auR" style="-webkit-user-select: text; background-color: white; white-space: pre-wrap; word-wrap: break-word;"><span style="font-family: Arial, Helvetica, sans-serif;">Four months ago I had the good fortune of working with Sawyer X a core developer and release manager of </span><a href="http://www.perldancer.org/" style="font-family: Arial, Helvetica, sans-serif;" target="_blank">Dancer2</a><span style="font-family: Arial, Helvetica, sans-serif;">. </span><a href="https://workingatbooking.com/" style="font-family: Arial, Helvetica, sans-serif;" target="_blank">Booking.com</a><span style="font-family: Arial, Helvetica, sans-serif;"> commissioned him to assess Geekuni's </span><a href="https://geekuni.com/course/perl-essentials" style="font-family: Arial, Helvetica, sans-serif;" target="_blank">Perl Essentials</a><span style="font-family: Arial, Helvetica, sans-serif;"> course to make sure that it is an appropriate training resource for their many recruits who come from a non-Perl background. It received his stamp of approval.</span></pre>
<pre class="aLF-aPX-K0-aPE aLF-aPX-aLK-ayr-auR" style="-webkit-user-select: text; background-color: white; white-space: pre-wrap; word-wrap: break-word;"><span style="font-family: Arial, Helvetica, sans-serif;">
In preparation for his world tour Dancer2 class at the various <a href="http://www.yapcna.org/yn2015/masters.html#Dancer" target="_blank">YAPCs</a> and Perl Workshops this year Sawyer has taken Geekuni's <a href="https://geekuni.com/course/perl-web" target="_blank">Web Development</a> course as a resource for people wanting to continue their Dancer2 training. In preparation, he</span><span style="font-family: Arial, Helvetica, sans-serif;"> has helped bring the course up-to-date to account for the following changes</span><span style="font-family: Arial, Helvetica, sans-serif;">:</span></pre>
<pre class="aLF-aPX-K0-aPE aLF-aPX-aLK-ayr-auR" style="-webkit-user-select: text; background-color: white; white-space: pre-wrap; word-wrap: break-word;"><ul>
<li><span style="font-family: Arial, Helvetica, sans-serif;"><a href="https://github.com/PerlDancer/Dancer2/commit/ce1ed71c20d521e2464d0aac3a171378dd93953d#diff-6423727fcc5408faa7e730bdc7de9a65" target="_blank">Deprecation of Dancer2 unit testing</a> - leave it to Plack</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">You can </span><a href="http://advent.perldancer.org/2014/9" style="font-family: Arial, Helvetica, sans-serif;" target="_blank">mount a different controller per path</a></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">Leave the </span><a href="http://advent.perldancer.org/2014/6" style="font-family: Arial, Helvetica, sans-serif;" target="_blank">static file management</a><span style="font-family: Arial, Helvetica, sans-serif;"> to Plack</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">Cleaning up </span><a href="http://advent.perldancer.org/2014/14" style="font-family: Arial, Helvetica, sans-serif;" target="_blank">plugins</a></li>
</ul>
<span style="font-family: Arial, Helvetica, sans-serif;">From the student's viewpoint of implementing their <a href="http://art.geekuni.com/" target="_blank">project</a>, these changes are just a bit of detail. However, as a result of these changes we were able to take a big leap in Version 2 of the course introducing the use of <i>middleware</i> which will be another 'Wow!' moment for people learning Dancer2.
</span><span style="font-family: 'Courier New', Courier, monospace, arial, sans-serif; font-size: 14px;">
</span></pre>
Andrew Solomonhttp://www.blogger.com/profile/00215724509745366070noreply@blogger.com0tag:blogger.com,1999:blog-6103856534279931094.post-16145882704667452342015-05-25T09:11:00.000+01:002017-10-19T00:09:52.056+01:00How to learn programming? Just do it.At Geekuni, one of our main focuses is on experiential learning which, although it sounds complex, is really quite simple...<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkZEROBSvO85bqsW9Aj3S6IQGY9VeA0Ao5ysi_nJfQdLLelLbbdX9uMcogpJg4T2hUnIxZxSEHF6nfOO65pjzMj1omffXRqjBBPby2WxTusBs3zbK79wq4zCURdCDpEchq_AxtA9UQxg/s1600/Learning+by+doing.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="235" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkZEROBSvO85bqsW9Aj3S6IQGY9VeA0Ao5ysi_nJfQdLLelLbbdX9uMcogpJg4T2hUnIxZxSEHF6nfOO65pjzMj1omffXRqjBBPby2WxTusBs3zbK79wq4zCURdCDpEchq_AxtA9UQxg/s320/Learning+by+doing.jpg" width="320" /></a></div>
<br />
<h3>
What is experiential learning?</h3>
Experiential learning is often thought of as ‘learning by doing’, however there is more to it than just completing tasks. Central to experiential learning is the way we process our experiences, particularly our reflections on what we do. Reflection and feedback help us to consolidate ideas, and enable us to apply ideas/skills to new situations. Experiential learning is all about enabling critical thinking, problem solving and decision making in settings that are relevant to us.<br />
<br />
<h3>
Where did it come from?</h3>
Experiential learning was formally introduced by Kolb in the 1970s but there is no doubt that the roots of learning from experience go back much further:<br />
<br />
<div style="text-align: center;">
<i>“For the things we have to learn before we can do them, we learn by doing them.” </i></div>
<div style="text-align: right;">
<i>(Aristotle, The Nicomachean Ethics)</i></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Or, to put it simply:</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJlJD95zBay3htWTxH-WA0_vRFwF39SDOmfr-YUGR3rEFOjsoMB1mtCD8F6PYbOct7RYA99IfamDDw5HWoYSN9vCXa3SV5wdNv-n4X0Y_z43lhqGrn7WctsOjoCG2Mos534V0uxNJiUA/s1600/Learning+Cycle.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="248" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJlJD95zBay3htWTxH-WA0_vRFwF39SDOmfr-YUGR3rEFOjsoMB1mtCD8F6PYbOct7RYA99IfamDDw5HWoYSN9vCXa3SV5wdNv-n4X0Y_z43lhqGrn7WctsOjoCG2Mos534V0uxNJiUA/s320/Learning+Cycle.gif" width="320" /></a></div>
<br /></div>
<div style="text-align: left;">
<br /></div>
Experiential learning is cyclical, beginning with an observation or experience. Think about learning to ride a bike. In the ‘do’ stage, you have a go at riding it. Then, if you fall off, you have the chance to think about (review) what went wrong and what went right. Then you take the things you learned form this attempt and apply it to the problem to come up with ways to make it happen better next time (plan). Each new attempt is informed by a cyclical pattern of prior experience and reflection.<br />
<br />
<h3>
Why is it useful?</h3>
Modern education methods have been criticised for not focussing enough on the learning process of the individual student. Instead, all too often teachers concentrate on the mere transfer of information without formally encouraging critical or reflective thinking. This can mean that students don’t learn how to become effective problem solvers or to develop skills but instead just regurgitate information.<br />
<br />
Experiential learning is the opposite - it helps people develop an in-depth understanding of their subject and how to use their knowledge and skills in real-world situations. It provides deep and lasting learning.<br />
<br />
<h3>
Why use it for teaching coding?</h3>
The value of experiential learning has been recognised in many different fields. Outward Bound’s work on using experiential learning in an outdoor environment for personal development and team building is a high-profile example. However, climbing a mountain or surviving for a week in the wilderness is unlikely to help you improve your coding skills! Nonetheless, the principle holds true for programming: you do need to be able to apply your knowledge to real experiences and think critically in order to become an effective developer.<br />
<br />
At Geekuni our teaching experience has shown us that rather than learning code in a passive manner, students learn better and faster when they actively problem-solve. ‘Hands-on’ exercises that culminate in the quick completion of fully-functional pieces of software provide effective learning. Above all, it is essential that students receive immediate feedback on their experiences as they complete tasks.<br />
<br />
In our next post we’ll discuss another teaching method that is really effective for learning programming - Socratic enquiry.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-6103856534279931094.post-72503158574107678662015-05-04T17:11:00.001+01:002017-10-19T00:03:18.792+01:00How to install different versions of Perl<br />
<h2>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Taking control with Perlbrew on Ubuntu</span></h2>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhip_Pimw4PtS5eXihZQyD-Xrtp1Qj6YfCsYaKX6j5kvRwQr2OiKQ0y8tVK1IcRhRxGihxD31GNZOfxnvQkLDa8fkXJ23F5FAi-N_6_WyE2yJ74zBTYa1eLrWOJCYfVZmySxjnpu4RfVNM/s1600/perlbrew.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhip_Pimw4PtS5eXihZQyD-Xrtp1Qj6YfCsYaKX6j5kvRwQr2OiKQ0y8tVK1IcRhRxGihxD31GNZOfxnvQkLDa8fkXJ23F5FAi-N_6_WyE2yJ74zBTYa1eLrWOJCYfVZmySxjnpu4RfVNM/s320/perlbrew.png" width="308" /></a></div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><a href="http://perlbrew.pl/" target="_blank">Perlbrew</a> is the quick and easy way to get multiple </span><span style="font-family: "arial" , "helvetica" , sans-serif;">isolated installations</span><span style="font-family: "arial" , "helvetica" , sans-serif;"> of Perl onto a single host. I'll walk through how this is done on a box with Ubuntu installed.</span><br />
<br />
<a name='more'></a><span style="font-family: "arial" , "helvetica" , sans-serif;">One reason I like Ubuntu is because it comes with Perl and a library of several thousand modules already installed so you can just write</span><br />
<br />
<pre class="prettyprint">$ perl -e 'print "Hello Perl ${^V}!\n"'
Hello Perl v5.18.2!
</pre>
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">and you're on your way.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">However, only using the Perl which comes with Ubuntu can be </span><span style="font-family: "arial" , "helvetica" , sans-serif;">problematic for reasons such as:</span><br />
<ul>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">You're writing code for a client who will run it against a different version of Perl;</span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">You're maintaining a module on CPAN and you've been informed that it breaks on a different version of Perl;</span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">For better performance or new features, you want to run your code under a newer version of Perl; or</span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">You want to use a more recent version of a module than the one which comes with Ubuntu.</span></li>
</ul>
<span style="font-family: "arial" , "helvetica" , sans-serif;">You could just login as root and install the newer version of Perl or the module - but <i>don't! </i></span><span style="font-family: "arial" , "helvetica" , sans-serif;">Running this shows you that your Ubuntu box has over a thousand dependencies on </span><i style="font-family: Arial, Helvetica, sans-serif;">its particular version</i><span style="font-family: "arial" , "helvetica" , sans-serif;"> of Perl.</span><br />
<br />
<pre class="prettyprint">$ apt-cache rdepends perl | grep -v lib.*perl | wc -l
1021
</pre>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span><span style="font-family: "arial" , "helvetica" , sans-serif;">Although Perl is famous for being backward compatible, upgrading your operating system's Perl would be playing Russian roulette. </span><span style="font-family: "arial" , "helvetica" , sans-serif;">Perlbrew enables you easily host multiple isolated installations of Perl </span><span style="font-family: "arial" , "helvetica" , sans-serif;">with their own libraries under your home directory at no risk to </span><span style="font-family: "arial" , "helvetica" , sans-serif;">the host operating system.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<br />
<h4>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Step 1. Ensure your host is able to compile Perl from source</span></h4>
<span style="font-family: "arial" , "helvetica" , sans-serif;"></span>
<br />
<pre class="prettyprint">$ sudo apt-get install gcc cpp make</pre>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<br />
<h4>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Step 2. Install Perlbrew</span></h4>
<span style="font-family: "arial" , "helvetica" , sans-serif;">As <i>yourself</i>, not root:</span><br />
<pre class="prettyprint bash">$ \curl -L http://install.perlbrew.pl | bash</pre>
<br />
<h4>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Step 3. Update your terminal settings</span></h4>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Following the instructions in the output of the previous command</span><br />
<pre class="prettyprint bash">$ echo source ~/perl5/perlbrew/etc/bashrc >> ~/.bash_profile
</pre>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">To see whether it worked, open a new Bash terminal and run</span><br />
<pre class="prettyprint">$ which perlbrew
/home/andrew/perl5/perlbrew/bin/perlbrew
</pre>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span><span style="font-family: "arial" , "helvetica" , sans-serif;">If this command fails to find perlbrew</span><br />
<pre class="prettyprint">$ echo source ~/perl5/perlbrew/etc/bashrc >> ~/.bashrc</pre>
<span style="font-family: "arial" , "helvetica" , sans-serif;">or</span><br />
<pre class="prettyprint">$ echo source ~/perl5/perlbrew/etc/bashrc >> ~/.profile</pre>
<h4>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Step 4. Install a Perl</span></h4>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Firstly, see which versions are available:</span><br />
<pre class="prettyprint">$ perlbrew available
perl-5.21.11
perl-5.20.2
perl-5.18.4
perl-5.16.3
perl-5.14.4
perl-5.12.5
perl-5.10.1
perl-5.8.9
perl-5.6.2
perl5.005_04
perl5.004_05
perl5.003_07
</pre>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Once you've decided the Perl you'd like to run against</span><br />
<br />
<pre class="prettyprint">$ perlbrew install perl-5.20.2</pre>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Go make a coffee.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<br />
<h4>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Step 5. Install another Perl just for fun</span></h4>
<pre class="prettyprint">$ perlbrew install perl-5.21.11</pre>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Make another coffee.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<br />
<h4>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Step 6. See what's on offer</span></h4>
<pre class="prettyprint">$ perlbrew list
perl-5.20.2
perl-5.21.11
</pre>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Noting that </span><span style="background-color: #f6b26b; font-family: "courier new" , "courier" , monospace;">$ which perl</span><span style="font-family: "arial" , "helvetica" , sans-serif;"> still refers to </span><span style="font-family: "courier new" , "courier" , monospace;">/usr/bin/perl</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<br />
<h4>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Step 7. To change Perl for the current shell</span></h4>
<pre class="prettyprint">$ perlbrew use perl-5.20.2
$ which perl
/home/andrew/perl5/perlbrew/perls/perl-5.20.2/bin/perl
</pre>
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">You could make this your default Perl every time you log-in with</span><br />
<pre class="prettyprint">$ perlbrew switch perl-5.20.2
</pre>
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">You can also revert to the system's Perl with</span><br />
<pre class="prettyprint">$ perlbrew off # for this terminal only
$ perlbrew switch-off # every time you log-in</pre>
<h4>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Step 8. Using your new Perl</span></h4>
<span style="font-family: "arial" , "helvetica" , sans-serif;">This shebang at the top of a script will use your operating system's Perl regardless of whether perlbrew is switched on or off:</span><br />
<pre class="prettyprint">#!/usr/bin/perl</pre>
<span style="font-family: "arial" , "helvetica" , sans-serif;">In order to use the Perl of your current environment</span><br />
<pre class="prettyprint">#!/usr/bin/env perl
print "Hello Perl ${^V}!\n";</pre>
<div>
<h4>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Step 9. Check out the library</span></h4>
<span style="font-family: "arial" , "helvetica" , sans-serif;">You'll see that when you're switched to perl-5.20.2 the CPAN modules you have ac</span><span style="font-family: "arial" , "helvetica" , sans-serif;">cess to are all within 5.20.2's own library:</span><br />
<pre class="prettyprint">$ perl -e 'use Data::Dumper; print Dumper(\@INC)'
$VAR1 = [
'/home/andrew/perl5/perlbrew/perls/perl-5.20.2/lib/site_perl/5.20.2/x86_64-linux',
'/home/andrew/perl5/perlbrew/perls/perl-5.20.2/lib/site_perl/5.20.2',
'/home/andrew/perl5/perlbrew/perls/perl-5.20.2/lib/5.20.2/x86_64-linux',
'/home/andrew/perl5/perlbrew/perls/perl-5.20.2/lib/5.20.2',
'.'
];
</pre>
<span style="font-family: "arial" , "helvetica" , sans-serif;">and if you want to add something to that library just install cpanminus and you're in full swing!</span><br />
<pre class="prettyprint">$ \curl -L https://cpanmin.us | perl - App::cpanminus
...
$ cpanm Data::Dump
--> Working on Data::Dump
Fetching http://www.cpan.org/authors/id/G/GA/GAAS/Data-Dump-1.22.tar.gz ... OK
Configuring Data-Dump-1.22 ... OK
Building and testing Data-Dump-1.22 ... OK
Successfully installed Data-Dump-1.22
1 distribution installed
</pre>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span><span style="font-family: "arial" , "helvetica" , sans-serif;"><br />
</span>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<ol style="background-color: #e7eaee; box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; margin-bottom: 10px; margin-top: 0px;">
</ol>
</div>
Andrew Solomonhttp://www.blogger.com/profile/00215724509745366070noreply@blogger.com4tag:blogger.com,1999:blog-6103856534279931094.post-54931603944160051872015-02-01T16:33:00.000+00:002017-10-19T00:12:47.436+01:00How to check boolean equality in Perl<script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js"></script>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"><br /></span>
<br />
<div style="text-align: center;">
<h2>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: x-large; font-weight: normal;">Boolean equality can be checked in Perl with</span></h2>
</div>
<div style="text-align: center;">
<h2>
<span style="font-weight: normal;"><span style="font-family: "courier new" , "courier" , monospace; font-size: x-large;"><br /></span></span></h2>
<h2>
<span style="font-weight: normal;"><span style="font-family: "courier new" , "courier" , monospace; font-size: x-large;">
!($x xor $y)</span></span></h2>
</div>
<div style="text-align: center;">
<h2>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: x-large; font-weight: normal;"><br /></span></h2>
<h2>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: x-large; font-weight: normal;">or with</span></h2>
</div>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"></span><br />
<div style="text-align: center;">
<h2>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-large; font-weight: normal;"><br /></span></h2>
<h2>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-large; font-weight: normal;">
!$x == !$y
</span></h2>
</div>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"><br />
</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqyMffXYBuJMXhMPXWIj8zN6jh0e9jFJyVD3tJaLaSi7DfpDDP1J9scWT_LryJZpRHRAwD2xFu3WZWRQfqqv4x9cmhCVg_boTkjbCROwqq5huMoE9lOndM3254Q_NrXVNqW4C_HNR1r8k/s1600/Agree-to-disagree.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"><img border="0" height="185" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqyMffXYBuJMXhMPXWIj8zN6jh0e9jFJyVD3tJaLaSi7DfpDDP1J9scWT_LryJZpRHRAwD2xFu3WZWRQfqqv4x9cmhCVg_boTkjbCROwqq5huMoE9lOndM3254Q_NrXVNqW4C_HNR1r8k/s1600/Agree-to-disagree.png" width="320" /></span></a></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">And the winner is...</span></div>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"><br />
</span><br />
<a name='more'></a><span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">Strings, integers, floating point numbers and Booleans all have a single type in Perl - that's the <i>scalar</i>. Given a variable $x we can treat it as a Boolean by writing something like</span><br />
<br />
<pre class="prettyprint">if ($x) {
print 'x is true';
}
else {
print 'x is false';
}
</pre>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">It will print 'x is false' if $x is one of:</span><br />
<ul>
<li><span style="font-family: "courier new" , "courier" , monospace; font-size: large;">0</span><span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"> - the number zero;</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace; font-size: large;">''</span><span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"> - an empty string;</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace; font-size: large;">'0'</span><span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"> - the string consisting of the zero digit; or</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace; font-size: large;">undef</span><span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"> - a variable which has no value assigned to it.</span></li>
</ul>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">For any other value 'x is true' will be printed.</span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"><br /></span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">Having such an accommodating Boolean evaluation saves us keystrokes but can sometimes be a bit of a mind-bender when trying to compare variables as Booleans. For example, suppose </span><span style="font-family: "courier new" , "courier" , monospace; font-size: large;">$x = 'true'</span><span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"> and </span><span style="font-family: "courier new" , "courier" , monospace; font-size: large;">$y = '2b or !2b?'</span><span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">, then both of these scalars would be true as Booleans, but both </span><span style="font-family: "courier new" , "courier" , monospace; font-size: large;">($x == $y)</span><span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"> and </span><span style="font-family: "courier new" , "courier" , monospace; font-size: large;">($x eq $y)</span><span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"> would evaluate as false.</span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"><br /></span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">So how do we compare them as Booleans? The two approaches above are quite different.</span></div>
<h2>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"><br /></span></h2>
<h2>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">The naysayers: </span><span style="font-family: "courier new" , "courier" , monospace; font-size: large;">!$x == !$y</span></h2>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">Given a scalar </span><span style="font-family: "courier new" , "courier" , monospace; font-size: large;">$x</span><span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">, evaluating </span><span style="font-family: "courier new" , "courier" , monospace; font-size: large;">!$x</span><span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"> makes it clear it should be regarded as a Boolean and the value returned by </span><span style="font-family: "courier new" , "courier" , monospace; font-size: large;">!</span><span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"> will be Perl's default representation of its Boolean opposite: </span><span style="font-family: "courier new" , "courier" , monospace; font-size: large;">1</span><span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"> for true or the empty string for false.</span></div>
<h2>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"><br /></span></h2>
<h2>
<span style="font-size: large;"><span style="font-family: "arial" , "helvetica" , sans-serif;">Exclusive: </span><span style="font-family: "courier new" , "courier" , monospace; text-align: center;">!($x xor $y)</span></span></h2>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">Noting that xor is short for 'exclusive or' which is to say that either side is true, but not both. Once again, because it's a logical operator, it returns 1 or the empty string. This works because</span></div>
<span style="font-size: large;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"></span></span>
<span style="font-size: large;"><br /></span>
<br />
<pre class="prettyprint"><span style="font-size: large;">NOT( x XOR y ) ⇔ NOT( ( x OR y ) AND NOT ( x AND y ) )
⇔ NOT( x OR y ) OR (x AND y)
⇔ x = y # as Booleans
</span></pre>
<span style="font-size: large;">
</span>
<br />
<h2>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"><br /></span></h2>
<h2>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">Conclusion</span></h2>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">Running this on my old laptop with Perl v5.14.2 I found the "exclusive" approach to be 2-3% faster. I'd like to know how the competition pans out on other people's systems. See my code here:</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"><a href="https://gist.github.com/3c0a1e0b998ab9d911b8" target="_blank">https://gist.github.com/3c0a1e0b998ab9d911b8</a></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>Andrew Solomonhttp://www.blogger.com/profile/00215724509745366070noreply@blogger.com1tag:blogger.com,1999:blog-6103856534279931094.post-42079541908115909282014-11-18T23:08:00.000+00:002017-10-19T07:35:52.904+01:00How to launch a virtual desktop on AWS<link href="http://google-code-prettify.googlecode.com/svn/trunk/src/prettify.css" rel="stylesheet" type="text/css"></link>
<script src="http://google-code-prettify.googlecode.com/svn/trunk/src/prettify.js" type="text/javascript"> </script>
<br />
<h3>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">
Did you ever get a GUI bug report which you couldn't replicate on any desktop at your disposal?</span></h3>
<h3>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrKC43mfKZrVjzvhIgMUkjILPbRPN27_aehM07_kfDKaKNdRCZLwKj9IeEU2PwZRbD85l_V2ZvCMoDooAdNOaRDMHlsMZCTfdep_wlLFTaV-PAI3dDynZV2T4W41GrfN2iG9VFsbIJeak/s1600/virtual-desktop.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><span style="font-size: large;"><img border="0" height="252" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrKC43mfKZrVjzvhIgMUkjILPbRPN27_aehM07_kfDKaKNdRCZLwKj9IeEU2PwZRbD85l_V2ZvCMoDooAdNOaRDMHlsMZCTfdep_wlLFTaV-PAI3dDynZV2T4W41GrfN2iG9VFsbIJeak/s1600/virtual-desktop.jpg" width="320" /></span></a><span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"><h3>
Last night was the first time for me, and here's my solution...</h3>
</span></h3>
<span style="font-size: large;"><br /></span><span style="font-size: large;"><br /></span>
<span style="font-size: large;"><br /></span>
<a href="https://www.flickr.com/photos/logosinberlin/381639468/in/photostream/" target="_blank"><span style="font-family: "arial" , "helvetica" , sans-serif; font-size: x-small;">Source: Flickr, Image by Krystian "Krane" Schneidewind</span></a><br />
<span style="font-size: large;"><br /></span>
<span style="font-size: large;"><br /></span>
<br />
<br />
<br />
<a name='more'></a><br />
<br />
<h2>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">Setup an AWS instance identical to the user's desktop.</span></h2>
<div>
<span style="font-size: large;"><span style="font-family: "arial" , "helvetica" , sans-serif;">In my case my student had a Debian 7 with a Gnome desktop: </span><span style="font-family: "arial" , "helvetica" , sans-serif;">ami-d0318eb8</span></span><br />
<h2>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"><br /></span></h2>
<h2>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">Install VNC server on the instance.</span></h2>
</div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">As root:</span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"><br /></span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"><code class="prettyprint lang-sh"># apt-get update</code></span><br />
<br />
<div style="-webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
</div>
<br />
<div style="-webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-size: large;"><code class="prettyprint lang-sh"># </code></span><span style="font-family: monospace; font-size: large;">tasksel install gnome-desktop --new-install</span></div>
</div>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"><code class="prettyprint lang-sh"># apt-get install vnc4server</code></span><br />
<br />
<br /></div>
<div>
<h2>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">Start the VNC server on the instance.</span></h2>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">To start the server you'll run something like this:</span><br />
<span style="font-size: large;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span><span style="font-family: "arial" , "helvetica" , sans-serif;"><code class="prettyprint lang-sh">
# vnc4server -geometry 1024x768 -depth 24</code></span></span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"><code class="prettyprint lang-sh">Log file is /root/.vnc/ip-10-29-240-166:1.log</code></span><br />
<div>
<div>
<h2>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"><br /></span></h2>
<h2>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">Find out which port the VNC server is listening on...</span></h2>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">The log file generated above contains the port number</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"><br /></span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">
<code class="prettyprint lang-sh">
# grep port /root/.vnc/ip-10-29-240-166:1.log
</code>
</span></div>
<div>
<span style="font-size: large;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span><span style="font-family: "arial" , "helvetica" , sans-serif;">In my case it was port 5901</span></span><br />
<h2>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"><br /></span></h2>
<h2>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">... and make that port accessible.</span></h2>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">Make sure that port is accessible via TCP by updating the instance's AWS security group</span></div>
<div>
<h2>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"><br /></span></h2>
<h2>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">Install a VNC viewer on your desktop...</span></h2>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">My desktop is Ubuntu so I just called</span><br />
<span style="font-size: large;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<code class="prettyprint lang-sh">
$ sudo apt-get install xvnc4viewer
</code><span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></span><br />
<h2>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"><br /></span></h2>
<h2>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">... and run it!</span></h2>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">I called</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"><br /></span></div>
<span style="font-size: large;"><code class="prettyprint lang-sh">
$ xvnc4viewer ec2-54-146-137-134.compute-1.amazonaws.com:5901
</code>
</span><br />
<div>
<span style="font-size: large;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">where ec2-54-146-137-134.compute-1.amazonaws.com was the public URI of the AWS instance and 5901 was the port the vnc4 server was listening on.</span></span><br />
<span style="font-size: large;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><b>Hey presto!</b> I had a virtual desktop with very little installed on my desktop host. </span></span><span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">(Ok, I admit that I had to change the terminal's profile so that the background colour was different from the text...:)</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"><br /></span></div>
<h2>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">Summary</span></h2>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">I setup a virtual desktop using VNC (Virtual Network Computing) which is based on the Remote Frame Buffering protocol for communication between the client and server. There are various client and server implementations for you to install depending on the host boxes.</span><br />
<h2>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;"><br /></span></h2>
<h2>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">Footnote</span></h2>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: large;">It turned out it wasn't a GUI bug at all - it was a networking problem!</span><br />
<div>
<br /></div>
</div>
</div>
<script>
prettyPrint();
</script>Andrew Solomonhttp://www.blogger.com/profile/00215724509745366070noreply@blogger.com0