my life

day to day

Archive for the 'commentary' Category

Fedora vs RH6

Tuesday, November 21st, 2006

I forgot what it’s like when packages just don’t install. Remember, the days of RH6, where you’d have to spend a day tracking down all the dependencies only to discover that some tiny POS package prevented the whole install. That’s kind’a how Fedora is today. In fact, I don’t notice any improvements over the old Redhat package management system. Yum runs about the same speed as it did on my 486; quite a remarkable task given that the processing power on my new system is equivalent to a small server farm of 486 units. How can they make something so slow? Having used Debian for the last few years, I feel entirely spoiled.

add to del.icio.us    add to technorati favs   email this

KISS Spam Filtering Wins Out

Thursday, November 9th, 2006

I’ve been an avid Thunderbird user for sometime. One of the biggest draws was its Bayesian JMC. It works for the most part, but hasn’t stood its ground against the constantly evolving spammers. Stock/Image spam being the most effective at escaping detection. I’d say about 5% of spam get’s through. If you take that as a part of the 1000 daily spam emails I get, it’s significant. 50 spams is like what we used to get in ‘97 without filters… and that was annoying!

Thus, I’ve decided that I can’t be bothered any more by the constant email notifications of new spam! This whole class of problems has virtually disappeared for me by creating a simple filter that checks if the sender is in one of my address books. I keep one for automated emails (like those from eBay or mailing lists) and one for personal contacts. Any mail that’s not in one of these lists and isn’t already flagged as spam get’s shoved into a “Unknown Senders” folder that I can check periodically. Since most of my good email comes from known sources, this wins out over the Bayesian filtering.

This is nothing new. The solution has been around for about as long as spam has been. And I still love the JMC in TB. I didn’t disable them; infact, I still keep training them with those emails that end up in “Unknown Senders”. The benefit is now I it’s just easier to flag them as spam and I can do it once a week instead of once an hour.

add to del.icio.us    add to technorati favs   email this

PHP5 Class Visibility

Thursday, August 31st, 2006

Beware: Visibility works on a per class basis and does not prevent instances of the same class from accessing each others protected/private properties/members! I consider this a real cop out from an OO perspective and doesn’t offer me any level comfort.

add to del.icio.us    add to technorati favs   email this

Jiffy Lube Scam

Thursday, August 31st, 2006

I was sent this undercover report on Jiffy Lube today. It exposes their practice of upselling all kinds of services and not performing them. The experiment was constructed by placing small pinhole hidden cameras all over the vehicle and also numbering parts so they could be identified upon later inspection. They visited 9 stores and 5 blatantly ripped them off hundreds of dollars. When confronting the district manager of Jiffy Lube, the man denies his identity and insists he’s a customer who’s red Camero was in the drive bay, but in reality the car belongs to some kids. Jiffy Lube Corporate later confirms the mans identity.

add to del.icio.us    add to technorati favs   email this

New Porsche Turbo

Wednesday, August 16th, 2006

Porsche Turbo
In the Highway section of the LA Times today, there was a nice expose of the new Porsche Turbo. The author had some nice smack talk to laydown on regarding Lambos.

“Look, I’m not saying the Gallardo doesn’t have its uses. If I were a teenage millionaire and I needed a smooth surface from which to blow rails, the Gallardo’s hood is first choice”

http://www.latimes.com/classified/automotive/highway1/la-hy-neil16aug16,0,327997.story?coll=la-home-headlines

add to del.icio.us    add to technorati favs   email this

PHP5 OOP must haves

Friday, July 14th, 2006

We’re always taught when learning OOP to be a strict as possible when declaring methods/members as public, private and protected. For some reason though, when programming PHP we’re in this mode that since it’s a scripting language “let’s not adhere to better practice”. Well, atleast I kind of fall for this and going by all of the other peoples code that I’ve read it’s not too uncommon. The project I’m working on has reaffirmed that there is no excuse for sloppy programming.

When writing OO PHP5, always start by making all properties private or protected. Declare the overloading/accessor methods for __set, __get, and __unset. Throw as many exceptions as possible and things will debug themselves with little or not effort on the programmer.

Asside from protecting your privates, this method aids in profiling your code too. Since by moving your assignments and gets into a function call, they can now be counted by a PHP profiler such as apd.

 

add to del.icio.us    add to technorati favs   email this

Wordpresses Letdown

Monday, July 3rd, 2006

Wordpress quickly became the blogging software of choice for bloggers everywhere, unseating MoveableType the previous title holder. It did this much because MT was too difficult for most to use. It’s templating system and class structure was much more elaborate and thus complicated. It didn’t help too that it was written in Perl, a programming language with very concise sytanx like $foo =~ /[Ff]uck[!].Off?/ able to scare off all but the most bold programmers. Wordpress on the other hand, can be picked up by anyone with limited programming experience in an afternoon’s time. The problem is, however, that the developers of Wordpress are unfortunately amatures themselves, with little or no concept of object oriented (”OO”) design. Wordpress 2 is technically OO, but the class structure is a joke and essentially one big container. There are a handful of mega-classes like WP and WP_Query, which drive the entire application. All do a fine line of bluring the difference between function and object oriented code. Everything else is functional and relies on a global variables such as $wp, $wpdb, and $wp_query, which if anything should be a singleton instances, local in scope. Trying to extend anything is impossible without modifying their code. Their idea of templating is doing “includes” on different php files with formatting and additional logic. There’s no seperation between the presentation layer and the data layer.

Bluring the line b/w OO and functional programming, look at WP::query_posts

function query_posts() {

$this->build_query_string();
query_posts($this->query_string);

}

and the global function query_posts

function &query_posts($query) {

global $wp_query;
return $wp_query->query($query);

}

I don’t mean to lambast the Wordpress developers personally, but this is just humorous. It doesn’t utilize any constructs of PHP designed to handle this kind of thing (E.g. statics and singletons) — and that’s only if you support their overall flow/execution. Granted static methods were introduced in PHP5, but static variables have been around since PHP4.

add to del.icio.us    add to technorati favs   email this