I’m just going to leave this here.  When moving to Amsterdam, I put together a quick scraping and spidering script to get a list of the most frequently used words in Dutch to practice learning Dutch and building my vocabulary.  The thinking being that by using the most high frequent words, I would learn the language in a demand driven fashion – and learn what matters first!  It’s got a few bells and whistles like Google translation links and context examples.  I figure I’d share it, since it comes up once in a while. The Perl code as a Github gist. Here’s the top 100 words in Dutch.  Run the script to get a larger sample. I want to develop[…]

I stated in an article some time back that a challenge in learning is that the knowledge setting experts apart from novices isn’t explicitly known by either – it’s tacit knowledge. Since that was about learning Perl, I just want to bring attention to this good series of blog posts by chromatic under the header “From Novice To Adept”, as they fill in a bit of this gap: The Risk of Being Undone The Risk of Maintenance The Risk of Failure Pronouns in Perl Functional versus Structural Code The Act of Naming On Answers to Smart Questions Embrace the Copious Documentation Embracing Idioms Cleaning Up Bad Code Declarations and Scope Scalar Context and Arrays And a bonus: Essential Skills For[…]

Google Timeline is a wonderful tool! Here is a Google Timeline for the search “Perl” showing an exceptionally interesting trend: It may seem like the recent efforts to market Perl, as well as the Perl Ironman blogging drive, is paying off big time in terms of online attention! The graph certainly sends a clear message that Perl is alive and kicking as never before. Note: I tried to create comparative graphs for Ruby, Python and Java, but was left with enough noise from fake gems, snake attacks and earthquakes to fill several Hollywood movies. Any suggestions for good searches for comparison are welcome. Note 2: Maybe this is just caused by some Google indexing algorithm gone bad, but a quick[…]

After writing about variable roles a while back, I’ve been thinking a lot about the way I use variables. The post also got quite a lot of attention, so it seems to have hit a note with people. And no wonder it does: the concept kinda promises to tell you something profound about programming. The problem is that it doesn’t really deliver on the promise. The first observation anyone with some experience in programming will see, is that the majority of the roles are loop control variables (check the post, but basically they mention “stepper”, “most-recent-holder”, “most-wanted-holder”, “gatherer” and “follower” as distinct roles, as well as “fixed-value” and “temporary”, who also could be said to be typical loop control roles.[…]

This is just a quick quote from the course description of a ten year old course in Cognitive Psychology and Computer Programming at the Texas A&M: Computer programming perhaps more than any other manufacturing endeavor begins with a thought and through skilled application of knowledge yields an intrinsically proven object that is itself almost mental (encoded electrical information). It’s a good argument for why cognitive psychology is relevant for computer programming, but even more important, it points out the almost mental nature of computer programs. Physiologically, the way our brains operate is mainly through bursts of electrical current called Action Potentials, that propagate information down neurons in a on-off fashion. Some people will call it binary, but the information conveyed[…]

As a programmer, you write for two very different kinds of readers. One is the rigid computer platform, the other is the human maintainers of your code. For the former we have quite conclusive guidelines on what works, but the latter is only consistent as a source of disagreement and uncertainty. Typically the guideline is “Always code as if the person who ends up maintaining your code is a violent psychopath who knows where you live.“, while most people end up writing as if the person maintaining the code is themselves. Neither approach is particularly good -I can’t imagine code written for violent psychopaths  would really be that great to maintain. And on the other end, a lot of coders[…]

Another piece of old research. It’s so interesting, though, I can’t help putting a note up about it. In a piece of research released in 2000, Lutz Prechelt compared C, C++, Java, Perl, Python, Rexx, and Tcl.  (It’s gotten a fair bit of attention before, so it’s not new material) What’s so good is the fairly rigorous and natural approach – instead of leaning exclusively on local students or one company’s employees performing some unnatural task, the researchers solicited for solutions online for the scripting languages (Perl, Python, Rexx and Tcl) and got 80 different implementations of a simple dictionary task. With these tasks they ran a lot of metrics and generated solid, comparable empirical data. Read it for the[…]

I promised to explain better the idea of variable roles I mentioned in the previous post about natural programming. This is based on a finding by Finnish researcher Jorma Sajaniemi (published work), who discovered that 99% of variables in novice’s code can be categorized in to 11 different roles. These roles are variable uses every programmer will recognize: iterators, constants, flags and so on – although in role-terminology the names somewhat differ (steppers, fixed-values and one-way flags, for example).  Mr. Sajaniemi has also found that these roles matches tacit knowledge in expert programmers – i.e. the 11 roles are also typically intuitively recognized by expert programmers even if it is not explicit or active knowledge. Whether or not the same[…]

I just touched upon how natural programming can be a way forward for Perl in my previous post, and quickly saw a twitter from chromatic not understanding the “criticism (?)” of Perl 6. As he is a member of the Perl 6 development team, I am happy that he noticed my post, but not so happy about the lack of understanding. So a clarification is probably called for. My post was not a criticism of Perl 6. I am quite skeptical and apprehensive about P6, which shone through in my article, but criticising a project that started in 2000 for not implementing ideas published in 2008 would be rather unfair. However, Perl seems to be in search of a purpose[…]

When I hear people start talking about “natural” programming, easier ways of programming or making programming available to non-programmers, I get very skeptical. It makes me think of Logo and Turtle Graphics, or programming languages made to be more similar to natural language. It’s like you could make a simpler English to make it easier for non-authors to write literature. So when I first read about The Natural Programming Project, I balked – although for no reason. The researchers working on NPP certainly does approach programming with the aim of making it easier for laypeople, which seems like a turn-off. However, the output of the project is surprisingly interesting to the professional:  Lab studies scientifically testing the utility of design[…]