Programming

Overheard from Alan Programming

“My god, I think that actually works!” foreach my $id ( keys %$hr ) { my $d = $hr->{$id}; if( $d->{parent_id} == 0 ) { $hr->{$id}->{top} = $d->{pagename}; } elsif( $hr->{$d->{parent_id}}->{parent_id} == 0 ) { $hr->{$id}->{top} = $hr->{$d->{parent_id}}->{pagename}; } elsif( $hr->{$hr->{$d->{parent_id}}->{parent_id}}->{parent_id} == 0 ) { $hr->{$id}->{top} = $hr->{$hr->{$d->{parent_id}}->{parent_id}}->{pagename}; } } In case anyone is wondering, […]

Overheard from Alan Programming Read Post »

Perl Module Problems

One of the clients I still do some programming work for has their server at a relatively reputable hosting company (name removed to protect the big company) called lets say, Bob’s Hosting. Anyway, about two weeks ago their main hosting server had some sort of a big crash, and they nuked a lot of things.

Perl Module Problems Read Post »

Note To Self

While working on a project for one of my contract clients I put this in a comment: # NOTE this will only work with three levels deep, no more, if they do want more then # FOR FUCKS SAKE REWRITE THIS PIECE OF SHIT TO DO IT PROPERLY YOU LAZY BASTARD! Surely a sign that

Note To Self Read Post »

Revisiting Old Code

The problem with projects is that sometimes you have to come back to them months, or years, after the fact. When you’re digging around in the code, convinced that the person who wrote it originally (you) was a blithering idiot, and what the hell was I thinking when I did that, and you see something

Revisiting Old Code Read Post »

Knowing How Code Works

James Robertson wrote that Scoble was hurting Visual Studio marketting by saying (openly no less) that he was writing C# in notepad. Note that I’m not too sure how serious James was because he comments on smalltalk…. I of course, have something to say about this 🙂

Knowing How Code Works Read Post »

Impressed with Mason

I’ve got to say, I’m becoming more and more impressed with Mason. Today I wrote the frontend for a survey or polling system and got it done in relatively short time. Not only that, but with only minor tweaking, I can simply stick those components (ie: a component to display a poll) into pretty much

Impressed with Mason Read Post »

I Love Perl

I just wrote a chunk of sexy (or scary) code to lookup the answer a user gave (note it’s actually on one line): $d[0]->[$q->{number}-1]->{answers}-> [$answerlookup{$mydata{$q->{number}}}]->{answer} I’m not sure if I’m more surprised that it compiles or that it appears to actually work. Granted, it’s not as scary as some perl code out there.

I Love Perl Read Post »

Automated Testing With Perl

Automated testing is something that we used to talk about at Merilus all the time, how great it is, how wonderful it would be… but we (at least I) never actually did anything about it. I decided to try a bit here at the new place, did a bit of research this morning and found

Automated Testing With Perl Read Post »