Archive for August 31st, 2006

Cox Blocked

yet another entry from the people who don’t quite get it file. It seems that Cox Communications has started deleting outbound emails that appear to be spam, and not notifying the sender.

This is bad news for all Cox subscribers. With today’s over agressive spam filters it’s very easy to have legit email marked as spam, and if the user never knows there’s nothing they can do about it.

Now, I’ve always said that email should never be used for anything crucial but we all know it still happens. Besides, are spammers really using Cox to send out emails? It seems you’d have their real contact information and once reported they could take real legal action. Whatever network engineer dreamed up this change, it doesn’t seem to do any real good for Cox. I just don’t understand it.

Of course not wanting to be outdone by their competition, Comcast has not only blocked all incoming email from namezero, but they also blocked all mail from The Well, one of the net’s oldest ISPs.

When will internet providers learn that it’s not up to them what email to whitelist/blacklist, it’s up to the actual person who recieves the email. Let me decide and you’ll win my business in a heartbeat.

August 31st, 2006

Code Optimization Tips Part 1

I realized for being a software engineer that I haven’t written much about programming or coding or anything else. I work mostly with PHP and MySQL, but as some of our applications are getting mad traffic now, I’ve been doing every little thing possible to optimize them.

Here’s a few code optimization tips (mostly PHP) that may not seem obvious to everyone:

  • $i++ vs ++$i Remeber back in college? There was always some sort of ++i / i++ trick question on exams right? So what’s the main difference? Most of you have been hard coded to use $i++ everytime, however that’s not always the best idea. The post increment (i++) actualy creates a temporary variable in memory to retain the value of i before incrementing. The pre increment (++i) doesn’t do that. It simply increments i. If you want to use the incremented version of i inside your loop only, then you might as well use the pre; it’ll save you a bit of memory.
  • Buchen using sizeof() or .size() or whatever. How many times have you done this?

    for(i=0; i < sizeof(array); i++) {

    While this is technically correct, it isn’t the best solution when the cardinality of array is large. Coding it this way will actually re-calculate the size of the array every time the loop runs; and the functional overhead can get expensive. If possible, you should calculate the size once then compare against that.

  • Speaking of functional overhead…Don’t use functions where built in operators will do. For example, this code:

    if (strlen($foo) < 5) {

    can be done without all the overhead by using some of php's natural operations like this:

    if(!isset($foo[4])) {

    The difference here is that isset() is built in to the language (it works like + or -) whereas strlen isn't. (it works like a function you define)

Anyway.. that's enough for now. I'm taking a vacation this weekend.. but when I get back, I'll post some other cool things you might not have known.

August 31st, 2006


About Ryan Jones

Name: Ryan Jones
Alias: HockeyGod
Location: Michigan
Company: Team Detroit
Title: Sr. Search Strategist
AIM: TheHockeyGod
Pets: Who Dey

Twitter & Klout



My Websites

Internet Slang Dictionary
Fail Pictures
FeedButton
Translate British
TextSendr
URL Shortener
Bad Words
WoW Slang
Free Softball Stats

Buy My Book

Recent dotCULT Posts

Calendar

August 2006
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
28293031  

Posts by Month

Posts by Category

Subscribe To RSS Feed

Link Me





ypblogs.com