My Recent Posts at The Perl Shop Blog

I also blog over at The Perl Shop Blog. Most of what I write about Perl anymore is over there.

My recent pieces include: Continue reading

Posted in Uncategorized | Tagged | Leave a comment

Subclassing vs Embedding in GoLang

This is a topic that I’ve seen pop up in discussions and articles about Go. The Go programming language does not support inheritance, but instead it supports composition via “embedding.”

It can be a little hard to grasp the difference. This is especially so if you’ve worked in a language like C++, which implements inheritance by (literally) embedding the superclass object within the subclass object.

However, the semantics of Go’s embedding fail to support inheritance in important ways, and there are other Go features and idioms that we use to implement inheritance semantics (or something like them). Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

Finishing Off that Bug in djangocms-picture (part trois)

In the prior episode of this story, I had written a test to detect the bug I want to fix. The djangocms-picture plugin includes errant whitespace inside of HTML anchor tags, which renders as annoying blue underlines next to the images.

I had also discovered why my test didn’t fail as it should have, because Django’s assertHTMLEqual() doesn’t detect all semantically significant whitespace differences. I’m sure it seemed a good idea at the time. But sorry, that’s not working for me.

Fortunately, it’s not that difficult to redesign assertHTMLEqual(). Continue reading

Posted in website revamp | Tagged , , , | Leave a comment

Still Fixing that Bug in djangocms-picture (part deux)

Last time, I began fixing a fairly simply space-within-anchor-tags bug in djangocms-picture.

I’m using this exercise as an opportunity to (a) try out a disciplined development process in the context of a Django application and (b) dig into the Django and Django CMS APIs.

This involves writing a failing test against the existing plugin rendering code, seeing it fail, fixing the bug, and then seeing the test pass.

My experience so far with this framework has not been as stellar as I had originally thought it would be. Continue reading

Posted in website revamp | Tagged , , , | Leave a comment

Fix that Bug in djangocms-picture

I mentioned a couple fundamental issues off the bat with my website revamp using Django CMS.

I’m in the process of revamping my hub site, www.JTimothyKing.com. I had created a barebones site: only a single page of content, two columns (using djangocms-column), and a row of social-media icons (using djangocms-picture). I only made minimal changes to get it “good enough for now.”

There were still a couple unresolved issues, even before any serious theming, one of which was that the social-media icons are rendering with small, blue underlines in between. Before theming the site, I’d like to deal with this irksome quirk.

But oh! I thought, This also presents a perfect opportunity to apply my standard dev process to a Django project! Let’s go! Continue reading

Posted in website revamp | Tagged , , , | Leave a comment

Website Revamp to Django CMS

It was long past time to redo my hub site, www.JTimothyKing.com. It had been running Drupal for far too long. I won’t tell you what version. Suffice it to say that the version had been unsupported for quite some time before I finally decommissioned it.

Rather than upgrade to a new version of Drupal, I chose to revamp the site and move to Django CMS. Continue reading

Posted in website revamp | Tagged , , , | Leave a comment

How to Cheep in Many Programming Languages (not a tutorial, but a spiritual journey)

I have a small problem.

The first part of the problem is that I’ve been a Perl developer for the past decade—

That came out wrong. Let me start again.

I have a small problem.

The first part of the problem is that I’ve been enjoying Modern Perl for the past decade while not learning any other programming languages. Don’t get me wrong: I love Perl, and I love programming, and I love learning new things. But since 2006, I’ve mostly been focusing on personal growth. Continue reading

Posted in Uncategorized | Tagged , | 1 Comment

The Most Powerful Programming Paradigm in the World?

Cornell Facebook Camp Hackathon
Photo by Benjamin Golub

I’m not a hackathon kinda guy. I don’t get off on solving hard or novel problems. I don’t believe in contests. I’m not particularly energized by the idea that a whole bunch of us are trying to solve the same problem at once— I do believe in community, and I appreciate being able to interact with other developers, but on a different level than just getting into the same (virtual or physical) room together, eyes to the computer screen.

So why then did I participate in the Dallas/Fort Worth Perl Mongers
Winter 2013 Hackathon? Continue reading

Posted in Uncategorized | Tagged , , , , , | 1 Comment

Mopping up with Perl

30 Ways to Shock Yourself #2,
photo by Bre Pettis,
from the book Elektroschutz in 132 Bildern

I ported my DFW.pm Hackathon entry to the latest Perl dev release (5.19.9), the one with built-in sub signatures.

I had originally designed it using the latest p5-mop and Алексей Капранов’s (Alexei Kapranov’s) signatures package. (I thought this was more in the spirit of mop than Sub::Signatures.) And that worked fairly well, with only a few glitches, and only a few complaints. But since sub signatures are now available (Yay!) in core (No hiding how I feel about that, eh?), it seemed a good time to bring the experiment fully into the present.

And here are some discoveries from my experiences with Perl mop+signatures. Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment

Benchmarking Perl 6: How Ready for Prime Time Is It?

Racing at the 2009 Camel Cup in Alice Springs, Australia
Photo © 2009 Toby Hudson CC BY-SA

Here are the slides from the talk I gave at this month’s Boston Perl Mongers meeting, this past Tuesday: Benchmarking Perl 6: How Ready for Prime Time Is It?

The talk examines:

  • Perl 6’s suitability for “production.” (Your definition may vary.)
  • Experiences of the state and stability of Rakudo.
  • Benchmarks of my favorite P6 features.
  • Lines of P6 code from everyday life.
  • Some comparisons of P6 with P5.

-TimK

P.S. There’s a lot of the story that you miss when you can’t hear the talk. I may be able to post an audio recording and/or a YouTube video with the audio combined with some version of the slides: still looking into these. Unfortunately, I didn’t have time to set up a proper screencast during the talk, so I’m putting together these productions after the fact. And I’m sure there’s a lesson somewhere in there on the efficiency of good planning in design. 🙂

P.P.S. I collected my data using Geoff Broadwell’s (japhb) per6-bench benchmarking framework. (You can catch the code I used in my GitHub fork of perl6-bench.) I also highly recommend his YAPC::NA 2013 talk.

Posted in Uncategorized | Tagged , , , , | Leave a comment