Caleb Cushing's Blog Also known as XenoTerraCide
Posts with the tag curriculum:

Teaching Perl - Week 3 - Textual Data

So lastweekyou should have covered variables, conditionals, flow control statements, calling functions, stdin/out/err, and using new perl features.This week we’re covering text processing, scalars, external libraries, and reinforcing what we learned last week. Text Processing is one of Perl’s specialty’s, mostly due to it’s powerful regular expression engine.First install LWP with cpan. cpanp -i Bundle::LWPwill do it.#!/usr/bin/perluse strict;use warnings;use LWP::Simple;getprint(“http://aur.archlinux.org/packages/modern-perl/modern-perl/PKGBUILD");So this is almost completely new… what does it do? and what does it have to do with text?

Teaching Perl - Week 3 - Prelude Commentary

So I think that Head First Programming: A Learner's Guide to Programming Using the Python Languageis a great guideline to teach any programming course, esp a 10 week course as it has 10 chapters. We’re one week behind. Arguably you could merge week 2 into week 1 and I may do just that in a rewrite of this series. In fact I’d suggest you do just that. But for now I’m going to continue on and we’ll see what people think once I reach the end.

Teaching Perl - Week 2 ( part2 )

This part2 was prompted by Chromatic’s post on state. I’d never heard of state before, and it’s documentation is poor. Let’s take a look at how state could affect our game. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 #!/usr/bin/env perl # guess a number game use strict; use warnings; use feature qw( say state switch ); say 'welcome'; # generate the winning number between 1 and 10 # see perlfaq4 for algorithm details my $winning_num = 1 + int( rand( (10-1)+1 ) ); until ( $winning_num == state $guess ) { say 'Guess a number between 1 and 10: '; $guess = readline(*STDIN); # check to see if we have a winner, or the guess is to high, or low.

Teaching Perl - Week 2

Teaching Perl - Week 1 - ( Part2 )

Teaching Perl - Week 1 - ( Part1 )

Make sure you’ve read Part 0first.As I said before Baker provides a Linux server for the perl class. However, none of the students have had a unix class. So I advise touching on it and giving them a link to these tutorialsif they want to use it, and a helping hand. The book also talks about ActiveState but this isn’t the recommended way to do perl on windows anymore. Avoiding crux will prevent you from wasting a week or more on unix which is not what the class is about (my instructor failed horribly at this, and at knowing unix (or perl for that matter) well enough to cover it).

Teaching Perl - Part 0 - Preface

This is my 2 cents on how perl should be getting taught at my school. My school’s curriculum sucks in general across the board. But assuming I can’t change what classes are taught, when and what prerequisites this is how I would teach perl given the current computer science curriculum.Since people reading this are probably not familiar with the Fail that is Baker College(I would not choose Baker if I had to start again but credits don’t transfer easily, so it was easier to continue on with it).