When Philosophy Majors Write Perl

In the interest of doing something other than yelling at clouds, it occurred to me that rather than just sniping at other people’s Perl, I might step up and demonstrate an alternate path. So, here goes; reference code is at my convenience fork of Math::Derivative. The original: sub Derivative1 { my ($x,$y)=@_; my @y2; my $n=$#{$x}; $y2[0]=($y->[1]-$y->[0])/($x->[1]-$x->[0]); $y2[$n]=($y->[$n]-$y->[$n-1])/($x->[$n]-$x->[$n-1]); my $i; for($i=1; $i<$n; $i++) { $y2[$i]=($y->[$i+1]-$y->[$i-1])/($x->[$i+1]-$x->[$i-1]); } return @y2; } My substitute: …

Posted on

When Mathematicians Write Perl

As a followup (of sorts) to my last post, I give you the following: sub Derivative1 { my ($x,$y)=@_; my @y2; my $n=$#{$x}; $y2[0]=($y->[1]-$y->[0])/($x->[1]-$x->[0]); $y2[$n]=($y->[$n]-$y->[$n-1])/($x->[$n]-$x->[$n-1]); my $i; for($i=1; $i<$n; $i++) { $y2[$i]=($y->[$i+1]-$y->[$i-1])/($x->[$i+1]-$x->[$i-1]); } return @y2; } That code is correct, right? I sure hope so, because man do I not want to grovel over that and figure out what the hell it is doing. This glorious manifestation of the human intellect comes from Math::Derivative, a Perl module which, well, does what it says on the tin: it provides functions that compute first and second derivatives of matrices of points. …

Posted on

An Entirely Needless Obstruction

OK, see this? This is why people say uncharitable things about Perl: for (@cmd) { next unless grep /^\Q$cmd\E$/, split(" ", $_->[1]); $cmd_data = $_; push @{$cmd_data->[3]}, ["filter", undef, undef, \&parse_filter] if $_->[1] =~/\bdescribe/; for (@{$cmd_data->[3]}) { for (split(" ", $_->[0])) { (my $key = $_) =~ s/-/_/g; $keyword{$key} = undef; } } last; } It doesn’t matter whose code this is. Suffice it to say that it is a crucial part of a publically-available, fairly popular program, was last edited in 2011, is standing in the way of my getting something accomplished today. …

Posted on

SETEC ASTRONOMY

This morning I learned about Secret via Tom Limoncelli’s Twitter. I’m not at all sure how I feel about this service. As I understand it, the motivation behind this service is that people self-censor too aggressively when posting online, and so Secret offers a platform with many of the benefits of other social network platforms, but with pervasive anonymity. I understand the concern that people are keeping their real thoughts to themselves due to fear of the real-world consequences of their expressing controversial views; however, I tend to think that more often than not this is a good thing. …

Posted on

GitHub Behaves Better

I am pleased to report that after a lot of people yelled at them over the course of this past week, GitHub tried again to present the findings of their internal investigation (context), and did a much better job of it. I particularly appreciate their willingness to look at themselves with a critical, rather than a defensive, eye. I am not unfamiliar with how it feels to have the massively distributed ire of the Internet focused on you and your organization, and I salute GitHub’s leadership for resisting the urge to tack on a parting “and that’s why you were wrong to be so mean to us” or some such. This doesn’t mean that everything’s OK. I’m still sad about this sequence of events, both about the original incident and then the first blog post (to say nothing of Preston-Werner’s personal blog post, yikes), and I suspect it will take more time and more scrutiny before I feel comfortable being the GitHub fanboy I used to be, if ever again. …

Posted on

More Clay

And the hits keep on coming. ┬ノ─┬ノ︵( ⸰ ˘ ⸰ ) Michael Schwern sues Nóirín Plunkett :( Jeff Atwood makes a well-intentioned first effort containing a whole bunch of, for want of a better word, rookie mistakes. :( Go read Shanley’s original post instead. Actually, Annalee at GeekFeminism has written a roundup of the whole crapfest of this past week, just go read that instead. Dear people and organizations in technology who I like and respect: please behave better wrt diversity and inclusion. …

Posted on

Legs of Clay

I came home a couple of hours ago, returning from a full day: the first two-thirds of my workday involved troubleshooting an application performance issue with my teammates, and the last third involved handing out RunKeeper swag at the Boston Marathon. I had been thinking I would write something all #BostonStrong-flavored about the experience of seeing all these people come out to spectate in defiance of last year’s madness. But instead I made myself some dinner, and while I was cooking I read Tom Preston-Werner’s blog post about leaving GitHub (for context, a good place to start is this TechCrunch story (trigger warning: hostile work environment)). …

Posted on

Breeze by Runkeeper

OH HEY YOU GUYS WE MADE AN APP RunKeeper just launched a new app called Breeze! It’s a daily activity tracker for the iPhone 5S, and I am tremendously excited about it. If you’re at all interested in Quantified Self-style life tracking, please take a look! TUAW and TechCrunch have something to say about this.

Posted on

A Real-Life Sysadmin Job Interview Question

Yesterday one of my colleagues flags me down and points to his terminal. “Hang on a second,” he says as I walk over, “let me become root. OK, watch this: see, there’s plenty of free space on the root partition…” At this point my heart leaps up with a sudden, fierce joy. Could it be? Really? “But look, when I try to touch a file…” # df -h /dev/xvde 7.9G 5.3G 2.3G 71% / tmpfs 828M 0 828M 0% /dev/shm # cd / # touch foo touch: cannot touch 'foo': No space left on device At this point I cannot keep the grin off my face. “Try df -ih”, I say. # df -ih Filesystem Inodes IUsed IFree IUse% Mounted on /dev/xvde 512K 512K 0 100% / tmpfs 207K 1 207K 1% /dev/shm Dun-dun-DUNNNNNNNNNNNNNN! …

Posted on

For the Heartbleed Doubters

I promise that this is not going to become the All Heartbleed All The Time blog, but in my defence, this is kind of a big deal. A vendor called CloudFlare decided to perform a practical test of the exploitability of Heartbleed by setting up a vulnerable site and challenging people to steal the private key. I think these two quotes encapsulate the story perfectly: Here’s the good news: after extensive testing on our software stack, we have been unable to successfully use Heartbleed on a vulnerable server to retrieve any private key data. …

Posted on