Archive for the 'Computers' Category

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 [...]

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!

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 [...]

How to Correct Grainy Images in Flash

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

When building a new Flash project (from a PSD, for example), you’ll notice Flash likes to compress the absolute HELL out of all images within the asset library upon import. This causes your project to look like absolute shit, but ALAS! There’s an easy solution. After you’ve imported your images to the asset library, right-click [...]

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? [...]

How to Play Your XBOX on Your Computer Monitor (with Audio) on the Cheap!

Yazan: griffigr | 28 December 2010 | No Comments
Categories: Computers, Gaming, Projects

Image via Wikipedia Recently, while doing some design work in my little makeshift studio, I realized I was getting frustrated with a particularly stubborn piece of ActionScript. I needed to take a break, clear my head, and approach the problem with a bit of patience. So, off I went, desperately reaching for a little XBOX [...]

Getting your content to show in Google News

Yazan: dp | 17 December 2010 | No Comments
Categories: Computers, Internet

This is an interesting one for publishers. If your news title is a link, and it links to itself (canonical URL, essentially), Google News will not use it. I’m not completely sure of the details, but that’s the information.

It's Already Been...