Today, after a long time, I am finally ready to learn about MediaWiki templates. After having put that off for weeks since I’d first heard of them, I found that it only took about five minutes to learn just about everything there is to know about them from the MediaWiki templates documentation. I think there are a few areas of the ProgClub wiki that could do with the use of templates, might go and see to that now.
Author Archives: Jay Jay
Configuring MediaWiki email settings
Found the doco for MediaWiki’s email settings and now my config looks a little like this:
$wgEnableEmail = true; $wgEnableUserEmail = true; # UPO $wgEmergencyContact = "pcwiki@progclub.org"; $wgPasswordSender = "pcwiki@progclub.org"; $wgNoReplyAddress = $wgEmergencyContact; $wgPasswordSenderName = "ProgClub wiki";
Advice From An Old Programmer
Just recently I read Zed Shaw’s Advice From An Old Programmer, and in it he says:
I’ve been programming for a very long time. So long that it’s incredibly boring to me.
That’s been in the back of my mind for a few days, and something I’ve been thinking about as I hope for people to join ProgClub. It seems to me that the longer you program the less you are interested in programming. But, it takes time to be a good programmer, so the better you get, the less interested you become. ProgClub wants first and foremost people who are *interested* in programming, and secondly it wants people who are *good* at programming. Though it doesn’t seem like there are going to be that many good programmers out there who are going to have the time or the interest for ProgClub. Which means that ProgClub’s best bet is probably to encourage participation from enthusiastic beginners.
WordPress hooks
I wanted to configure the “From” email address that WordPress uses when emailing password resets. The way to do this is with a WordPress hook, specifically a filter hook in this case. So, in wp-config.php I added the following code:
add_filter( 'wp_mail_from', 'pcblog_mail_from' );
add_filter( 'wp_mail_from_name', 'pcblog_mail_from_name' );
function pcblog_mail_from() {
return 'pcblog@progclub.org';
}
function pcblog_mail_from_name() {
return 'ProgClub blog';
}
Discarding messages flagged as spam with mailman
I found these instructions for configuring spamassassin in mailman. The defaults seem a little high to me, so I’ve reconfigured with:
SPAMASSASSIN_DISCARD_SCORE = 7
SPAMASSASSIN_HOLD_SCORE = 2
SPAMASSASSIN_MEMBER_BONUS = 5
Binding all IP addresses with MySQL
Had a problem where localhost wasn’t bound because I’d used bind-address to bind the internet IP address. The fix was to remove bind-address altogether, meaning that all addresses get bound.
Configuring svnmailer
I stumbled upon this documentation for svnmailer while I was closing my browser windows, and in it I found how to modify the subject line for the commit hook emails to include the author. Handy!
Mailman not showing lists
Had a problem with mailman not showing mailing lists on its listinfo page. The problem turned out to be related to my virtual hosts settings.
Empowerment
This theme has sprung into my head a little over the past few weeks, as I’ve just started a club with a view to “empowering” programmers, and it’s apt that I reflect on what that means. So, while I smoke my cigarettes, it’s one of the things I think about. And, as I’ve been thinking about it, I’ve had a few thoughts! Go figure.
Anyway, this is still all a little rough, and this post is only my first step in solidifying these thoughts, but here they are.
Traditionally I’m a “Microsoft” programmer. The other kids used to tease me about it. Actually, I copped it at each end, because all the other Microsoft programmers used to tease me and call me a bleeding heart open-source sympathising commie. There’s no winning. Especially if you’re a “Microsoft” programmer.
Over the past few months I’ve been doing a fair bit with PHP. I figure there are so many great PHP web-apps that PHP can’t be all bad, despite its reputation for being shoddy and insecure. I mean, they teased me for being a “Microsoft” programmer, so they can tease me for being a PHP programmer too if they want. I’ve got pretty thick skin by now. And besides, we all know who the world’s leading authority on programmer fashion is: me. So, I’m clearly authoritative enough that I can roll my own way and set my own trends.
I’ve digressed. I do that. What was I talking about again? Oh, yeah. Empowerment. So, here’s the thing about coming to Linux, and PHP, and open-source in general: it makes you feel powerful. And that’s thought number one: where commercial software vendors like Microsoft and Apple hoard power, open-source programmers give it away. And, they give it to *you*. It makes sense when you think about it. Commercial entities survive on commerce, and there’s only commerce when there are goods and services that customers “depend” on. A commercial software vendor might pay lip-service to “empowering” you, but what they really want is for you to become “dependant” on them, which is the opposite of being empowered.
I’ll give you an example. The other day I wanted to package my new library into a download file. So I decided to go with a .tar.gz and use the tar command to create the file. I scripted my packaging process, and everything was functional in a matter of minutes. A lovely experience of empowerment. Compare this to my every day experience using WinZip. I used to own a copy, but I haven’t bothered to get a new license, and the copy I’m running on my Windows machine at the moment is an evaluation version. Consequently, every time I need to unzip a file, I need to click the button that says “Use evaluation version”, and as if to insult me, the developers thought it would be a good idea to move that button around at random and play a game with me every time I try to get something done. Of course I have WinZip because the default decompression software built into Windows doesn’t handle .tar.gz files. My point here is that in Windows, I’m not very empowered at all. The only way I’ll get a little bit of power is to part with some more money, and then maybe WinZip will start working for me rather than against me. But, even after spending my money, I still wouldn’t have a command-line tool that allowed me to script the compression of my package in a matter of seconds (well, minutes, I’m still new so I had to lookup how to use the tar command, and then trial-and-error my way into getting the right directory structure inside the tarball). This is just one example. I have many more. But I suspect you get the idea, so I won’t elaborate. In case you didn’t get the idea, here it is again: commercial programmers hoard power, and open-source programmers give it away.
This “giving power away” thing is a pretty big cultural change. There’s almost something scary about it. Sometimes I worry that maybe I’m naive, and that maybe other people shouldn’t be empowered. Maybe if they’re empowered then they’ll come after *me* with their new power. Maybe it would be better if I made people need me. I’m pretty sure that’s how *they* think. But… after giving it some thought, I still come down on the side of giving power away. I just think that not only is it the more noble thing to do, it’s also the more practical thing to do. I worry about safety and security too, I just figure I’m likely to be safer and more secure if the people around me are more, rather than less, powerful. I figure that for every more powerful evil person there will be two more powerful good people, and the good will outweigh the bad. There might be a little conflict and a few casualties on the path, but wasn’t there always? So, that’s thought number two: it is better to give power away.
To recap:
- Commercial programmers don’t give power away
- Open-source programmers do give power away
- It’s better to give power away
And those are my thoughts so far. Thanks for reading!