Author Archive

Perl module of the day

Yazan: dp | 13 September 2011 | No Comments
Categories: Computers, Perl

Next up in the Perl Module of the Day series is Getopt::Long::Descriptive. It gives you the ability to have options passed to your programs like Getopt::Long, but allows you to also set up some descriptive text to be displayed when you need it, formatted in a nice, consistent way. Use is pretty straight-forward. Call it [...]

Gentoo Install Scripts

Yazan: dp | 11 May 2011 | No Comments
Categories: Computers, Internet, Software

Recently, I’ve been installing a lot of Gentoo boxes at work. Because of the tedium of following the Gentoo Handbook every time, and clicking through the steps, I’ve started working on some install scripts. Currently, there’s just one, that downloads the stage and portage files from the closest mirror. And I’ve got other scripts in [...]

Perl Module of the Day

Yazan: dp | 19 April 2011 | No Comments
Categories: Perl

I’m going to start a new series on my blog, called Perl Module of the Day. It won’t have posts every day, but any day that I find an interesting perl module, that I think might help others, I’ll post it here. Todays module isTime::Duration. It simply takes a number of seconds, and converts it [...]

Time Lapse Solar Panel Installation

Yazan: dp | 29 March 2011 | No Comments
Categories: Frugality, Projects

Very cool time lapse video showing an Ann Arbor mans solar panel installation. Many thousands of dollars were spent to get it all right; he expects a $0 electricity bill “soon”. via YouTube – Ann Arbor Michigan Solar Roof Installation.

PHP and nl2br

Yazan: dp | 17 March 2011 | No Comments
Categories: Computers, Software

PHP has a nifty function callednl2br, which will convert newlines within text to tags (optionally enabling the XHTML syntax). I’m curious though, why a br2nl function was never written? Instead, now I have to hack one together. BLARGH!

Overheard in the office

Yazan: dp | 15 March 2011 | No Comments
Categories: Overheard in the Office

“I have to set the date when I create it? Stupid!”

Reasons to use a cartesian join

Yazan: dp | 01 February 2011 | No Comments
Categories: Computers, Software

All over the Internet you’ll find people telling you that cartesian joins are a bad idea. And for the 99% of the time you’d run in to them, they are. But I found a legitimate use for them. I needed to get a count of records from table A for all the records in table [...]

Speeding up your perl scripts with Parallel::Iterator

Yazan: dp | 28 January 2011 | No Comments
Categories: Computers, Software

Image by hongiiv via Flickr Parallel::Iterator is a Perl module that can make your scripts much faster if you perform long-running tasks within a loop. It does this by managing a forking system in the background, allowing your long-running tasks to execute in parallel, instead of one at a time. Your existing code probably looks [...]

Nested JOINs in MySQL

Yazan: dp | 27 January 2011 | No Comments
Categories: Computers, Software

Image via Wikipedia Sometimes, I have a need to SELECT data from a table, LEFT JOINed with another table (because the data in the second table is optional), but then INNER JOINed with a third table. Unfortunately, the resulting query runs (essentially) as two INNER JOINs, removing data that I want. That’s where nested joins [...]

Looking to dig deeper in programming

Yazan: dp | 24 January 2011 | No Comments
Categories: Computers

I was recently promoted at work to Sr. Software Engineer. As a web programmer (LAMP stack), I’ve never really seen the need for further digging in the programming field. But now, I almost feel obligated to do so. So I’m asking the world, where should I start? I’m specifically thinking about advanced topics. Bloom filters? [...]

It's Already Been...