Blog of Gabor Szabo http://szabgab.com Gabor Szabo about Perl, automated testing, dynamic languages and everyting else en-us Copyright 2002-2010, Gabor Szabo szabgab@gmail.com 1901-01-01T00:00+00:00 1 hourly YAPC::EU::2009 videos - Larry Wall talking about Perl 6 http://szabgab.com/blog/2009/09/1253720258.html <p> I just talked to our <a href="http://www.perlfoundation.org/perl5/index.cgi?alberto_sim%C3%B5es">video guy</a> as he now calls himself, he refused to blog (but I saw him <a href="http://twitter.com/albertovski/status/4315307524">tweeting</a>) that finally the recording of <a href="http://videos.sapo.pt/yapc">Larry Wall speaking about Perl 6 in Lisbon</a> is available. </p> <p> Other recordings will follow in a week or so. </p> Gabor Szabo 2009-09-23T08:37:38+00:00 Perl, YAPC, video, Perl 6 Perl 6 training report - YAPC::EU 2009 http://szabgab.com/blog/2009/08/1249362072.html <p> Since I arrived in Lisbon I hardly have time to write anything. The first two days I was giving my <a href="http://szabgab.com/perl6.html">Perl 6 for programmers</a> class. It went surprisingly well. </p> <p> There were seven students and a few guests. On the first day Carl Masak, one of the most experienced Perl 6 programmers was sitting in the class and helping me in areas where I could not answer. On the second day Patrick R. Michaud, the project leader of <a href="http://rakudo.org/">Rakudo Perl 6</a> was in the class which was very lucky as we covered regexes and he is probably the most qualified to help in that area. Nearing the end of the second day Gloria and Larry Wall also joined the class so if the pictures are good I'll be able to show how <b>Gabor Szabo is explaining Perl 6 to Larry Wall</b>. I think I can use that in some promotional materiel for my classes ;-) </p> <p> I know what the expectations of my students were as I asked them <a href="http://szabgab.com/blog/2009/07/1248597502.html">Why do you learn Perl 6?</a> so I am really looking forward their feedback. They seemed to be satisfied with the training and the discussions that evolved during the class. </p> <p> It is very encouraging to see how the perception of Perl 6 improved in just a few months. </p> <p> In February 2009, after the German Perl Workshop I offered free Perl 6 training. There were only 2 people who were ready to spend some time on it and even that was done in 3 hours. </p> <p> In April 2009, after the Nordic Perl Workshop there were already 7-8 people who were ready to take a one day Perl 6 class, still offered free of charge. </p> <p> In August 2009, before YAPC::EU there were already 7 people who were ready to spend 2 days on Perl 6 training and <b>pay for it</b>. They were ready to invest time and money in it. </p> <p> I think this means that people see the enourmous progress the Perl 6 design and development team made. They see that even though there still many missing features it is already good enough to start playing around with it and to start implementing small projects in Perl 6. </p> <p> I'd like to thank the students their confidence that I can provide them good value for their time and money. </p> Gabor Szabo 2009-08-03T22:01:12+00:00 Perl 6, training, Perl Why do you learn Perl 6? http://szabgab.com/blog/2009/07/1248597502.html <p> Every time I provide training somewhere I like to ask my students about their background and about their reasons to attend the class. </p> <p> Unfortunatelly in corporate training I am usually shielded from the students up until the first day of the class so I cannot ask this question up front. Even more unfortunate that in many such cases the students actually don't really know why are they attending the class. The answers usually go along the lines of <i>I have to maintain Perl scripts</i> or <i>I'll have to write Perl scripts</i> or even that <i>I was told to come to the class</i>. </p> <p> These people usually bring zero enthusiasm with themselves and will probably invest negative energy in actually making sense of what I am teaching. </p> <p> Hence it is really refreshing to teach advanced classes such as the <a href="http://szabgab.com/perl_in_test_automation.html">Test Automation using Perl</a> where people usually already know what they want and why do they attend the class. </p> <p> It is especially fun to teach classes around YAPCs or Perl workshops as then the students are also community aware. Many attend <a href="http://pm.org/">Perl Monger</a> meetings, are using <a href="http://perlmonks.org/">Perl Monks</a> or chat on IRC. </p> <p> That, along with the fact that this is a totally new class makes the <a href="http://szabgab.com/perl6.html">Perl 6 training</a> that I am going to give in Lisbon very promising. At least to me. </p> <p> As an official version of Perl 6 has not yet been released and you cannot convince your boss to use it in production it was even more interesting to see why people take this class? I asked them my usual questions and most of them already answered. </p> <p> As I think the answers can be interesting to others as well let me share some of them with you without any personal identification. </p> <p> I'd really like to thank those who took the time to answer. I think this can provide a great feedback not only to me for the remaining preparations but to the Perl 6 developers as well. </p> <p> <h2>Prior experience with Perl 6 ?</h2> </p> <p> <ul> <li>No.</li> <li>None</li> <li>None whatsoever</li> <li>None, just some reading.</li> <li>None. I like reading the rakudo changelog and sources. But it looks pretty cool so far, so I can't wait to learn more :).</li> </ul> </p> <p> <h2>Why do you attend the course?</h2> </p> <p> <ul> <li>Just curious about what the hell Perl 6 is - after all this time, it is finally available, and I am not sure that I know anything about it.</li> <li>I want to know what is new in Perl 6. Partly because I am curious and want to keep me updated, partly because our customers are likely to ask me about differences and benefits compared to perl 5. And, of course, because I will probably be using it in a while :-)</li> <li>I want to learn some Perl 6 before Christmas.</li> <li>To get started developing Perl 6 apps.</li> <li>The course is for me the easy way into Perl 6. I have too many projects - some for my company, some for myself (most made available for the comunity) to force myself to stop and try Perl 6. This is my entry.</li> </ul> </p> <p> <h2>What kind of problems would you like to solve?</h2> </p> <p> <ul> <li>Anything involving OO, scoping, regexes, and data structures. I don't know if there is any news in DB access, but that could be interesting too.</li> <li>Also, threading, integration to other languages, and debugging/profiling.</li> <li>Write a compiler would be one of them, also how Perl 6 handles asynchronous IO and threading would be something I could use.</li> <li>Data transformation, basic I/O, but mostly just the new features of the language itself. Also, I am particularly interested in modifying the language itself and exploring facilities for parsing of other languages using the features of Perl 6.</li> <li>I do not think that I will produce any production code with Perl 6 yet - but I will use if for small personal utilities depending on how easy it is to build it on Windows 7</li> </ul> </p> <p> <h2>What are your expectations?</h2> </p> <p> Here some of them really got carried away. I think I'll have to reduce their expectation quickly. Before we start the two days training. </p> <p> <ul> <li>Get the basics and find out how long there is to next Christmas.</li> <li>I hope to become able to program at the same level in Perl 6 as I do in Perl 5 - as well as learning to use the new features.</li> <li>My expectations are high, but not targeted, I want to learn what Perl 6 can make for me and help me do better and faster.</li> <li>Very very very very high :-)<br /> To be more precise, just to get started writing smaller scripts and getting an introduction to the new features of the language as stated above.</li> <li>I am more curious than anything else. But one thing is for sure - It took me far longer to learn Perl than it should have. That was mostly my fault, because I did not go and seek out the experts and learn from them.<br> For example - If someone had have explained to me the Perl 5 idea of array, and scalar context and why that was useful, examples of when it is used, and functions that use it - that would have greatly speeded up my learning. It is these <i>power tips</i> that I seek. Not so much the facts, because we can always look those things up - but more the helicopter view, the philosophy, the <i>why</i> of this new programming language.</li> </p> Gabor Szabo 2009-07-26T01:38:22+00:00 Perl, Perl 6, training, YAPC, Lisbon Perl 6 Regexes http://szabgab.com/blog/2009/07/1247748032.html Making the first steps learning regular expressions in Perl 6 in the <a href="http://szabgab.com/perl6_tricks_and_treats.html">Perl 6 Tricks and Treats</a> newsletter. <p>For the full article visit <a href="http://szabgab.com/blog/2009/07/1247748032.html">Perl 6 Regexes</a></p> Gabor Szabo 2009-07-16T05:40:32+00:00 Perl, Perl 6, regex, newsletter Perl 6 files http://szabgab.com/blog/2009/07/1247571588.html As part of the <a href="http://szabgab.com/perl6_tricks_and_treats.html">Perl 6 Tricks and Treats</a> newsletter we are dealing with reading and writing files. <p>For the full article visit <a href="http://szabgab.com/blog/2009/07/1247571588.html">Perl 6 files</a></p> Gabor Szabo 2009-07-14T04:39:48+00:00 Perl, Perl 6, files, newsletter Why am I writing Padre? http://szabgab.com/blog/2009/07/1246515871.html <p> It is probably not that interesting for most of the people but I have my excuses. What is more interesting - at least to me - is why others are involved. </p> <p> After all there were already more than 40 people who made some contribution to Padre. </p> <p> So I asked them to start writing down why are they involved. Some of them have already added themselves to the <a href="http://padre.perlide.org/developers.html">developers</a> page and we started a separate page for <a href="http://padre.perlide.org/translators.html">translators</a> though that one is new and has no been filled yet. </p> <p> So why do I write Padre? </p> <p> There is a short explanation on that page but let me bore you with a longer one here. </p> <p> I have been teaching Perl 5 for almost 10 years now. Both beginner level and advanced courses. In the beginner courses the majority of the people use Windows with about 20-30 percent using Linux. Most of the Windows users use Notepad++ or a similar editor. Some of them can configure their editor to run the perl script right from the editor, others don't even know how to enable syntax highlighting for Perl 5. Some of the people on Windows don't know what the command line is but even those who know how to open the command prompt are either afraid of it or just dislike it. </p> <p> Mind you these are not stupid people or anything like that. Some of them have many years of hardware design behind them. They are just used to some kind of IDEs. </p> <p> Others might use Linux/Unix but many not by choice. In many cases the company they are working for gives them telnet access to an oldish Unix machine and tell them to code in Perl. They hardly know vi, they don't know how to configure syntax highlighting and they don't know how to install any other editor. </p> <p> I have been using vim for many years and I can testify that it is a superb editor. Emacs is similary strong but I have not used it since university. The problem with both of them is that they are totally different from the editors most people are used to and their learning curve is long and steep. It takes several months or even years to become familiar with them. Most of the people don't want to invest that energy and I certainly don't have the time for that in a 4 days long Perl 5 course. </p> <p> So I usually tell them to use whatever they are familiar with. I think I never had a student who picked Eclipse or Emacs. There were a few using vi/vim but most of the people used Notepad++ or a similar Windows based editor. </p> <p> I don't think my students are too different from the average people learning and using Perl. Most of them will never write a full blown web application. Heck most of them won't have a need for object oriented coding as they write only 100-200 line long scripts in Perl. </p> <p> They never get really familiar with Perl and they will always have to deal with strange code written by others. With all the other tasks they are required to do in their primary language or tool they will keep wondering what is $_ when they see it and will be surprised when they don't. </p> <p> They will wonder what is the relationship between $_ and $_[0]. </p> <p> So my first objective was to <b>provide a simple Notepad++ like editor with strong support for beginners or people with relatively little experience with Perl</b>. </p> <p> For example I'd like to make sure that Padre users will be able to highlight $_, press F1 and get an explanation. In case they highlight $_ from a $_[0] expression Padre should be clever enough to point this out and give an explanation on @_ and @_[0]. </p> <p> I knew it is a big task though I did not think it is soo big. In any case I knew I cannot handle this alone, especially as I am not such a good programmer. So from the very beginning I tried to make it <b>interesting, accessible to experienced Perl 5 developers</b> and in turn they made it <b>fun and hackable</b>. </p> <p> Unfortunatelly most of the experienced Perl developers are also hard-core vim or emacs users and it is nearly impossible to move them away from their editor. Luckily there were a few who got interested by the idea of having a lot of control over their editor and that made the difference between a failing one man project to a project with a lot of potential. </p> <p> Then at one point came the idea to integrate Parrot and Rakudo and try to provide <b>a platform for Perl 6 development</b> as well. With the awesome work of <a href="http://ahmadzawawi.blogspot.com/">Ahmad M. Zawawi</a> Padre has a lot to offer to anyone who wants to write Perl 6 code. With some more work we'll be able to integrate Parrot even better and then Padre will be able to handle any language running on top of Parrot. </p> <p> While there are still lots of problems with Padre and installation can still be difficult it already more or less has the same power as Notepad++ on both Windows and Linux and probably on Mac too and it has some extra features that even <a href="http://code-and-hacks.blogspot.com/2009/06/stealing-from-padre-for-vim.html">vim people started to steal</a>. </p> Gabor Szabo 2009-07-01T23:24:31+00:00 Padre, Perl, Perl 5, Perl 6, IDE, Rakudo, Parrot Perl 5 to Perl 6 - Arrays http://szabgab.com/blog/2009/06/1245228625.html Continuing the <a href="http://szabgab.com/perl6_tricks_and_treats.html">Perl 6 Tricks and Treats</a> newsletter to help people switch from Perl 5 to Perl 6. Looking at arrays. <p>For the full article visit <a href="http://szabgab.com/blog/2009/06/1245228625.html">Perl 5 to Perl 6 - Arrays</a></p> Gabor Szabo 2009-06-17T01:50:25+00:00 Perl, Perl 6, newsletter, arrays Perl 5 to Perl 6 - Scalars http://szabgab.com/blog/2009/06/1245164696.html The first entry of the <a href="http://szabgab.com/perl6_tricks_and_treats.html">Perl 6 Tricks and Treats</a> newsletter in our quest to switch from Perl 5 to Perl 6. Looking at the scalars. <p>For the full article visit <a href="http://szabgab.com/blog/2009/06/1245164696.html">Perl 5 to Perl 6 - Scalars</a></p> Gabor Szabo 2009-06-16T08:04:56+00:00 Perl, Perl 5, Perl 6, newsletter, scalars Plans for the next 2-3 months http://szabgab.com/blog/2009/06/1244481930.html <p> In the past 6 weeks, since I came back from Oslo I was busy working at a client. I put in about 120% of the regular 9-hour workdays, plus 1.5 driving each day that did not leave much time or energy for any other activity. I barely was able to read blog entries and occasionally write a few lines. Now as we almost reached the dead-line at the client with an actually functioning system, starting from next week I'll be reducing my workload to about 40%. That leaves 3 week-days for other activities for which I have a lot planned. In order to make scheduling a bit easier I'll try to split up the time so every day I'll focus on one of the activities. </p> <p> Here is what I have planned so far: </p> <p> <ul> <li><b>Perl 6</b> In preparation to the classes in Lisbon (<a href="http://szabgab.com/blog/2009/05/1242982492.html">Perl 6 training in Lisbon in August</a>) I need to restart writing my <a href="http://szabgab.com/perl6.html">Perl 6 slides</a> that will hopefully also include frequent posts on the <a href="http://szabgab.com/perl6_tricks_and_treats.html">Perl 6 Tricks and Treats</a> list.</li> <li><b>Test Automation with Perl</b> There are many updates I'd like to make to the materials of the <a href="http://szabgab.com/perl_in_test_automation.html">Test Automation using Perl</a> course. Part of those changes will be used as posts on the <a href="http://szabgab.com/test_automation_tips.html">Test Automation Tips</a> newsletter. <li><b>Testing PHP</b> I am also preparing a new training class called <a href="http://szabgab.com/testing_php_applications.html">Testing PHP Applications</a> for which a lot of material is still missing. I'll post parts of it to the <a href="http://szabgab.com/test_automation_tips.html">Test Automation Tips</a> list. </li> <li><b>Padre</b> I also have lots of ideas in my head that need to be implemented in <a href="http://padre.perlide.org/">Padre</a>. There are a couple of ideas for plug-ins such as the SQL plug-in I mentioned in <a href="http://szabgab.com/blog/2009/05/1243802159.html">Planning an SQL or DBI plugin for Padre</a> but I'd also like to start to write a <a href="http://cpan.uwinnipeg.ca/dist/PDL">PDL</a> plug-in (so it can compete with <a href="http://www.mathworks.com/">Matlab</a>) and a local file history plug-in. I also would like to make sure we can build a <b>working</b> stand-alone executable of Padre at least for Linux. That would make it easier to get started with it. I am also planning to refactor the syntax highlighting code so it will be extremely easy to add another syntax with its own highlighter and it will be very easy to add several highlighters to the same code. For that I need to patch <a href="http://cpan.uwinnipeg.ca/dist/Syntax-Highlight-Engine-Kate">Syntax::Highlight::Engine::Kate</a> and probably I'll also need to refactor the <a href="http://www.parrot.org/">Parrot</a> based syntax highlighter used in the Perl 6 plugin. </li> </ul> </p> <p> Hmm, counting that seems to be 4 items for 3 days and that did not include the sysadmin work I need to do, marketing my classes and working on <a href="http://cpanforum.com/">CPAN::Forum</a> and a set of other project. Oh yes I also started to think about a regular monthly daytime meeting for Open Source Developers under the name <a href="http://osdc.org.il/">Open Source Developers Club</a> though I have not received enthusiastic feedback. In addition I have some projects going on with the localization of the Perl documentation. </p> <p> Oh well, is there a tree where time grows? </p> Gabor Szabo 2009-06-08T10:25:30+00:00 Perl, Perl 5, Perl 6, PHP, Padre, testing, training, PDL, Matlab, plans, SQL, Parrot, OSDC, TODO Planning an SQL or DBI plugin for Padre http://szabgab.com/blog/2009/05/1243802159.html <p> Today I was looking around what kind of helper tools a Perl programmer might need, that is not necessarily for writing Perl code. One of the other fields we frequently visit is databases. We need to write SQL statements, looking into the structure and the content of databases and checking what are the values there, sometimes even designing a schema. </p> <p> On one hand there are command line interfaces for every database and there are specialized desktop or web based tools to look at databases which are very powerful. So we might not need anything else. </p> <p> On the other hand we have <a href="http://cpan.uwinnipeg.ca/dist/DBI">DBI</a>, lots of DBD packages and a number of nice extensions of DBI for building code that can access databases. Maybe we can build some add-ons to <a href="http://padre.perlide.org/">Padre</a> that will make our life even easier. </p> <p> So I'd like your ideas on the subject. What kind of SQL or database related desktop tool would you like to have for your development? </p> <p> Just to start the list, let me write down the trival things I could come up with (trival in thinking about them, not the development): </p> <p> <ul> <li>Probably the most basic feature is to provide <b>SQL highlighting</b> to the .sql files.</li> <li>Then it would be nice to have <b>call-tips</b> explaining the various language elements</li> <li><b>Statement completion</b> would be also nice - once an SQL keyword is typed it should provide a list of keywords that can be used as the next thing (this should be either standard SQL or one of the SQL languages e.g. SQLite</li> <li>Allow the user to define a <b>connections string</b> (database type, hostname, port, database_name (or filename), username, password) and connect to the database</li> <li>Once a connection string is given, provide a <b>drill down view</b> of all the elements of the database (tables, index, stored procedures etc) and even the data</li> <li>Allow the user to type in <b>SQL statements</b> (or mark one as selected text in the editor) and execute the query printing the results set on the output window</li> <li>As extra feature somehow allow the use of this plugin for <b>SQL statements embedded in Perl</b> code and the execution of SQL statements that have placeholders. Is this doable at all?</li> <li>Help to build a <a href="http://cpan.uwinnipeg.ca/dist/DBIx-Class">DBIx::Class</a> setup around the database.</li> </ul> </p> <p> What else ? </p> Gabor Szabo 2009-05-31T13:35:59+00:00 Padre, Perl, Perl 6, SQL, DBI